From 4a9fdc8b550bbd583cdbddfcceef5abd2b276b7d Mon Sep 17 00:00:00 2001
From: its-josh4 <74079536+its-josh4@users.noreply.github.com>
Date: Mon, 11 Sep 2023 17:36:48 -0700
Subject: [PATCH] Remove vendored dependencies (#4110)
---
.github/workflows/golangci-lint.yml | 23 +-
.gitignore | 3 +
.golangci.yml | 1 -
cmd/stash/main.go | 2 +-
docker/build/x86_64/Dockerfile | 1 -
docker/build/x86_64/Dockerfile-CUDA | 1 -
scripts/cross-compile.sh | 2 +-
.../github.com/99designs/gqlgen/.dockerignore | 3 -
.../github.com/99designs/gqlgen/.editorconfig | 20 -
.../99designs/gqlgen/.gitattributes | 3 -
vendor/github.com/99designs/gqlgen/.gitignore | 16 -
.../github.com/99designs/gqlgen/.golangci.yml | 39 -
.../github.com/99designs/gqlgen/CHANGELOG.md | 8634 -
.../99designs/gqlgen/CONTRIBUTING.md | 27 -
vendor/github.com/99designs/gqlgen/LICENSE | 19 -
vendor/github.com/99designs/gqlgen/README.md | 150 -
.../99designs/gqlgen/RELEASE-CHECKLIST.md | 14 -
vendor/github.com/99designs/gqlgen/TESTING.md | 40 -
.../99designs/gqlgen/api/generate.go | 125 -
.../github.com/99designs/gqlgen/api/option.go | 47 -
.../99designs/gqlgen/codegen/args.go | 118 -
.../99designs/gqlgen/codegen/args.gotpl | 36 -
.../99designs/gqlgen/codegen/complexity.go | 11 -
.../99designs/gqlgen/codegen/config/binder.go | 494 -
.../99designs/gqlgen/codegen/config/config.go | 648 -
.../99designs/gqlgen/codegen/config/exec.go | 97 -
.../gqlgen/codegen/config/package.go | 62 -
.../gqlgen/codegen/config/resolver.go | 100 -
.../99designs/gqlgen/codegen/data.go | 185 -
.../99designs/gqlgen/codegen/directive.go | 174 -
.../99designs/gqlgen/codegen/directives.gotpl | 149 -
.../99designs/gqlgen/codegen/field.go | 556 -
.../99designs/gqlgen/codegen/field.gotpl | 129 -
.../99designs/gqlgen/codegen/generate.go | 213 -
.../99designs/gqlgen/codegen/generated!.gotpl | 235 -
.../99designs/gqlgen/codegen/input.gotpl | 72 -
.../99designs/gqlgen/codegen/interface.go | 87 -
.../99designs/gqlgen/codegen/interface.gotpl | 21 -
.../99designs/gqlgen/codegen/object.go | 169 -
.../99designs/gqlgen/codegen/object.gotpl | 113 -
.../99designs/gqlgen/codegen/root_.gotpl | 201 -
.../gqlgen/codegen/templates/import.go | 139 -
.../gqlgen/codegen/templates/templates.go | 611 -
.../99designs/gqlgen/codegen/type.go | 32 -
.../99designs/gqlgen/codegen/type.gotpl | 192 -
.../99designs/gqlgen/codegen/util.go | 46 -
.../99designs/gqlgen/complexity/complexity.go | 109 -
.../99designs/gqlgen/graphql/any.go | 19 -
.../99designs/gqlgen/graphql/bool.go | 27 -
.../99designs/gqlgen/graphql/cache.go | 29 -
.../99designs/gqlgen/graphql/coercion.go | 56 -
.../99designs/gqlgen/graphql/context_field.go | 94 -
.../gqlgen/graphql/context_operation.go | 115 -
.../99designs/gqlgen/graphql/context_path.go | 77 -
.../gqlgen/graphql/context_response.go | 153 -
.../gqlgen/graphql/context_root_field.go | 25 -
.../99designs/gqlgen/graphql/errcode/codes.go | 51 -
.../99designs/gqlgen/graphql/error.go | 32 -
.../gqlgen/graphql/executable_schema.go | 162 -
.../gqlgen/graphql/executable_schema_mock.go | 172 -
.../gqlgen/graphql/executor/executor.go | 192 -
.../gqlgen/graphql/executor/extensions.go | 195 -
.../99designs/gqlgen/graphql/fieldset.go | 63 -
.../99designs/gqlgen/graphql/float.go | 47 -
.../99designs/gqlgen/graphql/handler.go | 130 -
.../gqlgen/graphql/handler/extension/apq.go | 114 -
.../graphql/handler/extension/complexity.go | 88 -
.../handler/extension/introspection.go | 29 -
.../gqlgen/graphql/handler/lru/lru.go | 32 -
.../gqlgen/graphql/handler/server.go | 185 -
.../gqlgen/graphql/handler/transport/error.go | 26 -
.../graphql/handler/transport/http_form.go | 208 -
.../graphql/handler/transport/http_get.go | 87 -
.../graphql/handler/transport/http_post.go | 53 -
.../graphql/handler/transport/options.go | 26 -
.../graphql/handler/transport/reader.go | 25 -
.../gqlgen/graphql/handler/transport/util.go | 30 -
.../graphql/handler/transport/websocket.go | 415 -
.../transport/websocket_close_reason.go | 22 -
.../websocket_graphql_transport_ws.go | 149 -
.../handler/transport/websocket_graphqlws.go | 171 -
.../handler/transport/websocket_init.go | 57 -
.../transport/websocket_subprotocol.go | 116 -
.../github.com/99designs/gqlgen/graphql/id.go | 58 -
.../99designs/gqlgen/graphql/int.go | 79 -
.../graphql/introspection/introspection.go | 101 -
.../gqlgen/graphql/introspection/query.go | 106 -
.../gqlgen/graphql/introspection/schema.go | 93 -
.../gqlgen/graphql/introspection/type.go | 191 -
.../99designs/gqlgen/graphql/jsonw.go | 93 -
.../99designs/gqlgen/graphql/map.go | 24 -
.../99designs/gqlgen/graphql/oneshot.go | 16 -
.../gqlgen/graphql/playground/playground.go | 73 -
.../99designs/gqlgen/graphql/recovery.go | 20 -
.../99designs/gqlgen/graphql/response.go | 24 -
.../99designs/gqlgen/graphql/root.go | 7 -
.../99designs/gqlgen/graphql/stats.go | 60 -
.../99designs/gqlgen/graphql/string.go | 70 -
.../99designs/gqlgen/graphql/time.go | 25 -
.../99designs/gqlgen/graphql/uint.go | 81 -
.../99designs/gqlgen/graphql/upload.go | 27 -
.../99designs/gqlgen/graphql/version.go | 3 -
.../gqlgen/init-templates/gqlgen.yml.gotmpl | 56 -
.../gqlgen/init-templates/schema.graphqls | 28 -
.../99designs/gqlgen/internal/code/compare.go | 161 -
.../99designs/gqlgen/internal/code/imports.go | 151 -
.../gqlgen/internal/code/packages.go | 223 -
.../99designs/gqlgen/internal/code/util.go | 61 -
.../gqlgen/internal/imports/prune.go | 100 -
.../gqlgen/internal/rewrite/rewriter.go | 195 -
vendor/github.com/99designs/gqlgen/main.go | 190 -
.../gqlgen/plugin/federation/federation.go | 378 -
.../gqlgen/plugin/federation/federation.gotpl | 259 -
.../plugin/federation/fieldset/fieldset.go | 193 -
.../gqlgen/plugin/federation/readme.md | 39 -
.../gqlgen/plugin/modelgen/models.go | 305 -
.../gqlgen/plugin/modelgen/models.gotpl | 88 -
.../99designs/gqlgen/plugin/plugin.go | 31 -
.../gqlgen/plugin/resolvergen/resolver.go | 212 -
.../gqlgen/plugin/resolvergen/resolver.gotpl | 45 -
.../gqlgen/plugin/servergen/server.go | 52 -
.../gqlgen/plugin/servergen/server.gotpl | 23 -
vendor/github.com/99designs/gqlgen/tools.go | 8 -
.../github.com/WithoutPants/sortorder/LICENSE | 17 -
.../sortorder/casefolded/README.md | 12 -
.../sortorder/casefolded/natsort.go | 190 -
vendor/github.com/Yamashou/gqlgenc/.gitignore | 9 -
.../github.com/Yamashou/gqlgenc/.golangci.yml | 93 -
vendor/github.com/Yamashou/gqlgenc/LICENSE | 21 -
vendor/github.com/Yamashou/gqlgenc/Makefile | 10 -
vendor/github.com/Yamashou/gqlgenc/README.md | 139 -
vendor/github.com/Yamashou/gqlgenc/TESTING.md | 19 -
.../Yamashou/gqlgenc/client/client.go | 182 -
.../Yamashou/gqlgenc/clientgen/client.go | 85 -
.../Yamashou/gqlgenc/clientgen/query.go | 118 -
.../gqlgenc/clientgen/query_source.go | 106 -
.../Yamashou/gqlgenc/clientgen/source.go | 238 -
.../gqlgenc/clientgen/source_generator.go | 231 -
.../Yamashou/gqlgenc/clientgen/template.go | 31 -
.../Yamashou/gqlgenc/clientgen/template.gotpl | 75 -
.../Yamashou/gqlgenc/clientgenv2/client.go | 85 -
.../Yamashou/gqlgenc/clientgenv2/query.go | 94 -
.../gqlgenc/clientgenv2/query_source.go | 106 -
.../Yamashou/gqlgenc/clientgenv2/source.go | 255 -
.../gqlgenc/clientgenv2/source_generator.go | 289 -
.../Yamashou/gqlgenc/clientgenv2/template.go | 39 -
.../gqlgenc/clientgenv2/template.gotpl | 73 -
.../Yamashou/gqlgenc/config/config.go | 311 -
.../Yamashou/gqlgenc/generator/generater.go | 60 -
.../Yamashou/gqlgenc/graphqljson/graphql.go | 369 -
.../Yamashou/gqlgenc/introspection/parse.go | 326 -
.../Yamashou/gqlgenc/introspection/query.go | 93 -
.../Yamashou/gqlgenc/introspection/type.go | 80 -
vendor/github.com/Yamashou/gqlgenc/main.go | 34 -
.../agnivade/levenshtein/.gitignore | 5 -
.../agnivade/levenshtein/.travis.yml | 23 -
.../agnivade/levenshtein/License.txt | 21 -
.../github.com/agnivade/levenshtein/Makefile | 15 -
.../github.com/agnivade/levenshtein/README.md | 80 -
.../agnivade/levenshtein/levenshtein.go | 89 -
vendor/github.com/anacrolix/dms/LICENSE | 24 -
vendor/github.com/anacrolix/dms/dlna/dlna.go | 102 -
vendor/github.com/anacrolix/dms/soap/soap.go | 68 -
vendor/github.com/anacrolix/dms/ssdp/ssdp.go | 330 -
.../github.com/anacrolix/dms/upnp/eventing.go | 91 -
vendor/github.com/anacrolix/dms/upnp/upnp.go | 162 -
.../github.com/anacrolix/dms/upnpav/upnpav.go | 45 -
.../github.com/antchfx/htmlquery/.gitignore | 32 -
.../github.com/antchfx/htmlquery/.travis.yml | 16 -
vendor/github.com/antchfx/htmlquery/LICENSE | 17 -
vendor/github.com/antchfx/htmlquery/README.md | 163 -
vendor/github.com/antchfx/htmlquery/cache.go | 42 -
vendor/github.com/antchfx/htmlquery/query.go | 346 -
vendor/github.com/antchfx/xpath/.gitignore | 32 -
vendor/github.com/antchfx/xpath/.travis.yml | 12 -
vendor/github.com/antchfx/xpath/LICENSE | 17 -
vendor/github.com/antchfx/xpath/README.md | 173 -
vendor/github.com/antchfx/xpath/build.go | 545 -
vendor/github.com/antchfx/xpath/cache.go | 80 -
vendor/github.com/antchfx/xpath/func.go | 614 -
vendor/github.com/antchfx/xpath/func_go110.go | 16 -
.../antchfx/xpath/func_pre_go110.go | 22 -
vendor/github.com/antchfx/xpath/operator.go | 305 -
vendor/github.com/antchfx/xpath/parse.go | 1204 -
vendor/github.com/antchfx/xpath/query.go | 952 -
vendor/github.com/antchfx/xpath/xpath.go | 161 -
.../github.com/asticode/go-astikit/.travis.sh | 8 -
.../asticode/go-astikit/.travis.yml | 15 -
vendor/github.com/asticode/go-astikit/LICENSE | 21 -
.../github.com/asticode/go-astikit/README.md | 6 -
.../github.com/asticode/go-astikit/archive.go | 214 -
.../github.com/asticode/go-astikit/astikit.go | 8 -
.../github.com/asticode/go-astikit/binary.go | 297 -
.../github.com/asticode/go-astikit/bytes.go | 164 -
.../github.com/asticode/go-astikit/defer.go | 57 -
.../github.com/asticode/go-astikit/errors.go | 71 -
vendor/github.com/asticode/go-astikit/exec.go | 104 -
vendor/github.com/asticode/go-astikit/flag.go | 48 -
.../github.com/asticode/go-astikit/float.go | 60 -
vendor/github.com/asticode/go-astikit/http.go | 632 -
vendor/github.com/asticode/go-astikit/io.go | 121 -
.../github.com/asticode/go-astikit/limiter.go | 101 -
.../github.com/asticode/go-astikit/logger.go | 171 -
vendor/github.com/asticode/go-astikit/map.go | 67 -
vendor/github.com/asticode/go-astikit/os.go | 148 -
.../github.com/asticode/go-astikit/os_js.go | 12 -
.../asticode/go-astikit/os_others.go | 12 -
vendor/github.com/asticode/go-astikit/pcm.go | 426 -
vendor/github.com/asticode/go-astikit/ptr.go | 58 -
vendor/github.com/asticode/go-astikit/rand.go | 36 -
vendor/github.com/asticode/go-astikit/sort.go | 13 -
vendor/github.com/asticode/go-astikit/ssh.go | 113 -
vendor/github.com/asticode/go-astikit/stat.go | 301 -
vendor/github.com/asticode/go-astikit/sync.go | 489 -
.../asticode/go-astikit/template.go | 156 -
vendor/github.com/asticode/go-astikit/time.go | 58 -
.../asticode/go-astikit/translator.go | 184 -
.../github.com/asticode/go-astikit/worker.go | 148 -
.../github.com/asticode/go-astisub/.gitignore | 5 -
.../asticode/go-astisub/.travis.yml | 14 -
vendor/github.com/asticode/go-astisub/LICENSE | 21 -
.../github.com/asticode/go-astisub/README.md | 95 -
.../asticode/go-astisub/language.go | 10 -
vendor/github.com/asticode/go-astisub/srt.go | 159 -
vendor/github.com/asticode/go-astisub/ssa.go | 1297 -
vendor/github.com/asticode/go-astisub/stl.go | 1085 -
.../asticode/go-astisub/subtitles.go | 779 -
.../asticode/go-astisub/teletext.go | 997 -
vendor/github.com/asticode/go-astisub/ttml.go | 686 -
.../github.com/asticode/go-astisub/webvtt.go | 537 -
.../github.com/asticode/go-astits/.gitignore | 5 -
.../github.com/asticode/go-astits/.travis.yml | 14 -
vendor/github.com/asticode/go-astits/LICENSE | 21 -
.../github.com/asticode/go-astits/README.md | 193 -
.../asticode/go-astits/clock_reference.go | 29 -
vendor/github.com/asticode/go-astits/crc32.go | 25 -
vendor/github.com/asticode/go-astits/data.go | 117 -
.../github.com/asticode/go-astits/data_eit.go | 124 -
.../github.com/asticode/go-astits/data_nit.go | 80 -
.../github.com/asticode/go-astits/data_pat.go | 63 -
.../github.com/asticode/go-astits/data_pes.go | 747 -
.../github.com/asticode/go-astits/data_pmt.go | 256 -
.../github.com/asticode/go-astits/data_psi.go | 608 -
.../github.com/asticode/go-astits/data_sdt.go | 108 -
.../github.com/asticode/go-astits/data_tot.go | 35 -
.../github.com/asticode/go-astits/demuxer.go | 189 -
.../asticode/go-astits/descriptor.go | 2162 -
vendor/github.com/asticode/go-astits/dvb.go | 130 -
vendor/github.com/asticode/go-astits/muxer.go | 422 -
.../github.com/asticode/go-astits/packet.go | 543 -
.../asticode/go-astits/packet_buffer.go | 139 -
.../asticode/go-astits/packet_pool.go | 101 -
.../asticode/go-astits/program_map.go | 57 -
.../asticode/go-astits/wrapping_counter.go | 22 -
vendor/github.com/chromedp/cdproto/.gitignore | 2 -
vendor/github.com/chromedp/cdproto/LICENSE | 21 -
vendor/github.com/chromedp/cdproto/README.md | 29 -
.../cdproto/accessibility/accessibility.go | 287 -
.../cdproto/accessibility/easyjson.go | 1682 -
.../chromedp/cdproto/accessibility/types.go | 451 -
.../chromedp/cdproto/animation/animation.go | 288 -
.../chromedp/cdproto/animation/easyjson.go | 1672 -
.../chromedp/cdproto/animation/events.go | 24 -
.../chromedp/cdproto/animation/types.go | 107 -
.../applicationcache/applicationcache.go | 147 -
.../cdproto/applicationcache/easyjson.go | 964 -
.../cdproto/applicationcache/events.go | 23 -
.../cdproto/applicationcache/types.go | 36 -
.../chromedp/cdproto/audits/audits.go | 154 -
.../chromedp/cdproto/audits/easyjson.go | 2555 -
.../chromedp/cdproto/audits/events.go | 10 -
.../chromedp/cdproto/audits/types.go | 1010 -
.../backgroundservice/backgroundservice.go | 114 -
.../cdproto/backgroundservice/easyjson.go | 680 -
.../cdproto/backgroundservice/events.go | 21 -
.../cdproto/backgroundservice/types.go | 93 -
.../chromedp/cdproto/browser/browser.go | 587 -
.../chromedp/cdproto/browser/easyjson.go | 2421 -
.../chromedp/cdproto/browser/events.go | 28 -
.../chromedp/cdproto/browser/types.go | 412 -
.../cdproto/cachestorage/cachestorage.go | 210 -
.../chromedp/cdproto/cachestorage/easyjson.go | 1162 -
.../chromedp/cdproto/cachestorage/types.go | 115 -
.../github.com/chromedp/cdproto/cast/cast.go | 142 -
.../chromedp/cdproto/cast/easyjson.go | 599 -
.../chromedp/cdproto/cast/events.go | 19 -
.../github.com/chromedp/cdproto/cast/types.go | 12 -
.../chromedp/cdproto/cdp/easyjson.go | 1329 -
.../github.com/chromedp/cdproto/cdp/types.go | 1304 -
vendor/github.com/chromedp/cdproto/cdproto.go | 2685 -
vendor/github.com/chromedp/cdproto/css/css.go | 969 -
.../chromedp/cdproto/css/easyjson.go | 7008 -
.../github.com/chromedp/cdproto/css/events.go | 42 -
.../github.com/chromedp/cdproto/css/types.go | 374 -
.../chromedp/cdproto/database/database.go | 137 -
.../chromedp/cdproto/database/easyjson.go | 770 -
.../chromedp/cdproto/database/events.go | 10 -
.../chromedp/cdproto/database/types.go | 31 -
.../chromedp/cdproto/debugger/debugger.go | 1058 -
.../chromedp/cdproto/debugger/easyjson.go | 4823 -
.../chromedp/cdproto/debugger/events.go | 85 -
.../chromedp/cdproto/debugger/types.go | 527 -
.../deviceorientation/deviceorientation.go | 63 -
.../cdproto/deviceorientation/easyjson.go | 158 -
vendor/github.com/chromedp/cdproto/dom/dom.go | 1694 -
.../chromedp/cdproto/dom/easyjson.go | 6988 -
.../github.com/chromedp/cdproto/dom/events.go | 124 -
.../github.com/chromedp/cdproto/dom/types.go | 53 -
.../cdproto/domdebugger/domdebugger.go | 312 -
.../chromedp/cdproto/domdebugger/easyjson.go | 1008 -
.../chromedp/cdproto/domdebugger/types.go | 120 -
.../cdproto/domsnapshot/domsnapshot.go | 136 -
.../chromedp/cdproto/domsnapshot/easyjson.go | 3207 -
.../chromedp/cdproto/domsnapshot/types.go | 197 -
.../chromedp/cdproto/domstorage/domstorage.go | 171 -
.../chromedp/cdproto/domstorage/easyjson.go | 1026 -
.../chromedp/cdproto/domstorage/events.go | 37 -
.../chromedp/cdproto/domstorage/types.go | 16 -
.../github.com/chromedp/cdproto/easyjson.go | 287 -
.../chromedp/cdproto/emulation/easyjson.go | 2539 -
.../chromedp/cdproto/emulation/emulation.go | 787 -
.../chromedp/cdproto/emulation/events.go | 9 -
.../chromedp/cdproto/emulation/types.go | 354 -
.../chromedp/cdproto/fetch/easyjson.go | 1540 -
.../chromedp/cdproto/fetch/events.go | 40 -
.../chromedp/cdproto/fetch/fetch.go | 356 -
.../chromedp/cdproto/fetch/types.go | 198 -
.../cdproto/headlessexperimental/easyjson.go | 406 -
.../headlessexperimental.go | 140 -
.../cdproto/headlessexperimental/types.go | 63 -
.../chromedp/cdproto/heapprofiler/easyjson.go | 1856 -
.../chromedp/cdproto/heapprofiler/events.go | 44 -
.../cdproto/heapprofiler/heapprofiler.go | 375 -
.../chromedp/cdproto/heapprofiler/types.go | 45 -
.../chromedp/cdproto/indexeddb/easyjson.go | 1939 -
.../chromedp/cdproto/indexeddb/indexeddb.go | 325 -
.../chromedp/cdproto/indexeddb/types.go | 177 -
.../chromedp/cdproto/input/easyjson.go | 1722 -
.../chromedp/cdproto/input/events.go | 12 -
.../chromedp/cdproto/input/input.go | 714 -
.../chromedp/cdproto/input/types.go | 505 -
.../chromedp/cdproto/inspector/easyjson.go | 321 -
.../chromedp/cdproto/inspector/events.go | 22 -
.../chromedp/cdproto/inspector/inspector.go | 49 -
.../chromedp/cdproto/inspector/types.go | 61 -
.../chromedp/cdproto/io/easyjson.go | 390 -
vendor/github.com/chromedp/cdproto/io/io.go | 140 -
.../github.com/chromedp/cdproto/io/types.go | 14 -
.../chromedp/cdproto/layertree/easyjson.go | 1939 -
.../chromedp/cdproto/layertree/events.go | 22 -
.../chromedp/cdproto/layertree/layertree.go | 352 -
.../chromedp/cdproto/layertree/types.go | 135 -
.../chromedp/cdproto/log/easyjson.go | 709 -
.../github.com/chromedp/cdproto/log/events.go | 10 -
vendor/github.com/chromedp/cdproto/log/log.go | 110 -
.../github.com/chromedp/cdproto/log/types.go | 223 -
.../chromedp/cdproto/media/easyjson.go | 995 -
.../chromedp/cdproto/media/events.go | 50 -
.../chromedp/cdproto/media/media.go | 51 -
.../chromedp/cdproto/media/types.go | 165 -
.../chromedp/cdproto/memory/easyjson.go | 1319 -
.../chromedp/cdproto/memory/memory.go | 284 -
.../chromedp/cdproto/memory/types.go | 82 -
.../chromedp/cdproto/network/easyjson.go | 9650 -
.../chromedp/cdproto/network/events.go | 284 -
.../chromedp/cdproto/network/network.go | 980 -
.../chromedp/cdproto/network/types.go | 2023 -
.../chromedp/cdproto/overlay/easyjson.go | 4430 -
.../chromedp/cdproto/overlay/events.go | 38 -
.../chromedp/cdproto/overlay/overlay.go | 819 -
.../chromedp/cdproto/overlay/types.go | 346 -
.../chromedp/cdproto/page/easyjson.go | 8397 -
.../chromedp/cdproto/page/events.go | 197 -
.../github.com/chromedp/cdproto/page/page.go | 1600 -
.../github.com/chromedp/cdproto/page/types.go | 1527 -
.../chromedp/cdproto/performance/easyjson.go | 503 -
.../chromedp/cdproto/performance/events.go | 11 -
.../cdproto/performance/performance.go | 91 -
.../chromedp/cdproto/performance/types.go | 64 -
.../cdproto/performancetimeline/easyjson.go | 705 -
.../cdproto/performancetimeline/events.go | 11 -
.../performancetimeline.go | 45 -
.../cdproto/performancetimeline/types.go | 55 -
.../chromedp/cdproto/profiler/easyjson.go | 3392 -
.../chromedp/cdproto/profiler/events.go | 40 -
.../chromedp/cdproto/profiler/profiler.go | 460 -
.../chromedp/cdproto/profiler/types.go | 109 -
.../chromedp/cdproto/runtime/easyjson.go | 5006 -
.../chromedp/cdproto/runtime/events.go | 74 -
.../chromedp/cdproto/runtime/runtime.go | 984 -
.../chromedp/cdproto/runtime/types.go | 534 -
.../chromedp/cdproto/security/easyjson.go | 1025 -
.../chromedp/cdproto/security/events.go | 19 -
.../chromedp/cdproto/security/security.go | 76 -
.../chromedp/cdproto/security/types.go | 273 -
.../cdproto/serviceworker/easyjson.go | 1537 -
.../chromedp/cdproto/serviceworker/events.go | 24 -
.../cdproto/serviceworker/serviceworker.go | 316 -
.../chromedp/cdproto/serviceworker/types.go | 164 -
.../chromedp/cdproto/storage/easyjson.go | 1734 -
.../chromedp/cdproto/storage/events.go | 36 -
.../chromedp/cdproto/storage/storage.go | 399 -
.../chromedp/cdproto/storage/types.go | 99 -
.../chromedp/cdproto/systeminfo/easyjson.go | 1287 -
.../chromedp/cdproto/systeminfo/systeminfo.go | 88 -
.../chromedp/cdproto/systeminfo/types.go | 181 -
.../chromedp/cdproto/target/easyjson.go | 2407 -
.../chromedp/cdproto/target/events.go | 62 -
.../chromedp/cdproto/target/target.go | 577 -
.../chromedp/cdproto/target/types.go | 50 -
.../chromedp/cdproto/tethering/easyjson.go | 224 -
.../chromedp/cdproto/tethering/events.go | 12 -
.../chromedp/cdproto/tethering/tethering.go | 65 -
.../chromedp/cdproto/tracing/easyjson.go | 1190 -
.../chromedp/cdproto/tracing/events.go | 37 -
.../chromedp/cdproto/tracing/tracing.go | 213 -
.../chromedp/cdproto/tracing/types.go | 316 -
.../chromedp/cdproto/webaudio/easyjson.go | 1828 -
.../chromedp/cdproto/webaudio/events.go | 122 -
.../chromedp/cdproto/webaudio/types.go | 329 -
.../chromedp/cdproto/webaudio/webaudio.go | 93 -
.../chromedp/cdproto/webauthn/easyjson.go | 1271 -
.../chromedp/cdproto/webauthn/types.go | 190 -
.../chromedp/cdproto/webauthn/webauthn.go | 332 -
.../github.com/chromedp/chromedp/.gitignore | 12 -
vendor/github.com/chromedp/chromedp/LICENSE | 21 -
vendor/github.com/chromedp/chromedp/README.md | 91 -
.../github.com/chromedp/chromedp/allocate.go | 547 -
.../chromedp/chromedp/allocate_linux.go | 21 -
.../chromedp/chromedp/allocate_other.go | 8 -
.../github.com/chromedp/chromedp/browser.go | 358 -
.../github.com/chromedp/chromedp/chromedp.go | 725 -
vendor/github.com/chromedp/chromedp/conn.go | 152 -
.../chromedp/chromedp/device/device.go | 324 -
.../chromedp/chromedp/device/types.go | 56 -
.../github.com/chromedp/chromedp/emulate.go | 177 -
vendor/github.com/chromedp/chromedp/errors.go | 51 -
vendor/github.com/chromedp/chromedp/eval.go | 123 -
vendor/github.com/chromedp/chromedp/input.go | 208 -
vendor/github.com/chromedp/chromedp/js.go | 209 -
vendor/github.com/chromedp/chromedp/kb/kb.go | 129 -
.../github.com/chromedp/chromedp/kb/keys.go | 375 -
vendor/github.com/chromedp/chromedp/nav.go | 131 -
vendor/github.com/chromedp/chromedp/poll.go | 229 -
vendor/github.com/chromedp/chromedp/query.go | 1217 -
vendor/github.com/chromedp/chromedp/target.go | 428 -
vendor/github.com/chromedp/chromedp/util.go | 370 -
.../github.com/chromedp/sysutil/.travis.yml | 6 -
vendor/github.com/chromedp/sysutil/LICENSE | 21 -
vendor/github.com/chromedp/sysutil/README.md | 6 -
vendor/github.com/chromedp/sysutil/sysutil.go | 15 -
.../chromedp/sysutil/sysutil_bsd.go | 26 -
.../chromedp/sysutil/sysutil_linux.go | 34 -
.../chromedp/sysutil/sysutil_other.go | 9 -
.../chromedp/sysutil/sysutil_windows.go | 22 -
vendor/github.com/chromedp/sysutil/timeval.go | 9 -
.../github.com/chromedp/sysutil/timeval32.go | 8 -
.../corona10/goimagehash/.gitignore | 14 -
.../corona10/goimagehash/AUTHORS.md | 5 -
.../corona10/goimagehash/CODEOWNERS | 1 -
.../corona10/goimagehash/Gopkg.lock | 17 -
.../corona10/goimagehash/Gopkg.toml | 34 -
.../github.com/corona10/goimagehash/LICENSE | 25 -
.../github.com/corona10/goimagehash/README.md | 93 -
vendor/github.com/corona10/goimagehash/doc.go | 5 -
.../corona10/goimagehash/etcs/doc.go | 5 -
.../corona10/goimagehash/etcs/utils.go | 61 -
.../corona10/goimagehash/hashcompute.go | 183 -
.../corona10/goimagehash/imagehash.go | 294 -
.../corona10/goimagehash/imagehash18.go | 13 -
.../corona10/goimagehash/imagehash19.go | 9 -
.../corona10/goimagehash/transforms/dct.go | 75 -
.../corona10/goimagehash/transforms/doc.go | 5 -
.../corona10/goimagehash/transforms/pixels.go | 39 -
.../cpuguy83/go-md2man/v2/LICENSE.md | 21 -
.../cpuguy83/go-md2man/v2/md2man/md2man.go | 14 -
.../cpuguy83/go-md2man/v2/md2man/roff.go | 336 -
vendor/github.com/davecgh/go-spew/LICENSE | 15 -
.../github.com/davecgh/go-spew/spew/bypass.go | 145 -
.../davecgh/go-spew/spew/bypasssafe.go | 38 -
.../github.com/davecgh/go-spew/spew/common.go | 341 -
.../github.com/davecgh/go-spew/spew/config.go | 306 -
vendor/github.com/davecgh/go-spew/spew/doc.go | 211 -
.../github.com/davecgh/go-spew/spew/dump.go | 509 -
.../github.com/davecgh/go-spew/spew/format.go | 419 -
.../github.com/davecgh/go-spew/spew/spew.go | 148 -
.../disintegration/imaging/.travis.yml | 14 -
.../github.com/disintegration/imaging/LICENSE | 21 -
.../disintegration/imaging/README.md | 197 -
.../disintegration/imaging/adjust.go | 252 -
.../disintegration/imaging/convolution.go | 148 -
.../github.com/disintegration/imaging/doc.go | 7 -
.../disintegration/imaging/effects.go | 169 -
.../disintegration/imaging/histogram.go | 52 -
.../github.com/disintegration/imaging/io.go | 444 -
.../disintegration/imaging/resize.go | 595 -
.../disintegration/imaging/scanner.go | 285 -
.../disintegration/imaging/tools.go | 249 -
.../disintegration/imaging/transform.go | 268 -
.../disintegration/imaging/utils.go | 167 -
.../github.com/doug-martin/goqu/v9/.gitignore | 4 -
.../doug-martin/goqu/v9/.golangci.yml | 140 -
.../doug-martin/goqu/v9/CODE_OF_CONDUCT.md | 46 -
.../doug-martin/goqu/v9/CONTRIBUTING.md | 31 -
.../github.com/doug-martin/goqu/v9/HISTORY.md | 404 -
vendor/github.com/doug-martin/goqu/v9/LICENSE | 21 -
.../github.com/doug-martin/goqu/v9/Makefile | 6 -
.../github.com/doug-martin/goqu/v9/README.md | 310 -
.../doug-martin/goqu/v9/_config.yml | 1 -
.../doug-martin/goqu/v9/codecov.yml | 3 -
.../doug-martin/goqu/v9/database.go | 648 -
.../doug-martin/goqu/v9/delete_dataset.go | 244 -
.../goqu/v9/dialect/sqlite3/sqlite3.go | 76 -
.../doug-martin/goqu/v9/docker-compose.yml | 62 -
.../goqu/v9/exec/query_executor.go | 247 -
.../doug-martin/goqu/v9/exec/query_factory.go | 36 -
.../doug-martin/goqu/v9/exec/scanner.go | 168 -
.../doug-martin/goqu/v9/exp/alias.go | 59 -
.../doug-martin/goqu/v9/exp/bitwise.go | 89 -
.../doug-martin/goqu/v9/exp/bool.go | 185 -
.../doug-martin/goqu/v9/exp/case.go | 78 -
.../doug-martin/goqu/v9/exp/cast.go | 56 -
.../github.com/doug-martin/goqu/v9/exp/col.go | 84 -
.../doug-martin/goqu/v9/exp/compound.go | 19 -
.../doug-martin/goqu/v9/exp/conflict.go | 86 -
.../github.com/doug-martin/goqu/v9/exp/cte.go | 23 -
.../doug-martin/goqu/v9/exp/delete_clauses.go | 177 -
.../github.com/doug-martin/goqu/v9/exp/exp.go | 734 -
.../doug-martin/goqu/v9/exp/exp_list.go | 66 -
.../doug-martin/goqu/v9/exp/exp_map.go | 164 -
.../doug-martin/goqu/v9/exp/func.go | 89 -
.../doug-martin/goqu/v9/exp/ident.go | 213 -
.../doug-martin/goqu/v9/exp/insert.go | 163 -
.../doug-martin/goqu/v9/exp/insert_clauses.go | 205 -
.../doug-martin/goqu/v9/exp/join.go | 139 -
.../doug-martin/goqu/v9/exp/lateral.go | 24 -
.../doug-martin/goqu/v9/exp/literal.go | 80 -
.../doug-martin/goqu/v9/exp/lock.go | 48 -
.../doug-martin/goqu/v9/exp/order.go | 52 -
.../doug-martin/goqu/v9/exp/range.go | 61 -
.../doug-martin/goqu/v9/exp/record.go | 59 -
.../doug-martin/goqu/v9/exp/select_clauses.go | 379 -
.../doug-martin/goqu/v9/exp/truncate.go | 11 -
.../goqu/v9/exp/truncate_clauses.go | 50 -
.../doug-martin/goqu/v9/exp/update.go | 69 -
.../doug-martin/goqu/v9/exp/update_clauses.go | 216 -
.../doug-martin/goqu/v9/exp/window.go | 90 -
.../doug-martin/goqu/v9/exp/window_func.go | 124 -
.../doug-martin/goqu/v9/expressions.go | 303 -
.../github.com/doug-martin/goqu/v9/go.test.sh | 6 -
vendor/github.com/doug-martin/goqu/v9/goqu.go | 86 -
.../doug-martin/goqu/v9/insert_dataset.go | 271 -
.../goqu/v9/internal/errors/error.go | 19 -
.../goqu/v9/internal/sb/sql_builder.go | 101 -
.../doug-martin/goqu/v9/internal/tag/tags.go | 51 -
.../goqu/v9/internal/util/column_map.go | 130 -
.../goqu/v9/internal/util/reflect.go | 220 -
.../goqu/v9/internal/util/value_slice.go | 33 -
.../doug-martin/goqu/v9/prepared.go | 48 -
.../doug-martin/goqu/v9/select_dataset.go | 695 -
.../doug-martin/goqu/v9/sql_dialect.go | 103 -
.../goqu/v9/sqlgen/common_sql_generator.go | 155 -
.../goqu/v9/sqlgen/delete_sql_generator.go | 72 -
.../v9/sqlgen/expression_sql_generator.go | 733 -
.../goqu/v9/sqlgen/insert_sql_generator.go | 203 -
.../goqu/v9/sqlgen/select_sql_generator.go | 266 -
.../goqu/v9/sqlgen/sql_dialect_options.go | 607 -
.../doug-martin/goqu/v9/sqlgen/sqlgen.go | 15 -
.../goqu/v9/sqlgen/truncate_sql_generator.go | 64 -
.../goqu/v9/sqlgen/update_sql_generator.go | 112 -
.../doug-martin/goqu/v9/truncate_dataset.go | 169 -
.../doug-martin/goqu/v9/update_dataset.go | 245 -
.../doug-martin/goqu/v9/wait-for-it.sh | 182 -
.../fsnotify/fsnotify/.editorconfig | 12 -
.../fsnotify/fsnotify/.gitattributes | 1 -
.../github.com/fsnotify/fsnotify/.gitignore | 6 -
vendor/github.com/fsnotify/fsnotify/.mailmap | 2 -
vendor/github.com/fsnotify/fsnotify/AUTHORS | 62 -
.../github.com/fsnotify/fsnotify/CHANGELOG.md | 339 -
.../fsnotify/fsnotify/CONTRIBUTING.md | 77 -
vendor/github.com/fsnotify/fsnotify/LICENSE | 28 -
vendor/github.com/fsnotify/fsnotify/README.md | 130 -
vendor/github.com/fsnotify/fsnotify/fen.go | 38 -
.../github.com/fsnotify/fsnotify/fsnotify.go | 69 -
.../github.com/fsnotify/fsnotify/inotify.go | 338 -
.../fsnotify/fsnotify/inotify_poller.go | 188 -
vendor/github.com/fsnotify/fsnotify/kqueue.go | 522 -
.../fsnotify/fsnotify/open_mode_bsd.go | 12 -
.../fsnotify/fsnotify/open_mode_darwin.go | 13 -
.../github.com/fsnotify/fsnotify/windows.go | 562 -
vendor/github.com/go-chi/chi/.gitignore | 3 -
vendor/github.com/go-chi/chi/.travis.yml | 18 -
vendor/github.com/go-chi/chi/CHANGELOG.md | 139 -
vendor/github.com/go-chi/chi/CONTRIBUTING.md | 31 -
vendor/github.com/go-chi/chi/LICENSE | 20 -
vendor/github.com/go-chi/chi/README.md | 438 -
vendor/github.com/go-chi/chi/chain.go | 49 -
vendor/github.com/go-chi/chi/chi.go | 134 -
vendor/github.com/go-chi/chi/context.go | 161 -
.../go-chi/chi/middleware/compress.go | 275 -
.../go-chi/chi/middleware/content_charset.go | 51 -
.../go-chi/chi/middleware/content_type.go | 51 -
.../go-chi/chi/middleware/get_head.go | 39 -
.../go-chi/chi/middleware/heartbeat.go | 26 -
.../go-chi/chi/middleware/logger.go | 158 -
.../go-chi/chi/middleware/middleware.go | 12 -
.../go-chi/chi/middleware/nocache.go | 58 -
.../go-chi/chi/middleware/profiler.go | 55 -
.../go-chi/chi/middleware/realip.go | 54 -
.../go-chi/chi/middleware/recoverer.go | 39 -
.../go-chi/chi/middleware/request_id.go | 92 -
.../github.com/go-chi/chi/middleware/strip.go | 56 -
.../go-chi/chi/middleware/terminal.go | 63 -
.../go-chi/chi/middleware/throttle.go | 101 -
.../go-chi/chi/middleware/timeout.go | 49 -
.../go-chi/chi/middleware/url_format.go | 72 -
.../github.com/go-chi/chi/middleware/value.go | 17 -
.../go-chi/chi/middleware/wrap_writer.go | 183 -
vendor/github.com/go-chi/chi/mux.go | 460 -
vendor/github.com/go-chi/chi/tree.go | 846 -
vendor/github.com/go-chi/chi/v5/.gitignore | 3 -
vendor/github.com/go-chi/chi/v5/CHANGELOG.md | 279 -
.../github.com/go-chi/chi/v5/CONTRIBUTING.md | 31 -
vendor/github.com/go-chi/chi/v5/LICENSE | 20 -
vendor/github.com/go-chi/chi/v5/Makefile | 14 -
vendor/github.com/go-chi/chi/v5/README.md | 511 -
vendor/github.com/go-chi/chi/v5/chain.go | 49 -
vendor/github.com/go-chi/chi/v5/chi.go | 134 -
vendor/github.com/go-chi/chi/v5/context.go | 157 -
.../go-chi/chi/v5/middleware/basic_auth.go | 33 -
.../go-chi/chi/v5/middleware/clean_path.go | 28 -
.../go-chi/chi/v5/middleware/compress.go | 399 -
.../chi/v5/middleware/content_charset.go | 51 -
.../chi/v5/middleware/content_encoding.go | 34 -
.../go-chi/chi/v5/middleware/content_type.go | 49 -
.../go-chi/chi/v5/middleware/get_head.go | 39 -
.../go-chi/chi/v5/middleware/heartbeat.go | 26 -
.../go-chi/chi/v5/middleware/logger.go | 174 -
.../go-chi/chi/v5/middleware/middleware.go | 23 -
.../go-chi/chi/v5/middleware/nocache.go | 58 -
.../go-chi/chi/v5/middleware/profiler.go | 55 -
.../go-chi/chi/v5/middleware/realip.go | 54 -
.../go-chi/chi/v5/middleware/recoverer.go | 192 -
.../go-chi/chi/v5/middleware/request_id.go | 96 -
.../go-chi/chi/v5/middleware/route_headers.go | 160 -
.../go-chi/chi/v5/middleware/strip.go | 62 -
.../go-chi/chi/v5/middleware/terminal.go | 63 -
.../go-chi/chi/v5/middleware/throttle.go | 132 -
.../go-chi/chi/v5/middleware/timeout.go | 49 -
.../go-chi/chi/v5/middleware/url_format.go | 72 -
.../go-chi/chi/v5/middleware/value.go | 17 -
.../go-chi/chi/v5/middleware/wrap_writer.go | 165 -
vendor/github.com/go-chi/chi/v5/mux.go | 479 -
vendor/github.com/go-chi/chi/v5/tree.go | 866 -
vendor/github.com/go-chi/cors/LICENSE | 21 -
vendor/github.com/go-chi/cors/README.md | 39 -
vendor/github.com/go-chi/cors/cors.go | 400 -
vendor/github.com/go-chi/cors/utils.go | 70 -
vendor/github.com/go-chi/httplog/LICENSE | 20 -
vendor/github.com/go-chi/httplog/README.md | 67 -
vendor/github.com/go-chi/httplog/config.go | 86 -
vendor/github.com/go-chi/httplog/httplog.go | 248 -
vendor/github.com/go-chi/httplog/util.go | 37 -
vendor/github.com/go-toast/toast/.gitignore | 3 -
vendor/github.com/go-toast/toast/LICENSE | 7 -
vendor/github.com/go-toast/toast/readme.md | 61 -
.../toast/screenshot-action-centre.png | Bin 85126 -> 0 bytes
.../go-toast/toast/screenshot-cli.png | Bin 62466 -> 0 bytes
.../go-toast/toast/screenshot-toast.png | Bin 62644 -> 0 bytes
vendor/github.com/go-toast/toast/toast.go | 359 -
vendor/github.com/gobwas/httphead/LICENSE | 21 -
vendor/github.com/gobwas/httphead/README.md | 63 -
vendor/github.com/gobwas/httphead/cookie.go | 200 -
vendor/github.com/gobwas/httphead/head.go | 275 -
vendor/github.com/gobwas/httphead/httphead.go | 331 -
vendor/github.com/gobwas/httphead/lexer.go | 360 -
vendor/github.com/gobwas/httphead/octet.go | 83 -
vendor/github.com/gobwas/httphead/option.go | 193 -
vendor/github.com/gobwas/httphead/writer.go | 101 -
vendor/github.com/gobwas/pool/LICENSE | 21 -
vendor/github.com/gobwas/pool/README.md | 107 -
vendor/github.com/gobwas/pool/generic.go | 87 -
.../gobwas/pool/internal/pmath/pmath.go | 65 -
vendor/github.com/gobwas/pool/option.go | 43 -
.../github.com/gobwas/pool/pbufio/pbufio.go | 106 -
.../gobwas/pool/pbufio/pbufio_go110.go | 13 -
.../gobwas/pool/pbufio/pbufio_go19.go | 27 -
.../github.com/gobwas/pool/pbytes/pbytes.go | 24 -
vendor/github.com/gobwas/pool/pbytes/pool.go | 59 -
.../gobwas/pool/pbytes/pool_sanitize.go | 121 -
vendor/github.com/gobwas/pool/pool.go | 25 -
vendor/github.com/gobwas/ws/.gitignore | 5 -
vendor/github.com/gobwas/ws/LICENSE | 21 -
vendor/github.com/gobwas/ws/Makefile | 54 -
vendor/github.com/gobwas/ws/README.md | 463 -
vendor/github.com/gobwas/ws/check.go | 145 -
vendor/github.com/gobwas/ws/cipher.go | 61 -
vendor/github.com/gobwas/ws/dialer.go | 563 -
.../github.com/gobwas/ws/dialer_tls_go17.go | 35 -
.../github.com/gobwas/ws/dialer_tls_go18.go | 9 -
vendor/github.com/gobwas/ws/doc.go | 81 -
vendor/github.com/gobwas/ws/errors.go | 54 -
vendor/github.com/gobwas/ws/frame.go | 420 -
vendor/github.com/gobwas/ws/http.go | 504 -
vendor/github.com/gobwas/ws/nonce.go | 80 -
vendor/github.com/gobwas/ws/read.go | 147 -
vendor/github.com/gobwas/ws/server.go | 663 -
vendor/github.com/gobwas/ws/server_test.s | 0
vendor/github.com/gobwas/ws/util.go | 214 -
vendor/github.com/gobwas/ws/write.go | 104 -
vendor/github.com/gobwas/ws/wsutil/cipher.go | 72 -
vendor/github.com/gobwas/ws/wsutil/dialer.go | 146 -
.../github.com/gobwas/ws/wsutil/extenstion.go | 31 -
vendor/github.com/gobwas/ws/wsutil/handler.go | 219 -
vendor/github.com/gobwas/ws/wsutil/helper.go | 279 -
vendor/github.com/gobwas/ws/wsutil/reader.go | 289 -
.../github.com/gobwas/ws/wsutil/upgrader.go | 68 -
vendor/github.com/gobwas/ws/wsutil/utf8.go | 140 -
vendor/github.com/gobwas/ws/wsutil/writer.go | 572 -
vendor/github.com/gobwas/ws/wsutil/wsutil.go | 57 -
vendor/github.com/gofrs/uuid/.gitignore | 15 -
vendor/github.com/gofrs/uuid/LICENSE | 20 -
vendor/github.com/gofrs/uuid/README.md | 117 -
vendor/github.com/gofrs/uuid/codec.go | 234 -
vendor/github.com/gofrs/uuid/fuzz.go | 48 -
vendor/github.com/gofrs/uuid/generator.go | 456 -
vendor/github.com/gofrs/uuid/sql.go | 116 -
vendor/github.com/gofrs/uuid/uuid.go | 285 -
.../github.com/golang-jwt/jwt/v4/.gitignore | 4 -
vendor/github.com/golang-jwt/jwt/v4/LICENSE | 9 -
.../golang-jwt/jwt/v4/MIGRATION_GUIDE.md | 22 -
vendor/github.com/golang-jwt/jwt/v4/README.md | 113 -
.../golang-jwt/jwt/v4/VERSION_HISTORY.md | 135 -
vendor/github.com/golang-jwt/jwt/v4/claims.go | 145 -
vendor/github.com/golang-jwt/jwt/v4/doc.go | 4 -
vendor/github.com/golang-jwt/jwt/v4/ecdsa.go | 142 -
.../golang-jwt/jwt/v4/ecdsa_utils.go | 69 -
.../github.com/golang-jwt/jwt/v4/ed25519.go | 81 -
.../golang-jwt/jwt/v4/ed25519_utils.go | 64 -
vendor/github.com/golang-jwt/jwt/v4/errors.go | 59 -
vendor/github.com/golang-jwt/jwt/v4/hmac.go | 95 -
.../golang-jwt/jwt/v4/map_claims.go | 120 -
vendor/github.com/golang-jwt/jwt/v4/none.go | 52 -
vendor/github.com/golang-jwt/jwt/v4/parser.go | 148 -
vendor/github.com/golang-jwt/jwt/v4/rsa.go | 101 -
.../github.com/golang-jwt/jwt/v4/rsa_pss.go | 142 -
.../github.com/golang-jwt/jwt/v4/rsa_utils.go | 105 -
.../golang-jwt/jwt/v4/signing_method.go | 35 -
.../golang-jwt/jwt/v4/staticcheck.conf | 1 -
vendor/github.com/golang-jwt/jwt/v4/token.go | 110 -
.../golang-migrate/migrate/v4/.dockerignore | 12 -
.../golang-migrate/migrate/v4/.gitignore | 10 -
.../golang-migrate/migrate/v4/.golangci.yml | 27 -
.../golang-migrate/migrate/v4/.goreleaser.yml | 98 -
.../golang-migrate/migrate/v4/.travis.yml | 138 -
.../golang-migrate/migrate/v4/CONTRIBUTING.md | 24 -
.../golang-migrate/migrate/v4/Dockerfile | 26 -
.../migrate/v4/Dockerfile.circleci | 17 -
.../migrate/v4/Dockerfile.github-actions | 8 -
.../golang-migrate/migrate/v4/FAQ.md | 79 -
.../migrate/v4/GETTING_STARTED.md | 53 -
.../golang-migrate/migrate/v4/LICENSE | 28 -
.../golang-migrate/migrate/v4/MIGRATIONS.md | 86 -
.../golang-migrate/migrate/v4/Makefile | 120 -
.../golang-migrate/migrate/v4/README.md | 186 -
.../migrate/v4/database/driver.go | 123 -
.../migrate/v4/database/error.go | 27 -
.../migrate/v4/database/sqlite3/README.md | 16 -
.../migrate/v4/database/sqlite3/sqlite3.go | 269 -
.../migrate/v4/database/util.go | 33 -
.../migrate/v4/docker-deploy.sh | 5 -
.../migrate/v4/internal/url/url.go | 25 -
.../golang-migrate/migrate/v4/log.go | 12 -
.../golang-migrate/migrate/v4/migrate.go | 981 -
.../golang-migrate/migrate/v4/migration.go | 160 -
.../migrate/v4/source/driver.go | 118 -
.../migrate/v4/source/errors.go | 15 -
.../migrate/v4/source/file/README.md | 4 -
.../migrate/v4/source/file/file.go | 44 -
.../migrate/v4/source/file/file_go115.go | 32 -
.../migrate/v4/source/file/file_go116.go | 31 -
.../migrate/v4/source/httpfs/README.md | 49 -
.../migrate/v4/source/httpfs/driver.go | 31 -
.../v4/source/httpfs/partial_driver.go | 156 -
.../migrate/v4/source/iofs/README.md | 3 -
.../migrate/v4/source/iofs/doc.go | 10 -
.../migrate/v4/source/iofs/iofs.go | 175 -
.../testdata/migrations/1_foobar.down.sql | 1 -
.../iofs/testdata/migrations/1_foobar.up.sql | 1 -
.../iofs/testdata/migrations/3_foobar.up.sql | 1 -
.../testdata/migrations/4_foobar.down.sql | 1 -
.../iofs/testdata/migrations/4_foobar.up.sql | 1 -
.../testdata/migrations/5_foobar.down.sql | 1 -
.../testdata/migrations/7_foobar.down.sql | 1 -
.../iofs/testdata/migrations/7_foobar.up.sql | 1 -
.../migrate/v4/source/migration.go | 143 -
.../golang-migrate/migrate/v4/source/parse.go | 39 -
.../golang-migrate/migrate/v4/util.go | 62 -
vendor/github.com/golang/groupcache/LICENSE | 191 -
.../github.com/golang/groupcache/lru/lru.go | 133 -
.../gorilla/securecookie/.travis.yml | 19 -
.../github.com/gorilla/securecookie/LICENSE | 27 -
.../github.com/gorilla/securecookie/README.md | 80 -
vendor/github.com/gorilla/securecookie/doc.go | 61 -
.../github.com/gorilla/securecookie/fuzz.go | 25 -
.../gorilla/securecookie/securecookie.go | 646 -
vendor/github.com/gorilla/sessions/AUTHORS | 43 -
vendor/github.com/gorilla/sessions/LICENSE | 27 -
vendor/github.com/gorilla/sessions/README.md | 83 -
vendor/github.com/gorilla/sessions/cookie.go | 19 -
.../gorilla/sessions/cookie_go111.go | 20 -
vendor/github.com/gorilla/sessions/doc.go | 194 -
vendor/github.com/gorilla/sessions/lex.go | 102 -
vendor/github.com/gorilla/sessions/options.go | 18 -
.../gorilla/sessions/options_go111.go | 22 -
.../github.com/gorilla/sessions/sessions.go | 218 -
vendor/github.com/gorilla/sessions/store.go | 292 -
.../github.com/gorilla/websocket/.gitignore | 25 -
vendor/github.com/gorilla/websocket/AUTHORS | 9 -
vendor/github.com/gorilla/websocket/LICENSE | 22 -
vendor/github.com/gorilla/websocket/README.md | 39 -
vendor/github.com/gorilla/websocket/client.go | 422 -
.../gorilla/websocket/compression.go | 148 -
vendor/github.com/gorilla/websocket/conn.go | 1230 -
vendor/github.com/gorilla/websocket/doc.go | 227 -
vendor/github.com/gorilla/websocket/join.go | 42 -
vendor/github.com/gorilla/websocket/json.go | 60 -
vendor/github.com/gorilla/websocket/mask.go | 55 -
.../github.com/gorilla/websocket/mask_safe.go | 16 -
.../github.com/gorilla/websocket/prepared.go | 102 -
vendor/github.com/gorilla/websocket/proxy.go | 77 -
vendor/github.com/gorilla/websocket/server.go | 365 -
.../gorilla/websocket/tls_handshake.go | 21 -
.../gorilla/websocket/tls_handshake_116.go | 21 -
vendor/github.com/gorilla/websocket/util.go | 283 -
.../gorilla/websocket/x_net_proxy.go | 473 -
vendor/github.com/hashicorp/errwrap/LICENSE | 354 -
vendor/github.com/hashicorp/errwrap/README.md | 89 -
.../github.com/hashicorp/errwrap/errwrap.go | 169 -
.../hashicorp/go-multierror/.travis.yml | 12 -
.../hashicorp/go-multierror/LICENSE | 353 -
.../hashicorp/go-multierror/Makefile | 31 -
.../hashicorp/go-multierror/README.md | 131 -
.../hashicorp/go-multierror/append.go | 41 -
.../hashicorp/go-multierror/flatten.go | 26 -
.../hashicorp/go-multierror/format.go | 27 -
.../hashicorp/go-multierror/group.go | 38 -
.../hashicorp/go-multierror/multierror.go | 118 -
.../hashicorp/go-multierror/prefix.go | 37 -
.../hashicorp/go-multierror/sort.go | 16 -
.../hashicorp/golang-lru/.gitignore | 23 -
vendor/github.com/hashicorp/golang-lru/2q.go | 223 -
.../github.com/hashicorp/golang-lru/LICENSE | 362 -
.../github.com/hashicorp/golang-lru/README.md | 25 -
vendor/github.com/hashicorp/golang-lru/arc.go | 257 -
vendor/github.com/hashicorp/golang-lru/doc.go | 21 -
vendor/github.com/hashicorp/golang-lru/lru.go | 150 -
.../hashicorp/golang-lru/simplelru/lru.go | 177 -
.../golang-lru/simplelru/lru_interface.go | 39 -
vendor/github.com/hashicorp/hcl/.gitignore | 9 -
vendor/github.com/hashicorp/hcl/.travis.yml | 13 -
vendor/github.com/hashicorp/hcl/LICENSE | 354 -
vendor/github.com/hashicorp/hcl/Makefile | 18 -
vendor/github.com/hashicorp/hcl/README.md | 125 -
vendor/github.com/hashicorp/hcl/appveyor.yml | 19 -
vendor/github.com/hashicorp/hcl/decoder.go | 729 -
vendor/github.com/hashicorp/hcl/hcl.go | 11 -
.../github.com/hashicorp/hcl/hcl/ast/ast.go | 219 -
.../github.com/hashicorp/hcl/hcl/ast/walk.go | 52 -
.../hashicorp/hcl/hcl/parser/error.go | 17 -
.../hashicorp/hcl/hcl/parser/parser.go | 532 -
.../hashicorp/hcl/hcl/printer/nodes.go | 789 -
.../hashicorp/hcl/hcl/printer/printer.go | 66 -
.../hashicorp/hcl/hcl/scanner/scanner.go | 652 -
.../hashicorp/hcl/hcl/strconv/quote.go | 241 -
.../hashicorp/hcl/hcl/token/position.go | 46 -
.../hashicorp/hcl/hcl/token/token.go | 219 -
.../hashicorp/hcl/json/parser/flatten.go | 117 -
.../hashicorp/hcl/json/parser/parser.go | 313 -
.../hashicorp/hcl/json/scanner/scanner.go | 451 -
.../hashicorp/hcl/json/token/position.go | 46 -
.../hashicorp/hcl/json/token/token.go | 118 -
vendor/github.com/hashicorp/hcl/lex.go | 38 -
vendor/github.com/hashicorp/hcl/parse.go | 39 -
.../inconshreveable/mousetrap/LICENSE | 13 -
.../inconshreveable/mousetrap/README.md | 23 -
.../inconshreveable/mousetrap/trap_others.go | 15 -
.../inconshreveable/mousetrap/trap_windows.go | 98 -
.../mousetrap/trap_windows_1.4.go | 46 -
vendor/github.com/jinzhu/copier/Guardfile | 3 -
vendor/github.com/jinzhu/copier/License | 20 -
vendor/github.com/jinzhu/copier/README.md | 100 -
vendor/github.com/jinzhu/copier/copier.go | 189 -
vendor/github.com/jinzhu/copier/wercker.yml | 23 -
vendor/github.com/jmoiron/sqlx/.gitignore | 25 -
vendor/github.com/jmoiron/sqlx/.travis.yml | 27 -
vendor/github.com/jmoiron/sqlx/LICENSE | 23 -
vendor/github.com/jmoiron/sqlx/README.md | 213 -
vendor/github.com/jmoiron/sqlx/bind.go | 265 -
vendor/github.com/jmoiron/sqlx/doc.go | 12 -
vendor/github.com/jmoiron/sqlx/named.go | 432 -
.../github.com/jmoiron/sqlx/named_context.go | 132 -
.../jmoiron/sqlx/reflectx/README.md | 17 -
.../jmoiron/sqlx/reflectx/reflect.go | 444 -
vendor/github.com/jmoiron/sqlx/sqlx.go | 1049 -
.../github.com/jmoiron/sqlx/sqlx_context.go | 414 -
vendor/github.com/josharian/intern/README.md | 5 -
vendor/github.com/josharian/intern/intern.go | 44 -
vendor/github.com/josharian/intern/license.md | 21 -
.../github.com/json-iterator/go/.codecov.yml | 3 -
vendor/github.com/json-iterator/go/.gitignore | 4 -
.../github.com/json-iterator/go/.travis.yml | 14 -
vendor/github.com/json-iterator/go/Gopkg.lock | 21 -
vendor/github.com/json-iterator/go/Gopkg.toml | 26 -
vendor/github.com/json-iterator/go/LICENSE | 21 -
vendor/github.com/json-iterator/go/README.md | 85 -
vendor/github.com/json-iterator/go/adapter.go | 150 -
vendor/github.com/json-iterator/go/any.go | 325 -
.../github.com/json-iterator/go/any_array.go | 278 -
.../github.com/json-iterator/go/any_bool.go | 137 -
.../github.com/json-iterator/go/any_float.go | 83 -
.../github.com/json-iterator/go/any_int32.go | 74 -
.../github.com/json-iterator/go/any_int64.go | 74 -
.../json-iterator/go/any_invalid.go | 82 -
vendor/github.com/json-iterator/go/any_nil.go | 69 -
.../github.com/json-iterator/go/any_number.go | 123 -
.../github.com/json-iterator/go/any_object.go | 374 -
vendor/github.com/json-iterator/go/any_str.go | 166 -
.../github.com/json-iterator/go/any_uint32.go | 74 -
.../github.com/json-iterator/go/any_uint64.go | 74 -
vendor/github.com/json-iterator/go/build.sh | 12 -
vendor/github.com/json-iterator/go/config.go | 375 -
.../go/fuzzy_mode_convert_table.md | 7 -
vendor/github.com/json-iterator/go/iter.go | 349 -
.../github.com/json-iterator/go/iter_array.go | 64 -
.../github.com/json-iterator/go/iter_float.go | 342 -
.../github.com/json-iterator/go/iter_int.go | 346 -
.../json-iterator/go/iter_object.go | 267 -
.../github.com/json-iterator/go/iter_skip.go | 130 -
.../json-iterator/go/iter_skip_sloppy.go | 163 -
.../json-iterator/go/iter_skip_strict.go | 99 -
.../github.com/json-iterator/go/iter_str.go | 215 -
.../github.com/json-iterator/go/jsoniter.go | 18 -
vendor/github.com/json-iterator/go/pool.go | 42 -
vendor/github.com/json-iterator/go/reflect.go | 337 -
.../json-iterator/go/reflect_array.go | 104 -
.../json-iterator/go/reflect_dynamic.go | 70 -
.../json-iterator/go/reflect_extension.go | 483 -
.../json-iterator/go/reflect_json_number.go | 112 -
.../go/reflect_json_raw_message.go | 76 -
.../json-iterator/go/reflect_map.go | 346 -
.../json-iterator/go/reflect_marshaler.go | 225 -
.../json-iterator/go/reflect_native.go | 453 -
.../json-iterator/go/reflect_optional.go | 129 -
.../json-iterator/go/reflect_slice.go | 99 -
.../go/reflect_struct_decoder.go | 1097 -
.../go/reflect_struct_encoder.go | 211 -
vendor/github.com/json-iterator/go/stream.go | 210 -
.../json-iterator/go/stream_float.go | 111 -
.../github.com/json-iterator/go/stream_int.go | 190 -
.../github.com/json-iterator/go/stream_str.go | 372 -
vendor/github.com/json-iterator/go/test.sh | 12 -
.../gosx-notifier/LICENSE-MIT | 22 -
.../gosx-notifier/README.md | 179 -
.../gosx-notifier/example.png | Bin 61767 -> 0 bytes
.../gosx-notifier/gopher.png | Bin 2237 -> 0 bytes
.../gosx-notifier/gosx-notifier.go | 137 -
.../gosx-notifier/terminal-app-binary.go | 3428 -
.../gosx-notifier/terminal-app-zip.go | 116 -
.../kermieisinthehouse/systray/.gitignore | 12 -
.../kermieisinthehouse/systray/CHANGELOG.md | 125 -
.../kermieisinthehouse/systray/LICENSE | 202 -
.../kermieisinthehouse/systray/Makefile | 18 -
.../kermieisinthehouse/systray/README.md | 122 -
.../kermieisinthehouse/systray/systray.go | 244 -
.../kermieisinthehouse/systray/systray.h | 17 -
.../systray/systray_darwin.go | 38 -
.../systray/systray_darwin.m | 294 -
.../systray/systray_linux.c | 269 -
.../systray/systray_linux.go | 29 -
.../systray/systray_nonwindows.go | 107 -
.../systray/systray_windows.go | 956 -
.../lucasb-eyer/go-colorful/.gitignore | 101 -
.../lucasb-eyer/go-colorful/CHANGELOG.md | 42 -
.../lucasb-eyer/go-colorful/LICENSE | 7 -
.../lucasb-eyer/go-colorful/README.md | 482 -
.../lucasb-eyer/go-colorful/colorgens.go | 55 -
.../lucasb-eyer/go-colorful/colors.go | 979 -
.../go-colorful/happy_palettegen.go | 25 -
.../lucasb-eyer/go-colorful/hexcolor.go | 67 -
.../go-colorful/hsluv-snapshot-rev4.json | 1 -
.../lucasb-eyer/go-colorful/hsluv.go | 207 -
.../go-colorful/soft_palettegen.go | 185 -
.../go-colorful/warm_palettegen.go | 25 -
.../magiconair/properties/.gitignore | 6 -
.../magiconair/properties/.travis.yml | 17 -
.../magiconair/properties/CHANGELOG.md | 160 -
.../magiconair/properties/LICENSE.md | 24 -
.../magiconair/properties/README.md | 128 -
.../magiconair/properties/decode.go | 289 -
.../github.com/magiconair/properties/doc.go | 156 -
.../magiconair/properties/integrate.go | 34 -
.../github.com/magiconair/properties/lex.go | 395 -
.../github.com/magiconair/properties/load.go | 293 -
.../magiconair/properties/parser.go | 86 -
.../magiconair/properties/properties.go | 853 -
.../magiconair/properties/rangecheck.go | 31 -
vendor/github.com/mailru/easyjson/.gitignore | 6 -
vendor/github.com/mailru/easyjson/.travis.yml | 15 -
vendor/github.com/mailru/easyjson/LICENSE | 7 -
vendor/github.com/mailru/easyjson/Makefile | 72 -
vendor/github.com/mailru/easyjson/README.md | 387 -
.../github.com/mailru/easyjson/buffer/pool.go | 278 -
vendor/github.com/mailru/easyjson/helpers.go | 114 -
.../mailru/easyjson/jlexer/bytestostr.go | 24 -
.../easyjson/jlexer/bytestostr_nounsafe.go | 13 -
.../mailru/easyjson/jlexer/error.go | 15 -
.../mailru/easyjson/jlexer/lexer.go | 1244 -
.../mailru/easyjson/jwriter/writer.go | 405 -
vendor/github.com/mailru/easyjson/raw.go | 45 -
.../mailru/easyjson/unknown_fields.go | 32 -
vendor/github.com/matryer/moq/.gitignore | 29 -
vendor/github.com/matryer/moq/.goreleaser.yml | 32 -
vendor/github.com/matryer/moq/LICENSE | 21 -
vendor/github.com/matryer/moq/README.md | 135 -
.../moq/internal/registry/method_scope.go | 135 -
.../matryer/moq/internal/registry/package.go | 93 -
.../matryer/moq/internal/registry/registry.go | 190 -
.../matryer/moq/internal/registry/var.go | 141 -
.../matryer/moq/internal/template/template.go | 190 -
.../moq/internal/template/template_data.go | 125 -
vendor/github.com/matryer/moq/main.go | 109 -
.../github.com/matryer/moq/moq-logo-small.png | Bin 32570 -> 0 bytes
vendor/github.com/matryer/moq/moq-logo.png | Bin 29562 -> 0 bytes
.../matryer/moq/pkg/moq/formatter.go | 31 -
vendor/github.com/matryer/moq/pkg/moq/moq.go | 171 -
vendor/github.com/matryer/moq/preview.png | Bin 743543 -> 0 bytes
vendor/github.com/matryer/moq/releasing.md | 28 -
.../github.com/mattn/go-sqlite3/.codecov.yml | 4 -
vendor/github.com/mattn/go-sqlite3/.gitignore | 14 -
vendor/github.com/mattn/go-sqlite3/LICENSE | 21 -
vendor/github.com/mattn/go-sqlite3/README.md | 592 -
vendor/github.com/mattn/go-sqlite3/backup.go | 85 -
.../github.com/mattn/go-sqlite3/callback.go | 392 -
vendor/github.com/mattn/go-sqlite3/convert.go | 299 -
vendor/github.com/mattn/go-sqlite3/doc.go | 135 -
vendor/github.com/mattn/go-sqlite3/error.go | 150 -
.../mattn/go-sqlite3/sqlite3-binding.c | 234589 ---------------
.../mattn/go-sqlite3/sqlite3-binding.h | 12365 -
vendor/github.com/mattn/go-sqlite3/sqlite3.go | 2183 -
.../mattn/go-sqlite3/sqlite3_context.go | 103 -
.../mattn/go-sqlite3/sqlite3_func_crypt.go | 120 -
.../mattn/go-sqlite3/sqlite3_go18.go | 70 -
.../mattn/go-sqlite3/sqlite3_libsqlite3.go | 19 -
.../go-sqlite3/sqlite3_load_extension.go | 84 -
.../go-sqlite3/sqlite3_load_extension_omit.go | 24 -
.../sqlite3_opt_allow_uri_authority.go | 15 -
.../mattn/go-sqlite3/sqlite3_opt_app_armor.go | 16 -
.../go-sqlite3/sqlite3_opt_column_metadata.go | 21 -
.../go-sqlite3/sqlite3_opt_foreign_keys.go | 15 -
.../mattn/go-sqlite3/sqlite3_opt_fts5.go | 14 -
.../mattn/go-sqlite3/sqlite3_opt_icu.go | 17 -
.../go-sqlite3/sqlite3_opt_introspect.go | 15 -
.../mattn/go-sqlite3/sqlite3_opt_json1.go | 13 -
.../mattn/go-sqlite3/sqlite3_opt_preupdate.go | 20 -
.../go-sqlite3/sqlite3_opt_preupdate_hook.go | 112 -
.../go-sqlite3/sqlite3_opt_preupdate_omit.go | 21 -
.../go-sqlite3/sqlite3_opt_secure_delete.go | 15 -
.../sqlite3_opt_secure_delete_fast.go | 15 -
.../mattn/go-sqlite3/sqlite3_opt_stat4.go | 15 -
.../go-sqlite3/sqlite3_opt_unlock_notify.c | 85 -
.../go-sqlite3/sqlite3_opt_unlock_notify.go | 93 -
.../mattn/go-sqlite3/sqlite3_opt_userauth.go | 289 -
.../go-sqlite3/sqlite3_opt_userauth_omit.go | 152 -
.../go-sqlite3/sqlite3_opt_vacuum_full.go | 15 -
.../go-sqlite3/sqlite3_opt_vacuum_incr.go | 15 -
.../mattn/go-sqlite3/sqlite3_opt_vtable.go | 709 -
.../mattn/go-sqlite3/sqlite3_other.go | 17 -
.../mattn/go-sqlite3/sqlite3_solaris.go | 14 -
.../mattn/go-sqlite3/sqlite3_trace.go | 287 -
.../mattn/go-sqlite3/sqlite3_type.go | 62 -
.../go-sqlite3/sqlite3_usleep_windows.go | 41 -
.../mattn/go-sqlite3/sqlite3_windows.go | 18 -
.../github.com/mattn/go-sqlite3/sqlite3ext.h | 668 -
.../mattn/go-sqlite3/static_mock.go | 37 -
.../github.com/mitchellh/go-homedir/LICENSE | 21 -
.../github.com/mitchellh/go-homedir/README.md | 14 -
.../mitchellh/go-homedir/homedir.go | 167 -
.../mitchellh/mapstructure/CHANGELOG.md | 96 -
.../github.com/mitchellh/mapstructure/LICENSE | 21 -
.../mitchellh/mapstructure/README.md | 46 -
.../mitchellh/mapstructure/decode_hooks.go | 279 -
.../mitchellh/mapstructure/error.go | 50 -
.../mitchellh/mapstructure/mapstructure.go | 1540 -
.../modern-go/concurrent/.gitignore | 1 -
.../modern-go/concurrent/.travis.yml | 14 -
.../github.com/modern-go/concurrent/LICENSE | 201 -
.../github.com/modern-go/concurrent/README.md | 49 -
.../modern-go/concurrent/executor.go | 14 -
.../modern-go/concurrent/go_above_19.go | 15 -
.../modern-go/concurrent/go_below_19.go | 33 -
vendor/github.com/modern-go/concurrent/log.go | 13 -
.../github.com/modern-go/concurrent/test.sh | 12 -
.../concurrent/unbounded_executor.go | 119 -
.../github.com/modern-go/reflect2/.gitignore | 2 -
.../github.com/modern-go/reflect2/.travis.yml | 15 -
.../github.com/modern-go/reflect2/Gopkg.lock | 9 -
.../github.com/modern-go/reflect2/Gopkg.toml | 31 -
vendor/github.com/modern-go/reflect2/LICENSE | 201 -
.../github.com/modern-go/reflect2/README.md | 71 -
.../modern-go/reflect2/go_above_118.go | 23 -
.../modern-go/reflect2/go_above_19.go | 17 -
.../modern-go/reflect2/go_below_118.go | 21 -
.../github.com/modern-go/reflect2/reflect2.go | 300 -
.../modern-go/reflect2/reflect2_amd64.s | 0
.../modern-go/reflect2/reflect2_kind.go | 30 -
.../modern-go/reflect2/relfect2_386.s | 0
.../modern-go/reflect2/relfect2_amd64p32.s | 0
.../modern-go/reflect2/relfect2_arm.s | 0
.../modern-go/reflect2/relfect2_arm64.s | 0
.../modern-go/reflect2/relfect2_mips64x.s | 0
.../modern-go/reflect2/relfect2_mipsx.s | 0
.../modern-go/reflect2/relfect2_ppc64x.s | 0
.../modern-go/reflect2/relfect2_s390x.s | 0
.../modern-go/reflect2/safe_field.go | 58 -
.../github.com/modern-go/reflect2/safe_map.go | 101 -
.../modern-go/reflect2/safe_slice.go | 92 -
.../modern-go/reflect2/safe_struct.go | 29 -
.../modern-go/reflect2/safe_type.go | 78 -
.../github.com/modern-go/reflect2/type_map.go | 70 -
.../modern-go/reflect2/unsafe_array.go | 65 -
.../modern-go/reflect2/unsafe_eface.go | 59 -
.../modern-go/reflect2/unsafe_field.go | 74 -
.../modern-go/reflect2/unsafe_iface.go | 64 -
.../modern-go/reflect2/unsafe_link.go | 76 -
.../modern-go/reflect2/unsafe_map.go | 130 -
.../modern-go/reflect2/unsafe_ptr.go | 46 -
.../modern-go/reflect2/unsafe_slice.go | 177 -
.../modern-go/reflect2/unsafe_struct.go | 59 -
.../modern-go/reflect2/unsafe_type.go | 85 -
vendor/github.com/natefinch/pie/.gitignore | 24 -
vendor/github.com/natefinch/pie/LICENSE | 22 -
vendor/github.com/natefinch/pie/README.md | 183 -
vendor/github.com/natefinch/pie/doc.go | 37 -
vendor/github.com/natefinch/pie/pie.go | 260 -
vendor/github.com/nfnt/resize/.travis.yml | 7 -
vendor/github.com/nfnt/resize/LICENSE | 13 -
vendor/github.com/nfnt/resize/README.md | 151 -
vendor/github.com/nfnt/resize/converter.go | 438 -
vendor/github.com/nfnt/resize/filters.go | 143 -
vendor/github.com/nfnt/resize/nearest.go | 318 -
vendor/github.com/nfnt/resize/resize.go | 620 -
vendor/github.com/nfnt/resize/thumbnail.go | 55 -
vendor/github.com/nfnt/resize/ycc.go | 387 -
vendor/github.com/nu7hatch/gouuid/.gitignore | 11 -
vendor/github.com/nu7hatch/gouuid/COPYING | 19 -
vendor/github.com/nu7hatch/gouuid/README.md | 21 -
vendor/github.com/nu7hatch/gouuid/uuid.go | 173 -
.../pelletier/go-toml/.dockerignore | 2 -
.../github.com/pelletier/go-toml/.gitignore | 5 -
.../pelletier/go-toml/CONTRIBUTING.md | 132 -
.../github.com/pelletier/go-toml/Dockerfile | 11 -
vendor/github.com/pelletier/go-toml/LICENSE | 247 -
vendor/github.com/pelletier/go-toml/Makefile | 29 -
.../go-toml/PULL_REQUEST_TEMPLATE.md | 5 -
vendor/github.com/pelletier/go-toml/README.md | 176 -
.../pelletier/go-toml/azure-pipelines.yml | 188 -
.../github.com/pelletier/go-toml/benchmark.sh | 35 -
vendor/github.com/pelletier/go-toml/doc.go | 23 -
.../pelletier/go-toml/example-crlf.toml | 30 -
.../github.com/pelletier/go-toml/example.toml | 30 -
vendor/github.com/pelletier/go-toml/fuzz.go | 31 -
vendor/github.com/pelletier/go-toml/fuzz.sh | 15 -
.../pelletier/go-toml/keysparsing.go | 112 -
vendor/github.com/pelletier/go-toml/lexer.go | 1031 -
.../github.com/pelletier/go-toml/localtime.go | 287 -
.../github.com/pelletier/go-toml/marshal.go | 1308 -
.../go-toml/marshal_OrderPreserve_test.toml | 39 -
.../pelletier/go-toml/marshal_test.toml | 39 -
vendor/github.com/pelletier/go-toml/parser.go | 508 -
.../github.com/pelletier/go-toml/position.go | 29 -
vendor/github.com/pelletier/go-toml/token.go | 136 -
vendor/github.com/pelletier/go-toml/toml.go | 533 -
.../github.com/pelletier/go-toml/tomlpub.go | 71 -
.../pelletier/go-toml/tomltree_create.go | 155 -
.../pelletier/go-toml/tomltree_write.go | 552 -
.../pelletier/go-toml/tomltree_writepub.go | 6 -
vendor/github.com/pkg/browser/LICENSE | 23 -
vendor/github.com/pkg/browser/README.md | 55 -
vendor/github.com/pkg/browser/browser.go | 57 -
.../github.com/pkg/browser/browser_darwin.go | 5 -
.../github.com/pkg/browser/browser_freebsd.go | 14 -
.../github.com/pkg/browser/browser_linux.go | 21 -
.../github.com/pkg/browser/browser_netbsd.go | 14 -
.../github.com/pkg/browser/browser_openbsd.go | 14 -
.../pkg/browser/browser_unsupported.go | 12 -
.../github.com/pkg/browser/browser_windows.go | 7 -
vendor/github.com/pkg/errors/.gitignore | 24 -
vendor/github.com/pkg/errors/.travis.yml | 10 -
vendor/github.com/pkg/errors/LICENSE | 23 -
vendor/github.com/pkg/errors/Makefile | 44 -
vendor/github.com/pkg/errors/README.md | 59 -
vendor/github.com/pkg/errors/appveyor.yml | 32 -
vendor/github.com/pkg/errors/errors.go | 288 -
vendor/github.com/pkg/errors/go113.go | 38 -
vendor/github.com/pkg/errors/stack.go | 177 -
vendor/github.com/pmezard/go-difflib/LICENSE | 27 -
.../pmezard/go-difflib/difflib/difflib.go | 772 -
.../github.com/remeh/sizedwaitgroup/LICENSE | 21 -
.../github.com/remeh/sizedwaitgroup/README.md | 54 -
.../remeh/sizedwaitgroup/sizedwaitgroup.go | 84 -
.../github.com/robertkrimen/otto/.gitignore | 5 -
.../robertkrimen/otto/DESIGN.markdown | 1 -
vendor/github.com/robertkrimen/otto/LICENSE | 7 -
vendor/github.com/robertkrimen/otto/Makefile | 63 -
.../robertkrimen/otto/README.markdown | 871 -
.../robertkrimen/otto/ast/README.markdown | 1068 -
.../robertkrimen/otto/ast/comments.go | 278 -
.../github.com/robertkrimen/otto/ast/node.go | 515 -
.../github.com/robertkrimen/otto/ast/walk.go | 217 -
.../github.com/robertkrimen/otto/builtin.go | 354 -
.../robertkrimen/otto/builtin_array.go | 684 -
.../robertkrimen/otto/builtin_boolean.go | 28 -
.../robertkrimen/otto/builtin_date.go | 615 -
.../robertkrimen/otto/builtin_error.go | 126 -
.../robertkrimen/otto/builtin_function.go | 129 -
.../robertkrimen/otto/builtin_json.go | 299 -
.../robertkrimen/otto/builtin_math.go | 151 -
.../robertkrimen/otto/builtin_number.go | 100 -
.../robertkrimen/otto/builtin_object.go | 289 -
.../robertkrimen/otto/builtin_regexp.go | 65 -
.../robertkrimen/otto/builtin_string.go | 500 -
vendor/github.com/robertkrimen/otto/clone.go | 173 -
vendor/github.com/robertkrimen/otto/cmpl.go | 24 -
.../robertkrimen/otto/cmpl_evaluate.go | 96 -
.../otto/cmpl_evaluate_expression.go | 460 -
.../otto/cmpl_evaluate_statement.go | 424 -
.../robertkrimen/otto/cmpl_parse.go | 656 -
.../github.com/robertkrimen/otto/console.go | 51 -
vendor/github.com/robertkrimen/otto/dbg.go | 9 -
.../github.com/robertkrimen/otto/dbg/dbg.go | 387 -
vendor/github.com/robertkrimen/otto/error.go | 253 -
.../github.com/robertkrimen/otto/evaluate.go | 318 -
.../robertkrimen/otto/file/README.markdown | 110 -
.../github.com/robertkrimen/otto/file/file.go | 164 -
vendor/github.com/robertkrimen/otto/global.go | 221 -
vendor/github.com/robertkrimen/otto/inline.go | 6680 -
vendor/github.com/robertkrimen/otto/inline.pl | 1087 -
vendor/github.com/robertkrimen/otto/object.go | 156 -
.../robertkrimen/otto/object_class.go | 493 -
vendor/github.com/robertkrimen/otto/otto.go | 770 -
vendor/github.com/robertkrimen/otto/otto_.go | 178 -
.../robertkrimen/otto/parser/Makefile | 4 -
.../robertkrimen/otto/parser/README.markdown | 190 -
.../robertkrimen/otto/parser/dbg.go | 9 -
.../robertkrimen/otto/parser/error.go | 175 -
.../robertkrimen/otto/parser/expression.go | 1005 -
.../robertkrimen/otto/parser/lexer.go | 866 -
.../robertkrimen/otto/parser/parser.go | 344 -
.../robertkrimen/otto/parser/regexp.go | 358 -
.../robertkrimen/otto/parser/scope.go | 44 -
.../robertkrimen/otto/parser/statement.go | 940 -
.../github.com/robertkrimen/otto/property.go | 220 -
.../otto/registry/README.markdown | 51 -
.../robertkrimen/otto/registry/registry.go | 47 -
vendor/github.com/robertkrimen/otto/result.go | 30 -
.../github.com/robertkrimen/otto/runtime.go | 859 -
vendor/github.com/robertkrimen/otto/scope.go | 35 -
vendor/github.com/robertkrimen/otto/script.go | 119 -
vendor/github.com/robertkrimen/otto/stash.go | 296 -
.../robertkrimen/otto/token/Makefile | 2 -
.../robertkrimen/otto/token/README.markdown | 171 -
.../robertkrimen/otto/token/token.go | 116 -
.../robertkrimen/otto/token/token_const.go | 349 -
.../robertkrimen/otto/token/tokenfmt | 222 -
.../robertkrimen/otto/type_arguments.go | 106 -
.../robertkrimen/otto/type_array.go | 109 -
.../robertkrimen/otto/type_boolean.go | 13 -
.../github.com/robertkrimen/otto/type_date.go | 299 -
.../robertkrimen/otto/type_error.go | 24 -
.../robertkrimen/otto/type_function.go | 340 -
.../robertkrimen/otto/type_go_array.go | 156 -
.../robertkrimen/otto/type_go_map.go | 95 -
.../robertkrimen/otto/type_go_slice.go | 126 -
.../robertkrimen/otto/type_go_struct.go | 150 -
.../robertkrimen/otto/type_number.go | 5 -
.../robertkrimen/otto/type_reference.go | 103 -
.../robertkrimen/otto/type_regexp.go | 146 -
.../robertkrimen/otto/type_string.go | 112 -
vendor/github.com/robertkrimen/otto/value.go | 1033 -
.../robertkrimen/otto/value_boolean.go | 43 -
.../robertkrimen/otto/value_number.go | 324 -
.../robertkrimen/otto/value_primitive.go | 23 -
.../robertkrimen/otto/value_string.go | 103 -
vendor/github.com/rs/zerolog/.gitignore | 25 -
vendor/github.com/rs/zerolog/CNAME | 1 -
vendor/github.com/rs/zerolog/LICENSE | 21 -
vendor/github.com/rs/zerolog/README.md | 695 -
vendor/github.com/rs/zerolog/_config.yml | 1 -
vendor/github.com/rs/zerolog/array.go | 240 -
vendor/github.com/rs/zerolog/console.go | 409 -
vendor/github.com/rs/zerolog/context.go | 433 -
vendor/github.com/rs/zerolog/ctx.go | 51 -
vendor/github.com/rs/zerolog/encoder.go | 56 -
vendor/github.com/rs/zerolog/encoder_cbor.go | 42 -
vendor/github.com/rs/zerolog/encoder_json.go | 39 -
vendor/github.com/rs/zerolog/event.go | 773 -
vendor/github.com/rs/zerolog/fields.go | 277 -
vendor/github.com/rs/zerolog/globals.go | 138 -
vendor/github.com/rs/zerolog/go112.go | 7 -
vendor/github.com/rs/zerolog/hook.go | 64 -
.../rs/zerolog/internal/cbor/README.md | 56 -
.../rs/zerolog/internal/cbor/base.go | 19 -
.../rs/zerolog/internal/cbor/cbor.go | 100 -
.../rs/zerolog/internal/cbor/decode_stream.go | 614 -
.../rs/zerolog/internal/cbor/string.go | 95 -
.../rs/zerolog/internal/cbor/time.go | 93 -
.../rs/zerolog/internal/cbor/types.go | 477 -
.../rs/zerolog/internal/json/base.go | 19 -
.../rs/zerolog/internal/json/bytes.go | 85 -
.../rs/zerolog/internal/json/string.go | 149 -
.../rs/zerolog/internal/json/time.go | 106 -
.../rs/zerolog/internal/json/types.go | 405 -
vendor/github.com/rs/zerolog/log.go | 457 -
vendor/github.com/rs/zerolog/log/log.go | 131 -
vendor/github.com/rs/zerolog/not_go112.go | 5 -
vendor/github.com/rs/zerolog/pretty.png | Bin 84064 -> 0 bytes
vendor/github.com/rs/zerolog/sampler.go | 134 -
vendor/github.com/rs/zerolog/syslog.go | 80 -
vendor/github.com/rs/zerolog/writer.go | 154 -
.../russross/blackfriday/v2/.gitignore | 8 -
.../russross/blackfriday/v2/.travis.yml | 17 -
.../russross/blackfriday/v2/LICENSE.txt | 29 -
.../russross/blackfriday/v2/README.md | 335 -
.../russross/blackfriday/v2/block.go | 1612 -
.../github.com/russross/blackfriday/v2/doc.go | 46 -
.../russross/blackfriday/v2/entities.go | 2236 -
.../github.com/russross/blackfriday/v2/esc.go | 70 -
.../russross/blackfriday/v2/html.go | 952 -
.../russross/blackfriday/v2/inline.go | 1228 -
.../russross/blackfriday/v2/markdown.go | 950 -
.../russross/blackfriday/v2/node.go | 360 -
.../russross/blackfriday/v2/smartypants.go | 457 -
.../github.com/shurcooL/graphql/.travis.yml | 16 -
vendor/github.com/shurcooL/graphql/LICENSE | 21 -
vendor/github.com/shurcooL/graphql/README.md | 293 -
vendor/github.com/shurcooL/graphql/doc.go | 11 -
vendor/github.com/shurcooL/graphql/graphql.go | 123 -
.../shurcooL/graphql/ident/ident.go | 240 -
.../graphql/internal/jsonutil/graphql.go | 311 -
vendor/github.com/shurcooL/graphql/query.go | 131 -
vendor/github.com/shurcooL/graphql/scalar.go | 51 -
vendor/github.com/sirupsen/logrus/.gitignore | 4 -
.../github.com/sirupsen/logrus/.golangci.yml | 40 -
vendor/github.com/sirupsen/logrus/.travis.yml | 15 -
.../github.com/sirupsen/logrus/CHANGELOG.md | 259 -
vendor/github.com/sirupsen/logrus/LICENSE | 21 -
vendor/github.com/sirupsen/logrus/README.md | 513 -
vendor/github.com/sirupsen/logrus/alt_exit.go | 76 -
.../github.com/sirupsen/logrus/appveyor.yml | 14 -
.../github.com/sirupsen/logrus/buffer_pool.go | 52 -
vendor/github.com/sirupsen/logrus/doc.go | 26 -
vendor/github.com/sirupsen/logrus/entry.go | 431 -
vendor/github.com/sirupsen/logrus/exported.go | 270 -
.../github.com/sirupsen/logrus/formatter.go | 78 -
vendor/github.com/sirupsen/logrus/hooks.go | 34 -
.../sirupsen/logrus/json_formatter.go | 128 -
vendor/github.com/sirupsen/logrus/logger.go | 404 -
vendor/github.com/sirupsen/logrus/logrus.go | 186 -
.../logrus/terminal_check_appengine.go | 11 -
.../sirupsen/logrus/terminal_check_bsd.go | 13 -
.../sirupsen/logrus/terminal_check_js.go | 7 -
.../logrus/terminal_check_no_terminal.go | 11 -
.../logrus/terminal_check_notappengine.go | 17 -
.../sirupsen/logrus/terminal_check_solaris.go | 11 -
.../sirupsen/logrus/terminal_check_unix.go | 13 -
.../sirupsen/logrus/terminal_check_windows.go | 27 -
.../sirupsen/logrus/text_formatter.go | 339 -
vendor/github.com/sirupsen/logrus/writer.go | 70 -
vendor/github.com/spf13/afero/.gitignore | 2 -
vendor/github.com/spf13/afero/.travis.yml | 26 -
vendor/github.com/spf13/afero/LICENSE.txt | 174 -
vendor/github.com/spf13/afero/README.md | 442 -
vendor/github.com/spf13/afero/afero.go | 111 -
vendor/github.com/spf13/afero/appveyor.yml | 15 -
vendor/github.com/spf13/afero/basepath.go | 211 -
.../github.com/spf13/afero/cacheOnReadFs.go | 315 -
vendor/github.com/spf13/afero/const_bsds.go | 22 -
.../github.com/spf13/afero/const_win_unix.go | 26 -
.../github.com/spf13/afero/copyOnWriteFs.go | 326 -
vendor/github.com/spf13/afero/httpFs.go | 114 -
vendor/github.com/spf13/afero/iofs.go | 288 -
vendor/github.com/spf13/afero/ioutil.go | 240 -
vendor/github.com/spf13/afero/lstater.go | 27 -
vendor/github.com/spf13/afero/match.go | 110 -
vendor/github.com/spf13/afero/mem/dir.go | 37 -
vendor/github.com/spf13/afero/mem/dirmap.go | 43 -
vendor/github.com/spf13/afero/mem/file.go | 338 -
vendor/github.com/spf13/afero/memmap.go | 404 -
vendor/github.com/spf13/afero/os.go | 113 -
vendor/github.com/spf13/afero/path.go | 106 -
vendor/github.com/spf13/afero/readonlyfs.go | 96 -
vendor/github.com/spf13/afero/regexpfs.go | 224 -
vendor/github.com/spf13/afero/symlink.go | 55 -
vendor/github.com/spf13/afero/unionFile.go | 331 -
vendor/github.com/spf13/afero/util.go | 330 -
vendor/github.com/spf13/cast/.gitignore | 25 -
vendor/github.com/spf13/cast/LICENSE | 21 -
vendor/github.com/spf13/cast/Makefile | 40 -
vendor/github.com/spf13/cast/README.md | 75 -
vendor/github.com/spf13/cast/cast.go | 176 -
vendor/github.com/spf13/cast/caste.go | 1337 -
.../spf13/cast/timeformattype_string.go | 27 -
vendor/github.com/spf13/cobra/.gitignore | 39 -
vendor/github.com/spf13/cobra/.golangci.yml | 48 -
vendor/github.com/spf13/cobra/.mailmap | 3 -
vendor/github.com/spf13/cobra/CHANGELOG.md | 51 -
vendor/github.com/spf13/cobra/CONDUCT.md | 37 -
vendor/github.com/spf13/cobra/CONTRIBUTING.md | 50 -
vendor/github.com/spf13/cobra/LICENSE.txt | 174 -
vendor/github.com/spf13/cobra/MAINTAINERS | 13 -
vendor/github.com/spf13/cobra/Makefile | 35 -
vendor/github.com/spf13/cobra/README.md | 111 -
vendor/github.com/spf13/cobra/args.go | 121 -
.../spf13/cobra/bash_completions.go | 697 -
.../spf13/cobra/bash_completions.md | 93 -
.../spf13/cobra/bash_completionsV2.go | 331 -
vendor/github.com/spf13/cobra/cobra.go | 222 -
vendor/github.com/spf13/cobra/command.go | 1680 -
.../github.com/spf13/cobra/command_notwin.go | 6 -
vendor/github.com/spf13/cobra/command_win.go | 27 -
vendor/github.com/spf13/cobra/completions.go | 811 -
.../spf13/cobra/fish_completions.go | 219 -
.../spf13/cobra/fish_completions.md | 4 -
.../spf13/cobra/powershell_completions.go | 285 -
.../spf13/cobra/powershell_completions.md | 3 -
.../spf13/cobra/projects_using_cobra.md | 51 -
.../spf13/cobra/shell_completions.go | 84 -
.../spf13/cobra/shell_completions.md | 548 -
vendor/github.com/spf13/cobra/user_guide.md | 638 -
.../github.com/spf13/cobra/zsh_completions.go | 258 -
.../github.com/spf13/cobra/zsh_completions.md | 48 -
.../spf13/jwalterweatherman/.gitignore | 24 -
.../spf13/jwalterweatherman/LICENSE | 21 -
.../spf13/jwalterweatherman/README.md | 148 -
.../jwalterweatherman/default_notepad.go | 111 -
.../spf13/jwalterweatherman/log_counter.go | 46 -
.../spf13/jwalterweatherman/notepad.go | 225 -
vendor/github.com/spf13/pflag/.gitignore | 2 -
vendor/github.com/spf13/pflag/.travis.yml | 22 -
vendor/github.com/spf13/pflag/LICENSE | 28 -
vendor/github.com/spf13/pflag/README.md | 296 -
vendor/github.com/spf13/pflag/bool.go | 94 -
vendor/github.com/spf13/pflag/bool_slice.go | 185 -
vendor/github.com/spf13/pflag/bytes.go | 209 -
vendor/github.com/spf13/pflag/count.go | 96 -
vendor/github.com/spf13/pflag/duration.go | 86 -
.../github.com/spf13/pflag/duration_slice.go | 166 -
vendor/github.com/spf13/pflag/flag.go | 1239 -
vendor/github.com/spf13/pflag/float32.go | 88 -
.../github.com/spf13/pflag/float32_slice.go | 174 -
vendor/github.com/spf13/pflag/float64.go | 84 -
.../github.com/spf13/pflag/float64_slice.go | 166 -
vendor/github.com/spf13/pflag/golangflag.go | 105 -
vendor/github.com/spf13/pflag/int.go | 84 -
vendor/github.com/spf13/pflag/int16.go | 88 -
vendor/github.com/spf13/pflag/int32.go | 88 -
vendor/github.com/spf13/pflag/int32_slice.go | 174 -
vendor/github.com/spf13/pflag/int64.go | 84 -
vendor/github.com/spf13/pflag/int64_slice.go | 166 -
vendor/github.com/spf13/pflag/int8.go | 88 -
vendor/github.com/spf13/pflag/int_slice.go | 158 -
vendor/github.com/spf13/pflag/ip.go | 94 -
vendor/github.com/spf13/pflag/ip_slice.go | 186 -
vendor/github.com/spf13/pflag/ipmask.go | 122 -
vendor/github.com/spf13/pflag/ipnet.go | 98 -
vendor/github.com/spf13/pflag/string.go | 80 -
vendor/github.com/spf13/pflag/string_array.go | 129 -
vendor/github.com/spf13/pflag/string_slice.go | 163 -
.../github.com/spf13/pflag/string_to_int.go | 149 -
.../github.com/spf13/pflag/string_to_int64.go | 149 -
.../spf13/pflag/string_to_string.go | 160 -
vendor/github.com/spf13/pflag/uint.go | 88 -
vendor/github.com/spf13/pflag/uint16.go | 88 -
vendor/github.com/spf13/pflag/uint32.go | 88 -
vendor/github.com/spf13/pflag/uint64.go | 88 -
vendor/github.com/spf13/pflag/uint8.go | 88 -
vendor/github.com/spf13/pflag/uint_slice.go | 168 -
vendor/github.com/spf13/viper/.editorconfig | 15 -
vendor/github.com/spf13/viper/.gitignore | 5 -
vendor/github.com/spf13/viper/.golangci.yml | 93 -
vendor/github.com/spf13/viper/LICENSE | 21 -
vendor/github.com/spf13/viper/Makefile | 76 -
vendor/github.com/spf13/viper/README.md | 874 -
.../github.com/spf13/viper/TROUBLESHOOTING.md | 23 -
vendor/github.com/spf13/viper/flags.go | 57 -
vendor/github.com/spf13/viper/fs.go | 65 -
.../spf13/viper/internal/encoding/decoder.go | 61 -
.../spf13/viper/internal/encoding/encoder.go | 60 -
.../spf13/viper/internal/encoding/error.go | 7 -
.../viper/internal/encoding/hcl/codec.go | 40 -
.../viper/internal/encoding/json/codec.go | 17 -
.../viper/internal/encoding/toml/codec.go | 45 -
.../viper/internal/encoding/yaml/codec.go | 14 -
vendor/github.com/spf13/viper/logger.go | 77 -
vendor/github.com/spf13/viper/util.go | 204 -
vendor/github.com/spf13/viper/viper.go | 2141 -
vendor/github.com/spf13/viper/viper_go1_15.go | 57 -
vendor/github.com/spf13/viper/viper_go1_16.go | 32 -
vendor/github.com/spf13/viper/watch.go | 12 -
vendor/github.com/spf13/viper/watch_wasm.go | 30 -
.../github.com/stretchr/objx/.codeclimate.yml | 21 -
vendor/github.com/stretchr/objx/.gitignore | 11 -
vendor/github.com/stretchr/objx/.travis.yml | 30 -
vendor/github.com/stretchr/objx/LICENSE | 22 -
vendor/github.com/stretchr/objx/README.md | 80 -
vendor/github.com/stretchr/objx/Taskfile.yml | 30 -
vendor/github.com/stretchr/objx/accessors.go | 119 -
.../github.com/stretchr/objx/conversions.go | 280 -
vendor/github.com/stretchr/objx/doc.go | 66 -
vendor/github.com/stretchr/objx/map.go | 228 -
vendor/github.com/stretchr/objx/mutations.go | 77 -
vendor/github.com/stretchr/objx/security.go | 12 -
vendor/github.com/stretchr/objx/tests.go | 17 -
.../github.com/stretchr/objx/type_specific.go | 346 -
.../stretchr/objx/type_specific_codegen.go | 2251 -
vendor/github.com/stretchr/objx/value.go | 159 -
vendor/github.com/stretchr/testify/LICENSE | 21 -
.../testify/assert/assertion_compare.go | 436 -
.../assert/assertion_compare_can_convert.go | 16 -
.../assert/assertion_compare_legacy.go | 16 -
.../testify/assert/assertion_format.go | 753 -
.../testify/assert/assertion_format.go.tmpl | 5 -
.../testify/assert/assertion_forward.go | 1494 -
.../testify/assert/assertion_forward.go.tmpl | 5 -
.../testify/assert/assertion_order.go | 81 -
.../stretchr/testify/assert/assertions.go | 1810 -
.../github.com/stretchr/testify/assert/doc.go | 45 -
.../stretchr/testify/assert/errors.go | 10 -
.../testify/assert/forward_assertions.go | 16 -
.../testify/assert/http_assertions.go | 162 -
.../github.com/stretchr/testify/mock/doc.go | 44 -
.../github.com/stretchr/testify/mock/mock.go | 1016 -
vendor/github.com/subosito/gotenv/.env | 1 -
.../github.com/subosito/gotenv/.env.invalid | 1 -
vendor/github.com/subosito/gotenv/.gitignore | 3 -
vendor/github.com/subosito/gotenv/.travis.yml | 10 -
.../github.com/subosito/gotenv/CHANGELOG.md | 47 -
vendor/github.com/subosito/gotenv/LICENSE | 21 -
vendor/github.com/subosito/gotenv/README.md | 131 -
.../github.com/subosito/gotenv/appveyor.yml | 9 -
vendor/github.com/subosito/gotenv/gotenv.go | 265 -
vendor/github.com/tidwall/gjson/LICENSE | 20 -
vendor/github.com/tidwall/gjson/README.md | 485 -
vendor/github.com/tidwall/gjson/SYNTAX.md | 317 -
vendor/github.com/tidwall/gjson/gjson.go | 2884 -
vendor/github.com/tidwall/gjson/logo.png | Bin 15936 -> 0 bytes
vendor/github.com/tidwall/match/LICENSE | 20 -
vendor/github.com/tidwall/match/README.md | 29 -
vendor/github.com/tidwall/match/match.go | 237 -
vendor/github.com/tidwall/pretty/LICENSE | 20 -
vendor/github.com/tidwall/pretty/README.md | 122 -
vendor/github.com/tidwall/pretty/pretty.go | 674 -
vendor/github.com/urfave/cli/v2/.flake8 | 2 -
vendor/github.com/urfave/cli/v2/.gitignore | 10 -
.../urfave/cli/v2/CODE_OF_CONDUCT.md | 75 -
vendor/github.com/urfave/cli/v2/LICENSE | 21 -
vendor/github.com/urfave/cli/v2/Makefile | 40 -
vendor/github.com/urfave/cli/v2/README.md | 19 -
vendor/github.com/urfave/cli/v2/app.go | 604 -
vendor/github.com/urfave/cli/v2/args.go | 54 -
vendor/github.com/urfave/cli/v2/category.go | 171 -
vendor/github.com/urfave/cli/v2/cli.go | 23 -
vendor/github.com/urfave/cli/v2/command.go | 317 -
vendor/github.com/urfave/cli/v2/context.go | 211 -
vendor/github.com/urfave/cli/v2/docs.go | 198 -
vendor/github.com/urfave/cli/v2/errors.go | 163 -
vendor/github.com/urfave/cli/v2/fish.go | 196 -
.../github.com/urfave/cli/v2/flag-spec.yaml | 50 -
vendor/github.com/urfave/cli/v2/flag.go | 419 -
vendor/github.com/urfave/cli/v2/flag_bool.go | 93 -
.../github.com/urfave/cli/v2/flag_duration.go | 92 -
.../github.com/urfave/cli/v2/flag_float64.go | 92 -
.../urfave/cli/v2/flag_float64_slice.go | 173 -
.../github.com/urfave/cli/v2/flag_generic.go | 95 -
vendor/github.com/urfave/cli/v2/flag_int.go | 93 -
vendor/github.com/urfave/cli/v2/flag_int64.go | 92 -
.../urfave/cli/v2/flag_int64_slice.go | 172 -
.../urfave/cli/v2/flag_int_slice.go | 183 -
vendor/github.com/urfave/cli/v2/flag_path.go | 90 -
.../github.com/urfave/cli/v2/flag_string.go | 84 -
.../urfave/cli/v2/flag_string_slice.go | 182 -
.../urfave/cli/v2/flag_timestamp.go | 150 -
vendor/github.com/urfave/cli/v2/flag_uint.go | 92 -
.../github.com/urfave/cli/v2/flag_uint64.go | 92 -
vendor/github.com/urfave/cli/v2/funcs.go | 44 -
.../urfave/cli/v2/godoc-current.txt | 2204 -
vendor/github.com/urfave/cli/v2/help.go | 404 -
.../urfave/cli/v2/mkdocs-requirements.txt | 5 -
vendor/github.com/urfave/cli/v2/mkdocs.yml | 62 -
vendor/github.com/urfave/cli/v2/parse.go | 106 -
vendor/github.com/urfave/cli/v2/sort.go | 29 -
.../github.com/urfave/cli/v2/suggestions.go | 60 -
vendor/github.com/urfave/cli/v2/template.go | 132 -
.../urfave/cli/v2/zz_generated.flags.go | 672 -
vendor/github.com/vearutop/statigz/.gitignore | 5 -
.../github.com/vearutop/statigz/.golangci.yml | 52 -
vendor/github.com/vearutop/statigz/LICENSE | 21 -
vendor/github.com/vearutop/statigz/Makefile | 39 -
vendor/github.com/vearutop/statigz/README.md | 135 -
.../vearutop/statigz/_testdata/bad.png.gz | Bin 628 -> 0 bytes
.../statigz/_testdata/deeper/openapi.json.gz | Bin 2207 -> 0 bytes
.../statigz/_testdata/deeper/swagger.json.br | Bin 2548 -> 0 bytes
.../vearutop/statigz/_testdata/favicon.png | Bin 628 -> 0 bytes
.../vearutop/statigz/_testdata/index.html | 1 -
.../vearutop/statigz/_testdata/index.html.gz | Bin 37 -> 0 bytes
.../vearutop/statigz/_testdata/swagger.json | 1036 -
vendor/github.com/vearutop/statigz/server.go | 442 -
.../github.com/vektah/dataloaden/.gitignore | 2 -
vendor/github.com/vektah/dataloaden/README.md | 97 -
.../github.com/vektah/dataloaden/appveyor.yml | 32 -
.../vektah/dataloaden/dataloaden.go | 28 -
.../github.com/vektah/dataloaden/licence.md | 7 -
.../dataloaden/pkg/generator/generator.go | 163 -
.../dataloaden/pkg/generator/template.go | 245 -
.../github.com/vektah/gqlparser/v2/.gitignore | 5 -
vendor/github.com/vektah/gqlparser/v2/LICENSE | 19 -
.../vektah/gqlparser/v2/ast/argmap.go | 37 -
.../vektah/gqlparser/v2/ast/collections.go | 148 -
.../vektah/gqlparser/v2/ast/definition.go | 94 -
.../vektah/gqlparser/v2/ast/directive.go | 43 -
.../vektah/gqlparser/v2/ast/document.go | 79 -
.../vektah/gqlparser/v2/ast/dumper.go | 159 -
.../vektah/gqlparser/v2/ast/fragment.go | 38 -
.../vektah/gqlparser/v2/ast/operation.go | 30 -
.../vektah/gqlparser/v2/ast/path.go | 67 -
.../vektah/gqlparser/v2/ast/selection.go | 39 -
.../vektah/gqlparser/v2/ast/source.go | 19 -
.../vektah/gqlparser/v2/ast/type.go | 68 -
.../vektah/gqlparser/v2/ast/value.go | 120 -
.../gqlparser/v2/formatter/formatter.go | 634 -
.../vektah/gqlparser/v2/gqlerror/error.go | 145 -
.../vektah/gqlparser/v2/gqlparser.go | 42 -
.../vektah/gqlparser/v2/lexer/blockstring.go | 58 -
.../vektah/gqlparser/v2/lexer/lexer.go | 510 -
.../vektah/gqlparser/v2/lexer/lexer_test.yml | 672 -
.../vektah/gqlparser/v2/lexer/token.go | 148 -
.../vektah/gqlparser/v2/parser/parser.go | 136 -
.../vektah/gqlparser/v2/parser/query.go | 350 -
.../vektah/gqlparser/v2/parser/query_test.yml | 544 -
.../vektah/gqlparser/v2/parser/schema.go | 535 -
.../gqlparser/v2/parser/schema_test.yml | 646 -
.../github.com/vektah/gqlparser/v2/readme.md | 17 -
.../vektah/gqlparser/v2/validator/error.go | 55 -
.../gqlparser/v2/validator/messaging.go | 39 -
.../vektah/gqlparser/v2/validator/prelude.go | 15 -
.../gqlparser/v2/validator/prelude.graphql | 121 -
.../validator/rules/fields_on_correct_type.go | 94 -
.../rules/fragments_on_composite_types.go | 39 -
.../validator/rules/known_argument_names.go | 57 -
.../v2/validator/rules/known_directives.go | 47 -
.../validator/rules/known_fragment_names.go | 19 -
.../v2/validator/rules/known_type_names.go | 59 -
.../rules/lone_anonymous_operation.go | 19 -
.../v2/validator/rules/no_fragment_cycles.go | 93 -
.../validator/rules/no_undefined_variables.go | 28 -
.../v2/validator/rules/no_unused_fragments.go | 30 -
.../v2/validator/rules/no_unused_variables.go | 30 -
.../rules/overlapping_fields_can_be_merged.go | 560 -
.../rules/possible_fragment_spreads.go | 68 -
.../rules/provided_required_arguments.go | 62 -
.../v2/validator/rules/scalar_leafs.go | 36 -
.../rules/single_field_subscriptions.go | 86 -
.../validator/rules/unique_argument_names.go | 33 -
.../rules/unique_directives_per_location.go | 24 -
.../validator/rules/unique_fragment_names.go | 22 -
.../rules/unique_input_field_names.go | 27 -
.../validator/rules/unique_operation_names.go | 22 -
.../validator/rules/unique_variable_names.go | 24 -
.../validator/rules/values_of_correct_type.go | 167 -
.../rules/variables_are_input_types.go | 28 -
.../rules/variables_in_allowed_position.go | 38 -
.../vektah/gqlparser/v2/validator/schema.go | 490 -
.../gqlparser/v2/validator/schema_test.yml | 665 -
.../gqlparser/v2/validator/suggestionList.go | 69 -
.../gqlparser/v2/validator/validator.go | 44 -
.../vektah/gqlparser/v2/validator/vars.go | 258 -
.../vektah/gqlparser/v2/validator/walk.go | 292 -
.../github.com/vektra/mockery/v2/.gitignore | 3 -
.../vektra/mockery/v2/.goreleaser.yml | 60 -
.../vektra/mockery/v2/.mockery.yaml | 3 -
.../github.com/vektra/mockery/v2/Dockerfile | 9 -
vendor/github.com/vektra/mockery/v2/LICENSE | 28 -
vendor/github.com/vektra/mockery/v2/Makefile | 33 -
vendor/github.com/vektra/mockery/v2/README.md | 354 -
.../vektra/mockery/v2/cmd/mockery.go | 311 -
.../vektra/mockery/v2/cmd/showconfig.go | 33 -
vendor/github.com/vektra/mockery/v2/main.go | 9 -
.../vektra/mockery/v2/pkg/config/config.go | 56 -
.../vektra/mockery/v2/pkg/generator.go | 794 -
.../vektra/mockery/v2/pkg/logging/logging.go | 12 -
.../vektra/mockery/v2/pkg/mockery.go | 1 -
.../vektra/mockery/v2/pkg/outputter.go | 105 -
.../github.com/vektra/mockery/v2/pkg/parse.go | 294 -
.../vektra/mockery/v2/pkg/walker.go | 171 -
vendor/github.com/xWTF/chardet/2022.go | 103 -
vendor/github.com/xWTF/chardet/AUTHORS | 1 -
vendor/github.com/xWTF/chardet/LICENSE | 22 -
vendor/github.com/xWTF/chardet/README.md | 12 -
vendor/github.com/xWTF/chardet/detector.go | 152 -
.../github.com/xWTF/chardet/icu-license.html | 51 -
vendor/github.com/xWTF/chardet/multi_byte.go | 346 -
vendor/github.com/xWTF/chardet/recognizer.go | 83 -
vendor/github.com/xWTF/chardet/single_byte.go | 883 -
vendor/github.com/xWTF/chardet/unicode.go | 106 -
vendor/github.com/xWTF/chardet/utf8.go | 72 -
vendor/github.com/xrash/smetrics/.travis.yml | 9 -
vendor/github.com/xrash/smetrics/LICENSE | 21 -
vendor/github.com/xrash/smetrics/README.md | 49 -
vendor/github.com/xrash/smetrics/doc.go | 19 -
vendor/github.com/xrash/smetrics/hamming.go | 25 -
.../github.com/xrash/smetrics/jaro-winkler.go | 28 -
vendor/github.com/xrash/smetrics/jaro.go | 86 -
vendor/github.com/xrash/smetrics/soundex.go | 41 -
vendor/github.com/xrash/smetrics/ukkonen.go | 94 -
.../xrash/smetrics/wagner-fischer.go | 48 -
vendor/github.com/zencoder/go-dash/v3/LICENSE | 13 -
.../zencoder/go-dash/v3/helpers/ptrs/ptrs.go | 49 -
.../zencoder/go-dash/v3/mpd/duration.go | 206 -
.../zencoder/go-dash/v3/mpd/events.go | 18 -
.../github.com/zencoder/go-dash/v3/mpd/mpd.go | 1168 -
.../zencoder/go-dash/v3/mpd/mpd_attr.go | 57 -
.../zencoder/go-dash/v3/mpd/mpd_read_write.go | 87 -
.../zencoder/go-dash/v3/mpd/pssh.go | 41 -
.../zencoder/go-dash/v3/mpd/segment.go | 47 -
.../zencoder/go-dash/v3/mpd/validate.go | 9 -
vendor/go.uber.org/atomic/.codecov.yml | 19 -
vendor/go.uber.org/atomic/.gitignore | 12 -
vendor/go.uber.org/atomic/.travis.yml | 27 -
vendor/go.uber.org/atomic/CHANGELOG.md | 76 -
vendor/go.uber.org/atomic/LICENSE.txt | 19 -
vendor/go.uber.org/atomic/Makefile | 78 -
vendor/go.uber.org/atomic/README.md | 63 -
vendor/go.uber.org/atomic/bool.go | 81 -
vendor/go.uber.org/atomic/bool_ext.go | 53 -
vendor/go.uber.org/atomic/doc.go | 23 -
vendor/go.uber.org/atomic/duration.go | 82 -
vendor/go.uber.org/atomic/duration_ext.go | 40 -
vendor/go.uber.org/atomic/error.go | 51 -
vendor/go.uber.org/atomic/error_ext.go | 39 -
vendor/go.uber.org/atomic/float64.go | 76 -
vendor/go.uber.org/atomic/float64_ext.go | 47 -
vendor/go.uber.org/atomic/gen.go | 26 -
vendor/go.uber.org/atomic/int32.go | 102 -
vendor/go.uber.org/atomic/int64.go | 102 -
vendor/go.uber.org/atomic/nocmp.go | 35 -
vendor/go.uber.org/atomic/string.go | 54 -
vendor/go.uber.org/atomic/string_ext.go | 43 -
vendor/go.uber.org/atomic/uint32.go | 102 -
vendor/go.uber.org/atomic/uint64.go | 102 -
vendor/go.uber.org/atomic/value.go | 31 -
vendor/golang.org/x/crypto/AUTHORS | 3 -
vendor/golang.org/x/crypto/CONTRIBUTORS | 3 -
vendor/golang.org/x/crypto/LICENSE | 27 -
vendor/golang.org/x/crypto/PATENTS | 22 -
vendor/golang.org/x/crypto/bcrypt/base64.go | 35 -
vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 295 -
vendor/golang.org/x/crypto/blowfish/block.go | 159 -
vendor/golang.org/x/crypto/blowfish/cipher.go | 99 -
vendor/golang.org/x/crypto/blowfish/const.go | 199 -
.../x/crypto/ssh/terminal/terminal.go | 76 -
vendor/golang.org/x/image/LICENSE | 27 -
vendor/golang.org/x/image/PATENTS | 22 -
vendor/golang.org/x/image/bmp/reader.go | 245 -
vendor/golang.org/x/image/bmp/writer.go | 262 -
vendor/golang.org/x/image/ccitt/reader.go | 795 -
vendor/golang.org/x/image/ccitt/table.go | 972 -
vendor/golang.org/x/image/ccitt/writer.go | 102 -
vendor/golang.org/x/image/riff/riff.go | 193 -
vendor/golang.org/x/image/tiff/buffer.go | 69 -
vendor/golang.org/x/image/tiff/compress.go | 58 -
vendor/golang.org/x/image/tiff/consts.go | 149 -
vendor/golang.org/x/image/tiff/fuzz.go | 30 -
vendor/golang.org/x/image/tiff/lzw/reader.go | 272 -
vendor/golang.org/x/image/tiff/reader.go | 754 -
vendor/golang.org/x/image/tiff/writer.go | 441 -
vendor/golang.org/x/image/vp8/decode.go | 403 -
vendor/golang.org/x/image/vp8/filter.go | 273 -
vendor/golang.org/x/image/vp8/idct.go | 98 -
vendor/golang.org/x/image/vp8/partition.go | 129 -
vendor/golang.org/x/image/vp8/pred.go | 201 -
vendor/golang.org/x/image/vp8/predfunc.go | 553 -
vendor/golang.org/x/image/vp8/quant.go | 98 -
vendor/golang.org/x/image/vp8/reconstruct.go | 442 -
vendor/golang.org/x/image/vp8/token.go | 381 -
vendor/golang.org/x/image/vp8l/decode.go | 603 -
vendor/golang.org/x/image/vp8l/huffman.go | 245 -
vendor/golang.org/x/image/vp8l/transform.go | 299 -
vendor/golang.org/x/image/webp/decode.go | 271 -
vendor/golang.org/x/image/webp/doc.go | 9 -
vendor/golang.org/x/mod/LICENSE | 27 -
vendor/golang.org/x/mod/PATENTS | 22 -
.../x/mod/internal/lazyregexp/lazyre.go | 78 -
vendor/golang.org/x/mod/module/module.go | 841 -
vendor/golang.org/x/mod/module/pseudo.go | 250 -
vendor/golang.org/x/mod/semver/semver.go | 401 -
vendor/golang.org/x/net/LICENSE | 27 -
vendor/golang.org/x/net/PATENTS | 22 -
vendor/golang.org/x/net/bpf/asm.go | 41 -
vendor/golang.org/x/net/bpf/constants.go | 222 -
vendor/golang.org/x/net/bpf/doc.go | 80 -
vendor/golang.org/x/net/bpf/instructions.go | 726 -
vendor/golang.org/x/net/bpf/setter.go | 10 -
vendor/golang.org/x/net/bpf/vm.go | 150 -
.../golang.org/x/net/bpf/vm_instructions.go | 182 -
.../x/net/context/ctxhttp/ctxhttp.go | 71 -
vendor/golang.org/x/net/html/atom/atom.go | 78 -
vendor/golang.org/x/net/html/atom/table.go | 783 -
.../golang.org/x/net/html/charset/charset.go | 257 -
vendor/golang.org/x/net/html/const.go | 111 -
vendor/golang.org/x/net/html/doc.go | 106 -
vendor/golang.org/x/net/html/doctype.go | 156 -
vendor/golang.org/x/net/html/entity.go | 2253 -
vendor/golang.org/x/net/html/escape.go | 258 -
vendor/golang.org/x/net/html/foreign.go | 222 -
vendor/golang.org/x/net/html/node.go | 225 -
vendor/golang.org/x/net/html/parse.go | 2460 -
vendor/golang.org/x/net/html/render.go | 273 -
vendor/golang.org/x/net/html/token.go | 1261 -
.../golang.org/x/net/internal/iana/const.go | 223 -
.../x/net/internal/socket/cmsghdr.go | 12 -
.../x/net/internal/socket/cmsghdr_bsd.go | 14 -
.../internal/socket/cmsghdr_linux_32bit.go | 15 -
.../internal/socket/cmsghdr_linux_64bit.go | 15 -
.../internal/socket/cmsghdr_solaris_64bit.go | 14 -
.../x/net/internal/socket/cmsghdr_stub.go | 28 -
.../x/net/internal/socket/cmsghdr_unix.go | 22 -
.../net/internal/socket/cmsghdr_zos_s390x.go | 11 -
.../net/internal/socket/complete_dontwait.go | 26 -
.../internal/socket/complete_nodontwait.go | 22 -
.../golang.org/x/net/internal/socket/empty.s | 8 -
.../x/net/internal/socket/error_unix.go | 32 -
.../x/net/internal/socket/error_windows.go | 26 -
.../x/net/internal/socket/iovec_32bit.go | 20 -
.../x/net/internal/socket/iovec_64bit.go | 20 -
.../internal/socket/iovec_solaris_64bit.go | 19 -
.../x/net/internal/socket/iovec_stub.go | 12 -
.../x/net/internal/socket/mmsghdr_stub.go | 22 -
.../x/net/internal/socket/mmsghdr_unix.go | 196 -
.../x/net/internal/socket/msghdr_bsd.go | 40 -
.../x/net/internal/socket/msghdr_bsdvar.go | 17 -
.../x/net/internal/socket/msghdr_linux.go | 36 -
.../net/internal/socket/msghdr_linux_32bit.go | 25 -
.../net/internal/socket/msghdr_linux_64bit.go | 25 -
.../x/net/internal/socket/msghdr_openbsd.go | 14 -
.../internal/socket/msghdr_solaris_64bit.go | 36 -
.../x/net/internal/socket/msghdr_stub.go | 15 -
.../x/net/internal/socket/msghdr_zos_s390x.go | 36 -
.../x/net/internal/socket/norace.go | 13 -
.../golang.org/x/net/internal/socket/race.go | 38 -
.../x/net/internal/socket/rawconn.go | 91 -
.../x/net/internal/socket/rawconn_mmsg.go | 54 -
.../x/net/internal/socket/rawconn_msg.go | 60 -
.../x/net/internal/socket/rawconn_nommsg.go | 16 -
.../x/net/internal/socket/rawconn_nomsg.go | 16 -
.../x/net/internal/socket/socket.go | 280 -
.../golang.org/x/net/internal/socket/sys.go | 23 -
.../x/net/internal/socket/sys_bsd.go | 16 -
.../x/net/internal/socket/sys_const_unix.go | 21 -
.../x/net/internal/socket/sys_linux.go | 23 -
.../x/net/internal/socket/sys_linux_386.go | 28 -
.../x/net/internal/socket/sys_linux_386.s | 11 -
.../x/net/internal/socket/sys_linux_amd64.go | 10 -
.../x/net/internal/socket/sys_linux_arm.go | 10 -
.../x/net/internal/socket/sys_linux_arm64.go | 10 -
.../net/internal/socket/sys_linux_loong64.go | 13 -
.../x/net/internal/socket/sys_linux_mips.go | 10 -
.../x/net/internal/socket/sys_linux_mips64.go | 10 -
.../net/internal/socket/sys_linux_mips64le.go | 10 -
.../x/net/internal/socket/sys_linux_mipsle.go | 10 -
.../x/net/internal/socket/sys_linux_ppc.go | 10 -
.../x/net/internal/socket/sys_linux_ppc64.go | 10 -
.../net/internal/socket/sys_linux_ppc64le.go | 10 -
.../net/internal/socket/sys_linux_riscv64.go | 13 -
.../x/net/internal/socket/sys_linux_s390x.go | 28 -
.../x/net/internal/socket/sys_linux_s390x.s | 11 -
.../x/net/internal/socket/sys_netbsd.go | 25 -
.../x/net/internal/socket/sys_posix.go | 185 -
.../x/net/internal/socket/sys_stub.go | 53 -
.../x/net/internal/socket/sys_unix.go | 122 -
.../x/net/internal/socket/sys_windows.go | 55 -
.../x/net/internal/socket/sys_zos_s390x.go | 66 -
.../x/net/internal/socket/sys_zos_s390x.s | 11 -
.../x/net/internal/socket/zsys_aix_ppc64.go | 40 -
.../net/internal/socket/zsys_darwin_amd64.go | 32 -
.../net/internal/socket/zsys_darwin_arm64.go | 32 -
.../internal/socket/zsys_dragonfly_amd64.go | 32 -
.../x/net/internal/socket/zsys_freebsd_386.go | 30 -
.../net/internal/socket/zsys_freebsd_amd64.go | 32 -
.../x/net/internal/socket/zsys_freebsd_arm.go | 30 -
.../net/internal/socket/zsys_freebsd_arm64.go | 32 -
.../internal/socket/zsys_freebsd_riscv64.go | 30 -
.../x/net/internal/socket/zsys_linux_386.go | 35 -
.../x/net/internal/socket/zsys_linux_amd64.go | 38 -
.../x/net/internal/socket/zsys_linux_arm.go | 35 -
.../x/net/internal/socket/zsys_linux_arm64.go | 38 -
.../net/internal/socket/zsys_linux_loong64.go | 40 -
.../x/net/internal/socket/zsys_linux_mips.go | 35 -
.../net/internal/socket/zsys_linux_mips64.go | 38 -
.../internal/socket/zsys_linux_mips64le.go | 38 -
.../net/internal/socket/zsys_linux_mipsle.go | 35 -
.../x/net/internal/socket/zsys_linux_ppc.go | 35 -
.../x/net/internal/socket/zsys_linux_ppc64.go | 38 -
.../net/internal/socket/zsys_linux_ppc64le.go | 38 -
.../net/internal/socket/zsys_linux_riscv64.go | 40 -
.../x/net/internal/socket/zsys_linux_s390x.go | 38 -
.../x/net/internal/socket/zsys_netbsd_386.go | 35 -
.../net/internal/socket/zsys_netbsd_amd64.go | 38 -
.../x/net/internal/socket/zsys_netbsd_arm.go | 35 -
.../net/internal/socket/zsys_netbsd_arm64.go | 38 -
.../x/net/internal/socket/zsys_openbsd_386.go | 30 -
.../net/internal/socket/zsys_openbsd_amd64.go | 32 -
.../x/net/internal/socket/zsys_openbsd_arm.go | 30 -
.../net/internal/socket/zsys_openbsd_arm64.go | 32 -
.../internal/socket/zsys_openbsd_mips64.go | 30 -
.../net/internal/socket/zsys_openbsd_ppc64.go | 30 -
.../internal/socket/zsys_openbsd_riscv64.go | 30 -
.../net/internal/socket/zsys_solaris_amd64.go | 32 -
.../x/net/internal/socket/zsys_zos_s390x.go | 28 -
vendor/golang.org/x/net/ipv4/batch.go | 194 -
vendor/golang.org/x/net/ipv4/control.go | 144 -
vendor/golang.org/x/net/ipv4/control_bsd.go | 44 -
.../golang.org/x/net/ipv4/control_pktinfo.go | 42 -
vendor/golang.org/x/net/ipv4/control_stub.go | 14 -
vendor/golang.org/x/net/ipv4/control_unix.go | 76 -
.../golang.org/x/net/ipv4/control_windows.go | 12 -
vendor/golang.org/x/net/ipv4/control_zos.go | 88 -
vendor/golang.org/x/net/ipv4/dgramopt.go | 264 -
vendor/golang.org/x/net/ipv4/doc.go | 240 -
vendor/golang.org/x/net/ipv4/endpoint.go | 186 -
vendor/golang.org/x/net/ipv4/genericopt.go | 55 -
vendor/golang.org/x/net/ipv4/header.go | 172 -
vendor/golang.org/x/net/ipv4/helper.go | 77 -
vendor/golang.org/x/net/ipv4/iana.go | 38 -
vendor/golang.org/x/net/ipv4/icmp.go | 57 -
vendor/golang.org/x/net/ipv4/icmp_linux.go | 25 -
vendor/golang.org/x/net/ipv4/icmp_stub.go | 26 -
vendor/golang.org/x/net/ipv4/packet.go | 117 -
vendor/golang.org/x/net/ipv4/payload.go | 23 -
vendor/golang.org/x/net/ipv4/payload_cmsg.go | 85 -
.../golang.org/x/net/ipv4/payload_nocmsg.go | 40 -
vendor/golang.org/x/net/ipv4/sockopt.go | 44 -
vendor/golang.org/x/net/ipv4/sockopt_posix.go | 72 -
vendor/golang.org/x/net/ipv4/sockopt_stub.go | 43 -
vendor/golang.org/x/net/ipv4/sys_aix.go | 44 -
vendor/golang.org/x/net/ipv4/sys_asmreq.go | 123 -
.../golang.org/x/net/ipv4/sys_asmreq_stub.go | 26 -
vendor/golang.org/x/net/ipv4/sys_asmreqn.go | 45 -
.../golang.org/x/net/ipv4/sys_asmreqn_stub.go | 22 -
vendor/golang.org/x/net/ipv4/sys_bpf.go | 25 -
vendor/golang.org/x/net/ipv4/sys_bpf_stub.go | 17 -
vendor/golang.org/x/net/ipv4/sys_bsd.go | 42 -
vendor/golang.org/x/net/ipv4/sys_darwin.go | 69 -
vendor/golang.org/x/net/ipv4/sys_dragonfly.go | 39 -
vendor/golang.org/x/net/ipv4/sys_freebsd.go | 80 -
vendor/golang.org/x/net/ipv4/sys_linux.go | 61 -
vendor/golang.org/x/net/ipv4/sys_solaris.go | 61 -
vendor/golang.org/x/net/ipv4/sys_ssmreq.go | 53 -
.../golang.org/x/net/ipv4/sys_ssmreq_stub.go | 22 -
vendor/golang.org/x/net/ipv4/sys_stub.go | 14 -
vendor/golang.org/x/net/ipv4/sys_windows.go | 44 -
vendor/golang.org/x/net/ipv4/sys_zos.go | 57 -
.../golang.org/x/net/ipv4/zsys_aix_ppc64.go | 17 -
vendor/golang.org/x/net/ipv4/zsys_darwin.go | 59 -
.../golang.org/x/net/ipv4/zsys_dragonfly.go | 13 -
.../golang.org/x/net/ipv4/zsys_freebsd_386.go | 52 -
.../x/net/ipv4/zsys_freebsd_amd64.go | 54 -
.../golang.org/x/net/ipv4/zsys_freebsd_arm.go | 54 -
.../x/net/ipv4/zsys_freebsd_arm64.go | 52 -
.../x/net/ipv4/zsys_freebsd_riscv64.go | 52 -
.../golang.org/x/net/ipv4/zsys_linux_386.go | 72 -
.../golang.org/x/net/ipv4/zsys_linux_amd64.go | 74 -
.../golang.org/x/net/ipv4/zsys_linux_arm.go | 72 -
.../golang.org/x/net/ipv4/zsys_linux_arm64.go | 74 -
.../x/net/ipv4/zsys_linux_loong64.go | 77 -
.../golang.org/x/net/ipv4/zsys_linux_mips.go | 72 -
.../x/net/ipv4/zsys_linux_mips64.go | 74 -
.../x/net/ipv4/zsys_linux_mips64le.go | 74 -
.../x/net/ipv4/zsys_linux_mipsle.go | 72 -
.../golang.org/x/net/ipv4/zsys_linux_ppc.go | 72 -
.../golang.org/x/net/ipv4/zsys_linux_ppc64.go | 74 -
.../x/net/ipv4/zsys_linux_ppc64le.go | 74 -
.../x/net/ipv4/zsys_linux_riscv64.go | 77 -
.../golang.org/x/net/ipv4/zsys_linux_s390x.go | 74 -
vendor/golang.org/x/net/ipv4/zsys_netbsd.go | 13 -
vendor/golang.org/x/net/ipv4/zsys_openbsd.go | 13 -
vendor/golang.org/x/net/ipv4/zsys_solaris.go | 57 -
.../golang.org/x/net/ipv4/zsys_zos_s390x.go | 56 -
.../x/net/publicsuffix/data/children | Bin 2876 -> 0 bytes
.../golang.org/x/net/publicsuffix/data/nodes | Bin 48280 -> 0 bytes
.../golang.org/x/net/publicsuffix/data/text | 1 -
vendor/golang.org/x/net/publicsuffix/list.go | 203 -
vendor/golang.org/x/net/publicsuffix/table.go | 70 -
vendor/golang.org/x/sys/LICENSE | 27 -
vendor/golang.org/x/sys/PATENTS | 22 -
vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s | 18 -
vendor/golang.org/x/sys/cpu/byteorder.go | 66 -
vendor/golang.org/x/sys/cpu/cpu.go | 287 -
vendor/golang.org/x/sys/cpu/cpu_aix.go | 34 -
vendor/golang.org/x/sys/cpu/cpu_arm.go | 73 -
vendor/golang.org/x/sys/cpu/cpu_arm64.go | 172 -
vendor/golang.org/x/sys/cpu/cpu_arm64.s | 32 -
vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 12 -
vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go | 22 -
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 17 -
.../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 12 -
.../golang.org/x/sys/cpu/cpu_gccgo_s390x.go | 23 -
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c | 39 -
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 33 -
vendor/golang.org/x/sys/cpu/cpu_linux.go | 16 -
vendor/golang.org/x/sys/cpu/cpu_linux_arm.go | 39 -
.../golang.org/x/sys/cpu/cpu_linux_arm64.go | 111 -
.../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 24 -
.../golang.org/x/sys/cpu/cpu_linux_noinit.go | 10 -
.../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 32 -
.../golang.org/x/sys/cpu/cpu_linux_s390x.go | 40 -
vendor/golang.org/x/sys/cpu/cpu_loong64.go | 13 -
vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 16 -
vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 12 -
.../golang.org/x/sys/cpu/cpu_netbsd_arm64.go | 173 -
.../golang.org/x/sys/cpu/cpu_openbsd_arm64.go | 65 -
.../golang.org/x/sys/cpu/cpu_openbsd_arm64.s | 11 -
vendor/golang.org/x/sys/cpu/cpu_other_arm.go | 10 -
.../golang.org/x/sys/cpu/cpu_other_arm64.go | 10 -
.../golang.org/x/sys/cpu/cpu_other_mips64x.go | 13 -
.../golang.org/x/sys/cpu/cpu_other_ppc64x.go | 15 -
.../golang.org/x/sys/cpu/cpu_other_riscv64.go | 12 -
vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 17 -
vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 12 -
vendor/golang.org/x/sys/cpu/cpu_s390x.go | 172 -
vendor/golang.org/x/sys/cpu/cpu_s390x.s | 58 -
vendor/golang.org/x/sys/cpu/cpu_wasm.go | 18 -
vendor/golang.org/x/sys/cpu/cpu_x86.go | 145 -
vendor/golang.org/x/sys/cpu/cpu_x86.s | 28 -
vendor/golang.org/x/sys/cpu/cpu_zos.go | 10 -
vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go | 25 -
vendor/golang.org/x/sys/cpu/endian_big.go | 11 -
vendor/golang.org/x/sys/cpu/endian_little.go | 11 -
vendor/golang.org/x/sys/cpu/hwcap_linux.go | 56 -
vendor/golang.org/x/sys/cpu/parse.go | 43 -
.../x/sys/cpu/proc_cpuinfo_linux.go | 54 -
.../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 27 -
.../x/sys/cpu/syscall_aix_ppc64_gc.go | 36 -
vendor/golang.org/x/sys/execabs/execabs.go | 102 -
.../golang.org/x/sys/execabs/execabs_go118.go | 12 -
.../golang.org/x/sys/execabs/execabs_go119.go | 17 -
.../sys/internal/unsafeheader/unsafeheader.go | 30 -
vendor/golang.org/x/sys/plan9/asm.s | 8 -
vendor/golang.org/x/sys/plan9/asm_plan9_386.s | 30 -
.../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 -
vendor/golang.org/x/sys/plan9/asm_plan9_arm.s | 25 -
vendor/golang.org/x/sys/plan9/const_plan9.go | 70 -
vendor/golang.org/x/sys/plan9/dir_plan9.go | 212 -
vendor/golang.org/x/sys/plan9/env_plan9.go | 31 -
vendor/golang.org/x/sys/plan9/errors_plan9.go | 50 -
vendor/golang.org/x/sys/plan9/mkall.sh | 150 -
vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 -
.../golang.org/x/sys/plan9/mksysnum_plan9.sh | 23 -
.../golang.org/x/sys/plan9/pwd_go15_plan9.go | 22 -
vendor/golang.org/x/sys/plan9/pwd_plan9.go | 24 -
vendor/golang.org/x/sys/plan9/race.go | 31 -
vendor/golang.org/x/sys/plan9/race0.go | 26 -
vendor/golang.org/x/sys/plan9/str.go | 23 -
vendor/golang.org/x/sys/plan9/syscall.go | 110 -
.../golang.org/x/sys/plan9/syscall_plan9.go | 361 -
.../x/sys/plan9/zsyscall_plan9_386.go | 285 -
.../x/sys/plan9/zsyscall_plan9_amd64.go | 285 -
.../x/sys/plan9/zsyscall_plan9_arm.go | 285 -
.../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 -
vendor/golang.org/x/sys/unix/.gitignore | 2 -
vendor/golang.org/x/sys/unix/README.md | 184 -
.../golang.org/x/sys/unix/affinity_linux.go | 86 -
vendor/golang.org/x/sys/unix/aliases.go | 15 -
vendor/golang.org/x/sys/unix/asm_aix_ppc64.s | 18 -
vendor/golang.org/x/sys/unix/asm_bsd_386.s | 29 -
vendor/golang.org/x/sys/unix/asm_bsd_amd64.s | 29 -
vendor/golang.org/x/sys/unix/asm_bsd_arm.s | 29 -
vendor/golang.org/x/sys/unix/asm_bsd_arm64.s | 29 -
vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s | 31 -
.../golang.org/x/sys/unix/asm_bsd_riscv64.s | 29 -
vendor/golang.org/x/sys/unix/asm_linux_386.s | 66 -
.../golang.org/x/sys/unix/asm_linux_amd64.s | 58 -
vendor/golang.org/x/sys/unix/asm_linux_arm.s | 57 -
.../golang.org/x/sys/unix/asm_linux_arm64.s | 53 -
.../golang.org/x/sys/unix/asm_linux_loong64.s | 54 -
.../golang.org/x/sys/unix/asm_linux_mips64x.s | 57 -
.../golang.org/x/sys/unix/asm_linux_mipsx.s | 55 -
.../golang.org/x/sys/unix/asm_linux_ppc64x.s | 45 -
.../golang.org/x/sys/unix/asm_linux_riscv64.s | 49 -
.../golang.org/x/sys/unix/asm_linux_s390x.s | 57 -
.../x/sys/unix/asm_openbsd_mips64.s | 30 -
.../golang.org/x/sys/unix/asm_solaris_amd64.s | 18 -
vendor/golang.org/x/sys/unix/asm_zos_s390x.s | 426 -
.../golang.org/x/sys/unix/bluetooth_linux.go | 36 -
vendor/golang.org/x/sys/unix/cap_freebsd.go | 196 -
vendor/golang.org/x/sys/unix/constants.go | 14 -
vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 27 -
vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 29 -
vendor/golang.org/x/sys/unix/dev_darwin.go | 24 -
vendor/golang.org/x/sys/unix/dev_dragonfly.go | 30 -
vendor/golang.org/x/sys/unix/dev_freebsd.go | 30 -
vendor/golang.org/x/sys/unix/dev_linux.go | 42 -
vendor/golang.org/x/sys/unix/dev_netbsd.go | 29 -
vendor/golang.org/x/sys/unix/dev_openbsd.go | 29 -
vendor/golang.org/x/sys/unix/dev_zos.go | 29 -
vendor/golang.org/x/sys/unix/dirent.go | 103 -
vendor/golang.org/x/sys/unix/endian_big.go | 10 -
vendor/golang.org/x/sys/unix/endian_little.go | 10 -
vendor/golang.org/x/sys/unix/env_unix.go | 32 -
vendor/golang.org/x/sys/unix/epoll_zos.go | 221 -
vendor/golang.org/x/sys/unix/fcntl.go | 37 -
vendor/golang.org/x/sys/unix/fcntl_darwin.go | 24 -
.../x/sys/unix/fcntl_linux_32bit.go | 14 -
vendor/golang.org/x/sys/unix/fdset.go | 30 -
vendor/golang.org/x/sys/unix/fstatfs_zos.go | 164 -
vendor/golang.org/x/sys/unix/gccgo.go | 60 -
vendor/golang.org/x/sys/unix/gccgo_c.c | 45 -
.../x/sys/unix/gccgo_linux_amd64.go | 21 -
vendor/golang.org/x/sys/unix/ifreq_linux.go | 142 -
vendor/golang.org/x/sys/unix/ioctl.go | 75 -
vendor/golang.org/x/sys/unix/ioctl_linux.go | 233 -
vendor/golang.org/x/sys/unix/ioctl_zos.go | 74 -
vendor/golang.org/x/sys/unix/mkall.sh | 249 -
vendor/golang.org/x/sys/unix/mkerrors.sh | 778 -
vendor/golang.org/x/sys/unix/pagesize_unix.go | 16 -
.../golang.org/x/sys/unix/pledge_openbsd.go | 163 -
vendor/golang.org/x/sys/unix/ptrace_darwin.go | 12 -
vendor/golang.org/x/sys/unix/ptrace_ios.go | 12 -
vendor/golang.org/x/sys/unix/race.go | 31 -
vendor/golang.org/x/sys/unix/race0.go | 26 -
.../x/sys/unix/readdirent_getdents.go | 13 -
.../x/sys/unix/readdirent_getdirentries.go | 20 -
.../x/sys/unix/sockcmsg_dragonfly.go | 16 -
.../golang.org/x/sys/unix/sockcmsg_linux.go | 85 -
vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 107 -
.../x/sys/unix/sockcmsg_unix_other.go | 47 -
vendor/golang.org/x/sys/unix/syscall.go | 87 -
vendor/golang.org/x/sys/unix/syscall_aix.go | 600 -
.../golang.org/x/sys/unix/syscall_aix_ppc.go | 54 -
.../x/sys/unix/syscall_aix_ppc64.go | 85 -
vendor/golang.org/x/sys/unix/syscall_bsd.go | 625 -
.../golang.org/x/sys/unix/syscall_darwin.go | 831 -
.../x/sys/unix/syscall_darwin_amd64.go | 51 -
.../x/sys/unix/syscall_darwin_arm64.go | 51 -
.../x/sys/unix/syscall_darwin_libSystem.go | 27 -
.../x/sys/unix/syscall_dragonfly.go | 545 -
.../x/sys/unix/syscall_dragonfly_amd64.go | 57 -
.../golang.org/x/sys/unix/syscall_freebsd.go | 615 -
.../x/sys/unix/syscall_freebsd_386.go | 72 -
.../x/sys/unix/syscall_freebsd_amd64.go | 72 -
.../x/sys/unix/syscall_freebsd_arm.go | 68 -
.../x/sys/unix/syscall_freebsd_arm64.go | 68 -
.../x/sys/unix/syscall_freebsd_riscv64.go | 68 -
vendor/golang.org/x/sys/unix/syscall_hurd.go | 22 -
.../golang.org/x/sys/unix/syscall_hurd_386.go | 29 -
.../golang.org/x/sys/unix/syscall_illumos.go | 79 -
vendor/golang.org/x/sys/unix/syscall_linux.go | 2492 -
.../x/sys/unix/syscall_linux_386.go | 342 -
.../x/sys/unix/syscall_linux_alarm.go | 14 -
.../x/sys/unix/syscall_linux_amd64.go | 147 -
.../x/sys/unix/syscall_linux_amd64_gc.go | 13 -
.../x/sys/unix/syscall_linux_arm.go | 244 -
.../x/sys/unix/syscall_linux_arm64.go | 195 -
.../golang.org/x/sys/unix/syscall_linux_gc.go | 15 -
.../x/sys/unix/syscall_linux_gc_386.go | 17 -
.../x/sys/unix/syscall_linux_gc_arm.go | 14 -
.../x/sys/unix/syscall_linux_gccgo_386.go | 31 -
.../x/sys/unix/syscall_linux_gccgo_arm.go | 21 -
.../x/sys/unix/syscall_linux_loong64.go | 222 -
.../x/sys/unix/syscall_linux_mips64x.go | 191 -
.../x/sys/unix/syscall_linux_mipsx.go | 203 -
.../x/sys/unix/syscall_linux_ppc.go | 232 -
.../x/sys/unix/syscall_linux_ppc64x.go | 118 -
.../x/sys/unix/syscall_linux_riscv64.go | 180 -
.../x/sys/unix/syscall_linux_s390x.go | 298 -
.../x/sys/unix/syscall_linux_sparc64.go | 114 -
.../golang.org/x/sys/unix/syscall_netbsd.go | 624 -
.../x/sys/unix/syscall_netbsd_386.go | 38 -
.../x/sys/unix/syscall_netbsd_amd64.go | 38 -
.../x/sys/unix/syscall_netbsd_arm.go | 38 -
.../x/sys/unix/syscall_netbsd_arm64.go | 38 -
.../golang.org/x/sys/unix/syscall_openbsd.go | 390 -
.../x/sys/unix/syscall_openbsd_386.go | 42 -
.../x/sys/unix/syscall_openbsd_amd64.go | 42 -
.../x/sys/unix/syscall_openbsd_arm.go | 42 -
.../x/sys/unix/syscall_openbsd_arm64.go | 42 -
.../x/sys/unix/syscall_openbsd_libc.go | 27 -
.../x/sys/unix/syscall_openbsd_mips64.go | 39 -
.../x/sys/unix/syscall_openbsd_ppc64.go | 42 -
.../x/sys/unix/syscall_openbsd_riscv64.go | 42 -
.../golang.org/x/sys/unix/syscall_solaris.go | 1133 -
.../x/sys/unix/syscall_solaris_amd64.go | 28 -
vendor/golang.org/x/sys/unix/syscall_unix.go | 589 -
.../golang.org/x/sys/unix/syscall_unix_gc.go | 16 -
.../x/sys/unix/syscall_unix_gc_ppc64x.go | 25 -
.../x/sys/unix/syscall_zos_s390x.go | 1994 -
vendor/golang.org/x/sys/unix/sysvshm_linux.go | 21 -
vendor/golang.org/x/sys/unix/sysvshm_unix.go | 52 -
.../x/sys/unix/sysvshm_unix_other.go | 14 -
vendor/golang.org/x/sys/unix/timestruct.go | 77 -
.../golang.org/x/sys/unix/unveil_openbsd.go | 42 -
vendor/golang.org/x/sys/unix/xattr_bsd.go | 281 -
.../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1385 -
.../x/sys/unix/zerrors_aix_ppc64.go | 1386 -
.../x/sys/unix/zerrors_darwin_amd64.go | 1892 -
.../x/sys/unix/zerrors_darwin_arm64.go | 1892 -
.../x/sys/unix/zerrors_dragonfly_amd64.go | 1738 -
.../x/sys/unix/zerrors_freebsd_386.go | 2043 -
.../x/sys/unix/zerrors_freebsd_amd64.go | 2040 -
.../x/sys/unix/zerrors_freebsd_arm.go | 2034 -
.../x/sys/unix/zerrors_freebsd_arm64.go | 2034 -
.../x/sys/unix/zerrors_freebsd_riscv64.go | 2148 -
vendor/golang.org/x/sys/unix/zerrors_linux.go | 3473 -
.../x/sys/unix/zerrors_linux_386.go | 829 -
.../x/sys/unix/zerrors_linux_amd64.go | 829 -
.../x/sys/unix/zerrors_linux_arm.go | 835 -
.../x/sys/unix/zerrors_linux_arm64.go | 827 -
.../x/sys/unix/zerrors_linux_loong64.go | 819 -
.../x/sys/unix/zerrors_linux_mips.go | 836 -
.../x/sys/unix/zerrors_linux_mips64.go | 836 -
.../x/sys/unix/zerrors_linux_mips64le.go | 836 -
.../x/sys/unix/zerrors_linux_mipsle.go | 836 -
.../x/sys/unix/zerrors_linux_ppc.go | 888 -
.../x/sys/unix/zerrors_linux_ppc64.go | 892 -
.../x/sys/unix/zerrors_linux_ppc64le.go | 892 -
.../x/sys/unix/zerrors_linux_riscv64.go | 816 -
.../x/sys/unix/zerrors_linux_s390x.go | 891 -
.../x/sys/unix/zerrors_linux_sparc64.go | 886 -
.../x/sys/unix/zerrors_netbsd_386.go | 1780 -
.../x/sys/unix/zerrors_netbsd_amd64.go | 1770 -
.../x/sys/unix/zerrors_netbsd_arm.go | 1759 -
.../x/sys/unix/zerrors_netbsd_arm64.go | 1770 -
.../x/sys/unix/zerrors_openbsd_386.go | 1906 -
.../x/sys/unix/zerrors_openbsd_amd64.go | 1906 -
.../x/sys/unix/zerrors_openbsd_arm.go | 1906 -
.../x/sys/unix/zerrors_openbsd_arm64.go | 1906 -
.../x/sys/unix/zerrors_openbsd_mips64.go | 1906 -
.../x/sys/unix/zerrors_openbsd_ppc64.go | 1905 -
.../x/sys/unix/zerrors_openbsd_riscv64.go | 1904 -
.../x/sys/unix/zerrors_solaris_amd64.go | 1557 -
.../x/sys/unix/zerrors_zos_s390x.go | 860 -
.../x/sys/unix/zptrace_armnn_linux.go | 42 -
.../x/sys/unix/zptrace_linux_arm64.go | 17 -
.../x/sys/unix/zptrace_mipsnn_linux.go | 51 -
.../x/sys/unix/zptrace_mipsnnle_linux.go | 51 -
.../x/sys/unix/zptrace_x86_linux.go | 81 -
.../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1485 -
.../x/sys/unix/zsyscall_aix_ppc64.go | 1443 -
.../x/sys/unix/zsyscall_aix_ppc64_gc.go | 1192 -
.../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 1070 -
.../x/sys/unix/zsyscall_darwin_amd64.go | 2545 -
.../x/sys/unix/zsyscall_darwin_amd64.s | 904 -
.../x/sys/unix/zsyscall_darwin_arm64.go | 2545 -
.../x/sys/unix/zsyscall_darwin_arm64.s | 904 -
.../x/sys/unix/zsyscall_dragonfly_amd64.go | 1689 -
.../x/sys/unix/zsyscall_freebsd_386.go | 1899 -
.../x/sys/unix/zsyscall_freebsd_amd64.go | 1899 -
.../x/sys/unix/zsyscall_freebsd_arm.go | 1899 -
.../x/sys/unix/zsyscall_freebsd_arm64.go | 1899 -
.../x/sys/unix/zsyscall_freebsd_riscv64.go | 1899 -
.../x/sys/unix/zsyscall_illumos_amd64.go | 102 -
.../golang.org/x/sys/unix/zsyscall_linux.go | 2174 -
.../x/sys/unix/zsyscall_linux_386.go | 497 -
.../x/sys/unix/zsyscall_linux_amd64.go | 664 -
.../x/sys/unix/zsyscall_linux_arm.go | 612 -
.../x/sys/unix/zsyscall_linux_arm64.go | 563 -
.../x/sys/unix/zsyscall_linux_loong64.go | 487 -
.../x/sys/unix/zsyscall_linux_mips.go | 664 -
.../x/sys/unix/zsyscall_linux_mips64.go | 658 -
.../x/sys/unix/zsyscall_linux_mips64le.go | 647 -
.../x/sys/unix/zsyscall_linux_mipsle.go | 664 -
.../x/sys/unix/zsyscall_linux_ppc.go | 669 -
.../x/sys/unix/zsyscall_linux_ppc64.go | 715 -
.../x/sys/unix/zsyscall_linux_ppc64le.go | 715 -
.../x/sys/unix/zsyscall_linux_riscv64.go | 543 -
.../x/sys/unix/zsyscall_linux_s390x.go | 506 -
.../x/sys/unix/zsyscall_linux_sparc64.go | 659 -
.../x/sys/unix/zsyscall_netbsd_386.go | 1860 -
.../x/sys/unix/zsyscall_netbsd_amd64.go | 1860 -
.../x/sys/unix/zsyscall_netbsd_arm.go | 1860 -
.../x/sys/unix/zsyscall_netbsd_arm64.go | 1860 -
.../x/sys/unix/zsyscall_openbsd_386.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_386.s | 669 -
.../x/sys/unix/zsyscall_openbsd_amd64.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_amd64.s | 669 -
.../x/sys/unix/zsyscall_openbsd_arm.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_arm.s | 669 -
.../x/sys/unix/zsyscall_openbsd_arm64.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_arm64.s | 669 -
.../x/sys/unix/zsyscall_openbsd_mips64.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_mips64.s | 669 -
.../x/sys/unix/zsyscall_openbsd_ppc64.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_ppc64.s | 802 -
.../x/sys/unix/zsyscall_openbsd_riscv64.go | 2235 -
.../x/sys/unix/zsyscall_openbsd_riscv64.s | 669 -
.../x/sys/unix/zsyscall_solaris_amd64.go | 2106 -
.../x/sys/unix/zsyscall_zos_s390x.go | 1255 -
.../x/sys/unix/zsysctl_openbsd_386.go | 281 -
.../x/sys/unix/zsysctl_openbsd_amd64.go | 281 -
.../x/sys/unix/zsysctl_openbsd_arm.go | 281 -
.../x/sys/unix/zsysctl_openbsd_arm64.go | 281 -
.../x/sys/unix/zsysctl_openbsd_mips64.go | 281 -
.../x/sys/unix/zsysctl_openbsd_ppc64.go | 281 -
.../x/sys/unix/zsysctl_openbsd_riscv64.go | 282 -
.../x/sys/unix/zsysnum_darwin_amd64.go | 440 -
.../x/sys/unix/zsysnum_darwin_arm64.go | 438 -
.../x/sys/unix/zsysnum_dragonfly_amd64.go | 317 -
.../x/sys/unix/zsysnum_freebsd_386.go | 394 -
.../x/sys/unix/zsysnum_freebsd_amd64.go | 394 -
.../x/sys/unix/zsysnum_freebsd_arm.go | 394 -
.../x/sys/unix/zsysnum_freebsd_arm64.go | 394 -
.../x/sys/unix/zsysnum_freebsd_riscv64.go | 394 -
.../x/sys/unix/zsysnum_linux_386.go | 450 -
.../x/sys/unix/zsysnum_linux_amd64.go | 372 -
.../x/sys/unix/zsysnum_linux_arm.go | 414 -
.../x/sys/unix/zsysnum_linux_arm64.go | 317 -
.../x/sys/unix/zsysnum_linux_loong64.go | 311 -
.../x/sys/unix/zsysnum_linux_mips.go | 434 -
.../x/sys/unix/zsysnum_linux_mips64.go | 364 -
.../x/sys/unix/zsysnum_linux_mips64le.go | 364 -
.../x/sys/unix/zsysnum_linux_mipsle.go | 434 -
.../x/sys/unix/zsysnum_linux_ppc.go | 441 -
.../x/sys/unix/zsysnum_linux_ppc64.go | 413 -
.../x/sys/unix/zsysnum_linux_ppc64le.go | 413 -
.../x/sys/unix/zsysnum_linux_riscv64.go | 316 -
.../x/sys/unix/zsysnum_linux_s390x.go | 378 -
.../x/sys/unix/zsysnum_linux_sparc64.go | 392 -
.../x/sys/unix/zsysnum_netbsd_386.go | 275 -
.../x/sys/unix/zsysnum_netbsd_amd64.go | 275 -
.../x/sys/unix/zsysnum_netbsd_arm.go | 275 -
.../x/sys/unix/zsysnum_netbsd_arm64.go | 275 -
.../x/sys/unix/zsysnum_openbsd_386.go | 220 -
.../x/sys/unix/zsysnum_openbsd_amd64.go | 220 -
.../x/sys/unix/zsysnum_openbsd_arm.go | 220 -
.../x/sys/unix/zsysnum_openbsd_arm64.go | 219 -
.../x/sys/unix/zsysnum_openbsd_mips64.go | 222 -
.../x/sys/unix/zsysnum_openbsd_ppc64.go | 218 -
.../x/sys/unix/zsysnum_openbsd_riscv64.go | 219 -
.../x/sys/unix/zsysnum_zos_s390x.go | 2670 -
.../golang.org/x/sys/unix/ztypes_aix_ppc.go | 354 -
.../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 358 -
.../x/sys/unix/ztypes_darwin_amd64.go | 795 -
.../x/sys/unix/ztypes_darwin_arm64.go | 795 -
.../x/sys/unix/ztypes_dragonfly_amd64.go | 474 -
.../x/sys/unix/ztypes_freebsd_386.go | 651 -
.../x/sys/unix/ztypes_freebsd_amd64.go | 656 -
.../x/sys/unix/ztypes_freebsd_arm.go | 642 -
.../x/sys/unix/ztypes_freebsd_arm64.go | 636 -
.../x/sys/unix/ztypes_freebsd_riscv64.go | 638 -
vendor/golang.org/x/sys/unix/ztypes_linux.go | 5754 -
.../golang.org/x/sys/unix/ztypes_linux_386.go | 696 -
.../x/sys/unix/ztypes_linux_amd64.go | 711 -
.../golang.org/x/sys/unix/ztypes_linux_arm.go | 691 -
.../x/sys/unix/ztypes_linux_arm64.go | 690 -
.../x/sys/unix/ztypes_linux_loong64.go | 691 -
.../x/sys/unix/ztypes_linux_mips.go | 696 -
.../x/sys/unix/ztypes_linux_mips64.go | 693 -
.../x/sys/unix/ztypes_linux_mips64le.go | 693 -
.../x/sys/unix/ztypes_linux_mipsle.go | 696 -
.../golang.org/x/sys/unix/ztypes_linux_ppc.go | 704 -
.../x/sys/unix/ztypes_linux_ppc64.go | 699 -
.../x/sys/unix/ztypes_linux_ppc64le.go | 699 -
.../x/sys/unix/ztypes_linux_riscv64.go | 718 -
.../x/sys/unix/ztypes_linux_s390x.go | 713 -
.../x/sys/unix/ztypes_linux_sparc64.go | 694 -
.../x/sys/unix/ztypes_netbsd_386.go | 586 -
.../x/sys/unix/ztypes_netbsd_amd64.go | 594 -
.../x/sys/unix/ztypes_netbsd_arm.go | 591 -
.../x/sys/unix/ztypes_netbsd_arm64.go | 594 -
.../x/sys/unix/ztypes_openbsd_386.go | 569 -
.../x/sys/unix/ztypes_openbsd_amd64.go | 569 -
.../x/sys/unix/ztypes_openbsd_arm.go | 576 -
.../x/sys/unix/ztypes_openbsd_arm64.go | 569 -
.../x/sys/unix/ztypes_openbsd_mips64.go | 569 -
.../x/sys/unix/ztypes_openbsd_ppc64.go | 571 -
.../x/sys/unix/ztypes_openbsd_riscv64.go | 571 -
.../x/sys/unix/ztypes_solaris_amd64.go | 517 -
.../golang.org/x/sys/unix/ztypes_zos_s390x.go | 415 -
vendor/golang.org/x/sys/windows/aliases.go | 13 -
.../golang.org/x/sys/windows/dll_windows.go | 416 -
vendor/golang.org/x/sys/windows/empty.s | 9 -
.../golang.org/x/sys/windows/env_windows.go | 54 -
vendor/golang.org/x/sys/windows/eventlog.go | 21 -
.../golang.org/x/sys/windows/exec_windows.go | 178 -
.../x/sys/windows/memory_windows.go | 48 -
vendor/golang.org/x/sys/windows/mkerrors.bash | 70 -
.../x/sys/windows/mkknownfolderids.bash | 27 -
vendor/golang.org/x/sys/windows/mksyscall.go | 10 -
vendor/golang.org/x/sys/windows/race.go | 31 -
vendor/golang.org/x/sys/windows/race0.go | 26 -
.../x/sys/windows/security_windows.go | 1444 -
vendor/golang.org/x/sys/windows/service.go | 247 -
.../x/sys/windows/setupapi_windows.go | 1425 -
vendor/golang.org/x/sys/windows/str.go | 23 -
.../golang.org/x/sys/windows/svc/security.go | 101 -
.../golang.org/x/sys/windows/svc/service.go | 313 -
vendor/golang.org/x/sys/windows/syscall.go | 105 -
.../x/sys/windows/syscall_windows.go | 1806 -
.../golang.org/x/sys/windows/types_windows.go | 3260 -
.../x/sys/windows/types_windows_386.go | 35 -
.../x/sys/windows/types_windows_amd64.go | 34 -
.../x/sys/windows/types_windows_arm.go | 35 -
.../x/sys/windows/types_windows_arm64.go | 34 -
.../x/sys/windows/zerrors_windows.go | 9468 -
.../x/sys/windows/zknownfolderids_windows.go | 149 -
.../x/sys/windows/zsyscall_windows.go | 4309 -
vendor/golang.org/x/term/CONTRIBUTING.md | 26 -
vendor/golang.org/x/term/LICENSE | 27 -
vendor/golang.org/x/term/PATENTS | 22 -
vendor/golang.org/x/term/README.md | 19 -
vendor/golang.org/x/term/codereview.cfg | 1 -
vendor/golang.org/x/term/term.go | 60 -
vendor/golang.org/x/term/term_plan9.go | 42 -
vendor/golang.org/x/term/term_unix.go | 92 -
vendor/golang.org/x/term/term_unix_bsd.go | 13 -
vendor/golang.org/x/term/term_unix_other.go | 13 -
vendor/golang.org/x/term/term_unsupported.go | 39 -
vendor/golang.org/x/term/term_windows.go | 79 -
vendor/golang.org/x/term/terminal.go | 986 -
vendor/golang.org/x/text/LICENSE | 27 -
vendor/golang.org/x/text/PATENTS | 22 -
vendor/golang.org/x/text/cases/cases.go | 162 -
vendor/golang.org/x/text/cases/context.go | 376 -
vendor/golang.org/x/text/cases/fold.go | 34 -
vendor/golang.org/x/text/cases/icu.go | 62 -
vendor/golang.org/x/text/cases/info.go | 82 -
vendor/golang.org/x/text/cases/map.go | 816 -
.../golang.org/x/text/cases/tables10.0.0.go | 2256 -
.../golang.org/x/text/cases/tables11.0.0.go | 2317 -
.../golang.org/x/text/cases/tables12.0.0.go | 2360 -
.../golang.org/x/text/cases/tables13.0.0.go | 2400 -
vendor/golang.org/x/text/cases/tables9.0.0.go | 2216 -
vendor/golang.org/x/text/cases/trieval.go | 217 -
vendor/golang.org/x/text/collate/collate.go | 403 -
vendor/golang.org/x/text/collate/index.go | 32 -
vendor/golang.org/x/text/collate/option.go | 239 -
vendor/golang.org/x/text/collate/sort.go | 81 -
vendor/golang.org/x/text/collate/tables.go | 73789 -----
.../x/text/encoding/charmap/charmap.go | 249 -
.../x/text/encoding/charmap/tables.go | 7410 -
vendor/golang.org/x/text/encoding/encoding.go | 335 -
.../x/text/encoding/htmlindex/htmlindex.go | 86 -
.../x/text/encoding/htmlindex/map.go | 105 -
.../x/text/encoding/htmlindex/tables.go | 362 -
.../internal/identifier/identifier.go | 81 -
.../text/encoding/internal/identifier/mib.go | 1627 -
.../x/text/encoding/internal/internal.go | 75 -
.../x/text/encoding/japanese/all.go | 12 -
.../x/text/encoding/japanese/eucjp.go | 225 -
.../x/text/encoding/japanese/iso2022jp.go | 299 -
.../x/text/encoding/japanese/shiftjis.go | 189 -
.../x/text/encoding/japanese/tables.go | 26971 --
.../x/text/encoding/korean/euckr.go | 177 -
.../x/text/encoding/korean/tables.go | 34152 ---
.../x/text/encoding/simplifiedchinese/all.go | 12 -
.../x/text/encoding/simplifiedchinese/gbk.go | 273 -
.../encoding/simplifiedchinese/hzgb2312.go | 245 -
.../text/encoding/simplifiedchinese/tables.go | 43999 ---
.../text/encoding/traditionalchinese/big5.go | 199 -
.../encoding/traditionalchinese/tables.go | 37142 ---
.../x/text/encoding/unicode/override.go | 82 -
.../x/text/encoding/unicode/unicode.go | 512 -
.../x/text/internal/colltab/collelem.go | 376 -
.../x/text/internal/colltab/colltab.go | 105 -
.../x/text/internal/colltab/contract.go | 145 -
.../x/text/internal/colltab/iter.go | 178 -
.../x/text/internal/colltab/numeric.go | 236 -
.../x/text/internal/colltab/table.go | 275 -
.../x/text/internal/colltab/trie.go | 159 -
.../x/text/internal/colltab/weighter.go | 31 -
vendor/golang.org/x/text/internal/internal.go | 49 -
.../x/text/internal/language/common.go | 16 -
.../x/text/internal/language/compact.go | 29 -
.../text/internal/language/compact/compact.go | 61 -
.../internal/language/compact/language.go | 260 -
.../text/internal/language/compact/parents.go | 120 -
.../text/internal/language/compact/tables.go | 1015 -
.../x/text/internal/language/compact/tags.go | 91 -
.../x/text/internal/language/compose.go | 167 -
.../x/text/internal/language/coverage.go | 28 -
.../x/text/internal/language/language.go | 627 -
.../x/text/internal/language/lookup.go | 412 -
.../x/text/internal/language/match.go | 226 -
.../x/text/internal/language/parse.go | 608 -
.../x/text/internal/language/tables.go | 3472 -
.../x/text/internal/language/tags.go | 48 -
vendor/golang.org/x/text/internal/match.go | 67 -
vendor/golang.org/x/text/internal/tag/tag.go | 100 -
.../internal/utf8internal/utf8internal.go | 87 -
vendor/golang.org/x/text/language/coverage.go | 187 -
vendor/golang.org/x/text/language/doc.go | 98 -
vendor/golang.org/x/text/language/language.go | 605 -
vendor/golang.org/x/text/language/match.go | 735 -
vendor/golang.org/x/text/language/parse.go | 256 -
vendor/golang.org/x/text/language/tables.go | 298 -
vendor/golang.org/x/text/language/tags.go | 145 -
vendor/golang.org/x/text/runes/cond.go | 187 -
vendor/golang.org/x/text/runes/runes.go | 355 -
.../golang.org/x/text/transform/transform.go | 709 -
.../x/text/unicode/norm/composition.go | 512 -
.../x/text/unicode/norm/forminfo.go | 279 -
.../golang.org/x/text/unicode/norm/input.go | 109 -
vendor/golang.org/x/text/unicode/norm/iter.go | 458 -
.../x/text/unicode/norm/normalize.go | 610 -
.../x/text/unicode/norm/readwriter.go | 125 -
.../x/text/unicode/norm/tables10.0.0.go | 7658 -
.../x/text/unicode/norm/tables11.0.0.go | 7694 -
.../x/text/unicode/norm/tables12.0.0.go | 7711 -
.../x/text/unicode/norm/tables13.0.0.go | 7761 -
.../x/text/unicode/norm/tables9.0.0.go | 7638 -
.../x/text/unicode/norm/transform.go | 88 -
vendor/golang.org/x/text/unicode/norm/trie.go | 54 -
vendor/golang.org/x/tools/LICENSE | 27 -
vendor/golang.org/x/tools/PATENTS | 22 -
.../x/tools/go/ast/astutil/enclosing.go | 636 -
.../x/tools/go/ast/astutil/imports.go | 485 -
.../x/tools/go/ast/astutil/rewrite.go | 488 -
.../golang.org/x/tools/go/ast/astutil/util.go | 18 -
.../x/tools/go/gcexportdata/gcexportdata.go | 177 -
.../x/tools/go/gcexportdata/importer.go | 75 -
.../x/tools/go/internal/gcimporter/bexport.go | 853 -
.../x/tools/go/internal/gcimporter/bimport.go | 1053 -
.../go/internal/gcimporter/exportdata.go | 99 -
.../go/internal/gcimporter/gcimporter.go | 1125 -
.../x/tools/go/internal/gcimporter/iexport.go | 1010 -
.../x/tools/go/internal/gcimporter/iimport.go | 878 -
.../go/internal/gcimporter/newInterface10.go | 22 -
.../go/internal/gcimporter/newInterface11.go | 14 -
.../go/internal/gcimporter/support_go117.go | 16 -
.../go/internal/gcimporter/support_go118.go | 23 -
.../go/internal/gcimporter/unified_no.go | 10 -
.../go/internal/gcimporter/unified_yes.go | 10 -
.../go/internal/gcimporter/ureader_no.go | 19 -
.../go/internal/gcimporter/ureader_yes.go | 612 -
.../tools/go/internal/packagesdriver/sizes.go | 49 -
.../x/tools/go/internal/pkgbits/codes.go | 77 -
.../x/tools/go/internal/pkgbits/decoder.go | 433 -
.../x/tools/go/internal/pkgbits/doc.go | 32 -
.../x/tools/go/internal/pkgbits/encoder.go | 379 -
.../x/tools/go/internal/pkgbits/flags.go | 9 -
.../x/tools/go/internal/pkgbits/frames_go1.go | 21 -
.../tools/go/internal/pkgbits/frames_go17.go | 28 -
.../x/tools/go/internal/pkgbits/reloc.go | 42 -
.../x/tools/go/internal/pkgbits/support.go | 17 -
.../x/tools/go/internal/pkgbits/sync.go | 113 -
.../go/internal/pkgbits/syncmarker_string.go | 89 -
vendor/golang.org/x/tools/go/packages/doc.go | 220 -
.../x/tools/go/packages/external.go | 101 -
.../golang.org/x/tools/go/packages/golist.go | 1173 -
.../x/tools/go/packages/golist_overlay.go | 575 -
.../x/tools/go/packages/loadmode_string.go | 57 -
.../x/tools/go/packages/packages.go | 1273 -
.../golang.org/x/tools/go/packages/visit.go | 59 -
vendor/golang.org/x/tools/imports/forward.go | 77 -
.../x/tools/internal/event/core/event.go | 85 -
.../x/tools/internal/event/core/export.go | 70 -
.../x/tools/internal/event/core/fast.go | 77 -
.../golang.org/x/tools/internal/event/doc.go | 7 -
.../x/tools/internal/event/event.go | 127 -
.../x/tools/internal/event/keys/keys.go | 564 -
.../x/tools/internal/event/keys/standard.go | 22 -
.../x/tools/internal/event/label/label.go | 215 -
.../x/tools/internal/fastwalk/fastwalk.go | 196 -
.../fastwalk/fastwalk_dirent_fileno.go | 14 -
.../internal/fastwalk/fastwalk_dirent_ino.go | 15 -
.../fastwalk/fastwalk_dirent_namlen_bsd.go | 14 -
.../fastwalk/fastwalk_dirent_namlen_linux.go | 29 -
.../internal/fastwalk/fastwalk_portable.go | 38 -
.../tools/internal/fastwalk/fastwalk_unix.go | 153 -
.../x/tools/internal/gocommand/invoke.go | 283 -
.../x/tools/internal/gocommand/vendor.go | 109 -
.../x/tools/internal/gocommand/version.go | 51 -
.../x/tools/internal/gopathwalk/walk.go | 254 -
.../x/tools/internal/imports/fix.go | 1730 -
.../x/tools/internal/imports/imports.go | 351 -
.../x/tools/internal/imports/mod.go | 706 -
.../x/tools/internal/imports/mod_cache.go | 236 -
.../x/tools/internal/imports/sortimports.go | 296 -
.../x/tools/internal/imports/zstdlib.go | 10815 -
.../internal/packagesinternal/packages.go | 30 -
.../x/tools/internal/typeparams/common.go | 179 -
.../x/tools/internal/typeparams/coretype.go | 122 -
.../internal/typeparams/enabled_go117.go | 12 -
.../internal/typeparams/enabled_go118.go | 15 -
.../x/tools/internal/typeparams/normalize.go | 218 -
.../x/tools/internal/typeparams/termlist.go | 163 -
.../internal/typeparams/typeparams_go117.go | 197 -
.../internal/typeparams/typeparams_go118.go | 151 -
.../x/tools/internal/typeparams/typeterm.go | 170 -
.../tools/internal/typesinternal/errorcode.go | 1526 -
.../typesinternal/errorcode_string.go | 167 -
.../x/tools/internal/typesinternal/types.go | 52 -
.../tools/internal/typesinternal/types_118.go | 19 -
vendor/gopkg.in/guregu/null.v4/.gitignore | 2 -
vendor/gopkg.in/guregu/null.v4/LICENSE | 10 -
vendor/gopkg.in/guregu/null.v4/README.md | 75 -
vendor/gopkg.in/guregu/null.v4/bool.go | 130 -
vendor/gopkg.in/guregu/null.v4/float.go | 156 -
vendor/gopkg.in/guregu/null.v4/int.go | 144 -
vendor/gopkg.in/guregu/null.v4/string.go | 118 -
vendor/gopkg.in/guregu/null.v4/time.go | 140 -
vendor/gopkg.in/guregu/null.v4/zero/bool.go | 123 -
vendor/gopkg.in/guregu/null.v4/zero/float.go | 157 -
vendor/gopkg.in/guregu/null.v4/zero/int.go | 146 -
vendor/gopkg.in/guregu/null.v4/zero/string.go | 111 -
vendor/gopkg.in/guregu/null.v4/zero/time.go | 146 -
vendor/gopkg.in/ini.v1/.editorconfig | 12 -
vendor/gopkg.in/ini.v1/.gitignore | 7 -
vendor/gopkg.in/ini.v1/.golangci.yml | 21 -
vendor/gopkg.in/ini.v1/LICENSE | 191 -
vendor/gopkg.in/ini.v1/Makefile | 15 -
vendor/gopkg.in/ini.v1/README.md | 43 -
vendor/gopkg.in/ini.v1/codecov.yml | 9 -
vendor/gopkg.in/ini.v1/data_source.go | 76 -
vendor/gopkg.in/ini.v1/deprecated.go | 25 -
vendor/gopkg.in/ini.v1/error.go | 34 -
vendor/gopkg.in/ini.v1/file.go | 541 -
vendor/gopkg.in/ini.v1/helper.go | 24 -
vendor/gopkg.in/ini.v1/ini.go | 176 -
vendor/gopkg.in/ini.v1/key.go | 837 -
vendor/gopkg.in/ini.v1/parser.go | 513 -
vendor/gopkg.in/ini.v1/section.go | 256 -
vendor/gopkg.in/ini.v1/struct.go | 747 -
vendor/gopkg.in/sourcemap.v1/.travis.yml | 16 -
vendor/gopkg.in/sourcemap.v1/LICENSE | 25 -
vendor/gopkg.in/sourcemap.v1/Makefile | 4 -
vendor/gopkg.in/sourcemap.v1/README.md | 35 -
.../sourcemap.v1/base64vlq/base64_vlq.go | 92 -
vendor/gopkg.in/sourcemap.v1/consumer.go | 134 -
vendor/gopkg.in/sourcemap.v1/sourcemap.go | 157 -
vendor/gopkg.in/yaml.v2/.travis.yml | 17 -
vendor/gopkg.in/yaml.v2/LICENSE | 201 -
vendor/gopkg.in/yaml.v2/LICENSE.libyaml | 31 -
vendor/gopkg.in/yaml.v2/NOTICE | 13 -
vendor/gopkg.in/yaml.v2/README.md | 133 -
vendor/gopkg.in/yaml.v2/apic.go | 744 -
vendor/gopkg.in/yaml.v2/decode.go | 815 -
vendor/gopkg.in/yaml.v2/emitterc.go | 1685 -
vendor/gopkg.in/yaml.v2/encode.go | 390 -
vendor/gopkg.in/yaml.v2/parserc.go | 1095 -
vendor/gopkg.in/yaml.v2/readerc.go | 412 -
vendor/gopkg.in/yaml.v2/resolve.go | 258 -
vendor/gopkg.in/yaml.v2/scannerc.go | 2711 -
vendor/gopkg.in/yaml.v2/sorter.go | 113 -
vendor/gopkg.in/yaml.v2/writerc.go | 26 -
vendor/gopkg.in/yaml.v2/yaml.go | 478 -
vendor/gopkg.in/yaml.v2/yamlh.go | 739 -
vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 -
vendor/gopkg.in/yaml.v3/LICENSE | 50 -
vendor/gopkg.in/yaml.v3/NOTICE | 13 -
vendor/gopkg.in/yaml.v3/README.md | 150 -
vendor/gopkg.in/yaml.v3/apic.go | 747 -
vendor/gopkg.in/yaml.v3/decode.go | 1000 -
vendor/gopkg.in/yaml.v3/emitterc.go | 2020 -
vendor/gopkg.in/yaml.v3/encode.go | 577 -
vendor/gopkg.in/yaml.v3/parserc.go | 1258 -
vendor/gopkg.in/yaml.v3/readerc.go | 434 -
vendor/gopkg.in/yaml.v3/resolve.go | 326 -
vendor/gopkg.in/yaml.v3/scannerc.go | 3038 -
vendor/gopkg.in/yaml.v3/sorter.go | 134 -
vendor/gopkg.in/yaml.v3/writerc.go | 48 -
vendor/gopkg.in/yaml.v3/yaml.go | 698 -
vendor/gopkg.in/yaml.v3/yamlh.go | 807 -
vendor/gopkg.in/yaml.v3/yamlprivateh.go | 198 -
vendor/modules.txt | 521 -
2675 files changed, 20 insertions(+), 1259580 deletions(-)
delete mode 100644 vendor/github.com/99designs/gqlgen/.dockerignore
delete mode 100644 vendor/github.com/99designs/gqlgen/.editorconfig
delete mode 100644 vendor/github.com/99designs/gqlgen/.gitattributes
delete mode 100644 vendor/github.com/99designs/gqlgen/.gitignore
delete mode 100644 vendor/github.com/99designs/gqlgen/.golangci.yml
delete mode 100644 vendor/github.com/99designs/gqlgen/CHANGELOG.md
delete mode 100644 vendor/github.com/99designs/gqlgen/CONTRIBUTING.md
delete mode 100644 vendor/github.com/99designs/gqlgen/LICENSE
delete mode 100644 vendor/github.com/99designs/gqlgen/README.md
delete mode 100644 vendor/github.com/99designs/gqlgen/RELEASE-CHECKLIST.md
delete mode 100644 vendor/github.com/99designs/gqlgen/TESTING.md
delete mode 100644 vendor/github.com/99designs/gqlgen/api/generate.go
delete mode 100644 vendor/github.com/99designs/gqlgen/api/option.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/args.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/args.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/complexity.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/binder.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/config.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/exec.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/package.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/resolver.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/data.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/directive.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/field.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/field.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/generate.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/input.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/interface.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/interface.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/object.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/object.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/templates/import.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/templates/templates.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/type.go
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/type.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/codegen/util.go
delete mode 100644 vendor/github.com/99designs/gqlgen/complexity/complexity.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/any.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/bool.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/cache.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/coercion.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/context_field.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/context_operation.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/context_path.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/context_response.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/context_root_field.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/errcode/codes.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/error.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/executable_schema.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/executable_schema_mock.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/executor/extensions.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/fieldset.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/float.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/extension/apq.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/extension/complexity.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/extension/introspection.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/lru/lru.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/server.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/error.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/util.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_close_reason.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_init.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_subprotocol.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/id.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/int.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/introspection/query.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/introspection/schema.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/introspection/type.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/jsonw.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/map.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/oneshot.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/recovery.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/response.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/root.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/stats.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/string.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/time.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/uint.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/upload.go
delete mode 100644 vendor/github.com/99designs/gqlgen/graphql/version.go
delete mode 100644 vendor/github.com/99designs/gqlgen/init-templates/gqlgen.yml.gotmpl
delete mode 100644 vendor/github.com/99designs/gqlgen/init-templates/schema.graphqls
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/code/compare.go
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/code/imports.go
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/code/packages.go
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/code/util.go
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/imports/prune.go
delete mode 100644 vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go
delete mode 100644 vendor/github.com/99designs/gqlgen/main.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/federation/federation.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/federation/federation.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/federation/fieldset/fieldset.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/federation/readme.md
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/modelgen/models.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/plugin.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
delete mode 100644 vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl
delete mode 100644 vendor/github.com/99designs/gqlgen/tools.go
delete mode 100644 vendor/github.com/WithoutPants/sortorder/LICENSE
delete mode 100644 vendor/github.com/WithoutPants/sortorder/casefolded/README.md
delete mode 100644 vendor/github.com/WithoutPants/sortorder/casefolded/natsort.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/.gitignore
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/.golangci.yml
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/LICENSE
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/Makefile
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/README.md
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/TESTING.md
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/client/client.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/client.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/query.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/query_source.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/source.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/source_generator.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/template.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgen/template.gotpl
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/client.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/query.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/query_source.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/source.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/source_generator.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.gotpl
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/config/config.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/generator/generater.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/graphqljson/graphql.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/introspection/parse.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/introspection/query.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/introspection/type.go
delete mode 100644 vendor/github.com/Yamashou/gqlgenc/main.go
delete mode 100644 vendor/github.com/agnivade/levenshtein/.gitignore
delete mode 100644 vendor/github.com/agnivade/levenshtein/.travis.yml
delete mode 100644 vendor/github.com/agnivade/levenshtein/License.txt
delete mode 100644 vendor/github.com/agnivade/levenshtein/Makefile
delete mode 100644 vendor/github.com/agnivade/levenshtein/README.md
delete mode 100644 vendor/github.com/agnivade/levenshtein/levenshtein.go
delete mode 100644 vendor/github.com/anacrolix/dms/LICENSE
delete mode 100644 vendor/github.com/anacrolix/dms/dlna/dlna.go
delete mode 100644 vendor/github.com/anacrolix/dms/soap/soap.go
delete mode 100644 vendor/github.com/anacrolix/dms/ssdp/ssdp.go
delete mode 100644 vendor/github.com/anacrolix/dms/upnp/eventing.go
delete mode 100644 vendor/github.com/anacrolix/dms/upnp/upnp.go
delete mode 100644 vendor/github.com/anacrolix/dms/upnpav/upnpav.go
delete mode 100644 vendor/github.com/antchfx/htmlquery/.gitignore
delete mode 100644 vendor/github.com/antchfx/htmlquery/.travis.yml
delete mode 100644 vendor/github.com/antchfx/htmlquery/LICENSE
delete mode 100644 vendor/github.com/antchfx/htmlquery/README.md
delete mode 100644 vendor/github.com/antchfx/htmlquery/cache.go
delete mode 100644 vendor/github.com/antchfx/htmlquery/query.go
delete mode 100644 vendor/github.com/antchfx/xpath/.gitignore
delete mode 100644 vendor/github.com/antchfx/xpath/.travis.yml
delete mode 100644 vendor/github.com/antchfx/xpath/LICENSE
delete mode 100644 vendor/github.com/antchfx/xpath/README.md
delete mode 100644 vendor/github.com/antchfx/xpath/build.go
delete mode 100644 vendor/github.com/antchfx/xpath/cache.go
delete mode 100644 vendor/github.com/antchfx/xpath/func.go
delete mode 100644 vendor/github.com/antchfx/xpath/func_go110.go
delete mode 100644 vendor/github.com/antchfx/xpath/func_pre_go110.go
delete mode 100644 vendor/github.com/antchfx/xpath/operator.go
delete mode 100644 vendor/github.com/antchfx/xpath/parse.go
delete mode 100644 vendor/github.com/antchfx/xpath/query.go
delete mode 100644 vendor/github.com/antchfx/xpath/xpath.go
delete mode 100644 vendor/github.com/asticode/go-astikit/.travis.sh
delete mode 100644 vendor/github.com/asticode/go-astikit/.travis.yml
delete mode 100644 vendor/github.com/asticode/go-astikit/LICENSE
delete mode 100644 vendor/github.com/asticode/go-astikit/README.md
delete mode 100644 vendor/github.com/asticode/go-astikit/archive.go
delete mode 100644 vendor/github.com/asticode/go-astikit/astikit.go
delete mode 100644 vendor/github.com/asticode/go-astikit/binary.go
delete mode 100644 vendor/github.com/asticode/go-astikit/bytes.go
delete mode 100644 vendor/github.com/asticode/go-astikit/defer.go
delete mode 100644 vendor/github.com/asticode/go-astikit/errors.go
delete mode 100644 vendor/github.com/asticode/go-astikit/exec.go
delete mode 100644 vendor/github.com/asticode/go-astikit/flag.go
delete mode 100644 vendor/github.com/asticode/go-astikit/float.go
delete mode 100644 vendor/github.com/asticode/go-astikit/http.go
delete mode 100644 vendor/github.com/asticode/go-astikit/io.go
delete mode 100644 vendor/github.com/asticode/go-astikit/limiter.go
delete mode 100644 vendor/github.com/asticode/go-astikit/logger.go
delete mode 100644 vendor/github.com/asticode/go-astikit/map.go
delete mode 100644 vendor/github.com/asticode/go-astikit/os.go
delete mode 100644 vendor/github.com/asticode/go-astikit/os_js.go
delete mode 100644 vendor/github.com/asticode/go-astikit/os_others.go
delete mode 100644 vendor/github.com/asticode/go-astikit/pcm.go
delete mode 100644 vendor/github.com/asticode/go-astikit/ptr.go
delete mode 100644 vendor/github.com/asticode/go-astikit/rand.go
delete mode 100644 vendor/github.com/asticode/go-astikit/sort.go
delete mode 100644 vendor/github.com/asticode/go-astikit/ssh.go
delete mode 100644 vendor/github.com/asticode/go-astikit/stat.go
delete mode 100644 vendor/github.com/asticode/go-astikit/sync.go
delete mode 100644 vendor/github.com/asticode/go-astikit/template.go
delete mode 100644 vendor/github.com/asticode/go-astikit/time.go
delete mode 100644 vendor/github.com/asticode/go-astikit/translator.go
delete mode 100644 vendor/github.com/asticode/go-astikit/worker.go
delete mode 100644 vendor/github.com/asticode/go-astisub/.gitignore
delete mode 100644 vendor/github.com/asticode/go-astisub/.travis.yml
delete mode 100644 vendor/github.com/asticode/go-astisub/LICENSE
delete mode 100644 vendor/github.com/asticode/go-astisub/README.md
delete mode 100644 vendor/github.com/asticode/go-astisub/language.go
delete mode 100644 vendor/github.com/asticode/go-astisub/srt.go
delete mode 100644 vendor/github.com/asticode/go-astisub/ssa.go
delete mode 100644 vendor/github.com/asticode/go-astisub/stl.go
delete mode 100644 vendor/github.com/asticode/go-astisub/subtitles.go
delete mode 100644 vendor/github.com/asticode/go-astisub/teletext.go
delete mode 100644 vendor/github.com/asticode/go-astisub/ttml.go
delete mode 100644 vendor/github.com/asticode/go-astisub/webvtt.go
delete mode 100644 vendor/github.com/asticode/go-astits/.gitignore
delete mode 100644 vendor/github.com/asticode/go-astits/.travis.yml
delete mode 100644 vendor/github.com/asticode/go-astits/LICENSE
delete mode 100644 vendor/github.com/asticode/go-astits/README.md
delete mode 100644 vendor/github.com/asticode/go-astits/clock_reference.go
delete mode 100644 vendor/github.com/asticode/go-astits/crc32.go
delete mode 100644 vendor/github.com/asticode/go-astits/data.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_eit.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_nit.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_pat.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_pes.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_pmt.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_psi.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_sdt.go
delete mode 100644 vendor/github.com/asticode/go-astits/data_tot.go
delete mode 100644 vendor/github.com/asticode/go-astits/demuxer.go
delete mode 100644 vendor/github.com/asticode/go-astits/descriptor.go
delete mode 100644 vendor/github.com/asticode/go-astits/dvb.go
delete mode 100644 vendor/github.com/asticode/go-astits/muxer.go
delete mode 100644 vendor/github.com/asticode/go-astits/packet.go
delete mode 100644 vendor/github.com/asticode/go-astits/packet_buffer.go
delete mode 100644 vendor/github.com/asticode/go-astits/packet_pool.go
delete mode 100644 vendor/github.com/asticode/go-astits/program_map.go
delete mode 100644 vendor/github.com/asticode/go-astits/wrapping_counter.go
delete mode 100644 vendor/github.com/chromedp/cdproto/.gitignore
delete mode 100644 vendor/github.com/chromedp/cdproto/LICENSE
delete mode 100644 vendor/github.com/chromedp/cdproto/README.md
delete mode 100644 vendor/github.com/chromedp/cdproto/accessibility/accessibility.go
delete mode 100644 vendor/github.com/chromedp/cdproto/accessibility/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/accessibility/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/animation/animation.go
delete mode 100644 vendor/github.com/chromedp/cdproto/animation/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/animation/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/animation/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go
delete mode 100644 vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/applicationcache/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/applicationcache/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/audits/audits.go
delete mode 100644 vendor/github.com/chromedp/cdproto/audits/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/audits/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/audits/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go
delete mode 100644 vendor/github.com/chromedp/cdproto/backgroundservice/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/backgroundservice/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/backgroundservice/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/browser/browser.go
delete mode 100644 vendor/github.com/chromedp/cdproto/browser/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/browser/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/browser/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cachestorage/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cachestorage/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cast/cast.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cast/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cast/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cast/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cdp/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cdp/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/cdproto.go
delete mode 100644 vendor/github.com/chromedp/cdproto/css/css.go
delete mode 100644 vendor/github.com/chromedp/cdproto/css/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/css/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/css/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/database/database.go
delete mode 100644 vendor/github.com/chromedp/cdproto/database/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/database/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/database/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/debugger/debugger.go
delete mode 100644 vendor/github.com/chromedp/cdproto/debugger/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/debugger/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/debugger/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go
delete mode 100644 vendor/github.com/chromedp/cdproto/deviceorientation/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/dom/dom.go
delete mode 100644 vendor/github.com/chromedp/cdproto/dom/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/dom/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/dom/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domdebugger/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domdebugger/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domsnapshot/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domstorage/domstorage.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domstorage/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domstorage/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/domstorage/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/emulation/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/emulation/emulation.go
delete mode 100644 vendor/github.com/chromedp/cdproto/emulation/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/emulation/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/fetch/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/fetch/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/fetch/fetch.go
delete mode 100644 vendor/github.com/chromedp/cdproto/fetch/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go
delete mode 100644 vendor/github.com/chromedp/cdproto/headlessexperimental/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/heapprofiler/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go
delete mode 100644 vendor/github.com/chromedp/cdproto/heapprofiler/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go
delete mode 100644 vendor/github.com/chromedp/cdproto/indexeddb/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/input/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/input/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/input/input.go
delete mode 100644 vendor/github.com/chromedp/cdproto/input/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/inspector/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/inspector/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/inspector/inspector.go
delete mode 100644 vendor/github.com/chromedp/cdproto/inspector/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/io/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/io/io.go
delete mode 100644 vendor/github.com/chromedp/cdproto/io/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/layertree/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/layertree/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/layertree/layertree.go
delete mode 100644 vendor/github.com/chromedp/cdproto/layertree/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/log/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/log/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/log/log.go
delete mode 100644 vendor/github.com/chromedp/cdproto/log/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/media/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/media/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/media/media.go
delete mode 100644 vendor/github.com/chromedp/cdproto/media/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/memory/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/memory/memory.go
delete mode 100644 vendor/github.com/chromedp/cdproto/memory/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/network/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/network/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/network/network.go
delete mode 100644 vendor/github.com/chromedp/cdproto/network/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/overlay/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/overlay/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/overlay/overlay.go
delete mode 100644 vendor/github.com/chromedp/cdproto/overlay/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/page/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/page/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/page/page.go
delete mode 100644 vendor/github.com/chromedp/cdproto/page/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performance/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performance/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performance/performance.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performance/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performancetimeline/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performancetimeline/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go
delete mode 100644 vendor/github.com/chromedp/cdproto/performancetimeline/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/profiler/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/profiler/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/profiler/profiler.go
delete mode 100644 vendor/github.com/chromedp/cdproto/profiler/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/runtime/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/runtime/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/runtime/runtime.go
delete mode 100644 vendor/github.com/chromedp/cdproto/runtime/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/security/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/security/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/security/security.go
delete mode 100644 vendor/github.com/chromedp/cdproto/security/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/serviceworker/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/serviceworker/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/serviceworker/serviceworker.go
delete mode 100644 vendor/github.com/chromedp/cdproto/serviceworker/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/storage/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/storage/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/storage/storage.go
delete mode 100644 vendor/github.com/chromedp/cdproto/storage/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/systeminfo/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/systeminfo/systeminfo.go
delete mode 100644 vendor/github.com/chromedp/cdproto/systeminfo/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/target/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/target/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/target/target.go
delete mode 100644 vendor/github.com/chromedp/cdproto/target/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tethering/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tethering/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tethering/tethering.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tracing/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tracing/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tracing/tracing.go
delete mode 100644 vendor/github.com/chromedp/cdproto/tracing/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webaudio/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webaudio/events.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webaudio/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webaudio/webaudio.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webauthn/easyjson.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webauthn/types.go
delete mode 100644 vendor/github.com/chromedp/cdproto/webauthn/webauthn.go
delete mode 100644 vendor/github.com/chromedp/chromedp/.gitignore
delete mode 100644 vendor/github.com/chromedp/chromedp/LICENSE
delete mode 100644 vendor/github.com/chromedp/chromedp/README.md
delete mode 100644 vendor/github.com/chromedp/chromedp/allocate.go
delete mode 100644 vendor/github.com/chromedp/chromedp/allocate_linux.go
delete mode 100644 vendor/github.com/chromedp/chromedp/allocate_other.go
delete mode 100644 vendor/github.com/chromedp/chromedp/browser.go
delete mode 100644 vendor/github.com/chromedp/chromedp/chromedp.go
delete mode 100644 vendor/github.com/chromedp/chromedp/conn.go
delete mode 100644 vendor/github.com/chromedp/chromedp/device/device.go
delete mode 100644 vendor/github.com/chromedp/chromedp/device/types.go
delete mode 100644 vendor/github.com/chromedp/chromedp/emulate.go
delete mode 100644 vendor/github.com/chromedp/chromedp/errors.go
delete mode 100644 vendor/github.com/chromedp/chromedp/eval.go
delete mode 100644 vendor/github.com/chromedp/chromedp/input.go
delete mode 100644 vendor/github.com/chromedp/chromedp/js.go
delete mode 100644 vendor/github.com/chromedp/chromedp/kb/kb.go
delete mode 100644 vendor/github.com/chromedp/chromedp/kb/keys.go
delete mode 100644 vendor/github.com/chromedp/chromedp/nav.go
delete mode 100644 vendor/github.com/chromedp/chromedp/poll.go
delete mode 100644 vendor/github.com/chromedp/chromedp/query.go
delete mode 100644 vendor/github.com/chromedp/chromedp/target.go
delete mode 100644 vendor/github.com/chromedp/chromedp/util.go
delete mode 100644 vendor/github.com/chromedp/sysutil/.travis.yml
delete mode 100644 vendor/github.com/chromedp/sysutil/LICENSE
delete mode 100644 vendor/github.com/chromedp/sysutil/README.md
delete mode 100644 vendor/github.com/chromedp/sysutil/sysutil.go
delete mode 100644 vendor/github.com/chromedp/sysutil/sysutil_bsd.go
delete mode 100644 vendor/github.com/chromedp/sysutil/sysutil_linux.go
delete mode 100644 vendor/github.com/chromedp/sysutil/sysutil_other.go
delete mode 100644 vendor/github.com/chromedp/sysutil/sysutil_windows.go
delete mode 100644 vendor/github.com/chromedp/sysutil/timeval.go
delete mode 100644 vendor/github.com/chromedp/sysutil/timeval32.go
delete mode 100644 vendor/github.com/corona10/goimagehash/.gitignore
delete mode 100644 vendor/github.com/corona10/goimagehash/AUTHORS.md
delete mode 100644 vendor/github.com/corona10/goimagehash/CODEOWNERS
delete mode 100644 vendor/github.com/corona10/goimagehash/Gopkg.lock
delete mode 100644 vendor/github.com/corona10/goimagehash/Gopkg.toml
delete mode 100644 vendor/github.com/corona10/goimagehash/LICENSE
delete mode 100644 vendor/github.com/corona10/goimagehash/README.md
delete mode 100644 vendor/github.com/corona10/goimagehash/doc.go
delete mode 100644 vendor/github.com/corona10/goimagehash/etcs/doc.go
delete mode 100644 vendor/github.com/corona10/goimagehash/etcs/utils.go
delete mode 100644 vendor/github.com/corona10/goimagehash/hashcompute.go
delete mode 100644 vendor/github.com/corona10/goimagehash/imagehash.go
delete mode 100644 vendor/github.com/corona10/goimagehash/imagehash18.go
delete mode 100644 vendor/github.com/corona10/goimagehash/imagehash19.go
delete mode 100644 vendor/github.com/corona10/goimagehash/transforms/dct.go
delete mode 100644 vendor/github.com/corona10/goimagehash/transforms/doc.go
delete mode 100644 vendor/github.com/corona10/goimagehash/transforms/pixels.go
delete mode 100644 vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
delete mode 100644 vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
delete mode 100644 vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
delete mode 100644 vendor/github.com/davecgh/go-spew/LICENSE
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypass.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/common.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/config.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/doc.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dump.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/format.go
delete mode 100644 vendor/github.com/davecgh/go-spew/spew/spew.go
delete mode 100644 vendor/github.com/disintegration/imaging/.travis.yml
delete mode 100644 vendor/github.com/disintegration/imaging/LICENSE
delete mode 100644 vendor/github.com/disintegration/imaging/README.md
delete mode 100644 vendor/github.com/disintegration/imaging/adjust.go
delete mode 100644 vendor/github.com/disintegration/imaging/convolution.go
delete mode 100644 vendor/github.com/disintegration/imaging/doc.go
delete mode 100644 vendor/github.com/disintegration/imaging/effects.go
delete mode 100644 vendor/github.com/disintegration/imaging/histogram.go
delete mode 100644 vendor/github.com/disintegration/imaging/io.go
delete mode 100644 vendor/github.com/disintegration/imaging/resize.go
delete mode 100644 vendor/github.com/disintegration/imaging/scanner.go
delete mode 100644 vendor/github.com/disintegration/imaging/tools.go
delete mode 100644 vendor/github.com/disintegration/imaging/transform.go
delete mode 100644 vendor/github.com/disintegration/imaging/utils.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/.gitignore
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/.golangci.yml
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/CODE_OF_CONDUCT.md
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/CONTRIBUTING.md
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/HISTORY.md
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/LICENSE
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/Makefile
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/README.md
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/_config.yml
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/codecov.yml
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/database.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/delete_dataset.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/dialect/sqlite3/sqlite3.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/docker-compose.yml
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exec/query_executor.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exec/query_factory.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exec/scanner.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/alias.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/bitwise.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/bool.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/case.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/cast.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/col.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/compound.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/conflict.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/cte.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/delete_clauses.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/exp.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/exp_list.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/exp_map.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/func.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/ident.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/insert.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/insert_clauses.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/join.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/lateral.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/literal.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/lock.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/order.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/range.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/record.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/select_clauses.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/truncate.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/truncate_clauses.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/update.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/update_clauses.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/window.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/exp/window_func.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/expressions.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/go.test.sh
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/goqu.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/insert_dataset.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/errors/error.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/sb/sql_builder.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/tag/tags.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/util/column_map.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/util/reflect.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/internal/util/value_slice.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/prepared.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/select_dataset.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sql_dialect.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/common_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/delete_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/expression_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/insert_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/select_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/sql_dialect_options.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/sqlgen.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/truncate_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/sqlgen/update_sql_generator.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/truncate_dataset.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/update_dataset.go
delete mode 100644 vendor/github.com/doug-martin/goqu/v9/wait-for-it.sh
delete mode 100644 vendor/github.com/fsnotify/fsnotify/.editorconfig
delete mode 100644 vendor/github.com/fsnotify/fsnotify/.gitattributes
delete mode 100644 vendor/github.com/fsnotify/fsnotify/.gitignore
delete mode 100644 vendor/github.com/fsnotify/fsnotify/.mailmap
delete mode 100644 vendor/github.com/fsnotify/fsnotify/AUTHORS
delete mode 100644 vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
delete mode 100644 vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
delete mode 100644 vendor/github.com/fsnotify/fsnotify/LICENSE
delete mode 100644 vendor/github.com/fsnotify/fsnotify/README.md
delete mode 100644 vendor/github.com/fsnotify/fsnotify/fen.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/kqueue.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
delete mode 100644 vendor/github.com/fsnotify/fsnotify/windows.go
delete mode 100644 vendor/github.com/go-chi/chi/.gitignore
delete mode 100644 vendor/github.com/go-chi/chi/.travis.yml
delete mode 100644 vendor/github.com/go-chi/chi/CHANGELOG.md
delete mode 100644 vendor/github.com/go-chi/chi/CONTRIBUTING.md
delete mode 100644 vendor/github.com/go-chi/chi/LICENSE
delete mode 100644 vendor/github.com/go-chi/chi/README.md
delete mode 100644 vendor/github.com/go-chi/chi/chain.go
delete mode 100644 vendor/github.com/go-chi/chi/chi.go
delete mode 100644 vendor/github.com/go-chi/chi/context.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/compress.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/content_charset.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/content_type.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/get_head.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/heartbeat.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/logger.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/middleware.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/nocache.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/profiler.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/realip.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/recoverer.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/request_id.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/strip.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/terminal.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/throttle.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/timeout.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/url_format.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/value.go
delete mode 100644 vendor/github.com/go-chi/chi/middleware/wrap_writer.go
delete mode 100644 vendor/github.com/go-chi/chi/mux.go
delete mode 100644 vendor/github.com/go-chi/chi/tree.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/.gitignore
delete mode 100644 vendor/github.com/go-chi/chi/v5/CHANGELOG.md
delete mode 100644 vendor/github.com/go-chi/chi/v5/CONTRIBUTING.md
delete mode 100644 vendor/github.com/go-chi/chi/v5/LICENSE
delete mode 100644 vendor/github.com/go-chi/chi/v5/Makefile
delete mode 100644 vendor/github.com/go-chi/chi/v5/README.md
delete mode 100644 vendor/github.com/go-chi/chi/v5/chain.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/chi.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/context.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/basic_auth.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/clean_path.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/compress.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/content_charset.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/content_encoding.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/content_type.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/get_head.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/heartbeat.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/logger.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/middleware.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/nocache.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/profiler.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/realip.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/recoverer.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/request_id.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/route_headers.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/strip.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/terminal.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/throttle.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/timeout.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/url_format.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/value.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/mux.go
delete mode 100644 vendor/github.com/go-chi/chi/v5/tree.go
delete mode 100644 vendor/github.com/go-chi/cors/LICENSE
delete mode 100644 vendor/github.com/go-chi/cors/README.md
delete mode 100644 vendor/github.com/go-chi/cors/cors.go
delete mode 100644 vendor/github.com/go-chi/cors/utils.go
delete mode 100644 vendor/github.com/go-chi/httplog/LICENSE
delete mode 100644 vendor/github.com/go-chi/httplog/README.md
delete mode 100644 vendor/github.com/go-chi/httplog/config.go
delete mode 100644 vendor/github.com/go-chi/httplog/httplog.go
delete mode 100644 vendor/github.com/go-chi/httplog/util.go
delete mode 100644 vendor/github.com/go-toast/toast/.gitignore
delete mode 100644 vendor/github.com/go-toast/toast/LICENSE
delete mode 100644 vendor/github.com/go-toast/toast/readme.md
delete mode 100644 vendor/github.com/go-toast/toast/screenshot-action-centre.png
delete mode 100644 vendor/github.com/go-toast/toast/screenshot-cli.png
delete mode 100644 vendor/github.com/go-toast/toast/screenshot-toast.png
delete mode 100644 vendor/github.com/go-toast/toast/toast.go
delete mode 100644 vendor/github.com/gobwas/httphead/LICENSE
delete mode 100644 vendor/github.com/gobwas/httphead/README.md
delete mode 100644 vendor/github.com/gobwas/httphead/cookie.go
delete mode 100644 vendor/github.com/gobwas/httphead/head.go
delete mode 100644 vendor/github.com/gobwas/httphead/httphead.go
delete mode 100644 vendor/github.com/gobwas/httphead/lexer.go
delete mode 100644 vendor/github.com/gobwas/httphead/octet.go
delete mode 100644 vendor/github.com/gobwas/httphead/option.go
delete mode 100644 vendor/github.com/gobwas/httphead/writer.go
delete mode 100644 vendor/github.com/gobwas/pool/LICENSE
delete mode 100644 vendor/github.com/gobwas/pool/README.md
delete mode 100644 vendor/github.com/gobwas/pool/generic.go
delete mode 100644 vendor/github.com/gobwas/pool/internal/pmath/pmath.go
delete mode 100644 vendor/github.com/gobwas/pool/option.go
delete mode 100644 vendor/github.com/gobwas/pool/pbufio/pbufio.go
delete mode 100644 vendor/github.com/gobwas/pool/pbufio/pbufio_go110.go
delete mode 100644 vendor/github.com/gobwas/pool/pbufio/pbufio_go19.go
delete mode 100644 vendor/github.com/gobwas/pool/pbytes/pbytes.go
delete mode 100644 vendor/github.com/gobwas/pool/pbytes/pool.go
delete mode 100644 vendor/github.com/gobwas/pool/pbytes/pool_sanitize.go
delete mode 100644 vendor/github.com/gobwas/pool/pool.go
delete mode 100644 vendor/github.com/gobwas/ws/.gitignore
delete mode 100644 vendor/github.com/gobwas/ws/LICENSE
delete mode 100644 vendor/github.com/gobwas/ws/Makefile
delete mode 100644 vendor/github.com/gobwas/ws/README.md
delete mode 100644 vendor/github.com/gobwas/ws/check.go
delete mode 100644 vendor/github.com/gobwas/ws/cipher.go
delete mode 100644 vendor/github.com/gobwas/ws/dialer.go
delete mode 100644 vendor/github.com/gobwas/ws/dialer_tls_go17.go
delete mode 100644 vendor/github.com/gobwas/ws/dialer_tls_go18.go
delete mode 100644 vendor/github.com/gobwas/ws/doc.go
delete mode 100644 vendor/github.com/gobwas/ws/errors.go
delete mode 100644 vendor/github.com/gobwas/ws/frame.go
delete mode 100644 vendor/github.com/gobwas/ws/http.go
delete mode 100644 vendor/github.com/gobwas/ws/nonce.go
delete mode 100644 vendor/github.com/gobwas/ws/read.go
delete mode 100644 vendor/github.com/gobwas/ws/server.go
delete mode 100644 vendor/github.com/gobwas/ws/server_test.s
delete mode 100644 vendor/github.com/gobwas/ws/util.go
delete mode 100644 vendor/github.com/gobwas/ws/write.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/cipher.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/dialer.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/extenstion.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/handler.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/helper.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/reader.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/upgrader.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/utf8.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/writer.go
delete mode 100644 vendor/github.com/gobwas/ws/wsutil/wsutil.go
delete mode 100644 vendor/github.com/gofrs/uuid/.gitignore
delete mode 100644 vendor/github.com/gofrs/uuid/LICENSE
delete mode 100644 vendor/github.com/gofrs/uuid/README.md
delete mode 100644 vendor/github.com/gofrs/uuid/codec.go
delete mode 100644 vendor/github.com/gofrs/uuid/fuzz.go
delete mode 100644 vendor/github.com/gofrs/uuid/generator.go
delete mode 100644 vendor/github.com/gofrs/uuid/sql.go
delete mode 100644 vendor/github.com/gofrs/uuid/uuid.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/.gitignore
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/LICENSE
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/README.md
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/claims.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/doc.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ecdsa.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ed25519.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/errors.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/hmac.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/map_claims.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/none.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/parser.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/signing_method.go
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf
delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/token.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/.dockerignore
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/.gitignore
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/.golangci.yml
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/.goreleaser.yml
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/.travis.yml
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/CONTRIBUTING.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/Dockerfile
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/Dockerfile.circleci
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/Dockerfile.github-actions
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/FAQ.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/GETTING_STARTED.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/LICENSE
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/MIGRATIONS.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/Makefile
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/README.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/database/driver.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/database/error.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/database/sqlite3/README.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/database/sqlite3/sqlite3.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/database/util.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/docker-deploy.sh
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/internal/url/url.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/log.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/migrate.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/migration.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/driver.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/errors.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/file/README.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/file/file.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/file/file_go115.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/file/file_go116.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/httpfs/README.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/httpfs/driver.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/httpfs/partial_driver.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/README.md
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/doc.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/iofs.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.down.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.up.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/3_foobar.up.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.down.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.up.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/5_foobar.down.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.down.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.up.sql
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/migration.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/source/parse.go
delete mode 100644 vendor/github.com/golang-migrate/migrate/v4/util.go
delete mode 100644 vendor/github.com/golang/groupcache/LICENSE
delete mode 100644 vendor/github.com/golang/groupcache/lru/lru.go
delete mode 100644 vendor/github.com/gorilla/securecookie/.travis.yml
delete mode 100644 vendor/github.com/gorilla/securecookie/LICENSE
delete mode 100644 vendor/github.com/gorilla/securecookie/README.md
delete mode 100644 vendor/github.com/gorilla/securecookie/doc.go
delete mode 100644 vendor/github.com/gorilla/securecookie/fuzz.go
delete mode 100644 vendor/github.com/gorilla/securecookie/securecookie.go
delete mode 100644 vendor/github.com/gorilla/sessions/AUTHORS
delete mode 100644 vendor/github.com/gorilla/sessions/LICENSE
delete mode 100644 vendor/github.com/gorilla/sessions/README.md
delete mode 100644 vendor/github.com/gorilla/sessions/cookie.go
delete mode 100644 vendor/github.com/gorilla/sessions/cookie_go111.go
delete mode 100644 vendor/github.com/gorilla/sessions/doc.go
delete mode 100644 vendor/github.com/gorilla/sessions/lex.go
delete mode 100644 vendor/github.com/gorilla/sessions/options.go
delete mode 100644 vendor/github.com/gorilla/sessions/options_go111.go
delete mode 100644 vendor/github.com/gorilla/sessions/sessions.go
delete mode 100644 vendor/github.com/gorilla/sessions/store.go
delete mode 100644 vendor/github.com/gorilla/websocket/.gitignore
delete mode 100644 vendor/github.com/gorilla/websocket/AUTHORS
delete mode 100644 vendor/github.com/gorilla/websocket/LICENSE
delete mode 100644 vendor/github.com/gorilla/websocket/README.md
delete mode 100644 vendor/github.com/gorilla/websocket/client.go
delete mode 100644 vendor/github.com/gorilla/websocket/compression.go
delete mode 100644 vendor/github.com/gorilla/websocket/conn.go
delete mode 100644 vendor/github.com/gorilla/websocket/doc.go
delete mode 100644 vendor/github.com/gorilla/websocket/join.go
delete mode 100644 vendor/github.com/gorilla/websocket/json.go
delete mode 100644 vendor/github.com/gorilla/websocket/mask.go
delete mode 100644 vendor/github.com/gorilla/websocket/mask_safe.go
delete mode 100644 vendor/github.com/gorilla/websocket/prepared.go
delete mode 100644 vendor/github.com/gorilla/websocket/proxy.go
delete mode 100644 vendor/github.com/gorilla/websocket/server.go
delete mode 100644 vendor/github.com/gorilla/websocket/tls_handshake.go
delete mode 100644 vendor/github.com/gorilla/websocket/tls_handshake_116.go
delete mode 100644 vendor/github.com/gorilla/websocket/util.go
delete mode 100644 vendor/github.com/gorilla/websocket/x_net_proxy.go
delete mode 100644 vendor/github.com/hashicorp/errwrap/LICENSE
delete mode 100644 vendor/github.com/hashicorp/errwrap/README.md
delete mode 100644 vendor/github.com/hashicorp/errwrap/errwrap.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/.travis.yml
delete mode 100644 vendor/github.com/hashicorp/go-multierror/LICENSE
delete mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile
delete mode 100644 vendor/github.com/hashicorp/go-multierror/README.md
delete mode 100644 vendor/github.com/hashicorp/go-multierror/append.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/flatten.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/format.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/group.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/multierror.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/prefix.go
delete mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/.gitignore
delete mode 100644 vendor/github.com/hashicorp/golang-lru/2q.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/LICENSE
delete mode 100644 vendor/github.com/hashicorp/golang-lru/README.md
delete mode 100644 vendor/github.com/hashicorp/golang-lru/arc.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/doc.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/lru.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
delete mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
delete mode 100644 vendor/github.com/hashicorp/hcl/.gitignore
delete mode 100644 vendor/github.com/hashicorp/hcl/.travis.yml
delete mode 100644 vendor/github.com/hashicorp/hcl/LICENSE
delete mode 100644 vendor/github.com/hashicorp/hcl/Makefile
delete mode 100644 vendor/github.com/hashicorp/hcl/README.md
delete mode 100644 vendor/github.com/hashicorp/hcl/appveyor.yml
delete mode 100644 vendor/github.com/hashicorp/hcl/decoder.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/ast/ast.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/ast/walk.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/error.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/parser.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/printer/nodes.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/printer/printer.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/token/position.go
delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/token/token.go
delete mode 100644 vendor/github.com/hashicorp/hcl/json/parser/flatten.go
delete mode 100644 vendor/github.com/hashicorp/hcl/json/parser/parser.go
delete mode 100644 vendor/github.com/hashicorp/hcl/json/scanner/scanner.go
delete mode 100644 vendor/github.com/hashicorp/hcl/json/token/position.go
delete mode 100644 vendor/github.com/hashicorp/hcl/json/token/token.go
delete mode 100644 vendor/github.com/hashicorp/hcl/lex.go
delete mode 100644 vendor/github.com/hashicorp/hcl/parse.go
delete mode 100644 vendor/github.com/inconshreveable/mousetrap/LICENSE
delete mode 100644 vendor/github.com/inconshreveable/mousetrap/README.md
delete mode 100644 vendor/github.com/inconshreveable/mousetrap/trap_others.go
delete mode 100644 vendor/github.com/inconshreveable/mousetrap/trap_windows.go
delete mode 100644 vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
delete mode 100644 vendor/github.com/jinzhu/copier/Guardfile
delete mode 100644 vendor/github.com/jinzhu/copier/License
delete mode 100644 vendor/github.com/jinzhu/copier/README.md
delete mode 100644 vendor/github.com/jinzhu/copier/copier.go
delete mode 100644 vendor/github.com/jinzhu/copier/wercker.yml
delete mode 100644 vendor/github.com/jmoiron/sqlx/.gitignore
delete mode 100644 vendor/github.com/jmoiron/sqlx/.travis.yml
delete mode 100644 vendor/github.com/jmoiron/sqlx/LICENSE
delete mode 100644 vendor/github.com/jmoiron/sqlx/README.md
delete mode 100644 vendor/github.com/jmoiron/sqlx/bind.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/doc.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/named.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/named_context.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/README.md
delete mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/reflect.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx.go
delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx_context.go
delete mode 100644 vendor/github.com/josharian/intern/README.md
delete mode 100644 vendor/github.com/josharian/intern/intern.go
delete mode 100644 vendor/github.com/josharian/intern/license.md
delete mode 100644 vendor/github.com/json-iterator/go/.codecov.yml
delete mode 100644 vendor/github.com/json-iterator/go/.gitignore
delete mode 100644 vendor/github.com/json-iterator/go/.travis.yml
delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.lock
delete mode 100644 vendor/github.com/json-iterator/go/Gopkg.toml
delete mode 100644 vendor/github.com/json-iterator/go/LICENSE
delete mode 100644 vendor/github.com/json-iterator/go/README.md
delete mode 100644 vendor/github.com/json-iterator/go/adapter.go
delete mode 100644 vendor/github.com/json-iterator/go/any.go
delete mode 100644 vendor/github.com/json-iterator/go/any_array.go
delete mode 100644 vendor/github.com/json-iterator/go/any_bool.go
delete mode 100644 vendor/github.com/json-iterator/go/any_float.go
delete mode 100644 vendor/github.com/json-iterator/go/any_int32.go
delete mode 100644 vendor/github.com/json-iterator/go/any_int64.go
delete mode 100644 vendor/github.com/json-iterator/go/any_invalid.go
delete mode 100644 vendor/github.com/json-iterator/go/any_nil.go
delete mode 100644 vendor/github.com/json-iterator/go/any_number.go
delete mode 100644 vendor/github.com/json-iterator/go/any_object.go
delete mode 100644 vendor/github.com/json-iterator/go/any_str.go
delete mode 100644 vendor/github.com/json-iterator/go/any_uint32.go
delete mode 100644 vendor/github.com/json-iterator/go/any_uint64.go
delete mode 100644 vendor/github.com/json-iterator/go/build.sh
delete mode 100644 vendor/github.com/json-iterator/go/config.go
delete mode 100644 vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md
delete mode 100644 vendor/github.com/json-iterator/go/iter.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_array.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_float.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_int.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_object.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_skip.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_skip_sloppy.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_skip_strict.go
delete mode 100644 vendor/github.com/json-iterator/go/iter_str.go
delete mode 100644 vendor/github.com/json-iterator/go/jsoniter.go
delete mode 100644 vendor/github.com/json-iterator/go/pool.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_array.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_dynamic.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_extension.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_json_number.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_json_raw_message.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_map.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_marshaler.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_native.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_optional.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_slice.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_struct_decoder.go
delete mode 100644 vendor/github.com/json-iterator/go/reflect_struct_encoder.go
delete mode 100644 vendor/github.com/json-iterator/go/stream.go
delete mode 100644 vendor/github.com/json-iterator/go/stream_float.go
delete mode 100644 vendor/github.com/json-iterator/go/stream_int.go
delete mode 100644 vendor/github.com/json-iterator/go/stream_str.go
delete mode 100644 vendor/github.com/json-iterator/go/test.sh
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/LICENSE-MIT
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/README.md
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/example.png
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/gopher.png
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/gosx-notifier.go
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/terminal-app-binary.go
delete mode 100644 vendor/github.com/kermieisinthehouse/gosx-notifier/terminal-app-zip.go
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/.gitignore
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/CHANGELOG.md
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/LICENSE
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/Makefile
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/README.md
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray.go
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray.h
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_darwin.go
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_darwin.m
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_linux.c
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_linux.go
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_nonwindows.go
delete mode 100644 vendor/github.com/kermieisinthehouse/systray/systray_windows.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/.gitignore
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/CHANGELOG.md
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/LICENSE
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/README.md
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/colorgens.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/colors.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/happy_palettegen.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/hexcolor.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/hsluv-snapshot-rev4.json
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/hsluv.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/soft_palettegen.go
delete mode 100644 vendor/github.com/lucasb-eyer/go-colorful/warm_palettegen.go
delete mode 100644 vendor/github.com/magiconair/properties/.gitignore
delete mode 100644 vendor/github.com/magiconair/properties/.travis.yml
delete mode 100644 vendor/github.com/magiconair/properties/CHANGELOG.md
delete mode 100644 vendor/github.com/magiconair/properties/LICENSE.md
delete mode 100644 vendor/github.com/magiconair/properties/README.md
delete mode 100644 vendor/github.com/magiconair/properties/decode.go
delete mode 100644 vendor/github.com/magiconair/properties/doc.go
delete mode 100644 vendor/github.com/magiconair/properties/integrate.go
delete mode 100644 vendor/github.com/magiconair/properties/lex.go
delete mode 100644 vendor/github.com/magiconair/properties/load.go
delete mode 100644 vendor/github.com/magiconair/properties/parser.go
delete mode 100644 vendor/github.com/magiconair/properties/properties.go
delete mode 100644 vendor/github.com/magiconair/properties/rangecheck.go
delete mode 100644 vendor/github.com/mailru/easyjson/.gitignore
delete mode 100644 vendor/github.com/mailru/easyjson/.travis.yml
delete mode 100644 vendor/github.com/mailru/easyjson/LICENSE
delete mode 100644 vendor/github.com/mailru/easyjson/Makefile
delete mode 100644 vendor/github.com/mailru/easyjson/README.md
delete mode 100644 vendor/github.com/mailru/easyjson/buffer/pool.go
delete mode 100644 vendor/github.com/mailru/easyjson/helpers.go
delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/bytestostr.go
delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go
delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/error.go
delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/lexer.go
delete mode 100644 vendor/github.com/mailru/easyjson/jwriter/writer.go
delete mode 100644 vendor/github.com/mailru/easyjson/raw.go
delete mode 100644 vendor/github.com/mailru/easyjson/unknown_fields.go
delete mode 100644 vendor/github.com/matryer/moq/.gitignore
delete mode 100644 vendor/github.com/matryer/moq/.goreleaser.yml
delete mode 100644 vendor/github.com/matryer/moq/LICENSE
delete mode 100644 vendor/github.com/matryer/moq/README.md
delete mode 100644 vendor/github.com/matryer/moq/internal/registry/method_scope.go
delete mode 100644 vendor/github.com/matryer/moq/internal/registry/package.go
delete mode 100644 vendor/github.com/matryer/moq/internal/registry/registry.go
delete mode 100644 vendor/github.com/matryer/moq/internal/registry/var.go
delete mode 100644 vendor/github.com/matryer/moq/internal/template/template.go
delete mode 100644 vendor/github.com/matryer/moq/internal/template/template_data.go
delete mode 100644 vendor/github.com/matryer/moq/main.go
delete mode 100644 vendor/github.com/matryer/moq/moq-logo-small.png
delete mode 100644 vendor/github.com/matryer/moq/moq-logo.png
delete mode 100644 vendor/github.com/matryer/moq/pkg/moq/formatter.go
delete mode 100644 vendor/github.com/matryer/moq/pkg/moq/moq.go
delete mode 100644 vendor/github.com/matryer/moq/preview.png
delete mode 100644 vendor/github.com/matryer/moq/releasing.md
delete mode 100644 vendor/github.com/mattn/go-sqlite3/.codecov.yml
delete mode 100644 vendor/github.com/mattn/go-sqlite3/.gitignore
delete mode 100644 vendor/github.com/mattn/go-sqlite3/LICENSE
delete mode 100644 vendor/github.com/mattn/go-sqlite3/README.md
delete mode 100644 vendor/github.com/mattn/go-sqlite3/backup.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/callback.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/convert.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/doc.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/error.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_context.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_func_crypt.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_libsqlite3.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension_omit.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_allow_uri_authority.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_app_armor.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_column_metadata.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_foreign_keys.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_fts5.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_icu.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_introspect.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_json1.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate_hook.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate_omit.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete_fast.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_stat4.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth_omit.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_full.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_incr.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vtable.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_other.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_solaris.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_trace.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_type.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_usleep_windows.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3_windows.go
delete mode 100644 vendor/github.com/mattn/go-sqlite3/sqlite3ext.h
delete mode 100644 vendor/github.com/mattn/go-sqlite3/static_mock.go
delete mode 100644 vendor/github.com/mitchellh/go-homedir/LICENSE
delete mode 100644 vendor/github.com/mitchellh/go-homedir/README.md
delete mode 100644 vendor/github.com/mitchellh/go-homedir/homedir.go
delete mode 100644 vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
delete mode 100644 vendor/github.com/mitchellh/mapstructure/LICENSE
delete mode 100644 vendor/github.com/mitchellh/mapstructure/README.md
delete mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks.go
delete mode 100644 vendor/github.com/mitchellh/mapstructure/error.go
delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure.go
delete mode 100644 vendor/github.com/modern-go/concurrent/.gitignore
delete mode 100644 vendor/github.com/modern-go/concurrent/.travis.yml
delete mode 100644 vendor/github.com/modern-go/concurrent/LICENSE
delete mode 100644 vendor/github.com/modern-go/concurrent/README.md
delete mode 100644 vendor/github.com/modern-go/concurrent/executor.go
delete mode 100644 vendor/github.com/modern-go/concurrent/go_above_19.go
delete mode 100644 vendor/github.com/modern-go/concurrent/go_below_19.go
delete mode 100644 vendor/github.com/modern-go/concurrent/log.go
delete mode 100644 vendor/github.com/modern-go/concurrent/test.sh
delete mode 100644 vendor/github.com/modern-go/concurrent/unbounded_executor.go
delete mode 100644 vendor/github.com/modern-go/reflect2/.gitignore
delete mode 100644 vendor/github.com/modern-go/reflect2/.travis.yml
delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.lock
delete mode 100644 vendor/github.com/modern-go/reflect2/Gopkg.toml
delete mode 100644 vendor/github.com/modern-go/reflect2/LICENSE
delete mode 100644 vendor/github.com/modern-go/reflect2/README.md
delete mode 100644 vendor/github.com/modern-go/reflect2/go_above_118.go
delete mode 100644 vendor/github.com/modern-go/reflect2/go_above_19.go
delete mode 100644 vendor/github.com/modern-go/reflect2/go_below_118.go
delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2.go
delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2_amd64.s
delete mode 100644 vendor/github.com/modern-go/reflect2/reflect2_kind.go
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_386.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_arm.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_arm64.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_mips64x.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_mipsx.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s
delete mode 100644 vendor/github.com/modern-go/reflect2/relfect2_s390x.s
delete mode 100644 vendor/github.com/modern-go/reflect2/safe_field.go
delete mode 100644 vendor/github.com/modern-go/reflect2/safe_map.go
delete mode 100644 vendor/github.com/modern-go/reflect2/safe_slice.go
delete mode 100644 vendor/github.com/modern-go/reflect2/safe_struct.go
delete mode 100644 vendor/github.com/modern-go/reflect2/safe_type.go
delete mode 100644 vendor/github.com/modern-go/reflect2/type_map.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_array.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_eface.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_field.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_iface.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_link.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_map.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_ptr.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_slice.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_struct.go
delete mode 100644 vendor/github.com/modern-go/reflect2/unsafe_type.go
delete mode 100644 vendor/github.com/natefinch/pie/.gitignore
delete mode 100644 vendor/github.com/natefinch/pie/LICENSE
delete mode 100644 vendor/github.com/natefinch/pie/README.md
delete mode 100644 vendor/github.com/natefinch/pie/doc.go
delete mode 100644 vendor/github.com/natefinch/pie/pie.go
delete mode 100644 vendor/github.com/nfnt/resize/.travis.yml
delete mode 100644 vendor/github.com/nfnt/resize/LICENSE
delete mode 100644 vendor/github.com/nfnt/resize/README.md
delete mode 100644 vendor/github.com/nfnt/resize/converter.go
delete mode 100644 vendor/github.com/nfnt/resize/filters.go
delete mode 100644 vendor/github.com/nfnt/resize/nearest.go
delete mode 100644 vendor/github.com/nfnt/resize/resize.go
delete mode 100644 vendor/github.com/nfnt/resize/thumbnail.go
delete mode 100644 vendor/github.com/nfnt/resize/ycc.go
delete mode 100644 vendor/github.com/nu7hatch/gouuid/.gitignore
delete mode 100644 vendor/github.com/nu7hatch/gouuid/COPYING
delete mode 100644 vendor/github.com/nu7hatch/gouuid/README.md
delete mode 100644 vendor/github.com/nu7hatch/gouuid/uuid.go
delete mode 100644 vendor/github.com/pelletier/go-toml/.dockerignore
delete mode 100644 vendor/github.com/pelletier/go-toml/.gitignore
delete mode 100644 vendor/github.com/pelletier/go-toml/CONTRIBUTING.md
delete mode 100644 vendor/github.com/pelletier/go-toml/Dockerfile
delete mode 100644 vendor/github.com/pelletier/go-toml/LICENSE
delete mode 100644 vendor/github.com/pelletier/go-toml/Makefile
delete mode 100644 vendor/github.com/pelletier/go-toml/PULL_REQUEST_TEMPLATE.md
delete mode 100644 vendor/github.com/pelletier/go-toml/README.md
delete mode 100644 vendor/github.com/pelletier/go-toml/azure-pipelines.yml
delete mode 100644 vendor/github.com/pelletier/go-toml/benchmark.sh
delete mode 100644 vendor/github.com/pelletier/go-toml/doc.go
delete mode 100644 vendor/github.com/pelletier/go-toml/example-crlf.toml
delete mode 100644 vendor/github.com/pelletier/go-toml/example.toml
delete mode 100644 vendor/github.com/pelletier/go-toml/fuzz.go
delete mode 100644 vendor/github.com/pelletier/go-toml/fuzz.sh
delete mode 100644 vendor/github.com/pelletier/go-toml/keysparsing.go
delete mode 100644 vendor/github.com/pelletier/go-toml/lexer.go
delete mode 100644 vendor/github.com/pelletier/go-toml/localtime.go
delete mode 100644 vendor/github.com/pelletier/go-toml/marshal.go
delete mode 100644 vendor/github.com/pelletier/go-toml/marshal_OrderPreserve_test.toml
delete mode 100644 vendor/github.com/pelletier/go-toml/marshal_test.toml
delete mode 100644 vendor/github.com/pelletier/go-toml/parser.go
delete mode 100644 vendor/github.com/pelletier/go-toml/position.go
delete mode 100644 vendor/github.com/pelletier/go-toml/token.go
delete mode 100644 vendor/github.com/pelletier/go-toml/toml.go
delete mode 100644 vendor/github.com/pelletier/go-toml/tomlpub.go
delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_create.go
delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_write.go
delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_writepub.go
delete mode 100644 vendor/github.com/pkg/browser/LICENSE
delete mode 100644 vendor/github.com/pkg/browser/README.md
delete mode 100644 vendor/github.com/pkg/browser/browser.go
delete mode 100644 vendor/github.com/pkg/browser/browser_darwin.go
delete mode 100644 vendor/github.com/pkg/browser/browser_freebsd.go
delete mode 100644 vendor/github.com/pkg/browser/browser_linux.go
delete mode 100644 vendor/github.com/pkg/browser/browser_netbsd.go
delete mode 100644 vendor/github.com/pkg/browser/browser_openbsd.go
delete mode 100644 vendor/github.com/pkg/browser/browser_unsupported.go
delete mode 100644 vendor/github.com/pkg/browser/browser_windows.go
delete mode 100644 vendor/github.com/pkg/errors/.gitignore
delete mode 100644 vendor/github.com/pkg/errors/.travis.yml
delete mode 100644 vendor/github.com/pkg/errors/LICENSE
delete mode 100644 vendor/github.com/pkg/errors/Makefile
delete mode 100644 vendor/github.com/pkg/errors/README.md
delete mode 100644 vendor/github.com/pkg/errors/appveyor.yml
delete mode 100644 vendor/github.com/pkg/errors/errors.go
delete mode 100644 vendor/github.com/pkg/errors/go113.go
delete mode 100644 vendor/github.com/pkg/errors/stack.go
delete mode 100644 vendor/github.com/pmezard/go-difflib/LICENSE
delete mode 100644 vendor/github.com/pmezard/go-difflib/difflib/difflib.go
delete mode 100644 vendor/github.com/remeh/sizedwaitgroup/LICENSE
delete mode 100644 vendor/github.com/remeh/sizedwaitgroup/README.md
delete mode 100644 vendor/github.com/remeh/sizedwaitgroup/sizedwaitgroup.go
delete mode 100644 vendor/github.com/robertkrimen/otto/.gitignore
delete mode 100644 vendor/github.com/robertkrimen/otto/DESIGN.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/LICENSE
delete mode 100644 vendor/github.com/robertkrimen/otto/Makefile
delete mode 100644 vendor/github.com/robertkrimen/otto/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/ast/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/ast/comments.go
delete mode 100644 vendor/github.com/robertkrimen/otto/ast/node.go
delete mode 100644 vendor/github.com/robertkrimen/otto/ast/walk.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_array.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_boolean.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_date.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_error.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_function.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_json.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_math.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_number.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_object.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_regexp.go
delete mode 100644 vendor/github.com/robertkrimen/otto/builtin_string.go
delete mode 100644 vendor/github.com/robertkrimen/otto/clone.go
delete mode 100644 vendor/github.com/robertkrimen/otto/cmpl.go
delete mode 100644 vendor/github.com/robertkrimen/otto/cmpl_evaluate.go
delete mode 100644 vendor/github.com/robertkrimen/otto/cmpl_evaluate_expression.go
delete mode 100644 vendor/github.com/robertkrimen/otto/cmpl_evaluate_statement.go
delete mode 100644 vendor/github.com/robertkrimen/otto/cmpl_parse.go
delete mode 100644 vendor/github.com/robertkrimen/otto/console.go
delete mode 100644 vendor/github.com/robertkrimen/otto/dbg.go
delete mode 100644 vendor/github.com/robertkrimen/otto/dbg/dbg.go
delete mode 100644 vendor/github.com/robertkrimen/otto/error.go
delete mode 100644 vendor/github.com/robertkrimen/otto/evaluate.go
delete mode 100644 vendor/github.com/robertkrimen/otto/file/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/file/file.go
delete mode 100644 vendor/github.com/robertkrimen/otto/global.go
delete mode 100644 vendor/github.com/robertkrimen/otto/inline.go
delete mode 100644 vendor/github.com/robertkrimen/otto/inline.pl
delete mode 100644 vendor/github.com/robertkrimen/otto/object.go
delete mode 100644 vendor/github.com/robertkrimen/otto/object_class.go
delete mode 100644 vendor/github.com/robertkrimen/otto/otto.go
delete mode 100644 vendor/github.com/robertkrimen/otto/otto_.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/Makefile
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/dbg.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/error.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/expression.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/lexer.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/parser.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/regexp.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/scope.go
delete mode 100644 vendor/github.com/robertkrimen/otto/parser/statement.go
delete mode 100644 vendor/github.com/robertkrimen/otto/property.go
delete mode 100644 vendor/github.com/robertkrimen/otto/registry/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/registry/registry.go
delete mode 100644 vendor/github.com/robertkrimen/otto/result.go
delete mode 100644 vendor/github.com/robertkrimen/otto/runtime.go
delete mode 100644 vendor/github.com/robertkrimen/otto/scope.go
delete mode 100644 vendor/github.com/robertkrimen/otto/script.go
delete mode 100644 vendor/github.com/robertkrimen/otto/stash.go
delete mode 100644 vendor/github.com/robertkrimen/otto/token/Makefile
delete mode 100644 vendor/github.com/robertkrimen/otto/token/README.markdown
delete mode 100644 vendor/github.com/robertkrimen/otto/token/token.go
delete mode 100644 vendor/github.com/robertkrimen/otto/token/token_const.go
delete mode 100644 vendor/github.com/robertkrimen/otto/token/tokenfmt
delete mode 100644 vendor/github.com/robertkrimen/otto/type_arguments.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_array.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_boolean.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_date.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_error.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_function.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_go_array.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_go_map.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_go_slice.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_go_struct.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_number.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_reference.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_regexp.go
delete mode 100644 vendor/github.com/robertkrimen/otto/type_string.go
delete mode 100644 vendor/github.com/robertkrimen/otto/value.go
delete mode 100644 vendor/github.com/robertkrimen/otto/value_boolean.go
delete mode 100644 vendor/github.com/robertkrimen/otto/value_number.go
delete mode 100644 vendor/github.com/robertkrimen/otto/value_primitive.go
delete mode 100644 vendor/github.com/robertkrimen/otto/value_string.go
delete mode 100644 vendor/github.com/rs/zerolog/.gitignore
delete mode 100644 vendor/github.com/rs/zerolog/CNAME
delete mode 100644 vendor/github.com/rs/zerolog/LICENSE
delete mode 100644 vendor/github.com/rs/zerolog/README.md
delete mode 100644 vendor/github.com/rs/zerolog/_config.yml
delete mode 100644 vendor/github.com/rs/zerolog/array.go
delete mode 100644 vendor/github.com/rs/zerolog/console.go
delete mode 100644 vendor/github.com/rs/zerolog/context.go
delete mode 100644 vendor/github.com/rs/zerolog/ctx.go
delete mode 100644 vendor/github.com/rs/zerolog/encoder.go
delete mode 100644 vendor/github.com/rs/zerolog/encoder_cbor.go
delete mode 100644 vendor/github.com/rs/zerolog/encoder_json.go
delete mode 100644 vendor/github.com/rs/zerolog/event.go
delete mode 100644 vendor/github.com/rs/zerolog/fields.go
delete mode 100644 vendor/github.com/rs/zerolog/globals.go
delete mode 100644 vendor/github.com/rs/zerolog/go112.go
delete mode 100644 vendor/github.com/rs/zerolog/hook.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/README.md
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/base.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/cbor.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/decode_stream.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/string.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/time.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/cbor/types.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/json/base.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/json/bytes.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/json/string.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/json/time.go
delete mode 100644 vendor/github.com/rs/zerolog/internal/json/types.go
delete mode 100644 vendor/github.com/rs/zerolog/log.go
delete mode 100644 vendor/github.com/rs/zerolog/log/log.go
delete mode 100644 vendor/github.com/rs/zerolog/not_go112.go
delete mode 100644 vendor/github.com/rs/zerolog/pretty.png
delete mode 100644 vendor/github.com/rs/zerolog/sampler.go
delete mode 100644 vendor/github.com/rs/zerolog/syslog.go
delete mode 100644 vendor/github.com/rs/zerolog/writer.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/.gitignore
delete mode 100644 vendor/github.com/russross/blackfriday/v2/.travis.yml
delete mode 100644 vendor/github.com/russross/blackfriday/v2/LICENSE.txt
delete mode 100644 vendor/github.com/russross/blackfriday/v2/README.md
delete mode 100644 vendor/github.com/russross/blackfriday/v2/block.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/doc.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/entities.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/esc.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/html.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/inline.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/markdown.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/node.go
delete mode 100644 vendor/github.com/russross/blackfriday/v2/smartypants.go
delete mode 100644 vendor/github.com/shurcooL/graphql/.travis.yml
delete mode 100644 vendor/github.com/shurcooL/graphql/LICENSE
delete mode 100644 vendor/github.com/shurcooL/graphql/README.md
delete mode 100644 vendor/github.com/shurcooL/graphql/doc.go
delete mode 100644 vendor/github.com/shurcooL/graphql/graphql.go
delete mode 100644 vendor/github.com/shurcooL/graphql/ident/ident.go
delete mode 100644 vendor/github.com/shurcooL/graphql/internal/jsonutil/graphql.go
delete mode 100644 vendor/github.com/shurcooL/graphql/query.go
delete mode 100644 vendor/github.com/shurcooL/graphql/scalar.go
delete mode 100644 vendor/github.com/sirupsen/logrus/.gitignore
delete mode 100644 vendor/github.com/sirupsen/logrus/.golangci.yml
delete mode 100644 vendor/github.com/sirupsen/logrus/.travis.yml
delete mode 100644 vendor/github.com/sirupsen/logrus/CHANGELOG.md
delete mode 100644 vendor/github.com/sirupsen/logrus/LICENSE
delete mode 100644 vendor/github.com/sirupsen/logrus/README.md
delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit.go
delete mode 100644 vendor/github.com/sirupsen/logrus/appveyor.yml
delete mode 100644 vendor/github.com/sirupsen/logrus/buffer_pool.go
delete mode 100644 vendor/github.com/sirupsen/logrus/doc.go
delete mode 100644 vendor/github.com/sirupsen/logrus/entry.go
delete mode 100644 vendor/github.com/sirupsen/logrus/exported.go
delete mode 100644 vendor/github.com/sirupsen/logrus/formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/hooks.go
delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logger.go
delete mode 100644 vendor/github.com/sirupsen/logrus/logrus.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_appengine.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_bsd.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_js.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_solaris.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_unix.go
delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_windows.go
delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter.go
delete mode 100644 vendor/github.com/sirupsen/logrus/writer.go
delete mode 100644 vendor/github.com/spf13/afero/.gitignore
delete mode 100644 vendor/github.com/spf13/afero/.travis.yml
delete mode 100644 vendor/github.com/spf13/afero/LICENSE.txt
delete mode 100644 vendor/github.com/spf13/afero/README.md
delete mode 100644 vendor/github.com/spf13/afero/afero.go
delete mode 100644 vendor/github.com/spf13/afero/appveyor.yml
delete mode 100644 vendor/github.com/spf13/afero/basepath.go
delete mode 100644 vendor/github.com/spf13/afero/cacheOnReadFs.go
delete mode 100644 vendor/github.com/spf13/afero/const_bsds.go
delete mode 100644 vendor/github.com/spf13/afero/const_win_unix.go
delete mode 100644 vendor/github.com/spf13/afero/copyOnWriteFs.go
delete mode 100644 vendor/github.com/spf13/afero/httpFs.go
delete mode 100644 vendor/github.com/spf13/afero/iofs.go
delete mode 100644 vendor/github.com/spf13/afero/ioutil.go
delete mode 100644 vendor/github.com/spf13/afero/lstater.go
delete mode 100644 vendor/github.com/spf13/afero/match.go
delete mode 100644 vendor/github.com/spf13/afero/mem/dir.go
delete mode 100644 vendor/github.com/spf13/afero/mem/dirmap.go
delete mode 100644 vendor/github.com/spf13/afero/mem/file.go
delete mode 100644 vendor/github.com/spf13/afero/memmap.go
delete mode 100644 vendor/github.com/spf13/afero/os.go
delete mode 100644 vendor/github.com/spf13/afero/path.go
delete mode 100644 vendor/github.com/spf13/afero/readonlyfs.go
delete mode 100644 vendor/github.com/spf13/afero/regexpfs.go
delete mode 100644 vendor/github.com/spf13/afero/symlink.go
delete mode 100644 vendor/github.com/spf13/afero/unionFile.go
delete mode 100644 vendor/github.com/spf13/afero/util.go
delete mode 100644 vendor/github.com/spf13/cast/.gitignore
delete mode 100644 vendor/github.com/spf13/cast/LICENSE
delete mode 100644 vendor/github.com/spf13/cast/Makefile
delete mode 100644 vendor/github.com/spf13/cast/README.md
delete mode 100644 vendor/github.com/spf13/cast/cast.go
delete mode 100644 vendor/github.com/spf13/cast/caste.go
delete mode 100644 vendor/github.com/spf13/cast/timeformattype_string.go
delete mode 100644 vendor/github.com/spf13/cobra/.gitignore
delete mode 100644 vendor/github.com/spf13/cobra/.golangci.yml
delete mode 100644 vendor/github.com/spf13/cobra/.mailmap
delete mode 100644 vendor/github.com/spf13/cobra/CHANGELOG.md
delete mode 100644 vendor/github.com/spf13/cobra/CONDUCT.md
delete mode 100644 vendor/github.com/spf13/cobra/CONTRIBUTING.md
delete mode 100644 vendor/github.com/spf13/cobra/LICENSE.txt
delete mode 100644 vendor/github.com/spf13/cobra/MAINTAINERS
delete mode 100644 vendor/github.com/spf13/cobra/Makefile
delete mode 100644 vendor/github.com/spf13/cobra/README.md
delete mode 100644 vendor/github.com/spf13/cobra/args.go
delete mode 100644 vendor/github.com/spf13/cobra/bash_completions.go
delete mode 100644 vendor/github.com/spf13/cobra/bash_completions.md
delete mode 100644 vendor/github.com/spf13/cobra/bash_completionsV2.go
delete mode 100644 vendor/github.com/spf13/cobra/cobra.go
delete mode 100644 vendor/github.com/spf13/cobra/command.go
delete mode 100644 vendor/github.com/spf13/cobra/command_notwin.go
delete mode 100644 vendor/github.com/spf13/cobra/command_win.go
delete mode 100644 vendor/github.com/spf13/cobra/completions.go
delete mode 100644 vendor/github.com/spf13/cobra/fish_completions.go
delete mode 100644 vendor/github.com/spf13/cobra/fish_completions.md
delete mode 100644 vendor/github.com/spf13/cobra/powershell_completions.go
delete mode 100644 vendor/github.com/spf13/cobra/powershell_completions.md
delete mode 100644 vendor/github.com/spf13/cobra/projects_using_cobra.md
delete mode 100644 vendor/github.com/spf13/cobra/shell_completions.go
delete mode 100644 vendor/github.com/spf13/cobra/shell_completions.md
delete mode 100644 vendor/github.com/spf13/cobra/user_guide.md
delete mode 100644 vendor/github.com/spf13/cobra/zsh_completions.go
delete mode 100644 vendor/github.com/spf13/cobra/zsh_completions.md
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/.gitignore
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/LICENSE
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/README.md
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/default_notepad.go
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/log_counter.go
delete mode 100644 vendor/github.com/spf13/jwalterweatherman/notepad.go
delete mode 100644 vendor/github.com/spf13/pflag/.gitignore
delete mode 100644 vendor/github.com/spf13/pflag/.travis.yml
delete mode 100644 vendor/github.com/spf13/pflag/LICENSE
delete mode 100644 vendor/github.com/spf13/pflag/README.md
delete mode 100644 vendor/github.com/spf13/pflag/bool.go
delete mode 100644 vendor/github.com/spf13/pflag/bool_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/bytes.go
delete mode 100644 vendor/github.com/spf13/pflag/count.go
delete mode 100644 vendor/github.com/spf13/pflag/duration.go
delete mode 100644 vendor/github.com/spf13/pflag/duration_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/flag.go
delete mode 100644 vendor/github.com/spf13/pflag/float32.go
delete mode 100644 vendor/github.com/spf13/pflag/float32_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/float64.go
delete mode 100644 vendor/github.com/spf13/pflag/float64_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/golangflag.go
delete mode 100644 vendor/github.com/spf13/pflag/int.go
delete mode 100644 vendor/github.com/spf13/pflag/int16.go
delete mode 100644 vendor/github.com/spf13/pflag/int32.go
delete mode 100644 vendor/github.com/spf13/pflag/int32_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/int64.go
delete mode 100644 vendor/github.com/spf13/pflag/int64_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/int8.go
delete mode 100644 vendor/github.com/spf13/pflag/int_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/ip.go
delete mode 100644 vendor/github.com/spf13/pflag/ip_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/ipmask.go
delete mode 100644 vendor/github.com/spf13/pflag/ipnet.go
delete mode 100644 vendor/github.com/spf13/pflag/string.go
delete mode 100644 vendor/github.com/spf13/pflag/string_array.go
delete mode 100644 vendor/github.com/spf13/pflag/string_slice.go
delete mode 100644 vendor/github.com/spf13/pflag/string_to_int.go
delete mode 100644 vendor/github.com/spf13/pflag/string_to_int64.go
delete mode 100644 vendor/github.com/spf13/pflag/string_to_string.go
delete mode 100644 vendor/github.com/spf13/pflag/uint.go
delete mode 100644 vendor/github.com/spf13/pflag/uint16.go
delete mode 100644 vendor/github.com/spf13/pflag/uint32.go
delete mode 100644 vendor/github.com/spf13/pflag/uint64.go
delete mode 100644 vendor/github.com/spf13/pflag/uint8.go
delete mode 100644 vendor/github.com/spf13/pflag/uint_slice.go
delete mode 100644 vendor/github.com/spf13/viper/.editorconfig
delete mode 100644 vendor/github.com/spf13/viper/.gitignore
delete mode 100644 vendor/github.com/spf13/viper/.golangci.yml
delete mode 100644 vendor/github.com/spf13/viper/LICENSE
delete mode 100644 vendor/github.com/spf13/viper/Makefile
delete mode 100644 vendor/github.com/spf13/viper/README.md
delete mode 100644 vendor/github.com/spf13/viper/TROUBLESHOOTING.md
delete mode 100644 vendor/github.com/spf13/viper/flags.go
delete mode 100644 vendor/github.com/spf13/viper/fs.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/decoder.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/encoder.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/error.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/hcl/codec.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/json/codec.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/toml/codec.go
delete mode 100644 vendor/github.com/spf13/viper/internal/encoding/yaml/codec.go
delete mode 100644 vendor/github.com/spf13/viper/logger.go
delete mode 100644 vendor/github.com/spf13/viper/util.go
delete mode 100644 vendor/github.com/spf13/viper/viper.go
delete mode 100644 vendor/github.com/spf13/viper/viper_go1_15.go
delete mode 100644 vendor/github.com/spf13/viper/viper_go1_16.go
delete mode 100644 vendor/github.com/spf13/viper/watch.go
delete mode 100644 vendor/github.com/spf13/viper/watch_wasm.go
delete mode 100644 vendor/github.com/stretchr/objx/.codeclimate.yml
delete mode 100644 vendor/github.com/stretchr/objx/.gitignore
delete mode 100644 vendor/github.com/stretchr/objx/.travis.yml
delete mode 100644 vendor/github.com/stretchr/objx/LICENSE
delete mode 100644 vendor/github.com/stretchr/objx/README.md
delete mode 100644 vendor/github.com/stretchr/objx/Taskfile.yml
delete mode 100644 vendor/github.com/stretchr/objx/accessors.go
delete mode 100644 vendor/github.com/stretchr/objx/conversions.go
delete mode 100644 vendor/github.com/stretchr/objx/doc.go
delete mode 100644 vendor/github.com/stretchr/objx/map.go
delete mode 100644 vendor/github.com/stretchr/objx/mutations.go
delete mode 100644 vendor/github.com/stretchr/objx/security.go
delete mode 100644 vendor/github.com/stretchr/objx/tests.go
delete mode 100644 vendor/github.com/stretchr/objx/type_specific.go
delete mode 100644 vendor/github.com/stretchr/objx/type_specific_codegen.go
delete mode 100644 vendor/github.com/stretchr/objx/value.go
delete mode 100644 vendor/github.com/stretchr/testify/LICENSE
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_order.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/assertions.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/doc.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/errors.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/forward_assertions.go
delete mode 100644 vendor/github.com/stretchr/testify/assert/http_assertions.go
delete mode 100644 vendor/github.com/stretchr/testify/mock/doc.go
delete mode 100644 vendor/github.com/stretchr/testify/mock/mock.go
delete mode 100644 vendor/github.com/subosito/gotenv/.env
delete mode 100644 vendor/github.com/subosito/gotenv/.env.invalid
delete mode 100644 vendor/github.com/subosito/gotenv/.gitignore
delete mode 100644 vendor/github.com/subosito/gotenv/.travis.yml
delete mode 100644 vendor/github.com/subosito/gotenv/CHANGELOG.md
delete mode 100644 vendor/github.com/subosito/gotenv/LICENSE
delete mode 100644 vendor/github.com/subosito/gotenv/README.md
delete mode 100644 vendor/github.com/subosito/gotenv/appveyor.yml
delete mode 100644 vendor/github.com/subosito/gotenv/gotenv.go
delete mode 100644 vendor/github.com/tidwall/gjson/LICENSE
delete mode 100644 vendor/github.com/tidwall/gjson/README.md
delete mode 100644 vendor/github.com/tidwall/gjson/SYNTAX.md
delete mode 100644 vendor/github.com/tidwall/gjson/gjson.go
delete mode 100644 vendor/github.com/tidwall/gjson/logo.png
delete mode 100644 vendor/github.com/tidwall/match/LICENSE
delete mode 100644 vendor/github.com/tidwall/match/README.md
delete mode 100644 vendor/github.com/tidwall/match/match.go
delete mode 100644 vendor/github.com/tidwall/pretty/LICENSE
delete mode 100644 vendor/github.com/tidwall/pretty/README.md
delete mode 100644 vendor/github.com/tidwall/pretty/pretty.go
delete mode 100644 vendor/github.com/urfave/cli/v2/.flake8
delete mode 100644 vendor/github.com/urfave/cli/v2/.gitignore
delete mode 100644 vendor/github.com/urfave/cli/v2/CODE_OF_CONDUCT.md
delete mode 100644 vendor/github.com/urfave/cli/v2/LICENSE
delete mode 100644 vendor/github.com/urfave/cli/v2/Makefile
delete mode 100644 vendor/github.com/urfave/cli/v2/README.md
delete mode 100644 vendor/github.com/urfave/cli/v2/app.go
delete mode 100644 vendor/github.com/urfave/cli/v2/args.go
delete mode 100644 vendor/github.com/urfave/cli/v2/category.go
delete mode 100644 vendor/github.com/urfave/cli/v2/cli.go
delete mode 100644 vendor/github.com/urfave/cli/v2/command.go
delete mode 100644 vendor/github.com/urfave/cli/v2/context.go
delete mode 100644 vendor/github.com/urfave/cli/v2/docs.go
delete mode 100644 vendor/github.com/urfave/cli/v2/errors.go
delete mode 100644 vendor/github.com/urfave/cli/v2/fish.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag-spec.yaml
delete mode 100644 vendor/github.com/urfave/cli/v2/flag.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_bool.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_duration.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_float64.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_float64_slice.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_generic.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_int.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_int64.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_int64_slice.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_int_slice.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_path.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_string.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_string_slice.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_timestamp.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_uint.go
delete mode 100644 vendor/github.com/urfave/cli/v2/flag_uint64.go
delete mode 100644 vendor/github.com/urfave/cli/v2/funcs.go
delete mode 100644 vendor/github.com/urfave/cli/v2/godoc-current.txt
delete mode 100644 vendor/github.com/urfave/cli/v2/help.go
delete mode 100644 vendor/github.com/urfave/cli/v2/mkdocs-requirements.txt
delete mode 100644 vendor/github.com/urfave/cli/v2/mkdocs.yml
delete mode 100644 vendor/github.com/urfave/cli/v2/parse.go
delete mode 100644 vendor/github.com/urfave/cli/v2/sort.go
delete mode 100644 vendor/github.com/urfave/cli/v2/suggestions.go
delete mode 100644 vendor/github.com/urfave/cli/v2/template.go
delete mode 100644 vendor/github.com/urfave/cli/v2/zz_generated.flags.go
delete mode 100644 vendor/github.com/vearutop/statigz/.gitignore
delete mode 100644 vendor/github.com/vearutop/statigz/.golangci.yml
delete mode 100644 vendor/github.com/vearutop/statigz/LICENSE
delete mode 100644 vendor/github.com/vearutop/statigz/Makefile
delete mode 100644 vendor/github.com/vearutop/statigz/README.md
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/bad.png.gz
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/deeper/openapi.json.gz
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/deeper/swagger.json.br
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/favicon.png
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/index.html
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/index.html.gz
delete mode 100644 vendor/github.com/vearutop/statigz/_testdata/swagger.json
delete mode 100644 vendor/github.com/vearutop/statigz/server.go
delete mode 100644 vendor/github.com/vektah/dataloaden/.gitignore
delete mode 100644 vendor/github.com/vektah/dataloaden/README.md
delete mode 100644 vendor/github.com/vektah/dataloaden/appveyor.yml
delete mode 100644 vendor/github.com/vektah/dataloaden/dataloaden.go
delete mode 100644 vendor/github.com/vektah/dataloaden/licence.md
delete mode 100644 vendor/github.com/vektah/dataloaden/pkg/generator/generator.go
delete mode 100644 vendor/github.com/vektah/dataloaden/pkg/generator/template.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/.gitignore
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/LICENSE
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/argmap.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/collections.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/definition.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/directive.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/document.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/dumper.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/fragment.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/operation.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/path.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/selection.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/source.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/type.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/value.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/formatter/formatter.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/gqlerror/error.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/gqlparser.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/lexer/blockstring.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/lexer/lexer.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/lexer/lexer_test.yml
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/lexer/token.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/parser/parser.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/parser/query.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/parser/query_test.yml
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/parser/schema.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/parser/schema_test.yml
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/readme.md
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/error.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/messaging.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/prelude.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/prelude.graphql
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/fields_on_correct_type.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/fragments_on_composite_types.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/known_argument_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/known_directives.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/known_fragment_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/known_type_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/lone_anonymous_operation.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/no_fragment_cycles.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/no_undefined_variables.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/no_unused_fragments.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/no_unused_variables.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/overlapping_fields_can_be_merged.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/possible_fragment_spreads.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/provided_required_arguments.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/scalar_leafs.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/single_field_subscriptions.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_argument_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_directives_per_location.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_fragment_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_input_field_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_operation_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/unique_variable_names.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/values_of_correct_type.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/variables_are_input_types.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/rules/variables_in_allowed_position.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/schema.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/suggestionList.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/validator.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/vars.go
delete mode 100644 vendor/github.com/vektah/gqlparser/v2/validator/walk.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/.gitignore
delete mode 100644 vendor/github.com/vektra/mockery/v2/.goreleaser.yml
delete mode 100644 vendor/github.com/vektra/mockery/v2/.mockery.yaml
delete mode 100644 vendor/github.com/vektra/mockery/v2/Dockerfile
delete mode 100644 vendor/github.com/vektra/mockery/v2/LICENSE
delete mode 100644 vendor/github.com/vektra/mockery/v2/Makefile
delete mode 100644 vendor/github.com/vektra/mockery/v2/README.md
delete mode 100644 vendor/github.com/vektra/mockery/v2/cmd/mockery.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/cmd/showconfig.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/main.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/config/config.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/generator.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/mockery.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/outputter.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/parse.go
delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/walker.go
delete mode 100644 vendor/github.com/xWTF/chardet/2022.go
delete mode 100644 vendor/github.com/xWTF/chardet/AUTHORS
delete mode 100644 vendor/github.com/xWTF/chardet/LICENSE
delete mode 100644 vendor/github.com/xWTF/chardet/README.md
delete mode 100644 vendor/github.com/xWTF/chardet/detector.go
delete mode 100644 vendor/github.com/xWTF/chardet/icu-license.html
delete mode 100644 vendor/github.com/xWTF/chardet/multi_byte.go
delete mode 100644 vendor/github.com/xWTF/chardet/recognizer.go
delete mode 100644 vendor/github.com/xWTF/chardet/single_byte.go
delete mode 100644 vendor/github.com/xWTF/chardet/unicode.go
delete mode 100644 vendor/github.com/xWTF/chardet/utf8.go
delete mode 100644 vendor/github.com/xrash/smetrics/.travis.yml
delete mode 100644 vendor/github.com/xrash/smetrics/LICENSE
delete mode 100644 vendor/github.com/xrash/smetrics/README.md
delete mode 100644 vendor/github.com/xrash/smetrics/doc.go
delete mode 100644 vendor/github.com/xrash/smetrics/hamming.go
delete mode 100644 vendor/github.com/xrash/smetrics/jaro-winkler.go
delete mode 100644 vendor/github.com/xrash/smetrics/jaro.go
delete mode 100644 vendor/github.com/xrash/smetrics/soundex.go
delete mode 100644 vendor/github.com/xrash/smetrics/ukkonen.go
delete mode 100644 vendor/github.com/xrash/smetrics/wagner-fischer.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/LICENSE
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/helpers/ptrs/ptrs.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/duration.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/events.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/mpd.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/mpd_attr.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/mpd_read_write.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/pssh.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/segment.go
delete mode 100644 vendor/github.com/zencoder/go-dash/v3/mpd/validate.go
delete mode 100644 vendor/go.uber.org/atomic/.codecov.yml
delete mode 100644 vendor/go.uber.org/atomic/.gitignore
delete mode 100644 vendor/go.uber.org/atomic/.travis.yml
delete mode 100644 vendor/go.uber.org/atomic/CHANGELOG.md
delete mode 100644 vendor/go.uber.org/atomic/LICENSE.txt
delete mode 100644 vendor/go.uber.org/atomic/Makefile
delete mode 100644 vendor/go.uber.org/atomic/README.md
delete mode 100644 vendor/go.uber.org/atomic/bool.go
delete mode 100644 vendor/go.uber.org/atomic/bool_ext.go
delete mode 100644 vendor/go.uber.org/atomic/doc.go
delete mode 100644 vendor/go.uber.org/atomic/duration.go
delete mode 100644 vendor/go.uber.org/atomic/duration_ext.go
delete mode 100644 vendor/go.uber.org/atomic/error.go
delete mode 100644 vendor/go.uber.org/atomic/error_ext.go
delete mode 100644 vendor/go.uber.org/atomic/float64.go
delete mode 100644 vendor/go.uber.org/atomic/float64_ext.go
delete mode 100644 vendor/go.uber.org/atomic/gen.go
delete mode 100644 vendor/go.uber.org/atomic/int32.go
delete mode 100644 vendor/go.uber.org/atomic/int64.go
delete mode 100644 vendor/go.uber.org/atomic/nocmp.go
delete mode 100644 vendor/go.uber.org/atomic/string.go
delete mode 100644 vendor/go.uber.org/atomic/string_ext.go
delete mode 100644 vendor/go.uber.org/atomic/uint32.go
delete mode 100644 vendor/go.uber.org/atomic/uint64.go
delete mode 100644 vendor/go.uber.org/atomic/value.go
delete mode 100644 vendor/golang.org/x/crypto/AUTHORS
delete mode 100644 vendor/golang.org/x/crypto/CONTRIBUTORS
delete mode 100644 vendor/golang.org/x/crypto/LICENSE
delete mode 100644 vendor/golang.org/x/crypto/PATENTS
delete mode 100644 vendor/golang.org/x/crypto/bcrypt/base64.go
delete mode 100644 vendor/golang.org/x/crypto/bcrypt/bcrypt.go
delete mode 100644 vendor/golang.org/x/crypto/blowfish/block.go
delete mode 100644 vendor/golang.org/x/crypto/blowfish/cipher.go
delete mode 100644 vendor/golang.org/x/crypto/blowfish/const.go
delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go
delete mode 100644 vendor/golang.org/x/image/LICENSE
delete mode 100644 vendor/golang.org/x/image/PATENTS
delete mode 100644 vendor/golang.org/x/image/bmp/reader.go
delete mode 100644 vendor/golang.org/x/image/bmp/writer.go
delete mode 100644 vendor/golang.org/x/image/ccitt/reader.go
delete mode 100644 vendor/golang.org/x/image/ccitt/table.go
delete mode 100644 vendor/golang.org/x/image/ccitt/writer.go
delete mode 100644 vendor/golang.org/x/image/riff/riff.go
delete mode 100644 vendor/golang.org/x/image/tiff/buffer.go
delete mode 100644 vendor/golang.org/x/image/tiff/compress.go
delete mode 100644 vendor/golang.org/x/image/tiff/consts.go
delete mode 100644 vendor/golang.org/x/image/tiff/fuzz.go
delete mode 100644 vendor/golang.org/x/image/tiff/lzw/reader.go
delete mode 100644 vendor/golang.org/x/image/tiff/reader.go
delete mode 100644 vendor/golang.org/x/image/tiff/writer.go
delete mode 100644 vendor/golang.org/x/image/vp8/decode.go
delete mode 100644 vendor/golang.org/x/image/vp8/filter.go
delete mode 100644 vendor/golang.org/x/image/vp8/idct.go
delete mode 100644 vendor/golang.org/x/image/vp8/partition.go
delete mode 100644 vendor/golang.org/x/image/vp8/pred.go
delete mode 100644 vendor/golang.org/x/image/vp8/predfunc.go
delete mode 100644 vendor/golang.org/x/image/vp8/quant.go
delete mode 100644 vendor/golang.org/x/image/vp8/reconstruct.go
delete mode 100644 vendor/golang.org/x/image/vp8/token.go
delete mode 100644 vendor/golang.org/x/image/vp8l/decode.go
delete mode 100644 vendor/golang.org/x/image/vp8l/huffman.go
delete mode 100644 vendor/golang.org/x/image/vp8l/transform.go
delete mode 100644 vendor/golang.org/x/image/webp/decode.go
delete mode 100644 vendor/golang.org/x/image/webp/doc.go
delete mode 100644 vendor/golang.org/x/mod/LICENSE
delete mode 100644 vendor/golang.org/x/mod/PATENTS
delete mode 100644 vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go
delete mode 100644 vendor/golang.org/x/mod/module/module.go
delete mode 100644 vendor/golang.org/x/mod/module/pseudo.go
delete mode 100644 vendor/golang.org/x/mod/semver/semver.go
delete mode 100644 vendor/golang.org/x/net/LICENSE
delete mode 100644 vendor/golang.org/x/net/PATENTS
delete mode 100644 vendor/golang.org/x/net/bpf/asm.go
delete mode 100644 vendor/golang.org/x/net/bpf/constants.go
delete mode 100644 vendor/golang.org/x/net/bpf/doc.go
delete mode 100644 vendor/golang.org/x/net/bpf/instructions.go
delete mode 100644 vendor/golang.org/x/net/bpf/setter.go
delete mode 100644 vendor/golang.org/x/net/bpf/vm.go
delete mode 100644 vendor/golang.org/x/net/bpf/vm_instructions.go
delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go
delete mode 100644 vendor/golang.org/x/net/html/atom/atom.go
delete mode 100644 vendor/golang.org/x/net/html/atom/table.go
delete mode 100644 vendor/golang.org/x/net/html/charset/charset.go
delete mode 100644 vendor/golang.org/x/net/html/const.go
delete mode 100644 vendor/golang.org/x/net/html/doc.go
delete mode 100644 vendor/golang.org/x/net/html/doctype.go
delete mode 100644 vendor/golang.org/x/net/html/entity.go
delete mode 100644 vendor/golang.org/x/net/html/escape.go
delete mode 100644 vendor/golang.org/x/net/html/foreign.go
delete mode 100644 vendor/golang.org/x/net/html/node.go
delete mode 100644 vendor/golang.org/x/net/html/parse.go
delete mode 100644 vendor/golang.org/x/net/html/render.go
delete mode 100644 vendor/golang.org/x/net/html/token.go
delete mode 100644 vendor/golang.org/x/net/internal/iana/const.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/complete_dontwait.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/complete_nodontwait.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/empty.s
delete mode 100644 vendor/golang.org/x/net/internal/socket/error_unix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/error_windows.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_32bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/iovec_stub.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_stub.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/norace.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/race.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_msg.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/socket.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_bsd.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_const_unix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_386.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_386.s
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_netbsd.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_posix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_stub.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_unix.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_windows.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go
delete mode 100644 vendor/golang.org/x/net/ipv4/batch.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_bsd.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_pktinfo.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_unix.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_windows.go
delete mode 100644 vendor/golang.org/x/net/ipv4/control_zos.go
delete mode 100644 vendor/golang.org/x/net/ipv4/dgramopt.go
delete mode 100644 vendor/golang.org/x/net/ipv4/doc.go
delete mode 100644 vendor/golang.org/x/net/ipv4/endpoint.go
delete mode 100644 vendor/golang.org/x/net/ipv4/genericopt.go
delete mode 100644 vendor/golang.org/x/net/ipv4/header.go
delete mode 100644 vendor/golang.org/x/net/ipv4/helper.go
delete mode 100644 vendor/golang.org/x/net/ipv4/iana.go
delete mode 100644 vendor/golang.org/x/net/ipv4/icmp.go
delete mode 100644 vendor/golang.org/x/net/ipv4/icmp_linux.go
delete mode 100644 vendor/golang.org/x/net/ipv4/icmp_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/packet.go
delete mode 100644 vendor/golang.org/x/net/ipv4/payload.go
delete mode 100644 vendor/golang.org/x/net/ipv4/payload_cmsg.go
delete mode 100644 vendor/golang.org/x/net/ipv4/payload_nocmsg.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt_posix.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sockopt_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_aix.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreq.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreqn.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bpf.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_bsd.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_darwin.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_dragonfly.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_freebsd.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_linux.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_solaris.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_ssmreq.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_stub.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_windows.go
delete mode 100644 vendor/golang.org/x/net/ipv4/sys_zos.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_darwin.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_dragonfly.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_386.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_loong64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_netbsd.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_openbsd.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_solaris.go
delete mode 100644 vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go
delete mode 100644 vendor/golang.org/x/net/publicsuffix/data/children
delete mode 100644 vendor/golang.org/x/net/publicsuffix/data/nodes
delete mode 100644 vendor/golang.org/x/net/publicsuffix/data/text
delete mode 100644 vendor/golang.org/x/net/publicsuffix/list.go
delete mode 100644 vendor/golang.org/x/net/publicsuffix/table.go
delete mode 100644 vendor/golang.org/x/sys/LICENSE
delete mode 100644 vendor/golang.org/x/sys/PATENTS
delete mode 100644 vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
delete mode 100644 vendor/golang.org/x/sys/cpu/byteorder.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_aix.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.s
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_loong64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mips64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mipsx.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.s
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_wasm.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.s
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos.go
delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/cpu/endian_big.go
delete mode 100644 vendor/golang.org/x/sys/cpu/endian_little.go
delete mode 100644 vendor/golang.org/x/sys/cpu/hwcap_linux.go
delete mode 100644 vendor/golang.org/x/sys/cpu/parse.go
delete mode 100644 vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
delete mode 100644 vendor/golang.org/x/sys/execabs/execabs.go
delete mode 100644 vendor/golang.org/x/sys/execabs/execabs_go118.go
delete mode 100644 vendor/golang.org/x/sys/execabs/execabs_go119.go
delete mode 100644 vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
delete mode 100644 vendor/golang.org/x/sys/plan9/asm.s
delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_386.s
delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
delete mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
delete mode 100644 vendor/golang.org/x/sys/plan9/const_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/dir_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/env_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/errors_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/mkall.sh
delete mode 100644 vendor/golang.org/x/sys/plan9/mkerrors.sh
delete mode 100644 vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh
delete mode 100644 vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/pwd_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/race.go
delete mode 100644 vendor/golang.org/x/sys/plan9/race0.go
delete mode 100644 vendor/golang.org/x/sys/plan9/str.go
delete mode 100644 vendor/golang.org/x/sys/plan9/syscall.go
delete mode 100644 vendor/golang.org/x/sys/plan9/syscall_plan9.go
delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
delete mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
delete mode 100644 vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
delete mode 100644 vendor/golang.org/x/sys/unix/.gitignore
delete mode 100644 vendor/golang.org/x/sys/unix/README.md
delete mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/aliases.go
delete mode 100644 vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_loong64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/asm_zos_s390x.s
delete mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/constants.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/dev_zos.go
delete mode 100644 vendor/golang.org/x/sys/unix/dirent.go
delete mode 100644 vendor/golang.org/x/sys/unix/endian_big.go
delete mode 100644 vendor/golang.org/x/sys/unix/endian_little.go
delete mode 100644 vendor/golang.org/x/sys/unix/env_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/epoll_zos.go
delete mode 100644 vendor/golang.org/x/sys/unix/fcntl.go
delete mode 100644 vendor/golang.org/x/sys/unix/fcntl_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
delete mode 100644 vendor/golang.org/x/sys/unix/fdset.go
delete mode 100644 vendor/golang.org/x/sys/unix/fstatfs_zos.go
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo.go
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c
delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ifreq_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/ioctl.go
delete mode 100644 vendor/golang.org/x/sys/unix/ioctl_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/ioctl_zos.go
delete mode 100644 vendor/golang.org/x/sys/unix/mkall.sh
delete mode 100644 vendor/golang.org/x/sys/unix/mkerrors.sh
delete mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/pledge_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/ptrace_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/ptrace_ios.go
delete mode 100644 vendor/golang.org/x/sys/unix/race.go
delete mode 100644 vendor/golang.org/x/sys/unix/race0.go
delete mode 100644 vendor/golang.org/x/sys/unix/readdirent_getdents.go
delete mode 100644 vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_hurd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_hurd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_illumos.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
delete mode 100644 vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/sysvshm_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/sysvshm_unix.go
delete mode 100644 vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
delete mode 100644 vendor/golang.org/x/sys/unix/timestruct.go
delete mode 100644 vendor/golang.org/x/sys/unix/unveil_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/xattr_bsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
delete mode 100644 vendor/golang.org/x/sys/windows/aliases.go
delete mode 100644 vendor/golang.org/x/sys/windows/dll_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/empty.s
delete mode 100644 vendor/golang.org/x/sys/windows/env_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/eventlog.go
delete mode 100644 vendor/golang.org/x/sys/windows/exec_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/memory_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/mkerrors.bash
delete mode 100644 vendor/golang.org/x/sys/windows/mkknownfolderids.bash
delete mode 100644 vendor/golang.org/x/sys/windows/mksyscall.go
delete mode 100644 vendor/golang.org/x/sys/windows/race.go
delete mode 100644 vendor/golang.org/x/sys/windows/race0.go
delete mode 100644 vendor/golang.org/x/sys/windows/security_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/service.go
delete mode 100644 vendor/golang.org/x/sys/windows/setupapi_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/str.go
delete mode 100644 vendor/golang.org/x/sys/windows/svc/security.go
delete mode 100644 vendor/golang.org/x/sys/windows/svc/service.go
delete mode 100644 vendor/golang.org/x/sys/windows/syscall.go
delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/types_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_386.go
delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_amd64.go
delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_arm.go
delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_arm64.go
delete mode 100644 vendor/golang.org/x/sys/windows/zerrors_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/zknownfolderids_windows.go
delete mode 100644 vendor/golang.org/x/sys/windows/zsyscall_windows.go
delete mode 100644 vendor/golang.org/x/term/CONTRIBUTING.md
delete mode 100644 vendor/golang.org/x/term/LICENSE
delete mode 100644 vendor/golang.org/x/term/PATENTS
delete mode 100644 vendor/golang.org/x/term/README.md
delete mode 100644 vendor/golang.org/x/term/codereview.cfg
delete mode 100644 vendor/golang.org/x/term/term.go
delete mode 100644 vendor/golang.org/x/term/term_plan9.go
delete mode 100644 vendor/golang.org/x/term/term_unix.go
delete mode 100644 vendor/golang.org/x/term/term_unix_bsd.go
delete mode 100644 vendor/golang.org/x/term/term_unix_other.go
delete mode 100644 vendor/golang.org/x/term/term_unsupported.go
delete mode 100644 vendor/golang.org/x/term/term_windows.go
delete mode 100644 vendor/golang.org/x/term/terminal.go
delete mode 100644 vendor/golang.org/x/text/LICENSE
delete mode 100644 vendor/golang.org/x/text/PATENTS
delete mode 100644 vendor/golang.org/x/text/cases/cases.go
delete mode 100644 vendor/golang.org/x/text/cases/context.go
delete mode 100644 vendor/golang.org/x/text/cases/fold.go
delete mode 100644 vendor/golang.org/x/text/cases/icu.go
delete mode 100644 vendor/golang.org/x/text/cases/info.go
delete mode 100644 vendor/golang.org/x/text/cases/map.go
delete mode 100644 vendor/golang.org/x/text/cases/tables10.0.0.go
delete mode 100644 vendor/golang.org/x/text/cases/tables11.0.0.go
delete mode 100644 vendor/golang.org/x/text/cases/tables12.0.0.go
delete mode 100644 vendor/golang.org/x/text/cases/tables13.0.0.go
delete mode 100644 vendor/golang.org/x/text/cases/tables9.0.0.go
delete mode 100644 vendor/golang.org/x/text/cases/trieval.go
delete mode 100644 vendor/golang.org/x/text/collate/collate.go
delete mode 100644 vendor/golang.org/x/text/collate/index.go
delete mode 100644 vendor/golang.org/x/text/collate/option.go
delete mode 100644 vendor/golang.org/x/text/collate/sort.go
delete mode 100644 vendor/golang.org/x/text/collate/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/charmap/charmap.go
delete mode 100644 vendor/golang.org/x/text/encoding/charmap/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/encoding.go
delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go
delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/map.go
delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/identifier.go
delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/mib.go
delete mode 100644 vendor/golang.org/x/text/encoding/internal/internal.go
delete mode 100644 vendor/golang.org/x/text/encoding/japanese/all.go
delete mode 100644 vendor/golang.org/x/text/encoding/japanese/eucjp.go
delete mode 100644 vendor/golang.org/x/text/encoding/japanese/iso2022jp.go
delete mode 100644 vendor/golang.org/x/text/encoding/japanese/shiftjis.go
delete mode 100644 vendor/golang.org/x/text/encoding/japanese/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/korean/euckr.go
delete mode 100644 vendor/golang.org/x/text/encoding/korean/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/all.go
delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go
delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go
delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/big5.go
delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/tables.go
delete mode 100644 vendor/golang.org/x/text/encoding/unicode/override.go
delete mode 100644 vendor/golang.org/x/text/encoding/unicode/unicode.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/collelem.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/colltab.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/contract.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/iter.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/numeric.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/table.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/trie.go
delete mode 100644 vendor/golang.org/x/text/internal/colltab/weighter.go
delete mode 100644 vendor/golang.org/x/text/internal/internal.go
delete mode 100644 vendor/golang.org/x/text/internal/language/common.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact/compact.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact/language.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact/parents.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact/tables.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compact/tags.go
delete mode 100644 vendor/golang.org/x/text/internal/language/compose.go
delete mode 100644 vendor/golang.org/x/text/internal/language/coverage.go
delete mode 100644 vendor/golang.org/x/text/internal/language/language.go
delete mode 100644 vendor/golang.org/x/text/internal/language/lookup.go
delete mode 100644 vendor/golang.org/x/text/internal/language/match.go
delete mode 100644 vendor/golang.org/x/text/internal/language/parse.go
delete mode 100644 vendor/golang.org/x/text/internal/language/tables.go
delete mode 100644 vendor/golang.org/x/text/internal/language/tags.go
delete mode 100644 vendor/golang.org/x/text/internal/match.go
delete mode 100644 vendor/golang.org/x/text/internal/tag/tag.go
delete mode 100644 vendor/golang.org/x/text/internal/utf8internal/utf8internal.go
delete mode 100644 vendor/golang.org/x/text/language/coverage.go
delete mode 100644 vendor/golang.org/x/text/language/doc.go
delete mode 100644 vendor/golang.org/x/text/language/language.go
delete mode 100644 vendor/golang.org/x/text/language/match.go
delete mode 100644 vendor/golang.org/x/text/language/parse.go
delete mode 100644 vendor/golang.org/x/text/language/tables.go
delete mode 100644 vendor/golang.org/x/text/language/tags.go
delete mode 100644 vendor/golang.org/x/text/runes/cond.go
delete mode 100644 vendor/golang.org/x/text/runes/runes.go
delete mode 100644 vendor/golang.org/x/text/transform/transform.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/composition.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/input.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/iter.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/normalize.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables10.0.0.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables11.0.0.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables12.0.0.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables13.0.0.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables9.0.0.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/transform.go
delete mode 100644 vendor/golang.org/x/text/unicode/norm/trie.go
delete mode 100644 vendor/golang.org/x/tools/LICENSE
delete mode 100644 vendor/golang.org/x/tools/PATENTS
delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/imports.go
delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
delete mode 100644 vendor/golang.org/x/tools/go/ast/astutil/util.go
delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/importer.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/support_go117.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/support_go118.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/unified_no.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/unified_yes.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/ureader_no.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/ureader_yes.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/codes.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/decoder.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/doc.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/encoder.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/flags.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/frames_go1.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/frames_go17.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/reloc.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/support.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/sync.go
delete mode 100644 vendor/golang.org/x/tools/go/internal/pkgbits/syncmarker_string.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/doc.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/external.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/golist.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/golist_overlay.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/loadmode_string.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/packages.go
delete mode 100644 vendor/golang.org/x/tools/go/packages/visit.go
delete mode 100644 vendor/golang.org/x/tools/imports/forward.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/core/event.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/core/export.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/core/fast.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/doc.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/event.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/keys/keys.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/keys/standard.go
delete mode 100644 vendor/golang.org/x/tools/internal/event/label/label.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_bsd.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go
delete mode 100644 vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go
delete mode 100644 vendor/golang.org/x/tools/internal/gocommand/invoke.go
delete mode 100644 vendor/golang.org/x/tools/internal/gocommand/vendor.go
delete mode 100644 vendor/golang.org/x/tools/internal/gocommand/version.go
delete mode 100644 vendor/golang.org/x/tools/internal/gopathwalk/walk.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/fix.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/imports.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/mod.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/mod_cache.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/sortimports.go
delete mode 100644 vendor/golang.org/x/tools/internal/imports/zstdlib.go
delete mode 100644 vendor/golang.org/x/tools/internal/packagesinternal/packages.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/common.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/coretype.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/normalize.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/termlist.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/typeterm.go
delete mode 100644 vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
delete mode 100644 vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go
delete mode 100644 vendor/golang.org/x/tools/internal/typesinternal/types.go
delete mode 100644 vendor/golang.org/x/tools/internal/typesinternal/types_118.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/.gitignore
delete mode 100644 vendor/gopkg.in/guregu/null.v4/LICENSE
delete mode 100644 vendor/gopkg.in/guregu/null.v4/README.md
delete mode 100644 vendor/gopkg.in/guregu/null.v4/bool.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/float.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/int.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/string.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/time.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/zero/bool.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/zero/float.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/zero/int.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/zero/string.go
delete mode 100644 vendor/gopkg.in/guregu/null.v4/zero/time.go
delete mode 100644 vendor/gopkg.in/ini.v1/.editorconfig
delete mode 100644 vendor/gopkg.in/ini.v1/.gitignore
delete mode 100644 vendor/gopkg.in/ini.v1/.golangci.yml
delete mode 100644 vendor/gopkg.in/ini.v1/LICENSE
delete mode 100644 vendor/gopkg.in/ini.v1/Makefile
delete mode 100644 vendor/gopkg.in/ini.v1/README.md
delete mode 100644 vendor/gopkg.in/ini.v1/codecov.yml
delete mode 100644 vendor/gopkg.in/ini.v1/data_source.go
delete mode 100644 vendor/gopkg.in/ini.v1/deprecated.go
delete mode 100644 vendor/gopkg.in/ini.v1/error.go
delete mode 100644 vendor/gopkg.in/ini.v1/file.go
delete mode 100644 vendor/gopkg.in/ini.v1/helper.go
delete mode 100644 vendor/gopkg.in/ini.v1/ini.go
delete mode 100644 vendor/gopkg.in/ini.v1/key.go
delete mode 100644 vendor/gopkg.in/ini.v1/parser.go
delete mode 100644 vendor/gopkg.in/ini.v1/section.go
delete mode 100644 vendor/gopkg.in/ini.v1/struct.go
delete mode 100644 vendor/gopkg.in/sourcemap.v1/.travis.yml
delete mode 100644 vendor/gopkg.in/sourcemap.v1/LICENSE
delete mode 100644 vendor/gopkg.in/sourcemap.v1/Makefile
delete mode 100644 vendor/gopkg.in/sourcemap.v1/README.md
delete mode 100644 vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
delete mode 100644 vendor/gopkg.in/sourcemap.v1/consumer.go
delete mode 100644 vendor/gopkg.in/sourcemap.v1/sourcemap.go
delete mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml
delete mode 100644 vendor/gopkg.in/yaml.v2/LICENSE
delete mode 100644 vendor/gopkg.in/yaml.v2/LICENSE.libyaml
delete mode 100644 vendor/gopkg.in/yaml.v2/NOTICE
delete mode 100644 vendor/gopkg.in/yaml.v2/README.md
delete mode 100644 vendor/gopkg.in/yaml.v2/apic.go
delete mode 100644 vendor/gopkg.in/yaml.v2/decode.go
delete mode 100644 vendor/gopkg.in/yaml.v2/emitterc.go
delete mode 100644 vendor/gopkg.in/yaml.v2/encode.go
delete mode 100644 vendor/gopkg.in/yaml.v2/parserc.go
delete mode 100644 vendor/gopkg.in/yaml.v2/readerc.go
delete mode 100644 vendor/gopkg.in/yaml.v2/resolve.go
delete mode 100644 vendor/gopkg.in/yaml.v2/scannerc.go
delete mode 100644 vendor/gopkg.in/yaml.v2/sorter.go
delete mode 100644 vendor/gopkg.in/yaml.v2/writerc.go
delete mode 100644 vendor/gopkg.in/yaml.v2/yaml.go
delete mode 100644 vendor/gopkg.in/yaml.v2/yamlh.go
delete mode 100644 vendor/gopkg.in/yaml.v2/yamlprivateh.go
delete mode 100644 vendor/gopkg.in/yaml.v3/LICENSE
delete mode 100644 vendor/gopkg.in/yaml.v3/NOTICE
delete mode 100644 vendor/gopkg.in/yaml.v3/README.md
delete mode 100644 vendor/gopkg.in/yaml.v3/apic.go
delete mode 100644 vendor/gopkg.in/yaml.v3/decode.go
delete mode 100644 vendor/gopkg.in/yaml.v3/emitterc.go
delete mode 100644 vendor/gopkg.in/yaml.v3/encode.go
delete mode 100644 vendor/gopkg.in/yaml.v3/parserc.go
delete mode 100644 vendor/gopkg.in/yaml.v3/readerc.go
delete mode 100644 vendor/gopkg.in/yaml.v3/resolve.go
delete mode 100644 vendor/gopkg.in/yaml.v3/scannerc.go
delete mode 100644 vendor/gopkg.in/yaml.v3/sorter.go
delete mode 100644 vendor/gopkg.in/yaml.v3/writerc.go
delete mode 100644 vendor/gopkg.in/yaml.v3/yaml.go
delete mode 100644 vendor/gopkg.in/yaml.v3/yamlh.go
delete mode 100644 vendor/gopkg.in/yaml.v3/yamlprivateh.go
delete mode 100644 vendor/modules.txt
diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml
index 3d15f0c480f..d3444c34f0d 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -33,7 +33,7 @@ jobs:
run: docker exec -t build /bin/bash -c "make generate-backend"
- name: Run golangci-lint
- uses: golangci/golangci-lint-action@v2
+ uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
@@ -42,19 +42,26 @@ jobs:
# working-directory: somedir
# Optional: golangci-lint command line arguments.
- args: --modules-download-mode=vendor --timeout=5m
+ #
+ # Note: By default, the `.golangci.yml` file should be at the root of the repository.
+ # The location of the configuration file can be changed by using `--config=`
+ args: --timeout=5m
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
- # Optional: if set to true then the action will use pre-installed Go.
- # skip-go-installation: true
+ # Optional: if set to true, then all caching functionality will be completely disabled,
+ # takes precedence over all other caching options.
+ # skip-cache: true
- # Optional: if set to true then the action don't cache or restore ~/go/pkg.
- skip-pkg-cache: true
+ # Optional: if set to true, then the action won't cache or restore ~/go/pkg.
+ # skip-pkg-cache: true
- # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
- skip-build-cache: true
+ # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
+ # skip-build-cache: true
+
+ # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
+ # install-mode: "goinstall"
- name: Cleanup build container
run: docker rm -f -v build
diff --git a/.gitignore b/.gitignore
index ead0b09f953..2a259b6adfd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,9 @@
# Go
####
+# Vendored dependencies
+vendor
+
# Binaries for programs and plugins
*.exe
*.exe~
diff --git a/.golangci.yml b/.golangci.yml
index 43f7324a0ca..48ca4fd75a7 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,7 +1,6 @@
# options for analysis running
run:
timeout: 5m
- modules-download-mode: vendor
linters:
disable-all: true
diff --git a/cmd/stash/main.go b/cmd/stash/main.go
index 4aadf4fb1d8..0fbdf2108ad 100644
--- a/cmd/stash/main.go
+++ b/cmd/stash/main.go
@@ -1,4 +1,4 @@
-//go:generate go run -mod=vendor github.com/99designs/gqlgen
+//go:generate go run github.com/99designs/gqlgen
package main
import (
diff --git a/docker/build/x86_64/Dockerfile b/docker/build/x86_64/Dockerfile
index 554c6ff9977..174d6f022fb 100644
--- a/docker/build/x86_64/Dockerfile
+++ b/docker/build/x86_64/Dockerfile
@@ -21,7 +21,6 @@ RUN apk add --no-cache make alpine-sdk
WORKDIR /stash
COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/
COPY ./scripts /stash/scripts/
-COPY ./vendor /stash/vendor/
COPY ./pkg /stash/pkg/
COPY ./cmd /stash/cmd
COPY ./internal /stash/internal
diff --git a/docker/build/x86_64/Dockerfile-CUDA b/docker/build/x86_64/Dockerfile-CUDA
index 63ecf3d75bb..8195f2324c9 100644
--- a/docker/build/x86_64/Dockerfile-CUDA
+++ b/docker/build/x86_64/Dockerfile-CUDA
@@ -21,7 +21,6 @@ RUN apt update && apt install -y build-essential golang
WORKDIR /stash
COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/
COPY ./scripts /stash/scripts/
-COPY ./vendor /stash/vendor/
COPY ./pkg /stash/pkg/
COPY ./cmd /stash/cmd
COPY ./internal /stash/internal
diff --git a/scripts/cross-compile.sh b/scripts/cross-compile.sh
index 07d187587bd..2b7e2786fb9 100755
--- a/scripts/cross-compile.sh
+++ b/scripts/cross-compile.sh
@@ -2,7 +2,7 @@
COMPILER_CONTAINER="stashapp/compiler:7"
-BUILD_DATE=`go run -mod=vendor scripts/getDate.go`
+BUILD_DATE=`go run scripts/getDate.go`
GITHASH=`git rev-parse --short HEAD`
STASH_VERSION=`git describe --tags --exclude latest_develop`
diff --git a/vendor/github.com/99designs/gqlgen/.dockerignore b/vendor/github.com/99designs/gqlgen/.dockerignore
deleted file mode 100644
index c8aadf3c62a..00000000000
--- a/vendor/github.com/99designs/gqlgen/.dockerignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/**/node_modules
-/codegen/tests/gen
-/vendor
diff --git a/vendor/github.com/99designs/gqlgen/.editorconfig b/vendor/github.com/99designs/gqlgen/.editorconfig
deleted file mode 100644
index feba8bbfc8e..00000000000
--- a/vendor/github.com/99designs/gqlgen/.editorconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-root = true
-
-[*]
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-indent_style = space
-indent_size = 4
-
-[*.{go,gotpl}]
-indent_style = tab
-
-[*.yml]
-indent_size = 2
-
-# These often end up with go code inside, so lets keep tabs
-[*.{html,md}]
-indent_size = 2
-indent_style = tab
diff --git a/vendor/github.com/99designs/gqlgen/.gitattributes b/vendor/github.com/99designs/gqlgen/.gitattributes
deleted file mode 100644
index 05550114cea..00000000000
--- a/vendor/github.com/99designs/gqlgen/.gitattributes
+++ /dev/null
@@ -1,3 +0,0 @@
-/codegen/templates/data.go linguist-generated
-/_examples/dataloader/*_gen.go linguist-generated
-generated.go linguist-generated
diff --git a/vendor/github.com/99designs/gqlgen/.gitignore b/vendor/github.com/99designs/gqlgen/.gitignore
deleted file mode 100644
index 9fb9693df8e..00000000000
--- a/vendor/github.com/99designs/gqlgen/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/vendor
-/docs/public
-/docs/.hugo_build.lock
-/_examples/chat/node_modules
-/integration/node_modules
-/integration/schema-fetched.graphql
-/_examples/chat/package-lock.json
-/_examples/federation/package-lock.json
-/_examples/federation/node_modules
-/codegen/gen
-/gen
-
-/.vscode
-.idea/
-*.test
-*.out
diff --git a/vendor/github.com/99designs/gqlgen/.golangci.yml b/vendor/github.com/99designs/gqlgen/.golangci.yml
deleted file mode 100644
index 21099b69b05..00000000000
--- a/vendor/github.com/99designs/gqlgen/.golangci.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-run:
- tests: true
- skip-dirs:
- - bin
-
-linters-settings:
- errcheck:
- ignore: fmt:.*,[rR]ead|[wW]rite|[cC]lose,io:Copy
-
-linters:
- disable-all: true
- enable:
- - bodyclose
- - deadcode
- - depguard
- - dupl
- - errcheck
- - gocritic
- - gofmt
- - goimports
- - gosimple
- - govet
- - ineffassign
- - misspell
- - nakedret
- - prealloc
- - staticcheck
- - structcheck
- - typecheck
- - unconvert
- - unused
- - varcheck
-
-issues:
- exclude-rules:
- # Exclude some linters from running on tests files.
- - path: _test\.go
- linters:
- - dupl
diff --git a/vendor/github.com/99designs/gqlgen/CHANGELOG.md b/vendor/github.com/99designs/gqlgen/CHANGELOG.md
deleted file mode 100644
index af09f4bfec6..00000000000
--- a/vendor/github.com/99designs/gqlgen/CHANGELOG.md
+++ /dev/null
@@ -1,8634 +0,0 @@
-# CHANGELOG
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-
-## [Unreleased](https://github.com/99designs/gqlgen/compare/v0.17.1...HEAD)
-
-
-
-
-## [v0.17.1](https://github.com/99designs/gqlgen/compare/v0.17.0...v0.17.1) - 2022-03-02
-
9f520a28 Update golangci-lint and fix resource leak (#2024 )
-
-* Fix golangci-lint in CI
-
-* Fix resource leak
-
-
-
-- 74baaa14 fixed model gen for multiple implemented type (#2021 )
-
-- d31cf6be v0.17.0 postrelease bump
-
-
-
-
-
-
-## [v0.17.0](https://github.com/99designs/gqlgen/compare/v0.16.0...v0.17.0) - 2022-03-01
-- e4be5651 release v0.17.0
-
-082bbff6 Revert "Update quickstart (#1850](https://github.com/99designs/gqlgen/issues/1850))" ([#2014 )
-
-This reverts commit 0ab636144bfc875f86e4d9fd7a2686bc57d5050c.
-
-
-
-- a58411b8 Embed templates instead of inlining them (#2019 )
-
-- 839b50df Test gqlgen generate in CI (#2017 )
-
-- 00dc14ad Remove ambient imports (#2016 )
-
-45e192ea Clean up docs to clarify how to use a particular version (#2015 ) (closes #1851 )
-
-This reverts commit 57a148f6d12572fe585ecfcafafbb7441dbf9cab.
-
-* Update getting-started.md
-
-* Update getting-started.md
-
-
-
-- 3a9413f7 Fix issue template
-
-5236fb09 fix introspection for description to be nullable (#2008 )
-
-* fixed introspection for description to be nullable
-
-* regenerated for integration
-
-* regenerated
-
-* fixed introspection package
-
-* regenerated
-
-
-
-82fefdb5 support to generate model for intermediate interface (#1982 )
-
-* support to generate model for intermediate interface
-
-* go generate ./... in example
-
-* fixed filepath generation
-
-
-
-3ec83635 Bump ajv from 6.10.2 to 6.12.6 in /integration (#2007 )
-
-Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6.
-- [Release notes](https://github.com/ajv-validator/ajv/releases)
-- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6)
-
----
-updated-dependencies:
-- dependency-name: ajv
- dependency-type: indirect
-...
-
-
-
-9546de2c Web Socket initialization message timeout (#2006 )
-
-* Added an optional timeout to the web socket initialization message read operation.
-
-* Added a fail message to a web socket init read timeout test.
-
-
-
-f6ea6230 fixed introspection for schema description and specifiedByhttps://github.com/99designs/gqlgen (#1986 )
-
-* fixed introspection for schema description and specifiedByURL
-
-* updated to the master latest
-
-* fixed Description resolver
-
-* updated integration go file
-
-* fixed codegen tests for the latest gqlparser
-
-* updated go mod in example
-
-* go generate
-
-* skip specifiedBy
-
-* regenerate
-
-* fixed schema-expected.graphql for the latest
-
-* fixed integration test to use latest tools
-
-* fixed integration workflow
-
-* use v2.4.0
-
-* fixed sum
-
-
-
-- f17ca15e Fix broken links in docs (#1983 ) (closes #1734 )
-
-- a0c856b7 Added a callback error handling function to the websocket and added tests for it. (#1975 )
-
-- cfea9f07 generate resolvers for input types (#1950 )
-
-ffa857ef Websocket i/o timeout fix (#1973 )
-
-* Renamed "pingMesageType" to "pingMessageType" and refactored websocket_graphqlws.go to look more like websocket_graphql_transport_ws.go for the sake of consistency.
-
-* Made the keep-alive messages graphql-ws only, and the ping-pong messages graphql-transport-ws only (and added tests for it).
-
-* gofmt
-
-
-
-d7da5b0d Merge pull request #1958 from 99designs/cleanup-main
-
-Cleanup main
-
-
-
-42f32432 Merge pull request #1957 from 99designs/move-init-ci
-
-Upate init CI step
-
-
-
-- be164748 Cleanup main
-
-- 8ea290c0 Upate init CI step
-
-- 56bfb188 Fix 1955: only print message on @key](https://github.com/key) found on interfaces ([#1956 )
-
-213a085b rename "example" dir to "_examples" (#1734 )
-
-* rename "example" dir to "_examples"
-
-* fix lint
-
-* Adjust permissions
-
-
-
-9262b358 fix: typo in dataloader code sample (#1954 )
-
-* fix: typo in dataloader code sample
-
-* rename k to key for sample to compile
-
-
-
-- a0543733 remove autobind example (#1949 )
-
-06bbca37 docs: migrate dataloaders sample to graph-gophers/dataloader (#1871 )
-
-* docs: add dataloader sample
-
-* finish example
-
-* add example
-
-* simplify method
-
-* replace old example
-
-* styling
-
-* Update docs/content/reference/dataloaders.md
-
-* Update docs/content/reference/dataloaders.md
-
-* Update docs/content/reference/dataloaders.md
-
-* Update docs/content/reference/dataloaders.md
-
-
-
-f9fcfa16 Comment out autobind in the sample config file (#1872 )
-
-The reason is that many people using it for the first time copy exactly that configuration example and then open the issues to say it doesn't work.
-
-
-
-- a30b68de fix: whitelist VERSION and CURRENT_VERSION env vars (#1870 )
-
-76a533b8 Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8 (#1858 )
-
-* Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8
-
-Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.4 to 2.2.8.
-- [Release notes](https://github.com/go-yaml/yaml/releases)
-- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.4...v2.2.8)
-
----
-updated-dependencies:
-- dependency-name: gopkg.in/yaml.v2
- dependency-type: direct:production
-...
-
-
-* Update go sum for example
-
-
-
-eed4301c Bump node-fetch from 2.6.1 to 2.6.7 in /integration (#1859 )
-
-Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
-- [Release notes](https://github.com/node-fetch/node-fetch/releases)
-- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)
-
----
-updated-dependencies:
-- dependency-name: node-fetch
- dependency-type: direct:development
-...
-
-
-
-- 7f5dce6d Fix #1776](https://github.com/99designs/gqlgen/issues/1776) : Edit and persist headers in GraphiQL ([#1856 )
-
-- e0b42f99 fix requires directive with nested field when entityResolver directive is used (#1863 )
-
-- 25c2cdcb Fix #1636](https://github.com/99designs/gqlgen/issues/1636) by updating gqlparser ([#1857 )
-
-- c161ab38 fix #1770](https://github.com/99designs/gqlgen/issues/1770) minor error in getting-started.md ([#1771 )
-
-57a148f6 Remove outdated version reference so example is always for latest (#1851 )
-
-* Also update version reference to next
-
-* Update getting-started.md
-
-
-
-- 0ab63614 Update quickstart (#1850 )
-
-a8eba26d Fix #1777](https://github.com/99designs/gqlgen/issues/1777) by updating version constant and adding release checklist ([#1848 )
-
-* Revise to use script 🤦
-
-
-
-
-
-
-
-
-## [v0.16.0](https://github.com/99designs/gqlgen/compare/v0.15.1...v0.16.0) - 2022-01-24
-- b90f9750 Merge branch 'master' of github.com:99designs/gqlgen
-
-- 99523e44 Prepare for v0.16.0 release (#1842 )
-
-- 0563146c Prepare for v0.16.0 release
-
-7cefef26 add PrependPlugin (#1839 )
-
-* add PrependPlugin
-
-related: https://github.com/99designs/gqlgen/pull/1838
-
-* added test for PrependPlugin
-
-
-
-972878a0 Revert "Fix plugin addition (#1717](https://github.com/99designs/gqlgen/issues/1717))" ([#1838 )
-
-This reverts commit f591c8f797e35635fb5eb0e4465c77b6a073896b.
-
-
-
-1ed7e050 Fix #1832](https://github.com/99designs/gqlgen/issues/1832) [@requires](https://github.com/requires) directive when [@entityResolver](https://github.com/entityResolver) is used ([#1833 )
-
-* fix requires directive for multipleEntity directive
-
-
-* fix lint
-
-
-
-fcee4c40 Update README.md (#1836 )
-
-Corrected a simple grammar typo.
-
-
-
-3fb5fd99 Fix #1834](https://github.com/99designs/gqlgen/issues/1834): Implement federation correctly ([#1835 )
-
-* Fix federation implementation which does not conform to Apollo Federation subgraph specification
-
-* Optimize generated line breaks
-
-* Run go generate
-
-
-
-98665071 Imporve gqlgen test cases (#1773 ) (closes #1765 )
-
-* Imporve test cases for init and generate
-
-
-
-5d904d87 Merge pull request #1778 from ipfans/gh-pages-patch
-
-Bump gqlgen.com version list
-
-
-
-- 196ee13b Bump gqlgen.com version
-
-
-
-
-
-
-## [v0.15.1](https://github.com/99designs/gqlgen/compare/v0.15.0...v0.15.1) - 2022-01-16
-- 7102a36b Prepare for 0.15.1 release
-
-2b8f50b3 Fix #1765](https://github.com/99designs/gqlgen/issues/1765): Sometimes module info not exists or not loaded. ([#1767 )
-
-* Remove failing test
-
-
-
-- 46502e5e fixed broken link (#1768 )
-
-
-
-
-
-
-## [v0.15.0](https://github.com/99designs/gqlgen/compare/v0.14.0...v0.15.0) - 2022-01-14
-- 99be1951 Prepare for release
-
-931271a2 Fix #1762](https://github.com/99designs/gqlgen/issues/1762): Reload packages before merging type systems ([#1763 )
-
-* run gofmt on file
-
-
-
-- e5b5e832 Improve performance of MarshalBoolean (#1757 )
-
-57664bf0 Migrate playgrounds to GraphiQL (#1751 )
-
-* migrate to GraphiQL playground
-
-* fix lint
-
-
-
-b2a832d5 Avoid problems with `val` being undefined in the federation template. (#1760 )
-
-* Avoid problems with `val` being undefined in the federation template.
-
-When running gqlgen over our schema, we were seeing errors like:
-```
-assignments/generated/graphql/service.go:300:4: val declared but not used
-```
-
-The generated code looks like this:
-```
-func entityResolverNameForMobileNavigation(ctx context.Context, rep map[string]interface{}) (string, error) {
- for {
- var (
- m map[string]interface{}
- val interface{}
- ok bool
- )
- m = rep
- if _, ok = m["kaid"]; !ok {
- break
- }
- m = rep
- if _, ok = m["language"]; !ok {
- break
- }
- return "findMobileNavigationByKaidAndLanguage", nil
- }
- return "", fmt.Errorf("%w for MobileNavigation", ErrTypeNotFound)
-}
-```
-
-Looking at the code, it's pretty clear that this happens when there
-are multiple key-fields, but each of them has only one keyField.Field
-entry. This is because the old code looked at `len(keyFields)` to
-decide whether to declare the `val` variable, but looks at
-`len(keyField.Field)` for each keyField to decide whether to use the
-`val` variable.
-
-The easiest solution, and the one I do in this PR, is to just declare
-`val` all the time, and use a null-assignment to quiet the compiler
-when it's not used.
-
-* run go generate to update generated files
-
-* run go generate to update moar generated files
-
-* Adding a test for verify that this fixes the issue.
-
-From `plugins/federation`, run the following command and verify that no errors are produced
-
-```
-go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
-```
-
-
-
-47015f12 Added pointer to a solution for `no Go files` err (#1747 )
-
-While following the instructions in this getting started guide I run into this error `package github.com/99designs/gqlgen: no Go files` which was pretty annoying to fix. Its a golang issue but for people who are unfamiliar with how the `go generate` command works in vendored projects its a blocker trying to follow the rest of this guide. It will be really nice to at least have a pointer in the guide for people to find a possible solution to the issue while going through the guide. I'm sure many folks have run into this issue given vendoring is now very popular with the latest go releases.
-
-
-
-- 27a2b210 Downgrade to Go 1.16 (#1743 )
-
-14cfee70 Support for multiple @key](https://github.com/key) directives in federation (reworked) ([#1723 )
-
-* address review comments
-
-- reworked code generation for federation.go
-- better checking for missing/incorrect parameters to entity resolver functions
-- better tests for generated entity resolvers
-
-Still missing:
-- suggested test for autobind vs non-autobind generation
-- could probably clean up generated code spacing, etc
-
-
-
-- 2747bd5f Add CSV and PDF to common initialisms (#1741 )
-
-44beadc1 Fix list coercion when using graphql variables (#1740 )
-
-* fix(codegen): support coercion of lists in graphql variables
-
-This was broken by an upstream dependency `gqlparser` coercing variables during validation. this has broken the existing coercion process withing `gqlgen`
-
-* test: add list coercion integration tests
-
-* chore: regenerate generated code
-
-* test: update expected schema for integration tests
-
-* chore: run goimports
-
-* chore: regenerate examples
-
-
-
-bd8938d8 fix: automatically register built-in directive goTag (#1737 )
-
-* fix: automatically register built-in tag goTag
-
-* doc: add directive config documentation
-
-
-
-497227fa Close Websocket Connection on Context close/cancel (#1728 )
-
-* Added code to the web socket so it closes when the context is cancelled (with an optional close reason).
-
-* Added a test.
-
-* go fmt
-
-
-* Fix linter issues about the cancel function being thrown away.
-
-
-
-- 4581fccd Don't loose field arguments when none match (#1725 )
-
-213ecd93 Add support for graphql-transport-ws with duplex ping-pong (#1578 )
-
-* Add support for graphql-transport-ws with duplex ping-pong
-
-* Add tests for the duplex ping-pong
-
-
-
-- ae92c83d add federation tests (#1719 )
-
-- f591c8f7 Fix plugin addition (#1717 )
-
-- 8fa6470f Fix #1704](https://github.com/99designs/gqlgen/issues/1704): handle [@required](https://github.com/required) nested fields as in [@key](https://github.com/key) ([#1706 )
-
-af33b7cd Cleaning up extra return in federation generated code (#1713 )
-
-In PR 1709, I introduced GetMany semantics for resolving federated entities. But I left a couple of extra return statements in the generated code that are not necessary. So Im just cleaning those up here.
-
-Also added `go:generate` in federation entity resolver tests to make it simpler to test.
-
-To test:
-```
-go generate ./... && cd example/ && go generate ./... && cd ..
-go test -race ./... && cd example && go test -race ./... && cd ..
-```
-
-
-
-402a2259 Optimize performance for binder, imports and packages (Rebased from sbalabanov/master) (#1711 )
-
-* Cache go.mod resolution for module name search
-
-* Optimize binder.FindObject() for performance by eliminating repeatitive constructs
-
-* Optimize allocations in packages.Load() function
-
-* Optimize binder.FindObject() by indexing object definitions for each loaded package
-
-* goimports to fix linting
-
-
-
-- 237a7e6a Separate golangci-lint from other jobs (#1712 )
-
-50292e99 Resolve multiple federated entities in a single entityResolve call (#1709 )
-
-* Resolve multiple federated entities in a single entityResolve call
-
-Entity resolver functions can only process one entity at a time. But often we want to resolve all the entities at once so that we can optimize things like database calls. And to do that you need to add you'd need to add batching with abstractions like dataloadgen or batchloader. The drawback here is that the resolver code (the domain logic) gets more complex to implement, test, and debug.
-
-An alternative is to have entity resolvers that can process all the representations in a single call so that domain logic can have access to all the representations up front, which is what Im adding in this PR.
-
-There are a few moving pieces here:
-3. When that's configured, the federation plugin will create an entity resolver that will take a list of representations.
-
-Please note that this is very specific to federation and entity resolvers. This does not add support for resolving fields in an entity.
-
-Some of the implementation details worth noting. In order to efficiently process batches of entities, I group them by type so that we can process groups of entities at the same time. The resolution of groups of entities run concurrently in Go routines. If there is _only_ one type, then that's just processed without concurrency. Entities that don't have multiget enabled will still continue to resolve concurrently with Go routines, and entities that have multiget enabled just get the entire list of representations.
-
-The list of representations that are passed to entity resolvers are strongly types, and the type is generated for you.
-
-There are lots of new tests to ensure that there are no regressions and that the new functionality still functions as expected. To test:
-1. Go to `plugin/federation`
-2. Generate files with `go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml`
-3. And run `go test ./...`. Verify they all pass.
-
-You can look at the federated code in `plugin/federation/testdata/entityresolver/gederated/federation.go`
-
-* Added `InputType` in entity to centralize logic for generating types for multiget resolvers.
-
-* reformat and regenerate
-
-
-
-80713b84 Adding entity resolver tests for errors, entities with different type… (#1708 )
-
-* Adding entity resolver tests for errors, entities with different types, and requires
-
-The tests in this PR are for ensuring we get the expected errors from entity resolvers, that we also handle resolving entities where the representations are for different types, and that requires directive works correctly.
-
-To run tests:
-1. Go to `plugin/federation`
-2. Generate files with `go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml`
-3. And run `go test ./...`. Verify they all pass.
-
-* Fixed test for errors
-
-
-
-- ed2d6998 Replace ! with _ in root.generated file to avoid build conflicts (#1701 )
-
-828820af transport: implement `graphql-transport-ws` ws sub-protocol (#1507 )
-
-* websocket: create `messageExchanger` to handle subprotocol messages
-
-* remove unused type
-
-* typo in comments
-
-* change `graphqlwsMessageType` type to string
-
-* add support for `graphql-transport-ws` subprotocol
-
-* fix chat app example
-
-* update example chat app dependencies
-
-* improve chat app exmaple to use the recommended ws library
-
-* add tests
-
-* removed unused const in tests
-
-* Update example/chat/readme.md
-
-
-
-- 28caa6ce Ignore generated files from test coverage (#1699 )
-
-- 7ac988de Fix linting issue
-
-01d3c4f8 Entity resolver tests (#1697 )
-
-* Moving federation tests to their own folders
-
-Reorganizing the tests in the federation plugin a little bit so make it simpler to add more safely without testdata colliding. This is in anticipation for a follow up PR for adding entity resolver tests.
-
-Run the tests with `go test ./plugin/federation/...` and verify they all pass. Also verify that the testdata/allthething directory has a `generated` directory specific to that test.
-
-NOTE: There is a catch all type of test that I moved to the directory `allthething`. Open to suggestions for a better name! One potential thing to considere here is to split up the tests that use that testdata and break them down into more specific tests. E.g. Add a multikey test in the testdata/entity. For now, Im leaving that as a TODO.
-
-* Adding entity resolver tests in the federation plugin
-
-The tests work by sending `_entities` queries with `representation` variables directly to the mocked server, which will allow us to test generated federation code end to end. For context, the format of the entity query is something like:
-
-```
-query($representations:[_Any!]!){_entities(representations:$representations){ ...on Hello{secondary} }}
-```
-
-And `representations` are the list of federated keys for the entities being resovled, and they look like
-
-```
-representations: [{
- "__typename": "Hello",
- "name": "federated key value 1",
-}, {
- "__typename": "Hello",
- "name": "federated key value 2",
-}]
-```
-
-The entity resolver tests are in `plugin/federation/federation_entityresolver_test.go` and they rely on `plugin/federation/testdata/entityresolver`.
-
-To run the tests:
-1. Build the entityresolver testdata
- - From plugin/federation, run `go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml`
-2. Run the tests with `go test ./...` or similar
-
-
-
-b7db36d3 Revert "Support for multiple @key](https://github.com/key) directives in federation ([#1684](https://github.com/99designs/gqlgen/issues/1684))" ([#1698 )
-
-This reverts commit 47de912f56cd4bd6da9b74929cd67b8881617026.
-
-
-
-- 4a4b5601 DOC: Fixed indention in example code. (#1693 )
-
-47de912f Support for multiple @key](https://github.com/key) directives in federation ([#1684 )
-
-* add more unit test coverage to plugin/federation
-
-
-
-59a30919 Reimplement goTag using FieldMutateHook (#1682 )
-
-* Reimplement goTag using a FieldMutateHook
-
-This change does not change the logic of goTag, merely reimplements it using a FieldMutateHook and sets it as the default FieldMutateHook for the modelgen plugin.
-
-* Add repeated tag test
-
-
-
-37a4e7ee Rename `@extraTag](https://github.com/extraTag)` directive to `[@goTag](https://github.com/goTag)` and make repeatable ([#1680 )
-
-* Allow Repeatable `goTag` Directive
-
-* Default to field name if none provided
-
-* Update Docs
-
-
-
-87f9e436 Fix nil pointer dereference when an invalid import is bound to a model (#1676 )
-
-* Fixes remaining Name field in singlefile test
-
-* Fixes nill pointer dereference when an invalid import is bound to a model
-
-* Only return error if we failed to find type
-
-* Revert "Fixes remaining Name field in singlefile test"
-
-This reverts commit e43ebf7aa80f884afdb3feca90867b1eff593f01.
-
-* Undo change of log.Println -> fmt.Println
-
-Totally accidental, sorry!
-
-
-
-6c65e8f1 Update getting-started.md (#1674 )
-
-missing an 's' on quoted filename default
-
-
-
-- 3bbc2a34 feat: generate resolvers for inputs if fields are missing (#1404 )
-
-7db941a5 Fix 1138: nested fieldset support (#1669 )
-
-* formatting
-
-* update federation schema to latest Apollo spec
-
-
-also:
-handle extra spaces in FieldSet
-upgrade deps in federation integration tests
-
-
-
-488a31fc ContextMarshaler (#1652 )
-
-* Add interface and detection for ContextMarshaler
-
-* Test error on float marshalling
-
-* Revert prettier changes
-
-* Rename context test
-
-* Only use the erroring float printer
-
-* Test that context is passed to marshal functions
-
-* Update scalar docs to include the context
-
-* Generate the examples
-
-* Move ContextMarshaller test code to new followschema
-
-* Resolve conflict a little more
-
-
-* Replicate sclar test for singlefile
-
-
-
-- a626d9b4 Add ICMP to common initialisms (#1666 )
-
-- db4b5eb7 Merge Inline Fragment Nested Interface Fields (#1663 )
-
-8b973717 Update directives doc page (#1660 )
-
-* Update directives doc page
-
-* Add back one beloved piece of jargon
-
-
-
-1f500016 Add follow-schema layout for exec (#1309 ) (closes #1265 )
-
-* Define ExecConfig separate from PackageConfig
-
-When support for writing generated code to a directory instead of
-a single file is added, ExecConfig will need additional fields
-that will not be relevant to other users of PackageConfig.
-
-* Add single-file, follow-schema layouts
-
-When `ExecLayout` is set to `follow-schema`, output generated code to a
-directory instead of a single file. Each file in the output directory
-will correspond to a single *.graphql schema file (plus a
-root!.generated.go file containing top-level definitions that are not
-specific to a single schema file).
-
-`ExecLayout` defaults to `single-file`, which is the current behavior, so
-this new functionality is opt-in.
-
-These layouts expose similar functionality to the `ResolverLayout`s with
-the same name, just applied to `exec` instead of `resolver`.
-
-
-* Rebase, regenerate
-
-
-
-12978359 Update GQLgen test client to work with multipart form data (take 2) (#1661 )
-
-* Update GQLgen test client to work with multipart form data
-
-Update the GQLgen to support multipart form data, like those present
-within the fileupload examples.
-
-- Add missing space between "unsupported encoding " and failing
- content-type header error
-
-(cherry picked from commit 101842f73fb79b10c1299bb40506080e08543ec6)
-
-* Add WithFiles client option for fileupload GQLgen client tests
-
-Add a `WithFiles` GQLgen client option to support the fileupload input
-within tests, using the core Golang `os` package and File type, which
-converts `os.File`s to their appropriate multipart form data within a
-request.
-
-- If there are no files this should just simply convert a
- `application/json` Content-Type to supported `multipart/form-data`
-
-(cherry picked from commit 08ef942416c98a2cadf61223308a3ff3c879d1c9)
-
-* Update fileupload test to use GQLgen test client
-
-Update the fileupload test to use the GQLgen test client and `WithFiles`
-option to remove the need for `createUploadRequest` helper with raw http
-posts
-
-- Fix setting the Content Type by using the appropriate `http` package
- function to dectect it
-
- + https://godoc.org/net/http#DetectContentType
-
-(cherry picked from commit 5e573d51440eba9d457adb4186772577b28ef085)
-
-* Update WithFiles option test with multipart Reader
-
-(cherry picked from commit 6dfa3cbe0647138e80a59a0c1d55dd9c900f96f2)
-
-* Update file upload tests `WithFiles` option
-
-Update the file upload tests to use the GQL test client and its
-`WithFiles` option to remove the need for a custom raw HTTP post request
-builder `createUploadRequest`.
-
-- Also update `WithFiles` option to group & map identical files; e.g.
-
- ```
- { "0": ["variables.req.0.file", "variables.req.1.file"] }
- ```
-
-(cherry picked from commit 486d9f1b2b200701f9ce6b386736a633547c1441)
-
-* Make sure `WithFiles` does not add duplicates to multipart form data
-
-(cherry picked from commit 0c2364d8495553051d97ab805618b006fcd9eddb)
-
-* Fix use of byte vs string in `WithFiles` tests
-
-(cherry picked from commit ba10b5b1c52a74e63e825ee57c235254e8821e0d)
-
-* Fix strict withFiles option test for race conditions
-
-Fix a problem with how strict the test's expected response was for tests
-with files in their request, since it always expected a strict order of
-files input that is somewhat random or dependent on what OS it is
-running the test on and/or race condition
-
-
-
-7435403c Adds RootFieldInterceptor to extension interfaces (#1647 )
-
-* Adds RootFieldInterceptor to extension interfaces
-
-
-* Regenerates example folder
-
-
-* Re-generate after changes
-
-
-
-- 8b25c9e0 Add a config option to skip running "go mod tidy" on code generation (#1644 )
-
-658195b7 Revert "Update GQLgen test client to work with multipart form data (#1418](https://github.com/99designs/gqlgen/issues/1418))" ([#1659 )
-
-This reverts commit 1318f12792e86c76a2cdff9132ebac5b3e30e148.
-
-
-
-- 41c86765 Revert 1595 (#1658 )
-
-- 8359f974 Allow custom websocket upgrader (#1595 )
-
-1318f127 Update GQLgen test client to work with multipart form data (#1418 )
-
-* Update GQLgen test client to work with multipart form data
-
-Update the GQLgen to support multipart form data, like those present
-within the fileupload examples.
-
-- Add missing space between "unsupported encoding " and failing
- content-type header error
-
-* Add WithFiles client option for fileupload GQLgen client tests
-
-Add a `WithFiles` GQLgen client option to support the fileupload input
-within tests, using the core Golang `os` package and File type, which
-converts `os.File`s to their appropriate multipart form data within a
-request.
-
-- If there are no files this should just simply convert a
- `application/json` Content-Type to supported `multipart/form-data`
-
-* Update fileupload test to use GQLgen test client
-
-Update the fileupload test to use the GQLgen test client and `WithFiles`
-option to remove the need for `createUploadRequest` helper with raw http
-posts
-
-- Fix setting the Content Type by using the appropriate `http` package
- function to dectect it
-
- + https://godoc.org/net/http#DetectContentType
-
-* Update WithFiles option test with multipart Reader
-
-* Update file upload tests `WithFiles` option
-
-Update the file upload tests to use the GQL test client and its
-`WithFiles` option to remove the need for a custom raw HTTP post request
-builder `createUploadRequest`.
-
-- Also update `WithFiles` option to group & map identical files; e.g.
-
- ```
- { "0": ["variables.req.0.file", "variables.req.1.file"] }
- ```
-
-* Make sure `WithFiles` does not add duplicates to multipart form data
-
-* Fix use of byte vs string in `WithFiles` tests
-
-
-
-- 6758654c raise panic when nested @requires](https://github.com/requires) are used on federation ([#1655 )
-
-f6c35be2 Add ReplacePlugin option to replace a specific plugin (#1657 )
-
-* Add Helper Option for replacing plugins
-
-* Update recipe to use ReplacePlugin instead of NoPlugin and AddPlugin
-
-* fix linting issue on comment
-
-
-
-f8c46600 fix double indirect bug (#1604 ) (closes #1587 )
-
-* invalid code generated
-
-* update code generation for pointer-to-pointer updating
-
-
-
-- 629c91a2 remove extra WithOperationContext call (#1641 )
-
-- 35199c49 codegen: ensure Elem present before using (#1317 )
-
-bfea93cd Reload config packages after generating models (#1491 )
-
-If models are generated in a package that has already been loaded, and
-that package refers to another package that has already been loaded, we
-can find ourselves in a position where it appears that a GQL `union` is
-not satisfied.
-
-For example, if we have:
-
-```
-union Subject = User
-```
-
-with this gqlgen.yml in github.com/wendorf/gqlgen-error/gql:
-
-```
-schema:
-- schema.graphql
-exec:
- filename: generated.go
-model:
-
- filename: models_gen.go
-models:
- User:
- model: github.com/wendorf/gqlgen-error/gql.User
- Subject:
- model: github.com/wendorf/gqlgen-error/models.Subject
-```
-
-Note that our User model is in the github.com/wendorf/gqlgen-error.gql
-package, and our models_gen.go will be generated in that same package.
-
-When we try to run gqlgen, we get this error:
-
-```
-merging type systems failed: unable to bind to interface: github.com/wendorf/gqlgen-error/gql.User does not satisfy the interface github.com/wendorf/gqlgen-error/models.Subject
-```
-
-Digging deeper, it's because we use types.Implements in
-codegen/interface.go, which does a shallow object comparison. Because
-the type has been reloaded, it refers to a _different_ interface type
-object than the one we're comparing against, and get a false negative.
-
-By clearing the package cache and repopulating it, the whole package
-cache is generated at the same time, and comparisons across packages
-work.
-
-To see a demo of this, check out
-https://github.com/wendorf/gqlgen-error and try the following:
-
-1. Checkout the works-with-v0.10.2 branch and `go generate ./...` to see
- that it works
-2. Checkout the breaks-with-v0.13.0 branch (or run go get
- to see errors
-3. Checkout the works-with-pull-request branch and `go generate ./...`
- to see that it works again. This branch adds a go.mod replace
- directive to use the gqlgen code in this PR.
-
-The demo starts at v0.10.2 since it is the last release without this
-problem. https://github.com/99designs/gqlgen/pull/1020 introduces the
-code that fails in this scenario.
-
-
-
-9e0817cd Add graphql schema aware field level hook to modelgen (#1650 )
-
-* Add ast aware field level hook to modelgen
-
-Currently, the only mechanism for extending the model generation is to use a BuildMutateHook at the end of the model generation process. This can be quite limiting as the hook only has scope of the model build and not the graphql schema which has been parsed.
-
-This change adds a hook at the end of the field creation process which provides access to the parsed graphql type definition and field definition. This allows for more flexibility for example adding additional tags to the model based off custom directives
-
-* Add recipe for using the modelgen FieldMutateHook
-
-* fix goimport linting issue in models_test
-
-
-
-af2ac061 handling unconventional naming used in type names (#1549 )
-
-* handling unconventional naming used in type names
-
-* Fix merge resolution mistake
-
-* Fix merge resolution mistake
-
-
-
-- 393f7554 add extraTag directive (#1173 )
-
-- fd1bd7c9 adding support for sending extension with gqlgen client (#1633 )
-
-589a7742 Enable lowercase type names in GraphQL schema to properly render (#1359 )
-
-The difficulty with lowercased type names is that in go code any lowercased name is not exported.
-This change makes the names title case for go code while preserving the proper case when interacting with the GraphQL schema.
-
-
-
-- 50f6a2aa Fixes #1653](https://github.com/99designs/gqlgen/issues/1653): update docs and wrap error if not *gqlerror.Error ([#1654 )
-
-7081dedb Bump tmpl from 1.0.4 to 1.0.5 in /integration (#1627 )
-
-Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
-- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
-- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)
-
----
-updated-dependencies:
-- dependency-name: tmpl
- dependency-type: indirect
-...
-
-
-
-5287e4e5 Add QR and KVK to common initialisms (#1419 )
-
-* Add QR and KVK to common initialisms
-
-* Update templates.go
-
-* Sort commonInitialisms
-
-
-
-f9df1a46 Update time format for `Time` scalar (#1648 )
-
-* Use more precise time format
-
-* update test
-
-* update docs
-
-* Apply suggestions from code review
-
-* Update scalars.md
-
-
-
-77c757f0 Merge pull request #1640 from minus7/master
-
-Fix example run instructions
-
-
-
-e60dc7af Merge pull request #1619 from Khan/benkraft.mod-tidy-stdout
-
-Forward `go mod tidy` stdout/stderr
-
-
-
-0c63f1d1 Merge pull request #1515 from OpenSourceProjects/time
-
-Marshaling & Unmarshaling time return initial value
-
-
-
-- a3d9e8ce Remove redundant favicon (#1638 )
-
-- 210c1aa6 Appropriately Handle Falsy Default Field Values (#1623 )
-
-47ce074a Fix example run instructions (closes #1607 )
-
-Making ./example a separate Go module [1] broke the `go run` invocations
-listed in a few example readmes [2]. Using relative paths from the
-respective example directory should be clear enough.
-
-[2]:
-example/todo/server/server.go:10:2: no required module provides package github.com/99designs/gqlgen/example/todo; to add it:
- go get github.com/99designs/gqlgen/example/todo
-
-
-
-- 1a0b19fe Update README.md
-
-d9998283 Merge pull request #1628 from robertmarsal/patch-1
-
-Fix typo in the getting-started docs
-
-
-
-- f93f73ac Fix typo in the getting-started docs
-
-2f6919ff Merge pull request #1624 from FlymeDllVa/master
-
-Update disabling Introspection
-
-
-
-- c53bc0e5 Update disabling Introspection
-
-- 880cd73d Update README.md
-
-- eec81df0 Update README.md
-
-43b56cba Forward `go mod tidy` stdout/stderr
-
-This is a command that can fail (in my case I think for stupid reasons
-in a hell of my own construction, but nonetheless). Right now we just
-get
-```
-$ go run github.com/Khan/webapp/dev/cmd/gqlgen
-tidy failed: go mod tidy failed: exit status 1
-exit status 3
-```
-which is not the most informative. Now, instead, we'll forward its
-output to our own stdout/stderr rather than devnull.
-
-
-
-- ce7a8ee4 Fix link in docs
-
-- 488cf7e8 Update docs/content/getting-started.md
-
-- 73809f69 Update getting started
-
-- b938e558 Update README.md
-
-- cacd49a6 Update README.md
-
-7d549d64 Merge pull request #1617 from 99designs/update-docs-for-go1.17
-
-Update docs for getting started
-
-
-
-- 5c52f27c Update docs for getting started
-
-- 41d6926f Replace gitter with discord in contributing.md
-
-- 24d4edcf Update README.md
-
-- 2272e05b Update README.md
-
-ef4d4a38 Merge pull request #1614 from 99designs/go-1.16
-
-Also test against 1.16
-
-
-
-- 00ed6fb1 Also test against 1.16
-
-473f0671 Merge pull request #1613 from 99designs/bump-non-module-deps
-
-Clean up non-module deps
-
-
-
-- 6960c0c2 Bump non-module deps
-
-bf9b34aa Merge pull request #1612 from 99designs/update-linter
-
-Update golangci linter
-
-
-
-- 85e7a4a0 Linting fixes
-
-- 777dabde Update the linter
-
-85dd47bb Merge pull request #1607 from 99designs/example-module
-
-[POC/RFC] Split examples into separate go module
-
-
-
-- f93fb248 Split examples into separate go module
-
-890f5f66 Merge pull request #1610 from 99designs/go-1.17
-
-Update to go 1.17
-
-
-
-- 9162c53f Fix newlines in error messages
-
-- f67a5b26 Update github.com/urfave/cli/v2
-
-1116ea6c Merge pull request #1608 from jjmengze/patch-1
-
-fix Options response header
-
-
-
-- 71e57843 Simplify init
-
-- a8903ca2 Wrap errors
-
-- a644175b Update error checks for go 1.17
-
-- c6b9f292 go mod tidy
-
-- 1c63cfff Add missing model package file
-
-- 59da23fe Create a temporary file on init so go recognises the directory as a package
-
-682a7d66 fix Options response header
-
-operatee the header of ResponseWriter should before WriteHeader called
-
-
-
-- ed8054b0 Update to a post-release version
-
-- 5216db58 Fix TestAutobinding test failure by checking the module
-
-- 90c5eb59 go generate
-
-- 402f4495 go fmt
-
-- 10bb1ef2 Go mod tidy
-
-- ed210385 Update to go 1.17
-
-- 5c7acc1b Fix imports
-
-- d7473870 Update plugin/servergen/server.go
-
-- a6c6de6b Update plugin/resolvergen/resolver.go
-
-- de7d19c8 Update codegen/config/config_test.go
-
-- 60d80d4a Update cmd/gen.go
-
-- a991e3e7 Update errors to use go1.13 semantics
-
-8f179be9 Merge pull request #1581 from tsh96/master
-
-Bypass complexity limit on __Schema queries.
-
-
-
-5048f992 Merge pull request #1525 from Code-Hex/fix/support-input-object
-
-support input object directive
-
-
-
-1e2b303a Merge pull request #1526 from epulze/fix/allow-more-types
-
-allow more than 10 different import sources with types
-
-
-
-e7df3e5c Merge pull request #1405 from alexsn/subsciption-complete-on-panic
-
-subscriptions: send complete message on resolver panic
-
-
-
-06e4fe88 Merge pull request #1529 from mathieupost/master
-
-Return type loading errors in config.Binder.FindObject
-
-
-
-a557c90c Merge pull request #1340 from bickyeric/master
-
-serialize ID just like String
-
-
-
-522cab59 Merge pull request #1285 from Khan/benkraft.federation
-
-Resolve requests for federation entities in parallel
-
-
-
-- 5adb73bb add bypass __schema field test case
-
-- 54cef3dd Bypass complexity limit on __Schema queries.
-
-- f0ccab79 Return type loading errors in config.Binder.FindObject
-
-- 91b54787 generated go code
-
-- 1efc152e supported INPUT_OBJECT directive
-
-- e82b401d allow more than 10 different import sources with types
-
-481a4e44 Marshaling & Unmarshaling time return initial value
-
-There was a lack of symmetry that would prevent times for being
-symmetrical. That is because time.Parse actually parses an RFC3339Nano
-implicitly, thereby allowing nanosecond resolution on unmarshaling a
-time. Therefore we now marshal into nanoseconds, getting more
-information into GraphQL times when querying for a time, and restoring
-the symmetry
-
-
-
-95653193 Resolve requests for federation entities in parallel (closes #1278 )
-
-In apollo federation, we may be asked for data about a list of entities.
-These can typically be resolved in parallel, just as with sibling fields
-in ordinary GraphQL queries. Now we do!
-
-I also changed the behavior such that if one lookup fails, we don't
-cancel the others. This is more consistent with the behavior of other
-resolvers, and is more natural now that they execute in parallel. This,
-plus panic handling, required a little refactoring.
-
-The examples probably give the clearest picture of the changes. (And the
-clearest test; the changed functionality is already exercised by
-`integration-test.js` as watching the test server logs will attest.)
-
-
-
-- f00e2c3f subscriptions: send complete message on resolver panic
-
-- fa371b9b serialize ID just like String
-
-
-
-
-
-
-## [v0.14.0](https://github.com/99designs/gqlgen/compare/v0.13.0...v0.14.0) - 2021-09-08
-- 56451d92 release v0.14.0
-
-8e97969b Merge pull request #1358 from mtsmfm/patch-1
-
-Create package declaration to run dataloaden
-
-
-
-b978593c Merge pull request #1387 from Khan/benkraft.config
-
-codegen/config: Add a new API to finish an already-validated config
-
-
-
-71507dfc Merge pull request #1408 from max107/patch-1
-
-int64 support graphql/string.go
-
-
-
-23577b69 Merge pull request #1460 from snxk/edit-docs-recipe-gin
-
-Edited the Gin-Gonic Recipe Docs
-
-
-
-- db6154b9 Update README.md
-
-cecda160 Merge pull request #1464 from frederikhors/patch-1
-
-Add goreportcard badge
-
-
-
-- cc957171 Merge branch 'master' into patch-1
-
-023f66df Merge pull request #1465 from frederikhors/patch-2
-
-Add coveralls badge
-
-
-
-50c2028a Merge pull request #1497 from polytomic/stable-introspection
-
-Return introspection document in stable order
-
-
-
-a0232dd2 Merge pull request #1603 from 99designs/dependabot/npm_and_yarn/integration/normalize-url-4.5.1
-
-Bump normalize-url from 4.5.0 to 4.5.1 in /integration
-
-
-
-4e059eba Merge pull request #1602 from 99designs/dependabot/npm_and_yarn/integration/ini-1.3.8
-
-Bump ini from 1.3.5 to 1.3.8 in /integration
-
-
-
-43705d45 Merge pull request #1601 from 99designs/dependabot/npm_and_yarn/integration/y18n-3.2.2
-
-Bump y18n from 3.2.1 to 3.2.2 in /integration
-
-
-
-1f2465c6 Merge pull request #1600 from 99designs/dependabot/npm_and_yarn/integration/browserslist-4.17.0
-
-Bump browserslist from 4.14.0 to 4.17.0 in /integration
-
-
-
-bbdebd4c Merge pull request #1599 from 99designs/dependabot/npm_and_yarn/integration/hosted-git-info-2.8.9
-
-Bump hosted-git-info from 2.8.5 to 2.8.9 in /integration
-
-
-
-900a37af Merge pull request #1598 from 99designs/dependabot/npm_and_yarn/integration/node-fetch-2.6.1
-
-Bump node-fetch from 2.6.0 to 2.6.1 in /integration
-
-
-
-9d334cdd Merge pull request #1597 from 99designs/dependabot/npm_and_yarn/integration/ws-7.4.6
-
-Bump ws from 7.3.1 to 7.4.6 in /integration
-
-
-
-56181e8a Merge pull request #1365 from frederikhors/add-uint,-uint64,-uint32-types-in-graphql
-
-add uint, uint64, uint32 types in graphql pkg
-
-
-
-fd133c0b Bump normalize-url from 4.5.0 to 4.5.1 in /integration
-
-Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
-- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
-- [Commits](https://github.com/sindresorhus/normalize-url/commits)
-
----
-updated-dependencies:
-- dependency-name: normalize-url
- dependency-type: indirect
-...
-
-
-
-24d8c703 Bump ini from 1.3.5 to 1.3.8 in /integration
-
-Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
-- [Release notes](https://github.com/isaacs/ini/releases)
-- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)
-
----
-updated-dependencies:
-- dependency-name: ini
- dependency-type: indirect
-...
-
-
-
-de89d3a6 Bump y18n from 3.2.1 to 3.2.2 in /integration
-
-Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
-- [Release notes](https://github.com/yargs/y18n/releases)
-- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
-- [Commits](https://github.com/yargs/y18n/commits)
-
----
-updated-dependencies:
-- dependency-name: y18n
- dependency-type: indirect
-...
-
-
-
-13db6111 Bump browserslist from 4.14.0 to 4.17.0 in /integration
-
-Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.0 to 4.17.0.
-- [Release notes](https://github.com/browserslist/browserslist/releases)
-- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
-- [Commits](https://github.com/browserslist/browserslist/compare/4.14.0...4.17.0)
-
----
-updated-dependencies:
-- dependency-name: browserslist
- dependency-type: indirect
-...
-
-
-
-94e9406e Bump hosted-git-info from 2.8.5 to 2.8.9 in /integration
-
-Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.5 to 2.8.9.
-- [Release notes](https://github.com/npm/hosted-git-info/releases)
-- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
-- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.9)
-
----
-updated-dependencies:
-- dependency-name: hosted-git-info
- dependency-type: indirect
-...
-
-
-
-36be94ff Bump node-fetch from 2.6.0 to 2.6.1 in /integration
-
-Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.0 to 2.6.1.
-- [Release notes](https://github.com/node-fetch/node-fetch/releases)
-- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
-- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.0...v2.6.1)
-
----
-updated-dependencies:
-- dependency-name: node-fetch
- dependency-type: direct:development
-...
-
-
-
-721158f3 Bump ws from 7.3.1 to 7.4.6 in /integration
-
-Bumps [ws](https://github.com/websockets/ws) from 7.3.1 to 7.4.6.
-- [Release notes](https://github.com/websockets/ws/releases)
-- [Commits](https://github.com/websockets/ws/compare/7.3.1...7.4.6)
-
----
-updated-dependencies:
-- dependency-name: ws
- dependency-type: direct:development
-...
-
-
-
-2b3b7212 Merge pull request #1594 from 99designs/dependabot/npm_and_yarn/integration/tar-6.1.11
-
-Bump tar from 6.0.5 to 6.1.11 in /integration
-
-
-
-5b43833d Merge pull request #1582 from 99designs/dependabot/npm_and_yarn/integration/path-parse-1.0.7
-
-Bump path-parse from 1.0.6 to 1.0.7 in /integration
-
-
-
-55b028ca Merge pull request #1584 from nullism/patch-1
-
-Fix spaces -> tabs typo in authentication.md
-
-
-
-edf630a3 Bump tar from 6.0.5 to 6.1.11 in /integration
-
-Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.11.
-- [Release notes](https://github.com/npm/node-tar/releases)
-- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
-- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.11)
-
----
-updated-dependencies:
-- dependency-name: tar
- dependency-type: indirect
-...
-
-
-
-29133c11 Fix spaces -> tabs typo in authentication.md
-
-The indentation here was supposed to be a tab rather than spaces so the readme was off.
-
-
-
-01b25c55 Bump path-parse from 1.0.6 to 1.0.7 in /integration
-
-Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
-- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
-- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
-
----
-updated-dependencies:
-- dependency-name: path-parse
- dependency-type: indirect
-...
-
-
-
-9a214e80 Merge pull request #1451 from sanjeevchopra/patch-1
-
-doc only change: updated sample code for disabling introspection
-
-
-
-01197437 Merge pull request #1417 from RicCu/patch-1
-
-Use mutation instead of query in 'Changesets' doc example
-
-
-
-e3293b53 Merge pull request #1444 from lisowskibraeden/patch-1
-
-Update cors.md
-
-
-
-a4d67855 Merge pull request #1517 from ShivangGoswami/patch-1
-
-Update apq.md function definition mismatch
-
-
-
-eb36f04f Return introspection document in stable order
-
-This avoids spurious changes when generating client code using
-something like graphql-codegen.
-
-
-
-7e38dd46 Merge pull request #1568 from DanyHenriquez/patch-1
-
-Update apq.md
-
-
-
-88f2b8a7 Merge pull request #1572 from talhaguy/dataloaders-doc-casing
-
-Correct minor casing issue
-
-
-
-- be9a0791 Update apq.md
-
-- 3e45ddc1 Correct minor casing issue
-
-- 145101e4 Update apq.md
-
-843edd9e Update apq.md function definition mismatch
-
-line 67: cache, err := NewCache(cfg.RedisAddress, 24*time.Hour)
-line 41: func NewCache(redisAddress string, password string,ttl time.Duration) (*Cache, error)
-
-either password should be removed from 41 or added in line 67
-Proposed the first one for now.
-
-
-
-5ad012e3 Revert "Merge pull request #1511 from a8m/a8m/restore-cwd"
-
-This reverts commit f4bf1f591b6a3884041876deb64ce0dd70c3c883, reversing
-changes made to 3f68ea27a1a9fea2064caf877f7e24d00aa439e6.
-
-Reverting this because it will break existing setups, moving where
-generated files get put.
-
-
-
-- bb59cc43 Add a CHANGELOG.md (#1512 )
-
-- 058a365a Merge pull request #1456 from skaji/issue-1455
-
-bf2fdf44 Merge pull request #1514 from 99designs/bump-gqlparser
-
-Bump gqlparser to v2.2.0
-
-
-
-- 4e881981 Bump to gqlparser v2.2.0
-
-- 1d768a29 Add test covering single element -> slice coercion
-
-- f57d1a02 Bump gqlparser to master & support repeated directives
-
-f4bf1f59 Merge pull request #1511 from a8m/a8m/restore-cwd
-
-codegen/config: restore current working directory after changing it
-
-
-
-- 3f68ea27 Special handling for pointers to slices (#1363 )
-
-c920bdeb Merge pull request #1449 from steebchen/feat-prisma-compat
-
-feat(codegen): handle (v, ok) methods
-
-
-
-3cfc5b14 codegen/config: restore current working directory after changing it
-
-Before this commit, a call to config.LoadConfigFromDefaultLocations changed
-the working directory to the directory that contains the gqlgen config
-file.
-
-This commit changes the implementation to restore the working directory
-after loading the config.
-
-
-
-35b80a72 Merge pull request #1495 from Niennienzz/improve-apq-doc
-
-Update apq.md
-
-
-
-463debae Merge pull request #1503 from nana4gonta/resolve-vulnerability
-
-Resolve indirect dependency vulnerability in example
-
-
-
-29e7bccb Merge pull request #1501 from 99designs/fix-init-1.16
-
-Run go mod tidy after code generation
-
-
-
-9a4c80ab Merge pull request #1502 from 99designs/rm-chi
-
-Remove chi from dataloader example
-
-
-
-- 5f21f9d9 Remove chi from dataloader example
-
-- e02db808 Run go mod tidy after code generation
-
-- 8c3e64e1 Improve APQ documentation
-
-- 03b57f3e Run go mod tidy
-
-- 54e387c4 Resolve indirect dependency vulnerability in example
-
-- 7985db44 Mention math.rand for the todo ID (#1489 )
-
-- b995f7f1 Make spacing consistent (#1488 )
-
-52ded951 Merge pull request #1459 from aaronArinder/getting-started-server-section
-
-getting started: make running server own section
-
-
-
-- 82a8e1bf Make it clearer what happened on init. (#1487 )
-
-7258af5f Merge pull request #1458 from aaronArinder/getting-started-wording
-
-getting started: making the resolver fn section clearer
-
-
-
-4fead489 Merge pull request #1452 from fmyd/fix/formatted-query-indent
-
-prettified some indentation
-
-
-
-58e3225e Merge pull request #1480 from wilhelmeek/double-bubble
-
-Bubble Null from List Element to Nearest Nullable Ancestor
-
-
-
-- 1fac78e9 Add test case for nullable field
-
-- 469e31bd Fix bad test case
-
-- 635b1aef Add Test Case
-
-- 0b5da15c Check in generated code
-
-- 55b774ba Fix type ref
-
-- 45903a65 Handle nillable list elements
-
-- c4bf36c5 Add coveralls badge
-
-- 269a58ad Add goreportcard badge
-
-- 971da82c Updated gin.md
-
-- 41ad51ce Edited the Gin-Gonic Recipe Docs
-
-- 67e652ad getting started: separate example mutation/query
-
-- 31d339ab getting started: make running server own section
-
-- aa531ed8 getting started: more wording updates
-
-- 5b2531ae getting started: wording update
-
-- ada1b928 getting started: updating wording around implementing unimpl fns
-
-- 23eec791 go generate ./...
-
-18678b15 Fix data race
-
-The argument of unmarshalInput may be the same for concurrent use if it pass as graphql "variables".
-So we have to copy it before setting default values
-
-
-
-- 02b14003 fomatted query indent
-
-- 0e9d9c3a updated sample code for disabling introspection
-
-- 478c3f08 feat(codegen): handle (v, ok) methods
-
-5ef5d14f Update cors.md
-
-I had problems reading this page and applying it to my project. With these changes it worked on my end
-
-
-
-997da421 Merge pull request #1436 from ddouglas/patch-1
-
-Upgrade graphql-playground to 1.7.26
-
-
-
-- be4514c6 Upgrade graphql-playground to 1.7.26
-
-- 918801ea Change 'Changeset' doc example to mutation
-
-862762c7 Merge pull request #1409 from zikaeroh/chi-mod
-
-Upgrade go-chi to v1.5.1 with module support
-
-
-
-- c30ff3dd Upgrade go-chi to v1.5.1 with module support
-
-- a9c8fabf int64 support
-
-b484fc27 Merge pull request #1401 from oseifrimpong/patch-1
-
-fix typo
-
-
-
-4cc031af Merge pull request #1394 from j2gg0s/fix-default-recover-func
-
-bugfix: Default Recover func should return gqlerror.Error
-
-
-
-2af51336 Merge pull request #1400 from 99designs/sanstale
-
-Remove stale bot
-
-
-
-34a442c7 Merge pull request #1399 from 99designs/prevent-possible-error-deadlock
-
-Dont hold error lock when calling into error presenters
-
-
-
-1123ba0d Update gin.md
-
-Changed this:
-`In your router file, define the handlers for the GraphQL and Playground endpoints in two different methods and tie then together in the Gin router:
-`
-to:
-`In your router file, define the handlers for the GraphQL and Playground endpoints in two different methods and tie them together in the Gin router:
-`
-
-
-
-89a9f743 Remove stale bot
-
-We tried it, but it's just causing more work both for maintainers and reporters of errors.
-
-
-
-4628ef84 Dont hold error lock when calling into error presenters
-
-This can result in a deadlock if error handling code calls GetErrors.
-
-
-
-- d0d5f7db bugfix: Default Recover func should return gqlerror.Error
-
-18b5df19 codegen/config: Add a new API to finish an already-validated config
-
-LoadConfig parses the config from yaml, but it does a bunch of other
-things too. We want to parse the config ourselves, so that we can have
-extra fields which will be passed to our plugins. Right now, that means
-we either have to duplicate all of LoadConfig, or write the config back
-to disk only to ask gqlgen re-parse it.
-
-In this commit, I expose a new function that does all the parts of
-LoadConfig other than the actual YAML-reading: that way, a caller who
-wants to parse the YAML themselves (or otherwise programmatically
-compute the config) can do so without having to write it back to disk.
-
-An alternative would be to move all this logic to Config.Init(), but
-that could break existing clients. Either way would work for us.
-
-
-
-0e12bfbf Merge pull request #1269 from dqn/new-line-at-the-end-of-file
-
-Add a new line to end of the file schema.graphqls
-
-
-
-22c5d1f5 Merge pull request #1303 from kunalpowar/inline-directives-doc
-
-Update README.md
-
-
-
-88cffee4 Merge pull request #1356 from maapteh/chore/chat-example-update
-
-Chore: update Chat example
-
-
-
-- 1e8c34e5 Dont export Input
-
-de8af66c Merge pull request #1360 from Captain-K-101/master
-
-Update introspection.md
-
-
-
-- 09756915 Update introspection docs
-
-651eda40 Merge pull request #1374 from rudylee/docs-file-upload-small-typo
-
-Fix small typo in file upload docs
-
-
-
-- 94252e04 singleUpload consistency
-
-- c9d346f5 Fix small typo in file upload docs
-
-- 9f851619 add uint, uint64, uint32 types in graphql
-
-0625525f Update introspection.md
-
-updated disabling interospect
-
-
-
-- c6a93aa7 split layout components to their own part, makes sample more readable
-
-- 7904ef6f channel is switchable too
-
-- 13752055 add some layout for demo :)
-
-82ca6e24 Create package declaration to run dataloaden
-
-ref: https://github.com/vektah/dataloaden/issues/35
-
-
-
-- bf549136 use Apollo docs styling for the gql var uppercase
-
-- 36045a37 do not autofocus
-
-- 0502228a chore: update example to React hooks and latest Apollo client
-
-- e6e64224 update deps
-
-3a31a752 Merge pull request #1345 from abeltay/fix-alignment
-
-Fix tab spacing in cors.md
-
-
-
-0c68337c Merge pull request #1346 from abeltay/fix-typo
-
-Fix typo in migration guide
-
-
-
-- 436a88ad Fix typo in migration guide
-
-- 3791f71d Fix tab spacing in cors.md
-
-819e751c Merge pull request #1341 from dgraph-io/rajas/fix-gqlgen-1299
-
-Rajas/fix gqlgen 1299
-
-
-
-- 789d02f5 Requested changes
-
-- 130ed3f7 Fix different alias with same name in inline fragment
-
-- f4669ba9 v0.13.0 postrelease bump
-
-- 07c06594 Update README.md
-
-- 1c9f24b2 remove triming space for schemaDefault
-
-
-
-
-
-
-## [v0.13.0](https://github.com/99designs/gqlgen/compare/v0.12.2...v0.13.0) - 2020-09-21
-- 07c1f93b release v0.13.0
-
-- 259f2711 Bump to gqlparser to v2.1.0 Error unwrapping release
-
-669a1668 Merge pull request #1312 from 99designs/error-wrapping
-
-Always wrap user errors
-
-
-
-9b948a5f Merge pull request #1316 from skaji/is-resolver
-
-Add IsResolver to FieldContext
-
-
-
-- 77aeb477 Point latest docs to v0.12.2
-
-e821b97b Always wrap user errors (closes #1305 )
-
-Requires use of go 1.13 error unwrapping.
-
-On measure I think I prefer this approach, even though it's a bigger BC break:
-- There's less mutex juggling
-- It has never felt right to me that we make the user deal with path when overriding the error presenter
-- The default error presenter is now incredibly simple
-
-Questions:
-- Are we comfortable with supporting 1.13 and up?
-- Should we change the signature of `ErrorPresenterFunc` to `func(ctx context.Context, err *gqlerror.Error) *gqlerror.Error`?
- - It always is now, and breaking BC will force users to address the requirement for `errors.As`
-
-
-
-51b580de Merge pull request #1324 from bemasher/patch-1
-
-Fix typos in README.md
-
-
-
-- 8b2a023c Fix typos in README.md
-
-- 3e5dd956 add test for FieldContext.IsResolver
-
-- 1524989b go generate
-
-- 55951163 add IsResolver to FieldContext
-
-622316e7 Merge pull request #1295 from a-oz/a-oz-patch-1
-
-Update getting-started.md
-
-
-
-4c11d9fa Update getting-started.md
-
-fix typo
-
-
-
-- b4375b04 v0.12.2 postrelease bump
-
-
-
-
-
-
-## [v0.12.2](https://github.com/99designs/gqlgen/compare/v0.12.1...v0.12.2) - 2020-08-18
-- 03cebf20 release v0.12.2
-
-e3ce560d Merge pull request #1288 from alexsn/nopath-field-noerror
-
-avoid computing field path when getting field errors
-
-
-
-108975c3 Merge pull request #1284 from dgraph-io/jatin/sameFieldSameTypeGettingIgnored
-
-fix same field name in two different fragments
-
-
-
-eb424a22 Merge pull request #1294 from 99designs/fix-init
-
-Allow rewriter to work on empty but potentially importable packages
-
-
-
-- a87c54ad Allow rewriter to work on empty but potentially importable ckages
-
-- 8a7f3e64 clean code
-
-- fd0f97ce avoid computing field path when getting field errors
-
-- 2d59b684 ran fmt on test
-
-- 3a153075 ran fmt
-
-- defd7119 added test
-
-- 9fcdbcd1 fix panic test
-
-- 473d63c0 change name to alias
-
-- 849e3eac added check for object defination name
-
-- 08eee0fc v0.12.1 postrelease bump
-
-
-
-
-
-
-## [v0.12.1](https://github.com/99designs/gqlgen/compare/v0.12.0...v0.12.1) - 2020-08-14
-- 0d5f462b release v0.12.1
-
-- e076b1b0 Regenerate test server
-
-- c952e0de v0.12.0 postrelease bump
-
-
-
-
-
-
-## [v0.12.0](https://github.com/99designs/gqlgen/compare/v0.11.3...v0.12.0) - 2020-08-14
-- 70302123 Version 0.12.0
-
-3b633dfa Merge pull request #1267 from ImKcat/master
-
-Fixed transport not support issue
-
-
-
-c9a27ae3 Merge pull request #1255 from s-ichikawa/fix-object-directive-bug
-
-Fix bug about OBJECT directive
-
-
-
-e9863af1 Merge pull request #1276 from Ghvstcode/master
-
-Documentation Fixes
-
-
-
-04f6a691 Merge pull request #1277 from 99designs/direct-pointer-binding
-
-Support pointers in un/marshal functions
-
-
-
-- bef9c8bf Add comments and docs for pointer scalars
-
-997efd03 Reintroduce special cast case for string enums
-
-This reverts commit 89960664d05f0e93ed629a22753b9e30ced2698f.
-
-
-
-- 8561c056 Replace awkward loop in buildTypes with recursion
-
-- d65b04f9 Clean up generated code
-
-- e1c463a4 Linting
-
-- 89960664 Remove unused special cast case for string enums
-
-- 196954bc Bind directly to pointer types when possible, instead of always binding to value types
-
-- 5b3d08db Update README.md
-
-- efd33dab Update README.md
-
-- f35b162f Fixed transport not support issue
-
-39a12e0f Merge pull request #1134 from seriousben/fix-default-config-no-ast-sources
-
-Add LoadDefaultConfig to load the schema by default
-
-
-
-1b23cf15 Merge pull request #1264 from 99designs/go-1.14
-
-Target multiple go versions for CI
-
-
-
-- dbbda22e go 1.14
-
-ce964c1f Merge pull request #1115 from bowd/add-input-path-for-unmarshaling
-
-Add input path in unmarshaling errors
-
-
-
-- bde4291c shadow context to ensure scoped context use
-
-- c43990a0 Merge remote-tracking branch 'origin/master' into HEAD
-
-- 6be2e9df fix fileupload example
-
-ad675f00 Allow custom resolver filenames using `filename_template` option (closes #1085 )
-
-resolve merge conflicts.
-
-
-
-- fbfdd41c Merge pull request #1262 from sateeshpnv/gqlparser-alias (closes #1258 )
-
-- 99fafc9f issue [#1258 ] explicitly add gqlparser alias to vektah/gqlparser/v2 import
-
-- 49291f23 fix bug in OBJECT directive
-
-0fbf293f Merge pull request #1248 from sotoslammer/master
-
-close the connection when run returns
-
-
-
-d7eabafb Merge pull request #1246 from arkhvoid/master
-
-Fix typo cause memory problem on upload
-
-
-
-- 21b223b8 Fix typo cause memory problem on upload
-
-- cc9c520f close the connection when run returns
-
-8494028e Merge pull request #1243 from 99designs/nilable-nullable-unnmarshal
-
-Remove a bunch of unneeded nil checks from non-nullable graphql type unmarshalling
-
-
-
-- b81138da Add test for nillable input slice
-
-- 14d1a4dc Only return nil for nilable types when the graphql spec would allow it
-
-3e59a10d Merge pull request #1215 from ddouglas/master
-
-Adding Missing Header to response
-
-
-
-1650c499 Merge pull request #1242 from 99designs/named_map_references
-
-Do not use pointers on named map types
-
-
-
-- d11f6021 Do not use pointers on named map types
-
-acaee361 Merge pull request #1121 from Khan/extern-only
-
-Do not require a resolver for "empty" extended types.
-
-
-
-555db6d2 Merge pull request #1224 from frederikhors/patch-1
-
-Indentation misprint
-
-
-
-- 77b37bb2 Indentation misprint
-
-a3c38c65 Merge pull request #1221 from longngn/patch-1
-
-Update dataloaders.md
-
-
-
-- 71182de8 Update dataloaders.md
-
-d81baeed Merge pull request #1218 from StevenACoffman/patch-1
-
-Update feature comparison for federation
-
-
-
-- 2c1f2345 Update feature comparison for federation (closes #5 )
-
-- e19d43bc Adding test
-
-- 4a62f012 Adding ContentType header to GET request responses
-
-- f5de4731 Add timeout to integration test
-
-a21a6633 Merge pull request #1189 from RichardLindhout/patch-1
-
-Upgrade to OperationContext and remove duplicate fields to fix https:…
-
-
-
-543317a2 Merge pull request #1170 from alexsn/apollotracing/nopanic
-
-apollotracing: skip field interceptor when on no tracing extension
-
-
-
-- d347d972 Update stale.yml
-
-032854bb Merge pull request #1154 from gsgalloway/master
-
-Add operation context when dispatching
-
-
-
-ccc4eb1d Merge pull request #1188 from k-yomo/update-errors-doc
-
-Update outdated examples in errors doc
-
-
-
-628b83c1 Merge pull request #1198 from ddevault/pgp
-
-codegen: add PGP to common initialisms
-
-
-
-d881559b Merge pull request #1202 from whereswaldon/patch-1
-
-doc: fix typo in embedded struct example
-
-
-
-b6ce42a7 Merge pull request #1207 from k-yomo/update-gorilla-websocket
-
-Update gorilla/websocket to v1.4.2 to resolve vulnerability
-
-
-
-- c5bfe9d3 Update gorilla/websocket to v1.4.2 to resolve vulnerability
-
-- 55c16e93 doc: fix typo in embedded struct example
-
-- 89eb1993 codegen: add PGP to common initialisms
-
-- 9ab7294d apollotracing: skip field interceptor when on no tracing extension
-
-40570d1b Merge pull request #1163 from fwojciec/master
-
-fix redundant type warning
-
-
-
-3f7f60bf Merge pull request #1181 from tmc/patch-1
-
-Update getting-started.md
-
-
-
-- 6518d839 Upgrade to OperationContext and remove duplicate fields to fix https://github.com/99designs/gqlgen/pull/1161
-
-- 632904ad Update outdated examples in errors doc
-
-- 0921915d Update getting-started.md
-
-0a404813 Merge pull request #1117 from s-ichikawa/object-directive
-
-Add support for OBJECT directive
-
-
-
-90ee8ded Merge pull request #1137 from ddevault/master
-
-Replace ~ with א in package names
-
-
-
-e4c699dc Merge pull request #1147 from ddevault/docs
-
-Add links to godoc to the README and docsite
-
-
-
-73746621 Merge pull request #1131 from muraoka/fix-typo
-
-Fix typo in authentication docs
-
-
-
-ace558b4 Merge pull request #1124 from OpenSourceProjects/update-apq-documentation
-
-Update APQ example to reflect newer API
-
-
-
-3c126f9e Merge pull request #1119 from skaji/patch-1
-
-type Person -> type Person struct
-
-
-
-- 1610039e updated generated code
-
-- 905e1aad fix redundant type warning
-
-- 39ded924 fix ctx
-
-- e7798ff2 insert operation context
-
-- 6f78c6ac Add links to godoc to the README and docsite
-
-- 9b823a34 Replace ~ with א in package names (closes #1136 )
-
-- 35a90482 Add LoadDefaultConfig to load the schema by default
-
-- 07a5494b Fix typo in docs
-
-04b120c9 Update APQ example to reflect newer API
-
-The example in APQ relates to the old handlers. This brings it up to
-show how extensions can be used - and uses the new API for registering
-plugins that come in the graph.
-
-The cache example now implements the graphql.Cache interface
-
-
-
-- 55e0f0db Check in a place where `Entity` might be nil now.
-
-1ecd0749 Handle the case that all entities are "empty extend".
-
-In that case, there are no resolvers to write, so we shouldn't emit
-any.
-
-
-
-- 0e2666fb Run `go fmt`
-
-36b5ed83 Actually, we need to check all-external, not all-key.
-
-We might well be defining our own type that has only key-fields, but
-if they're not external then we're the primary provider of the type
-
-Test plan:
-go test ./plugin/federation/
-
-
-
-7e3f5844 Do not require a resolver for "empty" extended types.
-
-Summary:
-If our schema has a field with a type defined in another service, then
-we need to define an "empty extend" of that type in this service, so
-this service knows what the type is like. But the graphql-server will
-never ask us to actually resolve this "empty extend", so we don't
-require a resolver function for it. Example:
-```
- type MyType {
- myvar: TypeDefinedInOtherService
- }
-
- // Federation needs this type, but it doesn't need a resolver for
- // it! graphql-server will never ask *us* to resolve a
- // TypeDefinedInOtherService; it will ask the other service.
- extend TypeDefinedInOtherService @key(fields: "id") {
- id: ID @extends
- }
-```
-
-Test Plan:
-I manually tested this on a service (`assignments`) that we have that
-fell afoul of this problem. But I had a hard time adding tests inside
-gqlgen because the error happens at validation-time, and the
-federation tests are not set up to go that far down the processing
-path.
-
-Reviewers: benkraft, lizfaubell, dhruv
-
-Subscribers: #graphql
-
-Differential Revision: https://phabricator.khanacademy.org/D61883
-
-
-
-- 9c80bb5b type Person -> type Person struct
-
-- ea210929 add test for object directive
-
-- 5c3812cb merge object directives to field directives
-
-- 8ea5ba2b Fix additional missed tests
-
-- 65be2a6e Run generate
-
-- fd615cf6 Fix linting
-
-- 61fa9903 Add documentation for scalad error handling
-
-- 1aa20f25 Add test to highlight usecase
-
-- d98ff1b0 Modify templates to include deeper context nesting
-
-a1a02615 Merge pull request #1104 from oshalygin/docs/update-query-complexity-initialization
-
-Update Query Complexity Documentation
-
-
-
-c68df3c6 Merge pull request #1112 from s-ichikawa/delete-unused-code
-
-delete unused code
-
-
-
-dfb6558a run CI on PRs
-
-PRs from outside the org arent running CI, hopefully this fixes it.
-
-
-
-- 5149231c delete unused code
-
-6f81ff92 Update Query Complexity Documentation
-
-- This pass at the documentation updates the
- appropriate section regarding query complexity,
- specifically in the way that the http.Handler
- is created.
-- The deprecated handler.GraphQL calls were replaced
- with NewDefaultServer.
-- Instead of passing along the fixed query complexity
- as a second argument to the now deprecated handler.GraphQL
- func, extension.FixedComplexityLimit is used instead.
-
-
-
-- f0cd7a70 update doc site to point to latest version
-
-- 224ff345 v0.11.3 postrelease bump
-
-
-
-
-
-
-## [v0.11.3](https://github.com/99designs/gqlgen/compare/v0.11.2...v0.11.3) - 2020-03-13
-- 4d735356 release v0.11.3
-
-- 4b949f2e remove copyright notice at bottom of doc pages
-
-c5039196 Merge pull request #1094 from 99designs/update-upload-docs
-
-Update file upload docs with Apollo client usage
-
-
-
-- 5e3cef24 revert #1079
-
-793b0672 Merge pull request #1100 from sonatard/fast
-
-Gnerate to fast by exec codegen.GenerateCode before plugin GenerateCode
-
-
-
-6ac2d1cd Merge pull request #1097 from 86/86/update-federation-doc
-
-Add Enable federation section in federation doc
-
-
-
-- 97896eeb exec codegen.GenerateCode before plugin GenerateCode to fast
-
-- 44f8ba9f Update licence
-
-- 94701fb7 add Enable federation section in federation doc
-
-- 64190309 Update upload docs with Apollo usage
-
-- a5381191 v0.11.2 postrelease bump
-
-
-
-
-
-
-## [v0.11.2](https://github.com/99designs/gqlgen/compare/v0.11.1...v0.11.2) - 2020-03-05
-- 2ccc0aa6 release v0.11.2
-
-78f3da22 Merge pull request #1050 from technoweenie/executor
-
-Executor
-
-
-
-- b82ee517 Fix CI badge
-
-42eff5a9 Merge pull request #1057 from RichardLindhout/master
-
-Upgrade to github.com/urfave/cli/v2
-
-
-
-bb5cb8a3 Merge pull request #1086 from 99designs/github-actions
-
-Use GitHub Actions
-
-
-
-- cd2b53f2 remove os.Exits
-
-587bc81c Merge pull request #1074 from yudppp/feature/add_contenttype_for_upload
-
-Add ContentType to graphql.Upload
-
-
-
-- a84d6577 graphql/handler: revive the existing around func types
-
-- f9bb017b graphql/executor_test: ensure operation trace is started before every query
-
-- 57dd8d9c graphql/gqlgen: remove unnecessary convenience method
-
-- fb86f7b9 graphql/executor: remove the naked return
-
-- 9ae6bc0b graphql/executor: reinit all extension values on every Use() call
-
-- f3909a8a graphql/executor: make ext funcs private
-
-- df9e7ce3 Run CI on push only
-
-- ed76bc92 Update badge
-
-- 5a1a5446 Coveralls fixes
-
-- 41acc753 Fix windows line endings
-
-- 390cea4f Replace Appveyor with Github Actions
-
-- 85be072f Replace CircleCI with Github Actions
-
-- 8d540db3 fix: Add Upload.ContentType test
-
-- f21832af fix: Fixed Upload type document
-
-b165568c Merge pull request #1071 from kandros/fix-server-path
-
-fix server path
-
-
-
-9d7648aa Merge pull request #1072 from wtask/patch-1
-
-Fix a typo in sql example
-
-
-
-24400c9b Merge pull request #1079 from sonatard/remove-unused
-
-Remove unused code
-
-
-
-a7c79891 Merge pull request #1081 from sonatard/fix-plugin-test
-
-Fix unlink file path in resolvergen test
-
-
-
-e7bf7548 Merge pull request #1080 from sonatard/fix-testdata
-
-Fix test data
-
-
-
-- 3a61dc00 Fix unlink file path in resolvergen test
-
-- df5ac929 Fix test data
-
-- b2843f67 Remove unused code
-
-- cff73f71 Add ContentType to Upload
-
-f0ebc0df Fix a typo in sql example
-
-I think todo is referenced to user by user_id field, not by todo.id
-
-
-
-- 22a43d77 fix server path
-
-b788cce5 Merge pull request #1054 from 99designs/golint-free-resolvers
-
-suppress golint messages
-
-
-
-c515d403 Merge pull request #1053 from RichardLindhout/patch-3
-
-Add practical example of getting all the requested fields
-
-
-
-e57cd445 Merge pull request #1061 from halvdan/patch-1
-
-Fix mismatching documentation of Todo struct
-
-
-
-1388fa94 Fix mismatching documentation of Todo struct
-
-Mismatch between the code and the getting started documentation.
-
-
-
-- 294884ad Rollback go.sum and go.mod as per feedback of [@vektah](https://github.com/vektah)
-
-- d8acf165 Upgrade to github.com/urfave/cli/v2
-
-- 81bcbe75 suppress golint messages
-
-24813079 Add practical example of getting all the requested fields
-
-Based on this https://github.com/99designs/gqlgen/issues/954 was tagged as 'need documentation'
-
-
-
-a53ce377 Merge pull request #1051 from 99designs/has-operation-context
-
-Add function to check presense of operation context
-
-
-
-- 95e453bf Add function to check presense of operation context
-
-- 36365c41 graphql/executor: move setExtensions()
-
-- 3acc9421 graphql/executor: ensure Executor implements graphql.GraphExecutor.
-
-- f89b973b graphql/executor: merge ExtensionList into Executor
-
-- c16a77c3 graphql/handler: replace internal executor type
-
-- 8fa26cec graphql/executor: extract an Executor type from graphql/handler
-
-- d5d780c5 Point latest docs to 0.11.1
-
-- abaa0a04 v0.11.1 postrelease bump
-
-
-
-
-
-
-## [v0.11.1](https://github.com/99designs/gqlgen/compare/v0.11.0...v0.11.1) - 2020-02-19
-- 11af15a1 release v0.11.1
-
-bc07188c Merge pull request #1038 from 99designs/feat-check-len
-
-check slice length
-
-
-
-- 2c3853c8 fix whitespace in comparison
-
-07a13861 Merge pull request #1043 from 99designs/ensure-panic-handlers-get-applied
-
-Ensure panic handlers get applied
-
-
-
-156d306d Merge pull request #1046 from appleboy/patch
-
-docs(gin): missing import playground
-
-
-
-- 26ee1aa1 docs(gin): missing import playground
-
-- 3abe5b32 add test
-
-- 6ecdb88d Merge branch 'master' into feat-check-len
-
-- 2340f7a7 Ensure panic handlers get applied
-
-25d16761 Merge pull request #1039 from VitaliiLakusta/patch-1
-
-Fix link to examples directory in Federation docs
-
-
-
-- 4c47ad16 Fix link to examples directory in Federation docs
-
-- 2506dce0 check slice len
-
-- 1a68df34 fix origin/master reference in switcher
-
-- 199cfedf remove old docs that no longer run with new layout
-
-- 556c8484 fix paths
-
-- 282100c8 use current layout to build old doc content
-
-- 4c38b8b4 v0.11.0 postrelease bump
-
-
-
-
-
-
-## [v0.11.0](https://github.com/99designs/gqlgen/compare/v0.10.2...v0.11.0) - 2020-02-17
-- 368597aa release v0.11.0
-
-e65d6228 Merge pull request #1036 from 99designs/update-v011-docs
-
-Update 0.11 migration docs
-
-
-
-- 11f97936 Update 0.11 migration docs
-
-2b3eed30 Merge pull request #1034 from 99designs/strip-underscores-from-entity-interfaces
-
-Trim underscores from around go identifiers
-
-
-
-- b2d9bfcb Update stale.yml
-
-- 1ac8b5ae Update stale.yml
-
-- 4b9dfa61 trim underscores from around go identifiers
-
-7cac3610 Merge pull request #1027 from sonatard/response-errors
-
-propagate resolver errors to response error in ResponseMiddleware
-
-
-
-14dccc57 Merge pull request #1022 from 99designs/feat-gqlparser-117
-
-example about apply https://github.com/vektah/gqlparser/pull/117
-
-
-
-- cf6f7683 bump to gqlparser v2
-
-4ece3857 Merge pull request #1028 from abhimanyusinghgaur/master
-
-Respect includeDeprecated for EnumValues
-
-
-
-- 9638ce0f Fix format
-
-- 51b921fa Fix format
-
-- 07ffcc82 Respect includeDeprecated for EnuValues
-
-- d58434c9 propagate resolver errors to response error in ResponseMiddleware
-
-- 59855925 go mod tidy
-
-- e4530da6 apply https://github.com/vektah/gqlparser/pull/117
-
-30e23757 Merge pull request #1020 from 99designs/handle-interfaces-implementing-interfaces
-
-Handle interfaces that implement interfaces
-
-
-
-- b7a58a1c Handle interfaces that implement interfaces
-
-ab8d62b6 Merge pull request #1019 from 99designs/remove-source-reprinting
-
-Remove source reprinting
-
-
-
-- 2f0fa0ef handle schema loading error better
-
-- aacc9b1f Remove source reprinting
-
-e289aaa0 Merge pull request #1018 from 99designs/federation-docs
-
-Federation docs and examples
-
-
-
-- 3045b2cf Federation docs and examples
-
-656a07d1 Merge pull request #1016 from 99designs/federation-entity-type
-
-Create a non generated federation _Entity type
-
-
-
-- 8850a527 Create a non generated federation _Entity type
-
-1d41c2eb Merge pull request #1012 from 99designs/federation-config
-
-Allow configuring the federation output file location
-
-
-
-afa9a150 Merge pull request #1013 from 99designs/feat-error-dispatch
-
-propagate errors to response context in DispatchError
-
-
-
-- 652aa2fb propagate errors to response context in DispatchError
-
-0fe1af8c Merge pull request #1011 from Khan/compound-keys
-
-Compound key support in federation
-
-
-
-- ad3c1c81 Allow configuring the federation output file location
-
-b4a00e6c Merge pull request #1010 from Khan/query-exists
-
-Make sure there's a Query node before trying to add a field to it.
-
-
-
-65401637 Adding type with multiple keys to federation test
-
-Summary: The current federation test schema only has types with single keys (or no keys). Adding a type with multiple keys, including one non-String key, to test compound key federation code gen.
-
-Test Plan: - go test
-
-Reviewers: csilvers, miguel
-
-Differential Revision: https://phabricator.khanacademy.org/D60715
-
-
-
-3f714a46 Extending federation to support compound keys per Apollo spec
-
-Summary:
-Compound keys are not yet supported for federation in gqlgen. This diff adds support by modifying the federation plugin to handle a list of key fields on an entity rather than a single top-level key field. It will now look for "findBy..." in the resolver, rather than the original "FindBy". The federation plugin does not yet support more complicated FieldSets in the key, such as nested selections.
-
-References:
-- Apollo federation spec: https://www.apollographql.com/docs/apollo-server/federation/federation-spec/
-- Selection sets: https://graphql.github.io/graphql-spec/draft/#sec-Selection-Sets
-
-Will update https://phabricator.khanacademy.org/D59469 with multiple key changes.
-
-Test Plan:
-- Tested Go GQL services using both single- and multiple-key federated types (assignments and content-library in webapp/services)
-- Ran gqlgen on non-federated services in webapp to ensure regular generation still works (donations service)
-- WIP: creating unit tests; will submit as separate diff
-
-Reviewers: briangenisio, dhruv, csilvers, O4 go-vernors
-
-Reviewed By: dhruv, csilvers, O4 go-vernors
-
-Differential Revision: https://phabricator.khanacademy.org/D59569
-
-
-
-9f2a624b Make sure there's a Query node before trying to add a field to it.
-
-Federation adds some queries to the schema. There already existed
-code to insert a Query node if none existed previously. But that code
-was only put on addEntityToSchema(), and not the other place we update
-the query, addServiceToSchema().
-
-Almost always the old code was good enough, since we call
-addEntityToSchema() before addServiceToSchema(). But there's on
-addServiceToSchema(), so we need to do the query-existence check there
-too.
-
-
-
-b941b970 Merge pull request #1007 from 99designs/handle-invalid-autoload-path
-
-Give an appropriate error message when autoload isnt a valid package
-
-
-
-- 95b10809 bump appveyor go version for consistent behavour
-
-- 91a9ff97 fix bad copy from template
-
-- d5d6f830 Give an appropriate error message when autoload isnt a valid package
-
-f7667e12 Merge pull request #1009 from 99designs/interface-regression
-
-Interface regression
-
-
-
-- ffc419f3 Fix interfaces used as normal object types
-
-- 44cfb926 Test example for interface regression
-
-0ddb3ef3 Merge pull request #1006 from ravisastryk/entity-directives-lookup
-
-skip searching directives when entity is found
-
-
-
-- 395e1d73 skip searching directives when entity is found
-
-- e1f2282e bump to go 1.13 in ci
-
-34c92eba Merge pull request #1003 from 99designs/fix-chat-example
-
-fix chat example
-
-
-
-- 6bf88417 fix chat example
-
-8ed2ec59 Merge pull request #988 from 99designs/package-cache
-
-Cache all packages.Load calls in a central object
-
-
-
-- 9ccd7ed7 Cache all packages.Load calls in a central object
-
-565619a8 Merge pull request #993 from 99designs/resolver-generator-v2
-
-Resolver regenerator
-
-
-
-- cf4a3eb4 keep imports when scattering resolvers between files
-
-- da7c1e45 Update getting started docs
-
-- c233876e fix windows test paths
-
-- 93713a29 Add tests for code persistence
-
-- 3e507e0d separate resolver stubs by 1 empty line
-
-- 8a208af5 add tests covering ResolverConfig
-
-- f8e61961 set init to use new resolvers by default
-
-- dbaf355d copy through any unknown data
-
-- e7255580 copy old imports through before gofmt prunes
-
-- 6ec36504 Copy existing resolver bodies when regenerating new resolvers
-
-- 9e3b399d add resolver layout = follow-schema
-
-- 8a18895e Update to latest golangci-lint
-
-- f7a67722 Merge pull request #985 from Khan/no-key-needed
-
-fa884991 Correctly generate a federated schema when no entity has a `[@key](https://github.com/key)`.
-
-Normally, when a service is taking part in graphql federation, it will
-services can link to (that is, have an edge pointing to) the type that
-this service provides. The previous federation code assumed that was
-the case.
-
-types. It might seem that would mean the service is unreachable,
-since there is no possibility of edges into the service, but there are
-and top level Mutation edges. That is, if a service only provides a
-top-level query or top-level mutation, it might not need to define a
-
-This commit updates the federation code to support that use case.
-
-
-
-36aae4aa Merge pull request #994 from 99designs/feat-cache-ctx
-
-Add context.Context to graphql.Cache interface's methods
-
-
-
-61e060bd Merge pull request #995 from alexsn/directiveroot_empty_lines
-
-Remove empty lines on DirectiveRoot generation
-
-
-
-- 30c295c4 Remove empty lines on DirectiveRoot generation
-
-- 85cfa8a3 Add context.Context to graphql.Cache interface's methods
-
-a6c7aafb Merge pull request #931 from fridolin-koch/master
-
-Fix for Panic if only interfaces shall be generated
-
-
-
-ec4f6b15 Merge pull request #989 from 99designs/fix-intermittent-test-ka-failure
-
-Fix intermittent websocket ka test failure
-
-
-
-- 76035df5 Fix intermittent websocket ka test failure
-
-aa407b1f Merge pull request #979 from 99designs/capture-read-times
-
-Capture read times
-
-
-
-- 4dd10086 fix test race by only stubbing now where we need to
-
-- 8dbce3cf Capture the time spent reading requests from the client
-
-c6b3e2a1 Merge pull request #983 from vikstrous/name-for-package-global
-
-single packages.Load for NameForPackage
-
-
-
-ae79e75b Merge pull request #978 from 99designs/pluggable-error-code
-
-Allow customizing http and websocket status codes for errors
-
-
-
-- 7f6f1667 bump x/tools for consistent import formatting
-
-- 842fcc11 review feedback
-
-- f0bea5ff Allow customizing http and websocket status codes for errors
-
-- bd50bbcb single packages.Load for NameForPackage
-
-28c032d1 Merge pull request #982 from DavidJFelix/patch-1
-
-fix: explicitly exclude trailing comma from link
-
-
-
-ac67050a fix: explicitly exclude trailing comma from link
-
-- this looks dumb, but when the page is rendered, the link resolves with the comma, despite the comma being excluded in github rendering.
-
-
-
-- 4e95b363 fix some version switcher paths
-
-- 08369dfe add missing trailing slash on paths
-
-- ea347ca7 fetch all tags
-
-- 8c1a8f57 fix branch switching
-
-- 324efc5c add origin if missing
-
-- cfa2907a Generate docs for all tags
-
-8218c734 Merge pull request #851 from marwan-at-work/federation
-
-Apollo Federation MVP
-
-
-
-- 48dc29c1 go 1.12 generate, 1.14 failed
-
-- b2e81787 update gqlparse to v1.2.1
-
-- d2a13d33 update go.mod
-
-0eef2fe2 Merge pull request #970 from spiffyjr/master
-
-Fix extra trimspace on nillable Unmarshals
-
-
-
-56b8eef2 Merge pull request #974 from oshalygin/docs/gqlgen-pg-example-repo
-
-Add Link to Sample Project with GQLGen and Postgres
-
-
-
-f49936eb Add Link to Sample Project with GQLGen and Postgres
-
-This is a very straightforward project with numerous details in the README and the official
-documentation, but questions continue to pop up around how to use this project, organize the files
-and ultimately make data calls to some persistent layer.
-
-The `https://github.com/oshalygin/gqlgen-pg-todo-example` was built in order to show newcomers the
-following:
-- How to organize their graphql schema, resolvers, dataloaders and models
-- How to create a new dataloader
-- How to resolve with a dataloader and how to avoid some of the pitfalls(inconsistent db query to keys array order)
-- How to map models from a gql schema to structs
-
-While the examples in this project are helpful, they could benefit from more elaborate explanations in the
-code as well as the README to help newcomers get started. This PR is not intended to portray any of the examples
-negatively and should not be interpreted as such. There are many findings/lessons learned from the work that folks
-put together in those examples.
-
-README which covers a ton of the details on how to use this project:
-- [README](https://github.com/oshalygin/gqlgen-pg-todo-example)
-
-
-
-- db499561 force rebuild
-
-- 0985a78e remove debug comments
-
-- 7f648425 add preliminary test_data
-
-- c9d6d94b add preliminary tests
-
-- 2345936e fix integration
-
-- aae7486d go generate
-
-- 555a9546 go generate + remove directives nil check
-
-- 368d546d Apollo Federation MVP
-
-- 21e0e676 Fix extra trimspace on nillable Unmarshals
-
-- f869f5a8 remove deprected handler call
-
-- f0b83cb1 fix merge conflict
-
-- cdf96721 update generated code
-
-- 21356ce3 markdown cleanup
-
-412a72fe Merge pull request #885 from 99designs/handler-refactor
-
-Refactor handler package
-
-
-
-- bac79c54 force clean git checkout
-
-- dca9e4a5 Add migration docs
-
-5106480b Merge pull request #947 from 99designs/handler-oc-handling
-
-always return OperationContext for postpone process
-
-
-
-- 922db1e3 always return OperationContext for postpone process
-
-- 8794f03e v0.10.2 postrelease bump
-
-- 14dbf1aa use new handler package in new test
-
-- a339a042 panic if operation context is missing when requested
-
-- a13a0f5f add docs on extension name conventions
-
-- 458fa0de Add more interface assertions
-
-- d0836b72 Expose APQ stats
-
-- cf14cf10 fix: Fix no code generation for only interfaces
-
-- dc76d029 Merge remote-tracking branch 'origin/master' into handler-refactor
-
-- 572fb419 remove all references to deprecated handler package
-
-- dc622346 Tune allocs for benchmarks
-
-- a6f94626 Merge remote-tracking branch 'origin/master' into handler-refactor
-
-- c3f93810 fix benchmark
-
-- 631b48a5 remove automatic field stat collection to reduce time calls
-
-- a77d9fc2 Add generated stanzas back in
-
-- 0ee185b8 fix duplicate header sends
-
-- 7cbd75db fix APQ signature
-
-- 67fa2104 allow extensions to declare their own stats
-
-- e9502ae0 Make extensions validatable
-
-- fc727c9c Add a signpost method to handler extension interface
-
-- 0a39ae20 add fixed complexity limit
-
-- f2ef5ec3 more deprecations and more compat
-
-- 2898a622 rename ResolverContext to FieldContext
-
-- 092ed95f collect field timing in generated code
-
-- 848c627c remove DirectiveMiddleware
-
-- 40f08868 add NewDefaultServer
-
-- 1b57bc3e Rename RequestContext to OperationContext
-
-- 3476ac44 fix linting issues
-
-- 479abbef update generated code
-
-- bc981569 Combine root handlers in ExecutableSchema into a single Exec method
-
-- 473a0d25 Implement bc shim for old handler package
-
-- 631142cf move writer all the way back to the transport
-
-- c7bb03a8 merge executable schema entrypoints
-
-- e7e913d9 Remove remains of old handler package
-
-- 8c5340c1 Add complexity limit plugin
-
-- 0965420a Add query document caching
-
-- aede7d1c Add multipart from transport
-
-- 64cfc9ad extract shared handler test server stubs
-
-- a70e93bc consistently name transports
-
-- 9d1d77e6 split context.go into 3 files
-
-- 72c47c98 rename result handler to response handler
-
-- 4a69bcd0 Bring operation middleware inline with other handler interfaces
-
-- ab5665ad Add result context
-
-- c3dbcf83 Add apollo tracing
-
-- f00e5fa0 use plugins instead of middleware so multiple hooks can be configured
-
-- a7c5e660 build middleware graph once at startup
-
-- 2e0c9cab mark validation and parse errors separately to execution errors
-
-- cb99b42e Add websocket transport
-
-- eed1515c Split middlware out of handler package
-
-- b5089cac Split transports into subpackage
-
-- d0f68303 port json post
-
-- afe241b5 port over tracing
-
-- 311887d6 convert APQ to middleware
-
-- da986181 port over the setter request context middleware
-
-- 249b602d Start drafting new handler interfaces
-
-
-
-
-
-
-## [v0.10.2](https://github.com/99designs/gqlgen/compare/v0.10.1...v0.10.2) - 2019-11-28
-- f276a4e6 release v0.10.2
-
-9e989d94 Merge pull request #929 from nmaquet/check-nil-interface-ptrs
-
-Don't crash when interface resolver returns a typed nil
-
-
-
-6f20101c Merge pull request #940 from vikstrous/optional-modelgen
-
-make model generation optional
-
-
-
-9b9dd562 Merge pull request #942 from vikstrous/disable-validation
-
-add skip_validation flag
-
-
-
-f9f2063a Merge pull request #941 from vikstrous/qualify-package-path-faster
-
-shortcut QualifyPackagePath in go module mode
-
-
-
-- 4db0e6ec keep function private
-
-- c06f05b3 add doc
-
-- bd353b3e add skip_validation flag
-
-- b829628d shortcut QualifyPackagePath in go module mode
-
-- 3a05d2dd add mention in the docs
-
-- c2c2d7de make model generation optional
-
-d3f63844 Merge pull request #939 from mjarkk/patch-1
-
-(docs) graph-gophers now supports Struct Field resolving
-
-
-
-- ba3d0189 graph-gophers now supports Struct Field resolvers
-
-e747d923 Merge pull request #938 from lulucas/master
-
-modelgen hook docs fixed
-
-
-
-63be1d5e Merge pull request [#1](https://github.com/99designs/gqlgen/issues/1) from lulucas/modelgen-hook-patch-1
-
-modelgen hook docs use plugin poitner
-
-
-
-33fc16b1 modelgen hook docs use plugin poitner
-
-and add modelgen package to ModelBuild type
-
-
-
-- fcfe595e Add a comment
-
-59946087 Add unit test for the interface resolver / typed nil interaction
-
-This added test shows that the `_Dog_species` automatically generated
-resolver will crash unless the extra nil check is added in
-`interface.gotpl`.
-
-
-
-- 201768f0 Regenerate examples
-
-85ca9efe Return graphql.Null in interface resolver when passed a typed nil
-
-Go's dreaded _typed nil_ strikes again. Nil pointers of struct types
-aren't equal to nil interface pointers.
-
-See https://golang.org/doc/faq#nil_error
-
-
-
-15b30588 Merge pull request #894 from 99designs/enum-var-value-coercion
-
-Improve enum value (with vars) validation timing
-
-
-
-- 568433a2 fix ci failed
-
-- 0ccfc7e0 Merge branch 'master' into enum-var-value-coercion
-
-9cfd817e Merge pull request #897 from mskrip/modelgen-hook
-
-Add possibility to hook into modelgen plugin
-
-
-
-- c1e64148 Merge pull request #900 from zannen/master (closes #896 )
-
-- 8a8f0a0f Add autogenerated files (#896 )
-
-- 531729df Move test schema file from example dir into codegen/testserver (#896 )
-
-- 5144775f Add example to check for regression of #896
-
-- 3b5df4ce Add check for obviously different TypeReferences (#896 )
-
-- fb96756a Update generated content (#896 )
-
-fd201a8c Update UniquenessKey for when Element is/isn't nullable (#896 )
-
-With a schema:
-type Query {
- things1: [Thing] # Note the lack of "!"
-}
-
-type Subscription {
- things2: [Thing!] # Note the "!"
-}
-
-the UniquenessKey for the two lists is the same, which causes non-deterministic output.
-
-
-
-- 2a269dd3 Add modelgen hook recipe
-
-- 6ceb76b6 Test tag generation only by looking up extected tag strings
-
-1f272d1b Add possibility to hook into modelgen plugin (closes #876 )
-
-This change introduces option to implement custom hook for model
-generation plugin without the need to completly copy the whole `modelgen` plugin.
-
-that can be:
-
-```golang
-func mutateHook(b *ModelBuild) *ModelBuild {
- for _, model := range b.Models {
- for _, field := range model.Fields {
- field.Tag += ` orm_binding:"` + model.Name + `.` + field.Name + `"`
- }
- }
-
- return b
-}
-
-...
-
-func main() {
- p := modelgen.Plugin {
- MutateHook: mutateHook,
- }
-
- ...
-}
-
-```
-
-
-
-99a55da2 Merge pull request #927 from matiasanaya/feature/bind-to-embedded-interface
-
-Bind to embedded interface
-
-
-
-- 70e860cc Bind to embedded interface method
-
-- a745dc78 Fixes #843 : Bind to embedded struct method or field
-
-f80cab06 Merge pull request #923 from 99designs/gqlparser-1.2.0
-
-Update to gqlparser-1.2.0
-
-
-
-- 7508f4e5 Update to gqlparser-1.2.0
-
-7653a681 Merge pull request #916 from karthikraobr/patch-1
-
-3->4 scalars
-
-
-
-8faa0e3a Merge pull request #917 from colelawrence/patch-1
-
-docs: Fix typo in title of "Resolvers"
-
-
-
-- f7d888f9 Merge branch 'master' into patch-1
-
-- d722ac66 Update scalars.md
-
-1172128c Merge pull request #904 from cfilby/fix-config-docs
-
-Minor Documentation Tweaks
-
-
-
-- 935f11ed Fix typo in title
-
-- 026d029c 3->4 scalars
-
-- 5eb6bef6 Fix weird indending
-
-- 756dcf6b Merge pull request #907 from lian-yue/patch-1 (closes #860 )
-
-- 2a943eed Update directive.go (closes #860 )
-
-adbceeea Merge pull request #902 from cfilby/fix-int64-marshalling
-
-Add support for int64 IDs
-
-
-
-- 13c3d922 Update id function
-
-- 37191779 Add more tests
-
-- 0968e0cb Fix VSCode Weirdness, validate formatting
-
-- a20c96d5 More edits
-
-- e9e88b41 Stop double indending
-
-- 9f4df68e More minor doc fixes
-
-- 7abf0ac3 Fix documentation bug
-
-- e9730ab9 gofmt
-
-- c3930f57 Remove redundant paren, add test
-
-- 395fc85e Add support for int64 ids
-
-dbc88428 Merge pull request #889 from thnt/fix-init-with-schema-arg
-
-fix init not use custom schema filename
-
-
-
-- fc4e513f add test for https://github.com/vektah/gqlparser/pull/109
-
-- dd98bb13 fix init not use custom schema
-
-4c35356c Merge pull request #883 from 99designs/handle-invalid-types
-
-Gracefully handle invalid types from invalid go packages
-
-
-
-- 25b70271 Gracefully handle invalid types from invalid go packages
-
-046054db Merge pull request #882 from 99designs/testserver-autobind
-
-Use autobinding in testserver
-
-
-
-- 12c963a4 Use autobinding in testserver
-
-305116a0 Merge pull request #879 from coderste/patch-1
-
-Fixed broken GitHub link within the APQ page
-
-
-
-b4867b3f Fixed broken GitHub link within the APQ page
-
-Small documentation change to fix a broken GitHub link.
-
-
-
-- 9f6b0ee4 v0.10.1 postrelease bump
-
-
-
-
-
-
-## [v0.10.1](https://github.com/99designs/gqlgen/compare/v0.10.0...v0.10.1) - 2019-09-25
-- efb6efe0 release v0.10.1
-
-955f3499 Merge pull request #877 from 99designs/fix-websocket-client
-
-Fix websocket connections on test client
-
-
-
-- ef24a1cc Fix websocket connections on test client
-
-- c997ec0c v0.10.0 postrelease bump
-
-
-
-
-
-
-## [v0.10.0](https://github.com/99designs/gqlgen/compare/v0.9.3...v0.10.0) - 2019-09-24
-- 75a83752 release v0.10.0
-
-0bc3cc86 Merge pull request #875 from 99designs/fix-clientwide-opts
-
-Fix client global options
-
-
-
-b43edf5d Merge pull request #874 from 99designs/configurable-slice-element-pointers
-
-Add config option to omit pointers to slice elements
-
-
-
-- 921aa9cf Fix client global options
-
-- d0098e60 Add config option to omit pointers to slice elements
-
-01893280 Merge pull request #819 from 99designs/fix-directive-interface-nils
-
-Fix directives returning nils from optional interfaces
-
-
-
-- 34d10975 Fix directives returning nils from optional interfaces
-
-eea38e55 Merge pull request #862 from qhenkart/fixes-shareable-link-setting
-
-fixes shareable link button in playground
-
-
-
-b5e78342 Merge pull request #870 from 99designs/ws-init-ctx
-
-Allow changing context in websocket init func
-
-
-
-034aa627 Merge pull request #871 from 99designs/subscription-middleware
-
-Call middleware and directives for subscriptions
-
-
-
-7b41ca3c Merge pull request #872 from 99designs/autobind-prefix
-
-Allow prefixes when using autobind
-
-
-
-de8e559f Merge pull request #854 from wabain/nested-map-interface
-
-Fix for nested fields backed by map or interface
-
-
-
-cc64f331 Merge pull request #828 from 99designs/feat-rc
-
-introduce RequestContext#Validate and use it instead of NewRequestContext function
-
-
-
-- ed2a8536 Allow prefixes when using autobind
-
-- 819cc71b Call middleware and directives for subscriptions
-
-- 5a7c5903 Allow changing context in websocket init func
-
-17f32d28 Merge pull request #861 from 99designs/refactor-test-client
-
-Refactor test client
-
-
-
-ed14cf04 Update playground.go
-
-fix formatting
-
-
-
-ee8d7a17 Update playground.go
-
-fix formatting
-
-
-
-- 27389951 fixes shareable link button in playground
-
-- 4162d11e Refactor test client
-
-- 8ed6ffc7 Fix for nested fields backed by map or interface
-
-- 55b21442 Update stale.yml
-
-- feebee7d stalebot
-
-7e643fdc Merge pull request #838 from 99designs/fix-directive-nil
-
-fix directives return nil handling
-
-
-
-- f33e09e8 Merge branch 'master' into fix-directive-nil
-
-8590edef Merge pull request #839 from 99designs/fix-nil-directive
-
-refactor unimplemented directive handling
-
-
-
-- 1f7ed0d5 refactor unimplemented directive handling
-
-- 94ad3f2e fix directives return nil handling
-
-- 5c644a6f v0.9.3 postrelease bump
-
-- 82758be8 fix error
-
-- edde2d03 add OperationName field to RequestContext
-
-- 830e466e introduce RequestContext#Validate and use it instead of NewRequestContext function
-
-
-
-
-
-
-## [v0.9.3](https://github.com/99designs/gqlgen/compare/v0.9.2...v0.9.3) - 2019-08-16
-- a7bc468c release v0.9.3
-
-fc02cfe8 Merge pull request #829 from 99designs/fix-2directives
-
-fix go syntax issue when field has 2 directives
-
-
-
-924f620c Merge pull request #831 from yudppp/patch-1
-
-Fixed scalar reference documentation
-
-
-
-- ca4cc732 Fixed scalar documents
-
-- cc9fe145 fix go syntax issue when field has 2 directives
-
-- 6b70be03 v0.9.2 postrelease bump
-
-
-
-
-
-
-## [v0.9.2](https://github.com/99designs/gqlgen/compare/v0.9.1...v0.9.2) - 2019-08-08
-- 4eeacc6e release v0.9.2
-
-5628169d Merge pull request #822 from 99designs/windows-import-path-loop
-
-fix for windows infinite loop
-
-
-
-- a861aa52 lint fix
-
-- 6348a563 fix for windows infinite loop
-
-12893fa4 Merge pull request #821 from 99designs/fix-init
-
-Fix config loading during gqlgen init
-
-
-
-- 5fafe79c Fix config loading during gqlgen init
-
-2599f560 Merge pull request #820 from 99designs/keepalive-on-init
-
-send keepalive on init
-
-
-
-- 139e4e8d More directive docs
-
-- f93df340 send keepalive on init
-
-8f0d9b48 Merge pull request #816 from nii236/patch-1
-
-Update cors.md to allow CORS for websockets
-
-
-
-- 297e09c4 change origin check
-
-410d8322 Merge pull request #805 from andrey1s/golangci
-
-enable-all linters on golangci-lint
-
-
-
-- 504a96bc set enabled linters
-
-- 91966ef4 add example to lint
-
-- bcddd7aa fix typo in readme
-
-- cce06f1d update lint in circleci
-
-da1c208e Merge pull request #795 from oshalygin/feature/issue-794-resolve-dead-readme-link
-
-Update GraphQL Reference Link
-
-
-
-8343c32c Merge pull request #784 from y15e/add-missing-header
-
-Add a missing "Upload" header
-
-
-
-8302463f Merge pull request #797 from muesli/format-fixes
-
-Format import order using goimports
-
-
-
-f2825e09 Merge pull request #801 from Schparky/patch-1
-
-Documentation: getting-started edits
-
-
-
-3db5627f Merge pull request #807 from flrossetto/patch-1
-
-Fix doc
-
-
-
-- ab228f1b Update cors.md to allow CORS for websockets
-
-c4ac9347 Fix doc
-
-map[string]{interface} -> map[string]interface{}
-
-
-
-- fbbed5b8 use alias when invalid pkg name
-
-- 2591ea36 fix lint prealloc
-
-- 3b0e44fe fix lint misspell
-
-- 6ff62b61 fix lint gocritic
-
-- cb7f482b fix lint unparam
-
-- 620552be fix lint goimports
-
-- 477e804e update config golangci
-
-- 5b203bcc clarify where the go:generate line should be added
-
-- 2a3df24e Replace the -v flag as described below.
-
-- f3eeb639 Clarify that the schema file will be generated
-
-- 3ac17960 Missing '*' in Todos resolver example
-
-- bd598c2c Format import order using goimports
-
-419f966d Update GraphQL Reference Link (closes #794 )
-
-- The link in the readme has been updated to reference a post by
- Iván Corrales Solera, "Dive into GraphQL". The previous link
- does not resolve, likely because the personal site is no longer
- hosted.
-
-
-
-373359de Merge pull request #781 from 99designs/fix-default-directives-init
-
-Set default directives after parsing config
-
-
-
-- ca8b21e3 Add a missing header
-
-- 8cab5fba Set default directives after parsing config
-
-d2c5bf2a Merge pull request #780 from zdebra/master
-
-fixed generating a description to golang comments for enum type
-
-
-
-bf2cc90e Merge pull request #768 from 99designs/fix-ptr-from-directive
-
-Fix pointer returns from directive
-
-
-
-- 446c3df3 fixed generating a description to golang comments for enum type
-
-- 414a4d34 Merge pull request #771 from sunfmin/master
-
-- 4d1484b0 Fix doc for how to use [@goField](https://github.com/goField) directives forceResolver option
-
-- 6f3d7310 Fix pointer returns from directive
-
-- 21b65112 v0.9.1 postrelease bump
-
-
-
-
-
-
-## [v0.9.1](https://github.com/99designs/gqlgen/compare/v0.9.0...v0.9.1) - 2019-06-27
-- b128a291 release v0.9.1
-
-1bbc0cd6 Update release process to keep tags on master
-
-this was affecting the version shown in go modules when using commits
-
-
-
-5ffc2975 Merge pull request #764 from 99designs/fix-field-directives-on-roots
-
-fix field schema directives applied to roots
-
-
-
-- ef3830b5 fix field schema directives applied to roots
-
-17ee40ba Merge pull request #761 from 99designs/autobinding
-
-Autobind models
-
-
-
-- b716bfac Autobind models
-
-fc3755f1 Merge pull request #732 from 99designs/schemaconfig-plugin
-
-Add a plugin for configuring gqlgen via directives
-
-
-
-- c14f8650 Add docs
-
-- 64aca616 Merge remote-tracking branch 'origin/master' into schemaconfig-plugin
-
-5e7e94c8 Merge pull request #756 from andrey1s/field
-
-generate field defenition and execute field directive
-
-
-
-ad2ca304 Merge pull request #759 from 99designs/circle-workflows
-
-CircleCI workflows
-
-
-
-- 0fc822ca CircleCI workflows
-
-2dc8423b Merge pull request #758 from franxois/patch-1
-
-Update dataloaders.md
-
-
-
-d0db28ab Update dataloaders.md
-
-Make SQL request use requested IDs
-
-
-
-- a58ecfe9 add example and test field directive
-
-- 526beecb update generate field
-
-- 6e9d7dab generate types directive by location
-
-- dfec7b68 define fieldDefinition template
-
-- be890ab9 use UnmarshalFunc in args directives implement
-
-- dd162f04 define implDirectives template
-
-56f3f92b Merge pull request #755 from 99designs/fix-globbing-windows
-
-fix globbing on windows
-
-
-
-- a4480fb0 fix globbing on windows
-
-ba176e2e Merge pull request #754 from 99designs/coveralls
-
-Add coveralls
-
-
-
-- f28ed264 Add coveralls
-
-f4a69ab5 Merge pull request #744 from andrey1s/directive
-
-add Execute QUERY/MUTATION/SUBSCRIPTION Directives
-
-
-
-- dbd2cc6e simplify resolver test
-
-7fed71b6 Merge pull request #728 from fgallina/make-generated-resolver-dependent-types-follow-configured-type
-
-resolvergen: use the resolver type as base name for dependent types
-
-
-
-cb284c56 Merge pull request #734 from DBL-Lee/master
-
-Automatic Persisted Queries
-
-
-
-726a94f4 Merge pull request #750 from 99designs/ws-connection-param-check
-
-[websocket] Add a config to reject initial connection
-
-
-
-- 69d7e282 move directive to directives.gotpl
-
-090f0bd9 Merge pull request #722 from marwan-at-work/deps
-
-resolve all pkg dependencies
-
-
-
-- c397be0c Update websocketInitFunc to return error instead of boolean
-
-- be18ae1f Add a test
-
-- a6508b6d Update typing, function name and small code refactor
-
-- e6d791a9 Add websocketOnConnectFunc as a config that can be used to validate websocket init requests
-
-c5acbead resolvergen: use the resolver type as base name for dependent types
-
-The template was outputing invalid code since the resolver type was
-not used in places like the embedding at {query,mutation}Resolver.
-
-This change also ensures that objects like {query,mutation}Resolver
-also use the user provided type name as suffix.
-
-Here's the resulting diff on the code generation with `type:
-GeneratedResolver` in the resolver config:
-
-```
-diff -u resolver.go resolvernew.go
---- resolver.go 2019-05-26 20:04:15.361969755 -0300
-+++ resolvernew.go 2019-05-26 20:04:54.170737786 -0300
-@@ -7,20 +7,20 @@
- type GeneratedResolver struct{}
-
- func (r *GeneratedResolver) Mutation() MutationResolver {
-- return &mutationResolver{r}
-+ return &mutationGeneratedResolver{r}
- }
- func (r *GeneratedResolver) Query() QueryResolver {
-- return &queryResolver{r}
-+ return &queryGeneratedResolver{r}
- }
-
--type mutationResolver struct{ *Resolver }
-+type mutationGeneratedResolver struct{ *GeneratedResolver }
-
--func (r *mutationResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo, error) {
-+func (r *mutationGeneratedResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo, error) {
- panic("not implemented")
- }
-
--type queryResolver struct{ *Resolver }
-+type queryGeneratedResolver struct{ *GeneratedResolver }
-
--func (r *queryResolver) Todos(ctx context.Context) ([]*Todo, error) {
-+func (r *queryGeneratedResolver) Todos(ctx context.Context) ([]*Todo, error) {
- panic("not implemented")
- }
-```
-
-
-
-- cfdbc39a update QueryDirectives
-
-- f32571ee add SUBSCRIPTION Directive
-
-- 32462d0f update example todo add directive with location QUERY and MUTATION
-
-- 3eec887a add Execute QUERY/MUTATION/SUBSCRIPTION Directives
-
-- 8fcc1868 format
-
-e0e1e318 Merge pull request [#1](https://github.com/99designs/gqlgen/issues/1) from radev/master
-
-Support for external APQ cache
-
-
-
-- 9873d998 Add APQ documentation with example
-
-- 48292c10 Support pluggable APQ cache implementations.
-
-- 694f90aa Merge pull request #717 from cbelsole/schema_file_globbing (closes #631 )
-
-- 9be5aad0 Don't inject builtins during schema config
-
-- 8dc17b47 support GET for apq
-
-- d36932c5 support automatic persisted query
-
-- de75743c Add plugin for providing config via schema directives
-
-- 17a82c37 Provide config to skip generating runtime for a directive
-
-ba7092c5 Merge pull request #724 from saint1991/patch-1
-
-added a missing close bracket
-
-
-
-- 9c1f8f2a added a missing close bracket
-
-- 3dd8baf5 resolve all pkg dependencies
-
-- 1617ff28 Merge pull request #718 from hh/fix-docs (closes #714 )
-
-- 9d332a7d Fixing getting-started documentation
-
-- 39db1477 updated docs
-
-- e32c82be cleanup
-
-- e9389ef8 added schema file globbing fixes #631
-
-4f163cbc Merge pull request #713 from 99designs/faq
-
-Add faq section
-
-
-
-- 3a21b369 Add faq section
-
-
-
-
-
-
-## [v0.9.0](https://github.com/99designs/gqlgen/compare/v0.8.3...v0.9.0) - 2019-05-15
-- ea4652d2 release v0.9.0
-
-f3c8406d Merge pull request #710 from 99designs/slice-pointers
-
-Use pointers to structs inside slices
-
-
-
-- e669d476 fix imports for vendor based projects
-
-- 315141d9 Use pointers to structs inside slices
-
-9a6a10ab Merge pull request #706 from 99designs/mapping-primitive
-
-Fix mapping object types onto go primitives
-
-
-
-- a5120054 fix binding to primitive non leaf types
-
-- b0cd95a1 Test mapping object types onto go string
-
-eaa61bb5 Merge pull request #707 from 99designs/gomodules-performance
-
-make gqlgen generate 10x faster in some projects
-
-
-
-ab961ce0 Merge pull request #705 from 99designs/fix-error-race
-
-Fix a data race when handling concurrent resolver errors
-
-
-
-- 71cc8554 make gqlgen generate 10x faster in projects with cgo
-
-- cab4babe Test mapping object types onto go primitives
-
-- 962470de Fix a data race when handling concurrent resolver errors
-
-9ca43ba9 Merge pull request #701 from 99designs/modelgen-pointers
-
-Use pointers when embedding structs in generated structs
-
-
-
-- 4f5e9cf0 always use pointers when refering to structs in generated models
-
-e2ac8480 Merge pull request #704 from tul/doc-typo
-
-Fix typo
-
-
-
-- 80ebe644 Fix typo
-
-0bd90809 Merge pull request #700 from 99designs/fix-interface-caseing
-
-Fix interface casing
-
-
-
-5586ee2c Merge pull request #702 from 99designs/drop-automatic-zeroisnull
-
-Drop automatic conversion of IsZero to null
-
-
-
-- 75aa99ad Drop automatic conversion of IsZero to null
-
-- 46c40b74 Fix interface casing (closes #694 )
-
-e49d44f7 Merge pull request #689 from tgwizard/enforce-request-content-type
-
-Enforce content type for POST requests
-
-
-
-- 78f277e9 run go generate
-
-- d4b3de3a Merge remote-tracking branch 'origin/master' into enforce-request-content-type
-
-f8ef6d2e Merge pull request #668 from mbranch/complexity
-
-Fix: complexity case selection
-
-
-
-c4805049 Merge pull request #655 from hantonelli/file-upload
-
-File upload
-
-
-
-- 5d1dea0a run go generate
-
-- 8a0c34a4 Merge branch 'master' into file-upload
-
-4e359aa2 Merge pull request #686 from qhenkart/master
-
-Adds default custom scalar of interface{}
-
-
-
-- aeccbce0 Update test include an example that uses io.Read interface directly
-
-- d9dca642 Improve documentation
-
-- f30f1c31 Fix fmt
-
-- 54226cdb Add bytesReader to reuse read byte array
-
-02e9dd8e Fix complexity case selection
-
-Use the GraphQL field name rather than the Go field name in the generated
-`Complexity` func.
-
-Before this patch, overloading complexity funcs was ineffective because they
-were never executed.
-
-It also ensures that overlapping fields are now generated; mapping all possible
-field names to the associated complexity func.
-
-
-
-- bf2d07a4 moves naming convention to a non-go standard
-
-d1e8acda Merge pull request #687 from stereosteve/fix-includeDeprecated
-
-Fix: omit deprecated fields when includeDeprecated=false
-
-
-
-- f7d0b9c8 Enforce content type for POST requests
-
-- 7d0b8eec Fix: omit deprecated fields when includeDeprecated=false
-
-- 89c87345 fix grammar in docs
-
-- 85643f5d fix import
-
-- ca96a155 update docs
-
-- 1de25d0c adds interface scalar type
-
-- 43fc53f9 Improve variable name
-
-- b961d34e Remove wrapper that is now not required
-
-- bb023476 Lint code
-
-- f8484159 Modify graphql.Upload to use io.ReadCloser. Change the way upload files are managed.
-
-0306783e Revert "Change graphql.Upload File field to FileData."
-
-This reverts commit 7ade7c2
-
-
-
-afe33f73 Merge pull request #680 from asp24/collect-fields-performance
-
-Better CollectFields performance
-
-
-
-- 7ba1b3b2 graphql.CollectFields now accept *RequestContext as first arg It was done because RequestContext is a part of executionContext and can be passed directly without extraction from ctx. This is increasing performance when model depth is high
-
-- 5dfa2285 Pre-allocate mem for collectFields() method result slice
-
-- 88cdbdf1 Rename getOrCreateField to getOrCreateAndAppendField to describe behaviour
-
-- a74abc47 Early return in shouldIncludeNode if directives empty
-
-- 7ade7c21 Change graphql.Upload File field to FileData.
-
-- da52e810 Extend test and don't close form file.
-
-1c95d42a Merge pull request #678 from jonatasbaldin/gin-context-recipe
-
-Fix unset key and comment block at Gin recipe docs
-
-
-
-- 0b39c445 Fix unset key and comment block
-
-5aa6a20b Merge pull request #673 from marwan-at-work/tpl
-
-codegen/templates: allow templates to be passed in options instead of…
-
-
-
-- 37fd067e fix typo
-
-- e69b7399 add docs to the templates package
-
-8cae895b Merge pull request #676 from jonatasbaldin/gin-context-recipe
-
-Add recipe to use gin.Context
-
-
-
-- 40c7b952 update test name
-
-- 5418a290 Add recipe to use gin.Context
-
-- 16f392ee add unit test
-
-- a0ee7172 codegen/templates: allow templates to be passed in options instead of os files
-
-- 2cf7f452 Fix comments (add request size limit, remove useless comments, improve decoding and function signature, improve documentation)
-
-5ff60925 Merge pull request #665 from ezeql/patch-1
-
-update README.md
-
-
-
-b42e1ba6 update README.md
-
-fix link
-
-
-
-- d3770395 Fix tests.
-
-- 2c1f8573 Fix lint errors.
-
-- 73b3a536 Fmt graphql.go
-
-- 83cde4b6 Fix tests. Improve code format.
-
-- 425849a6 Improve fileupload example readme. Update scalars.md. Add file-upload.md
-
-- 849d4b1e Make uploadMaxMemory configurable
-
-- fc318364 Improve format, inline const.
-
-- 662dc337 Move Upload to injected if defined in the schema as scalars
-
-- f244442e Fix merge. Remove regexp check.
-
-bf79bc92 Merge branch 'master' into next
-
-# Conflicts:
-# codegen/config/config.go
-# handler/graphql.go
-# handler/graphql_test.go
-
-
-
-- bd4aeaa6 Merge remote-tracking branch 'upstream/master'
-
-- 3a6f2fb7 Improve test code
-
-- 239bc46f Add comments
-
-- be8d6d12 Improve test
-
-- 4d92696b Clean up code and add tests
-
-- 2c414edc Improve and add tests
-
-- 68446e17 Revert change to websocket_test
-
-- 61c1cb9c Improve examples
-
-- 493d9375 Improve examples
-
-- 3c5f8bb9 Improve some examples
-
-- db7a03b1 Improve tests and names
-
-- c493d1b9 Revert changing to websocket_test
-
-- 998f7674 Revert changing the stub file
-
-- a7e95c59 Fix tests. Improve file generation
-
-- 10beedb3 Remove not required file
-
-- 5afb6b40 Add file upload to default schema
-
-- 9c17ce33 Add file upload
-
-- b454621d Add support to upload files.
-
-
-
-
-
-
-## [v0.8.3](https://github.com/99designs/gqlgen/compare/v0.8.2...v0.8.3) - 2019-04-03
-- 010a79b6 release v0.8.3
-
-3623f7fc Merge pull request #650 from andcan/plugin-funcmap
-
-Allow plugins to provide additional template funcs
-
-
-
-a2e59362 Merge pull request #652 from andrey1s/extraBuiltins
-
-add extra builtins types when no type exists
-
-
-
-c93d92ba Merge pull request #654 from sharkyze/fix-introscpetion-doc
-
-doc: fix mistake on introspection doc page
-
-
-
-- 93e72b58 doc: fix error on introspection doc page
-
-ef2e51ba Merge pull request #637 from 99designs/fix-is-slice
-
-Fix Mapping Custom Scalar to Slice
-
-
-
-- e5ff6bc2 add extra builtins types when no type exists
-
-- 8225f63a Allow plugins to provide additional template funcs
-
-- 7b533df1 Update ISSUE_TEMPLATE.md
-
-- 055157f9 Update ISSUE_TEMPLATE.md
-
-a148229c Merge pull request #644 from Sauraus/master
-
-Fix Gin installation instruction
-
-
-
-52624e53 Fix Gin installation instruction
-
-Current `go get gin` instruction results in an error from Go: `package gin: unrecognized import path "gin" (import path does not begin with hostname)`
-
-
-
-- 515f2254 Add test case for custom scalar to slice
-
-2284a3eb Improve IsSlice logic to check GQL def
-
-Currently TypeReference.IsSlice only looks at the Go type to decide.
-This should also take into account the GraphQL type as well, to cover
-cases such as a scalar mapping to []byte
-
-
-
-
-
-
-
-
-## [v0.8.2](https://github.com/99designs/gqlgen/compare/v0.8.1...v0.8.2) - 2019-03-18
-- ee06517c release v0.8.2
-
-8ac8a1f8 Merge pull request #635 from 99designs/fix-inject-builtin-scalars
-
-Only Inject Builtin Scalars if Defined in Schema
-
-
-
-- d10e048e Add docs for built-in scalar implementations
-
-- d27e6eb6 Add example case for object type overriding builtin scalar
-
-- d567d5c8 Inject non-spec builtin values only if defined
-
-3e39b57a Merge pull request #634 from 99designs/fallback-to-string
-
-Use graphql.String for types wrapping a basic string
-
-
-
-- a2cce0d1 Use graphql.String for types wrapping a basic string
-
-fc05501b Merge pull request #633 from 99designs/fix-union-pointers
-
-Fix Having Pointers to Union Types
-
-
-
-- f02dabb7 Add test case for union pointer
-
-8257d423 Check Go type rather than GQL type for ptr
-
-This is probably a more correct way to check whether we should wrap the
-type in a pointer or not, rather than looking at the GrapQL definition.
-There may be use-cases where a GraphQL interface/union might be mapped
-to a Go stuct.
-
-
-
-5df0938f Merge pull request #628 from 99designs/fix-ambient-imports
-
-Move ambient imports into cmd package
-
-
-
-8e1590d7 Move ambient imports into cmd package
-
-The getting started docs for dep suggest creating a local gqlgen script,
-however these ambient import are in the root, so dep misses them.
-
-This was changed in 0.8 but the ambient imports weren't moved.
-
-
-
-58744de9 Merge pull request #622 from 99designs/handle-complexity-root-collisions
-
-Handle colliding fields in complexity root gracefully
-
-
-
-- c889b314 Handle colliding fields in complexity root gracefully
-
-26c395b0 Merge pull request #620 from codyleyhan/cl/error
-
-Allow user to supply path to gqlerror
-
-
-
-- 12cf01aa Allow user to supply path to gqlerror
-
-932322b6 Merge pull request #619 from 99designs/nil-slices
-
-Support returning nulls from slices
-
-
-
-- a48c55b2 Support returning nulls from slices
-
-2b270e4d Merge pull request #618 from codyleyhan/cl/method
-
-Adds way to determine if a resolver is a function call or value
-
-
-
-- af6dc16d Add test for IsMethod in resolver
-
-- 27e97535 Expose IsMethod to resolver context
-
-- f52726de Update README.md
-
-ac2422e3 Merge pull request #614 from wesovilabs/master
-
-Adding entry for workshop
-
-
-
-db4f7255 Merge pull request #613 from icco/patch-2
-
-Upgrade graphql-playground to 1.7.20
-
-
-
-163bfc76 Merge pull request #612 from 99designs/maps-changesets
-
-Maps as changesets
-
-
-
-- 6aa9dfc6 Adding entry for workshop
-
-08f936e1 Upgrade graphql-playground to 1.7.20
-
-CSS didn't change but js did.
-
-
-
-8fb1fafd Merge pull request #611 from 99designs/gqlparser-1.1.2
-
-Bump gqlparser to 1.1.2
-
-
-
-- 37983a5f remove some invalid test schema
-
-- 765ff738 Add some docs on maps
-
-- 0a92ca46 Support map[string]interface{} in return types
-
-ac56112b Merge pull request #610 from tgwizard/dynamic-complexity
-
-Allow configuring the complexity limit dynamically per request
-
-
-
-- a89050aa Bump gqlparser to 1.1.2
-
-- dd288145 Allow configuring the complexity limit dynamically per request
-
-485ddf30 Merge pull request #605 from 99designs/fix-default-scalars
-
-Fix default scalars
-
-
-
-3ca2599a Merge pull request #606 from jonatasbaldin/add-gin-recipe
-
-Add Gin recipe
-
-
-
-- 386eede9 Add Gin recipe
-
-22be59d1 Merge pull request #604 from cevou/arg-scalar
-
-Fix directives on args with custom type
-
-
-
-- d02736dc Added test for fix directives on args with custom type
-
-- 30d235bc Fix default scalars
-
-d7b5dc28 Merge pull request #591 from 99designs/fix-577
-
-Fix mixed case name handling in ToGo, ToGoPrivate
-
-
-
-- bef6c0a9 Fix directives on args with custom type
-
-- bc386d79 Fix mixed case name handling in ToGo, ToGoPrivate
-
-
-
-
-
-
-## [v0.8.1](https://github.com/99designs/gqlgen/compare/v0.8.0...v0.8.1) - 2019-03-07
-- 229185e4 release v0.8.1
-
-d872af63 Merge pull request #582 from demdxx/master
-
-Load the playground sources from HTTPS by default
-
-
-
-8e66832f Merge pull request #589 from 99designs/fix-autocasing-modelgen-bugs
-
-Fix autocasing modelgen bugs
-
-
-
-- de3b7cb8 Fix autocasing modelgen bugs
-
-8e00703e Merge pull request #588 from 99designs/fix-default-scalar-implementation-regression
-
-Fix default scalar implementation regression
-
-
-
-- b27139ed Fix default scalar implementation regression
-
-737a59a3 Merge pull request #579 from 99designs/fix-camelcase
-
-Take care about commonInitialisms in ToGo
-
-
-
-- 52838cca fix ci
-
-- 2c3783f1 some refactoring
-
-- eb453674 address comment
-
-- dcd208d9 Merge pull request #584 from 99designs/fix-deprecated-directive
-
-5ba8c8ea Add builtin flag for build directives
-
-These have an internal implementation and should be excluded from the
-DirectiveRoot. In the future this may be a func that plugins could use
-to add custom implementations.
-
-
-
-b8526698 Load the playground sources from HTTPS by default
-
-For some browsers on non-secure domains resources from CDN doesn't loads, so I made all cdn.jsdelivr.net resources of the playground by HTTPS by default
-
-
-
-- 6ea48ff6 Take care about commonInitialisms in ToCamel
-
-1968a7bc Merge pull request #576 from jflam/patch-1
-
-Update README.md
-
-
-
-44becbbe Update README.md
-
-Fixed typo in MD link ttps -> https
-
-
-
-
-
-
-
-
-## [v0.8.0](https://github.com/99designs/gqlgen/compare/v0.7.2...v0.8.0) - 2019-03-04
-- f24e79d0 release v0.8.0
-
-55df9b8d Merge pull request #574 from 99designs/next
-
-v0.8.0
-
-
-
-aedcc68a Merge pull request #573 from 99designs/plugin-docs
-
-Very rough first pass at plugin docs
-
-
-
-- 8f91cf56 Very rough first pass at plugin docs
-
-3d9ad75e Merge pull request #572 from 99designs/handle-nonexistant-directories-when-genreating-packagenames
-
-Handle non-existant directories when generating default package names
-
-
-
-- 08923334 Handle non-existant directories when generating default package names
-
-2ef4b443 Merge pull request #571 from 99designs/automatically-bind-to-int32-int64
-
-Automatically bind to int32 and int64
-
-
-
-2888e96c Merge pull request #570 from 99designs/vendor-packages-workaround
-
-Workaround for using packages with vendored code
-
-
-
-- fb87dc39 Automatically bind to int32 and int64
-
-f2d9c3f7 Merge pull request #569 from 99designs/improve-introduction
-
-Introduction Improvements
-
-
-
-- 1e7aab63 Workaround for using packages with vendored code
-
-- 5c692e29 User README as canonical introduction
-
-- 25bdf3d6 Consolidate Introduction documents
-
-- d81670d8 Add initial contributing guidelines
-
-- d9a9a532 playground: secure CDN resources with Subresource Integrity
-
-cb38b4be Merge pull request #568 from MichaelMure/secured-playground
-
-playground: secure CDN resources with Subresource Integrity
-
-
-
-0258e1a2 Merge pull request #565 from steebchen/next
-
-Fix cli config getters
-
-
-
-- 6ad1d97e Move feature comparison
-
-- 37cbbd6d playground: secure CDN resources with Subresource Integrity
-
-- da12fd11 Fix cli config getters
-
-51266b8f Merge pull request #554 from 99designs/fix-missing-recover
-
-Recover from panics in unlikly places
-
-
-
-- 67795c95 Recover from panics in unlikly places
-
-56163b45 Merge pull request #553 from 99designs/getting-started-0.8
-
-Update Getting Started for 0.8 and Go Modules
-
-
-
-- 0bd120b5 Update dep code as well
-
-- 6c576032 Update getting started with 0.8 generated code
-
-- ba761dcf Reintroduce main package in root
-
-- cdc575a2 Update getting started with Go Modules support
-
-- 378510e5 Move Getting Started above Configuration
-
-- d261b3fb Fix navigation font weights
-
-327a1a34 Merge pull request #551 from 99designs/improved-collect-fields-api
-
-Improved Collect Fields API and Documentation
-
-
-
-6439f197 Merge pull request #552 from 99designs/always-return-struct-pointers
-
-Always return *Thing from resolvers for structs
-
-
-
-- 318639bb Always return *Thing from resolvers for structs
-
-- e61b3e0b Add Field Collection docs
-
-ef0223cf Merge pull request #541 from 99designs/fix-underscore-only-fields
-
-Allow underscore only fields and naming collisions to be aliased explicitly
-
-
-
-- 58b2c74f drive by config fix
-
-- f6c52666 Add a test for aliasing different cases (closes #376 )
-
-- 8c2d15ee Fix underscore only fields (closes #473 )
-
-- 0eb8b5c1 Merge remote-tracking branch 'origin/master' into HEAD
-
-015d02eb Merge pull request #542 from Elgarni/add-more-validation-checks-on-yml-config-file
-
-Add more validation checks on .yml config file
-
-
-
-647c62a5 Merge pull request #550 from 99designs/fix-unstable-marshaler-func
-
-Fix unstable external marshaler funcs with same name as type
-
-
-
-- 3a8bf33f Add CollectAllFields test cases
-
-- 9ebe7717 Fix unstable external marshaler funcs with same name as type
-
-a1195843 Merge pull request #544 from enjoylife/fix-directive
-
-Fix directives on fields with custom scalars
-
-
-
-- dc925c46 Added a test for config checking
-
-- b56cb659 Refactored config check so that it runs after being normalized
-
-- dc6a7a36 Add CollectAllFields helper method
-
-a2e61b3d Added a model and used directive on an input field within the integration schema
-
-Added to the integration schema such that the build will catch the directive bug in question.
-
-
-
-- 0b0e4a91 Fix directives on fields with custom scalars
-
-- 8ac0f6e4 Removed redundant semicolons
-
-- 3645cd3e Add more validation checks on .yml config file
-
-1b8b1ea1 Fix typo in README
-
-Fix typo in README in selection example directory to point to the selection example, not the todo example.
-
-
-
-66120d8f Merge pull request #535 from awiede/master
-
-Fix typo in README
-
-
-
-- fcacf200 Merge remote-tracking branch 'origin/master' into HEAD
-
-b9819b21 Merge pull request #540 from 99designs/check-is-zero
-
-Automatically convert IsZero to null
-
-
-
-03a655dc Merge pull request #526 from 99designs/union-fragment-bug
-
-Union Fragment Bug Fix
-
-
-
-- 99e9f41f Use Implements for type Implementors in codegen
-
-ccca823f Separate out conditionals in collect fields
-
-These conditions are not really related, and I missed the second
-conditional when reading through the first time.
-
-
-
-- efe8b026 Add reproducable test cases
-
-- 306da15f Automatically convert IsZero to null
-
-- f81c61d3 Merge pull request #539 from 99designs/test-nullable-interface-pointers (closes #484 )
-
-f5200c80 Merge pull request #498 from vilterp/playground-content-type
-
-add `content-type: text/html` header to playground handler
-
-
-
-- de148d13 Test for #484
-
-- 9a48a007 Merge pull request #538 from 99designs/test-input-marshalling (closes #487 )
-
-- 7a82ab43 Test for #487
-
-48a7e07f Merge pull request #537 from 99designs/stub-generation
-
-Stub generation
-
-
-
-- 787b38d8 Break testserver tests down into smaller files using stubs
-
-- c5e3dd44 add stub generation plugin
-
-43db679a Merge pull request #534 from 99designs/multiple-bind-types
-
-Multiple bind types
-
-
-
-- b26b915e Move input validation into gqlparser see https://github.com/vektah/gqlparser/pull/96
-
-7d394222 Fix typo in README
-
-Fix typo in README in selection example directory to point to the selection example, not the todo example.
-
-
-
-- 42131868 Linting fixes
-
-- 956d0306 Arg type binding
-
-- 6af3d85d Allow multiple field bind types
-
-- 3015624b Regen dataloader with correct version
-
-- 50f7d9c8 Add input field directives back in
-
-- 8047b82a Fix nullability checks in new marshalling
-
-- b3f139c9 Cleanup field/method bind code
-
-- cf94d3ba Removed named types
-
-82ded321 Merge pull request #532 from 99designs/fix-missing-json-content-type
-
-Fix set header to JSON earlier in GraphQL response
-
-Update the GraphQL handler to set the Response Header to JSON earlier for
-error messages to be returned as JSON and not text/html.
-
-Fixes https://github.com/99designs/gqlgen/issues/519
-
-## Notes:
-- Add checks for JSON Content-Type checks in decode bad queries tests
-
-
-
-b4c5a074 Fix set header to JSON earlier in GraphQL response
-
-Update the GraphQL handler to set the Response Header to JSON earlier for
-error messages to be returned as JSON and not text/html.
-
-Fixes https://github.com/99designs/gqlgen/issues/519
-
-== Notes:
-- Add checks for JSON Content-Type checks in decode bad queries tests
-
-
-
-- 533b08b6 remove wonky input directives
-
-- 60473555 Shared arg unmarshaling logic
-
-a7c8abe6 Merge pull request #529 from 99designs/websocket-keepalive
-
-Add websocket keepalive support
-
-
-
-- 555d7468 Remove TypeDefinition from interface building
-
-- cfa012de Enable websocket connection keepalive by default
-
-c5b9b5a8 Use constant tick rate for websocket keepalive
-
-Some clients (e.g. apollographql/subscriptions-transport-ws) expect a
-constant tick rate for the keepalive, not just a keepalive after x
-duration of inactivity.
-
-
-
-- 693753fc Add websocket keepalive support
-
-- 162afad7 enums dont exist in runtime
-
-d0b6485b Merge pull request #525 from 99designs/stop-grc-panic
-
-Stop GetResolverContext from panicking when missing
-
-
-
-78cfff48 Merge pull request #528 from 99designs/fix-todo-directive
-
-Fix Todo Example Directive
-
-
-
-5e1bcfaf Remove parent check in directive
-
-This should always be true, and currently has a bug when comparing
-pointers to structs. Can just be removed.
-
-
-
-- c1b50cec Stop GetResolverContext from panicking when missing
-
-- 44aabbd3 Move all build steps back into file containing defs
-
-- 4e49d489 Merge object build and bind
-
-- 97764aec move generated gotpl to top
-
-- d380eccf promote args partial to full template
-
-- 1bc51010 Everything is a plugin
-
-055fb4bc Merge pull request #514 from 99designs/gomod
-
-Add support for go modules
-
-
-
-- 48eb6c52 Update appveyor
-
-- 9e02a977 fix integration test
-
-- 251e8514 Add support for go modules
-
-62175eab Merge pull request #502 from 99designs/model-plugin
-
-Model plugin
-
-
-
-- 0f884493 linting fixes
-
-- c6eb1a85 Extract model generation into a plugin
-
-d3f1195c add `content-type: text/html` header to playground handler
-
-This ensures that the browser doesn't think it should download the page
-instead of rendering it, if the handler goes through a gzipping
-middleware.
-
-
-
-f94b4b78 Merge pull request #497 from azavorotnii/small_fixes
-
-Small fixes
-
-
-
-- 21769d93 Ensure no side affect from preceding tests in wont_leak_goroutines test
-
-- 10f4ccde newRequestContext: remove redundant else part
-
-- a76e0228 Add cache usage for websocket connection
-
-- 940db1f9 Fix cacheSize usage in handler
-
-fba9a378 Merge pull request #492 from 99designs/unified-merge-pass
-
-Unified merge pass
-
-
-
-- a7f719a3 update appveyour to not rely on main
-
-- f46b7c8e Reclaim main package for public interface to code generator
-
-- 6b829037 Extract builder object
-
-- 87b37b0c Replace string based type comparisons with recursive types.Type check
-
-82b1917d Merge pull request #490 from 99designs/bind-directly-to-types
-
-Bind directly to AST types, instead of copying out random bits
-
-
-
-- 1d86f988 extract argument construction
-
-- 4b85d1b0 Merge buildInput into buildObject
-
-- db33d7b7 Extract graphql go merge into its own package
-
-- afc773b1 Use ast definition directly, instead of copying
-
-- 8298acb0 bind to types.Types in field / arg references too
-
-- 38add2c2 Remove definition embedding, use normal field instead
-
-- 950ff42c Bind to types.Type directly to remove TypeImplementation
-
-- 70c852eb Add lookup by go type to import collection
-
-- eb101161 Remove aliased types, to be replaced by allowing multiple backing types
-
-e79252b0 Merge pull request #488 from 99designs/refactor-config
-
-Refactor config
-
-
-
-- 4138a372 rename generator receiver
-
-- bec38c7e Extract config into its own package
-
-- 34b87871 Rename core types to have clearer meanings
-
-- f10fc649 Merge remote-tracking branch 'origin/next' into HEAD
-
-dd972081 Merge pull request #486 from nicovogelaar/feature/list-of-enums
-
-add list of enums
-
-
-
-- 1140dd85 add unit test for list of enums
-
-- 1e3e5e9b add list of enums
-
-- f87ea6e8 Merge remote-tracking branch 'origin/master' into HEAD
-
-473f4f0c Merge pull request #465 from 99designs/performance-improvments
-
-Performance improvments
-
-
-
-- f9ee6ce0 return arg in middleware
-
-5c8b1e24 Avoid unnessicary goroutines
-
-goos: linux
-goarch: amd64
-pkg: github.com/99designs/gqlgen/example/starwars
-BenchmarkSimpleQueryNoArgs-8 300000 25093 ns/op 6453 B/op 114 allocs/op
-PASS
-ok github.com/99designs/gqlgen/example/starwars 10.807s
-
-
-
-b0ffa22a Remove strconv.Quote call in hot path to avoid some allocs
-
-go test -benchtime=5s -bench=. -benchmem
-goos: linux
-goarch: amd64
-pkg: github.com/99designs/gqlgen/example/starwars
-BenchmarkSimpleQueryNoArgs-8 200000 32125 ns/op 6277 B/op 118 allocs/op
-PASS
-ok github.com/99designs/gqlgen/example/starwars 9.768s
-
-
-
-2cf5a5b8 Add a benchmark
-
-go test -benchtime=5s -bench=. -benchmem
-goos: linux
-goarch: amd64
-pkg: github.com/99designs/gqlgen/example/starwars
-BenchmarkSimpleQueryNoArgs-8 200000 32680 ns/op 6357 B/op 126 allocs/op
-PASS
-ok github.com/99designs/gqlgen/example/starwars 9.901s
-
-
-
-- 5e0456fe fix fmt anf metalint generated code
-
-- b32ebe14 check nullable value for go1.10
-
-- d586bb61 use arg value for the ResolveArgs
-
-- e201bcb5 set default nil arg to ResolverContext
-
-- 6fa63640 remove empty line in generated files
-
-- 139ed9fb fix go10 assign exist variable by eq
-
-- 428c6300 add nullable argument to directives
-
-- 74096033 move chainFieldMiddleware to generate code for BC
-
-- be51904c check nullable arguments
-
-- 6b005094 add test directives generate
-
-- 047f2ebc update inline template
-
-- a13b31e9 metalinter
-
-- 526bef0b generate servers and add path to error
-
-- 29770d64 resolve = in template
-
-- 3a729cc3 update recursive middleware
-
-- 8b3e634e update tempate and set Dump public
-
-- e268bb75 Merge remote-tracking branch 'upstream/master' into directives
-
-- e8f0578d add execute ARGUMENT_DEFINITION and INPUT_FIELD_DEFINITION directive
-
-
-
-
-
-
-## [v0.7.2](https://github.com/99designs/gqlgen/compare/v0.7.1...v0.7.2) - 2019-02-05
-- da1e07f5 release v0.7.2
-
-8c0562c1 Merge pull request #530 from 99designs/websocket-keepalive-master
-
-Add websocket keepalive support
-
-
-
-- 43fdb7da Suppress staticcheck lint check on circleci
-
-9c4b877a Use constant tick rate for websocket keepalive
-
-Some clients (e.g. apollographql/subscriptions-transport-ws) expect a
-constant tick rate for the keepalive, not just a keepalive after x
-duration of inactivity.
-
-
-
-- d36d3dc5 Add websocket keepalive support
-
-39216361 Merge pull request #476 from svanburen/patch-1
-
-Update config.md
-
-
-
-9f6f2bb8 Update config.md
-
-Add a missed word and add an apostrophe
-
-
-
-- c033f5fc Fix edit link positioning
-
-- b3f163d8 Add not about relative generate path
-
-- 675ba773 Update errors.md
-
-5c870a48 Merge pull request #461 from ryota548/patch-1
-
-Update getting-started.md
-
-
-
-9bcd27c1 Update getting-started.md
-
-modify `graph/graph.go` to `resolver.go`
-
-
-
-
-
-
-
-
-## [v0.7.1](https://github.com/99designs/gqlgen/compare/v0.7.0...v0.7.1) - 2018-11-29
-3a7f37c7 Merge pull request #455 from 99designs/fix-deprecated-fields
-
-Fix deprecated fields
-
-
-
-- b365333b Fix graphiql deprecating all fields
-
-- 99610be9 Get chat example up to date
-
-
-
-
-
-
-## [v0.7.0](https://github.com/99designs/gqlgen/compare/v0.6.0...v0.7.0) - 2018-11-28
-- a81fe503 release v0.7.0
-
-4bfc82d7 Merge pull request #453 from 99designs/deprecate-binary
-
-Add Deprecation Warning to Binary
-
-
-
-8dd29b85 Merge pull request #454 from 99designs/update-gqlparser
-
-Update gqlparser to latest
-
-
-
-- 747c3f9c Update gqlparser to latest
-
-d6d9885f Merge pull request #416 from 99designs/improved-getting-started
-
-Improve Getting Started Documentation — No Binary Approach
-
-
-
-- d22f03c6 Add deprecation warning
-
-- 878f3945 Minor fixes to getting started code examples
-
-6a02657c Merge pull request #447 from 99designs/disable-introspection
-
-Add config option to disable introspection
-
-
-
-- b9fbb642 Mention recursive-ness of generate ./...
-
-- e236d8f3 Remove generate command from resolver.go
-
-- 04a72430 Re-add final touches section to getting started
-
-- 3a7a5062 Add handler import to root cmd
-
-- 9dba96d5 Fix GraphQL capitalisation
-
-- 1dfaf637 Minor updates to getting started from feedback
-
-- 94b95d97 Some CSS fixes
-
-- a36fffd2 Updated getting started with new no-binary approach
-
-- 601354b3 Add blockquote breakout style
-
-6bea1d88 Merge remote-tracking branch 'origin/master' into disable-introspection
-
-Regenerate
-
-
-
-e4bad0e6 Merge pull request #449 from 99designs/increase-float-precision
-
-Increase float precision
-
-
-
-c5589792 Merge pull request #450 from 99designs/import-refactor
-
-Refactor import handling
-
-
-
-- 62f0d085 Edit copy for introspection docs
-
-63fc2753 Merge pull request #452 from cemremengu/patch-1
-
-Fix typo in directives.md
-
-
-
-da31e8ed Update directives.md
-
-Fix small typo
-
-
-
-- 83e33c13 Remove a debug print
-
-- 6c575914 fix doc indentation
-
-- f03b32d3 Use new import handling code
-
-- c45546e5 Increase float precision
-
-- 77f2e284 Start moving import management to templates
-
-- c114346d Decouple loader creation from schema
-
-9d636e78 Merge pull request #448 from 99designs/update-gqlparser
-
-Update to latest gqlparser
-
-
-
-- d6ce42df Update to latest gqlparser
-
-- b0acd078 Add config option to disable introspection
-
-f9c880b6 Merge pull request #446 from 99designs/fix-flakey-test
-
-Fix flakey goroutine test
-
-
-
-5461e967 Merge pull request #445 from 99designs/remove-graphqlgen
-
-Remove graphqlgen link
-
-
-
-- 8a5039d8 Fix flakey goroutine test
-
-4b082518 Merge pull request #439 from snormore/pointer-slice
-
-Fix type binding validation for slices of pointers like []*foo
-
-
-
-- 293b9eaf Remove graphqlgen link
-
-77b27884 Merge pull request #443 from mgutz/patch-1
-
-fix generate stubs sentence
-
-
-
-- ae1c7732 fix generate stubs sentence
-
-- 827dac5e Fix type binding validation for slices of pointers like []*foo
-
-f7932b40 Merge pull request #435 from matiasanaya/update-readme
-
-Update README.md comparison with graph-gophers
-
-
-
-- a816208b Update README.md comparison with graph-gophers
-
-d25e3b4b Merge pull request #422 from gracenoah/model-method-context
-
-accept an optional ctx parameter on model methods
-
-
-
-0ac6fa57 Merge pull request #434 from urakozz/patch-1
-
-Tracer: fixed nil pointer issue
-
-
-
-- d4f7c954 Update context.go
-
-4c4ccf47 Update context.go
-
-Right now code generated with latest master fails since there are usages of Trace but there is no any single write to this variable
-
-
-
-- 5faf3a2b re-generate
-
-- 6fed8947 rebase fixes
-
-- 4c10ba55 fix generated code
-
-- 8066edb7 add tests
-
-- 9862c30f mention contexts on model methods in docs
-
-- 602a83d6 make ctx method resolvers concurrent
-
-- 49755120 accept an optional ctx parameter on model methods
-
-02a19352 Merge pull request #429 from 99designs/refactor-gofmt
-
-apply go fmt ./...
-
-
-
-- 6a77af13 apply gofmt on ./.circleci/test.sh
-
-- c656dc31 apply go fmt ./...
-
-3f598bdc Merge pull request #427 from anurag/patch-1
-
-Fix docs typo
-
-
-
-- cac61bb2 Fix docs typo
-
-9f4afe3a Merge pull request #425 from 99designs/render
-
-Switch to hosting docs on render.com
-
-
-
-9875e74b Switch to hosting docs on render.com
-
-Render.com has offered to host our static site for free, and have
-a pretty simple setup for rebuilding on merge to master. I've
-switched the DNS records and updated the docs.
-
-
-
-981fd10a Merge pull request #419 from 99designs/fix-capture-ctx
-
-fix unexpected ctx variable capture on Tracing
-
-
-
-- 027803d2 address comment
-
-- 2b090de9 address comment
-
-- d3238d54 chore
-
-- a2c33f13 write ctx behavior test & refactoring tracer test
-
-- 5c28d011 fix unexpected ctx variable capture on Tracing
-
-4bda3bc1 Merge pull request #411 from 99designs/feat-geterrors
-
-add GetErrors to RequestContext
-
-
-
-- a4eaa400 add tests for RequestContext#GetErrors
-
-53f33f77 Merge pull request #410 from 99designs/move-tracing-to-contrib
-
-Move tracing to contrib
-
-
-
-- 19403832 add GetErrors to RequestContext
-
-- f0dbce5a Move tracing to contrib
-
-a3a92775 Merge pull request #409 from 99designs/graphql-playground-1.7.8
-
-Bump to the latest version of graphql-playground
-
-
-
-d2648580 Merge pull request #402 from 99designs/feat-opencensus
-
-add Tracer for OpenCensus
-
-
-
-- 7286e244 fix shadowing
-
-- af38cc5a Bump to the latest version of graphql-playground
-
-- 8bbb5eb7 fix some tests
-
-- 256e741f add complexityLimit and operationComplexity to StartOperationExecution
-
-- 4e7e6a1c Merge branch 'master' into feat-opencensus
-
-926ad17a Merge pull request #403 from 99designs/feat-complexity
-
-copy complexity to RequestContext
-
-
-
-- 2d3026cb Merge branch 'master' into feat-complexity
-
-- 59ef91ad merge master
-
-- c9368904 Merge branch 'master' into feat-opencensus
-
-b26ee6b4 Merge pull request #404 from 99designs/feat-apollo-tracing
-
-add apollo-tracing support
-
-
-
-- fd4f5587 fix timing issue
-
-- 91e3e88d address comment
-
-- a905efa8 fix lint warning
-
-- b2ba5f86 address comment
-
-- 561be1c0 add Apollo Tracing sample implementation
-
-- 83c7b2cb add Start/EndOperationParsing & Start/EndOperationValidation methods to Tracer
-
-- b5305d75 address comment
-
-- 784dc01f oops...
-
-- a027ac21 copy complexity to RequestContext
-
-- ececa23c add Tracer for OpenCensus
-
-0d5c65b6 Merge pull request #400 from 99designs/fix-ci
-
-fix Circle CI test
-
-
-
-- 00d11794 add mutex to logger
-
-- 884d35c6 fix race condition
-
-- f70cedc2 fix Circle CI test
-
-1b17b5a2 Merge pull request #392 from 99designs/feat-tracer
-
-Add Tracer layer
-
-
-
-184e48cb Merge pull request #396 from 99designs/remove-ci-exclusion
-
-Run generate ./... and test ./... in circle
-
-
-
-fd5d9eca Merge pull request #395 from 99designs/feat-extension-example
-
-add Type System Extension syntax example
-
-
-
-- 686c71a4 Run generate ./... and test ./... in circle
-
-- 304d3495 fix https://github.com/99designs/gqlgen
-
-- 85322586 address comment
-
-195f952b fix CI failed
-
-AppVeyor handle this test, But Circle CI is not
-
-
-
-- b5b767c4 address comment
-
-- d723844b add Type System Extension syntax example
-
-- df685ef7 change timing of EndFieldExecution calling
-
-- 94b7ab02 refactor Tracer interface signature that fit to apollo-tracing specs
-
-8eb2675a Revert "change field marshaler return process that make it easy to insert other processing"
-
-This reverts commit 583f98047f5d1b6604d87e7b8d6f8fd38082d459.
-
-
-
-- c8af48cd rename Tracer method name
-
-- a3060e80 refactor Tracer signature
-
-- d319afe6 add support request level tracer
-
-- 1c5aedde add support field level tracer
-
-- 583f9804 change field marshaler return process that make it easy to insert other processing
-
-- ab4752c2 Update README.md
-
-3447dd2d Merge pull request #389 from 99designs/multiple-schemas
-
-Support multiple schemas
-
-
-
-- a230eb04 Support multiple schemas
-
-20a5b6c7 Merge pull request #369 from vetcher/master
-
-reverse errors and data order in response
-
-
-
-- f1f043b9 reverse 'data' and 'error' fields order in failure tests
-
-3eab22a3 Merge pull request #370 from rodrigo-brito/fix-underscore
-
-Underscore on field name finder
-
-
-
-- 0ad3d3ce fix on struct name finder
-
-- 42e11045 reverse errors and data order in response
-
-
-
-
-
-
-## [v0.6.0](https://github.com/99designs/gqlgen/compare/v0.5.1...v0.6.0) - 2018-10-03
-- 6f486bde release v0.6.0
-
-7833d0cb Merge pull request #365 from 99designs/dont-guess-imports
-
-Don't let goimports guess import paths
-
-
-
-- 732be395 Don't let goimports guess import paths
-
-926eb9d8 Merge pull request #364 from 99designs/query-cache-test
-
-Add a stress test on query cache
-
-
-
-- bab70df5 Add a stress test on query cache
-
-84481761 Merge pull request #362 from 99designs/fix-error-docs
-
-fix error docs
-
-
-
-- 23b58f6d fix error docs
-
-8f0ef777 Merge pull request #361 from 99designs/revert-360-revert-335-typed-interfaces
-
-Revert "Revert "Generate typed interfaces for gql interfaces & unions""
-
-
-
-- 77257d1e Revert "Revert "Generate typed interfaces for gql interfaces & unions""
-
-1cae19bb Merge pull request #359 from 99designs/fix-null-arg-error
-
-Fix Issue With Argument Pointer Type
-
-
-
-ee862717 Merge pull request #360 from 99designs/revert-335-typed-interfaces
-
-Revert "Generate typed interfaces for gql interfaces & unions"
-
-
-
-- 02658647 Revert "Generate typed interfaces for gql interfaces & unions"
-
-bc35d730 Merge pull request #335 from 99designs/typed-interfaces
-
-Generate typed interfaces for gql interfaces & unions
-
-
-
-- 48724dea Removed redundant file
-
-- 2432ab3c Fix other tests with pointer change
-
-- 20add126 Fix test case
-
-f5c03401 Do not strip ptr for args with defaults
-
-This fails if a client still sends a null value. If an arg is nullable
-but has a default, then null is still a valid value to send through.
-
-
-
-- 0c399270 Add test case
-
-b836a976 Merge pull request #358 from 99designs/fix-embedded-pointer
-
-Fix Embedded Pointer
-
-
-
-- d3e27553 Bump gqlparser to latest master
-
-- b8af0c81 Use types.Implements to check if an interface implementor accepts value recievers
-
-2ab05daf Merge pull request #353 from 99designs/resolver-ctx-parenting
-
-Parent middleware generated contexts
-
-
-
-- faf0416b Parent resolver generated contexts
-
-- caa474c6 Check for embedded pointer when finding field on struct
-
-- f302b408 Added reproduce test case
-
-14cf46bc Merge pull request #348 from gissleh/feat-websocket-initpayload
-
-Added parsing of the websocket init message payload
-
-
-
-- 3147d914 Updated example in docs to use handler.GetInitPayload instead of graphql.GetInitPayload
-
-- 32f0b843 Moved InitPayload from graphql to handler package, updated test to import it from there.
-
-- 01923de6 Moved initPayload to wsConnection member, changed wsConnection.init to return false on invalid payload
-
-- 25268ef9 Added information about it under recipes/authentication doc
-
-- 575f28e0 Fixed graphql.GetInitPayload panic if payload is nil.
-
-380828fa Added parsing of the websocket init message payload, and making it available via the context passed to resolvers.
-
-* Added GetInitPayload(ctx) function to graphql
-* Added WithInitPayload(ctx) function to graphql
-* Added WebsocketWithPayload method to client.Client (Websocket calls it with a nil payload for backwards compability)
-* Added tests for these changes in codegen/testserver/generated_test
-
-
-
-2bd1cc2e Merge pull request #334 from 99designs/support-response-extensions
-
-Support Extensions in Response
-
-
-
-- 8fdf4fbb Add test case for extension response
-
-- 60196b87 Add extensions to response struct
-
-- cbde0ea9 Generate typed interfaces for gql interfaces & unions
-
-
-
-
-
-
-## [v0.5.1](https://github.com/99designs/gqlgen/compare/v0.5.0...v0.5.1) - 2018-09-13
-- 636435b6 release v0.5.1
-
-- bfb48f2f Update README.md
-
-869215a7 Merge pull request #339 from 99designs/fix-subscription-goroutine-leak
-
-Fix gouroutine leak when using subscriptions
-
-
-
-535dd24b Merge pull request #338 from codyleyhan/cl/docs
-
-Adds docs for how resolvers are bound
-
-
-
-- baa99fc5 cleaned up resolver doc
-
-647fbbc9 Merge pull request #340 from chris-ramon/patch-1
-
-README.md: Updates `graphql-go/graphql` features.
-
-
-
-729e09c8 README.md: Updates `graphql-go/graphql` features.
-
-- Subscription support: https://github.com/graphql-go/graphql/issues/49#issuecomment-404909227
-- Concurrency support: https://github.com/graphql-go/graphql/issues/389
-- Dataloading support: https://github.com/graphql-go/graphql/pull/388
-
-
-
-- 229a81be Fix gouroutine leak when using subscriptions
-
-- c15a70ff Adds docs for how resolvers are bound
-
-- 35c15c94 Add link to talk by Christopher Biscardi
-
-72edf98a Merge pull request #331 from edsrzf/arg-refactor
-
-Refactor arg codegen
-
-
-
-- 31505ff4 Use arg function for generated Complexity method
-
-- ebdbeba0 Just realized "if not" is allow in templates
-
-- 861a805c Regenerate code
-
-639727b6 Refactor arg codegen
-
-Now a function is generated for each field and directive that has
-arguments. This function can be used by both field methods as well as
-the `Complexity` method.
-
-The `args.gotpl` template now generates the code for this function, so
-its purpose is a little different than it used to be.
-
-
-
-8026e63b Merge pull request #330 from edsrzf/string-compare
-
-Use built-in less than operator instead of strings.Compare
-
-
-
-- c770b4e7 Use built-in less than operator instead of strings.Compare
-
-
-
-
-
-
-## [v0.5.0](https://github.com/99designs/gqlgen/compare/v0.4.4...v0.5.0) - 2018-08-31
-- 5bc4665f release v0.5.0
-
-b48c6b92 Merge pull request #326 from 99designs/version
-
-Add version const
-
-
-
-- 14587a5f Add version const
-
-7d44dd6b Merge pull request #315 from edsrzf/query-complexity
-
-Query complexity calculation and limits
-
-
-
-- 2ab857ee Merge branch 'master' into query-complexity
-
-- 6e408d5d Interfaces take max complexity of implementors
-
-d08b9c4a Merge pull request #325 from edsrzf/no-get-mutations
-
-Only allow query operations on GET requests
-
-
-
-82a28b57 Only allow query operations on GET requests (closes #317 )
-
-This mitigates the risk of CSRF attacks.
-
-
-
-- 239b1d22 Don't emit complexity fields for reserved objects
-
-- 8da5d61b Generate complexity for all fields. Fix bugs. Re-generate examples.
-
-40943c6d Merge pull request #322 from 99designs/drop-old-flags
-
-Drop old cli flags
-
-
-
-8c17eea9 Merge pull request #320 from andrioid/master
-
-Description added to generated Model code
-
-
-
-988b367a Merge pull request #316 from 99designs/feat-concurrent-each-element
-
-use goroutine about processing each array elements
-
-
-
-- e5265ac2 Fix complexity template bug
-
-- 7c040045 now with field values
-
-- 08ab33be starting to look better
-
-- e834f6b9 Query complexity docs
-
-- a0158a4e Drop old cli flags
-
-- bb78d2fa go generate ./..
-
-- 2488e1b3 Merge branch 'master' of https://github.com/99designs/gqlgen
-
-f6a733ae Merge pull request #308 from codyleyhan/tags
-
-Finds fields by configurable struct tag
-
-
-
-f7aeb88a Merge pull request #321 from 99designs/remove-typemap
-
-Remove support for the old json typemap
-
-
-
-- d63449b9 Remove support for the old json typemap
-
-- fce4c722 address comment
-
-- 8c3aed7d Merge branch 'master' into query-complexity
-
-cecd84c6 Add complexity package tests
-
-Also some small behavior fixes to complexity calculations.
-
-
-
-002ea476 Merge pull request #318 from edsrzf/query-cache
-
-Add query cache
-
-
-
-- fcd700b6 Panic on lru cache creation error
-
-78c57079 Add query cache
-
-This commit adds a query cache with a configurable maximum size.
-Past this size, queries are evicted from the cache on an LRU basis.
-
-The default cache size is 1000, chosen fairly arbitrarily. If the size
-is configured with a non-positive value, then the cache is disabled.
-
-Also ran `dep ensure` to add the new dependency to `Gopkg.lock`.
-
-
-
-- 076f9eac removed dirt
-
-- 6ae82383 trying to get description with generated models
-
-- 7d6f8ed4 fixes case where embeded structs would cause no field to be found
-
-- 02873495 use goroutine about processing each array elements
-
-- 40f904a6 Merge branch 'master' of github.com:99designs/gqlgen into tags
-
-- 56768d6b adds tests for findField
-
-- 556b93ac Run go generate ./...
-
-2dcb2dd8 Merge pull request #314 from 99designs/directive-obj
-
-Add obj to Directives
-
-
-
-- 0e2aaa9e Merge branch 'master' of github.com:99designs/gqlgen into tags
-
-- 7cfd9772 fixes field selection priority
-
-- 238a7e2f Add complexity support to codegen, handler
-
-- 95ed529b New complexity package
-
-- 1fda3ede Add obj to Directives
-
-9b247102 Merge pull request #301 from 99designs/feat-directive-parent
-
-add Result field to ResolverContext
-
-
-
-- 9ec385d1 Merge branch 'tags' of github.com:codyleyhan/gqlgen into tags
-
-- c5849929 adds binding by passed tag
-
-- 6ef2035b refactor set Result timing
-
-- 568a72e9 add some refactor
-
-50588a8a Merge pull request #299 from 99designs/test-init-on-windows
-
-Test gqlgen init on windows
-
-
-
-- 9148adfc Test gqlgen init on windows
-
-- c7fd8416 Merge branch 'master' into feat-directive-parent
-
-3f8a601b Merge pull request #312 from 99designs/validate-gopath
-
-Validate gopath when running gqlgen
-
-
-
-77e69552 Merge pull request #310 from 99designs/sitemap-404s
-
-Remove 404s from sitemap
-
-
-
-0b6cedfb Merge pull request #311 from jekaspekas/fix-mapstructure-err
-
-fix mapstructure unit test error
-
-
-
-- b07736ef Validate gopath when running gqlgen
-
-b082227d fix mapstructure unit test error
-
-fix unit test error "mapstructure: result must be a pointer". It appears instead of resolver returned error.
-
-
-
-- 25b12cb6 Remove 404s from sitemap
-
-4a6f505d Merge pull request #309 from 99designs/pr-template
-
-Add a PR template
-
-
-
-- 64f3518e run generate
-
-- a81147df Add a PR template
-
-- 15d8d4ad Merge branch 'introspection-directive-args' into HEAD
-
-- 12efa2d5 add tests
-
-- 95b6f323 finds fields by json struct tag
-
-- 07ee49f3 Added args to introspection scheme directives.
-
-- e57464fe refactor ResolverContext#indicies and suppress lint error
-
-- 09e4bf8c add Result field instead of ParentObject field
-
-b8695fb5 Merge pull request #304 from 99designs/newline-for-init-response
-
-Put newline at end of `gqlgen init` output
-
-
-
-- fabc6f8f Merge branch 'master' into feat-directive-parent
-
-- e53d224e Merge branch 'master' into feat-directive-parent
-
-de750645 Merge pull request #298 from 99designs/handle-response-nulls
-
-Nulls in required fields should cause errors and bubble
-
-
-
-- c8552729 Put newline at end of gqlgen init output
-
-- 072363c7 add ParentObject field to ResolverContext
-
-e15d7890 Merge pull request #300 from 99designs/fix-starwars-connection-example
-
-fix connection example
-
-
-
-- d6acec16 fix connection example
-
-- 7d1cdaca Nulls in required fields should cause errors and bubble
-
-2c4e6cbf Merge pull request #294 from 99designs/simplfy-concurrent-resolvers
-
-Simplfy concurrent resolver logic
-
-
-
-- 7926c688 Simplfy concurrent resolver logic
-
-
-
-
-
-
-## [v0.4.4](https://github.com/99designs/gqlgen/compare/0.4.3...v0.4.4) - 2018-08-21
-- 6f6622c6 Bump gqlparser to latest version
-
-72659af4 Merge pull request #297 from 99designs/fix-dep-pruning
-
-Explicitly import ambient imports so dep doesn't prune them
-
-
-
-- cac3c729 Explicitly import ambient imports so dep doesn't prune them
-
-e6af26e0 Merge pull request #296 from heww/master
-
-sort directives by name when gen
-
-
-
-- fd09cd99 sort directives by name when gen
-
-71917267 Merge pull request #292 from m4ppi/fix-doc
-
-Fix broken links in docs
-
-
-
-- 05c73d9f Fix broken links in docs
-
-5a0b56aa Merge pull request #285 from 99designs/fix-force-type
-
-Stop force resolver from picking up types from matching fields
-
-
-
-- 31478cf4 Stop force resolver from picking up types from matching fields
-
-ebdcf740 Merge pull request #283 from 99designs/speed-up-tests
-
-Speed up tests
-
-
-
-- 36e84073 Speed up tests
-
-
-
-
-
-
-## [0.4.3](https://github.com/99designs/gqlgen/compare/0.4.2...0.4.3) - 2018-08-10
-3575c289 Merge pull request #281 from 99designs/introspection-default-args
-
-Fix missing default args on types
-
-
-
-- b808253f Fix missing default args on types
-
-bf235296 Merge pull request #282 from 99designs/flakey-tests
-
-Remove sleeps in tests
-
-
-
-- e9c68f08 make appveyor less flakey
-
-
-
-
-
-
-## [0.4.2](https://github.com/99designs/gqlgen/compare/0.4.1...0.4.2) - 2018-08-10
-- 06b00d45 Update README.md
-
-5c379a33 Merge pull request #279 from 99designs/integration-tests
-
-Integration tests
-
-
-
-- 7f20bdef disable tty for jest
-
-- bb0a89a0 exclude generated code from tests
-
-- c2bcff79 regenerate
-
-- 45e22cb1 Add introspection schema check
-
-53109cd0 Merge pull request #270 from 99designs/feat-handlers
-
-stop pickup "github.com/vektah/gqlgen/handler" from GOPATH
-
-
-
-- ae82b94a convert existing tests to jest
-
-- f04820b1 address comment
-
-- 88730e2c Convert test directory into integration test server
-
-- f372b1c9 Use docker in docker for the existing testsuite
-
-0eb08ab9 Merge pull request #274 from 99designs/fix-variable-validation-data
-
-Prevent executing queries on variable validation failures
-
-
-
-- 47a7ac35 Prevent executing queries on variable validation failures
-
-- e6e323d0 stop pickup "github.com/vektah/gqlgen/handler" from GOPATH
-
-- e6005f6b fix mobile nav
-
-5cdbc975 Merge pull request #267 from 99designs/authentication-docs
-
-Authentication docs
-
-
-
-- 1871c4ce Add bold variant of Roboto to docs
-
-- fc9fba09 Some minor edits to authentication docs
-
-- d151ec8d Add docs on user authentication
-
-- 8db3c143 Add structure to menu
-
-c57619e0 Merge pull request #260 from 99designs/init-improvements
-
-Init Config Improvement
-
-
-
-336b62ec Merge pull request #266 from 99designs/lint-friendly-decollision
-
-Make keyword decollision more lint friendly
-
-
-
-- 2acbc245 Make keyword decollision more lint friendly
-
-f12f08a7 Merge pull request #264 from 99designs/docs
-
-CORS docs
-
-
-
-- a2a7c0e7 Eliminate font resize popin
-
-- 8a7ed618 Fix errors docs
-
-- 96e6aab2 Add CORS docs
-
-0ab1c685 Merge pull request #263 from 99designs/add-logo
-
-Add logo to doc site
-
-
-
-- 6d39f868 Add logo to doc site
-
-- d7241728 Better error on init if file exists
-
-- fb03bad9 Run init even if config is found
-
-- 52b78793 Fix hard-coded server filename in init
-
-
-
-
-
-
-## [0.4.1](https://github.com/99designs/gqlgen/compare/0.4.0...0.4.1) - 2018-08-04
-42f10ec9 Merge pull request #255 from 99designs/introspection-fixes
-
-Fix introspection api
-
-
-
-- 7400221c Fix introspection api
-
-b35804ba Merge pull request #254 from oskanberg/patch-1
-
-Fix typo in introduction docs
-
-
-
-- 84552437 Fix typo in introduction docs
-
-- b5a48e3e Update README.md
-
-- c20bb134 update badges
-
-
-
-
-
-
-## [0.4.0](https://github.com/99designs/gqlgen/compare/0.3.0...0.4.0) - 2018-08-03
-7b5a3d74 Merge pull request #247 from 99designs/next
-
-0.4.0 Release
-
-
-
-c0be9c99 Merge pull request #251 from 99designs/rewrite-imports
-
-Rewrite import paths
-
-
-
-- 4361401a Rewrite import paths
-
-f042328a Merge pull request #252 from 99designs/move-doc-site
-
-Move doc site
-
-
-
-- 658a24d9 Move doc site
-
-07b7e6ca Merge pull request #248 from 99designs/json-usenumber
-
-use json.Decoder.UseNumber() when unmarshalling vars
-
-
-
-- 95fe07fe use json.Decoder.UseNumber() when unmarshalling vars
-
-c555f54c Merge pull request #245 from vektah/new-feature-docs
-
-New feature docs
-
-
-
-825840aa Merge pull request #244 from vektah/array-coercion
-
-Add implicit value to array coercion
-
-
-
-90b40769 Merge pull request #246 from vektah/fix-introspection
-
-Fix introspection
-
-
-
-- ef208c76 add docs for resolver generation
-
-- e44d798d Add directives docs
-
-- 62d4c8aa Ignore __ fields in instrospection
-
-- bc204c64 Update getting started guide
-
-- b38c580a Return the correct mutation & subscription type
-
-- 9397920c Add field name config docs
-
-- d2265f3d Add implicit value to array coercion
-
-191c8ba0 Merge pull request #239 from vektah/directive-args
-
-Directive args
-
-
-
-- 3bef596d regenerate
-
-- 4f37d170 Add directive args
-
-f78a6046 Merge pull request #241 from vektah/feat-lintfree
-
-Make more golint free generated code
-
-
-
-- 19b58175 Merge remote-tracking branch 'origin/master' into HEAD
-
-- c3fa1a55 Merge branch 'next' into feat-lintfree
-
-17bfa2cb Merge pull request #240 from vektah/doc-fonts
-
-Use fonts from golang styleguide
-
-
-
-- 64ef0571 Use fonts from golang styleguide
-
-6b532383 Merge pull request #237 from vektah/feat-fieldmapping
-
-Add model field mapping
-
-
-
-- 4fb721ae address comment
-
-- bf43ab3d Merge branch 'next' into feat-fieldmapping
-
-- 353319ca Refactor GoVarName and GoMethodName to GoFieldName etc...
-
-- d7e24664 Add method support
-
-17bcb322 Merge pull request #236 from vektah/generate-handler-on-init
-
-Generate server on running init
-
-
-
-600f4675 Merge pull request #238 from vektah/variable-validation
-
-Add missing variable validation
-
-
-
-- d6a76254 Add missing variable validation
-
-- 121e8db4 Generate server on running init
-
-- 108bb6b4 Rename govarname to modelField
-
-- f7f6f916 Make more lint friendly
-
-- 69eab938 Add model field mapping
-
-ffee020c Merge pull request #235 from vektah/generate-resolver-on-init
-
-Generate resolver on init
-
-
-
-- df95f003 Generate code after init
-
-- 58831ac1 Generate resolver if configured
-
-7031264d Merge pull request #229 from vektah/fix-init-command
-
-Fixing init command
-
-
-
-078bc985 Fixing init command
-
-The init command always return file already exists if there are no
-configFilename specified
-
-This is caused by codegen.LoadDefaultConfig() hiding the loading details
-and always return the default config with no error while the init
-command code expects it to tell us if config exists in default
-locations.
-
-To avoid confusion I have splitted the loading config from default
-locations out into its own method so we can handle different cases
-better.
-
-Additionally I also moved default config into a method so we always
-generating new a config instead of passing it around and potentially
-mutating the default config.
-
-
-
-803711e9 Merge pull request #221 from vektah/middleware-stack
-
-Implement FieldMiddleware Stack
-
-
-
-- 0ec918bf Switch GoName to Name|ucFirst
-
-- 5dc104eb Add middleware example for Todo
-
-- 73a8e3a3 Fix some issues with directive middlewares
-
-- 84163247 Regenerate
-
-0e16f1fc Generate FieldMiddleware
-
-Moves it off of RequestContext and into generated land. This change
-has a basic implementation of how directive middlewares might work.
-
-
-
-- 2748a19b Require Config object into NewExecutableSchema
-
-- 09242061 Add Directives to Build
-
-69e790c2 Add *Field to CollectedField
-
-We need the Field Definition so that we can run directive middlewares
-for this field.
-
-
-
-- d6813f6d Generarte
-
-764c6fda Refactor ResolverMiddleware to FieldMiddleware
-
-This will allow us to include DirectiveMiddleware in the same middleware
-setup, that will run after Resolver middlewares.
-
-
-
-7226e573 Merge pull request #225 from rongfengliang/patch-1
-
-Update getting-started.md
-
-
-
-- 66593ffe Merge remote-tracking branch 'origin/master' into HEAD
-
-- 8714f7fb hush metalinter
-
-0dfb92a7 Update getting-started.md
-
-CreateTodo UserID input should be UserId not User
-
-
-
-0fa7977f Merge pull request #217 from vektah/resolver-middleware-all
-
-Run Resolver Middleware For All Fields
-
-
-
-7292be78 Rename CastType to AliasedType
-
-This field stores a Ref if a type is a builtin that has been aliased. In
-most cases if this is set, we want to use this as the type signature
-instead of the named type resolved from the schema.
-
-
-
-- ec928cad Regenerate examples
-
-97f13184 Remove comment about ResolverMiddleware
-
-Not true anymore!
-
-
-
-- b512176c Run resolver middleware for all fields
-
-f67f8390 Merge pull request #218 from vektah/remove-old-resolvers
-
-Remove old resolvers
-
-
-
-1a3e4e99 Merge pull request #220 from vektah/feat-race
-
-turn back -race option
-
-
-
-- 40989b19 turn back -race option
-
-1ba61fcb Update test & examples to use new resolver pattern
-
-* chat
-* dataloader
-* scalar
-* selection
-* starwars
-* todo
-
-
-
-38708961 Stop generating two types of resolvers
-
-In recent refactor we introduced a new pattern of resolvers which is
-better structured and more readable. To keep Gqlgen backward compatible
-we started generate two styles of resolvers side by side.
-
-It is now time to sunset the old resolver. This commit removes the old
-resolver and update the generation code to use the new resolver
-directly.
-
-
-
-- ffe42658 Merge pull request #208 from vektah/directives-skip-include
-
-a69071e3 Pass context to CollectFields instead of RequestContext
-
-Internally it can still get to RequestContext as required.
-
-
-
-- d02d17ae Add method for generating method name from field
-
-- c7ff3208 Update gqlparser version to include default resolution
-
-- ce17cd90 Add default value test case
-
-cbfae3d3 Add skip/include test cases
-
-Adds a set of test cases for skip and include directives to the todo
-example. Also now conforms to spec if both are included.
-
-
-
-ea0f821c Add skip/include directive implementation
-
-This is a snowflake implementation for skip/include directives based on
-the graphql-js implementation. Skip takes precedence here.
-
-
-
-- ebfde103 Pass request context through to CollectFields
-
-bab7abb2 Merge pull request #210 from vektah/feat-init
-
-introduce gen & init subcommand
-
-
-
-6ba508f9 Merge pull request #214 from vektah/gqlparser-schema-validation
-
-Bump gqlparser to get schema validation
-
-
-
-- 138b4cea Bump gqlparser to get schema validation
-
-- 08d7f7d0 Merge branch 'next' into feat-init
-
-- 39f9dbf6 fix error from breaking change
-
-- 41147f6f update Gopkg.lock
-
-- 87d8fbea remove unused flag
-
-- eff49d04 support init subcommand
-
-- c5810170 introduce cobra library
-
-- c3c20f8f Merge remote-tracking branch 'origin/master' into HEAD
-
-90df37f6 Merge pull request #205 from vektah/forward-credential-to-graphql-endpoint
-
-Use original credential for query request in playground
-
-
-
-52343745 Merge pull request #206 from vektah/validation-locations
-
-Update gqlparser for validation locations
-
-
-
-- f4d31aa4 Update gqlparser for validation locations
-
-9d473f8b Merge pull request #203 from vektah/99designs-announcement
-
-Announcement: 99designs is now sponsoring gqlgen
-
-
-
-c2f1570d Merge pull request #204 from vektah/gqlparser-prelude
-
-Use shared prelude
-
-
-
-- 004ec6a9 Add 99designs sponsorship news
-
-- 548aed14 Use shared prelude
-
-edb3ea4e Use original credential for query request in playg
-
-Currently the playground doesn't forward any credentials when making
-query calls. This can cause problems if your playground requires
-credential logins.
-
-
-
-f855a89c Merge pull request #201 from cocorambo/remove-trailing-println
-
-Remove trailing Println
-
-
-
-- c41a6c36 Remove trailing Println
-
-2692d3e0 Merge pull request #197 from vektah/new-parser
-
-Integrate gqlparser
-
-
-
-- 5796d47d Integrate gqlparser
-
-- 55179a61 Update badges
-
-01a4c677 Merge pull request #195 from jonstaryuk/master
-
-Update playground version
-
-
-
-- c52f24af Update playground version to 1.6.2
-
-
-
-
-
-
-## [0.3.0](https://github.com/99designs/gqlgen/compare/0.2.5...0.3.0) - 2018-07-14
-381b3469 Merge pull request #194 from vektah/multiline-comments
-
-Fix multiline comments
-
-
-
-- 112d68a6 only build master branch
-
-- 4b3778e3 Fix multiline comments
-
-eb44925c Merge pull request #193 from vektah/validate-method-returns
-
-validate method return types
-
-
-
-- 164acaed validate method return types
-
-f478f816 Merge pull request #192 from vektah/strict-config
-
-Strict config
-
-
-
-- a1c02e7b Strict config
-
-533dcba7 Merge pull request #191 from vektah/nullable-list-elements
-
-Support nullable list elements
-
-
-
-- e0bf6afd Support nullable list elements
-
-0780bf2e Merge pull request #190 from vektah/generated-forced-resolvers
-
-Allow forcing resolvers on generated types
-
-
-
-- bf1823cd Allow forcing resolvers on generated types
-
-febd0358 Merge pull request #186 from vektah/error-redux
-
-Error redux
-
-
-
-- b884239a clarify error response ordering
-
-- 58e32bbf Drop custom graphql error methods
-
-- d390f9c6 Errors redux
-
-
-
-
-
-
-## [0.2.5](https://github.com/99designs/gqlgen/compare/0.2.4...0.2.5) - 2018-07-13
-0a9709db Merge pull request #188 from vektah/fix-windows-gopath
-
-Fix windows gopath issue
-
-
-
-- ea4f26c6 more fixes
-
-- 1066953d Appveyor config
-
-- f08d8b61 Fix windows gopath issue
-
-- 9ade6b7a Update gettingstarted to use new resolvers
-
-
-
-
-
-
-## [0.2.4](https://github.com/99designs/gqlgen/compare/0.2.3...0.2.4) - 2018-07-10
-ac9e5a66 Merge pull request #180 from vektah/import-alias-before-finalize
-
-Fix a bug custom scalar marshallers in external packages
-
-
-
-- 160ebab5 Fix a bug custom scalar marshallers in external packages
-
-43212c04 Merge pull request #179 from vektah/models-config-error
-
-Improve Output Filename and Package Handling
-
-
-
-- 936bc76e Better handling of generated package name
-
-- 5d3c8ed2 Inline ImportPath strings
-
-- fc43a92a Check that exec and model filenames end in *.go
-
-- 6d38f77d Handle package name mismatch with dirname
-
-- ebf1b2a5 Add error message when specifying path in package name
-
-- c8355f48 Check models config for package-only specs
-
-
-
-
-
-
-## [0.2.3](https://github.com/99designs/gqlgen/compare/0.2.2...0.2.3) - 2018-07-08
-- 6391596d Add some basic docs on the new config file
-
-a9c3af86 Merge pull request #176 from vektah/config-search-paths
-
-Search for config
-
-
-
-- 25cfbf08 Search for config
-
-bff3356b Merge pull request #175 from vektah/lint-all-packages
-
-gometalinter should cover all packages
-
-
-
-- 61f37173 gometalinter should cover all packages
-
-ce657044 Merge pull request #173 from vvakame/feat-resolver-hint
-
-add resolver option support to field
-
-
-
-57b8279e Merge pull request #172 from vvakame/feat-newconfig
-
-switch to .gqlgen.yml
-
-
-
-- fcfceefb add resolver option support to field
-
-- c7ce1cbb update docs
-
-- 42948153 move to .gqlgen.yml
-
-325c45a4 Merge pull request #171 from vvakame/add-gitignore
-
-add .idea/ to .gitignore
-
-
-
-- aa4cec9b add .idea/ to .gitignore
-
-
-
-
-
-
-## [0.2.2](https://github.com/99designs/gqlgen/compare/0.2.1...0.2.2) - 2018-07-05
-- f79b6a52 cleanup new config
-
-f0a08617 Merge pull request #163 from vvakame/feat-types-json
-
-support .gqlgen.yml
-
-
-
-faf095fc Merge pull request #166 from vektah/validate-at-end
-
-Validate at end
-
-
-
-- fca1e08e shh errcheck
-
-- cc78971e Dont show compilation errors until after codegen
-
-- 9f6ff0cf Convert todo example to new resolver syntax
-
-- 8577ceab address comment
-
-- 86dcce73 Add format check to -typemap argument
-
-- 5debbc6a Implement types.yaml parsing
-
-- ecf56003 Refactor types.json parsing
-
-b16e8429 Merge pull request #159 from vektah/enum-only-generation
-
-Dont skip model generation if there are enums defined
-
-
-
-- 3f751a40 Dont skip model generation if there are enums defined
-
-- 588aeacb more tutorial fixes
-
-dc472965 Merge pull request #157 from johncurley/fix-docs-argument
-
-Updated mutation to take correct argument
-
-
-
-- 88a84f83 Updated mutation to take correct argument
-
-404f0b0d Merge pull request #151 from qdentity/fix-longer-gopath
-
-Fix bug with multiple GOPATH full package name resolving
-
-
-
-f66e2b3b Fix bug with multiple GOPATH full package name resolving
-
-This commit fixes the bug where GOPATH values that are longer than the input package name cause 'slice bounds out of range' errors.
-
-
-
-
-
-
-
-
-## [0.2.1](https://github.com/99designs/gqlgen/compare/0.2.0...0.2.1) - 2018-06-26
-cb87a2cb Merge pull request #147 from vektah/import-overhaul
-
-Improve import handling
-
-
-
-9fa3f0fb Merge pull request #134 from mastercactapus/small-interfaces
-
-add lint-friendly small interfaces option for resolvers
-
-
-
-e8c30acd fix template error on generated defaults (#146 )
-
-* fix template error on generated defaults
-
-* go fmt
-
-* add test for default fix
-
-* .
-
-* add key sort for default values
-
-
-
-- 769a97e2 fix race in chat example test - t.Parallel() doesn't guarantee parallel execution - moved goroutine so the test can execute independently
-
-- 5b77e4c2 remove deprecation warning for now
-
-- 59a5d752 remove trailing S
-
-- b04846f6 fix time race in scalar test
-
-- a80b720f name updates, deprecation, some code comments
-
-- 2bbbe054 Merge branch 'master' into small-interfaces
-
-- 4ffa2b24 case insensitive compare to determine self package
-
-- c0158f54 make sure colliding imports are stable
-
-- abf85a10 get package name from package source
-
-- a39c63a5 remove a random json tag from tutorial
-
-- f48cbf03 tutorial fixes
-
-0a85d4f2 Update generated headers to match convention. (#139 )
-
-* Update generated.gotpl
-
-* Update models.gotpl
-
-* Update data.go
-
-* update go generate
-
-* revert code changes
-
-
-
-- 4a6827bd Update getting started guide
-
-- a21f3273 Use recognized `Code generated` header
-
-- 038c6fd2 change from `ShortResolver` to `ShortResolvers` - prevents possible collision with an object type named `Short`
-
-- 0bc592cd run go generate
-
-- db2cec07 fix template formatting
-
-- 59ee1b5c from probably makes more sense
-
-- 620f7fb4 add "short" resolver interface
-
-
-
-
-
-
-## [0.2.0](https://github.com/99designs/gqlgen/releases/tag/0.2.0) - 2018-06-21
-d26ef2a2 Merge pull request #136 from tianhai82/master
-
-fix GOPATH case mismatch issue
-
-
-
-a34b4de4 Merge pull request #137 from appleboy/patch-1
-
-fix example links
-
-
-
-c1cde36c Merge pull request #133 from mastercactapus/skip-type-mismatch
-
-skip struct fields with incompatible types
-
-
-
-- c1b4574c fix example links
-
-- 63976d5f fix GOPATH case mismatch issue
-
-- 8771065f skip fields with incompatible types
-
-40d9a11b Merge pull request #127 from jon-walton/windows-path-slash
-
-convert windows input path separators to slash
-
-
-
-- 7db9d122 convert windows input path separators to slash
-
-a5f72601 Merge pull request #122 from vektah/json-encoding-fixes
-
-Fix json string encoding
-
-
-
-- f207c62c review feedback
-
-- 578d8415 Fix json string encoding
-
-e9b40666 Merge pull request #123 from vektah/drop-fk-generation
-
-BC Break: Stop generating foreign keys in models
-
-
-
-a8419e20 Merge pull request #124 from vektah/fix-backtick-escaping
-
-Fix backtick escaping
-
-
-
-- 47eaff4d Fix backtick escaping
-
-- a5c02e6c BC Break: Stop generating foreign keys in models
-
-94d5c89e Merge pull request #120 from andrewmunro/bugfix/fix-panic-on-invalid-array-type
-
-Fixing panic when non array value is passed to array type
-
-
-
-- 5680ee49 Adding dataloader test to confirm no panic on malformed array query
-
-- 55cc161f Fixing panic when non array value is passed to array type
-
-- 6b3b338d Add gitter link to readme
-
-- 6c823beb add doc publish script
-
-a25232d8 Merge pull request #113 from mikeifomin/patch-1
-
-Fix typo in url dataloaden
-
-
-
-- 3a129c77 Fix typo in url dataloaden
-
-- e1fd79fe Merge pull request #111 from imiskolee/master (closes #110 )
-
-- e38cb497 1. fix bug: #110
-
-3990eacf Merge pull request #108 from imiskolee/master
-
-generate json tag to model field by gql name.
-
-
-
-- abb7502a 1. run go generate
-
-- e1f90946 1. add json tag in models_gen.go 2. use gqlname to model filed json tag.
-
-35e09717 Merge pull request #107 from vektah/fix-vendor-normalization
-
-Fix vendor normalization
-
-
-
-63ee4199 Fix vendor normalization
-
-When refering to vendored types in fields a type assertion would fail. This
-PR makes sure that both paths are normalized to not include the vendor
-directory.
-
-
-
-2a437c23 Merge pull request #105 from vektah/keyword-input-args
-
-Automatically add a _ suffix to reserved words
-
-
-
-26ac13ff Merge pull request #104 from vektah/new-request-context
-
-Add a NewRequestContext method
-
-
-
-- 309e5c6d Automatically add a _ suffix to reserved words
-
-- a2fb1421 Add a NewRequestContext method
-
-ab6e65bd Merge pull request #97 from vektah/add-input-defaults
-
-Default values for input unmarshalers
-
-
-
-- 1cd80c4a Default values for input unmarshalers
-
-79c69d15 Merge pull request #96 from vektah/refactor-tests
-
-Refactor tests
-
-
-
-- 7b1c8198 Refactor tests
-
-0c7bdfc6 Merge pull request #95 from vektah/custom-error-types
-
-Custom error types
-
-
-
-- 4bdc1e1f regenerate
-
-- 20250f18 Add fully customizable resolver errors
-
-- a0f66c88 Update README.md
-
-- 8f62d505 Update README.md
-
-- a1043da6 Add feature comparison table to readme
-
-22128e0e Merge pull request #93 from vektah/input-type-error-handling
-
-Input type error handling
-
-
-
-- e7539f11 Add an error message when using types inside inputs
-
-- a780ce69 Add a better error message when passing a type into an input
-
-- 0424f043 Refactor main so tests can execute the generator
-
-ab3803a6 Merge pull request #89 from vektah/opentracing-parent-span
-
-Add parent opentracing span around root query/mutation/resolvers
-
-
-
-d157ac35 Add context to recover func
-
-This makes the request and resolver contexts available during panic
-so that you can log the incoming query, user info etc with your bug
-tracker
-
-
-
-- 3ceaa189 add request middleware
-
-- 877f75a0 remove debugging trace (closes #81 )
-
-091d25ab Merge pull request #87 from jon-walton/windows-paths
-
-fix package paths on windows
-
-
-
-- 53a6e814 fix package paths on windows
-
-546b7b76 Merge pull request #84 from yamitzky/master
-
-Fix collectFields to handle aliased fields properly
-
-
-
-- ba2ecb16 Add test case for aliased field
-
-- 78f3a56c Fix collectFields to handle aliased fields
-
-4d2eece0 Merge pull request #77 from vektah/opentracing
-
-Add resolver middleware Add opentracing support
-
-
-
-- f0def668 better opentracing tags
-
-- 600bff7a bump metalinter deadline
-
-- 2e32c121 regenerate code
-
-- 5b908507 opentracing middleware
-
-- 57adb244 Add resolver middleware
-
-- 28d0c81f capture args in map
-
-e266fab9 Merge pull request #75 from mathewbyrne/fix-import-dash
-
-Replace Invalid Characters in Package Name with an Underscore
-
-
-
-b0d79115 Replace invalid package characters with an underscore
-
-This will sanatise local import names to a valid go identifier by
-replacing any non-word characters with an underscore.
-
-
-
-66a91503 Merge pull request #72 from vektah/custom-enum
-
-Add support for custom enums
-
-
-
-- 61a34a74 Add support for custom enums
-
-- 74ac827a move docs to new domain
-
-ebcc94d1 Merge pull request #70 from vektah/models-in-separate-package
-
-Allow generated models to go into their own package
-
-
-
-- 9a532131 Allow generated models to go into their own package
-
-6129fd26 Merge pull request #69 from vektah/support-options
-
-Support OPTIONS requests
-
-
-
-- af38cf05 Support OPTIONS requests
-
-893ead12 Merge pull request #67 from vektah/raw-schema-string
-
-Use a raw string for schema
-
-
-
-- af6178a7 Use a raw string for schema
-
-c0753bed Merge pull request #66 from vektah/generate-enums
-
-Generate enums
-
-
-
-- 85a51268 Generate enums
-
-71c4e265 Merge pull request #65 from vektah/context
-
-Make field selections available in context
-
-
-
-- c60336bf regenerate
-
-- c5ccfe4e Add an example for getting the selection sets from ctx
-
-- e7007746 add fields to resolver context
-
-- 40918d52 move request scoped data into context
-
-4e13262e Merge pull request #64 from vektah/vendor-gen-path
-
-Fix vendored import paths in generated models
-
-
-
-- 2ff9f32f Fix vendored import paths
-
-- 630a3cfc failing test
-
-- 99dec54c fix missing deps
-
-- 652c567e Remove missing field warning and add test for scalar resolvers (closes #63 )
-
-- 3dc87e1b gtm
-
-- c76c3434 Add dataloader tutorial
-
-- 449fe8f8 Optimize frontmatter
-
-- b90ae60e flatten menus
-
-a508ecb0 Merge pull request #45 from dvic/fix-resolver-public-errors
-
-Retain orignal resolver error and support overriding error message
-
-
-
-- ab4e7010 Retain orignal resolver error and support overriding error message (closes #38 )
-
-a05a18d5 Merge pull request #61 from vektah/import-resolver-collisions
-
-Deal with import collisions better
-
-
-
-- d81ea2c2 Deal with import collisions better
-
-fb131a94 Merge pull request #59 from vektah/map-support
-
-Add map[string]interface{} escape hatch
-
-
-
-- 49d92164 Add map[string]interface{} escape hatch
-
-5abdba16 Merge pull request #57 from vektah/null-input-fields
-
-Null input fields
-
-
-
-- f8add9d2 remove more unneeded whitespace
-
-- 84b06617 Allow nulls in input fields
-
-54fbe16a Merge pull request #56 from vektah/getting-started-fixes
-
-Getting started fixes
-
-
-
-- 17fd17a4 Update the tutorial
-
-- e65d2a5a detect correct FK type
-
-- b66cfa03 small fixes to entry point
-
-- 0b62315a Create ISSUE_TEMPLATE.md
-
-f3a70dac Merge pull request #55 from vektah/fix-input-ptr-unpacking
-
-Fix ptr unpacking in input fields
-
-
-
-- 10541f19 Fix ptr unpacking in input fields
-
-15b3af2d Fix value receivers for unions too
-
-fixes 42
-
-
-
-46103bdc Merge pull request #53 from vektah/docs
-
-Docs
-
-
-
-- d0211a0a Custom scalar docs
-
-- e6ed4de5 Update readme link
-
-- 51f08a9e start of docs
-
-ac832dea Merge pull request #51 from vektah/support-embedding
-
-Support embedding in models
-
-
-
-- 9d710712 add embedding support
-
-- 0980df0e Embedding example
-
-cb34e6db Merge pull request #50 from vektah/valuer-receiver
-
-Don't generate value receivers for types that cant fit the interface
-
-
-
-- ec5f5e66 check for valuer receivers before generating type switch
-
-- dc898409 add test case
-
-8ef253cb Merge pull request #49 from vektah/default-entrypoints
-
-default to Query / Mutation / Subscription if no entry points are specified
-
-
-
-- 302058a7 Use default entry points for Query/Mutation/Subscription
-
-13949fdf Merge pull request #37 from vektah/generate-interfaces
-
-generate interfaces
-
-
-
-- acc45bf0 generate interfaces
-
-e47d5038 Merge pull request #34 from vektah/root-types-only
-
-Only bind to types in the root package scope
-
-
-
-- ffe972a8 Only bind to types in the root package scope
-
-0e78c0ae Merge pull request #33 from vektah/unset-arguments
-
-Allow unset arguments
-
-
-
-- bc9e0e54 Allow unset arguments
-
-94718351 Merge pull request #31 from vektah/recover-handler
-
-Customizable recover func
-
-
-
-- e4e249ea Customizable recover func
-
-69277045 Merge pull request #30 from vektah/complex-input-types
-
-Fix complex input types
-
-
-
-- 9b64dd22 Fix complex input types
-
-1d074b89 Merge pull request #29 from vektah/multi-stage-model-build
-
-Split model generation into its own stage
-
-
-
-- cf580c24 Split model generation into its own stage
-
-926384db Merge pull request #28 from vektah/default-args
-
-add default args
-
-
-
-- 68c54a14 add default args
-
-- d63128f6 appease the linting gods
-
-7b6b124e Merge pull request #20 from vektah/codegen-cleanup
-
-Codegen cleanup
-
-
-
-- 78c34cb3 regenerate
-
-- 5ebd157c Only use one gofunc per subscription
-
-- 79a70376 Move generated field resolvers into separate methods
-
-e676abe4 Merge pull request #19 from vektah/generate-input-types
-
-Generate input models too
-
-
-
-- f094e79c Generate input models too
-
-- 1634f088 Add a missed error check
-
-4feb1689 Merge pull request #18 from vektah/array-input-args
-
-Fix input array processing
-
-
-
-- 98176297 Fix input array processing
-
-4880497f Merge pull request #16 from vektah/better-templates
-
-Better templates
-
-
-
-- 278df9de Better templates
-
-f3731c73 Merge pull request #14 from vektah/autogenerate-models
-
-Autogenerate models
-
-
-
-- cfe902a0 Autogenerate models
-
-- 287bf7f4 more docs
-
-9d896f40 Merge pull request #13 from vektah/autocast
-
-Automatically add type conversions around wrapped types
-
-
-
-- 85fa63b9 Automatically add type conversions around wrapped types
-
-c8c2e40f Merge pull request #11 from vektah/subscriptions
-
-Add support for subscriptions
-
-
-
-- d514b829 Add some go tests to the chat app
-
-- ec2916d9 chat example for subscriptions using CRA+apollo
-
-- 8f93bf8d get arg errors working in both contexts
-
-- 62a18ff1 Update generator to build a new ExecutableSchema interface
-
-- c082c3a4 prevent concurrent writes in subscriptions
-
-- f555aec6 switch to graphql playground for better subscription support
-
-- 18219541 add websocket support to the handler
-
-- d4c7f3b9 update resolver definition to use channels for subscriptions
-
-d0244d24 Merge pull request #10 from vektah/newtypes
-
-User defined custom types
-
-
-
-- 5d86eeb6 fix jsonw test
-
-- 944ee088 regenerate
-
-- 4722a855 add scalar example
-
-- 83b001ae rename marshaler methods
-
-- e0b7c25f move collectFields out of generated code
-
-- 146c6538 generate input object unpackers
-
-- d94cfb1f allow primitive scalars to be redefined
-
-- 402e0730 rename jsonw to graphql
-
-- 3e7d80df Update README.md
-
-- 9c77e7a0 Update dataloaden dep
-
-- 530f7895 Make gql client work with older versions of mapstructure
-
-- 5c04d1ad __typename support
-
-51292db9 Merge pull request [#4](https://github.com/99designs/gqlgen/issues/4) from vektah/cleanup-type-binding
-
-Cleanup schema binding code
-
-
-
-- c89a8774 Cleanup schema binding code
-
-030954a5 Merge pull request [#2](https://github.com/99designs/gqlgen/issues/2) from ulrikstrid/patch-1
-
-Fix typo in README
-
-
-
-- cb507bd0 Fix typo in README
-
-- e3167785 Fix template loading from inside vendor
-
-- 261b52ce fix an error handling bug
-
-- 1da57f59 Split starwars models out from resolvers
-
-- 743b2cf9 fix indenting
-
-- fb2d5817 use gorunpkg to vendor go generate binaries
-
-- 7f4d0405 encourage dep use
-
-- 3276c782 Do not bind to unexported vars or methods
-
-- 5fabffaf heading tweaks
-
-- e032c1d5 Prior art
-
-- 45b79a1e Add a test for multidimensional arrays
-
-- ec73a50a fix race
-
-- 75a3a05c Dont execute mutations concurrently
-
-- 3900a41d tidy up json writing
-
-- 0dcf7f6b add circle ci badge
-
-- 2c9bf21c get dataloaden
-
-- 4fff3241 install dataloaden in ci
-
-- 951f41b2 circle ci
-
-- 8fa5f628 less whitespace
-
-- c76f3b98 clean up template layout
-
-- 4a6cea5e readme fixes
-
-- b814ad52 rename repo
-
-- 9c79a37a Cleanup and add tests
-
-- 5afb5caa update dataloaden
-
-- d00fae08 Add dataloader example
-
-- 86cdf3a0 Fix package resolution
-
-- 41306cba Better readme
-
-- ce5e38ed Add GET query param support to handler
-
-- dd9a8e4d parallel execution
-
-- 4468127e pointer juggling
-
-- 9e99c149 Use go templates to generate code
-
-- 41f74970 Support go versions earlier than 1.9
-
-- c20ef3d0 add missing nulls
-
-- bb753776 Use goimports instead of gofmt on generated code
-
-- c2cf3835 coerce types between similar types
-
-- 5297dd40 Add support for RFC3339 formatted Time as time.Time
-
-- 61291ce9 support vendor
-
-- 6d437d7e allow map[string]interface{} arg types
-
-- 39a8090a cleanup
-
-- a9352e32 gometalinter pass
-
-- 9ab81d67 Finish fleshing out the connection example
-
-- e04b1e50 inline supporting runtime funcs
-
-- 9cedf012 complex arg handling
-
-- 0c9c009f Clean up json writer
-
-- e7e18c40 much cleaner generated code
-
-- 6a76bbf6 Interfaces and starwars example
-
-- 29110e76 Generate ESS to remove it interface{} casts completly
-
-- 2f358e7d graphiql autocomplete working
-
-- 2e2c3135 create separate type objects in prep for fragment support
-
-- 22c0ad0a Add basic introspection support
-
-- c1c2cb64 Code generation
-
-- 4be5ac84 args
-
-- bde800e1 imports
-
-- 596554da start of code generator
-
-- 62fa8184 split generated vs exec code
-
-- 0ea104cd remove internal package
-
-- f81371e8 Args
-
-- 01896b3b Hand written codegen example
-
-- 5a756bda Rewrite paths and add readme
-
-b4663703 trace: Log graphql.variables rather than tag
-
-According to the OT documentation tag values can be numeric types, strings, or
-bools. The behavior of other tag value types is undefined at the OpenTracing
-level. For example `github.com/lightstep/lightstep-tracer-go` generates error
-events.
-
-
-
-- 5d3b13f2 Support context injection in testing
-
-beff0841 Separate literal arg parsing cases (int, float)
-
-This change allows the ID scalar implementation to more semantically
-handle the case for unmarshalling integer IDs.
-
-
-
-ab1dd4b5 Add tests for ID scalar input
-
-This commit adds two tests cases for ID scalar input:
-- a string literal
-- an integer literal
-
-Both of these literal types are covered by the GraphQL specification as
-valid input for the ID scalar.
-
-Reference the ID section of the spec for more information:
-http://facebook.github.io/graphql/October2016/#sec-ID
-
-
-
-d8c57437 Extract ID scalar implmentation
-
-This change moves the ID scalar implementation out of `graphql.go` and
-into its own file `id.go` for consistency with the Time scalar
-implementation.
-
-
-
-- 10eb949b cleaned up example to use MustParseSchema
-
-52080e1f Rename friendsConenctionArgs to friendsConnectionArgs
-
-Fix spelling error in friendsConnectionArgs type
-
-
-
-- 3965041f Update GraphiQL interface (add history)
-
-6b9bc3e2 Add `(*Schema).Validate` (#99 )
-
-* Add `(*Schema).Validate`
-
-This adds a `Validate` method to the schema, which allows you to find out if a query is valid without actually running it. This is valuable when you have a client with static queries and want to statically determine whether they are valid.
-
-* Fix Validate doc string
-
-
-
-- 7f3f7120 Set content-type header to `application/json`
-
-- c76ff4d8 moved packer into separate package
-
-- 073edccd updated tests from graphql-js
-
-- 3a9ac368 validation: improved overlap check
-
-- f86c8b01 allow multiple schemas in tests
-
-- 77750960 validation: OverlappingFieldsCanBeMerged
-
-- e7ca4fde refactor: remove SelectionSet type
-
-- 7aad6ba7 refactor: use schema.NamedType
-
-- fddcbcb7 resolves #92 : fix processing of negative scalars during parse literals
-
-- 48c1a0fb Small fix based on feedback.
-
-- e90d1089 allow custom types as input arguments
-
-- dd3d39e2 fix panic when variable name not declared
-
-- c2bc105f validation: NoUnusedVariables
-
-- 4aff2976 refactor
-
-- 0933d241 validation: VariablesInAllowedPosition
-
-- 83e2f31a validation: NoUndefinedVariables
-
-- c39ffeca validation: PossibleFragmentSpreads
-
-- 47c5cde7 validation: UniqueInputFieldNames
-
-- 94cb2918 big refactoring around literals
-
-- 3d63ae80 some refactoring
-
-- 969dab9d merged lexer into package "common"
-
-- a9de6171 renamed lexer.Literal to lexer.BasicLit
-
-- 88c492bb validation: NoFragmentCycles (closes #38 )
-
-- d39712c8 refactor addErrMultiLoc
-
-- ee5e1c3b validation: updated tests
-
-- 490ad6b2 validation: NoUnusedFragments
-
-- da85f09d add path to errors on resolver error or panic (closes #86 )
-
-- 04cb2550 allow structs without pointers (closes #78 )
-
-- 4c40b305 show all locations in error string
-
-- 5c26f320 fix limiter
-
-- dbc3f0a0 fix composing of fragments (closes #75 )
-
-213a5d01 Warn if an interface's resolver has a ToTYPE implementation that does not return two values.
-
-Currently this instead crashes fairly inscrutably at runtime here: https://github.com/neelance/graphql-go/blob/master/internal/exec/exec.go#L117
-
-An alternate fix would be to check len(out) there and perhaps rely on out[0] being nil to continue if there's only one return value.
-
-
-
-- 00c4c574 Fix panic when resolver is not a pointer
-
-- d0df6d8a small cleanup
-
-- 036945e2 fix hang on panic (fixes #82 )
-
-- 01ab5128 Add supports for snake case (#77 )
-
-67e6f91d use encoding/json to encode scalars
-
-There are some edge cases that are better handled by the proven encoder of encoding/json, for example special characters in strings.
-
-
-
-- 3f1cb6f8 implement user defined logger (with sensible defaults)
-
-- b357f464 built-in json encoding
-
-- 2d828770 refactor: collect fields to resolve
-
-- 32f8b6ba refactor: replaced MetaField
-
-- b95c566e simplify schema introspection
-
-- 4200a584 split internal/exec into multiple packages
-
-- c11687a7 refactored internal/exec
-
-- bd742d84 WIP
-
-- d09dd543 added SchemaOpt
-
-- 1dcc5753 fix Schema.ToJSON
-
-- 4f07e397 pass variable types to tracer
-
-- 36e6c97e readme: remove outdated section about opentracing
-
-- 0b143cca refactor: apply before exec
-
-a9920602 pluggable tracer
-
-Improved performance while keeping flexibility.
-
-
-
-- 58d3d5b8 refactored exec.Request
-
-- 9dd714ec refactored execField some more
-
-- a43ef241 refactor: meta fields
-
-- 48931d17 refactor fieldExec
-
-- ee95710d small cleanup
-
-- 84baade5 perf: create span label only once
-
-- a16ed600 improved concurrency architecture
-
-aef3d9cf Add testing.go into its own package (gqltesting)
-
-This is done so that "testing" (and especially its registered cli flags)
-aren't included in any production builds.
-
-
-
-- f78108a3 validation: meta fields
-
-- c6ab2374 added empty file to make CI happy
-
-- d59c1709 fix introspection of default value
-
-- 42608a03 clean up now unnecessary check
-
-- e45f26dd validation: UniqueDirectivesPerLocation
-
-- dcf7e59f validation: UniqueFragmentNames
-
-- eeaa510b validation: UniqueOperationNames
-
-- a5a11604 refactor: Loc on Field
-
-- b5919db4 validation: UniqueVariableNames
-
-- 8632753a validation: ScalarLeafs
-
-- 45844984 validation: ProvidedNonNullArguments
-
-- c741ea84 validation: VariablesAreInputTypes
-
-- 0875d74f validation: UniqueArgumentNames
-
-- 1fdab07f validation: LoneAnonymousOperation
-
-- 090df527 validation: KnownTypeNames
-
-- f99ca95e refactor: validation context
-
-- 8aac2817 validation: KnownFragmentNames
-
-- eae3efc9 validation: KnownDirectives
-
-- 70581168 refactor: separate InlineFragment and FragmentSpread
-
-- d6aec0d6 renamed schema.Directive to DirectiveDecl
-
-- b616eeca validation: KnownArgumentNames
-
-- 885af607 refactor: Location without pointer
-
-- 5a40251c tests: filter errors to currently tested rule
-
-- 9c054f53 refactor: lexer.Ident
-
-- 254afa8a validation: fragment type
-
-- b6ef81af added test export script
-
-- 95a4ecd8 validation: fields
-
-- c387449f validation: default values
-
-- 44c6e634 validation: arguments
-
-- 30dcc339 directive arguments as slice
-
-- d331ac27 input values as slice
-
-- 615afd61 fields as slice
-
-- 60759904 arguments as slice
-
-- f7d9ff4e refactor literals
-
-- 2e1fef01 keep track of location of arguments
-
-- 29e0b375 added EnumValue type
-
-- aa868e8d resolve fragments early
-
-- adeb53d6 remove resolver from query package
-
-- 2e23573f parse directive decl without arguments
-
-- 36f8ba8b fix introspection of default value (closes #65 )
-
-- e06f5855 support for "deprecated" directive on enum values
-
-- 498fe396 support for @deprecated](https://github.com/deprecated) directive on fields (fixes [#64 )
-
-- 93ddece9 refactor: DirectiveArgs
-
-- 8f5605a1 refactor directives
-
-- faf5384a simplify parseArguments
-
-- b2c2e906 some more docs
-
-- f4516523 added some method documentations
-
-- 91bd7f88 improved meta schema
-
-- 10dc8ee6 added support for directive declarations in schema
-
-- 28028f66 readme: more info on current project status
-
-- e9afca38 hint in error if method only exists on pointer type (fixes #60 )
-
-- 356ebd93 nicer error messages (fixes #56 )
-
-- e413f4ed make gocyclo happy
-
-- 6e92795e fix spelling
-
-- 306e27ef gofmt -s
-
-- 612317b2 fix ToJSON
-
-- 728e57a9 improved doc for MaxParallelism
-
-- e8590a10 don't execute any further resolvers after context got cancelled
-
-- 644435cc added MaxParallelism
-
-- 21802a33 readme: add Sourcegraph badge
-
-- 5b2978fc added support for recursive input values
-
-- 8c84afb1 improved structure of "make exec" code
-
-- d5a6ca49 make sure internal types don't get exposed
-
-- c9d4d865 fixed some null handling
-
-- a336dd4b added request.resolveVar
-
-- 943f80f4 added unmarshalerPacker type
-
-- f77f7339 refactored non-null handling in packer
-
-- ae0f1689 remove hasDefault flag from makePacker
-
-- 9cbad485 allow Unmarshaler for all types, not just scalars
-
-- f565a119 refactored "make exec" code
-
-- 07a09e5d properly check scalar types of result values
-
-- ecceddec Add ResolverError field to QueryError for post processing
-
-- b7c59ab9 renamed type
-
-- 5817d300 moved some introspection code into new package, added Schema.Introspect
-
-cdef8563 removed SchemaBuilder
-
-It is not necessary any more. Simpler API wins.
-
-
-
-518a5fe7 Merge pull request #45 from nicksrandall/master
-
-fix wrong import statement
-
-
-
-- 8112e719 fix wrong import statement
-
-- 7fafcc6e allow single value as implicit list (fixes #41 )
-
-- 2b513d7e improved custom types
-
-- 191422c4 merged code for value coercion and packing
-
-- 232356b3 introspection for "skip" and "include" directives (fixes #30 )
-
-- 2e10f7b8 readme: spec version and link (fixes #35 )
-
-- 61eca4c7 pretty print SchemaBuilder.ToJSON
-
-- 5e09ced1 fix "null" value for empty descriptions of types
-
-- 33cd194f SchemaBuilder.ToJSON instead of SchemaToJSON (fixes #29 )
-
-- fff173bc proper error message when using non-input type as input (#19 )
-
-- b94f2afe improved support for null
-
-- 4130d540 added support for input object literals
-
-- 663e466f moved some code into separate file
-
-- 728e071e added support for lists as input values (fixes #19 )
-
-- 86f0f145 fix Float literals
-
-- b07f277b raise error on unexported input field (fixes #24 )
-
-- 4838c6f3 fix optional input fields (fixes #25 )
-
-- a15deed4 better way to implement GraphQL interfaces (#23 )
-
-- 7a66d0e0 add support for description comments (fixes #20 )
-
-- 0b3be40c improved tracing
-
-- da879f4f small improvements to readme
-
-- f3f24cf6 added some documentation
-
-- 38598d83 added CI badge to readme
-
-- bab81332 starwars example: fix pagination panic (#12 )
-
-- 5ce3ca69 testing: proper error on invalid ExpectedResult
-
-- 8f7d2b1e added relay.Handler
-
-- fce75a50 properly coerce Int input values ([#8](https://github.com/99designs/gqlgen/issues/8))
-
-- 0dd38747 star wars example: pass operation name and variables ([#8](https://github.com/99designs/gqlgen/issues/8))
-
-- 3b7efd5c fix __typename for concrete object types (fixes [#9](https://github.com/99designs/gqlgen/issues/9))
-
-- 35667eda testing tools
-
-- 84571820 only create schema once for tests
-
-- de113f96 added MustParseSchema
-
-- d5e5f609 improved structure for tests
-
-- 947a1a3a added package with tools for Relay
-
-- 65f3e2b1 fix SchemaToJSON
-
-- cec7cea1 better error handling
-
-- e3386b06 improved type coercion and explicit ID type
-
-- 2ab9d765 support for custom scalars (fixes [#3](https://github.com/99designs/gqlgen/issues/3))
-
-- bdfd5ce3 use custom error type less
-
-- 0a7a37d1 more flexible API for creating a schema
-
-- bd20a165 improved type handling
-
-- ffa9fea4 renamed GraphQLError to QueryError
-
-- fcfa135a refactor
-
-- c28891d8 added support for OpenTracing
-
-- 2cf7fcc8 added SchemaToJSON
-
-- f6b498ac stricter type mapping for input values
-
-- 3c15e177 execute mutations serially
-
-- 1faf6661 fix missing error
-
-- de9b7fed add support for mutations
-
-- 094061d8 improved error handling a bit
-
-- cdb088d6 refactor: args as input object
-
-- b06d3941 refactor: values
-
-- 4fd33958 refactor: improved type system
-
-1d03e667 refactor: new package "common"
-
-package "query" does not depend on "schema" any more
-
-
-
-- 1a959516 refactor
-
-- f8cb11c1 example/starwars: use interface base type to make type assertions nicer
-
-- 746da4b8 star wars example: friendsConnection
-
-- bec45364 parse type in query
-
-- be87a8fa remove unused code
-
-- 042e306a simpler way to resolve type refs in schema
-
-- 7cbf85fb improved type checking of arguments
-
-- 2b6460ae type check for scalars
-
-- 17034fe7 improved null handling
-
-- e6b6fbca small cleanup
-
-- 7b8cd1bc meta schema from graphql-js
-
-- 9333c0b3 introspection: inputFields
-
-- c4faac56 introspection: ofType
-
-- 86da8492 introspection: interfaces and possibleTypes
-
-- 20dbb845 proper nil support for lists
-
-- 2e3369ae resolve types in schema package
-
-- 7da95f4a introspection: enum values
-
-- cb423e6e improved handling of scalar types
-
-- 5b07780f introspection: original order for fields and args
-
-- 1e2d180c introspection: arguments
-
-- f21131bb refactored schema to be more in line with introspection
-
-- 0152d4f2 introspection: currently no descriptions and deprecations
-
-- ad5689bb field introspection
-
-- 2749d814 removed query.TypeReference
-
-2eb105ec Revert "resolve scalar types in exec"
-
-This reverts commit fb3a6fc969b0c8c286c7d024a108f5696627639c.
-
-
-
-- 40682d68 removed exec.typeRefExec
-
-- 64ea90fe makeWithType
-
-- 2966f213 added nonNilExec
-
-- c12a8ad3 added support for ints and floats in query
-
-- 0f85412b improved example
-
-- 22ce46d1 support for optional error result
-
-- 0fe56128 optional context parameter
-
-- f1bc9b21 syntax errors with proper line and column
-
-- ae299efc proper response format
-
-- 9619721b added support for contexts
-
-- 267fc631 refactor
-
-- 2e56e7ea renamed NewSchema to ParseSchema
-
-- 356b6e6b added godoc badge
-
-- 03f2e72d added README.md
-
-- 1134562a added non-null type
-
-- 8fa41551 renamed Input to InputObject
-
-- 6f2399aa introspection: type kind
-
-- e2c58f2f refactor: schema types for interface and input
-
-- 0c8c9436 introspection: __type
-
-- 99a37521 refactoring: calculate "implemented by" in schema package
-
-- 1cac7e56 introspection: queryType
-
-- cc348faf first bit of introspection
-
-- fb3a6fc9 resolve scalar types in exec
-
-- 4cb8dcc0 panic handlers
-
-- c7a528d4 proper error handling when creating schema
-
-- ae37381c add support for __typename
-
-- 4057080f add support for union types
-
-- d304a418 attribute source of star wars schema
-
-- 0fcab871 added LICENSE
-
-- 0dc0116d support for inline fragments
-
-- f5e7d070 support for type assertions
-
-- fcb853c6 refactoring: addResultFn
-
-- 741343f8 explicit fragment spread exec
-
-- 73759258 all missing stubs for star wars example
-
-- edc78e2b parallelism
-
-- fb633714 collect fields
-
-- 08f02a2b execs
-
-- d70d16c4 added server example
-
-- 6f9a89db separate example/starwars package
-
-- e4060db5 added support for directives
-
-- 89b06652 added support for variables
-
-- 78065ecb added support for enums
-
-- 18645e60 added support for query fragments
-
-- 84f532b9 added support for aliases
-
-- 59d2a619 improved support for arguments
-
-- edce4ec8 proper star wars data
-
-- d6ffc01d syntax support for full star wars schema
-
-- b5824104 support for comments
-
-- 2f9ce9b4 support for entry points
-
-- 0b3d1038 support for arguments
-
-- cff8b302 support for arrays
-
-- 565e59f5 schema package
-
-- 1ae71ba2 query package
-
-- 42c13e7a named types, complex objects
-
-- bf64e5da initial commit
-
-
-
-
-
-
-
diff --git a/vendor/github.com/99designs/gqlgen/CONTRIBUTING.md b/vendor/github.com/99designs/gqlgen/CONTRIBUTING.md
deleted file mode 100644
index 3919b2a4b83..00000000000
--- a/vendor/github.com/99designs/gqlgen/CONTRIBUTING.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Contribution Guidelines
-
-Want to contribute to gqlgen? Here are some guidelines for how we accept help.
-
-## Getting in Touch
-
-Our [discord](https://discord.gg/DYEq3EMs4U) server is the best place to ask questions or get advice on using gqlgen.
-
-## Reporting Bugs and Issues
-
- We use [GitHub Issues](https://github.com/99designs/gqlgen/issues) to track bugs, so please do a search before submitting to ensure your problem isn't already tracked.
-
-### New Issues
-
-Please provide the expected and observed behaviours in your issue. A minimal GraphQL schema or configuration file should be provided where appropriate.
-
-## Proposing a Change
-
-If you intend to implement a feature for gqlgen, or make a non-trivial change to the current implementation, we recommend [first filing an issue](https://github.com/99designs/gqlgen/issues/new) marked with the `proposal` tag, so that the engineering team can provide guidance and feedback on the direction of an implementation. This also help ensure that other people aren't also working on the same thing.
-
-Bug fixes are welcome and should come with appropriate test coverage.
-
-New features should be made against the `next` branch.
-
-### License
-
-By contributing to gqlgen, you agree that your contributions will be licensed under its MIT license.
diff --git a/vendor/github.com/99designs/gqlgen/LICENSE b/vendor/github.com/99designs/gqlgen/LICENSE
deleted file mode 100644
index 10bb21c07e7..00000000000
--- a/vendor/github.com/99designs/gqlgen/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2020 gqlgen authors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/99designs/gqlgen/README.md b/vendor/github.com/99designs/gqlgen/README.md
deleted file mode 100644
index 0621c55bfe6..00000000000
--- a/vendor/github.com/99designs/gqlgen/README.md
+++ /dev/null
@@ -1,150 +0,0 @@
-![gqlgen](https://user-images.githubusercontent.com/980499/133180111-d064b38c-6eb9-444b-a60f-7005a6e68222.png)
-
-
-# gqlgen [![Integration](https://github.com/99designs/gqlgen/actions/workflows/integration.yml/badge.svg)](https://github.com/99designs/gqlgen/actions) [![Coverage Status](https://coveralls.io/repos/github/99designs/gqlgen/badge.svg?branch=master)](https://coveralls.io/github/99designs/gqlgen?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/99designs/gqlgen)](https://goreportcard.com/report/github.com/99designs/gqlgen) [![Go Reference](https://pkg.go.dev/badge/github.com/99designs/gqlgen.svg)](https://pkg.go.dev/github.com/99designs/gqlgen) [![Read the Docs](https://badgen.net/badge/docs/available/green)](http://gqlgen.com/)
-
-## What is gqlgen?
-
-[gqlgen](https://github.com/99designs/gqlgen) is a Go library for building GraphQL servers without any fuss.
-
-- **gqlgen is based on a Schema first approach** — You get to Define your API using the GraphQL [Schema Definition Language](http://graphql.org/learn/schema/).
-- **gqlgen prioritizes Type safety** — You should never see `map[string]interface{}` here.
-- **gqlgen enables Codegen** — We generate the boring bits, so you can focus on building your app quickly.
-
-Still not convinced enough to use **gqlgen**? Compare **gqlgen** with other Go graphql [implementations](https://gqlgen.com/feature-comparison/)
-
-## Quick start
-1. [Initialise a new go module](https://golang.org/doc/tutorial/create-module)
-
- mkdir example
- cd example
- go mod init example
-
-2. Add `github.com/99designs/gqlgen` to your [project's tools.go](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)
-
- printf '// +build tools\npackage tools\nimport _ "github.com/99designs/gqlgen"' | gofmt > tools.go
- go mod tidy
-
-3. Initialise gqlgen config and generate models
-
- go run github.com/99designs/gqlgen init
-
-4. Start the graphql server
-
- go run server.go
-
-More help to get started:
- - [Getting started tutorial](https://gqlgen.com/getting-started/) - a comprehensive guide to help you get started
- - [Real-world examples](https://github.com/99designs/gqlgen/tree/master/_examples) show how to create GraphQL applications
- - [Reference docs](https://pkg.go.dev/github.com/99designs/gqlgen) for the APIs
-
-## Reporting Issues
-
-If you think you've found a bug, or something isn't behaving the way you think it should, please raise an [issue](https://github.com/99designs/gqlgen/issues) on GitHub.
-
-## Contributing
-
-We welcome contributions, Read our [Contribution Guidelines](https://github.com/99designs/gqlgen/blob/master/CONTRIBUTING.md) to learn more about contributing to **gqlgen**
-## Frequently asked questions
-
-### How do I prevent fetching child objects that might not be used?
-
-When you have nested or recursive schema like this:
-
-```graphql
-type User {
- id: ID!
- name: String!
- friends: [User!]!
-}
-```
-
-You need to tell gqlgen that it should only fetch friends if the user requested it. There are two ways to do this;
-
-- #### Using Custom Models
-
-Write a custom model that omits the friends field:
-
-```go
-type User struct {
- ID int
- Name string
-}
-```
-
-And reference the model in `gqlgen.yml`:
-
-```yaml
-# gqlgen.yml
-models:
- User:
- model: github.com/you/pkg/model.User # go import path to the User struct above
-```
-
-- #### Using Explicit Resolvers
-
-If you want to Keep using the generated model, mark the field as requiring a resolver explicitly in `gqlgen.yml` like this:
-
-```yaml
-# gqlgen.yml
-models:
- User:
- fields:
- friends:
- resolver: true # force a resolver to be generated
-```
-
-After doing either of the above and running generate we will need to provide a resolver for friends:
-
-```go
-func (r *userResolver) Friends(ctx context.Context, obj *User) ([]*User, error) {
- // select * from user where friendid = obj.ID
- return friends, nil
-}
-```
-
-You can also use inline config with directives to achieve the same result
-
-```graphql
-directive @goModel(model: String, models: [String!]) on OBJECT
- | INPUT_OBJECT
- | SCALAR
- | ENUM
- | INTERFACE
- | UNION
-
-directive @goField(forceResolver: Boolean, name: String) on INPUT_FIELD_DEFINITION
- | FIELD_DEFINITION
-
-type User @goModel(model: "github.com/you/pkg/model.User") {
- id: ID! @goField(name: "todoId")
- friends: [User!]! @goField(forceResolver: true)
-}
-```
-
-### Can I change the type of the ID from type String to Type Int?
-
-Yes! You can by remapping it in config as seen below:
-
-```yaml
-models:
- ID: # The GraphQL type ID is backed by
- model:
- - github.com/99designs/gqlgen/graphql.IntID # a go integer
- - github.com/99designs/gqlgen/graphql.ID # or a go string
-```
-
-This means gqlgen will be able to automatically bind to strings or ints for models you have written yourself, but the
-first model in this list is used as the default type and it will always be used when:
-
-- Generating models based on schema
-- As arguments in resolvers
-
-There isn't any way around this, gqlgen has no way to know what you want in a given context.
-
-## Other Resources
-
-- [Christopher Biscardi @ Gophercon UK 2018](https://youtu.be/FdURVezcdcw)
-- [Introducing gqlgen: a GraphQL Server Generator for Go](https://99designs.com.au/blog/engineering/gqlgen-a-graphql-server-generator-for-go/)
-- [Dive into GraphQL by Iván Corrales Solera](https://medium.com/@ivan.corrales.solera/dive-into-graphql-9bfedf22e1a)
-- [Sample Project built on gqlgen with Postgres by Oleg Shalygin](https://github.com/oshalygin/gqlgen-pg-todo-example)
diff --git a/vendor/github.com/99designs/gqlgen/RELEASE-CHECKLIST.md b/vendor/github.com/99designs/gqlgen/RELEASE-CHECKLIST.md
deleted file mode 100644
index 86c2f3776fc..00000000000
--- a/vendor/github.com/99designs/gqlgen/RELEASE-CHECKLIST.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# When gqlgen gets released, the following things need to happen
-Assuming the next version is $NEW_VERSION=v0.16.0 or something like that.
-
-1. Run the https://github.com/99designs/gqlgen/blob/master/bin/release:
-```
-./bin/release $NEW_VERSION
-```
-2. git-chglog -o CHANGELOG.md
-3. git commit and push the CHANGELOG.md
-4. Go to https://github.com/99designs/gqlgen/releases and draft new release, autogenerate the release notes, and Create a discussion for this release
-5. Comment on the release discussion with any really important notes (breaking changes)
-
-I used https://github.com/git-chglog/git-chglog to automate the changelog maintenance process for now. We could just as easily use go releaser to make the whole thing automated.
-
diff --git a/vendor/github.com/99designs/gqlgen/TESTING.md b/vendor/github.com/99designs/gqlgen/TESTING.md
deleted file mode 100644
index e5d49e8a9f3..00000000000
--- a/vendor/github.com/99designs/gqlgen/TESTING.md
+++ /dev/null
@@ -1,40 +0,0 @@
-How to write tests for gqlgen
-===
-
-Testing generated code is a little tricky, heres how its currently set up.
-
-### Testing responses from a server
-
-There is a server in `codegen/testserver` that is generated as part
-of `go generate ./...`, and tests written against it.
-
-There are also a bunch of tests in against the examples, feel free to take examples from there.
-
-
-### Testing the errors generated by the binary
-
-These tests are **really** slow, because they need to run the whole codegen step. Use them very sparingly. If you can, find a way to unit test it instead.
-
-Take a look at `codegen/testserver/input_test.go` for an example.
-
-### Testing introspection
-
-Introspection is tested by diffing the output of `graphql get-schema` against an expected output.
-
-Setting up the integration environment is a little tricky:
-```bash
-cd integration
-go generate ./...
-go run ./server/server.go
-```
-in another terminal
-```bash
-cd integration
-npm install
-./node_modules/.bin/graphql-codegen
-```
-
-will write the schema to `integration/schema-fetched.graphql`, compare that with `schema-expected.graphql`
-
-CI will run this and fail the build if the two files dont match.
-
diff --git a/vendor/github.com/99designs/gqlgen/api/generate.go b/vendor/github.com/99designs/gqlgen/api/generate.go
deleted file mode 100644
index 6a85cd941ac..00000000000
--- a/vendor/github.com/99designs/gqlgen/api/generate.go
+++ /dev/null
@@ -1,125 +0,0 @@
-package api
-
-import (
- "fmt"
- "syscall"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/plugin"
- "github.com/99designs/gqlgen/plugin/federation"
- "github.com/99designs/gqlgen/plugin/modelgen"
- "github.com/99designs/gqlgen/plugin/resolvergen"
-)
-
-func Generate(cfg *config.Config, option ...Option) error {
- _ = syscall.Unlink(cfg.Exec.Filename)
- if cfg.Model.IsDefined() {
- _ = syscall.Unlink(cfg.Model.Filename)
- }
-
- plugins := []plugin.Plugin{}
- if cfg.Model.IsDefined() {
- plugins = append(plugins, modelgen.New())
- }
- plugins = append(plugins, resolvergen.New())
- if cfg.Federation.IsDefined() {
- plugins = append([]plugin.Plugin{federation.New()}, plugins...)
- }
-
- for _, o := range option {
- o(cfg, &plugins)
- }
-
- for _, p := range plugins {
- if inj, ok := p.(plugin.EarlySourceInjector); ok {
- if s := inj.InjectSourceEarly(); s != nil {
- cfg.Sources = append(cfg.Sources, s)
- }
- }
- }
-
- if err := cfg.LoadSchema(); err != nil {
- return fmt.Errorf("failed to load schema: %w", err)
- }
-
- for _, p := range plugins {
- if inj, ok := p.(plugin.LateSourceInjector); ok {
- if s := inj.InjectSourceLate(cfg.Schema); s != nil {
- cfg.Sources = append(cfg.Sources, s)
- }
- }
- }
-
- // LoadSchema again now we have everything
- if err := cfg.LoadSchema(); err != nil {
- return fmt.Errorf("failed to load schema: %w", err)
- }
-
- if err := cfg.Init(); err != nil {
- return fmt.Errorf("generating core failed: %w", err)
- }
-
- for _, p := range plugins {
- if mut, ok := p.(plugin.ConfigMutator); ok {
- err := mut.MutateConfig(cfg)
- if err != nil {
- return fmt.Errorf("%s: %w", p.Name(), err)
- }
- }
- }
- // Merge again now that the generated models have been injected into the typemap
- data, err := codegen.BuildData(cfg)
- if err != nil {
- return fmt.Errorf("merging type systems failed: %w", err)
- }
-
- if err = codegen.GenerateCode(data); err != nil {
- return fmt.Errorf("generating core failed: %w", err)
- }
-
- if !cfg.SkipModTidy {
- if err = cfg.Packages.ModTidy(); err != nil {
- return fmt.Errorf("tidy failed: %w", err)
- }
- }
-
- for _, p := range plugins {
- if mut, ok := p.(plugin.CodeGenerator); ok {
- err := mut.GenerateCode(data)
- if err != nil {
- return fmt.Errorf("%s: %w", p.Name(), err)
- }
- }
- }
-
- if err = codegen.GenerateCode(data); err != nil {
- return fmt.Errorf("generating core failed: %w", err)
- }
-
- if !cfg.SkipValidation {
- if err := validate(cfg); err != nil {
- return fmt.Errorf("validation failed: %w", err)
- }
- }
-
- return nil
-}
-
-func validate(cfg *config.Config) error {
- roots := []string{cfg.Exec.ImportPath()}
- if cfg.Model.IsDefined() {
- roots = append(roots, cfg.Model.ImportPath())
- }
-
- if cfg.Resolver.IsDefined() {
- roots = append(roots, cfg.Resolver.ImportPath())
- }
-
- cfg.Packages.LoadAll(roots...)
- errs := cfg.Packages.Errors()
- if len(errs) > 0 {
- return errs
- }
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/api/option.go b/vendor/github.com/99designs/gqlgen/api/option.go
deleted file mode 100644
index d376193dfef..00000000000
--- a/vendor/github.com/99designs/gqlgen/api/option.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package api
-
-import (
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/plugin"
-)
-
-type Option func(cfg *config.Config, plugins *[]plugin.Plugin)
-
-func NoPlugins() Option {
- return func(cfg *config.Config, plugins *[]plugin.Plugin) {
- *plugins = nil
- }
-}
-
-func AddPlugin(p plugin.Plugin) Option {
- return func(cfg *config.Config, plugins *[]plugin.Plugin) {
- *plugins = append(*plugins, p)
- }
-}
-
-// PrependPlugin prepends plugin any existing plugins
-func PrependPlugin(p plugin.Plugin) Option {
- return func(cfg *config.Config, plugins *[]plugin.Plugin) {
- *plugins = append([]plugin.Plugin{p}, *plugins...)
- }
-}
-
-// ReplacePlugin replaces any existing plugin with a matching plugin name
-func ReplacePlugin(p plugin.Plugin) Option {
- return func(cfg *config.Config, plugins *[]plugin.Plugin) {
- if plugins != nil {
- found := false
- ps := *plugins
- for i, o := range ps {
- if p.Name() == o.Name() {
- ps[i] = p
- found = true
- }
- }
- if !found {
- ps = append(ps, p)
- }
- *plugins = ps
- }
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/args.go b/vendor/github.com/99designs/gqlgen/codegen/args.go
deleted file mode 100644
index 8c08d924fb7..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/args.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "go/types"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type ArgSet struct {
- Args []*FieldArgument
- FuncDecl string
-}
-
-type FieldArgument struct {
- *ast.ArgumentDefinition
- TypeReference *config.TypeReference
- VarName string // The name of the var in go
- Object *Object // A link back to the parent object
- Default interface{} // The default value
- Directives []*Directive
- Value interface{} // value set in Data
-}
-
-// ImplDirectives get not Builtin and location ARGUMENT_DEFINITION directive
-func (f *FieldArgument) ImplDirectives() []*Directive {
- d := make([]*Directive, 0)
- for i := range f.Directives {
- if !f.Directives[i].Builtin && f.Directives[i].IsLocation(ast.LocationArgumentDefinition) {
- d = append(d, f.Directives[i])
- }
- }
-
- return d
-}
-
-func (f *FieldArgument) DirectiveObjName() string {
- return "rawArgs"
-}
-
-func (f *FieldArgument) Stream() bool {
- return f.Object != nil && f.Object.Stream
-}
-
-func (b *builder) buildArg(obj *Object, arg *ast.ArgumentDefinition) (*FieldArgument, error) {
- tr, err := b.Binder.TypeReference(arg.Type, nil)
- if err != nil {
- return nil, err
- }
-
- argDirs, err := b.getDirectives(arg.Directives)
- if err != nil {
- return nil, err
- }
- newArg := FieldArgument{
- ArgumentDefinition: arg,
- TypeReference: tr,
- Object: obj,
- VarName: templates.ToGoPrivate(arg.Name),
- Directives: argDirs,
- }
-
- if arg.DefaultValue != nil {
- newArg.Default, err = arg.DefaultValue.Value(nil)
- if err != nil {
- return nil, fmt.Errorf("default value is not valid: %w", err)
- }
- }
-
- return &newArg, nil
-}
-
-func (b *builder) bindArgs(field *Field, params *types.Tuple) ([]*FieldArgument, error) {
- var newArgs []*FieldArgument
-
-nextArg:
- for j := 0; j < params.Len(); j++ {
- param := params.At(j)
- for _, oldArg := range field.Args {
- if strings.EqualFold(oldArg.Name, param.Name()) {
- tr, err := b.Binder.TypeReference(oldArg.Type, param.Type())
- if err != nil {
- return nil, err
- }
- oldArg.TypeReference = tr
-
- newArgs = append(newArgs, oldArg)
- continue nextArg
- }
- }
-
- // no matching arg found, abort
- return nil, fmt.Errorf("arg %s not in schema", param.Name())
- }
-
- return newArgs, nil
-}
-
-func (a *Data) Args() map[string][]*FieldArgument {
- ret := map[string][]*FieldArgument{}
- for _, o := range a.Objects {
- for _, f := range o.Fields {
- if len(f.Args) > 0 {
- ret[f.ArgsFunc()] = f.Args
- }
- }
- }
-
- for _, d := range a.Directives() {
- if len(d.Args) > 0 {
- ret[d.ArgsFunc()] = d.Args
- }
- }
- return ret
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/args.gotpl b/vendor/github.com/99designs/gqlgen/codegen/args.gotpl
deleted file mode 100644
index 7b541ae1f2e..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/args.gotpl
+++ /dev/null
@@ -1,36 +0,0 @@
-{{ range $name, $args := .Args }}
-func (ec *executionContext) {{ $name }}(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
- var err error
- args := map[string]interface{}{}
- {{- range $i, $arg := . }}
- var arg{{$i}} {{ $arg.TypeReference.GO | ref}}
- if tmp, ok := rawArgs[{{$arg.Name|quote}}]; ok {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField({{$arg.Name|quote}}))
- {{- if $arg.ImplDirectives }}
- directive0 := func(ctx context.Context) (interface{}, error) { return ec.{{ $arg.TypeReference.UnmarshalFunc }}(ctx, tmp) }
- {{ template "implDirectives" $arg }}
- tmp, err = directive{{$arg.ImplDirectives|len}}(ctx)
- if err != nil {
- return nil, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.({{ $arg.TypeReference.GO | ref }}) ; ok {
- arg{{$i}} = data
- {{- if $arg.TypeReference.IsNilable }}
- } else if tmp == nil {
- arg{{$i}} = nil
- {{- end }}
- } else {
- return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be {{ $arg.TypeReference.GO }}`, tmp))
- }
- {{- else }}
- arg{{$i}}, err = ec.{{ $arg.TypeReference.UnmarshalFunc }}(ctx, tmp)
- if err != nil {
- return nil, err
- }
- {{- end }}
- }
- args[{{$arg.Name|quote}}] = arg{{$i}}
- {{- end }}
- return args, nil
-}
-{{ end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/complexity.go b/vendor/github.com/99designs/gqlgen/codegen/complexity.go
deleted file mode 100644
index e9c6a20ee83..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/complexity.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package codegen
-
-func (o *Object) UniqueFields() map[string][]*Field {
- m := map[string][]*Field{}
-
- for _, f := range o.Fields {
- m[f.GoFieldName] = append(m[f.GoFieldName], f)
- }
-
- return m
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/binder.go b/vendor/github.com/99designs/gqlgen/codegen/config/binder.go
deleted file mode 100644
index 90820de6d36..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/config/binder.go
+++ /dev/null
@@ -1,494 +0,0 @@
-package config
-
-import (
- "errors"
- "fmt"
- "go/token"
- "go/types"
-
- "golang.org/x/tools/go/packages"
-
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/internal/code"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-var ErrTypeNotFound = errors.New("unable to find type")
-
-// Binder connects graphql types to golang types using static analysis
-type Binder struct {
- pkgs *code.Packages
- schema *ast.Schema
- cfg *Config
- References []*TypeReference
- SawInvalid bool
- objectCache map[string]map[string]types.Object
-}
-
-func (c *Config) NewBinder() *Binder {
- return &Binder{
- pkgs: c.Packages,
- schema: c.Schema,
- cfg: c,
- }
-}
-
-func (b *Binder) TypePosition(typ types.Type) token.Position {
- named, isNamed := typ.(*types.Named)
- if !isNamed {
- return token.Position{
- Filename: "unknown",
- }
- }
-
- return b.ObjectPosition(named.Obj())
-}
-
-func (b *Binder) ObjectPosition(typ types.Object) token.Position {
- if typ == nil {
- return token.Position{
- Filename: "unknown",
- }
- }
- pkg := b.pkgs.Load(typ.Pkg().Path())
- return pkg.Fset.Position(typ.Pos())
-}
-
-func (b *Binder) FindTypeFromName(name string) (types.Type, error) {
- pkgName, typeName := code.PkgAndType(name)
- return b.FindType(pkgName, typeName)
-}
-
-func (b *Binder) FindType(pkgName string, typeName string) (types.Type, error) {
- if pkgName == "" {
- if typeName == "map[string]interface{}" {
- return MapType, nil
- }
-
- if typeName == "interface{}" {
- return InterfaceType, nil
- }
- }
-
- obj, err := b.FindObject(pkgName, typeName)
- if err != nil {
- return nil, err
- }
-
- if fun, isFunc := obj.(*types.Func); isFunc {
- return fun.Type().(*types.Signature).Params().At(0).Type(), nil
- }
- return obj.Type(), nil
-}
-
-var (
- MapType = types.NewMap(types.Typ[types.String], types.NewInterfaceType(nil, nil).Complete())
- InterfaceType = types.NewInterfaceType(nil, nil)
-)
-
-func (b *Binder) DefaultUserObject(name string) (types.Type, error) {
- models := b.cfg.Models[name].Model
- if len(models) == 0 {
- return nil, fmt.Errorf(name + " not found in typemap")
- }
-
- if models[0] == "map[string]interface{}" {
- return MapType, nil
- }
-
- if models[0] == "interface{}" {
- return InterfaceType, nil
- }
-
- pkgName, typeName := code.PkgAndType(models[0])
- if pkgName == "" {
- return nil, fmt.Errorf("missing package name for %s", name)
- }
-
- obj, err := b.FindObject(pkgName, typeName)
- if err != nil {
- return nil, err
- }
-
- return obj.Type(), nil
-}
-
-func (b *Binder) FindObject(pkgName string, typeName string) (types.Object, error) {
- if pkgName == "" {
- return nil, fmt.Errorf("package cannot be nil")
- }
-
- pkg := b.pkgs.LoadWithTypes(pkgName)
- if pkg == nil {
- err := b.pkgs.Errors()
- if err != nil {
- return nil, fmt.Errorf("package could not be loaded: %s.%s: %w", pkgName, typeName, err)
- }
- return nil, fmt.Errorf("required package was not loaded: %s.%s", pkgName, typeName)
- }
-
- if b.objectCache == nil {
- b.objectCache = make(map[string]map[string]types.Object, b.pkgs.Count())
- }
-
- defsIndex, ok := b.objectCache[pkgName]
- if !ok {
- defsIndex = indexDefs(pkg)
- b.objectCache[pkgName] = defsIndex
- }
-
- // function based marshalers take precedence
- if val, ok := defsIndex["Marshal"+typeName]; ok {
- return val, nil
- }
-
- if val, ok := defsIndex[typeName]; ok {
- return val, nil
- }
-
- return nil, fmt.Errorf("%w: %s.%s", ErrTypeNotFound, pkgName, typeName)
-}
-
-func indexDefs(pkg *packages.Package) map[string]types.Object {
- res := make(map[string]types.Object)
-
- scope := pkg.Types.Scope()
- for astNode, def := range pkg.TypesInfo.Defs {
- // only look at defs in the top scope
- if def == nil {
- continue
- }
- parent := def.Parent()
- if parent == nil || parent != scope {
- continue
- }
-
- if _, ok := res[astNode.Name]; !ok {
- // The above check may not be really needed, it is only here to have a consistent behavior with
- // previous implementation of FindObject() function which only honored the first inclusion of a def.
- // If this is still needed, we can consider something like sync.Map.LoadOrStore() to avoid two lookups.
- res[astNode.Name] = def
- }
- }
-
- return res
-}
-
-func (b *Binder) PointerTo(ref *TypeReference) *TypeReference {
- newRef := *ref
- newRef.GO = types.NewPointer(ref.GO)
- b.References = append(b.References, &newRef)
- return &newRef
-}
-
-// TypeReference is used by args and field types. The Definition can refer to both input and output types.
-type TypeReference struct {
- Definition *ast.Definition
- GQL *ast.Type
- GO types.Type // Type of the field being bound. Could be a pointer or a value type of Target.
- Target types.Type // The actual type that we know how to bind to. May require pointer juggling when traversing to fields.
- CastType types.Type // Before calling marshalling functions cast from/to this base type
- Marshaler *types.Func // When using external marshalling functions this will point to the Marshal function
- Unmarshaler *types.Func // When using external marshalling functions this will point to the Unmarshal function
- IsMarshaler bool // Does the type implement graphql.Marshaler and graphql.Unmarshaler
- IsContext bool // Is the Marshaler/Unmarshaller the context version; applies to either the method or interface variety.
-}
-
-func (ref *TypeReference) Elem() *TypeReference {
- if p, isPtr := ref.GO.(*types.Pointer); isPtr {
- newRef := *ref
- newRef.GO = p.Elem()
- return &newRef
- }
-
- if ref.IsSlice() {
- newRef := *ref
- newRef.GO = ref.GO.(*types.Slice).Elem()
- newRef.GQL = ref.GQL.Elem
- return &newRef
- }
- return nil
-}
-
-func (t *TypeReference) IsPtr() bool {
- _, isPtr := t.GO.(*types.Pointer)
- return isPtr
-}
-
-// fix for https://github.com/golang/go/issues/31103 may make it possible to remove this (may still be useful)
-//
-func (t *TypeReference) IsPtrToPtr() bool {
- if p, isPtr := t.GO.(*types.Pointer); isPtr {
- _, isPtr := p.Elem().(*types.Pointer)
- return isPtr
- }
- return false
-}
-
-func (t *TypeReference) IsNilable() bool {
- return IsNilable(t.GO)
-}
-
-func (t *TypeReference) IsSlice() bool {
- _, isSlice := t.GO.(*types.Slice)
- return t.GQL.Elem != nil && isSlice
-}
-
-func (t *TypeReference) IsPtrToSlice() bool {
- if t.IsPtr() {
- _, isPointerToSlice := t.GO.(*types.Pointer).Elem().(*types.Slice)
- return isPointerToSlice
- }
- return false
-}
-
-func (t *TypeReference) IsNamed() bool {
- _, isSlice := t.GO.(*types.Named)
- return isSlice
-}
-
-func (t *TypeReference) IsStruct() bool {
- _, isStruct := t.GO.Underlying().(*types.Struct)
- return isStruct
-}
-
-func (t *TypeReference) IsScalar() bool {
- return t.Definition.Kind == ast.Scalar
-}
-
-func (t *TypeReference) UniquenessKey() string {
- nullability := "O"
- if t.GQL.NonNull {
- nullability = "N"
- }
-
- elemNullability := ""
- if t.GQL.Elem != nil && t.GQL.Elem.NonNull {
- // Fix for #896
- elemNullability = "ᚄ"
- }
- return nullability + t.Definition.Name + "2" + templates.TypeIdentifier(t.GO) + elemNullability
-}
-
-func (t *TypeReference) MarshalFunc() string {
- if t.Definition == nil {
- panic(errors.New("Definition missing for " + t.GQL.Name()))
- }
-
- if t.Definition.Kind == ast.InputObject {
- return ""
- }
-
- return "marshal" + t.UniquenessKey()
-}
-
-func (t *TypeReference) UnmarshalFunc() string {
- if t.Definition == nil {
- panic(errors.New("Definition missing for " + t.GQL.Name()))
- }
-
- if !t.Definition.IsInputType() {
- return ""
- }
-
- return "unmarshal" + t.UniquenessKey()
-}
-
-func (t *TypeReference) IsTargetNilable() bool {
- return IsNilable(t.Target)
-}
-
-func (b *Binder) PushRef(ret *TypeReference) {
- b.References = append(b.References, ret)
-}
-
-func isMap(t types.Type) bool {
- if t == nil {
- return true
- }
- _, ok := t.(*types.Map)
- return ok
-}
-
-func isIntf(t types.Type) bool {
- if t == nil {
- return true
- }
- _, ok := t.(*types.Interface)
- return ok
-}
-
-func (b *Binder) TypeReference(schemaType *ast.Type, bindTarget types.Type) (ret *TypeReference, err error) {
- if !isValid(bindTarget) {
- b.SawInvalid = true
- return nil, fmt.Errorf("%s has an invalid type", schemaType.Name())
- }
-
- var pkgName, typeName string
- def := b.schema.Types[schemaType.Name()]
- defer func() {
- if err == nil && ret != nil {
- b.PushRef(ret)
- }
- }()
-
- if len(b.cfg.Models[schemaType.Name()].Model) == 0 {
- return nil, fmt.Errorf("%s was not found", schemaType.Name())
- }
-
- for _, model := range b.cfg.Models[schemaType.Name()].Model {
- if model == "map[string]interface{}" {
- if !isMap(bindTarget) {
- continue
- }
- return &TypeReference{
- Definition: def,
- GQL: schemaType,
- GO: MapType,
- }, nil
- }
-
- if model == "interface{}" {
- if !isIntf(bindTarget) {
- continue
- }
- return &TypeReference{
- Definition: def,
- GQL: schemaType,
- GO: InterfaceType,
- }, nil
- }
-
- pkgName, typeName = code.PkgAndType(model)
- if pkgName == "" {
- return nil, fmt.Errorf("missing package name for %s", schemaType.Name())
- }
-
- ref := &TypeReference{
- Definition: def,
- GQL: schemaType,
- }
-
- obj, err := b.FindObject(pkgName, typeName)
- if err != nil {
- return nil, err
- }
-
- if fun, isFunc := obj.(*types.Func); isFunc {
- ref.GO = fun.Type().(*types.Signature).Params().At(0).Type()
- ref.IsContext = fun.Type().(*types.Signature).Results().At(0).Type().String() == "github.com/99designs/gqlgen/graphql.ContextMarshaler"
- ref.Marshaler = fun
- ref.Unmarshaler = types.NewFunc(0, fun.Pkg(), "Unmarshal"+typeName, nil)
- } else if hasMethod(obj.Type(), "MarshalGQLContext") && hasMethod(obj.Type(), "UnmarshalGQLContext") {
- ref.GO = obj.Type()
- ref.IsContext = true
- ref.IsMarshaler = true
- } else if hasMethod(obj.Type(), "MarshalGQL") && hasMethod(obj.Type(), "UnmarshalGQL") {
- ref.GO = obj.Type()
- ref.IsMarshaler = true
- } else if underlying := basicUnderlying(obj.Type()); def.IsLeafType() && underlying != nil && underlying.Kind() == types.String {
- // TODO delete before v1. Backwards compatibility case for named types wrapping strings (see #595)
-
- ref.GO = obj.Type()
- ref.CastType = underlying
-
- underlyingRef, err := b.TypeReference(&ast.Type{NamedType: "String"}, nil)
- if err != nil {
- return nil, err
- }
-
- ref.Marshaler = underlyingRef.Marshaler
- ref.Unmarshaler = underlyingRef.Unmarshaler
- } else {
- ref.GO = obj.Type()
- }
-
- ref.Target = ref.GO
- ref.GO = b.CopyModifiersFromAst(schemaType, ref.GO)
-
- if bindTarget != nil {
- if err = code.CompatibleTypes(ref.GO, bindTarget); err != nil {
- continue
- }
- ref.GO = bindTarget
- }
-
- return ref, nil
- }
-
- return nil, fmt.Errorf("%s is incompatible with %s", schemaType.Name(), bindTarget.String())
-}
-
-func isValid(t types.Type) bool {
- basic, isBasic := t.(*types.Basic)
- if !isBasic {
- return true
- }
- return basic.Kind() != types.Invalid
-}
-
-func (b *Binder) CopyModifiersFromAst(t *ast.Type, base types.Type) types.Type {
- if t.Elem != nil {
- child := b.CopyModifiersFromAst(t.Elem, base)
- if _, isStruct := child.Underlying().(*types.Struct); isStruct && !b.cfg.OmitSliceElementPointers {
- child = types.NewPointer(child)
- }
- return types.NewSlice(child)
- }
-
- var isInterface bool
- if named, ok := base.(*types.Named); ok {
- _, isInterface = named.Underlying().(*types.Interface)
- }
-
- if !isInterface && !IsNilable(base) && !t.NonNull {
- return types.NewPointer(base)
- }
-
- return base
-}
-
-func IsNilable(t types.Type) bool {
- if namedType, isNamed := t.(*types.Named); isNamed {
- return IsNilable(namedType.Underlying())
- }
- _, isPtr := t.(*types.Pointer)
- _, isMap := t.(*types.Map)
- _, isInterface := t.(*types.Interface)
- _, isSlice := t.(*types.Slice)
- _, isChan := t.(*types.Chan)
- return isPtr || isMap || isInterface || isSlice || isChan
-}
-
-func hasMethod(it types.Type, name string) bool {
- if ptr, isPtr := it.(*types.Pointer); isPtr {
- it = ptr.Elem()
- }
- namedType, ok := it.(*types.Named)
- if !ok {
- return false
- }
-
- for i := 0; i < namedType.NumMethods(); i++ {
- if namedType.Method(i).Name() == name {
- return true
- }
- }
- return false
-}
-
-func basicUnderlying(it types.Type) *types.Basic {
- if ptr, isPtr := it.(*types.Pointer); isPtr {
- it = ptr.Elem()
- }
- namedType, ok := it.(*types.Named)
- if !ok {
- return nil
- }
-
- if basic, ok := namedType.Underlying().(*types.Basic); ok {
- return basic
- }
-
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/config.go b/vendor/github.com/99designs/gqlgen/codegen/config/config.go
deleted file mode 100644
index 9affe6a6916..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/config/config.go
+++ /dev/null
@@ -1,648 +0,0 @@
-package config
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "regexp"
- "sort"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
- "github.com/vektah/gqlparser/v2"
- "github.com/vektah/gqlparser/v2/ast"
- "gopkg.in/yaml.v2"
-)
-
-type Config struct {
- SchemaFilename StringList `yaml:"schema,omitempty"`
- Exec ExecConfig `yaml:"exec"`
- Model PackageConfig `yaml:"model,omitempty"`
- Federation PackageConfig `yaml:"federation,omitempty"`
- Resolver ResolverConfig `yaml:"resolver,omitempty"`
- AutoBind []string `yaml:"autobind"`
- Models TypeMap `yaml:"models,omitempty"`
- StructTag string `yaml:"struct_tag,omitempty"`
- Directives map[string]DirectiveConfig `yaml:"directives,omitempty"`
- OmitSliceElementPointers bool `yaml:"omit_slice_element_pointers,omitempty"`
- SkipValidation bool `yaml:"skip_validation,omitempty"`
- SkipModTidy bool `yaml:"skip_mod_tidy,omitempty"`
- Sources []*ast.Source `yaml:"-"`
- Packages *code.Packages `yaml:"-"`
- Schema *ast.Schema `yaml:"-"`
-
- // Deprecated: use Federation instead. Will be removed next release
- Federated bool `yaml:"federated,omitempty"`
-}
-
-var cfgFilenames = []string{".gqlgen.yml", "gqlgen.yml", "gqlgen.yaml"}
-
-// DefaultConfig creates a copy of the default config
-func DefaultConfig() *Config {
- return &Config{
- SchemaFilename: StringList{"schema.graphql"},
- Model: PackageConfig{Filename: "models_gen.go"},
- Exec: ExecConfig{Filename: "generated.go"},
- Directives: map[string]DirectiveConfig{},
- Models: TypeMap{},
- }
-}
-
-// LoadDefaultConfig loads the default config so that it is ready to be used
-func LoadDefaultConfig() (*Config, error) {
- config := DefaultConfig()
-
- for _, filename := range config.SchemaFilename {
- filename = filepath.ToSlash(filename)
- var err error
- var schemaRaw []byte
- schemaRaw, err = ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to open schema: %w", err)
- }
-
- config.Sources = append(config.Sources, &ast.Source{Name: filename, Input: string(schemaRaw)})
- }
-
- return config, nil
-}
-
-// LoadConfigFromDefaultLocations looks for a config file in the current directory, and all parent directories
-// walking up the tree. The closest config file will be returned.
-func LoadConfigFromDefaultLocations() (*Config, error) {
- cfgFile, err := findCfg()
- if err != nil {
- return nil, err
- }
-
- err = os.Chdir(filepath.Dir(cfgFile))
- if err != nil {
- return nil, fmt.Errorf("unable to enter config dir: %w", err)
- }
- return LoadConfig(cfgFile)
-}
-
-var path2regex = strings.NewReplacer(
- `.`, `\.`,
- `*`, `.+`,
- `\`, `[\\/]`,
- `/`, `[\\/]`,
-)
-
-// LoadConfig reads the gqlgen.yml config file
-func LoadConfig(filename string) (*Config, error) {
- config := DefaultConfig()
-
- b, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to read config: %w", err)
- }
-
- if err := yaml.UnmarshalStrict(b, config); err != nil {
- return nil, fmt.Errorf("unable to parse config: %w", err)
- }
-
- if err := CompleteConfig(config); err != nil {
- return nil, err
- }
-
- return config, nil
-}
-
-// CompleteConfig fills in the schema and other values to a config loaded from
-// YAML.
-func CompleteConfig(config *Config) error {
- defaultDirectives := map[string]DirectiveConfig{
- "skip": {SkipRuntime: true},
- "include": {SkipRuntime: true},
- "deprecated": {SkipRuntime: true},
- "specifiedBy": {SkipRuntime: true},
- }
-
- for key, value := range defaultDirectives {
- if _, defined := config.Directives[key]; !defined {
- config.Directives[key] = value
- }
- }
-
- preGlobbing := config.SchemaFilename
- config.SchemaFilename = StringList{}
- for _, f := range preGlobbing {
- var matches []string
-
- // for ** we want to override default globbing patterns and walk all
- // subdirectories to match schema files.
- if strings.Contains(f, "**") {
- pathParts := strings.SplitN(f, "**", 2)
- rest := strings.TrimPrefix(strings.TrimPrefix(pathParts[1], `\`), `/`)
- // turn the rest of the glob into a regex, anchored only at the end because ** allows
- // for any number of dirs in between and walk will let us match against the full path name
- globRe := regexp.MustCompile(path2regex.Replace(rest) + `$`)
-
- if err := filepath.Walk(pathParts[0], func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- if globRe.MatchString(strings.TrimPrefix(path, pathParts[0])) {
- matches = append(matches, path)
- }
-
- return nil
- }); err != nil {
- return fmt.Errorf("failed to walk schema at root %s: %w", pathParts[0], err)
- }
- } else {
- var err error
- matches, err = filepath.Glob(f)
- if err != nil {
- return fmt.Errorf("failed to glob schema filename %s: %w", f, err)
- }
- }
-
- for _, m := range matches {
- if config.SchemaFilename.Has(m) {
- continue
- }
- config.SchemaFilename = append(config.SchemaFilename, m)
- }
- }
-
- for _, filename := range config.SchemaFilename {
- filename = filepath.ToSlash(filename)
- var err error
- var schemaRaw []byte
- schemaRaw, err = ioutil.ReadFile(filename)
- if err != nil {
- return fmt.Errorf("unable to open schema: %w", err)
- }
-
- config.Sources = append(config.Sources, &ast.Source{Name: filename, Input: string(schemaRaw)})
- }
- return nil
-}
-
-func (c *Config) Init() error {
- if c.Packages == nil {
- c.Packages = &code.Packages{}
- }
-
- if c.Schema == nil {
- if err := c.LoadSchema(); err != nil {
- return err
- }
- }
-
- err := c.injectTypesFromSchema()
- if err != nil {
- return err
- }
-
- err = c.autobind()
- if err != nil {
- return err
- }
-
- c.injectBuiltins()
- // prefetch all packages in one big packages.Load call
- c.Packages.LoadAll(c.packageList()...)
-
- // check everything is valid on the way out
- err = c.check()
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (c *Config) packageList() []string {
- pkgs := []string{
- "github.com/99designs/gqlgen/graphql",
- "github.com/99designs/gqlgen/graphql/introspection",
- }
- pkgs = append(pkgs, c.Models.ReferencedPackages()...)
- pkgs = append(pkgs, c.AutoBind...)
- return pkgs
-}
-
-func (c *Config) ReloadAllPackages() {
- c.Packages.ReloadAll(c.packageList()...)
-}
-
-func (c *Config) injectTypesFromSchema() error {
- c.Directives["goModel"] = DirectiveConfig{
- SkipRuntime: true,
- }
-
- c.Directives["goField"] = DirectiveConfig{
- SkipRuntime: true,
- }
-
- c.Directives["goTag"] = DirectiveConfig{
- SkipRuntime: true,
- }
-
- for _, schemaType := range c.Schema.Types {
- if schemaType == c.Schema.Query || schemaType == c.Schema.Mutation || schemaType == c.Schema.Subscription {
- continue
- }
-
- if bd := schemaType.Directives.ForName("goModel"); bd != nil {
- if ma := bd.Arguments.ForName("model"); ma != nil {
- if mv, err := ma.Value.Value(nil); err == nil {
- c.Models.Add(schemaType.Name, mv.(string))
- }
- }
- if ma := bd.Arguments.ForName("models"); ma != nil {
- if mvs, err := ma.Value.Value(nil); err == nil {
- for _, mv := range mvs.([]interface{}) {
- c.Models.Add(schemaType.Name, mv.(string))
- }
- }
- }
- }
-
- if schemaType.Kind == ast.Object || schemaType.Kind == ast.InputObject {
- for _, field := range schemaType.Fields {
- if fd := field.Directives.ForName("goField"); fd != nil {
- forceResolver := c.Models[schemaType.Name].Fields[field.Name].Resolver
- fieldName := c.Models[schemaType.Name].Fields[field.Name].FieldName
-
- if ra := fd.Arguments.ForName("forceResolver"); ra != nil {
- if fr, err := ra.Value.Value(nil); err == nil {
- forceResolver = fr.(bool)
- }
- }
-
- if na := fd.Arguments.ForName("name"); na != nil {
- if fr, err := na.Value.Value(nil); err == nil {
- fieldName = fr.(string)
- }
- }
-
- if c.Models[schemaType.Name].Fields == nil {
- c.Models[schemaType.Name] = TypeMapEntry{
- Model: c.Models[schemaType.Name].Model,
- Fields: map[string]TypeMapField{},
- }
- }
-
- c.Models[schemaType.Name].Fields[field.Name] = TypeMapField{
- FieldName: fieldName,
- Resolver: forceResolver,
- }
- }
- }
- }
- }
-
- return nil
-}
-
-type TypeMapEntry struct {
- Model StringList `yaml:"model"`
- Fields map[string]TypeMapField `yaml:"fields,omitempty"`
-}
-
-type TypeMapField struct {
- Resolver bool `yaml:"resolver"`
- FieldName string `yaml:"fieldName"`
- GeneratedMethod string `yaml:"-"`
-}
-
-type StringList []string
-
-func (a *StringList) UnmarshalYAML(unmarshal func(interface{}) error) error {
- var single string
- err := unmarshal(&single)
- if err == nil {
- *a = []string{single}
- return nil
- }
-
- var multi []string
- err = unmarshal(&multi)
- if err != nil {
- return err
- }
-
- *a = multi
- return nil
-}
-
-func (a StringList) Has(file string) bool {
- for _, existing := range a {
- if existing == file {
- return true
- }
- }
- return false
-}
-
-func (c *Config) check() error {
- if c.Models == nil {
- c.Models = TypeMap{}
- }
-
- type FilenamePackage struct {
- Filename string
- Package string
- Declaree string
- }
-
- fileList := map[string][]FilenamePackage{}
-
- if err := c.Models.Check(); err != nil {
- return fmt.Errorf("config.models: %w", err)
- }
- if err := c.Exec.Check(); err != nil {
- return fmt.Errorf("config.exec: %w", err)
- }
- fileList[c.Exec.ImportPath()] = append(fileList[c.Exec.ImportPath()], FilenamePackage{
- Filename: c.Exec.Filename,
- Package: c.Exec.Package,
- Declaree: "exec",
- })
-
- if c.Model.IsDefined() {
- if err := c.Model.Check(); err != nil {
- return fmt.Errorf("config.model: %w", err)
- }
- fileList[c.Model.ImportPath()] = append(fileList[c.Model.ImportPath()], FilenamePackage{
- Filename: c.Model.Filename,
- Package: c.Model.Package,
- Declaree: "model",
- })
- }
- if c.Resolver.IsDefined() {
- if err := c.Resolver.Check(); err != nil {
- return fmt.Errorf("config.resolver: %w", err)
- }
- fileList[c.Resolver.ImportPath()] = append(fileList[c.Resolver.ImportPath()], FilenamePackage{
- Filename: c.Resolver.Filename,
- Package: c.Resolver.Package,
- Declaree: "resolver",
- })
- }
- if c.Federation.IsDefined() {
- if err := c.Federation.Check(); err != nil {
- return fmt.Errorf("config.federation: %w", err)
- }
- fileList[c.Federation.ImportPath()] = append(fileList[c.Federation.ImportPath()], FilenamePackage{
- Filename: c.Federation.Filename,
- Package: c.Federation.Package,
- Declaree: "federation",
- })
- if c.Federation.ImportPath() != c.Exec.ImportPath() {
- return fmt.Errorf("federation and exec must be in the same package")
- }
- }
- if c.Federated {
- return fmt.Errorf("federated has been removed, instead use\nfederation:\n filename: path/to/federated.go")
- }
-
- for importPath, pkg := range fileList {
- for _, file1 := range pkg {
- for _, file2 := range pkg {
- if file1.Package != file2.Package {
- return fmt.Errorf("%s and %s define the same import path (%s) with different package names (%s vs %s)",
- file1.Declaree,
- file2.Declaree,
- importPath,
- file1.Package,
- file2.Package,
- )
- }
- }
- }
- }
-
- return nil
-}
-
-type TypeMap map[string]TypeMapEntry
-
-func (tm TypeMap) Exists(typeName string) bool {
- _, ok := tm[typeName]
- return ok
-}
-
-func (tm TypeMap) UserDefined(typeName string) bool {
- m, ok := tm[typeName]
- return ok && len(m.Model) > 0
-}
-
-func (tm TypeMap) Check() error {
- for typeName, entry := range tm {
- for _, model := range entry.Model {
- if strings.LastIndex(model, ".") < strings.LastIndex(model, "/") {
- return fmt.Errorf("model %s: invalid type specifier \"%s\" - you need to specify a struct to map to", typeName, entry.Model)
- }
- }
- }
- return nil
-}
-
-func (tm TypeMap) ReferencedPackages() []string {
- var pkgs []string
-
- for _, typ := range tm {
- for _, model := range typ.Model {
- if model == "map[string]interface{}" || model == "interface{}" {
- continue
- }
- pkg, _ := code.PkgAndType(model)
- if pkg == "" || inStrSlice(pkgs, pkg) {
- continue
- }
- pkgs = append(pkgs, code.QualifyPackagePath(pkg))
- }
- }
-
- sort.Slice(pkgs, func(i, j int) bool {
- return pkgs[i] > pkgs[j]
- })
- return pkgs
-}
-
-func (tm TypeMap) Add(name string, goType string) {
- modelCfg := tm[name]
- modelCfg.Model = append(modelCfg.Model, goType)
- tm[name] = modelCfg
-}
-
-type DirectiveConfig struct {
- SkipRuntime bool `yaml:"skip_runtime"`
-}
-
-func inStrSlice(haystack []string, needle string) bool {
- for _, v := range haystack {
- if needle == v {
- return true
- }
- }
-
- return false
-}
-
-// findCfg searches for the config file in this directory and all parents up the tree
-// looking for the closest match
-func findCfg() (string, error) {
- dir, err := os.Getwd()
- if err != nil {
- return "", fmt.Errorf("unable to get working dir to findCfg: %w", err)
- }
-
- cfg := findCfgInDir(dir)
-
- for cfg == "" && dir != filepath.Dir(dir) {
- dir = filepath.Dir(dir)
- cfg = findCfgInDir(dir)
- }
-
- if cfg == "" {
- return "", os.ErrNotExist
- }
-
- return cfg, nil
-}
-
-func findCfgInDir(dir string) string {
- for _, cfgName := range cfgFilenames {
- path := filepath.Join(dir, cfgName)
- if _, err := os.Stat(path); err == nil {
- return path
- }
- }
- return ""
-}
-
-func (c *Config) autobind() error {
- if len(c.AutoBind) == 0 {
- return nil
- }
-
- ps := c.Packages.LoadAll(c.AutoBind...)
-
- for _, t := range c.Schema.Types {
- if c.Models.UserDefined(t.Name) {
- continue
- }
-
- for i, p := range ps {
- if p == nil || p.Module == nil {
- return fmt.Errorf("unable to load %s - make sure you're using an import path to a package that exists", c.AutoBind[i])
- }
- if t := p.Types.Scope().Lookup(t.Name); t != nil {
- c.Models.Add(t.Name(), t.Pkg().Path()+"."+t.Name())
- break
- }
- }
- }
-
- for i, t := range c.Models {
- for j, m := range t.Model {
- pkg, typename := code.PkgAndType(m)
-
- // skip anything that looks like an import path
- if strings.Contains(pkg, "/") {
- continue
- }
-
- for _, p := range ps {
- if p.Name != pkg {
- continue
- }
- if t := p.Types.Scope().Lookup(typename); t != nil {
- c.Models[i].Model[j] = t.Pkg().Path() + "." + t.Name()
- break
- }
- }
- }
- }
-
- return nil
-}
-
-func (c *Config) injectBuiltins() {
- builtins := TypeMap{
- "__Directive": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.Directive"}},
- "__DirectiveLocation": {Model: StringList{"github.com/99designs/gqlgen/graphql.String"}},
- "__Type": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.Type"}},
- "__TypeKind": {Model: StringList{"github.com/99designs/gqlgen/graphql.String"}},
- "__Field": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.Field"}},
- "__EnumValue": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.EnumValue"}},
- "__InputValue": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.InputValue"}},
- "__Schema": {Model: StringList{"github.com/99designs/gqlgen/graphql/introspection.Schema"}},
- "Float": {Model: StringList{"github.com/99designs/gqlgen/graphql.FloatContext"}},
- "String": {Model: StringList{"github.com/99designs/gqlgen/graphql.String"}},
- "Boolean": {Model: StringList{"github.com/99designs/gqlgen/graphql.Boolean"}},
- "Int": {Model: StringList{
- "github.com/99designs/gqlgen/graphql.Int",
- "github.com/99designs/gqlgen/graphql.Int32",
- "github.com/99designs/gqlgen/graphql.Int64",
- }},
- "ID": {
- Model: StringList{
- "github.com/99designs/gqlgen/graphql.ID",
- "github.com/99designs/gqlgen/graphql.IntID",
- },
- },
- }
-
- for typeName, entry := range builtins {
- if !c.Models.Exists(typeName) {
- c.Models[typeName] = entry
- }
- }
-
- // These are additional types that are injected if defined in the schema as scalars.
- extraBuiltins := TypeMap{
- "Time": {Model: StringList{"github.com/99designs/gqlgen/graphql.Time"}},
- "Map": {Model: StringList{"github.com/99designs/gqlgen/graphql.Map"}},
- "Upload": {Model: StringList{"github.com/99designs/gqlgen/graphql.Upload"}},
- "Any": {Model: StringList{"github.com/99designs/gqlgen/graphql.Any"}},
- }
-
- for typeName, entry := range extraBuiltins {
- if t, ok := c.Schema.Types[typeName]; !c.Models.Exists(typeName) && ok && t.Kind == ast.Scalar {
- c.Models[typeName] = entry
- }
- }
-}
-
-func (c *Config) LoadSchema() error {
- if c.Packages != nil {
- c.Packages = &code.Packages{}
- }
-
- if err := c.check(); err != nil {
- return err
- }
-
- schema, err := gqlparser.LoadSchema(c.Sources...)
- if err != nil {
- return err
- }
-
- if schema.Query == nil {
- schema.Query = &ast.Definition{
- Kind: ast.Object,
- Name: "Query",
- }
- schema.Types["Query"] = schema.Query
- }
-
- c.Schema = schema
- return nil
-}
-
-func abs(path string) string {
- absPath, err := filepath.Abs(path)
- if err != nil {
- panic(err)
- }
- return filepath.ToSlash(absPath)
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/exec.go b/vendor/github.com/99designs/gqlgen/codegen/config/exec.go
deleted file mode 100644
index fe1dccd21da..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/config/exec.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package config
-
-import (
- "fmt"
- "go/types"
- "path/filepath"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
-)
-
-type ExecConfig struct {
- Package string `yaml:"package,omitempty"`
- Layout ExecLayout `yaml:"layout,omitempty"` // Default: single-file
-
- // Only for single-file layout:
- Filename string `yaml:"filename,omitempty"`
-
- // Only for follow-schema layout:
- FilenameTemplate string `yaml:"filename_template,omitempty"` // String template with {name} as placeholder for base name.
- DirName string `yaml:"dir"`
-}
-
-type ExecLayout string
-
-var (
- // Write all generated code to a single file.
- ExecLayoutSingleFile ExecLayout = "single-file"
- // Write generated code to a directory, generating one Go source file for each GraphQL schema file.
- ExecLayoutFollowSchema ExecLayout = "follow-schema"
-)
-
-func (r *ExecConfig) Check() error {
- if r.Layout == "" {
- r.Layout = ExecLayoutSingleFile
- }
-
- switch r.Layout {
- case ExecLayoutSingleFile:
- if r.Filename == "" {
- return fmt.Errorf("filename must be specified when using single-file layout")
- }
- if !strings.HasSuffix(r.Filename, ".go") {
- return fmt.Errorf("filename should be path to a go source file when using single-file layout")
- }
- r.Filename = abs(r.Filename)
- case ExecLayoutFollowSchema:
- if r.DirName == "" {
- return fmt.Errorf("dir must be specified when using follow-schema layout")
- }
- r.DirName = abs(r.DirName)
- default:
- return fmt.Errorf("invalid layout %s", r.Layout)
- }
-
- if strings.ContainsAny(r.Package, "./\\") {
- return fmt.Errorf("package should be the output package name only, do not include the output filename")
- }
-
- if r.Package == "" && r.Dir() != "" {
- r.Package = code.NameForDir(r.Dir())
- }
-
- return nil
-}
-
-func (r *ExecConfig) ImportPath() string {
- if r.Dir() == "" {
- return ""
- }
- return code.ImportPathForDir(r.Dir())
-}
-
-func (r *ExecConfig) Dir() string {
- switch r.Layout {
- case ExecLayoutSingleFile:
- if r.Filename == "" {
- return ""
- }
- return filepath.Dir(r.Filename)
- case ExecLayoutFollowSchema:
- return abs(r.DirName)
- default:
- panic("invalid layout " + r.Layout)
- }
-}
-
-func (r *ExecConfig) Pkg() *types.Package {
- if r.Dir() == "" {
- return nil
- }
- return types.NewPackage(r.ImportPath(), r.Package)
-}
-
-func (r *ExecConfig) IsDefined() bool {
- return r.Filename != "" || r.DirName != ""
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/package.go b/vendor/github.com/99designs/gqlgen/codegen/config/package.go
deleted file mode 100644
index a9645938190..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/config/package.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package config
-
-import (
- "fmt"
- "go/types"
- "path/filepath"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
-)
-
-type PackageConfig struct {
- Filename string `yaml:"filename,omitempty"`
- Package string `yaml:"package,omitempty"`
-}
-
-func (c *PackageConfig) ImportPath() string {
- if !c.IsDefined() {
- return ""
- }
- return code.ImportPathForDir(c.Dir())
-}
-
-func (c *PackageConfig) Dir() string {
- if !c.IsDefined() {
- return ""
- }
- return filepath.Dir(c.Filename)
-}
-
-func (c *PackageConfig) Pkg() *types.Package {
- if !c.IsDefined() {
- return nil
- }
- return types.NewPackage(c.ImportPath(), c.Package)
-}
-
-func (c *PackageConfig) IsDefined() bool {
- return c.Filename != ""
-}
-
-func (c *PackageConfig) Check() error {
- if strings.ContainsAny(c.Package, "./\\") {
- return fmt.Errorf("package should be the output package name only, do not include the output filename")
- }
- if c.Filename == "" {
- return fmt.Errorf("filename must be specified")
- }
- if !strings.HasSuffix(c.Filename, ".go") {
- return fmt.Errorf("filename should be path to a go source file")
- }
-
- c.Filename = abs(c.Filename)
-
- // If Package is not set, first attempt to load the package at the output dir. If that fails
- // fallback to just the base dir name of the output filename.
- if c.Package == "" {
- c.Package = code.NameForDir(c.Dir())
- }
-
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/resolver.go b/vendor/github.com/99designs/gqlgen/codegen/config/resolver.go
deleted file mode 100644
index cd03f188729..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/config/resolver.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package config
-
-import (
- "fmt"
- "go/types"
- "path/filepath"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
-)
-
-type ResolverConfig struct {
- Filename string `yaml:"filename,omitempty"`
- FilenameTemplate string `yaml:"filename_template,omitempty"`
- Package string `yaml:"package,omitempty"`
- Type string `yaml:"type,omitempty"`
- Layout ResolverLayout `yaml:"layout,omitempty"`
- DirName string `yaml:"dir"`
-}
-
-type ResolverLayout string
-
-var (
- LayoutSingleFile ResolverLayout = "single-file"
- LayoutFollowSchema ResolverLayout = "follow-schema"
-)
-
-func (r *ResolverConfig) Check() error {
- if r.Layout == "" {
- r.Layout = LayoutSingleFile
- }
- if r.Type == "" {
- r.Type = "Resolver"
- }
-
- switch r.Layout {
- case LayoutSingleFile:
- if r.Filename == "" {
- return fmt.Errorf("filename must be specified with layout=%s", r.Layout)
- }
- if !strings.HasSuffix(r.Filename, ".go") {
- return fmt.Errorf("filename should be path to a go source file with layout=%s", r.Layout)
- }
- r.Filename = abs(r.Filename)
- case LayoutFollowSchema:
- if r.DirName == "" {
- return fmt.Errorf("dirname must be specified with layout=%s", r.Layout)
- }
- r.DirName = abs(r.DirName)
- if r.Filename == "" {
- r.Filename = filepath.Join(r.DirName, "resolver.go")
- } else {
- r.Filename = abs(r.Filename)
- }
- default:
- return fmt.Errorf("invalid layout %s. must be %s or %s", r.Layout, LayoutSingleFile, LayoutFollowSchema)
- }
-
- if strings.ContainsAny(r.Package, "./\\") {
- return fmt.Errorf("package should be the output package name only, do not include the output filename")
- }
-
- if r.Package == "" && r.Dir() != "" {
- r.Package = code.NameForDir(r.Dir())
- }
-
- return nil
-}
-
-func (r *ResolverConfig) ImportPath() string {
- if r.Dir() == "" {
- return ""
- }
- return code.ImportPathForDir(r.Dir())
-}
-
-func (r *ResolverConfig) Dir() string {
- switch r.Layout {
- case LayoutSingleFile:
- if r.Filename == "" {
- return ""
- }
- return filepath.Dir(r.Filename)
- case LayoutFollowSchema:
- return r.DirName
- default:
- panic("invalid layout " + r.Layout)
- }
-}
-
-func (r *ResolverConfig) Pkg() *types.Package {
- if r.Dir() == "" {
- return nil
- }
- return types.NewPackage(r.ImportPath(), r.Package)
-}
-
-func (r *ResolverConfig) IsDefined() bool {
- return r.Filename != "" || r.DirName != ""
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/data.go b/vendor/github.com/99designs/gqlgen/codegen/data.go
deleted file mode 100644
index e12fb104730..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/data.go
+++ /dev/null
@@ -1,185 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "sort"
-
- "github.com/vektah/gqlparser/v2/ast"
-
- "github.com/99designs/gqlgen/codegen/config"
-)
-
-// Data is a unified model of the code to be generated. Plugins may modify this structure to do things like implement
-// resolvers or directives automatically (eg grpc, validation)
-type Data struct {
- Config *config.Config
- Schema *ast.Schema
- // If a schema is broken up into multiple Data instance, each representing part of the schema,
- // AllDirectives should contain the directives for the entire schema. Directives() can
- // then be used to get the directives that were defined in this Data instance's sources.
- // If a single Data instance is used for the entire schema, AllDirectives and Directives()
- // will be identical.
- // AllDirectives should rarely be used directly.
- AllDirectives DirectiveList
- Objects Objects
- Inputs Objects
- Interfaces map[string]*Interface
- ReferencedTypes map[string]*config.TypeReference
- ComplexityRoots map[string]*Object
-
- QueryRoot *Object
- MutationRoot *Object
- SubscriptionRoot *Object
-}
-
-type builder struct {
- Config *config.Config
- Schema *ast.Schema
- Binder *config.Binder
- Directives map[string]*Directive
-}
-
-// Get only the directives which are defined in the config's sources.
-func (d *Data) Directives() DirectiveList {
- res := DirectiveList{}
- for k, directive := range d.AllDirectives {
- for _, s := range d.Config.Sources {
- if directive.Position.Src.Name == s.Name {
- res[k] = directive
- break
- }
- }
- }
- return res
-}
-
-func BuildData(cfg *config.Config) (*Data, error) {
- // We reload all packages to allow packages to be compared correctly.
- cfg.ReloadAllPackages()
-
- b := builder{
- Config: cfg,
- Schema: cfg.Schema,
- }
-
- b.Binder = b.Config.NewBinder()
-
- var err error
- b.Directives, err = b.buildDirectives()
- if err != nil {
- return nil, err
- }
-
- dataDirectives := make(map[string]*Directive)
- for name, d := range b.Directives {
- if !d.Builtin {
- dataDirectives[name] = d
- }
- }
-
- s := Data{
- Config: cfg,
- AllDirectives: dataDirectives,
- Schema: b.Schema,
- Interfaces: map[string]*Interface{},
- }
-
- for _, schemaType := range b.Schema.Types {
- switch schemaType.Kind {
- case ast.Object:
- obj, err := b.buildObject(schemaType)
- if err != nil {
- return nil, fmt.Errorf("unable to build object definition: %w", err)
- }
-
- s.Objects = append(s.Objects, obj)
- case ast.InputObject:
- input, err := b.buildObject(schemaType)
- if err != nil {
- return nil, fmt.Errorf("unable to build input definition: %w", err)
- }
-
- s.Inputs = append(s.Inputs, input)
-
- case ast.Union, ast.Interface:
- s.Interfaces[schemaType.Name], err = b.buildInterface(schemaType)
- if err != nil {
- return nil, fmt.Errorf("unable to bind to interface: %w", err)
- }
- }
- }
-
- if s.Schema.Query != nil {
- s.QueryRoot = s.Objects.ByName(s.Schema.Query.Name)
- } else {
- return nil, fmt.Errorf("query entry point missing")
- }
-
- if s.Schema.Mutation != nil {
- s.MutationRoot = s.Objects.ByName(s.Schema.Mutation.Name)
- }
-
- if s.Schema.Subscription != nil {
- s.SubscriptionRoot = s.Objects.ByName(s.Schema.Subscription.Name)
- }
-
- if err := b.injectIntrospectionRoots(&s); err != nil {
- return nil, err
- }
-
- s.ReferencedTypes = b.buildTypes()
-
- sort.Slice(s.Objects, func(i, j int) bool {
- return s.Objects[i].Definition.Name < s.Objects[j].Definition.Name
- })
-
- sort.Slice(s.Inputs, func(i, j int) bool {
- return s.Inputs[i].Definition.Name < s.Inputs[j].Definition.Name
- })
-
- if b.Binder.SawInvalid {
- // if we have a syntax error, show it
- err := cfg.Packages.Errors()
- if len(err) > 0 {
- return nil, err
- }
-
- // otherwise show a generic error message
- return nil, fmt.Errorf("invalid types were encountered while traversing the go source code, this probably means the invalid code generated isnt correct. add try adding -v to debug")
- }
-
- return &s, nil
-}
-
-func (b *builder) injectIntrospectionRoots(s *Data) error {
- obj := s.Objects.ByName(b.Schema.Query.Name)
- if obj == nil {
- return fmt.Errorf("root query type must be defined")
- }
-
- __type, err := b.buildField(obj, &ast.FieldDefinition{
- Name: "__type",
- Type: ast.NamedType("__Type", nil),
- Arguments: []*ast.ArgumentDefinition{
- {
- Name: "name",
- Type: ast.NonNullNamedType("String", nil),
- },
- },
- })
- if err != nil {
- return err
- }
-
- __schema, err := b.buildField(obj, &ast.FieldDefinition{
- Name: "__schema",
- Type: ast.NamedType("__Schema", nil),
- })
- if err != nil {
- return err
- }
-
- obj.Fields = append(obj.Fields, __type, __schema)
-
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/directive.go b/vendor/github.com/99designs/gqlgen/codegen/directive.go
deleted file mode 100644
index 973061129a2..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/directive.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "strconv"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type DirectiveList map[string]*Directive
-
-// LocationDirectives filter directives by location
-func (dl DirectiveList) LocationDirectives(location string) DirectiveList {
- return locationDirectives(dl, ast.DirectiveLocation(location))
-}
-
-type Directive struct {
- *ast.DirectiveDefinition
- Name string
- Args []*FieldArgument
- Builtin bool
-}
-
-// IsLocation check location directive
-func (d *Directive) IsLocation(location ...ast.DirectiveLocation) bool {
- for _, l := range d.Locations {
- for _, a := range location {
- if l == a {
- return true
- }
- }
- }
-
- return false
-}
-
-func locationDirectives(directives DirectiveList, location ...ast.DirectiveLocation) map[string]*Directive {
- mDirectives := make(map[string]*Directive)
- for name, d := range directives {
- if d.IsLocation(location...) {
- mDirectives[name] = d
- }
- }
- return mDirectives
-}
-
-func (b *builder) buildDirectives() (map[string]*Directive, error) {
- directives := make(map[string]*Directive, len(b.Schema.Directives))
-
- for name, dir := range b.Schema.Directives {
- if _, ok := directives[name]; ok {
- return nil, fmt.Errorf("directive with name %s already exists", name)
- }
-
- var args []*FieldArgument
- for _, arg := range dir.Arguments {
- tr, err := b.Binder.TypeReference(arg.Type, nil)
- if err != nil {
- return nil, err
- }
-
- newArg := &FieldArgument{
- ArgumentDefinition: arg,
- TypeReference: tr,
- VarName: templates.ToGoPrivate(arg.Name),
- }
-
- if arg.DefaultValue != nil {
- var err error
- newArg.Default, err = arg.DefaultValue.Value(nil)
- if err != nil {
- return nil, fmt.Errorf("default value for directive argument %s(%s) is not valid: %w", dir.Name, arg.Name, err)
- }
- }
- args = append(args, newArg)
- }
-
- directives[name] = &Directive{
- DirectiveDefinition: dir,
- Name: name,
- Args: args,
- Builtin: b.Config.Directives[name].SkipRuntime,
- }
- }
-
- return directives, nil
-}
-
-func (b *builder) getDirectives(list ast.DirectiveList) ([]*Directive, error) {
- dirs := make([]*Directive, len(list))
- for i, d := range list {
- argValues := make(map[string]interface{}, len(d.Arguments))
- for _, da := range d.Arguments {
- val, err := da.Value.Value(nil)
- if err != nil {
- return nil, err
- }
- argValues[da.Name] = val
- }
- def, ok := b.Directives[d.Name]
- if !ok {
- return nil, fmt.Errorf("directive %s not found", d.Name)
- }
-
- var args []*FieldArgument
- for _, a := range def.Args {
- value := a.Default
- if argValue, ok := argValues[a.Name]; ok {
- value = argValue
- }
- args = append(args, &FieldArgument{
- ArgumentDefinition: a.ArgumentDefinition,
- Value: value,
- VarName: a.VarName,
- TypeReference: a.TypeReference,
- })
- }
- dirs[i] = &Directive{
- Name: d.Name,
- Args: args,
- DirectiveDefinition: list[i].Definition,
- Builtin: b.Config.Directives[d.Name].SkipRuntime,
- }
-
- }
-
- return dirs, nil
-}
-
-func (d *Directive) ArgsFunc() string {
- if len(d.Args) == 0 {
- return ""
- }
-
- return "dir_" + d.Name + "_args"
-}
-
-func (d *Directive) CallArgs() string {
- args := []string{"ctx", "obj", "n"}
-
- for _, arg := range d.Args {
- args = append(args, "args["+strconv.Quote(arg.Name)+"].("+templates.CurrentImports.LookupType(arg.TypeReference.GO)+")")
- }
-
- return strings.Join(args, ", ")
-}
-
-func (d *Directive) ResolveArgs(obj string, next int) string {
- args := []string{"ctx", obj, fmt.Sprintf("directive%d", next)}
-
- for _, arg := range d.Args {
- dArg := arg.VarName
- if arg.Value == nil && arg.Default == nil {
- dArg = "nil"
- }
-
- args = append(args, dArg)
- }
-
- return strings.Join(args, ", ")
-}
-
-func (d *Directive) Declaration() string {
- res := ucFirst(d.Name) + " func(ctx context.Context, obj interface{}, next graphql.Resolver"
-
- for _, arg := range d.Args {
- res += fmt.Sprintf(", %s %s", templates.ToGoPrivate(arg.Name), templates.CurrentImports.LookupType(arg.TypeReference.GO))
- }
-
- res += ") (res interface{}, err error)"
- return res
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl b/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
deleted file mode 100644
index e6d2455f6c8..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
+++ /dev/null
@@ -1,149 +0,0 @@
-{{ define "implDirectives" }}{{ $in := .DirectiveObjName }}
- {{- range $i, $directive := .ImplDirectives -}}
- directive{{add $i 1}} := func(ctx context.Context) (interface{}, error) {
- {{- range $arg := $directive.Args }}
- {{- if notNil "Value" $arg }}
- {{ $arg.VarName }}, err := ec.{{ $arg.TypeReference.UnmarshalFunc }}(ctx, {{ $arg.Value | dump }})
- if err != nil{
- return nil, err
- }
- {{- else if notNil "Default" $arg }}
- {{ $arg.VarName }}, err := ec.{{ $arg.TypeReference.UnmarshalFunc }}(ctx, {{ $arg.Default | dump }})
- if err != nil{
- return nil, err
- }
- {{- end }}
- {{- end }}
- if ec.directives.{{$directive.Name|ucFirst}} == nil {
- return nil, errors.New("directive {{$directive.Name}} is not implemented")
- }
- return ec.directives.{{$directive.Name|ucFirst}}({{$directive.ResolveArgs $in $i }})
- }
- {{ end -}}
-{{ end }}
-
-{{define "queryDirectives"}}
- for _, d := range obj.Directives {
- switch d.Name {
- {{- range $directive := . }}
- case "{{$directive.Name}}":
- {{- if $directive.Args }}
- rawArgs := d.ArgumentMap(ec.Variables)
- args, err := ec.{{ $directive.ArgsFunc }}(ctx,rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- {{- end }}
- n := next
- next = func(ctx context.Context) (interface{}, error) {
- if ec.directives.{{$directive.Name|ucFirst}} == nil {
- return nil, errors.New("directive {{$directive.Name}} is not implemented")
- }
- return ec.directives.{{$directive.Name|ucFirst}}({{$directive.CallArgs}})
- }
- {{- end }}
- }
- }
- tmp, err := next(ctx)
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if data, ok := tmp.(graphql.Marshaler); ok {
- return data
- }
- ec.Errorf(ctx, `unexpected type %T from directive, should be graphql.Marshaler`, tmp)
- return graphql.Null
-{{end}}
-
-{{ if .Directives.LocationDirectives "QUERY" }}
-func (ec *executionContext) _queryMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) graphql.Marshaler {
- {{ template "queryDirectives" .Directives.LocationDirectives "QUERY" }}
-}
-{{ end }}
-
-{{ if .Directives.LocationDirectives "MUTATION" }}
-func (ec *executionContext) _mutationMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) graphql.Marshaler {
- {{ template "queryDirectives" .Directives.LocationDirectives "MUTATION" }}
-}
-{{ end }}
-
-{{ if .Directives.LocationDirectives "SUBSCRIPTION" }}
-func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) func() graphql.Marshaler {
- for _, d := range obj.Directives {
- switch d.Name {
- {{- range $directive := .Directives.LocationDirectives "SUBSCRIPTION" }}
- case "{{$directive.Name}}":
- {{- if $directive.Args }}
- rawArgs := d.ArgumentMap(ec.Variables)
- args, err := ec.{{ $directive.ArgsFunc }}(ctx,rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return func() graphql.Marshaler {
- return graphql.Null
- }
- }
- {{- end }}
- n := next
- next = func(ctx context.Context) (interface{}, error) {
- if ec.directives.{{$directive.Name|ucFirst}} == nil {
- return nil, errors.New("directive {{$directive.Name}} is not implemented")
- }
- return ec.directives.{{$directive.Name|ucFirst}}({{$directive.CallArgs}})
- }
- {{- end }}
- }
- }
- tmp, err := next(ctx)
- if err != nil {
- ec.Error(ctx, err)
- return func() graphql.Marshaler {
- return graphql.Null
- }
- }
- if data, ok := tmp.(func() graphql.Marshaler); ok {
- return data
- }
- ec.Errorf(ctx, `unexpected type %T from directive, should be graphql.Marshaler`, tmp)
- return func() graphql.Marshaler {
- return graphql.Null
- }
-}
-{{ end }}
-
-{{ if .Directives.LocationDirectives "FIELD" }}
- func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} {
- {{- if .Directives.LocationDirectives "FIELD" }}
- fc := graphql.GetFieldContext(ctx)
- for _, d := range fc.Field.Directives {
- switch d.Name {
- {{- range $directive := .Directives.LocationDirectives "FIELD" }}
- case "{{$directive.Name}}":
- {{- if $directive.Args }}
- rawArgs := d.ArgumentMap(ec.Variables)
- args, err := ec.{{ $directive.ArgsFunc }}(ctx,rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return nil
- }
- {{- end }}
- n := next
- next = func(ctx context.Context) (interface{}, error) {
- if ec.directives.{{$directive.Name|ucFirst}} == nil {
- return nil, errors.New("directive {{$directive.Name}} is not implemented")
- }
- return ec.directives.{{$directive.Name|ucFirst}}({{$directive.CallArgs}})
- }
- {{- end }}
- }
- }
- {{- end }}
- res, err := ec.ResolverMiddleware(ctx, next)
- if err != nil {
- ec.Error(ctx, err)
- return nil
- }
- return res
- }
-{{ end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/field.go b/vendor/github.com/99designs/gqlgen/codegen/field.go
deleted file mode 100644
index 867215e5b20..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/field.go
+++ /dev/null
@@ -1,556 +0,0 @@
-package codegen
-
-import (
- "errors"
- "fmt"
- "go/types"
- "log"
- "reflect"
- "strconv"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Field struct {
- *ast.FieldDefinition
-
- TypeReference *config.TypeReference
- GoFieldType GoFieldType // The field type in go, if any
- GoReceiverName string // The name of method & var receiver in go, if any
- GoFieldName string // The name of the method or var in go, if any
- IsResolver bool // Does this field need a resolver
- Args []*FieldArgument // A list of arguments to be passed to this field
- MethodHasContext bool // If this is bound to a go method, does the method also take a context
- NoErr bool // If this is bound to a go method, does that method have an error as the second argument
- VOkFunc bool // If this is bound to a go method, is it of shape (interface{}, bool)
- Object *Object // A link back to the parent object
- Default interface{} // The default value
- Stream bool // does this field return a channel?
- Directives []*Directive
-}
-
-func (b *builder) buildField(obj *Object, field *ast.FieldDefinition) (*Field, error) {
- dirs, err := b.getDirectives(field.Directives)
- if err != nil {
- return nil, err
- }
-
- f := Field{
- FieldDefinition: field,
- Object: obj,
- Directives: dirs,
- GoFieldName: templates.ToGo(field.Name),
- GoFieldType: GoFieldVariable,
- GoReceiverName: "obj",
- }
-
- if field.DefaultValue != nil {
- var err error
- f.Default, err = field.DefaultValue.Value(nil)
- if err != nil {
- return nil, fmt.Errorf("default value %s is not valid: %w", field.Name, err)
- }
- }
-
- for _, arg := range field.Arguments {
- newArg, err := b.buildArg(obj, arg)
- if err != nil {
- return nil, err
- }
- f.Args = append(f.Args, newArg)
- }
-
- if err = b.bindField(obj, &f); err != nil {
- f.IsResolver = true
- if errors.Is(err, config.ErrTypeNotFound) {
- return nil, err
- }
- log.Println(err.Error())
- }
-
- if f.IsResolver && !f.TypeReference.IsPtr() && f.TypeReference.IsStruct() {
- f.TypeReference = b.Binder.PointerTo(f.TypeReference)
- }
-
- return &f, nil
-}
-
-func (b *builder) bindField(obj *Object, f *Field) (errret error) {
- defer func() {
- if f.TypeReference == nil {
- tr, err := b.Binder.TypeReference(f.Type, nil)
- if err != nil {
- errret = err
- }
- f.TypeReference = tr
- }
- if f.TypeReference != nil {
- dirs, err := b.getDirectives(f.TypeReference.Definition.Directives)
- if err != nil {
- errret = err
- }
- for _, dir := range obj.Directives {
- if dir.IsLocation(ast.LocationInputObject) {
- dirs = append(dirs, dir)
- }
- }
- f.Directives = append(dirs, f.Directives...)
- }
- }()
-
- f.Stream = obj.Stream
-
- switch {
- case f.Name == "__schema":
- f.GoFieldType = GoFieldMethod
- f.GoReceiverName = "ec"
- f.GoFieldName = "introspectSchema"
- return nil
- case f.Name == "__type":
- f.GoFieldType = GoFieldMethod
- f.GoReceiverName = "ec"
- f.GoFieldName = "introspectType"
- return nil
- case f.Name == "_entities":
- f.GoFieldType = GoFieldMethod
- f.GoReceiverName = "ec"
- f.GoFieldName = "__resolve_entities"
- f.MethodHasContext = true
- f.NoErr = true
- return nil
- case f.Name == "_service":
- f.GoFieldType = GoFieldMethod
- f.GoReceiverName = "ec"
- f.GoFieldName = "__resolve__service"
- f.MethodHasContext = true
- return nil
- case obj.Root:
- f.IsResolver = true
- return nil
- case b.Config.Models[obj.Name].Fields[f.Name].Resolver:
- f.IsResolver = true
- return nil
- case obj.Type == config.MapType:
- f.GoFieldType = GoFieldMap
- return nil
- case b.Config.Models[obj.Name].Fields[f.Name].FieldName != "":
- f.GoFieldName = b.Config.Models[obj.Name].Fields[f.Name].FieldName
- }
-
- target, err := b.findBindTarget(obj.Type.(*types.Named), f.GoFieldName)
- if err != nil {
- return err
- }
-
- pos := b.Binder.ObjectPosition(target)
-
- switch target := target.(type) {
- case nil:
- objPos := b.Binder.TypePosition(obj.Type)
- return fmt.Errorf(
- "%s:%d adding resolver method for %s.%s, nothing matched",
- objPos.Filename,
- objPos.Line,
- obj.Name,
- f.Name,
- )
-
- case *types.Func:
- sig := target.Type().(*types.Signature)
- if sig.Results().Len() == 1 {
- f.NoErr = true
- } else if s := sig.Results(); s.Len() == 2 && s.At(1).Type().String() == "bool" {
- f.VOkFunc = true
- } else if sig.Results().Len() != 2 {
- return fmt.Errorf("method has wrong number of args")
- }
- params := sig.Params()
- // If the first argument is the context, remove it from the comparison and set
- // the MethodHasContext flag so that the context will be passed to this model's method
- if params.Len() > 0 && params.At(0).Type().String() == "context.Context" {
- f.MethodHasContext = true
- vars := make([]*types.Var, params.Len()-1)
- for i := 1; i < params.Len(); i++ {
- vars[i-1] = params.At(i)
- }
- params = types.NewTuple(vars...)
- }
-
- // Try to match target function's arguments with GraphQL field arguments
- newArgs, err := b.bindArgs(f, params)
- if err != nil {
- return fmt.Errorf("%s:%d: %w", pos.Filename, pos.Line, err)
- }
-
- // Try to match target function's return types with GraphQL field return type
- result := sig.Results().At(0)
- tr, err := b.Binder.TypeReference(f.Type, result.Type())
- if err != nil {
- return err
- }
-
- // success, args and return type match. Bind to method
- f.GoFieldType = GoFieldMethod
- f.GoReceiverName = "obj"
- f.GoFieldName = target.Name()
- f.Args = newArgs
- f.TypeReference = tr
-
- return nil
-
- case *types.Var:
- tr, err := b.Binder.TypeReference(f.Type, target.Type())
- if err != nil {
- return err
- }
-
- // success, bind to var
- f.GoFieldType = GoFieldVariable
- f.GoReceiverName = "obj"
- f.GoFieldName = target.Name()
- f.TypeReference = tr
-
- return nil
- default:
- panic(fmt.Errorf("unknown bind target %T for %s", target, f.Name))
- }
-}
-
-// findBindTarget attempts to match the name to a field or method on a Type
-// with the following priorites:
-// 1. Any Fields with a struct tag (see config.StructTag). Errors if more than one match is found
-// 2. Any method or field with a matching name. Errors if more than one match is found
-// 3. Same logic again for embedded fields
-func (b *builder) findBindTarget(t types.Type, name string) (types.Object, error) {
- // NOTE: a struct tag will override both methods and fields
- // Bind to struct tag
- found, err := b.findBindStructTagTarget(t, name)
- if found != nil || err != nil {
- return found, err
- }
-
- // Search for a method to bind to
- foundMethod, err := b.findBindMethodTarget(t, name)
- if err != nil {
- return nil, err
- }
-
- // Search for a field to bind to
- foundField, err := b.findBindFieldTarget(t, name)
- if err != nil {
- return nil, err
- }
-
- switch {
- case foundField == nil && foundMethod != nil:
- // Bind to method
- return foundMethod, nil
- case foundField != nil && foundMethod == nil:
- // Bind to field
- return foundField, nil
- case foundField != nil && foundMethod != nil:
- // Error
- return nil, fmt.Errorf("found more than one way to bind for %s", name)
- }
-
- // Search embeds
- return b.findBindEmbedsTarget(t, name)
-}
-
-func (b *builder) findBindStructTagTarget(in types.Type, name string) (types.Object, error) {
- if b.Config.StructTag == "" {
- return nil, nil
- }
-
- switch t := in.(type) {
- case *types.Named:
- return b.findBindStructTagTarget(t.Underlying(), name)
- case *types.Struct:
- var found types.Object
- for i := 0; i < t.NumFields(); i++ {
- field := t.Field(i)
- if !field.Exported() || field.Embedded() {
- continue
- }
- tags := reflect.StructTag(t.Tag(i))
- if val, ok := tags.Lookup(b.Config.StructTag); ok && equalFieldName(val, name) {
- if found != nil {
- return nil, fmt.Errorf("tag %s is ambigious; multiple fields have the same tag value of %s", b.Config.StructTag, val)
- }
-
- found = field
- }
- }
-
- return found, nil
- }
-
- return nil, nil
-}
-
-func (b *builder) findBindMethodTarget(in types.Type, name string) (types.Object, error) {
- switch t := in.(type) {
- case *types.Named:
- if _, ok := t.Underlying().(*types.Interface); ok {
- return b.findBindMethodTarget(t.Underlying(), name)
- }
-
- return b.findBindMethoderTarget(t.Method, t.NumMethods(), name)
- case *types.Interface:
- // FIX-ME: Should use ExplicitMethod here? What's the difference?
- return b.findBindMethoderTarget(t.Method, t.NumMethods(), name)
- }
-
- return nil, nil
-}
-
-func (b *builder) findBindMethoderTarget(methodFunc func(i int) *types.Func, methodCount int, name string) (types.Object, error) {
- var found types.Object
- for i := 0; i < methodCount; i++ {
- method := methodFunc(i)
- if !method.Exported() || !strings.EqualFold(method.Name(), name) {
- continue
- }
-
- if found != nil {
- return nil, fmt.Errorf("found more than one matching method to bind for %s", name)
- }
-
- found = method
- }
-
- return found, nil
-}
-
-func (b *builder) findBindFieldTarget(in types.Type, name string) (types.Object, error) {
- switch t := in.(type) {
- case *types.Named:
- return b.findBindFieldTarget(t.Underlying(), name)
- case *types.Struct:
- var found types.Object
- for i := 0; i < t.NumFields(); i++ {
- field := t.Field(i)
- if !field.Exported() || !equalFieldName(field.Name(), name) {
- continue
- }
-
- if found != nil {
- return nil, fmt.Errorf("found more than one matching field to bind for %s", name)
- }
-
- found = field
- }
-
- return found, nil
- }
-
- return nil, nil
-}
-
-func (b *builder) findBindEmbedsTarget(in types.Type, name string) (types.Object, error) {
- switch t := in.(type) {
- case *types.Named:
- return b.findBindEmbedsTarget(t.Underlying(), name)
- case *types.Struct:
- return b.findBindStructEmbedsTarget(t, name)
- case *types.Interface:
- return b.findBindInterfaceEmbedsTarget(t, name)
- }
-
- return nil, nil
-}
-
-func (b *builder) findBindStructEmbedsTarget(strukt *types.Struct, name string) (types.Object, error) {
- var found types.Object
- for i := 0; i < strukt.NumFields(); i++ {
- field := strukt.Field(i)
- if !field.Embedded() {
- continue
- }
-
- fieldType := field.Type()
- if ptr, ok := fieldType.(*types.Pointer); ok {
- fieldType = ptr.Elem()
- }
-
- f, err := b.findBindTarget(fieldType, name)
- if err != nil {
- return nil, err
- }
-
- if f != nil && found != nil {
- return nil, fmt.Errorf("found more than one way to bind for %s", name)
- }
-
- if f != nil {
- found = f
- }
- }
-
- return found, nil
-}
-
-func (b *builder) findBindInterfaceEmbedsTarget(iface *types.Interface, name string) (types.Object, error) {
- var found types.Object
- for i := 0; i < iface.NumEmbeddeds(); i++ {
- embeddedType := iface.EmbeddedType(i)
-
- f, err := b.findBindTarget(embeddedType, name)
- if err != nil {
- return nil, err
- }
-
- if f != nil && found != nil {
- return nil, fmt.Errorf("found more than one way to bind for %s", name)
- }
-
- if f != nil {
- found = f
- }
- }
-
- return found, nil
-}
-
-func (f *Field) HasDirectives() bool {
- return len(f.ImplDirectives()) > 0
-}
-
-func (f *Field) DirectiveObjName() string {
- if f.Object.Root {
- return "nil"
- }
- return f.GoReceiverName
-}
-
-func (f *Field) ImplDirectives() []*Directive {
- var d []*Directive
- loc := ast.LocationFieldDefinition
- if f.Object.IsInputType() {
- loc = ast.LocationInputFieldDefinition
- }
- for i := range f.Directives {
- if !f.Directives[i].Builtin &&
- (f.Directives[i].IsLocation(loc, ast.LocationObject) || f.Directives[i].IsLocation(loc, ast.LocationInputObject)) {
- d = append(d, f.Directives[i])
- }
- }
- return d
-}
-
-func (f *Field) IsReserved() bool {
- return strings.HasPrefix(f.Name, "__")
-}
-
-func (f *Field) IsMethod() bool {
- return f.GoFieldType == GoFieldMethod
-}
-
-func (f *Field) IsVariable() bool {
- return f.GoFieldType == GoFieldVariable
-}
-
-func (f *Field) IsMap() bool {
- return f.GoFieldType == GoFieldMap
-}
-
-func (f *Field) IsConcurrent() bool {
- if f.Object.DisableConcurrency {
- return false
- }
- return f.MethodHasContext || f.IsResolver
-}
-
-func (f *Field) GoNameUnexported() string {
- return templates.ToGoPrivate(f.Name)
-}
-
-func (f *Field) ShortInvocation() string {
- if f.Object.Kind == ast.InputObject {
- return fmt.Sprintf("%s().%s(ctx, &it, data)", strings.Title(f.Object.Definition.Name), f.GoFieldName)
- }
- return fmt.Sprintf("%s().%s(%s)", strings.Title(f.Object.Definition.Name), f.GoFieldName, f.CallArgs())
-}
-
-func (f *Field) ArgsFunc() string {
- if len(f.Args) == 0 {
- return ""
- }
-
- return "field_" + f.Object.Definition.Name + "_" + f.Name + "_args"
-}
-
-func (f *Field) ResolverType() string {
- if !f.IsResolver {
- return ""
- }
-
- return fmt.Sprintf("%s().%s(%s)", f.Object.Definition.Name, f.GoFieldName, f.CallArgs())
-}
-
-func (f *Field) ShortResolverDeclaration() string {
- if f.Object.Kind == ast.InputObject {
- return fmt.Sprintf("(ctx context.Context, obj %s, data %s) error",
- templates.CurrentImports.LookupType(f.Object.Reference()),
- templates.CurrentImports.LookupType(f.TypeReference.GO),
- )
- }
-
- res := "(ctx context.Context"
-
- if !f.Object.Root {
- res += fmt.Sprintf(", obj %s", templates.CurrentImports.LookupType(f.Object.Reference()))
- }
- for _, arg := range f.Args {
- res += fmt.Sprintf(", %s %s", arg.VarName, templates.CurrentImports.LookupType(arg.TypeReference.GO))
- }
-
- result := templates.CurrentImports.LookupType(f.TypeReference.GO)
- if f.Object.Stream {
- result = "<-chan " + result
- }
-
- res += fmt.Sprintf(") (%s, error)", result)
- return res
-}
-
-func (f *Field) ComplexitySignature() string {
- res := "func(childComplexity int"
- for _, arg := range f.Args {
- res += fmt.Sprintf(", %s %s", arg.VarName, templates.CurrentImports.LookupType(arg.TypeReference.GO))
- }
- res += ") int"
- return res
-}
-
-func (f *Field) ComplexityArgs() string {
- args := make([]string, len(f.Args))
- for i, arg := range f.Args {
- args[i] = "args[" + strconv.Quote(arg.Name) + "].(" + templates.CurrentImports.LookupType(arg.TypeReference.GO) + ")"
- }
-
- return strings.Join(args, ", ")
-}
-
-func (f *Field) CallArgs() string {
- args := make([]string, 0, len(f.Args)+2)
-
- if f.IsResolver {
- args = append(args, "rctx")
-
- if !f.Object.Root {
- args = append(args, "obj")
- }
- } else if f.MethodHasContext {
- args = append(args, "ctx")
- }
-
- for _, arg := range f.Args {
- args = append(args, "args["+strconv.Quote(arg.Name)+"].("+templates.CurrentImports.LookupType(arg.TypeReference.GO)+")")
- }
-
- return strings.Join(args, ", ")
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl b/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
deleted file mode 100644
index 0c6becaea6a..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
+++ /dev/null
@@ -1,129 +0,0 @@
-{{- range $object := .Objects }}{{- range $field := $object.Fields }}
-
-func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Context, field graphql.CollectedField{{ if not $object.Root }}, obj {{$object.Reference | ref}}{{end}}) (ret {{ if $object.Stream }}func(){{ end }}graphql.Marshaler) {
- {{- $null := "graphql.Null" }}
- {{- if $object.Stream }}
- {{- $null = "nil" }}
- {{- end }}
- defer func () {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = {{ $null }}
- }
- }()
- fc := &graphql.FieldContext{
- Object: {{$object.Name|quote}},
- Field: field,
- Args: nil,
- IsMethod: {{or $field.IsMethod $field.IsResolver}},
- IsResolver: {{ $field.IsResolver }},
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- {{- if $field.Args }}
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.{{ $field.ArgsFunc }}(ctx,rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return {{ $null }}
- }
- fc.Args = args
- {{- end }}
- {{- if $.AllDirectives.LocationDirectives "FIELD" }}
- resTmp := ec._fieldMiddleware(ctx, {{if $object.Root}}nil{{else}}obj{{end}}, func(rctx context.Context) (interface{}, error) {
- {{ template "field" $field }}
- })
- {{ else }}
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- {{ template "field" $field }}
- })
- if err != nil {
- ec.Error(ctx, err)
- return {{ $null }}
- }
- {{- end }}
- if resTmp == nil {
- {{- if $field.TypeReference.GQL.NonNull }}
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- {{- end }}
- return {{ $null }}
- }
- {{- if $object.Stream }}
- return func() graphql.Marshaler {
- res, ok := <-resTmp.(<-chan {{$field.TypeReference.GO | ref}})
- if !ok {
- return nil
- }
- return graphql.WriterFunc(func(w io.Writer) {
- w.Write([]byte{'{'})
- graphql.MarshalString(field.Alias).MarshalGQL(w)
- w.Write([]byte{':'})
- ec.{{ $field.TypeReference.MarshalFunc }}(ctx, field.Selections, res).MarshalGQL(w)
- w.Write([]byte{'}'})
- })
- }
- {{- else }}
- res := resTmp.({{$field.TypeReference.GO | ref}})
- fc.Result = res
- return ec.{{ $field.TypeReference.MarshalFunc }}(ctx, field.Selections, res)
- {{- end }}
-}
-
-{{- end }}{{- end}}
-
-{{ define "field" }}
- {{- if .HasDirectives -}}
- directive0 := func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- {{ template "fieldDefinition" . }}
- }
- {{ template "implDirectives" . }}
- tmp, err := directive{{.ImplDirectives|len}}(rctx)
- if err != nil {
- return nil, graphql.ErrorOnPath(ctx, err)
- }
- if tmp == nil {
- return nil, nil
- }
- if data, ok := tmp.({{if .Stream}}<-chan {{end}}{{ .TypeReference.GO | ref }}) ; ok {
- return data, nil
- }
- return nil, fmt.Errorf(`unexpected type %T from directive, should be {{if .Stream}}<-chan {{end}}{{ .TypeReference.GO }}`, tmp)
- {{- else -}}
- ctx = rctx // use context from middleware stack in children
- {{ template "fieldDefinition" . }}
- {{- end -}}
-{{ end }}
-
-{{ define "fieldDefinition" }}
- {{- if .IsResolver -}}
- return ec.resolvers.{{ .ShortInvocation }}
- {{- else if .IsMap -}}
- switch v := {{.GoReceiverName}}[{{.Name|quote}}].(type) {
- case {{if .Stream}}<-chan {{end}}{{.TypeReference.GO | ref}}:
- return v, nil
- case {{if .Stream}}<-chan {{end}}{{.TypeReference.Elem.GO | ref}}:
- return &v, nil
- case nil:
- return ({{.TypeReference.GO | ref}})(nil), nil
- default:
- return nil, fmt.Errorf("unexpected type %T for field %s", v, {{ .Name | quote}})
- }
- {{- else if .IsMethod -}}
- {{- if .VOkFunc -}}
- v, ok := {{.GoReceiverName}}.{{.GoFieldName}}({{ .CallArgs }})
- if !ok {
- return nil, nil
- }
- return v, nil
- {{- else if .NoErr -}}
- return {{.GoReceiverName}}.{{.GoFieldName}}({{ .CallArgs }}), nil
- {{- else -}}
- return {{.GoReceiverName}}.{{.GoFieldName}}({{ .CallArgs }})
- {{- end -}}
- {{- else if .IsVariable -}}
- return {{.GoReceiverName}}.{{.GoFieldName}}, nil
- {{- end }}
-{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/generate.go b/vendor/github.com/99designs/gqlgen/codegen/generate.go
deleted file mode 100644
index 77bbf575111..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/generate.go
+++ /dev/null
@@ -1,213 +0,0 @@
-package codegen
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "runtime"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-func GenerateCode(data *Data) error {
- if !data.Config.Exec.IsDefined() {
- return fmt.Errorf("missing exec config")
- }
-
- switch data.Config.Exec.Layout {
- case config.ExecLayoutSingleFile:
- return generateSingleFile(data)
- case config.ExecLayoutFollowSchema:
- return generatePerSchema(data)
- }
-
- return fmt.Errorf("unrecognized exec layout %s", data.Config.Exec.Layout)
-}
-
-func generateSingleFile(data *Data) error {
- return templates.Render(templates.Options{
- PackageName: data.Config.Exec.Package,
- Filename: data.Config.Exec.Filename,
- Data: data,
- RegionTags: true,
- GeneratedHeader: true,
- Packages: data.Config.Packages,
- })
-}
-
-func generatePerSchema(data *Data) error {
- err := generateRootFile(data)
- if err != nil {
- return err
- }
-
- builds := map[string]*Data{}
-
- err = addObjects(data, &builds)
- if err != nil {
- return err
- }
-
- err = addInputs(data, &builds)
- if err != nil {
- return err
- }
-
- err = addInterfaces(data, &builds)
- if err != nil {
- return err
- }
-
- err = addReferencedTypes(data, &builds)
- if err != nil {
- return err
- }
-
- for filename, build := range builds {
- if filename == "" {
- continue
- }
-
- dir := data.Config.Exec.DirName
- path := filepath.Join(dir, filename)
-
- err = templates.Render(templates.Options{
- PackageName: data.Config.Exec.Package,
- Filename: path,
- Data: build,
- RegionTags: true,
- GeneratedHeader: true,
- Packages: data.Config.Packages,
- })
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func filename(p *ast.Position, config *config.Config) string {
- name := "common!"
- if p != nil && p.Src != nil {
- gqlname := filepath.Base(p.Src.Name)
- ext := filepath.Ext(p.Src.Name)
- name = strings.TrimSuffix(gqlname, ext)
- }
-
- filenameTempl := config.Exec.FilenameTemplate
- if filenameTempl == "" {
- filenameTempl = "{name}.generated.go"
- }
-
- return strings.ReplaceAll(filenameTempl, "{name}", name)
-}
-
-func addBuild(filename string, p *ast.Position, data *Data, builds *map[string]*Data) {
- buildConfig := *data.Config
- if p != nil {
- buildConfig.Sources = []*ast.Source{p.Src}
- }
-
- (*builds)[filename] = &Data{
- Config: &buildConfig,
- QueryRoot: data.QueryRoot,
- MutationRoot: data.MutationRoot,
- SubscriptionRoot: data.SubscriptionRoot,
- AllDirectives: data.AllDirectives,
- }
-}
-
-// Root file contains top-level definitions that should not be duplicated across the generated
-// files for each schema file.
-func generateRootFile(data *Data) error {
- dir := data.Config.Exec.DirName
- path := filepath.Join(dir, "root_.generated.go")
-
- _, thisFile, _, _ := runtime.Caller(0)
- rootDir := filepath.Dir(thisFile)
- templatePath := filepath.Join(rootDir, "root_.gotpl")
- templateBytes, err := ioutil.ReadFile(templatePath)
- if err != nil {
- return err
- }
- template := string(templateBytes)
-
- return templates.Render(templates.Options{
- PackageName: data.Config.Exec.Package,
- Template: template,
- Filename: path,
- Data: data,
- RegionTags: false,
- GeneratedHeader: true,
- Packages: data.Config.Packages,
- })
-}
-
-func addObjects(data *Data, builds *map[string]*Data) error {
- for _, o := range data.Objects {
- filename := filename(o.Position, data.Config)
- if (*builds)[filename] == nil {
- addBuild(filename, o.Position, data, builds)
- }
-
- (*builds)[filename].Objects = append((*builds)[filename].Objects, o)
- }
- return nil
-}
-
-func addInputs(data *Data, builds *map[string]*Data) error {
- for _, in := range data.Inputs {
- filename := filename(in.Position, data.Config)
- if (*builds)[filename] == nil {
- addBuild(filename, in.Position, data, builds)
- }
-
- (*builds)[filename].Inputs = append((*builds)[filename].Inputs, in)
- }
- return nil
-}
-
-func addInterfaces(data *Data, builds *map[string]*Data) error {
- for k, inf := range data.Interfaces {
- filename := filename(inf.Position, data.Config)
- if (*builds)[filename] == nil {
- addBuild(filename, inf.Position, data, builds)
- }
- build := (*builds)[filename]
-
- if build.Interfaces == nil {
- build.Interfaces = map[string]*Interface{}
- }
- if build.Interfaces[k] != nil {
- return errors.New("conflicting interface keys")
- }
-
- build.Interfaces[k] = inf
- }
- return nil
-}
-
-func addReferencedTypes(data *Data, builds *map[string]*Data) error {
- for k, rt := range data.ReferencedTypes {
- filename := filename(rt.Definition.Position, data.Config)
- if (*builds)[filename] == nil {
- addBuild(filename, rt.Definition.Position, data, builds)
- }
- build := (*builds)[filename]
-
- if build.ReferencedTypes == nil {
- build.ReferencedTypes = map[string]*config.TypeReference{}
- }
- if build.ReferencedTypes[k] != nil {
- return errors.New("conflicting referenced type keys")
- }
-
- build.ReferencedTypes[k] = rt
- }
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl b/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
deleted file mode 100644
index bf59daccef9..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
+++ /dev/null
@@ -1,235 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "fmt" }}
-{{ reserveImport "io" }}
-{{ reserveImport "strconv" }}
-{{ reserveImport "time" }}
-{{ reserveImport "sync" }}
-{{ reserveImport "sync/atomic" }}
-{{ reserveImport "errors" }}
-{{ reserveImport "bytes" }}
-
-{{ reserveImport "github.com/vektah/gqlparser/v2" "gqlparser" }}
-{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }}
-
-
-{{ if eq .Config.Exec.Layout "single-file" }}
- // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
- return &executableSchema{
- resolvers: cfg.Resolvers,
- directives: cfg.Directives,
- complexity: cfg.Complexity,
- }
- }
-
- type Config struct {
- Resolvers ResolverRoot
- Directives DirectiveRoot
- Complexity ComplexityRoot
- }
-
- type ResolverRoot interface {
- {{- range $object := .Objects -}}
- {{ if $object.HasResolvers -}}
- {{ucFirst $object.Name}}() {{ucFirst $object.Name}}Resolver
- {{ end }}
- {{- end }}
- {{- range $object := .Inputs -}}
- {{ if $object.HasResolvers -}}
- {{ucFirst $object.Name}}() {{ucFirst $object.Name}}Resolver
- {{ end }}
-{{- end }}
-}
-
- type DirectiveRoot struct {
- {{ range $directive := .Directives }}
- {{- $directive.Declaration }}
- {{ end }}
- }
-
- type ComplexityRoot struct {
- {{ range $object := .Objects }}
- {{ if not $object.IsReserved -}}
- {{ ucFirst $object.Name }} struct {
- {{ range $_, $fields := $object.UniqueFields }}
- {{- $field := index $fields 0 -}}
- {{ if not $field.IsReserved -}}
- {{ $field.GoFieldName }} {{ $field.ComplexitySignature }}
- {{ end }}
- {{- end }}
- }
- {{- end }}
- {{ end }}
- }
-{{ end }}
-
-{{ range $object := .Objects -}}
- {{ if $object.HasResolvers }}
- type {{ucFirst $object.Name}}Resolver interface {
- {{ range $field := $object.Fields -}}
- {{- if $field.IsResolver }}
- {{- $field.GoFieldName}}{{ $field.ShortResolverDeclaration }}
- {{- end }}
- {{ end }}
- }
- {{- end }}
-{{- end }}
-
-{{ range $object := .Inputs -}}
- {{ if $object.HasResolvers }}
- type {{$object.Name}}Resolver interface {
- {{ range $field := $object.Fields -}}
- {{- if $field.IsResolver }}
- {{- $field.GoFieldName}}{{ $field.ShortResolverDeclaration }}
- {{- end }}
- {{ end }}
- }
- {{- end }}
-{{- end }}
-
-{{ if eq .Config.Exec.Layout "single-file" }}
- type executableSchema struct {
- resolvers ResolverRoot
- directives DirectiveRoot
- complexity ComplexityRoot
- }
-
- func (e *executableSchema) Schema() *ast.Schema {
- return parsedSchema
- }
-
- func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
- ec := executionContext{nil, e}
- _ = ec
- switch typeName + "." + field {
- {{ range $object := .Objects }}
- {{ if not $object.IsReserved }}
- {{ range $_, $fields := $object.UniqueFields }}
- {{- $len := len $fields }}
- {{- range $i, $field := $fields }}
- {{- $last := eq (add $i 1) $len }}
- {{- if not $field.IsReserved }}
- {{- if eq $i 0 }}case {{ end }}"{{$object.Name}}.{{$field.Name}}"{{ if not $last }},{{ else }}:
- if e.complexity.{{ucFirst $object.Name}}.{{$field.GoFieldName}} == nil {
- break
- }
- {{ if $field.Args }}
- args, err := ec.{{ $field.ArgsFunc }}(context.TODO(),rawArgs)
- if err != nil {
- return 0, false
- }
- {{ end }}
- return e.complexity.{{ucFirst $object.Name}}.{{$field.GoFieldName}}(childComplexity{{if $field.Args}}, {{$field.ComplexityArgs}} {{ end }}), true
- {{ end }}
- {{- end }}
- {{- end }}
- {{ end }}
- {{ end }}
- {{ end }}
- }
- return 0, false
- }
-
- func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
- rc := graphql.GetOperationContext(ctx)
- ec := executionContext{rc, e}
- first := true
-
- switch rc.Operation.Operation {
- {{- if .QueryRoot }} case ast.Query:
- return func(ctx context.Context) *graphql.Response {
- if !first { return nil }
- first = false
- {{ if .Directives.LocationDirectives "QUERY" -}}
- data := ec._queryMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
- })
- {{- else -}}
- data := ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
- var buf bytes.Buffer
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
-
- {{- if .MutationRoot }} case ast.Mutation:
- return func(ctx context.Context) *graphql.Response {
- if !first { return nil }
- first = false
- {{ if .Directives.LocationDirectives "MUTATION" -}}
- data := ec._mutationMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
- })
- {{- else -}}
- data := ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
- var buf bytes.Buffer
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
-
- {{- if .SubscriptionRoot }} case ast.Subscription:
- {{ if .Directives.LocationDirectives "SUBSCRIPTION" -}}
- next := ec._subscriptionMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.SubscriptionRoot.Name}}(ctx, rc.Operation.SelectionSet),nil
- })
- {{- else -}}
- next := ec._{{.SubscriptionRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
-
- var buf bytes.Buffer
- return func(ctx context.Context) *graphql.Response {
- buf.Reset()
- data := next()
-
- if data == nil {
- return nil
- }
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
- default:
- return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
- }
- }
-
- type executionContext struct {
- *graphql.OperationContext
- *executableSchema
- }
-
- func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapSchema(parsedSchema), nil
- }
-
- func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
- }
-
- var sources = []*ast.Source{
- {{- range $source := .Config.Sources }}
- {Name: {{$source.Name|quote}}, Input: {{$source.Input|rawQuote}}, BuiltIn: {{$source.BuiltIn}}},
- {{- end }}
- }
- var parsedSchema = gqlparser.MustLoadSchema(sources...)
-{{ end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/input.gotpl b/vendor/github.com/99designs/gqlgen/codegen/input.gotpl
deleted file mode 100644
index 5694bcd613c..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/input.gotpl
+++ /dev/null
@@ -1,72 +0,0 @@
-{{- range $input := .Inputs }}
- {{- if not .HasUnmarshal }}
- func (ec *executionContext) unmarshalInput{{ .Name }}(ctx context.Context, obj interface{}) ({{.Type | ref}}, error) {
- var it {{.Type | ref}}
- asMap := map[string]interface{}{}
- for k, v := range obj.(map[string]interface{}) {
- asMap[k] = v
- }
- {{ range $field := .Fields}}
- {{- if notNil "Default" $field }}
- if _, present := asMap[{{$field.Name|quote}}] ; !present {
- asMap[{{$field.Name|quote}}] = {{ $field.Default | dump }}
- }
- {{- end}}
- {{- end }}
-
- for k, v := range asMap {
- switch k {
- {{- range $field := .Fields }}
- case {{$field.Name|quote}}:
- var err error
-
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField({{$field.Name|quote}}))
- {{- if $field.ImplDirectives }}
- directive0 := func(ctx context.Context) (interface{}, error) { return ec.{{ $field.TypeReference.UnmarshalFunc }}(ctx, v) }
- {{ template "implDirectives" $field }}
- tmp, err := directive{{$field.ImplDirectives|len}}(ctx)
- if err != nil {
- return it, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.({{ $field.TypeReference.GO | ref }}) ; ok {
- {{- if $field.IsResolver }}
- if err = ec.resolvers.{{ $field.ShortInvocation }}; err != nil {
- return it, err
- }
- {{- else }}
- it.{{$field.GoFieldName}} = data
- {{- end }}
- {{- if $field.TypeReference.IsNilable }}
- {{- if not $field.IsResolver }}
- } else if tmp == nil {
- it.{{$field.GoFieldName}} = nil
- {{- end }}
- {{- end }}
- } else {
- err := fmt.Errorf(`unexpected type %T from directive, should be {{ $field.TypeReference.GO }}`, tmp)
- return it, graphql.ErrorOnPath(ctx, err)
- }
- {{- else }}
- {{- if $field.IsResolver }}
- data, err := ec.{{ $field.TypeReference.UnmarshalFunc }}(ctx, v)
- if err != nil {
- return it, err
- }
- if err = ec.resolvers.{{ $field.ShortInvocation }}; err != nil {
- return it, err
- }
- {{- else }}
- it.{{$field.GoFieldName}}, err = ec.{{ $field.TypeReference.UnmarshalFunc }}(ctx, v)
- if err != nil {
- return it, err
- }
- {{- end }}
- {{- end }}
- {{- end }}
- }
- }
-
- return it, nil
- }
- {{- end }}
-{{ end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/interface.go b/vendor/github.com/99designs/gqlgen/codegen/interface.go
deleted file mode 100644
index cdc4d4d32ed..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/interface.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "go/types"
-
- "github.com/vektah/gqlparser/v2/ast"
-
- "github.com/99designs/gqlgen/codegen/config"
-)
-
-type Interface struct {
- *ast.Definition
- Type types.Type
- Implementors []InterfaceImplementor
- InTypemap bool
-}
-
-type InterfaceImplementor struct {
- *ast.Definition
-
- Type types.Type
- TakeRef bool
-}
-
-func (b *builder) buildInterface(typ *ast.Definition) (*Interface, error) {
- obj, err := b.Binder.DefaultUserObject(typ.Name)
- if err != nil {
- panic(err)
- }
-
- i := &Interface{
- Definition: typ,
- Type: obj,
- InTypemap: b.Config.Models.UserDefined(typ.Name),
- }
-
- interfaceType, err := findGoInterface(i.Type)
- if interfaceType == nil || err != nil {
- return nil, fmt.Errorf("%s is not an interface", i.Type)
- }
-
- for _, implementor := range b.Schema.GetPossibleTypes(typ) {
- obj, err := b.Binder.DefaultUserObject(implementor.Name)
- if err != nil {
- return nil, fmt.Errorf("%s has no backing go type", implementor.Name)
- }
-
- implementorType, err := findGoNamedType(obj)
- if err != nil {
- return nil, fmt.Errorf("can not find backing go type %s: %w", obj.String(), err)
- } else if implementorType == nil {
- return nil, fmt.Errorf("can not find backing go type %s", obj.String())
- }
-
- anyValid := false
-
- // first check if the value receiver can be nil, eg can we type switch on case Thing:
- if types.Implements(implementorType, interfaceType) {
- i.Implementors = append(i.Implementors, InterfaceImplementor{
- Definition: implementor,
- Type: obj,
- TakeRef: !types.IsInterface(obj),
- })
- anyValid = true
- }
-
- // then check if the pointer receiver can be nil, eg can we type switch on case *Thing:
- if types.Implements(types.NewPointer(implementorType), interfaceType) {
- i.Implementors = append(i.Implementors, InterfaceImplementor{
- Definition: implementor,
- Type: types.NewPointer(obj),
- })
- anyValid = true
- }
-
- if !anyValid {
- return nil, fmt.Errorf("%s does not satisfy the interface %s", implementorType.String(), i.Type.String())
- }
- }
-
- return i, nil
-}
-
-func (i *InterfaceImplementor) CanBeNil() bool {
- return config.IsNilable(i.Type)
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/interface.gotpl b/vendor/github.com/99designs/gqlgen/codegen/interface.gotpl
deleted file mode 100644
index e9d560c8f64..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/interface.gotpl
+++ /dev/null
@@ -1,21 +0,0 @@
-{{- range $interface := .Interfaces }}
-
-func (ec *executionContext) _{{$interface.Name}}(ctx context.Context, sel ast.SelectionSet, obj {{$interface.Type | ref}}) graphql.Marshaler {
- switch obj := (obj).(type) {
- case nil:
- return graphql.Null
- {{- range $implementor := $interface.Implementors }}
- case {{$implementor.Type | ref}}:
- {{- if $implementor.CanBeNil }}
- if obj == nil {
- return graphql.Null
- }
- {{- end }}
- return ec._{{$implementor.Name}}(ctx, sel, {{ if $implementor.TakeRef }}&{{ end }}obj)
- {{- end }}
- default:
- panic(fmt.Errorf("unexpected type %T", obj))
- }
-}
-
-{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/object.go b/vendor/github.com/99designs/gqlgen/codegen/object.go
deleted file mode 100644
index 6cf922d47c4..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/object.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "go/types"
- "strconv"
- "strings"
- "unicode"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type GoFieldType int
-
-const (
- GoFieldUndefined GoFieldType = iota
- GoFieldMethod
- GoFieldVariable
- GoFieldMap
-)
-
-type Object struct {
- *ast.Definition
-
- Type types.Type
- ResolverInterface types.Type
- Root bool
- Fields []*Field
- Implements []*ast.Definition
- DisableConcurrency bool
- Stream bool
- Directives []*Directive
-}
-
-func (b *builder) buildObject(typ *ast.Definition) (*Object, error) {
- dirs, err := b.getDirectives(typ.Directives)
- if err != nil {
- return nil, fmt.Errorf("%s: %w", typ.Name, err)
- }
-
- obj := &Object{
- Definition: typ,
- Root: b.Schema.Query == typ || b.Schema.Mutation == typ || b.Schema.Subscription == typ,
- DisableConcurrency: typ == b.Schema.Mutation,
- Stream: typ == b.Schema.Subscription,
- Directives: dirs,
- ResolverInterface: types.NewNamed(
- types.NewTypeName(0, b.Config.Exec.Pkg(), strings.Title(typ.Name)+"Resolver", nil),
- nil,
- nil,
- ),
- }
-
- if !obj.Root {
- goObject, err := b.Binder.DefaultUserObject(typ.Name)
- if err != nil {
- return nil, err
- }
- obj.Type = goObject
- }
-
- for _, intf := range b.Schema.GetImplements(typ) {
- obj.Implements = append(obj.Implements, b.Schema.Types[intf.Name])
- }
-
- for _, field := range typ.Fields {
- if strings.HasPrefix(field.Name, "__") {
- continue
- }
-
- var f *Field
- f, err = b.buildField(obj, field)
- if err != nil {
- return nil, err
- }
-
- obj.Fields = append(obj.Fields, f)
- }
-
- return obj, nil
-}
-
-func (o *Object) Reference() types.Type {
- if config.IsNilable(o.Type) {
- return o.Type
- }
- return types.NewPointer(o.Type)
-}
-
-type Objects []*Object
-
-func (o *Object) Implementors() string {
- satisfiedBy := strconv.Quote(o.Name)
- for _, s := range o.Implements {
- satisfiedBy += ", " + strconv.Quote(s.Name)
- }
- return "[]string{" + satisfiedBy + "}"
-}
-
-func (o *Object) HasResolvers() bool {
- for _, f := range o.Fields {
- if f.IsResolver {
- return true
- }
- }
- return false
-}
-
-func (o *Object) HasUnmarshal() bool {
- if o.Type == config.MapType {
- return true
- }
- for i := 0; i < o.Type.(*types.Named).NumMethods(); i++ {
- if o.Type.(*types.Named).Method(i).Name() == "UnmarshalGQL" {
- return true
- }
- }
- return false
-}
-
-func (o *Object) HasDirectives() bool {
- if len(o.Directives) > 0 {
- return true
- }
- for _, f := range o.Fields {
- if f.HasDirectives() {
- return true
- }
- }
-
- return false
-}
-
-func (o *Object) IsConcurrent() bool {
- for _, f := range o.Fields {
- if f.IsConcurrent() {
- return true
- }
- }
- return false
-}
-
-func (o *Object) IsReserved() bool {
- return strings.HasPrefix(o.Definition.Name, "__")
-}
-
-func (o *Object) Description() string {
- return o.Definition.Description
-}
-
-func (os Objects) ByName(name string) *Object {
- for i, o := range os {
- if strings.EqualFold(o.Definition.Name, name) {
- return os[i]
- }
- }
- return nil
-}
-
-func ucFirst(s string) string {
- if s == "" {
- return ""
- }
-
- r := []rune(s)
- r[0] = unicode.ToUpper(r[0])
- return string(r)
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/object.gotpl b/vendor/github.com/99designs/gqlgen/codegen/object.gotpl
deleted file mode 100644
index 8cb9d28ced7..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/object.gotpl
+++ /dev/null
@@ -1,113 +0,0 @@
-{{- range $object := .Objects }}
-
-var {{ $object.Name|lcFirst}}Implementors = {{$object.Implementors}}
-
-{{- if .Stream }}
-func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, {{$object.Name|lcFirst}}Implementors)
- ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
- Object: {{$object.Name|quote}},
- })
- if len(fields) != 1 {
- ec.Errorf(ctx, "must subscribe to exactly one stream")
- return nil
- }
-
- switch fields[0].Name {
- {{- range $field := $object.Fields }}
- case "{{$field.Name}}":
- return ec._{{$object.Name}}_{{$field.Name}}(ctx, fields[0])
- {{- end }}
- default:
- panic("unknown field " + strconv.Quote(fields[0].Name))
- }
-}
-{{- else }}
-func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet{{ if not $object.Root }},obj {{$object.Reference | ref }}{{ end }}) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, {{$object.Name|lcFirst}}Implementors)
- {{- if $object.Root }}
- ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
- Object: {{$object.Name|quote}},
- })
- {{end}}
- out := graphql.NewFieldSet(fields)
- var invalids uint32
- for i, field := range fields {
- {{- if $object.Root }}
- innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
- Object: field.Name,
- Field: field,
- })
- {{end}}
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString({{$object.Name|quote}})
- {{- range $field := $object.Fields }}
- case "{{$field.Name}}":
- {{- if $field.IsConcurrent }}
- field := field
-
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- }
- }()
- res = ec._{{$object.Name}}_{{$field.Name}}(ctx, field{{if not $object.Root}}, obj{{end}})
- {{- if $field.TypeReference.GQL.NonNull }}
- if res == graphql.Null {
- {{- if $object.IsConcurrent }}
- atomic.AddUint32(&invalids, 1)
- {{- else }}
- invalids++
- {{- end }}
- }
- {{- end }}
- return res
- }
-
- {{if $object.Root}}
- rrm := func(ctx context.Context) graphql.Marshaler {
- return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
- }
- {{end}}
-
- out.Concurrently(i, func() graphql.Marshaler {
- {{- if $object.Root -}}
- return rrm(innerCtx)
- {{- else -}}
- return innerFunc(ctx)
- {{end}}
- })
- {{- else }}
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._{{$object.Name}}_{{$field.Name}}(ctx, field{{if not $object.Root}}, obj{{end}})
- }
- {{if $object.Root}}
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
- {{else}}
- out.Values[i] = innerFunc(ctx)
- {{end}}
-
- {{- if $field.TypeReference.GQL.NonNull }}
- if out.Values[i] == graphql.Null {
- {{- if $object.IsConcurrent }}
- atomic.AddUint32(&invalids, 1)
- {{- else }}
- invalids++
- {{- end }}
- }
- {{- end }}
- {{- end }}
- {{- end }}
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch()
- if invalids > 0 { return graphql.Null }
- return out
-}
-{{- end }}
-
-{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl b/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
deleted file mode 100644
index 13d77961837..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
+++ /dev/null
@@ -1,201 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "fmt" }}
-{{ reserveImport "io" }}
-{{ reserveImport "strconv" }}
-{{ reserveImport "time" }}
-{{ reserveImport "sync" }}
-{{ reserveImport "sync/atomic" }}
-{{ reserveImport "errors" }}
-{{ reserveImport "bytes" }}
-
-{{ reserveImport "github.com/vektah/gqlparser/v2" "gqlparser" }}
-{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }}
-
-// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
-func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
- return &executableSchema{
- resolvers: cfg.Resolvers,
- directives: cfg.Directives,
- complexity: cfg.Complexity,
- }
-}
-
-type Config struct {
- Resolvers ResolverRoot
- Directives DirectiveRoot
- Complexity ComplexityRoot
-}
-
-type ResolverRoot interface {
-{{- range $object := .Objects -}}
- {{ if $object.HasResolvers -}}
- {{ucFirst $object.Name}}() {{ucFirst $object.Name}}Resolver
- {{ end }}
-{{- end }}
-}
-
-type DirectiveRoot struct {
-{{ range $directive := .Directives }}
- {{- $directive.Declaration }}
-{{ end }}
-}
-
-type ComplexityRoot struct {
-{{ range $object := .Objects }}
- {{ if not $object.IsReserved -}}
- {{ ucFirst $object.Name }} struct {
- {{ range $_, $fields := $object.UniqueFields }}
- {{- $field := index $fields 0 -}}
- {{ if not $field.IsReserved -}}
- {{ $field.GoFieldName }} {{ $field.ComplexitySignature }}
- {{ end }}
- {{- end }}
- }
- {{- end }}
-{{ end }}
-}
-
-type executableSchema struct {
- resolvers ResolverRoot
- directives DirectiveRoot
- complexity ComplexityRoot
-}
-
-func (e *executableSchema) Schema() *ast.Schema {
- return parsedSchema
-}
-
-func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
- ec := executionContext{nil, e}
- _ = ec
- switch typeName + "." + field {
- {{ range $object := .Objects }}
- {{ if not $object.IsReserved }}
- {{ range $_, $fields := $object.UniqueFields }}
- {{- $len := len $fields }}
- {{- range $i, $field := $fields }}
- {{- $last := eq (add $i 1) $len }}
- {{- if not $field.IsReserved }}
- {{- if eq $i 0 }}case {{ end }}"{{$object.Name}}.{{$field.Name}}"{{ if not $last }},{{ else }}:
- if e.complexity.{{ucFirst $object.Name }}.{{$field.GoFieldName}} == nil {
- break
- }
- {{ if $field.Args }}
- args, err := ec.{{ $field.ArgsFunc }}(context.TODO(),rawArgs)
- if err != nil {
- return 0, false
- }
- {{ end }}
- return e.complexity.{{ucFirst $object.Name}}.{{$field.GoFieldName}}(childComplexity{{if $field.Args}}, {{$field.ComplexityArgs}} {{ end }}), true
- {{ end }}
- {{- end }}
- {{- end }}
- {{ end }}
- {{ end }}
- {{ end }}
- }
- return 0, false
-}
-
-func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
- rc := graphql.GetOperationContext(ctx)
- ec := executionContext{rc, e}
- first := true
-
- switch rc.Operation.Operation {
- {{- if .QueryRoot }} case ast.Query:
- return func(ctx context.Context) *graphql.Response {
- if !first { return nil }
- first = false
- {{ if .Directives.LocationDirectives "QUERY" -}}
- data := ec._queryMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
- })
- {{- else -}}
- data := ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
- var buf bytes.Buffer
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
-
- {{- if .MutationRoot }} case ast.Mutation:
- return func(ctx context.Context) *graphql.Response {
- if !first { return nil }
- first = false
- {{ if .Directives.LocationDirectives "MUTATION" -}}
- data := ec._mutationMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
- })
- {{- else -}}
- data := ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
- var buf bytes.Buffer
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
-
- {{- if .SubscriptionRoot }} case ast.Subscription:
- {{ if .Directives.LocationDirectives "SUBSCRIPTION" -}}
- next := ec._subscriptionMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
- return ec._{{.SubscriptionRoot.Name}}(ctx, rc.Operation.SelectionSet),nil
- })
- {{- else -}}
- next := ec._{{.SubscriptionRoot.Name}}(ctx, rc.Operation.SelectionSet)
- {{- end }}
-
- var buf bytes.Buffer
- return func(ctx context.Context) *graphql.Response {
- buf.Reset()
- data := next()
-
- if data == nil {
- return nil
- }
- data.MarshalGQL(&buf)
-
- return &graphql.Response{
- Data: buf.Bytes(),
- }
- }
- {{ end }}
- default:
- return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
- }
-}
-
-type executionContext struct {
- *graphql.OperationContext
- *executableSchema
-}
-
-func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapSchema(parsedSchema), nil
-}
-
-func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
- if ec.DisableIntrospection {
- return nil, errors.New("introspection disabled")
- }
- return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
-}
-
-var sources = []*ast.Source{
-{{- range $source := .Config.Sources }}
- {Name: {{$source.Name|quote}}, Input: {{$source.Input|rawQuote}}, BuiltIn: {{$source.BuiltIn}}},
-{{- end }}
-}
-var parsedSchema = gqlparser.MustLoadSchema(sources...)
diff --git a/vendor/github.com/99designs/gqlgen/codegen/templates/import.go b/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
deleted file mode 100644
index 00a82ea5ef1..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package templates
-
-import (
- "fmt"
- "go/types"
- "strconv"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
-)
-
-type Import struct {
- Name string
- Path string
- Alias string
-}
-
-type Imports struct {
- imports []*Import
- destDir string
- packages *code.Packages
-}
-
-func (i *Import) String() string {
- if strings.HasSuffix(i.Path, i.Alias) {
- return strconv.Quote(i.Path)
- }
-
- return i.Alias + " " + strconv.Quote(i.Path)
-}
-
-func (s *Imports) String() string {
- res := ""
- for i, imp := range s.imports {
- if i != 0 {
- res += "\n"
- }
- res += imp.String()
- }
- return res
-}
-
-func (s *Imports) Reserve(path string, aliases ...string) (string, error) {
- if path == "" {
- panic("empty ambient import")
- }
-
- // if we are referencing our own package we dont need an import
- if code.ImportPathForDir(s.destDir) == path {
- return "", nil
- }
-
- name := s.packages.NameForPackage(path)
- var alias string
- if len(aliases) != 1 {
- alias = name
- } else {
- alias = aliases[0]
- }
-
- if existing := s.findByPath(path); existing != nil {
- if existing.Alias == alias {
- return "", nil
- }
- return "", fmt.Errorf("ambient import already exists")
- }
-
- if alias := s.findByAlias(alias); alias != nil {
- return "", fmt.Errorf("ambient import collides on an alias")
- }
-
- s.imports = append(s.imports, &Import{
- Name: name,
- Path: path,
- Alias: alias,
- })
-
- return "", nil
-}
-
-func (s *Imports) Lookup(path string) string {
- if path == "" {
- return ""
- }
-
- path = code.NormalizeVendor(path)
-
- // if we are referencing our own package we dont need an import
- if code.ImportPathForDir(s.destDir) == path {
- return ""
- }
-
- if existing := s.findByPath(path); existing != nil {
- return existing.Alias
- }
-
- imp := &Import{
- Name: s.packages.NameForPackage(path),
- Path: path,
- }
- s.imports = append(s.imports, imp)
-
- alias := imp.Name
- i := 1
- for s.findByAlias(alias) != nil {
- alias = imp.Name + strconv.Itoa(i)
- i++
- if i > 1000 {
- panic(fmt.Errorf("too many collisions, last attempt was %s", alias))
- }
- }
- imp.Alias = alias
-
- return imp.Alias
-}
-
-func (s *Imports) LookupType(t types.Type) string {
- return types.TypeString(t, func(i *types.Package) string {
- return s.Lookup(i.Path())
- })
-}
-
-func (s Imports) findByPath(importPath string) *Import {
- for _, imp := range s.imports {
- if imp.Path == importPath {
- return imp
- }
- }
- return nil
-}
-
-func (s Imports) findByAlias(alias string) *Import {
- for _, imp := range s.imports {
- if imp.Alias == alias {
- return imp
- }
- }
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go b/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go
deleted file mode 100644
index 0ea3c8725e6..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go
+++ /dev/null
@@ -1,611 +0,0 @@
-package templates
-
-import (
- "bytes"
- "fmt"
- "go/types"
- "io/ioutil"
- "os"
- "path/filepath"
- "reflect"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "text/template"
- "unicode"
-
- "github.com/99designs/gqlgen/internal/code"
-
- "github.com/99designs/gqlgen/internal/imports"
-)
-
-// CurrentImports keeps track of all the import declarations that are needed during the execution of a plugin.
-// this is done with a global because subtemplates currently get called in functions. Lets aim to remove this eventually.
-var CurrentImports *Imports
-
-// Options specify various parameters to rendering a template.
-type Options struct {
- // PackageName is a helper that specifies the package header declaration.
- // In other words, when you write the template you don't need to specify `package X`
- // at the top of the file. By providing PackageName in the Options, the Render
- // function will do that for you.
- PackageName string
- // Template is a string of the entire template that
- // will be parsed and rendered. If it's empty,
- // the plugin processor will look for .gotpl files
- // in the same directory of where you wrote the plugin.
- Template string
- // Filename is the name of the file that will be
- // written to the system disk once the template is rendered.
- Filename string
- RegionTags bool
- GeneratedHeader bool
- // PackageDoc is documentation written above the package line
- PackageDoc string
- // FileNotice is notice written below the package line
- FileNotice string
- // Data will be passed to the template execution.
- Data interface{}
- Funcs template.FuncMap
-
- // Packages cache, you can find me on config.Config
- Packages *code.Packages
-}
-
-// Render renders a gql plugin template from the given Options. Render is an
-// abstraction of the text/template package that makes it easier to write gqlgen
-// plugins. If Options.Template is empty, the Render function will look for `.gotpl`
-// files inside the directory where you wrote the plugin.
-func Render(cfg Options) error {
- if CurrentImports != nil {
- panic(fmt.Errorf("recursive or concurrent call to RenderToFile detected"))
- }
- CurrentImports = &Imports{packages: cfg.Packages, destDir: filepath.Dir(cfg.Filename)}
-
- // load path relative to calling source file
- _, callerFile, _, _ := runtime.Caller(1)
- rootDir := filepath.Dir(callerFile)
-
- funcs := Funcs()
- for n, f := range cfg.Funcs {
- funcs[n] = f
- }
- t := template.New("").Funcs(funcs)
-
- var roots []string
- if cfg.Template != "" {
- var err error
- t, err = t.New("template.gotpl").Parse(cfg.Template)
- if err != nil {
- return fmt.Errorf("error with provided template: %w", err)
- }
- roots = append(roots, "template.gotpl")
- } else {
- // load all the templates in the directory
- err := filepath.Walk(rootDir, func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
- name := filepath.ToSlash(strings.TrimPrefix(path, rootDir+string(os.PathSeparator)))
- if !strings.HasSuffix(info.Name(), ".gotpl") {
- return nil
- }
- // omit any templates with "_" at the end of their name, which are meant for specific contexts only
- if strings.HasSuffix(info.Name(), "_.gotpl") {
- return nil
- }
- b, err := ioutil.ReadFile(path)
- if err != nil {
- return err
- }
-
- t, err = t.New(name).Parse(string(b))
- if err != nil {
- return fmt.Errorf("%s: %w", cfg.Filename, err)
- }
-
- roots = append(roots, name)
-
- return nil
- })
- if err != nil {
- return fmt.Errorf("locating templates: %w", err)
- }
- }
-
- // then execute all the important looking ones in order, adding them to the same file
- sort.Slice(roots, func(i, j int) bool {
- // important files go first
- if strings.HasSuffix(roots[i], "!.gotpl") {
- return true
- }
- if strings.HasSuffix(roots[j], "!.gotpl") {
- return false
- }
- return roots[i] < roots[j]
- })
- var buf bytes.Buffer
- for _, root := range roots {
- if cfg.RegionTags {
- buf.WriteString("\n// region " + center(70, "*", " "+root+" ") + "\n")
- }
- err := t.Lookup(root).Execute(&buf, cfg.Data)
- if err != nil {
- return fmt.Errorf("%s: %w", root, err)
- }
- if cfg.RegionTags {
- buf.WriteString("\n// endregion " + center(70, "*", " "+root+" ") + "\n")
- }
- }
-
- var result bytes.Buffer
- if cfg.GeneratedHeader {
- result.WriteString("// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.\n\n")
- }
- if cfg.PackageDoc != "" {
- result.WriteString(cfg.PackageDoc + "\n")
- }
- result.WriteString("package ")
- result.WriteString(cfg.PackageName)
- result.WriteString("\n\n")
- if cfg.FileNotice != "" {
- result.WriteString(cfg.FileNotice)
- result.WriteString("\n\n")
- }
- result.WriteString("import (\n")
- result.WriteString(CurrentImports.String())
- result.WriteString(")\n")
- _, err := buf.WriteTo(&result)
- if err != nil {
- return err
- }
- CurrentImports = nil
-
- err = write(cfg.Filename, result.Bytes(), cfg.Packages)
- if err != nil {
- return err
- }
-
- cfg.Packages.Evict(code.ImportPathForDir(filepath.Dir(cfg.Filename)))
- return nil
-}
-
-func center(width int, pad string, s string) string {
- if len(s)+2 > width {
- return s
- }
- lpad := (width - len(s)) / 2
- rpad := width - (lpad + len(s))
- return strings.Repeat(pad, lpad) + s + strings.Repeat(pad, rpad)
-}
-
-func Funcs() template.FuncMap {
- return template.FuncMap{
- "ucFirst": UcFirst,
- "lcFirst": LcFirst,
- "quote": strconv.Quote,
- "rawQuote": rawQuote,
- "dump": Dump,
- "ref": ref,
- "ts": TypeIdentifier,
- "call": Call,
- "prefixLines": prefixLines,
- "notNil": notNil,
- "reserveImport": CurrentImports.Reserve,
- "lookupImport": CurrentImports.Lookup,
- "go": ToGo,
- "goPrivate": ToGoPrivate,
- "add": func(a, b int) int {
- return a + b
- },
- "render": func(filename string, tpldata interface{}) (*bytes.Buffer, error) {
- return render(resolveName(filename, 0), tpldata)
- },
- }
-}
-
-func UcFirst(s string) string {
- if s == "" {
- return ""
- }
- r := []rune(s)
- r[0] = unicode.ToUpper(r[0])
- return string(r)
-}
-
-func LcFirst(s string) string {
- if s == "" {
- return ""
- }
-
- r := []rune(s)
- r[0] = unicode.ToLower(r[0])
- return string(r)
-}
-
-func isDelimiter(c rune) bool {
- return c == '-' || c == '_' || unicode.IsSpace(c)
-}
-
-func ref(p types.Type) string {
- return CurrentImports.LookupType(p)
-}
-
-var pkgReplacer = strings.NewReplacer(
- "/", "ᚋ",
- ".", "ᚗ",
- "-", "ᚑ",
- "~", "א",
-)
-
-func TypeIdentifier(t types.Type) string {
- res := ""
- for {
- switch it := t.(type) {
- case *types.Pointer:
- t.Underlying()
- res += "ᚖ"
- t = it.Elem()
- case *types.Slice:
- res += "ᚕ"
- t = it.Elem()
- case *types.Named:
- res += pkgReplacer.Replace(it.Obj().Pkg().Path())
- res += "ᚐ"
- res += it.Obj().Name()
- return res
- case *types.Basic:
- res += it.Name()
- return res
- case *types.Map:
- res += "map"
- return res
- case *types.Interface:
- res += "interface"
- return res
- default:
- panic(fmt.Errorf("unexpected type %T", it))
- }
- }
-}
-
-func Call(p *types.Func) string {
- pkg := CurrentImports.Lookup(p.Pkg().Path())
-
- if pkg != "" {
- pkg += "."
- }
-
- if p.Type() != nil {
- // make sure the returned type is listed in our imports.
- ref(p.Type().(*types.Signature).Results().At(0).Type())
- }
-
- return pkg + p.Name()
-}
-
-func ToGo(name string) string {
- if name == "_" {
- return "_"
- }
- runes := make([]rune, 0, len(name))
-
- wordWalker(name, func(info *wordInfo) {
- word := info.Word
- if info.MatchCommonInitial {
- word = strings.ToUpper(word)
- } else if !info.HasCommonInitial {
- if strings.ToUpper(word) == word || strings.ToLower(word) == word {
- // FOO or foo → Foo
- // FOo → FOo
- word = UcFirst(strings.ToLower(word))
- }
- }
- runes = append(runes, []rune(word)...)
- })
-
- return string(runes)
-}
-
-func ToGoPrivate(name string) string {
- if name == "_" {
- return "_"
- }
- runes := make([]rune, 0, len(name))
-
- first := true
- wordWalker(name, func(info *wordInfo) {
- word := info.Word
- switch {
- case first:
- if strings.ToUpper(word) == word || strings.ToLower(word) == word {
- // ID → id, CAMEL → camel
- word = strings.ToLower(info.Word)
- } else {
- // ITicket → iTicket
- word = LcFirst(info.Word)
- }
- first = false
- case info.MatchCommonInitial:
- word = strings.ToUpper(word)
- case !info.HasCommonInitial:
- word = UcFirst(strings.ToLower(word))
- }
- runes = append(runes, []rune(word)...)
- })
-
- return sanitizeKeywords(string(runes))
-}
-
-type wordInfo struct {
- Word string
- MatchCommonInitial bool
- HasCommonInitial bool
-}
-
-// This function is based on the following code.
-// https://github.com/golang/lint/blob/06c8688daad7faa9da5a0c2f163a3d14aac986ca/lint.go#L679
-func wordWalker(str string, f func(*wordInfo)) {
- runes := []rune(strings.TrimFunc(str, isDelimiter))
- w, i := 0, 0 // index of start of word, scan
- hasCommonInitial := false
- for i+1 <= len(runes) {
- eow := false // whether we hit the end of a word
- switch {
- case i+1 == len(runes):
- eow = true
- case isDelimiter(runes[i+1]):
- // underscore; shift the remainder forward over any run of underscores
- eow = true
- n := 1
- for i+n+1 < len(runes) && isDelimiter(runes[i+n+1]) {
- n++
- }
-
- // Leave at most one underscore if the underscore is between two digits
- if i+n+1 < len(runes) && unicode.IsDigit(runes[i]) && unicode.IsDigit(runes[i+n+1]) {
- n--
- }
-
- copy(runes[i+1:], runes[i+n+1:])
- runes = runes[:len(runes)-n]
- case unicode.IsLower(runes[i]) && !unicode.IsLower(runes[i+1]):
- // lower->non-lower
- eow = true
- }
- i++
-
- // [w,i) is a word.
- word := string(runes[w:i])
- if !eow && commonInitialisms[word] && !unicode.IsLower(runes[i]) {
- // through
- // split IDFoo → ID, Foo
- // but URLs → URLs
- } else if !eow {
- if commonInitialisms[word] {
- hasCommonInitial = true
- }
- continue
- }
-
- matchCommonInitial := false
- if commonInitialisms[strings.ToUpper(word)] {
- hasCommonInitial = true
- matchCommonInitial = true
- }
-
- f(&wordInfo{
- Word: word,
- MatchCommonInitial: matchCommonInitial,
- HasCommonInitial: hasCommonInitial,
- })
- hasCommonInitial = false
- w = i
- }
-}
-
-var keywords = []string{
- "break",
- "default",
- "func",
- "interface",
- "select",
- "case",
- "defer",
- "go",
- "map",
- "struct",
- "chan",
- "else",
- "goto",
- "package",
- "switch",
- "const",
- "fallthrough",
- "if",
- "range",
- "type",
- "continue",
- "for",
- "import",
- "return",
- "var",
- "_",
-}
-
-// sanitizeKeywords prevents collisions with go keywords for arguments to resolver functions
-func sanitizeKeywords(name string) string {
- for _, k := range keywords {
- if name == k {
- return name + "Arg"
- }
- }
- return name
-}
-
-// commonInitialisms is a set of common initialisms.
-// Only add entries that are highly unlikely to be non-initialisms.
-// For instance, "ID" is fine (Freudian code is rare), but "AND" is not.
-var commonInitialisms = map[string]bool{
- "ACL": true,
- "API": true,
- "ASCII": true,
- "CPU": true,
- "CSS": true,
- "CSV": true,
- "DNS": true,
- "EOF": true,
- "GUID": true,
- "HTML": true,
- "HTTP": true,
- "HTTPS": true,
- "ICMP": true,
- "ID": true,
- "IP": true,
- "JSON": true,
- "KVK": true,
- "LHS": true,
- "PDF": true,
- "PGP": true,
- "QPS": true,
- "QR": true,
- "RAM": true,
- "RHS": true,
- "RPC": true,
- "SLA": true,
- "SMTP": true,
- "SQL": true,
- "SSH": true,
- "SVG": true,
- "TCP": true,
- "TLS": true,
- "TTL": true,
- "UDP": true,
- "UI": true,
- "UID": true,
- "URI": true,
- "URL": true,
- "UTF8": true,
- "UUID": true,
- "VM": true,
- "XML": true,
- "XMPP": true,
- "XSRF": true,
- "XSS": true,
-}
-
-func rawQuote(s string) string {
- return "`" + strings.ReplaceAll(s, "`", "`+\"`\"+`") + "`"
-}
-
-func notNil(field string, data interface{}) bool {
- v := reflect.ValueOf(data)
-
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- if v.Kind() != reflect.Struct {
- return false
- }
- val := v.FieldByName(field)
-
- return val.IsValid() && !val.IsNil()
-}
-
-func Dump(val interface{}) string {
- switch val := val.(type) {
- case int:
- return strconv.Itoa(val)
- case int64:
- return fmt.Sprintf("%d", val)
- case float64:
- return fmt.Sprintf("%f", val)
- case string:
- return strconv.Quote(val)
- case bool:
- return strconv.FormatBool(val)
- case nil:
- return "nil"
- case []interface{}:
- var parts []string
- for _, part := range val {
- parts = append(parts, Dump(part))
- }
- return "[]interface{}{" + strings.Join(parts, ",") + "}"
- case map[string]interface{}:
- buf := bytes.Buffer{}
- buf.WriteString("map[string]interface{}{")
- var keys []string
- for key := range val {
- keys = append(keys, key)
- }
- sort.Strings(keys)
-
- for _, key := range keys {
- data := val[key]
-
- buf.WriteString(strconv.Quote(key))
- buf.WriteString(":")
- buf.WriteString(Dump(data))
- buf.WriteString(",")
- }
- buf.WriteString("}")
- return buf.String()
- default:
- panic(fmt.Errorf("unsupported type %T", val))
- }
-}
-
-func prefixLines(prefix, s string) string {
- return prefix + strings.ReplaceAll(s, "\n", "\n"+prefix)
-}
-
-func resolveName(name string, skip int) string {
- if name[0] == '.' {
- // load path relative to calling source file
- _, callerFile, _, _ := runtime.Caller(skip + 1)
- return filepath.Join(filepath.Dir(callerFile), name[1:])
- }
-
- // load path relative to this directory
- _, callerFile, _, _ := runtime.Caller(0)
- return filepath.Join(filepath.Dir(callerFile), name)
-}
-
-func render(filename string, tpldata interface{}) (*bytes.Buffer, error) {
- t := template.New("").Funcs(Funcs())
-
- b, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, err
- }
-
- t, err = t.New(filepath.Base(filename)).Parse(string(b))
- if err != nil {
- panic(err)
- }
-
- buf := &bytes.Buffer{}
- return buf, t.Execute(buf, tpldata)
-}
-
-func write(filename string, b []byte, packages *code.Packages) error {
- err := os.MkdirAll(filepath.Dir(filename), 0o755)
- if err != nil {
- return fmt.Errorf("failed to create directory: %w", err)
- }
-
- formatted, err := imports.Prune(filename, b, packages)
- if err != nil {
- fmt.Fprintf(os.Stderr, "gofmt failed on %s: %s\n", filepath.Base(filename), err.Error())
- formatted = b
- }
-
- err = ioutil.WriteFile(filename, formatted, 0o644)
- if err != nil {
- return fmt.Errorf("failed to write %s: %w", filename, err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/type.go b/vendor/github.com/99designs/gqlgen/codegen/type.go
deleted file mode 100644
index 20b09dc9755..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/type.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package codegen
-
-import (
- "fmt"
-
- "github.com/99designs/gqlgen/codegen/config"
-)
-
-func (b *builder) buildTypes() map[string]*config.TypeReference {
- ret := map[string]*config.TypeReference{}
- for _, ref := range b.Binder.References {
- processType(ret, ref)
- }
- return ret
-}
-
-func processType(ret map[string]*config.TypeReference, ref *config.TypeReference) {
- key := ref.UniquenessKey()
- if existing, found := ret[key]; found {
- // Simplistic check of content which is obviously different.
- existingGQL := fmt.Sprintf("%v", existing.GQL)
- newGQL := fmt.Sprintf("%v", ref.GQL)
- if existingGQL != newGQL {
- panic(fmt.Sprintf("non-unique key \"%s\", trying to replace %s with %s", key, existingGQL, newGQL))
- }
- }
- ret[key] = ref
-
- if ref.IsSlice() || ref.IsPtrToSlice() || ref.IsPtrToPtr() {
- processType(ret, ref.Elem())
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/type.gotpl b/vendor/github.com/99designs/gqlgen/codegen/type.gotpl
deleted file mode 100644
index 1fc6319c555..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/type.gotpl
+++ /dev/null
@@ -1,192 +0,0 @@
-{{- range $type := .ReferencedTypes }}
- {{ with $type.UnmarshalFunc }}
- func (ec *executionContext) {{ . }}(ctx context.Context, v interface{}) ({{ $type.GO | ref }}, error) {
- {{- if and $type.IsNilable (not $type.GQL.NonNull) (not $type.IsPtrToPtr) }}
- if v == nil { return nil, nil }
- {{- end }}
- {{- if $type.IsPtrToSlice }}
- res, err := ec.{{ $type.Elem.UnmarshalFunc }}(ctx, v)
- return &res, graphql.ErrorOnPath(ctx, err)
- {{- else if $type.IsSlice }}
- var vSlice []interface{}
- if v != nil {
- vSlice = graphql.CoerceList(v)
- }
- var err error
- res := make([]{{$type.GO.Elem | ref}}, len(vSlice))
- for i := range vSlice {
- ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
- res[i], err = ec.{{ $type.Elem.UnmarshalFunc }}(ctx, vSlice[i])
- if err != nil {
- return nil, err
- }
- }
- return res, nil
- {{- else if and $type.IsPtrToPtr (not $type.Unmarshaler) (not $type.IsMarshaler) }}
- var pres {{ $type.Elem.GO | ref }}
- if v != nil {
- res, err := ec.{{ $type.Elem.UnmarshalFunc }}(ctx, v)
- if err != nil {
- return nil, graphql.ErrorOnPath(ctx, err)
- }
- pres = res
- }
- return &pres, nil
- {{- else }}
- {{- if $type.Unmarshaler }}
- {{- if $type.CastType }}
- {{- if $type.IsContext }}
- tmp, err := {{ $type.Unmarshaler | call }}(ctx, v)
- {{- else }}
- tmp, err := {{ $type.Unmarshaler | call }}(v)
- {{- end }}
- {{- if and $type.IsNilable $type.Elem }}
- res := {{ $type.Elem.GO | ref }}(tmp)
- {{- else}}
- res := {{ $type.GO | ref }}(tmp)
- {{- end }}
- {{- else}}
- {{- if $type.IsContext }}
- res, err := {{ $type.Unmarshaler | call }}(ctx, v)
- {{- else }}
- res, err := {{ $type.Unmarshaler | call }}(v)
- {{- end }}
- {{- end }}
- {{- if and $type.IsTargetNilable (not $type.IsNilable) }}
- return *res, graphql.ErrorOnPath(ctx, err)
- {{- else if and (not $type.IsTargetNilable) $type.IsNilable }}
- return &res, graphql.ErrorOnPath(ctx, err)
- {{- else}}
- return res, graphql.ErrorOnPath(ctx, err)
- {{- end }}
- {{- else if eq ($type.GO | ref) "map[string]interface{}" }}
- return v.(map[string]interface{}), nil
- {{- else if $type.IsMarshaler }}
- {{- if and $type.IsNilable $type.Elem }}
- var res = new({{ $type.Elem.GO | ref }})
- {{- else}}
- var res {{ $type.GO | ref }}
- {{- end }}
- {{- if $type.IsContext }}
- err := res.UnmarshalGQLContext(ctx, v)
- {{- else }}
- err := res.UnmarshalGQL(v)
- {{- end }}
- return res, graphql.ErrorOnPath(ctx, err)
- {{- else }}
- res, err := ec.unmarshalInput{{ $type.GQL.Name }}(ctx, v)
- {{- if $type.IsNilable }}
- return &res, graphql.ErrorOnPath(ctx, err)
- {{- else}}
- return res, graphql.ErrorOnPath(ctx, err)
- {{- end }}
- {{- end }}
- {{- end }}
- }
- {{- end }}
-
- {{ with $type.MarshalFunc }}
- func (ec *executionContext) {{ . }}(ctx context.Context, sel ast.SelectionSet, v {{ $type.GO | ref }}) graphql.Marshaler {
- {{- if $type.IsPtrToSlice }}
- return ec.{{ $type.Elem.MarshalFunc }}(ctx, sel, *v)
- {{- else if $type.IsSlice }}
- {{- if not $type.GQL.NonNull }}
- if v == nil {
- return graphql.Null
- }
- {{- end }}
- ret := make(graphql.Array, len(v))
- {{- if not $type.IsScalar }}
- var wg sync.WaitGroup
- isLen1 := len(v) == 1
- if !isLen1 {
- wg.Add(len(v))
- }
- {{- end }}
- for i := range v {
- {{- if not $type.IsScalar }}
- i := i
- fc := &graphql.FieldContext{
- Index: &i,
- Result: &v[i],
- }
- ctx := graphql.WithFieldContext(ctx, fc)
- f := func(i int) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = nil
- }
- }()
- if !isLen1 {
- defer wg.Done()
- }
- ret[i] = ec.{{ $type.Elem.MarshalFunc }}(ctx, sel, v[i])
- }
- if isLen1 {
- f(i)
- } else {
- go f(i)
- }
- {{ else }}
- ret[i] = ec.{{ $type.Elem.MarshalFunc }}(ctx, sel, v[i])
- {{- end }}
- }
- {{ if not $type.IsScalar }} wg.Wait() {{ end }}
- {{ if $type.Elem.GQL.NonNull }}
- for _, e := range ret {
- if e == graphql.Null {
- return graphql.Null
- }
- }
- {{ end }}
- return ret
- {{- else if and $type.IsPtrToPtr (not $type.Unmarshaler) (not $type.IsMarshaler) }}
- if v == nil {
- return graphql.Null
- }
- return ec.{{ $type.Elem.MarshalFunc }}(ctx, sel, *v)
- {{- else }}
- {{- if $type.IsNilable }}
- if v == nil {
- {{- if $type.GQL.NonNull }}
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- {{- end }}
- return graphql.Null
- }
- {{- end }}
- {{- if $type.IsMarshaler }}
- {{- if $type.IsContext }}
- return graphql.WrapContextMarshaler(ctx, v)
- {{- else }}
- return v
- {{- end }}
- {{- else if $type.Marshaler }}
- {{- $v := "v" }}
- {{- if and $type.IsTargetNilable (not $type.IsNilable) }}
- {{- $v = "&v" }}
- {{- else if and (not $type.IsTargetNilable) $type.IsNilable }}
- {{- $v = "*v" }}
- {{- end }}
- res := {{ $type.Marshaler | call }}({{- if $type.CastType }}{{ $type.CastType | ref }}({{ $v }}){{else}}{{ $v }}{{- end }})
- {{- if $type.GQL.NonNull }}
- if res == graphql.Null {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
- }
- }
- {{- end }}
- {{- if $type.IsContext }}
- return graphql.WrapContextMarshaler(ctx, res)
- {{- else }}
- return res
- {{- end }}
- {{- else }}
- return ec._{{$type.Definition.Name}}(ctx, sel, {{ if not $type.IsNilable}}&{{end}} v)
- {{- end }}
- {{- end }}
- }
- {{- end }}
-{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/util.go b/vendor/github.com/99designs/gqlgen/codegen/util.go
deleted file mode 100644
index fa2ceed3dfe..00000000000
--- a/vendor/github.com/99designs/gqlgen/codegen/util.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package codegen
-
-import (
- "fmt"
- "go/types"
- "strings"
-)
-
-func findGoNamedType(def types.Type) (*types.Named, error) {
- if def == nil {
- return nil, nil
- }
-
- namedType, ok := def.(*types.Named)
- if !ok {
- return nil, fmt.Errorf("expected %s to be a named type, instead found %T\n", def.String(), def)
- }
-
- return namedType, nil
-}
-
-func findGoInterface(def types.Type) (*types.Interface, error) {
- if def == nil {
- return nil, nil
- }
- namedType, err := findGoNamedType(def)
- if err != nil {
- return nil, err
- }
- if namedType == nil {
- return nil, nil
- }
-
- underlying, ok := namedType.Underlying().(*types.Interface)
- if !ok {
- return nil, fmt.Errorf("expected %s to be a named interface, instead found %s", def.String(), namedType.String())
- }
-
- return underlying, nil
-}
-
-func equalFieldName(source, target string) bool {
- source = strings.ReplaceAll(source, "_", "")
- target = strings.ReplaceAll(target, "_", "")
- return strings.EqualFold(source, target)
-}
diff --git a/vendor/github.com/99designs/gqlgen/complexity/complexity.go b/vendor/github.com/99designs/gqlgen/complexity/complexity.go
deleted file mode 100644
index e3ecf7612d5..00000000000
--- a/vendor/github.com/99designs/gqlgen/complexity/complexity.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package complexity
-
-import (
- "github.com/99designs/gqlgen/graphql"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-func Calculate(es graphql.ExecutableSchema, op *ast.OperationDefinition, vars map[string]interface{}) int {
- walker := complexityWalker{
- es: es,
- schema: es.Schema(),
- vars: vars,
- }
- return walker.selectionSetComplexity(op.SelectionSet)
-}
-
-type complexityWalker struct {
- es graphql.ExecutableSchema
- schema *ast.Schema
- vars map[string]interface{}
-}
-
-func (cw complexityWalker) selectionSetComplexity(selectionSet ast.SelectionSet) int {
- var complexity int
- for _, selection := range selectionSet {
- switch s := selection.(type) {
- case *ast.Field:
- fieldDefinition := cw.schema.Types[s.Definition.Type.Name()]
-
- if fieldDefinition.Name == "__Schema" {
- continue
- }
-
- var childComplexity int
- switch fieldDefinition.Kind {
- case ast.Object, ast.Interface, ast.Union:
- childComplexity = cw.selectionSetComplexity(s.SelectionSet)
- }
-
- args := s.ArgumentMap(cw.vars)
- var fieldComplexity int
- if s.ObjectDefinition.Kind == ast.Interface {
- fieldComplexity = cw.interfaceFieldComplexity(s.ObjectDefinition, s.Name, childComplexity, args)
- } else {
- fieldComplexity = cw.fieldComplexity(s.ObjectDefinition.Name, s.Name, childComplexity, args)
- }
- complexity = safeAdd(complexity, fieldComplexity)
-
- case *ast.FragmentSpread:
- complexity = safeAdd(complexity, cw.selectionSetComplexity(s.Definition.SelectionSet))
-
- case *ast.InlineFragment:
- complexity = safeAdd(complexity, cw.selectionSetComplexity(s.SelectionSet))
- }
- }
- return complexity
-}
-
-func (cw complexityWalker) interfaceFieldComplexity(def *ast.Definition, field string, childComplexity int, args map[string]interface{}) int {
- // Interfaces don't have their own separate field costs, so they have to assume the worst case.
- // We iterate over all implementors and choose the most expensive one.
- maxComplexity := 0
- implementors := cw.schema.GetPossibleTypes(def)
- for _, t := range implementors {
- fieldComplexity := cw.fieldComplexity(t.Name, field, childComplexity, args)
- if fieldComplexity > maxComplexity {
- maxComplexity = fieldComplexity
- }
- }
- return maxComplexity
-}
-
-func (cw complexityWalker) fieldComplexity(object, field string, childComplexity int, args map[string]interface{}) int {
- if customComplexity, ok := cw.es.Complexity(object, field, childComplexity, args); ok && customComplexity >= childComplexity {
- return customComplexity
- }
- // default complexity calculation
- return safeAdd(1, childComplexity)
-}
-
-const maxInt = int(^uint(0) >> 1)
-
-// safeAdd is a saturating add of a and b that ignores negative operands.
-// If a + b would overflow through normal Go addition,
-// it returns the maximum integer value instead.
-//
-// Adding complexities with this function prevents attackers from intentionally
-// overflowing the complexity calculation to allow overly-complex queries.
-//
-// It also helps mitigate the impact of custom complexities that accidentally
-// return negative values.
-func safeAdd(a, b int) int {
- // Ignore negative operands.
- if a < 0 {
- if b < 0 {
- return 1
- }
- return b
- } else if b < 0 {
- return a
- }
-
- c := a + b
- if c < a {
- // Set c to maximum integer instead of overflowing.
- c = maxInt
- }
- return c
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/any.go b/vendor/github.com/99designs/gqlgen/graphql/any.go
deleted file mode 100644
index 6ea8bf2eaeb..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/any.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
- "io"
-)
-
-func MarshalAny(v interface{}) Marshaler {
- return WriterFunc(func(w io.Writer) {
- err := json.NewEncoder(w).Encode(v)
- if err != nil {
- panic(err)
- }
- })
-}
-
-func UnmarshalAny(v interface{}) (interface{}, error) {
- return v, nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/bool.go b/vendor/github.com/99designs/gqlgen/graphql/bool.go
deleted file mode 100644
index f435e0c0988..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/bool.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package graphql
-
-import (
- "fmt"
- "io"
- "strings"
-)
-
-func MarshalBoolean(b bool) Marshaler {
- if b {
- return WriterFunc(func(w io.Writer) { w.Write(trueLit) })
- }
- return WriterFunc(func(w io.Writer) { w.Write(falseLit) })
-}
-
-func UnmarshalBoolean(v interface{}) (bool, error) {
- switch v := v.(type) {
- case string:
- return strings.ToLower(v) == "true", nil
- case int:
- return v != 0, nil
- case bool:
- return v, nil
- default:
- return false, fmt.Errorf("%T is not a bool", v)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/cache.go b/vendor/github.com/99designs/gqlgen/graphql/cache.go
deleted file mode 100644
index fe86ca35028..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/cache.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package graphql
-
-import "context"
-
-// Cache is a shared store for APQ and query AST caching
-type Cache interface {
- // Get looks up a key's value from the cache.
- Get(ctx context.Context, key string) (value interface{}, ok bool)
-
- // Add adds a value to the cache.
- Add(ctx context.Context, key string, value interface{})
-}
-
-// MapCache is the simplest implementation of a cache, because it can not evict it should only be used in tests
-type MapCache map[string]interface{}
-
-// Get looks up a key's value from the cache.
-func (m MapCache) Get(ctx context.Context, key string) (value interface{}, ok bool) {
- v, ok := m[key]
- return v, ok
-}
-
-// Add adds a value to the cache.
-func (m MapCache) Add(ctx context.Context, key string, value interface{}) { m[key] = value }
-
-type NoCache struct{}
-
-func (n NoCache) Get(ctx context.Context, key string) (value interface{}, ok bool) { return nil, false }
-func (n NoCache) Add(ctx context.Context, key string, value interface{}) {}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/coercion.go b/vendor/github.com/99designs/gqlgen/graphql/coercion.go
deleted file mode 100644
index d3d3c18b2b1..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/coercion.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
-)
-
-// CoerceList applies coercion from a single value to a list.
-func CoerceList(v interface{}) []interface{} {
- var vSlice []interface{}
- if v != nil {
- switch v := v.(type) {
- case []interface{}:
- // already a slice no coercion required
- vSlice = v
- case []string:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []json.Number:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []bool:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []map[string]interface{}:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []float64:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []float32:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []int:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []int32:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- case []int64:
- if len(v) > 0 {
- vSlice = []interface{}{v[0]}
- }
- default:
- vSlice = []interface{}{v}
- }
- }
- return vSlice
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_field.go b/vendor/github.com/99designs/gqlgen/graphql/context_field.go
deleted file mode 100644
index c06118b2c5e..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/context_field.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package graphql
-
-import (
- "context"
- "time"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type key string
-
-const resolverCtx key = "resolver_context"
-
-// Deprecated: Use FieldContext instead
-type ResolverContext = FieldContext
-
-type FieldContext struct {
- Parent *FieldContext
- // The name of the type this field belongs to
- Object string
- // These are the args after processing, they can be mutated in middleware to change what the resolver will get.
- Args map[string]interface{}
- // The raw field
- Field CollectedField
- // The index of array in path.
- Index *int
- // The result object of resolver
- Result interface{}
- // IsMethod indicates if the resolver is a method
- IsMethod bool
- // IsResolver indicates if the field has a user-specified resolver
- IsResolver bool
-}
-
-type FieldStats struct {
- // When field execution started
- Started time.Time
-
- // When argument marshaling finished
- ArgumentsCompleted time.Time
-
- // When the field completed running all middleware. Not available inside field middleware!
- Completed time.Time
-}
-
-func (r *FieldContext) Path() ast.Path {
- var path ast.Path
- for it := r; it != nil; it = it.Parent {
- if it.Index != nil {
- path = append(path, ast.PathIndex(*it.Index))
- } else if it.Field.Field != nil {
- path = append(path, ast.PathName(it.Field.Alias))
- }
- }
-
- // because we are walking up the chain, all the elements are backwards, do an inplace flip.
- for i := len(path)/2 - 1; i >= 0; i-- {
- opp := len(path) - 1 - i
- path[i], path[opp] = path[opp], path[i]
- }
-
- return path
-}
-
-// Deprecated: Use GetFieldContext instead
-func GetResolverContext(ctx context.Context) *ResolverContext {
- return GetFieldContext(ctx)
-}
-
-func GetFieldContext(ctx context.Context) *FieldContext {
- if val, ok := ctx.Value(resolverCtx).(*FieldContext); ok {
- return val
- }
- return nil
-}
-
-func WithFieldContext(ctx context.Context, rc *FieldContext) context.Context {
- rc.Parent = GetFieldContext(ctx)
- return context.WithValue(ctx, resolverCtx, rc)
-}
-
-func equalPath(a ast.Path, b ast.Path) bool {
- if len(a) != len(b) {
- return false
- }
-
- for i := 0; i < len(a); i++ {
- if a[i] != b[i] {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_operation.go b/vendor/github.com/99designs/gqlgen/graphql/context_operation.go
deleted file mode 100644
index bfbbc5c002f..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/context_operation.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package graphql
-
-import (
- "context"
- "errors"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-// Deprecated: Please update all references to OperationContext instead
-type RequestContext = OperationContext
-
-type OperationContext struct {
- RawQuery string
- Variables map[string]interface{}
- OperationName string
- Doc *ast.QueryDocument
-
- Operation *ast.OperationDefinition
- DisableIntrospection bool
- RecoverFunc RecoverFunc
- ResolverMiddleware FieldMiddleware
- RootResolverMiddleware RootFieldMiddleware
-
- Stats Stats
-}
-
-func (c *OperationContext) Validate(ctx context.Context) error {
- if c.Doc == nil {
- return errors.New("field 'Doc'is required")
- }
- if c.RawQuery == "" {
- return errors.New("field 'RawQuery' is required")
- }
- if c.Variables == nil {
- c.Variables = make(map[string]interface{})
- }
- if c.ResolverMiddleware == nil {
- return errors.New("field 'ResolverMiddleware' is required")
- }
- if c.RootResolverMiddleware == nil {
- return errors.New("field 'RootResolverMiddleware' is required")
- }
- if c.RecoverFunc == nil {
- c.RecoverFunc = DefaultRecover
- }
-
- return nil
-}
-
-const operationCtx key = "operation_context"
-
-// Deprecated: Please update all references to GetOperationContext instead
-func GetRequestContext(ctx context.Context) *RequestContext {
- return GetOperationContext(ctx)
-}
-
-func GetOperationContext(ctx context.Context) *OperationContext {
- if val, ok := ctx.Value(operationCtx).(*OperationContext); ok && val != nil {
- return val
- }
- panic("missing operation context")
-}
-
-func WithOperationContext(ctx context.Context, rc *OperationContext) context.Context {
- return context.WithValue(ctx, operationCtx, rc)
-}
-
-// HasOperationContext checks if the given context is part of an ongoing operation
-//
-// Some errors can happen outside of an operation, eg json unmarshal errors.
-func HasOperationContext(ctx context.Context) bool {
- _, ok := ctx.Value(operationCtx).(*OperationContext)
- return ok
-}
-
-// This is just a convenient wrapper method for CollectFields
-func CollectFieldsCtx(ctx context.Context, satisfies []string) []CollectedField {
- resctx := GetFieldContext(ctx)
- return CollectFields(GetOperationContext(ctx), resctx.Field.Selections, satisfies)
-}
-
-// CollectAllFields returns a slice of all GraphQL field names that were selected for the current resolver context.
-// The slice will contain the unique set of all field names requested regardless of fragment type conditions.
-func CollectAllFields(ctx context.Context) []string {
- resctx := GetFieldContext(ctx)
- collected := CollectFields(GetOperationContext(ctx), resctx.Field.Selections, nil)
- uniq := make([]string, 0, len(collected))
-Next:
- for _, f := range collected {
- for _, name := range uniq {
- if name == f.Name {
- continue Next
- }
- }
- uniq = append(uniq, f.Name)
- }
- return uniq
-}
-
-// Errorf sends an error string to the client, passing it through the formatter.
-// Deprecated: use graphql.AddErrorf(ctx, err) instead
-func (c *OperationContext) Errorf(ctx context.Context, format string, args ...interface{}) {
- AddErrorf(ctx, format, args...)
-}
-
-// Error sends an error to the client, passing it through the formatter.
-// Deprecated: use graphql.AddError(ctx, err) instead
-func (c *OperationContext) Error(ctx context.Context, err error) {
- AddError(ctx, err)
-}
-
-func (c *OperationContext) Recover(ctx context.Context, err interface{}) error {
- return ErrorOnPath(ctx, c.RecoverFunc(ctx, err))
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_path.go b/vendor/github.com/99designs/gqlgen/graphql/context_path.go
deleted file mode 100644
index a46ed83ddc4..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/context_path.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package graphql
-
-import (
- "context"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-const fieldInputCtx key = "path_context"
-
-type PathContext struct {
- ParentField *FieldContext
- Parent *PathContext
- Field *string
- Index *int
-}
-
-func (fic *PathContext) Path() ast.Path {
- var path ast.Path
- for it := fic; it != nil; it = it.Parent {
- if it.Index != nil {
- path = append(path, ast.PathIndex(*it.Index))
- } else if it.Field != nil {
- path = append(path, ast.PathName(*it.Field))
- }
- }
-
- // because we are walking up the chain, all the elements are backwards, do an inplace flip.
- for i := len(path)/2 - 1; i >= 0; i-- {
- opp := len(path) - 1 - i
- path[i], path[opp] = path[opp], path[i]
- }
-
- if fic.ParentField != nil {
- fieldPath := fic.ParentField.Path()
- return append(fieldPath, path...)
-
- }
-
- return path
-}
-
-func NewPathWithField(field string) *PathContext {
- return &PathContext{Field: &field}
-}
-
-func NewPathWithIndex(index int) *PathContext {
- return &PathContext{Index: &index}
-}
-
-func WithPathContext(ctx context.Context, fic *PathContext) context.Context {
- if fieldContext := GetFieldContext(ctx); fieldContext != nil {
- fic.ParentField = fieldContext
- }
- if fieldInputContext := GetPathContext(ctx); fieldInputContext != nil {
- fic.Parent = fieldInputContext
- }
-
- return context.WithValue(ctx, fieldInputCtx, fic)
-}
-
-func GetPathContext(ctx context.Context) *PathContext {
- if val, ok := ctx.Value(fieldInputCtx).(*PathContext); ok {
- return val
- }
- return nil
-}
-
-func GetPath(ctx context.Context) ast.Path {
- if pc := GetPathContext(ctx); pc != nil {
- return pc.Path()
- }
- if fc := GetFieldContext(ctx); fc != nil {
- return fc.Path()
- }
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_response.go b/vendor/github.com/99designs/gqlgen/graphql/context_response.go
deleted file mode 100644
index c128fdb49ce..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/context_response.go
+++ /dev/null
@@ -1,153 +0,0 @@
-package graphql
-
-import (
- "context"
- "fmt"
- "sync"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type responseContext struct {
- errorPresenter ErrorPresenterFunc
- recover RecoverFunc
-
- errors gqlerror.List
- errorsMu sync.Mutex
-
- extensions map[string]interface{}
- extensionsMu sync.Mutex
-}
-
-const resultCtx key = "result_context"
-
-func getResponseContext(ctx context.Context) *responseContext {
- val, ok := ctx.Value(resultCtx).(*responseContext)
- if !ok {
- panic("missing response context")
- }
- return val
-}
-
-func WithResponseContext(ctx context.Context, presenterFunc ErrorPresenterFunc, recoverFunc RecoverFunc) context.Context {
- return context.WithValue(ctx, resultCtx, &responseContext{
- errorPresenter: presenterFunc,
- recover: recoverFunc,
- })
-}
-
-// AddErrorf writes a formatted error to the client, first passing it through the error presenter.
-func AddErrorf(ctx context.Context, format string, args ...interface{}) {
- AddError(ctx, fmt.Errorf(format, args...))
-}
-
-// AddError sends an error to the client, first passing it through the error presenter.
-func AddError(ctx context.Context, err error) {
- c := getResponseContext(ctx)
-
- presentedError := c.errorPresenter(ctx, ErrorOnPath(ctx, err))
-
- c.errorsMu.Lock()
- defer c.errorsMu.Unlock()
- c.errors = append(c.errors, presentedError)
-}
-
-func Recover(ctx context.Context, err interface{}) (userMessage error) {
- c := getResponseContext(ctx)
- return ErrorOnPath(ctx, c.recover(ctx, err))
-}
-
-// HasFieldError returns true if the given field has already errored
-func HasFieldError(ctx context.Context, rctx *FieldContext) bool {
- c := getResponseContext(ctx)
-
- c.errorsMu.Lock()
- defer c.errorsMu.Unlock()
-
- if len(c.errors) == 0 {
- return false
- }
-
- path := rctx.Path()
- for _, err := range c.errors {
- if equalPath(err.Path, path) {
- return true
- }
- }
- return false
-}
-
-// GetFieldErrors returns a list of errors that occurred in the given field
-func GetFieldErrors(ctx context.Context, rctx *FieldContext) gqlerror.List {
- c := getResponseContext(ctx)
-
- c.errorsMu.Lock()
- defer c.errorsMu.Unlock()
-
- if len(c.errors) == 0 {
- return nil
- }
-
- path := rctx.Path()
- var errs gqlerror.List
- for _, err := range c.errors {
- if equalPath(err.Path, path) {
- errs = append(errs, err)
- }
- }
- return errs
-}
-
-func GetErrors(ctx context.Context) gqlerror.List {
- resCtx := getResponseContext(ctx)
- resCtx.errorsMu.Lock()
- defer resCtx.errorsMu.Unlock()
-
- if len(resCtx.errors) == 0 {
- return nil
- }
-
- errs := resCtx.errors
- cpy := make(gqlerror.List, len(errs))
- for i := range errs {
- errCpy := *errs[i]
- cpy[i] = &errCpy
- }
- return cpy
-}
-
-// RegisterExtension allows you to add a new extension into the graphql response
-func RegisterExtension(ctx context.Context, key string, value interface{}) {
- c := getResponseContext(ctx)
- c.extensionsMu.Lock()
- defer c.extensionsMu.Unlock()
-
- if c.extensions == nil {
- c.extensions = make(map[string]interface{})
- }
-
- if _, ok := c.extensions[key]; ok {
- panic(fmt.Errorf("extension already registered for key %s", key))
- }
-
- c.extensions[key] = value
-}
-
-// GetExtensions returns any extensions registered in the current result context
-func GetExtensions(ctx context.Context) map[string]interface{} {
- ext := getResponseContext(ctx).extensions
- if ext == nil {
- return map[string]interface{}{}
- }
-
- return ext
-}
-
-func GetExtension(ctx context.Context, name string) interface{} {
- ext := getResponseContext(ctx).extensions
- if ext == nil {
- return nil
- }
-
- return ext[name]
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_root_field.go b/vendor/github.com/99designs/gqlgen/graphql/context_root_field.go
deleted file mode 100644
index 1bf4d13b84d..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/context_root_field.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package graphql
-
-import (
- "context"
-)
-
-const rootResolverCtx key = "root_resolver_context"
-
-type RootFieldContext struct {
- // The name of the type this field belongs to
- Object string
- // The raw field
- Field CollectedField
-}
-
-func GetRootFieldContext(ctx context.Context) *RootFieldContext {
- if val, ok := ctx.Value(rootResolverCtx).(*RootFieldContext); ok {
- return val
- }
- return nil
-}
-
-func WithRootFieldContext(ctx context.Context, rc *RootFieldContext) context.Context {
- return context.WithValue(ctx, rootResolverCtx, rc)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/errcode/codes.go b/vendor/github.com/99designs/gqlgen/graphql/errcode/codes.go
deleted file mode 100644
index 98b95d0050c..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/errcode/codes.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package errcode
-
-import (
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-const (
- ValidationFailed = "GRAPHQL_VALIDATION_FAILED"
- ParseFailed = "GRAPHQL_PARSE_FAILED"
-)
-
-type ErrorKind int
-
-const (
- // issues with graphql (validation, parsing). 422s in http, GQL_ERROR in websocket
- KindProtocol ErrorKind = iota
- // user errors, 200s in http, GQL_DATA in websocket
- KindUser
-)
-
-var codeType = map[string]ErrorKind{
- ValidationFailed: KindProtocol,
- ParseFailed: KindProtocol,
-}
-
-// RegisterErrorType should be called by extensions that want to customize the http status codes for errors they return
-func RegisterErrorType(code string, kind ErrorKind) {
- codeType[code] = kind
-}
-
-// Set the error code on a given graphql error extension
-func Set(err *gqlerror.Error, value string) {
- if err.Extensions == nil {
- err.Extensions = map[string]interface{}{}
- }
-
- err.Extensions["code"] = value
-}
-
-// get the kind of the first non User error, defaults to User if no errors have a custom extension
-func GetErrorKind(errs gqlerror.List) ErrorKind {
- for _, err := range errs {
- if code, ok := err.Extensions["code"].(string); ok {
- if kind, ok := codeType[code]; ok && kind != KindUser {
- return kind
- }
- }
- }
-
- return KindUser
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/error.go b/vendor/github.com/99designs/gqlgen/graphql/error.go
deleted file mode 100644
index 4fe520b2852..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/error.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package graphql
-
-import (
- "context"
- "errors"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type ErrorPresenterFunc func(ctx context.Context, err error) *gqlerror.Error
-
-func DefaultErrorPresenter(ctx context.Context, err error) *gqlerror.Error {
- var gqlErr *gqlerror.Error
- if errors.As(err, &gqlErr) {
- return gqlErr
- }
- return gqlerror.WrapPath(GetPath(ctx), err)
-}
-
-func ErrorOnPath(ctx context.Context, err error) error {
- if err == nil {
- return nil
- }
- var gqlErr *gqlerror.Error
- if errors.As(err, &gqlErr) {
- if gqlErr.Path == nil {
- gqlErr.Path = GetPath(ctx)
- }
- return gqlErr
- }
- return gqlerror.WrapPath(GetPath(ctx), err)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/executable_schema.go b/vendor/github.com/99designs/gqlgen/graphql/executable_schema.go
deleted file mode 100644
index 541b65fbeea..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/executable_schema.go
+++ /dev/null
@@ -1,162 +0,0 @@
-//go:generate go run github.com/matryer/moq -out executable_schema_mock.go . ExecutableSchema
-
-package graphql
-
-import (
- "context"
- "fmt"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type ExecutableSchema interface {
- Schema() *ast.Schema
-
- Complexity(typeName, fieldName string, childComplexity int, args map[string]interface{}) (int, bool)
- Exec(ctx context.Context) ResponseHandler
-}
-
-// CollectFields returns the set of fields from an ast.SelectionSet where all collected fields satisfy at least one of the GraphQL types
-// passed through satisfies. Providing an empty or nil slice for satisfies will return collect all fields regardless of fragment
-// type conditions.
-func CollectFields(reqCtx *OperationContext, selSet ast.SelectionSet, satisfies []string) []CollectedField {
- return collectFields(reqCtx, selSet, satisfies, map[string]bool{})
-}
-
-func collectFields(reqCtx *OperationContext, selSet ast.SelectionSet, satisfies []string, visited map[string]bool) []CollectedField {
- groupedFields := make([]CollectedField, 0, len(selSet))
-
- for _, sel := range selSet {
- switch sel := sel.(type) {
- case *ast.Field:
- if !shouldIncludeNode(sel.Directives, reqCtx.Variables) {
- continue
- }
- f := getOrCreateAndAppendField(&groupedFields, sel.Name, sel.Alias, sel.ObjectDefinition, func() CollectedField {
- return CollectedField{Field: sel}
- })
-
- f.Selections = append(f.Selections, sel.SelectionSet...)
-
- case *ast.InlineFragment:
- if !shouldIncludeNode(sel.Directives, reqCtx.Variables) {
- continue
- }
- if len(satisfies) > 0 && !instanceOf(sel.TypeCondition, satisfies) {
- continue
- }
- for _, childField := range collectFields(reqCtx, sel.SelectionSet, satisfies, visited) {
- f := getOrCreateAndAppendField(&groupedFields, childField.Name, childField.Alias, childField.ObjectDefinition, func() CollectedField { return childField })
- f.Selections = append(f.Selections, childField.Selections...)
- }
-
- case *ast.FragmentSpread:
- if !shouldIncludeNode(sel.Directives, reqCtx.Variables) {
- continue
- }
- fragmentName := sel.Name
- if _, seen := visited[fragmentName]; seen {
- continue
- }
- visited[fragmentName] = true
-
- fragment := reqCtx.Doc.Fragments.ForName(fragmentName)
- if fragment == nil {
- // should never happen, validator has already run
- panic(fmt.Errorf("missing fragment %s", fragmentName))
- }
-
- if len(satisfies) > 0 && !instanceOf(fragment.TypeCondition, satisfies) {
- continue
- }
-
- for _, childField := range collectFields(reqCtx, fragment.SelectionSet, satisfies, visited) {
- f := getOrCreateAndAppendField(&groupedFields, childField.Name, childField.Alias, childField.ObjectDefinition, func() CollectedField { return childField })
- f.Selections = append(f.Selections, childField.Selections...)
- }
-
- default:
- panic(fmt.Errorf("unsupported %T", sel))
- }
- }
-
- return groupedFields
-}
-
-type CollectedField struct {
- *ast.Field
-
- Selections ast.SelectionSet
-}
-
-func instanceOf(val string, satisfies []string) bool {
- for _, s := range satisfies {
- if val == s {
- return true
- }
- }
- return false
-}
-
-func getOrCreateAndAppendField(c *[]CollectedField, name string, alias string, objectDefinition *ast.Definition, creator func() CollectedField) *CollectedField {
- for i, cf := range *c {
- if cf.Name == name && cf.Alias == alias {
- if cf.ObjectDefinition == objectDefinition {
- return &(*c)[i]
- }
-
- if cf.ObjectDefinition == nil || objectDefinition == nil {
- continue
- }
-
- if cf.ObjectDefinition.Name == objectDefinition.Name {
- return &(*c)[i]
- }
-
- for _, ifc := range objectDefinition.Interfaces {
- if ifc == cf.ObjectDefinition.Name {
- return &(*c)[i]
- }
- }
- }
- }
-
- f := creator()
-
- *c = append(*c, f)
- return &(*c)[len(*c)-1]
-}
-
-func shouldIncludeNode(directives ast.DirectiveList, variables map[string]interface{}) bool {
- if len(directives) == 0 {
- return true
- }
-
- skip, include := false, true
-
- if d := directives.ForName("skip"); d != nil {
- skip = resolveIfArgument(d, variables)
- }
-
- if d := directives.ForName("include"); d != nil {
- include = resolveIfArgument(d, variables)
- }
-
- return !skip && include
-}
-
-func resolveIfArgument(d *ast.Directive, variables map[string]interface{}) bool {
- arg := d.Arguments.ForName("if")
- if arg == nil {
- panic(fmt.Sprintf("%s: argument 'if' not defined", d.Name))
- }
- value, err := arg.Value.Value(variables)
- if err != nil {
- panic(err)
- }
- ret, ok := value.(bool)
- if !ok {
- panic(fmt.Sprintf("%s: argument 'if' is not a boolean", d.Name))
- }
- return ret
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/executable_schema_mock.go b/vendor/github.com/99designs/gqlgen/graphql/executable_schema_mock.go
deleted file mode 100644
index 5d7433162fe..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/executable_schema_mock.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by moq; DO NOT EDIT.
-// github.com/matryer/moq
-
-package graphql
-
-import (
- "context"
- "github.com/vektah/gqlparser/v2/ast"
- "sync"
-)
-
-// Ensure, that ExecutableSchemaMock does implement ExecutableSchema.
-// If this is not the case, regenerate this file with moq.
-var _ ExecutableSchema = &ExecutableSchemaMock{}
-
-// ExecutableSchemaMock is a mock implementation of ExecutableSchema.
-//
-// func TestSomethingThatUsesExecutableSchema(t *testing.T) {
-//
-// // make and configure a mocked ExecutableSchema
-// mockedExecutableSchema := &ExecutableSchemaMock{
-// ComplexityFunc: func(typeName string, fieldName string, childComplexity int, args map[string]interface{}) (int, bool) {
-// panic("mock out the Complexity method")
-// },
-// ExecFunc: func(ctx context.Context) ResponseHandler {
-// panic("mock out the Exec method")
-// },
-// SchemaFunc: func() *ast.Schema {
-// panic("mock out the Schema method")
-// },
-// }
-//
-// // use mockedExecutableSchema in code that requires ExecutableSchema
-// // and then make assertions.
-//
-// }
-type ExecutableSchemaMock struct {
- // ComplexityFunc mocks the Complexity method.
- ComplexityFunc func(typeName string, fieldName string, childComplexity int, args map[string]interface{}) (int, bool)
-
- // ExecFunc mocks the Exec method.
- ExecFunc func(ctx context.Context) ResponseHandler
-
- // SchemaFunc mocks the Schema method.
- SchemaFunc func() *ast.Schema
-
- // calls tracks calls to the methods.
- calls struct {
- // Complexity holds details about calls to the Complexity method.
- Complexity []struct {
- // TypeName is the typeName argument value.
- TypeName string
- // FieldName is the fieldName argument value.
- FieldName string
- // ChildComplexity is the childComplexity argument value.
- ChildComplexity int
- // Args is the args argument value.
- Args map[string]interface{}
- }
- // Exec holds details about calls to the Exec method.
- Exec []struct {
- // Ctx is the ctx argument value.
- Ctx context.Context
- }
- // Schema holds details about calls to the Schema method.
- Schema []struct {
- }
- }
- lockComplexity sync.RWMutex
- lockExec sync.RWMutex
- lockSchema sync.RWMutex
-}
-
-// Complexity calls ComplexityFunc.
-func (mock *ExecutableSchemaMock) Complexity(typeName string, fieldName string, childComplexity int, args map[string]interface{}) (int, bool) {
- if mock.ComplexityFunc == nil {
- panic("ExecutableSchemaMock.ComplexityFunc: method is nil but ExecutableSchema.Complexity was just called")
- }
- callInfo := struct {
- TypeName string
- FieldName string
- ChildComplexity int
- Args map[string]interface{}
- }{
- TypeName: typeName,
- FieldName: fieldName,
- ChildComplexity: childComplexity,
- Args: args,
- }
- mock.lockComplexity.Lock()
- mock.calls.Complexity = append(mock.calls.Complexity, callInfo)
- mock.lockComplexity.Unlock()
- return mock.ComplexityFunc(typeName, fieldName, childComplexity, args)
-}
-
-// ComplexityCalls gets all the calls that were made to Complexity.
-// Check the length with:
-// len(mockedExecutableSchema.ComplexityCalls())
-func (mock *ExecutableSchemaMock) ComplexityCalls() []struct {
- TypeName string
- FieldName string
- ChildComplexity int
- Args map[string]interface{}
-} {
- var calls []struct {
- TypeName string
- FieldName string
- ChildComplexity int
- Args map[string]interface{}
- }
- mock.lockComplexity.RLock()
- calls = mock.calls.Complexity
- mock.lockComplexity.RUnlock()
- return calls
-}
-
-// Exec calls ExecFunc.
-func (mock *ExecutableSchemaMock) Exec(ctx context.Context) ResponseHandler {
- if mock.ExecFunc == nil {
- panic("ExecutableSchemaMock.ExecFunc: method is nil but ExecutableSchema.Exec was just called")
- }
- callInfo := struct {
- Ctx context.Context
- }{
- Ctx: ctx,
- }
- mock.lockExec.Lock()
- mock.calls.Exec = append(mock.calls.Exec, callInfo)
- mock.lockExec.Unlock()
- return mock.ExecFunc(ctx)
-}
-
-// ExecCalls gets all the calls that were made to Exec.
-// Check the length with:
-// len(mockedExecutableSchema.ExecCalls())
-func (mock *ExecutableSchemaMock) ExecCalls() []struct {
- Ctx context.Context
-} {
- var calls []struct {
- Ctx context.Context
- }
- mock.lockExec.RLock()
- calls = mock.calls.Exec
- mock.lockExec.RUnlock()
- return calls
-}
-
-// Schema calls SchemaFunc.
-func (mock *ExecutableSchemaMock) Schema() *ast.Schema {
- if mock.SchemaFunc == nil {
- panic("ExecutableSchemaMock.SchemaFunc: method is nil but ExecutableSchema.Schema was just called")
- }
- callInfo := struct {
- }{}
- mock.lockSchema.Lock()
- mock.calls.Schema = append(mock.calls.Schema, callInfo)
- mock.lockSchema.Unlock()
- return mock.SchemaFunc()
-}
-
-// SchemaCalls gets all the calls that were made to Schema.
-// Check the length with:
-// len(mockedExecutableSchema.SchemaCalls())
-func (mock *ExecutableSchemaMock) SchemaCalls() []struct {
-} {
- var calls []struct {
- }
- mock.lockSchema.RLock()
- calls = mock.calls.Schema
- mock.lockSchema.RUnlock()
- return calls
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go b/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
deleted file mode 100644
index 95a28031148..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
+++ /dev/null
@@ -1,192 +0,0 @@
-package executor
-
-import (
- "context"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/errcode"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/gqlerror"
- "github.com/vektah/gqlparser/v2/parser"
- "github.com/vektah/gqlparser/v2/validator"
-)
-
-// Executor executes graphql queries against a schema.
-type Executor struct {
- es graphql.ExecutableSchema
- extensions []graphql.HandlerExtension
- ext extensions
-
- errorPresenter graphql.ErrorPresenterFunc
- recoverFunc graphql.RecoverFunc
- queryCache graphql.Cache
-}
-
-var _ graphql.GraphExecutor = &Executor{}
-
-// New creates a new Executor with the given schema, and a default error and
-// recovery callbacks, and no query cache or extensions.
-func New(es graphql.ExecutableSchema) *Executor {
- e := &Executor{
- es: es,
- errorPresenter: graphql.DefaultErrorPresenter,
- recoverFunc: graphql.DefaultRecover,
- queryCache: graphql.NoCache{},
- ext: processExtensions(nil),
- }
- return e
-}
-
-func (e *Executor) CreateOperationContext(ctx context.Context, params *graphql.RawParams) (*graphql.OperationContext, gqlerror.List) {
- rc := &graphql.OperationContext{
- DisableIntrospection: true,
- RecoverFunc: e.recoverFunc,
- ResolverMiddleware: e.ext.fieldMiddleware,
- RootResolverMiddleware: e.ext.rootFieldMiddleware,
- Stats: graphql.Stats{
- Read: params.ReadTime,
- OperationStart: graphql.GetStartTime(ctx),
- },
- }
- ctx = graphql.WithOperationContext(ctx, rc)
-
- for _, p := range e.ext.operationParameterMutators {
- if err := p.MutateOperationParameters(ctx, params); err != nil {
- return rc, gqlerror.List{err}
- }
- }
-
- rc.RawQuery = params.Query
- rc.OperationName = params.OperationName
-
- var listErr gqlerror.List
- rc.Doc, listErr = e.parseQuery(ctx, &rc.Stats, params.Query)
- if len(listErr) != 0 {
- return rc, listErr
- }
-
- rc.Operation = rc.Doc.Operations.ForName(params.OperationName)
- if rc.Operation == nil {
- return rc, gqlerror.List{gqlerror.Errorf("operation %s not found", params.OperationName)}
- }
-
- var err *gqlerror.Error
- rc.Variables, err = validator.VariableValues(e.es.Schema(), rc.Operation, params.Variables)
- if err != nil {
- errcode.Set(err, errcode.ValidationFailed)
- return rc, gqlerror.List{err}
- }
- rc.Stats.Validation.End = graphql.Now()
-
- for _, p := range e.ext.operationContextMutators {
- if err := p.MutateOperationContext(ctx, rc); err != nil {
- return rc, gqlerror.List{err}
- }
- }
-
- return rc, nil
-}
-
-func (e *Executor) DispatchOperation(ctx context.Context, rc *graphql.OperationContext) (graphql.ResponseHandler, context.Context) {
- ctx = graphql.WithOperationContext(ctx, rc)
-
- var innerCtx context.Context
- res := e.ext.operationMiddleware(ctx, func(ctx context.Context) graphql.ResponseHandler {
- innerCtx = ctx
-
- tmpResponseContext := graphql.WithResponseContext(ctx, e.errorPresenter, e.recoverFunc)
- responses := e.es.Exec(tmpResponseContext)
- if errs := graphql.GetErrors(tmpResponseContext); errs != nil {
- return graphql.OneShot(&graphql.Response{Errors: errs})
- }
-
- return func(ctx context.Context) *graphql.Response {
- ctx = graphql.WithResponseContext(ctx, e.errorPresenter, e.recoverFunc)
- resp := e.ext.responseMiddleware(ctx, func(ctx context.Context) *graphql.Response {
- resp := responses(ctx)
- if resp == nil {
- return nil
- }
- resp.Errors = append(resp.Errors, graphql.GetErrors(ctx)...)
- resp.Extensions = graphql.GetExtensions(ctx)
- return resp
- })
- if resp == nil {
- return nil
- }
-
- return resp
- }
- })
-
- return res, innerCtx
-}
-
-func (e *Executor) DispatchError(ctx context.Context, list gqlerror.List) *graphql.Response {
- ctx = graphql.WithResponseContext(ctx, e.errorPresenter, e.recoverFunc)
- for _, gErr := range list {
- graphql.AddError(ctx, gErr)
- }
-
- resp := e.ext.responseMiddleware(ctx, func(ctx context.Context) *graphql.Response {
- resp := &graphql.Response{
- Errors: list,
- }
- resp.Extensions = graphql.GetExtensions(ctx)
- return resp
- })
-
- return resp
-}
-
-func (e *Executor) PresentRecoveredError(ctx context.Context, err interface{}) *gqlerror.Error {
- return e.errorPresenter(ctx, e.recoverFunc(ctx, err))
-}
-
-func (e *Executor) SetQueryCache(cache graphql.Cache) {
- e.queryCache = cache
-}
-
-func (e *Executor) SetErrorPresenter(f graphql.ErrorPresenterFunc) {
- e.errorPresenter = f
-}
-
-func (e *Executor) SetRecoverFunc(f graphql.RecoverFunc) {
- e.recoverFunc = f
-}
-
-// parseQuery decodes the incoming query and validates it, pulling from cache if present.
-//
-// NOTE: This should NOT look at variables, they will change per request. It should only parse and validate
-// the raw query string.
-func (e *Executor) parseQuery(ctx context.Context, stats *graphql.Stats, query string) (*ast.QueryDocument, gqlerror.List) {
- stats.Parsing.Start = graphql.Now()
-
- if doc, ok := e.queryCache.Get(ctx, query); ok {
- now := graphql.Now()
-
- stats.Parsing.End = now
- stats.Validation.Start = now
- return doc.(*ast.QueryDocument), nil
- }
-
- doc, err := parser.ParseQuery(&ast.Source{Input: query})
- if err != nil {
- errcode.Set(err, errcode.ParseFailed)
- return nil, gqlerror.List{err}
- }
- stats.Parsing.End = graphql.Now()
-
- stats.Validation.Start = graphql.Now()
- listErr := validator.Validate(e.es.Schema(), doc)
- if len(listErr) != 0 {
- for _, e := range listErr {
- errcode.Set(e, errcode.ValidationFailed)
- }
- return nil, listErr
- }
-
- e.queryCache.Add(ctx, query, doc)
-
- return doc, nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/executor/extensions.go b/vendor/github.com/99designs/gqlgen/graphql/executor/extensions.go
deleted file mode 100644
index a8eebf110c4..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/executor/extensions.go
+++ /dev/null
@@ -1,195 +0,0 @@
-package executor
-
-import (
- "context"
- "fmt"
-
- "github.com/99designs/gqlgen/graphql"
-)
-
-// Use adds the given extension to this Executor.
-func (e *Executor) Use(extension graphql.HandlerExtension) {
- if err := extension.Validate(e.es); err != nil {
- panic(err)
- }
-
- switch extension.(type) {
- case graphql.OperationParameterMutator,
- graphql.OperationContextMutator,
- graphql.OperationInterceptor,
- graphql.RootFieldInterceptor,
- graphql.FieldInterceptor,
- graphql.ResponseInterceptor:
- e.extensions = append(e.extensions, extension)
- e.ext = processExtensions(e.extensions)
-
- default:
- panic(fmt.Errorf("cannot Use %T as a gqlgen handler extension because it does not implement any extension hooks", extension))
- }
-}
-
-// AroundFields is a convenience method for creating an extension that only implements field middleware
-func (e *Executor) AroundFields(f graphql.FieldMiddleware) {
- e.Use(aroundFieldFunc(f))
-}
-
-// AroundRootFields is a convenience method for creating an extension that only implements root field middleware
-func (e *Executor) AroundRootFields(f graphql.RootFieldMiddleware) {
- e.Use(aroundRootFieldFunc(f))
-}
-
-// AroundOperations is a convenience method for creating an extension that only implements operation middleware
-func (e *Executor) AroundOperations(f graphql.OperationMiddleware) {
- e.Use(aroundOpFunc(f))
-}
-
-// AroundResponses is a convenience method for creating an extension that only implements response middleware
-func (e *Executor) AroundResponses(f graphql.ResponseMiddleware) {
- e.Use(aroundRespFunc(f))
-}
-
-type extensions struct {
- operationMiddleware graphql.OperationMiddleware
- responseMiddleware graphql.ResponseMiddleware
- rootFieldMiddleware graphql.RootFieldMiddleware
- fieldMiddleware graphql.FieldMiddleware
- operationParameterMutators []graphql.OperationParameterMutator
- operationContextMutators []graphql.OperationContextMutator
-}
-
-func processExtensions(exts []graphql.HandlerExtension) extensions {
- e := extensions{
- operationMiddleware: func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
- return next(ctx)
- },
- responseMiddleware: func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
- return next(ctx)
- },
- rootFieldMiddleware: func(ctx context.Context, next graphql.RootResolver) graphql.Marshaler {
- return next(ctx)
- },
- fieldMiddleware: func(ctx context.Context, next graphql.Resolver) (res interface{}, err error) {
- return next(ctx)
- },
- }
-
- // this loop goes backwards so the first extension is the outer most middleware and runs first.
- for i := len(exts) - 1; i >= 0; i-- {
- p := exts[i]
- if p, ok := p.(graphql.OperationInterceptor); ok {
- previous := e.operationMiddleware
- e.operationMiddleware = func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
- return p.InterceptOperation(ctx, func(ctx context.Context) graphql.ResponseHandler {
- return previous(ctx, next)
- })
- }
- }
-
- if p, ok := p.(graphql.ResponseInterceptor); ok {
- previous := e.responseMiddleware
- e.responseMiddleware = func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
- return p.InterceptResponse(ctx, func(ctx context.Context) *graphql.Response {
- return previous(ctx, next)
- })
- }
- }
-
- if p, ok := p.(graphql.RootFieldInterceptor); ok {
- previous := e.rootFieldMiddleware
- e.rootFieldMiddleware = func(ctx context.Context, next graphql.RootResolver) graphql.Marshaler {
- return p.InterceptRootField(ctx, func(ctx context.Context) graphql.Marshaler {
- return previous(ctx, next)
- })
- }
- }
-
- if p, ok := p.(graphql.FieldInterceptor); ok {
- previous := e.fieldMiddleware
- e.fieldMiddleware = func(ctx context.Context, next graphql.Resolver) (res interface{}, err error) {
- return p.InterceptField(ctx, func(ctx context.Context) (res interface{}, err error) {
- return previous(ctx, next)
- })
- }
- }
- }
-
- for _, p := range exts {
- if p, ok := p.(graphql.OperationParameterMutator); ok {
- e.operationParameterMutators = append(e.operationParameterMutators, p)
- }
-
- if p, ok := p.(graphql.OperationContextMutator); ok {
- e.operationContextMutators = append(e.operationContextMutators, p)
- }
- }
-
- return e
-}
-
-type aroundOpFunc func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler
-
-func (r aroundOpFunc) ExtensionName() string {
- return "InlineOperationFunc"
-}
-
-func (r aroundOpFunc) Validate(schema graphql.ExecutableSchema) error {
- if r == nil {
- return fmt.Errorf("OperationFunc can not be nil")
- }
- return nil
-}
-
-func (r aroundOpFunc) InterceptOperation(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
- return r(ctx, next)
-}
-
-type aroundRespFunc func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response
-
-func (r aroundRespFunc) ExtensionName() string {
- return "InlineResponseFunc"
-}
-
-func (r aroundRespFunc) Validate(schema graphql.ExecutableSchema) error {
- if r == nil {
- return fmt.Errorf("ResponseFunc can not be nil")
- }
- return nil
-}
-
-func (r aroundRespFunc) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
- return r(ctx, next)
-}
-
-type aroundFieldFunc func(ctx context.Context, next graphql.Resolver) (res interface{}, err error)
-
-func (f aroundFieldFunc) ExtensionName() string {
- return "InlineFieldFunc"
-}
-
-func (f aroundFieldFunc) Validate(schema graphql.ExecutableSchema) error {
- if f == nil {
- return fmt.Errorf("FieldFunc can not be nil")
- }
- return nil
-}
-
-func (f aroundFieldFunc) InterceptField(ctx context.Context, next graphql.Resolver) (res interface{}, err error) {
- return f(ctx, next)
-}
-
-type aroundRootFieldFunc func(ctx context.Context, next graphql.RootResolver) graphql.Marshaler
-
-func (f aroundRootFieldFunc) ExtensionName() string {
- return "InlineRootFieldFunc"
-}
-
-func (f aroundRootFieldFunc) Validate(schema graphql.ExecutableSchema) error {
- if f == nil {
- return fmt.Errorf("RootFieldFunc can not be nil")
- }
- return nil
-}
-
-func (f aroundRootFieldFunc) InterceptRootField(ctx context.Context, next graphql.RootResolver) graphql.Marshaler {
- return f(ctx, next)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/fieldset.go b/vendor/github.com/99designs/gqlgen/graphql/fieldset.go
deleted file mode 100644
index 351e266fdb3..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/fieldset.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package graphql
-
-import (
- "io"
- "sync"
-)
-
-type FieldSet struct {
- fields []CollectedField
- Values []Marshaler
- delayed []delayedResult
-}
-
-type delayedResult struct {
- i int
- f func() Marshaler
-}
-
-func NewFieldSet(fields []CollectedField) *FieldSet {
- return &FieldSet{
- fields: fields,
- Values: make([]Marshaler, len(fields)),
- }
-}
-
-func (m *FieldSet) Concurrently(i int, f func() Marshaler) {
- m.delayed = append(m.delayed, delayedResult{i: i, f: f})
-}
-
-func (m *FieldSet) Dispatch() {
- if len(m.delayed) == 1 {
- // only one concurrent task, no need to spawn a goroutine or deal create waitgroups
- d := m.delayed[0]
- m.Values[d.i] = d.f()
- } else if len(m.delayed) > 1 {
- // more than one concurrent task, use the main goroutine to do one, only spawn goroutines for the others
-
- var wg sync.WaitGroup
- for _, d := range m.delayed[1:] {
- wg.Add(1)
- go func(d delayedResult) {
- m.Values[d.i] = d.f()
- wg.Done()
- }(d)
- }
-
- m.Values[m.delayed[0].i] = m.delayed[0].f()
- wg.Wait()
- }
-}
-
-func (m *FieldSet) MarshalGQL(writer io.Writer) {
- writer.Write(openBrace)
- for i, field := range m.fields {
- if i != 0 {
- writer.Write(comma)
- }
- writeQuotedString(writer, field.Alias)
- writer.Write(colon)
- m.Values[i].MarshalGQL(writer)
- }
- writer.Write(closeBrace)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/float.go b/vendor/github.com/99designs/gqlgen/graphql/float.go
deleted file mode 100644
index ccb825ddb8b..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/float.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package graphql
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "io"
- "math"
- "strconv"
-)
-
-func MarshalFloat(f float64) Marshaler {
- return WriterFunc(func(w io.Writer) {
- io.WriteString(w, fmt.Sprintf("%g", f))
- })
-}
-
-func UnmarshalFloat(v interface{}) (float64, error) {
- switch v := v.(type) {
- case string:
- return strconv.ParseFloat(v, 64)
- case int:
- return float64(v), nil
- case int64:
- return float64(v), nil
- case float64:
- return v, nil
- case json.Number:
- return strconv.ParseFloat(string(v), 64)
- default:
- return 0, fmt.Errorf("%T is not an float", v)
- }
-}
-
-func MarshalFloatContext(f float64) ContextMarshaler {
- return ContextWriterFunc(func(ctx context.Context, w io.Writer) error {
- if math.IsInf(f, 0) || math.IsNaN(f) {
- return fmt.Errorf("cannot marshal infinite no NaN float values")
- }
- io.WriteString(w, fmt.Sprintf("%g", f))
- return nil
- })
-}
-
-func UnmarshalFloatContext(ctx context.Context, v interface{}) (float64, error) {
- return UnmarshalFloat(v)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler.go b/vendor/github.com/99designs/gqlgen/graphql/handler.go
deleted file mode 100644
index 921165978c2..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler.go
+++ /dev/null
@@ -1,130 +0,0 @@
-package graphql
-
-import (
- "context"
- "net/http"
- "strconv"
- "strings"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type (
- OperationMiddleware func(ctx context.Context, next OperationHandler) ResponseHandler
- OperationHandler func(ctx context.Context) ResponseHandler
-
- ResponseHandler func(ctx context.Context) *Response
- ResponseMiddleware func(ctx context.Context, next ResponseHandler) *Response
-
- Resolver func(ctx context.Context) (res interface{}, err error)
- FieldMiddleware func(ctx context.Context, next Resolver) (res interface{}, err error)
-
- RootResolver func(ctx context.Context) Marshaler
- RootFieldMiddleware func(ctx context.Context, next RootResolver) Marshaler
-
- RawParams struct {
- Query string `json:"query"`
- OperationName string `json:"operationName"`
- Variables map[string]interface{} `json:"variables"`
- Extensions map[string]interface{} `json:"extensions"`
-
- ReadTime TraceTiming `json:"-"`
- }
-
- GraphExecutor interface {
- CreateOperationContext(ctx context.Context, params *RawParams) (*OperationContext, gqlerror.List)
- DispatchOperation(ctx context.Context, rc *OperationContext) (ResponseHandler, context.Context)
- DispatchError(ctx context.Context, list gqlerror.List) *Response
- }
-
- // HandlerExtension adds functionality to the http handler. See the list of possible hook points below
- // Its important to understand the lifecycle of a graphql request and the terminology we use in gqlgen
- // before working with these
- //
- // +--- REQUEST POST /graphql --------------------------------------------+
- // | +- OPERATION query OpName { viewer { name } } -----------------------+ |
- // | | RESPONSE { "data": { "viewer": { "name": "bob" } } } | |
- // | +- OPERATION subscription OpName2 { chat { message } } --------------+ |
- // | | RESPONSE { "data": { "chat": { "message": "hello" } } } | |
- // | | RESPONSE { "data": { "chat": { "message": "byee" } } } | |
- // | +--------------------------------------------------------------------+ |
- // +------------------------------------------------------------------------+
- HandlerExtension interface {
- // ExtensionName should be a CamelCase string version of the extension which may be shown in stats and logging.
- ExtensionName() string
- // Validate is called when adding an extension to the server, it allows validation against the servers schema.
- Validate(schema ExecutableSchema) error
- }
-
- // OperationParameterMutator is called before creating a request context. allows manipulating the raw query
- // on the way in.
- OperationParameterMutator interface {
- MutateOperationParameters(ctx context.Context, request *RawParams) *gqlerror.Error
- }
-
- // OperationContextMutator is called after creating the request context, but before executing the root resolver.
- OperationContextMutator interface {
- MutateOperationContext(ctx context.Context, rc *OperationContext) *gqlerror.Error
- }
-
- // OperationInterceptor is called for each incoming query, for basic requests the writer will be invoked once,
- // for subscriptions it will be invoked multiple times.
- OperationInterceptor interface {
- InterceptOperation(ctx context.Context, next OperationHandler) ResponseHandler
- }
-
- // ResponseInterceptor is called around each graphql operation response. This can be called many times for a single
- // operation the case of subscriptions.
- ResponseInterceptor interface {
- InterceptResponse(ctx context.Context, next ResponseHandler) *Response
- }
-
- RootFieldInterceptor interface {
- InterceptRootField(ctx context.Context, next RootResolver) Marshaler
- }
-
- // FieldInterceptor called around each field
- FieldInterceptor interface {
- InterceptField(ctx context.Context, next Resolver) (res interface{}, err error)
- }
-
- // Transport provides support for different wire level encodings of graphql requests, eg Form, Get, Post, Websocket
- Transport interface {
- Supports(r *http.Request) bool
- Do(w http.ResponseWriter, r *http.Request, exec GraphExecutor)
- }
-)
-
-type Status int
-
-func (p *RawParams) AddUpload(upload Upload, key, path string) *gqlerror.Error {
- if !strings.HasPrefix(path, "variables.") {
- return gqlerror.Errorf("invalid operations paths for key %s", key)
- }
-
- var ptr interface{} = p.Variables
- parts := strings.Split(path, ".")
-
- // skip the first part (variables) because we started there
- for i, p := range parts[1:] {
- last := i == len(parts)-2
- if ptr == nil {
- return gqlerror.Errorf("path is missing \"variables.\" prefix, key: %s, path: %s", key, path)
- }
- if index, parseNbrErr := strconv.Atoi(p); parseNbrErr == nil {
- if last {
- ptr.([]interface{})[index] = upload
- } else {
- ptr = ptr.([]interface{})[index]
- }
- } else {
- if last {
- ptr.(map[string]interface{})[p] = upload
- } else {
- ptr = ptr.(map[string]interface{})[p]
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/apq.go b/vendor/github.com/99designs/gqlgen/graphql/handler/extension/apq.go
deleted file mode 100644
index 866276eed99..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/apq.go
+++ /dev/null
@@ -1,114 +0,0 @@
-package extension
-
-import (
- "context"
- "crypto/sha256"
- "encoding/hex"
- "fmt"
-
- "github.com/99designs/gqlgen/graphql/errcode"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/mitchellh/mapstructure"
-)
-
-const (
- errPersistedQueryNotFound = "PersistedQueryNotFound"
- errPersistedQueryNotFoundCode = "PERSISTED_QUERY_NOT_FOUND"
-)
-
-// AutomaticPersistedQuery saves client upload by optimistically sending only the hashes of queries, if the server
-// does not yet know what the query is for the hash it will respond telling the client to send the query along with the
-// hash in the next request.
-// see https://github.com/apollographql/apollo-link-persisted-queries
-type AutomaticPersistedQuery struct {
- Cache graphql.Cache
-}
-
-type ApqStats struct {
- // The hash of the incoming query
- Hash string
-
- // SentQuery is true if the incoming request sent the full query
- SentQuery bool
-}
-
-const apqExtension = "APQ"
-
-var _ interface {
- graphql.OperationParameterMutator
- graphql.HandlerExtension
-} = AutomaticPersistedQuery{}
-
-func (a AutomaticPersistedQuery) ExtensionName() string {
- return "AutomaticPersistedQuery"
-}
-
-func (a AutomaticPersistedQuery) Validate(schema graphql.ExecutableSchema) error {
- if a.Cache == nil {
- return fmt.Errorf("AutomaticPersistedQuery.Cache can not be nil")
- }
- return nil
-}
-
-func (a AutomaticPersistedQuery) MutateOperationParameters(ctx context.Context, rawParams *graphql.RawParams) *gqlerror.Error {
- if rawParams.Extensions["persistedQuery"] == nil {
- return nil
- }
-
- var extension struct {
- Sha256 string `mapstructure:"sha256Hash"`
- Version int64 `mapstructure:"version"`
- }
-
- if err := mapstructure.Decode(rawParams.Extensions["persistedQuery"], &extension); err != nil {
- return gqlerror.Errorf("invalid APQ extension data")
- }
-
- if extension.Version != 1 {
- return gqlerror.Errorf("unsupported APQ version")
- }
-
- fullQuery := false
- if rawParams.Query == "" {
- // client sent optimistic query hash without query string, get it from the cache
- query, ok := a.Cache.Get(ctx, extension.Sha256)
- if !ok {
- err := gqlerror.Errorf(errPersistedQueryNotFound)
- errcode.Set(err, errPersistedQueryNotFoundCode)
- return err
- }
- rawParams.Query = query.(string)
- } else {
- // client sent optimistic query hash with query string, verify and store it
- if computeQueryHash(rawParams.Query) != extension.Sha256 {
- return gqlerror.Errorf("provided APQ hash does not match query")
- }
- a.Cache.Add(ctx, extension.Sha256, rawParams.Query)
- fullQuery = true
- }
-
- graphql.GetOperationContext(ctx).Stats.SetExtension(apqExtension, &ApqStats{
- Hash: extension.Sha256,
- SentQuery: fullQuery,
- })
-
- return nil
-}
-
-func GetApqStats(ctx context.Context) *ApqStats {
- rc := graphql.GetOperationContext(ctx)
- if rc == nil {
- return nil
- }
-
- s, _ := rc.Stats.GetExtension(apqExtension).(*ApqStats)
- return s
-}
-
-func computeQueryHash(query string) string {
- b := sha256.Sum256([]byte(query))
- return hex.EncodeToString(b[:])
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/complexity.go b/vendor/github.com/99designs/gqlgen/graphql/handler/extension/complexity.go
deleted file mode 100644
index 2d853802bf3..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/complexity.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package extension
-
-import (
- "context"
- "fmt"
-
- "github.com/99designs/gqlgen/complexity"
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/errcode"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-const errComplexityLimit = "COMPLEXITY_LIMIT_EXCEEDED"
-
-// ComplexityLimit allows you to define a limit on query complexity
-//
-// If a query is submitted that exceeds the limit, a 422 status code will be returned.
-type ComplexityLimit struct {
- Func func(ctx context.Context, rc *graphql.OperationContext) int
-
- es graphql.ExecutableSchema
-}
-
-var _ interface {
- graphql.OperationContextMutator
- graphql.HandlerExtension
-} = &ComplexityLimit{}
-
-const complexityExtension = "ComplexityLimit"
-
-type ComplexityStats struct {
- // The calculated complexity for this request
- Complexity int
-
- // The complexity limit for this request returned by the extension func
- ComplexityLimit int
-}
-
-// FixedComplexityLimit sets a complexity limit that does not change
-func FixedComplexityLimit(limit int) *ComplexityLimit {
- return &ComplexityLimit{
- Func: func(ctx context.Context, rc *graphql.OperationContext) int {
- return limit
- },
- }
-}
-
-func (c ComplexityLimit) ExtensionName() string {
- return complexityExtension
-}
-
-func (c *ComplexityLimit) Validate(schema graphql.ExecutableSchema) error {
- if c.Func == nil {
- return fmt.Errorf("ComplexityLimit func can not be nil")
- }
- c.es = schema
- return nil
-}
-
-func (c ComplexityLimit) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error {
- op := rc.Doc.Operations.ForName(rc.OperationName)
- complexity := complexity.Calculate(c.es, op, rc.Variables)
-
- limit := c.Func(ctx, rc)
-
- rc.Stats.SetExtension(complexityExtension, &ComplexityStats{
- Complexity: complexity,
- ComplexityLimit: limit,
- })
-
- if complexity > limit {
- err := gqlerror.Errorf("operation has complexity %d, which exceeds the limit of %d", complexity, limit)
- errcode.Set(err, errComplexityLimit)
- return err
- }
-
- return nil
-}
-
-func GetComplexityStats(ctx context.Context) *ComplexityStats {
- rc := graphql.GetOperationContext(ctx)
- if rc == nil {
- return nil
- }
-
- s, _ := rc.Stats.GetExtension(complexityExtension).(*ComplexityStats)
- return s
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/introspection.go b/vendor/github.com/99designs/gqlgen/graphql/handler/extension/introspection.go
deleted file mode 100644
index acc5db2fbcc..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/extension/introspection.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package extension
-
-import (
- "context"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-// EnableIntrospection enables clients to reflect all of the types available on the graph.
-type Introspection struct{}
-
-var _ interface {
- graphql.OperationContextMutator
- graphql.HandlerExtension
-} = Introspection{}
-
-func (c Introspection) ExtensionName() string {
- return "Introspection"
-}
-
-func (c Introspection) Validate(schema graphql.ExecutableSchema) error {
- return nil
-}
-
-func (c Introspection) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error {
- rc.DisableIntrospection = false
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/lru/lru.go b/vendor/github.com/99designs/gqlgen/graphql/handler/lru/lru.go
deleted file mode 100644
index e2b1561acbb..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/lru/lru.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package lru
-
-import (
- "context"
-
- "github.com/99designs/gqlgen/graphql"
- lru "github.com/hashicorp/golang-lru"
-)
-
-type LRU struct {
- lru *lru.Cache
-}
-
-var _ graphql.Cache = &LRU{}
-
-func New(size int) *LRU {
- cache, err := lru.New(size)
- if err != nil {
- // An error is only returned for non-positive cache size
- // and we already checked for that.
- panic("unexpected error creating cache: " + err.Error())
- }
- return &LRU{cache}
-}
-
-func (l LRU) Get(ctx context.Context, key string) (value interface{}, ok bool) {
- return l.lru.Get(key)
-}
-
-func (l LRU) Add(ctx context.Context, key string, value interface{}) {
- l.lru.Add(key, value)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/server.go b/vendor/github.com/99designs/gqlgen/graphql/handler/server.go
deleted file mode 100644
index 69530bbc552..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/server.go
+++ /dev/null
@@ -1,185 +0,0 @@
-package handler
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/http"
- "time"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/executor"
- "github.com/99designs/gqlgen/graphql/handler/extension"
- "github.com/99designs/gqlgen/graphql/handler/lru"
- "github.com/99designs/gqlgen/graphql/handler/transport"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type (
- Server struct {
- transports []graphql.Transport
- exec *executor.Executor
- }
-)
-
-func New(es graphql.ExecutableSchema) *Server {
- return &Server{
- exec: executor.New(es),
- }
-}
-
-func NewDefaultServer(es graphql.ExecutableSchema) *Server {
- srv := New(es)
-
- srv.AddTransport(transport.Websocket{
- KeepAlivePingInterval: 10 * time.Second,
- })
- srv.AddTransport(transport.Options{})
- srv.AddTransport(transport.GET{})
- srv.AddTransport(transport.POST{})
- srv.AddTransport(transport.MultipartForm{})
-
- srv.SetQueryCache(lru.New(1000))
-
- srv.Use(extension.Introspection{})
- srv.Use(extension.AutomaticPersistedQuery{
- Cache: lru.New(100),
- })
-
- return srv
-}
-
-func (s *Server) AddTransport(transport graphql.Transport) {
- s.transports = append(s.transports, transport)
-}
-
-func (s *Server) SetErrorPresenter(f graphql.ErrorPresenterFunc) {
- s.exec.SetErrorPresenter(f)
-}
-
-func (s *Server) SetRecoverFunc(f graphql.RecoverFunc) {
- s.exec.SetRecoverFunc(f)
-}
-
-func (s *Server) SetQueryCache(cache graphql.Cache) {
- s.exec.SetQueryCache(cache)
-}
-
-func (s *Server) Use(extension graphql.HandlerExtension) {
- s.exec.Use(extension)
-}
-
-// AroundFields is a convenience method for creating an extension that only implements field middleware
-func (s *Server) AroundFields(f graphql.FieldMiddleware) {
- s.exec.AroundFields(f)
-}
-
-// AroundRootFields is a convenience method for creating an extension that only implements field middleware
-func (s *Server) AroundRootFields(f graphql.RootFieldMiddleware) {
- s.exec.AroundRootFields(f)
-}
-
-// AroundOperations is a convenience method for creating an extension that only implements operation middleware
-func (s *Server) AroundOperations(f graphql.OperationMiddleware) {
- s.exec.AroundOperations(f)
-}
-
-// AroundResponses is a convenience method for creating an extension that only implements response middleware
-func (s *Server) AroundResponses(f graphql.ResponseMiddleware) {
- s.exec.AroundResponses(f)
-}
-
-func (s *Server) getTransport(r *http.Request) graphql.Transport {
- for _, t := range s.transports {
- if t.Supports(r) {
- return t
- }
- }
- return nil
-}
-
-func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- defer func() {
- if err := recover(); err != nil {
- err := s.exec.PresentRecoveredError(r.Context(), err)
- resp := &graphql.Response{Errors: []*gqlerror.Error{err}}
- b, _ := json.Marshal(resp)
- w.WriteHeader(http.StatusUnprocessableEntity)
- w.Write(b)
- }
- }()
-
- r = r.WithContext(graphql.StartOperationTrace(r.Context()))
-
- transport := s.getTransport(r)
- if transport == nil {
- sendErrorf(w, http.StatusBadRequest, "transport not supported")
- return
- }
-
- transport.Do(w, r, s.exec)
-}
-
-func sendError(w http.ResponseWriter, code int, errors ...*gqlerror.Error) {
- w.WriteHeader(code)
- b, err := json.Marshal(&graphql.Response{Errors: errors})
- if err != nil {
- panic(err)
- }
- w.Write(b)
-}
-
-func sendErrorf(w http.ResponseWriter, code int, format string, args ...interface{}) {
- sendError(w, code, &gqlerror.Error{Message: fmt.Sprintf(format, args...)})
-}
-
-type OperationFunc func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler
-
-func (r OperationFunc) ExtensionName() string {
- return "InlineOperationFunc"
-}
-
-func (r OperationFunc) Validate(schema graphql.ExecutableSchema) error {
- if r == nil {
- return fmt.Errorf("OperationFunc can not be nil")
- }
- return nil
-}
-
-func (r OperationFunc) InterceptOperation(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
- return r(ctx, next)
-}
-
-type ResponseFunc func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response
-
-func (r ResponseFunc) ExtensionName() string {
- return "InlineResponseFunc"
-}
-
-func (r ResponseFunc) Validate(schema graphql.ExecutableSchema) error {
- if r == nil {
- return fmt.Errorf("ResponseFunc can not be nil")
- }
- return nil
-}
-
-func (r ResponseFunc) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
- return r(ctx, next)
-}
-
-type FieldFunc func(ctx context.Context, next graphql.Resolver) (res interface{}, err error)
-
-func (f FieldFunc) ExtensionName() string {
- return "InlineFieldFunc"
-}
-
-func (f FieldFunc) Validate(schema graphql.ExecutableSchema) error {
- if f == nil {
- return fmt.Errorf("FieldFunc can not be nil")
- }
- return nil
-}
-
-func (f FieldFunc) InterceptField(ctx context.Context, next graphql.Resolver) (res interface{}, err error) {
- return f(ctx, next)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/error.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/error.go
deleted file mode 100644
index b1aeaf144dd..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/error.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "fmt"
- "net/http"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-// SendError sends a best effort error to a raw response writer. It assumes the client can understand the standard
-// json error response
-func SendError(w http.ResponseWriter, code int, errors ...*gqlerror.Error) {
- w.WriteHeader(code)
- b, err := json.Marshal(&graphql.Response{Errors: errors})
- if err != nil {
- panic(err)
- }
- w.Write(b)
-}
-
-// SendErrorf wraps SendError to add formatted messages
-func SendErrorf(w http.ResponseWriter, code int, format string, args ...interface{}) {
- SendError(w, code, &gqlerror.Error{Message: fmt.Sprintf(format, args...)})
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
deleted file mode 100644
index 3874eef4838..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
+++ /dev/null
@@ -1,208 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "io"
- "io/ioutil"
- "mime"
- "net/http"
- "os"
- "strings"
-
- "github.com/99designs/gqlgen/graphql"
-)
-
-// MultipartForm the Multipart request spec https://github.com/jaydenseric/graphql-multipart-request-spec
-type MultipartForm struct {
- // MaxUploadSize sets the maximum number of bytes used to parse a request body
- // as multipart/form-data.
- MaxUploadSize int64
-
- // MaxMemory defines the maximum number of bytes used to parse a request body
- // as multipart/form-data in memory, with the remainder stored on disk in
- // temporary files.
- MaxMemory int64
-}
-
-var _ graphql.Transport = MultipartForm{}
-
-func (f MultipartForm) Supports(r *http.Request) bool {
- if r.Header.Get("Upgrade") != "" {
- return false
- }
-
- mediaType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type"))
- if err != nil {
- return false
- }
-
- return r.Method == "POST" && mediaType == "multipart/form-data"
-}
-
-func (f MultipartForm) maxUploadSize() int64 {
- if f.MaxUploadSize == 0 {
- return 32 << 20
- }
- return f.MaxUploadSize
-}
-
-func (f MultipartForm) maxMemory() int64 {
- if f.MaxMemory == 0 {
- return 32 << 20
- }
- return f.MaxMemory
-}
-
-func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
- w.Header().Set("Content-Type", "application/json")
-
- start := graphql.Now()
-
- var err error
- if r.ContentLength > f.maxUploadSize() {
- writeJsonError(w, "failed to parse multipart form, request body too large")
- return
- }
- r.Body = http.MaxBytesReader(w, r.Body, f.maxUploadSize())
- if err = r.ParseMultipartForm(f.maxMemory()); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- if strings.Contains(err.Error(), "request body too large") {
- writeJsonError(w, "failed to parse multipart form, request body too large")
- return
- }
- writeJsonError(w, "failed to parse multipart form")
- return
- }
- defer r.Body.Close()
-
- var params graphql.RawParams
-
- if err = jsonDecode(strings.NewReader(r.Form.Get("operations")), ¶ms); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonError(w, "operations form field could not be decoded")
- return
- }
-
- uploadsMap := map[string][]string{}
- if err = json.Unmarshal([]byte(r.Form.Get("map")), &uploadsMap); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonError(w, "map form field could not be decoded")
- return
- }
-
- var upload graphql.Upload
- for key, paths := range uploadsMap {
- if len(paths) == 0 {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "invalid empty operations paths list for key %s", key)
- return
- }
- file, header, err := r.FormFile(key)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to get key %s from form", key)
- return
- }
- defer file.Close()
-
- if len(paths) == 1 {
- upload = graphql.Upload{
- File: file,
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
-
- if err := params.AddUpload(upload, key, paths[0]); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
- return
- }
- } else {
- if r.ContentLength < f.maxMemory() {
- fileBytes, err := ioutil.ReadAll(file)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to read file for key %s", key)
- return
- }
- for _, path := range paths {
- upload = graphql.Upload{
- File: &bytesReader{s: &fileBytes, i: 0, prevRune: -1},
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
-
- if err := params.AddUpload(upload, key, path); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
- return
- }
- }
- } else {
- tmpFile, err := ioutil.TempFile(os.TempDir(), "gqlgen-")
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to create temp file for key %s", key)
- return
- }
- tmpName := tmpFile.Name()
- defer func() {
- _ = os.Remove(tmpName)
- }()
- _, err = io.Copy(tmpFile, file)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- if err := tmpFile.Close(); err != nil {
- writeJsonErrorf(w, "failed to copy to temp file and close temp file for key %s", key)
- return
- }
- writeJsonErrorf(w, "failed to copy to temp file for key %s", key)
- return
- }
- if err := tmpFile.Close(); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to close temp file for key %s", key)
- return
- }
- for _, path := range paths {
- pathTmpFile, err := os.Open(tmpName)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to open temp file for key %s", key)
- return
- }
- defer pathTmpFile.Close()
- upload = graphql.Upload{
- File: pathTmpFile,
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
-
- if err := params.AddUpload(upload, key, path); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
- return
- }
- }
- }
- }
- }
-
- params.ReadTime = graphql.TraceTiming{
- Start: start,
- End: graphql.Now(),
- }
-
- rc, gerr := exec.CreateOperationContext(r.Context(), ¶ms)
- if gerr != nil {
- resp := exec.DispatchError(graphql.WithOperationContext(r.Context(), rc), gerr)
- w.WriteHeader(statusFor(gerr))
- writeJson(w, resp)
- return
- }
- responses, ctx := exec.DispatchOperation(r.Context(), rc)
- writeJson(w, responses(ctx))
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
deleted file mode 100644
index d97c89c63fd..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "io"
- "net/http"
- "strings"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/errcode"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-// GET implements the GET side of the default HTTP transport
-// defined in https://github.com/APIs-guru/graphql-over-http#get
-type GET struct{}
-
-var _ graphql.Transport = GET{}
-
-func (h GET) Supports(r *http.Request) bool {
- if r.Header.Get("Upgrade") != "" {
- return false
- }
-
- return r.Method == "GET"
-}
-
-func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
- w.Header().Set("Content-Type", "application/json")
-
- raw := &graphql.RawParams{
- Query: r.URL.Query().Get("query"),
- OperationName: r.URL.Query().Get("operationName"),
- }
- raw.ReadTime.Start = graphql.Now()
-
- if variables := r.URL.Query().Get("variables"); variables != "" {
- if err := jsonDecode(strings.NewReader(variables), &raw.Variables); err != nil {
- w.WriteHeader(http.StatusBadRequest)
- writeJsonError(w, "variables could not be decoded")
- return
- }
- }
-
- if extensions := r.URL.Query().Get("extensions"); extensions != "" {
- if err := jsonDecode(strings.NewReader(extensions), &raw.Extensions); err != nil {
- w.WriteHeader(http.StatusBadRequest)
- writeJsonError(w, "extensions could not be decoded")
- return
- }
- }
-
- raw.ReadTime.End = graphql.Now()
-
- rc, err := exec.CreateOperationContext(r.Context(), raw)
- if err != nil {
- w.WriteHeader(statusFor(err))
- resp := exec.DispatchError(graphql.WithOperationContext(r.Context(), rc), err)
- writeJson(w, resp)
- return
- }
- op := rc.Doc.Operations.ForName(rc.OperationName)
- if op.Operation != ast.Query {
- w.WriteHeader(http.StatusNotAcceptable)
- writeJsonError(w, "GET requests only allow query operations")
- return
- }
-
- responses, ctx := exec.DispatchOperation(r.Context(), rc)
- writeJson(w, responses(ctx))
-}
-
-func jsonDecode(r io.Reader, val interface{}) error {
- dec := json.NewDecoder(r)
- dec.UseNumber()
- return dec.Decode(val)
-}
-
-func statusFor(errs gqlerror.List) int {
- switch errcode.GetErrorKind(errs) {
- case errcode.KindProtocol:
- return http.StatusUnprocessableEntity
- default:
- return http.StatusOK
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
deleted file mode 100644
index deefeb38d00..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package transport
-
-import (
- "mime"
- "net/http"
-
- "github.com/99designs/gqlgen/graphql"
-)
-
-// POST implements the POST side of the default HTTP transport
-// defined in https://github.com/APIs-guru/graphql-over-http#post
-type POST struct{}
-
-var _ graphql.Transport = POST{}
-
-func (h POST) Supports(r *http.Request) bool {
- if r.Header.Get("Upgrade") != "" {
- return false
- }
-
- mediaType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type"))
- if err != nil {
- return false
- }
-
- return r.Method == "POST" && mediaType == "application/json"
-}
-
-func (h POST) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
- w.Header().Set("Content-Type", "application/json")
-
- var params *graphql.RawParams
- start := graphql.Now()
- if err := jsonDecode(r.Body, ¶ms); err != nil {
- w.WriteHeader(http.StatusBadRequest)
- writeJsonErrorf(w, "json body could not be decoded: "+err.Error())
- return
- }
- params.ReadTime = graphql.TraceTiming{
- Start: start,
- End: graphql.Now(),
- }
-
- rc, err := exec.CreateOperationContext(r.Context(), params)
- if err != nil {
- w.WriteHeader(statusFor(err))
- resp := exec.DispatchError(graphql.WithOperationContext(r.Context(), rc), err)
- writeJson(w, resp)
- return
- }
- responses, ctx := exec.DispatchOperation(r.Context(), rc)
- writeJson(w, responses(ctx))
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
deleted file mode 100644
index 6b725ff3e3e..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package transport
-
-import (
- "net/http"
-
- "github.com/99designs/gqlgen/graphql"
-)
-
-// Options responds to http OPTIONS and HEAD requests
-type Options struct{}
-
-var _ graphql.Transport = Options{}
-
-func (o Options) Supports(r *http.Request) bool {
- return r.Method == "HEAD" || r.Method == "OPTIONS"
-}
-
-func (o Options) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
- switch r.Method {
- case http.MethodOptions:
- w.Header().Set("Allow", "OPTIONS, GET, POST")
- w.WriteHeader(http.StatusOK)
- case http.MethodHead:
- w.WriteHeader(http.StatusMethodNotAllowed)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go
deleted file mode 100644
index d3261e28335..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/reader.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package transport
-
-import (
- "errors"
- "io"
-)
-
-type bytesReader struct {
- s *[]byte
- i int64 // current reading index
- prevRune int // index of previous rune; or < 0
-}
-
-func (r *bytesReader) Read(b []byte) (n int, err error) {
- if r.s == nil {
- return 0, errors.New("byte slice pointer is nil")
- }
- if r.i >= int64(len(*r.s)) {
- return 0, io.EOF
- }
- r.prevRune = -1
- n = copy(b, (*r.s)[r.i:])
- r.i += int64(n)
- return
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/util.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/util.go
deleted file mode 100644
index ce845c1964c..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/util.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "fmt"
- "io"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-func writeJson(w io.Writer, response *graphql.Response) {
- b, err := json.Marshal(response)
- if err != nil {
- panic(err)
- }
- w.Write(b)
-}
-
-func writeJsonError(w io.Writer, msg string) {
- writeJson(w, &graphql.Response{Errors: gqlerror.List{{Message: msg}}})
-}
-
-func writeJsonErrorf(w io.Writer, format string, args ...interface{}) {
- writeJson(w, &graphql.Response{Errors: gqlerror.List{{Message: fmt.Sprintf(format, args...)}}})
-}
-
-func writeJsonGraphqlError(w io.Writer, err ...*gqlerror.Error) {
- writeJson(w, &graphql.Response{Errors: err})
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
deleted file mode 100644
index 28480a4092b..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
+++ /dev/null
@@ -1,415 +0,0 @@
-package transport
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "log"
- "net"
- "net/http"
- "sync"
- "time"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/graphql/errcode"
- "github.com/gorilla/websocket"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type (
- Websocket struct {
- Upgrader websocket.Upgrader
- InitFunc WebsocketInitFunc
- InitTimeout time.Duration
- ErrorFunc WebsocketErrorFunc
- KeepAlivePingInterval time.Duration
- PingPongInterval time.Duration
-
- didInjectSubprotocols bool
- }
- wsConnection struct {
- Websocket
- ctx context.Context
- conn *websocket.Conn
- me messageExchanger
- active map[string]context.CancelFunc
- mu sync.Mutex
- keepAliveTicker *time.Ticker
- pingPongTicker *time.Ticker
- exec graphql.GraphExecutor
-
- initPayload InitPayload
- }
-
- WebsocketInitFunc func(ctx context.Context, initPayload InitPayload) (context.Context, error)
- WebsocketErrorFunc func(ctx context.Context, err error)
-)
-
-var errReadTimeout = errors.New("read timeout")
-
-var _ graphql.Transport = Websocket{}
-
-func (t Websocket) Supports(r *http.Request) bool {
- return r.Header.Get("Upgrade") != ""
-}
-
-func (t Websocket) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
- t.injectGraphQLWSSubprotocols()
- ws, err := t.Upgrader.Upgrade(w, r, http.Header{})
- if err != nil {
- log.Printf("unable to upgrade %T to websocket %s: ", w, err.Error())
- SendErrorf(w, http.StatusBadRequest, "unable to upgrade")
- return
- }
-
- var me messageExchanger
- switch ws.Subprotocol() {
- default:
- msg := websocket.FormatCloseMessage(websocket.CloseProtocolError, fmt.Sprintf("unsupported negotiated subprotocol %s", ws.Subprotocol()))
- ws.WriteMessage(websocket.CloseMessage, msg)
- return
- case graphqlwsSubprotocol, "":
- // clients are required to send a subprotocol, to be backward compatible with the previous implementation we select
- // "graphql-ws" by default
- me = graphqlwsMessageExchanger{c: ws}
- case graphqltransportwsSubprotocol:
- me = graphqltransportwsMessageExchanger{c: ws}
- }
-
- conn := wsConnection{
- active: map[string]context.CancelFunc{},
- conn: ws,
- ctx: r.Context(),
- exec: exec,
- me: me,
- Websocket: t,
- }
-
- if !conn.init() {
- return
- }
-
- conn.run()
-}
-
-func (c *wsConnection) handlePossibleError(err error) {
- if c.ErrorFunc != nil && err != nil {
- c.ErrorFunc(c.ctx, err)
- }
-}
-
-func (c *wsConnection) nextMessageWithTimeout(timeout time.Duration) (message, error) {
- messages, errs := make(chan message, 1), make(chan error, 1)
-
- go func() {
- if m, err := c.me.NextMessage(); err != nil {
- errs <- err
- } else {
- messages <- m
- }
- }()
-
- select {
- case m := <-messages:
- return m, nil
- case err := <-errs:
- return message{}, err
- case <-time.After(timeout):
- return message{}, errReadTimeout
- }
-}
-
-func (c *wsConnection) init() bool {
- var m message
- var err error
-
- if c.InitTimeout != 0 {
- m, err = c.nextMessageWithTimeout(c.InitTimeout)
- } else {
- m, err = c.me.NextMessage()
- }
-
- if err != nil {
- if err == errReadTimeout {
- c.close(websocket.CloseProtocolError, "connection initialisation timeout")
- return false
- }
-
- if err == errInvalidMsg {
- c.sendConnectionError("invalid json")
- }
-
- c.close(websocket.CloseProtocolError, "decoding error")
- return false
- }
-
- switch m.t {
- case initMessageType:
- if len(m.payload) > 0 {
- c.initPayload = make(InitPayload)
- err := json.Unmarshal(m.payload, &c.initPayload)
- if err != nil {
- return false
- }
- }
-
- if c.InitFunc != nil {
- ctx, err := c.InitFunc(c.ctx, c.initPayload)
- if err != nil {
- c.sendConnectionError(err.Error())
- c.close(websocket.CloseNormalClosure, "terminated")
- return false
- }
- c.ctx = ctx
- }
-
- c.write(&message{t: connectionAckMessageType})
- c.write(&message{t: keepAliveMessageType})
- case connectionCloseMessageType:
- c.close(websocket.CloseNormalClosure, "terminated")
- return false
- default:
- c.sendConnectionError("unexpected message %s", m.t)
- c.close(websocket.CloseProtocolError, "unexpected message")
- return false
- }
-
- return true
-}
-
-func (c *wsConnection) write(msg *message) {
- c.mu.Lock()
- c.handlePossibleError(c.me.Send(msg))
- c.mu.Unlock()
-}
-
-func (c *wsConnection) run() {
- // We create a cancellation that will shutdown the keep-alive when we leave
- // this function.
- ctx, cancel := context.WithCancel(c.ctx)
- defer func() {
- cancel()
- c.close(websocket.CloseAbnormalClosure, "unexpected closure")
- }()
-
- // If we're running in graphql-ws mode, create a timer that will trigger a
- // keep alive message every interval
- if (c.conn.Subprotocol() == "" || c.conn.Subprotocol() == graphqlwsSubprotocol) && c.KeepAlivePingInterval != 0 {
- c.mu.Lock()
- c.keepAliveTicker = time.NewTicker(c.KeepAlivePingInterval)
- c.mu.Unlock()
-
- go c.keepAlive(ctx)
- }
-
- // If we're running in graphql-transport-ws mode, create a timer that will
- // trigger a ping message every interval
- if c.conn.Subprotocol() == graphqltransportwsSubprotocol && c.PingPongInterval != 0 {
- c.mu.Lock()
- c.pingPongTicker = time.NewTicker(c.PingPongInterval)
- c.mu.Unlock()
-
- // Note: when the connection is closed by this deadline, the client
- // will receive an "invalid close code"
- c.conn.SetReadDeadline(time.Now().UTC().Add(2 * c.PingPongInterval))
- go c.ping(ctx)
- }
-
- // Close the connection when the context is cancelled.
- // Will optionally send a "close reason" that is retrieved from the context.
- go c.closeOnCancel(ctx)
-
- for {
- start := graphql.Now()
- m, err := c.me.NextMessage()
- if err != nil {
- // If the connection got closed by us, don't report the error
- if !errors.Is(err, net.ErrClosed) {
- c.handlePossibleError(err)
- }
- return
- }
-
- switch m.t {
- case startMessageType:
- c.subscribe(start, &m)
- case stopMessageType:
- c.mu.Lock()
- closer := c.active[m.id]
- c.mu.Unlock()
- if closer != nil {
- closer()
- }
- case connectionCloseMessageType:
- c.close(websocket.CloseNormalClosure, "terminated")
- return
- case pingMessageType:
- c.write(&message{t: pongMessageType, payload: m.payload})
- case pongMessageType:
- c.conn.SetReadDeadline(time.Now().UTC().Add(2 * c.PingPongInterval))
- default:
- c.sendConnectionError("unexpected message %s", m.t)
- c.close(websocket.CloseProtocolError, "unexpected message")
- return
- }
- }
-}
-
-func (c *wsConnection) keepAlive(ctx context.Context) {
- for {
- select {
- case <-ctx.Done():
- c.keepAliveTicker.Stop()
- return
- case <-c.keepAliveTicker.C:
- c.write(&message{t: keepAliveMessageType})
- }
- }
-}
-
-func (c *wsConnection) ping(ctx context.Context) {
- for {
- select {
- case <-ctx.Done():
- c.pingPongTicker.Stop()
- return
- case <-c.pingPongTicker.C:
- c.write(&message{t: pingMessageType, payload: json.RawMessage{}})
- }
- }
-}
-
-func (c *wsConnection) closeOnCancel(ctx context.Context) {
- <-ctx.Done()
-
- if r := closeReasonForContext(ctx); r != "" {
- c.sendConnectionError(r)
- }
- c.close(websocket.CloseNormalClosure, "terminated")
-}
-
-func (c *wsConnection) subscribe(start time.Time, msg *message) {
- ctx := graphql.StartOperationTrace(c.ctx)
- var params *graphql.RawParams
- if err := jsonDecode(bytes.NewReader(msg.payload), ¶ms); err != nil {
- c.sendError(msg.id, &gqlerror.Error{Message: "invalid json"})
- c.complete(msg.id)
- return
- }
-
- params.ReadTime = graphql.TraceTiming{
- Start: start,
- End: graphql.Now(),
- }
-
- rc, err := c.exec.CreateOperationContext(ctx, params)
- if err != nil {
- resp := c.exec.DispatchError(graphql.WithOperationContext(ctx, rc), err)
- switch errcode.GetErrorKind(err) {
- case errcode.KindProtocol:
- c.sendError(msg.id, resp.Errors...)
- default:
- c.sendResponse(msg.id, &graphql.Response{Errors: err})
- }
-
- c.complete(msg.id)
- return
- }
-
- ctx = graphql.WithOperationContext(ctx, rc)
-
- if c.initPayload != nil {
- ctx = withInitPayload(ctx, c.initPayload)
- }
-
- ctx, cancel := context.WithCancel(ctx)
- c.mu.Lock()
- c.active[msg.id] = cancel
- c.mu.Unlock()
-
- go func() {
- defer func() {
- if r := recover(); r != nil {
- err := rc.Recover(ctx, r)
- var gqlerr *gqlerror.Error
- if !errors.As(err, &gqlerr) {
- gqlerr = &gqlerror.Error{}
- if err != nil {
- gqlerr.Message = err.Error()
- }
- }
- c.sendError(msg.id, gqlerr)
- }
- c.complete(msg.id)
- c.mu.Lock()
- delete(c.active, msg.id)
- c.mu.Unlock()
- cancel()
- }()
-
- responses, ctx := c.exec.DispatchOperation(ctx, rc)
- for {
- response := responses(ctx)
- if response == nil {
- break
- }
-
- c.sendResponse(msg.id, response)
- }
- c.complete(msg.id)
-
- c.mu.Lock()
- delete(c.active, msg.id)
- c.mu.Unlock()
- cancel()
- }()
-}
-
-func (c *wsConnection) sendResponse(id string, response *graphql.Response) {
- b, err := json.Marshal(response)
- if err != nil {
- panic(err)
- }
- c.write(&message{
- payload: b,
- id: id,
- t: dataMessageType,
- })
-}
-
-func (c *wsConnection) complete(id string) {
- c.write(&message{id: id, t: completeMessageType})
-}
-
-func (c *wsConnection) sendError(id string, errors ...*gqlerror.Error) {
- errs := make([]error, len(errors))
- for i, err := range errors {
- errs[i] = err
- }
- b, err := json.Marshal(errs)
- if err != nil {
- panic(err)
- }
- c.write(&message{t: errorMessageType, id: id, payload: b})
-}
-
-func (c *wsConnection) sendConnectionError(format string, args ...interface{}) {
- b, err := json.Marshal(&gqlerror.Error{Message: fmt.Sprintf(format, args...)})
- if err != nil {
- panic(err)
- }
-
- c.write(&message{t: connectionErrorMessageType, payload: b})
-}
-
-func (c *wsConnection) close(closeCode int, message string) {
- c.mu.Lock()
- _ = c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(closeCode, message))
- for _, closer := range c.active {
- closer()
- }
- c.mu.Unlock()
- _ = c.conn.Close()
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_close_reason.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_close_reason.go
deleted file mode 100644
index c8217debe74..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_close_reason.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package transport
-
-import (
- "context"
-)
-
-// A private key for context that only this package can access. This is important
-// to prevent collisions between different context uses
-var closeReasonCtxKey = &wsCloseReasonContextKey{"close-reason"}
-
-type wsCloseReasonContextKey struct {
- name string
-}
-
-func AppendCloseReason(ctx context.Context, reason string) context.Context {
- return context.WithValue(ctx, closeReasonCtxKey, reason)
-}
-
-func closeReasonForContext(ctx context.Context) string {
- reason, _ := ctx.Value(closeReasonCtxKey).(string)
- return reason
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
deleted file mode 100644
index 9b82082a2df..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
+++ /dev/null
@@ -1,149 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "fmt"
-
- "github.com/gorilla/websocket"
-)
-
-// https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
-const (
- graphqltransportwsSubprotocol = "graphql-transport-ws"
-
- graphqltransportwsConnectionInitMsg = graphqltransportwsMessageType("connection_init")
- graphqltransportwsConnectionAckMsg = graphqltransportwsMessageType("connection_ack")
- graphqltransportwsSubscribeMsg = graphqltransportwsMessageType("subscribe")
- graphqltransportwsNextMsg = graphqltransportwsMessageType("next")
- graphqltransportwsErrorMsg = graphqltransportwsMessageType("error")
- graphqltransportwsCompleteMsg = graphqltransportwsMessageType("complete")
- graphqltransportwsPingMsg = graphqltransportwsMessageType("ping")
- graphqltransportwsPongMsg = graphqltransportwsMessageType("pong")
-)
-
-var allGraphqltransportwsMessageTypes = []graphqltransportwsMessageType{
- graphqltransportwsConnectionInitMsg,
- graphqltransportwsConnectionAckMsg,
- graphqltransportwsSubscribeMsg,
- graphqltransportwsNextMsg,
- graphqltransportwsErrorMsg,
- graphqltransportwsCompleteMsg,
- graphqltransportwsPingMsg,
- graphqltransportwsPongMsg,
-}
-
-type (
- graphqltransportwsMessageExchanger struct {
- c *websocket.Conn
- }
-
- graphqltransportwsMessage struct {
- Payload json.RawMessage `json:"payload,omitempty"`
- ID string `json:"id,omitempty"`
- Type graphqltransportwsMessageType `json:"type"`
- noOp bool
- }
-
- graphqltransportwsMessageType string
-)
-
-func (me graphqltransportwsMessageExchanger) NextMessage() (message, error) {
- _, r, err := me.c.NextReader()
- if err != nil {
- return message{}, handleNextReaderError(err)
- }
-
- var graphqltransportwsMessage graphqltransportwsMessage
- if err := jsonDecode(r, &graphqltransportwsMessage); err != nil {
- return message{}, errInvalidMsg
- }
-
- return graphqltransportwsMessage.toMessage()
-}
-
-func (me graphqltransportwsMessageExchanger) Send(m *message) error {
- msg := &graphqltransportwsMessage{}
- if err := msg.fromMessage(m); err != nil {
- return err
- }
-
- if msg.noOp {
- return nil
- }
-
- return me.c.WriteJSON(msg)
-}
-
-func (t *graphqltransportwsMessageType) UnmarshalText(text []byte) (err error) {
- var found bool
- for _, candidate := range allGraphqltransportwsMessageTypes {
- if string(candidate) == string(text) {
- *t = candidate
- found = true
- break
- }
- }
-
- if !found {
- err = fmt.Errorf("invalid message type %s", string(text))
- }
-
- return err
-}
-
-func (t graphqltransportwsMessageType) MarshalText() ([]byte, error) {
- return []byte(string(t)), nil
-}
-
-func (m graphqltransportwsMessage) toMessage() (message, error) {
- var t messageType
- var err error
- switch m.Type {
- default:
- err = fmt.Errorf("invalid client->server message type %s", m.Type)
- case graphqltransportwsConnectionInitMsg:
- t = initMessageType
- case graphqltransportwsSubscribeMsg:
- t = startMessageType
- case graphqltransportwsCompleteMsg:
- t = stopMessageType
- case graphqltransportwsPingMsg:
- t = pingMessageType
- case graphqltransportwsPongMsg:
- t = pongMessageType
- }
-
- return message{
- payload: m.Payload,
- id: m.ID,
- t: t,
- }, err
-}
-
-func (m *graphqltransportwsMessage) fromMessage(msg *message) (err error) {
- m.ID = msg.id
- m.Payload = msg.payload
-
- switch msg.t {
- default:
- err = fmt.Errorf("invalid server->client message type %s", msg.t)
- case connectionAckMessageType:
- m.Type = graphqltransportwsConnectionAckMsg
- case keepAliveMessageType:
- m.noOp = true
- case connectionErrorMessageType:
- m.noOp = true
- case dataMessageType:
- m.Type = graphqltransportwsNextMsg
- case completeMessageType:
- m.Type = graphqltransportwsCompleteMsg
- case errorMessageType:
- m.Type = graphqltransportwsErrorMsg
- case pingMessageType:
- m.Type = graphqltransportwsPingMsg
- case pongMessageType:
- m.Type = graphqltransportwsPongMsg
- }
-
- return err
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
deleted file mode 100644
index 49ed1ee8031..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
+++ /dev/null
@@ -1,171 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "fmt"
-
- "github.com/gorilla/websocket"
-)
-
-// https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
-const (
- graphqlwsSubprotocol = "graphql-ws"
-
- graphqlwsConnectionInitMsg = graphqlwsMessageType("connection_init")
- graphqlwsConnectionTerminateMsg = graphqlwsMessageType("connection_terminate")
- graphqlwsStartMsg = graphqlwsMessageType("start")
- graphqlwsStopMsg = graphqlwsMessageType("stop")
- graphqlwsConnectionAckMsg = graphqlwsMessageType("connection_ack")
- graphqlwsConnectionErrorMsg = graphqlwsMessageType("connection_error")
- graphqlwsDataMsg = graphqlwsMessageType("data")
- graphqlwsErrorMsg = graphqlwsMessageType("error")
- graphqlwsCompleteMsg = graphqlwsMessageType("complete")
- graphqlwsConnectionKeepAliveMsg = graphqlwsMessageType("ka")
-)
-
-var allGraphqlwsMessageTypes = []graphqlwsMessageType{
- graphqlwsConnectionInitMsg,
- graphqlwsConnectionTerminateMsg,
- graphqlwsStartMsg,
- graphqlwsStopMsg,
- graphqlwsConnectionAckMsg,
- graphqlwsConnectionErrorMsg,
- graphqlwsDataMsg,
- graphqlwsErrorMsg,
- graphqlwsCompleteMsg,
- graphqlwsConnectionKeepAliveMsg,
-}
-
-type (
- graphqlwsMessageExchanger struct {
- c *websocket.Conn
- }
-
- graphqlwsMessage struct {
- Payload json.RawMessage `json:"payload,omitempty"`
- ID string `json:"id,omitempty"`
- Type graphqlwsMessageType `json:"type"`
- noOp bool
- }
-
- graphqlwsMessageType string
-)
-
-func (me graphqlwsMessageExchanger) NextMessage() (message, error) {
- _, r, err := me.c.NextReader()
- if err != nil {
- return message{}, handleNextReaderError(err)
- }
-
- var graphqlwsMessage graphqlwsMessage
- if err := jsonDecode(r, &graphqlwsMessage); err != nil {
- return message{}, errInvalidMsg
- }
-
- return graphqlwsMessage.toMessage()
-}
-
-func (me graphqlwsMessageExchanger) Send(m *message) error {
- msg := &graphqlwsMessage{}
- if err := msg.fromMessage(m); err != nil {
- return err
- }
-
- if msg.noOp {
- return nil
- }
-
- return me.c.WriteJSON(msg)
-}
-
-func (t *graphqlwsMessageType) UnmarshalText(text []byte) (err error) {
- var found bool
- for _, candidate := range allGraphqlwsMessageTypes {
- if string(candidate) == string(text) {
- *t = candidate
- found = true
- break
- }
- }
-
- if !found {
- err = fmt.Errorf("invalid message type %s", string(text))
- }
-
- return err
-}
-
-func (t graphqlwsMessageType) MarshalText() ([]byte, error) {
- return []byte(string(t)), nil
-}
-
-func (m graphqlwsMessage) toMessage() (message, error) {
- var t messageType
- var err error
- switch m.Type {
- default:
- err = fmt.Errorf("invalid client->server message type %s", m.Type)
- case graphqlwsConnectionInitMsg:
- t = initMessageType
- case graphqlwsConnectionTerminateMsg:
- t = connectionCloseMessageType
- case graphqlwsStartMsg:
- t = startMessageType
- case graphqlwsStopMsg:
- t = stopMessageType
- case graphqlwsConnectionAckMsg:
- t = connectionAckMessageType
- case graphqlwsConnectionErrorMsg:
- t = connectionErrorMessageType
- case graphqlwsDataMsg:
- t = dataMessageType
- case graphqlwsErrorMsg:
- t = errorMessageType
- case graphqlwsCompleteMsg:
- t = completeMessageType
- case graphqlwsConnectionKeepAliveMsg:
- t = keepAliveMessageType
- }
-
- return message{
- payload: m.Payload,
- id: m.ID,
- t: t,
- }, err
-}
-
-func (m *graphqlwsMessage) fromMessage(msg *message) (err error) {
- m.ID = msg.id
- m.Payload = msg.payload
-
- switch msg.t {
- default:
- err = fmt.Errorf("invalid server->client message type %s", msg.t)
- case initMessageType:
- m.Type = graphqlwsConnectionInitMsg
- case connectionAckMessageType:
- m.Type = graphqlwsConnectionAckMsg
- case keepAliveMessageType:
- m.Type = graphqlwsConnectionKeepAliveMsg
- case connectionErrorMessageType:
- m.Type = graphqlwsConnectionErrorMsg
- case connectionCloseMessageType:
- m.Type = graphqlwsConnectionTerminateMsg
- case startMessageType:
- m.Type = graphqlwsStartMsg
- case stopMessageType:
- m.Type = graphqlwsStopMsg
- case dataMessageType:
- m.Type = graphqlwsDataMsg
- case completeMessageType:
- m.Type = graphqlwsCompleteMsg
- case errorMessageType:
- m.Type = graphqlwsErrorMsg
- case pingMessageType:
- m.noOp = true
- case pongMessageType:
- m.noOp = true
- }
-
- return err
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_init.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_init.go
deleted file mode 100644
index a5f84ba2dc6..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_init.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package transport
-
-import "context"
-
-type key string
-
-const (
- initpayload key = "ws_initpayload_context"
-)
-
-// InitPayload is a structure that is parsed from the websocket init message payload. TO use
-// request headers for non-websocket, instead wrap the graphql handler in a middleware.
-type InitPayload map[string]interface{}
-
-// GetString safely gets a string value from the payload. It returns an empty string if the
-// payload is nil or the value isn't set.
-func (p InitPayload) GetString(key string) string {
- if p == nil {
- return ""
- }
-
- if value, ok := p[key]; ok {
- res, _ := value.(string)
- return res
- }
-
- return ""
-}
-
-// Authorization is a short hand for getting the Authorization header from the
-// payload.
-func (p InitPayload) Authorization() string {
- if value := p.GetString("Authorization"); value != "" {
- return value
- }
-
- if value := p.GetString("authorization"); value != "" {
- return value
- }
-
- return ""
-}
-
-func withInitPayload(ctx context.Context, payload InitPayload) context.Context {
- return context.WithValue(ctx, initpayload, payload)
-}
-
-// GetInitPayload gets a map of the data sent with the connection_init message, which is used by
-// graphql clients as a stand-in for HTTP headers.
-func GetInitPayload(ctx context.Context) InitPayload {
- payload, ok := ctx.Value(initpayload).(InitPayload)
- if !ok {
- return nil
- }
-
- return payload
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_subprotocol.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_subprotocol.go
deleted file mode 100644
index c02098a88e5..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_subprotocol.go
+++ /dev/null
@@ -1,116 +0,0 @@
-package transport
-
-import (
- "encoding/json"
- "errors"
-
- "github.com/gorilla/websocket"
-)
-
-const (
- initMessageType messageType = iota
- connectionAckMessageType
- keepAliveMessageType
- connectionErrorMessageType
- connectionCloseMessageType
- startMessageType
- stopMessageType
- dataMessageType
- completeMessageType
- errorMessageType
- pingMessageType
- pongMessageType
-)
-
-var (
- supportedSubprotocols = []string{
- graphqlwsSubprotocol,
- graphqltransportwsSubprotocol,
- }
-
- errWsConnClosed = errors.New("websocket connection closed")
- errInvalidMsg = errors.New("invalid message received")
-)
-
-type (
- messageType int
- message struct {
- payload json.RawMessage
- id string
- t messageType
- }
- messageExchanger interface {
- NextMessage() (message, error)
- Send(m *message) error
- }
-)
-
-func (t messageType) String() string {
- var text string
- switch t {
- default:
- text = "unknown"
- case initMessageType:
- text = "init"
- case connectionAckMessageType:
- text = "connection ack"
- case keepAliveMessageType:
- text = "keep alive"
- case connectionErrorMessageType:
- text = "connection error"
- case connectionCloseMessageType:
- text = "connection close"
- case startMessageType:
- text = "start"
- case stopMessageType:
- text = "stop subscription"
- case dataMessageType:
- text = "data"
- case completeMessageType:
- text = "complete"
- case errorMessageType:
- text = "error"
- case pingMessageType:
- text = "ping"
- case pongMessageType:
- text = "pong"
- }
- return text
-}
-
-func contains(list []string, elem string) bool {
- for _, e := range list {
- if e == elem {
- return true
- }
- }
-
- return false
-}
-
-func (t *Websocket) injectGraphQLWSSubprotocols() {
- // the list of subprotocols is specified by the consumer of the Websocket struct,
- // in order to preserve backward compatibility, we inject the graphql specific subprotocols
- // at runtime
- if !t.didInjectSubprotocols {
- defer func() {
- t.didInjectSubprotocols = true
- }()
-
- for _, subprotocol := range supportedSubprotocols {
- if !contains(t.Upgrader.Subprotocols, subprotocol) {
- t.Upgrader.Subprotocols = append(t.Upgrader.Subprotocols, subprotocol)
- }
- }
- }
-}
-
-func handleNextReaderError(err error) error {
- // TODO: should we consider all closure scenarios here for the ws connection?
- // for now we only list the error codes from the previous implementation
- if websocket.IsCloseError(err, websocket.CloseNormalClosure, websocket.CloseNoStatusReceived) {
- return errWsConnClosed
- }
-
- return err
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/id.go b/vendor/github.com/99designs/gqlgen/graphql/id.go
deleted file mode 100644
index b24605d1d8f..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/id.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "strconv"
-)
-
-func MarshalID(s string) Marshaler {
- return MarshalString(s)
-}
-
-func UnmarshalID(v interface{}) (string, error) {
- switch v := v.(type) {
- case string:
- return v, nil
- case json.Number:
- return string(v), nil
- case int:
- return strconv.Itoa(v), nil
- case int64:
- return strconv.FormatInt(v, 10), nil
- case float64:
- return fmt.Sprintf("%f", v), nil
- case bool:
- if v {
- return "true", nil
- } else {
- return "false", nil
- }
- case nil:
- return "null", nil
- default:
- return "", fmt.Errorf("%T is not a string", v)
- }
-}
-
-func MarshalIntID(i int) Marshaler {
- return WriterFunc(func(w io.Writer) {
- writeQuotedString(w, strconv.Itoa(i))
- })
-}
-
-func UnmarshalIntID(v interface{}) (int, error) {
- switch v := v.(type) {
- case string:
- return strconv.Atoi(v)
- case int:
- return v, nil
- case int64:
- return int(v), nil
- case json.Number:
- return strconv.Atoi(string(v))
- default:
- return 0, fmt.Errorf("%T is not an int", v)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/int.go b/vendor/github.com/99designs/gqlgen/graphql/int.go
deleted file mode 100644
index 57d0d589bae..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/int.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "strconv"
-)
-
-func MarshalInt(i int) Marshaler {
- return WriterFunc(func(w io.Writer) {
- io.WriteString(w, strconv.Itoa(i))
- })
-}
-
-func UnmarshalInt(v interface{}) (int, error) {
- switch v := v.(type) {
- case string:
- return strconv.Atoi(v)
- case int:
- return v, nil
- case int64:
- return int(v), nil
- case json.Number:
- return strconv.Atoi(string(v))
- default:
- return 0, fmt.Errorf("%T is not an int", v)
- }
-}
-
-func MarshalInt64(i int64) Marshaler {
- return WriterFunc(func(w io.Writer) {
- io.WriteString(w, strconv.FormatInt(i, 10))
- })
-}
-
-func UnmarshalInt64(v interface{}) (int64, error) {
- switch v := v.(type) {
- case string:
- return strconv.ParseInt(v, 10, 64)
- case int:
- return int64(v), nil
- case int64:
- return v, nil
- case json.Number:
- return strconv.ParseInt(string(v), 10, 64)
- default:
- return 0, fmt.Errorf("%T is not an int", v)
- }
-}
-
-func MarshalInt32(i int32) Marshaler {
- return WriterFunc(func(w io.Writer) {
- io.WriteString(w, strconv.FormatInt(int64(i), 10))
- })
-}
-
-func UnmarshalInt32(v interface{}) (int32, error) {
- switch v := v.(type) {
- case string:
- iv, err := strconv.ParseInt(v, 10, 32)
- if err != nil {
- return 0, err
- }
- return int32(iv), nil
- case int:
- return int32(v), nil
- case int64:
- return int32(v), nil
- case json.Number:
- iv, err := strconv.ParseInt(string(v), 10, 32)
- if err != nil {
- return 0, err
- }
- return int32(iv), nil
- default:
- return 0, fmt.Errorf("%T is not an int", v)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go b/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go
deleted file mode 100644
index 8482d62a861..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// introspection implements the spec defined in https://github.com/facebook/graphql/blob/master/spec/Section%204%20--%20Introspection.md#schema-introspection
-package introspection
-
-import "github.com/vektah/gqlparser/v2/ast"
-
-type (
- Directive struct {
- Name string
- description string
- Locations []string
- Args []InputValue
- IsRepeatable bool
- }
-
- EnumValue struct {
- Name string
- description string
- deprecation *ast.Directive
- }
-
- Field struct {
- Name string
- description string
- Type *Type
- Args []InputValue
- deprecation *ast.Directive
- }
-
- InputValue struct {
- Name string
- description string
- DefaultValue *string
- Type *Type
- }
-)
-
-func WrapSchema(schema *ast.Schema) *Schema {
- return &Schema{schema: schema}
-}
-
-func (f *EnumValue) Description() *string {
- if f.description == "" {
- return nil
- }
- return &f.description
-}
-
-func (f *EnumValue) IsDeprecated() bool {
- return f.deprecation != nil
-}
-
-func (f *EnumValue) DeprecationReason() *string {
- if f.deprecation == nil {
- return nil
- }
-
- reason := f.deprecation.Arguments.ForName("reason")
- if reason == nil {
- return nil
- }
-
- return &reason.Value.Raw
-}
-
-func (f *Field) Description() *string {
- if f.description == "" {
- return nil
- }
- return &f.description
-}
-
-func (f *Field) IsDeprecated() bool {
- return f.deprecation != nil
-}
-
-func (f *Field) DeprecationReason() *string {
- if f.deprecation == nil {
- return nil
- }
-
- reason := f.deprecation.Arguments.ForName("reason")
- if reason == nil {
- return nil
- }
-
- return &reason.Value.Raw
-}
-
-func (f *InputValue) Description() *string {
- if f.description == "" {
- return nil
- }
- return &f.description
-}
-
-func (f *Directive) Description() *string {
- if f.description == "" {
- return nil
- }
- return &f.description
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/introspection/query.go b/vendor/github.com/99designs/gqlgen/graphql/introspection/query.go
deleted file mode 100644
index 389a5d85c0c..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/introspection/query.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package introspection
-
-// Query is the query generated by graphiql to determine type information
-const Query = `
-query IntrospectionQuery {
- __schema {
- description
- queryType {
- name
- }
- mutationType {
- name
- }
- subscriptionType {
- name
- }
- types {
- ...FullType
- }
- directives {
- name
- description
- locations
- args {
- ...InputValue
- }
- }
- }
-}
-
-fragment FullType on __Type {
- kind
- name
- description
- specifiedByURL
- fields(includeDeprecated: true) {
- name
- description
- args {
- ...InputValue
- }
- type {
- ...TypeRef
- }
- isDeprecated
- deprecationReason
- }
- inputFields {
- ...InputValue
- }
- interfaces {
- ...TypeRef
- }
- enumValues(includeDeprecated: true) {
- name
- description
- isDeprecated
- deprecationReason
- }
- possibleTypes {
- ...TypeRef
- }
-}
-
-fragment InputValue on __InputValue {
- name
- description
- type {
- ...TypeRef
- }
- defaultValue
-}
-
-fragment TypeRef on __Type {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- }
- }
- }
- }
- }
- }
- }
-}
-`
diff --git a/vendor/github.com/99designs/gqlgen/graphql/introspection/schema.go b/vendor/github.com/99designs/gqlgen/graphql/introspection/schema.go
deleted file mode 100644
index b7b0ad94e0d..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/introspection/schema.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package introspection
-
-import (
- "sort"
- "strings"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Schema struct {
- schema *ast.Schema
-}
-
-func (s *Schema) Description() *string {
- if s.schema.Description == "" {
- return nil
- }
- return &s.schema.Description
-}
-
-func (s *Schema) Types() []Type {
- typeIndex := map[string]Type{}
- typeNames := make([]string, 0, len(s.schema.Types))
- for _, typ := range s.schema.Types {
- if strings.HasPrefix(typ.Name, "__") {
- continue
- }
- typeNames = append(typeNames, typ.Name)
- typeIndex[typ.Name] = *WrapTypeFromDef(s.schema, typ)
- }
- sort.Strings(typeNames)
-
- types := make([]Type, len(typeNames))
- for i, t := range typeNames {
- types[i] = typeIndex[t]
- }
- return types
-}
-
-func (s *Schema) QueryType() *Type {
- return WrapTypeFromDef(s.schema, s.schema.Query)
-}
-
-func (s *Schema) MutationType() *Type {
- return WrapTypeFromDef(s.schema, s.schema.Mutation)
-}
-
-func (s *Schema) SubscriptionType() *Type {
- return WrapTypeFromDef(s.schema, s.schema.Subscription)
-}
-
-func (s *Schema) Directives() []Directive {
- dIndex := map[string]Directive{}
- dNames := make([]string, 0, len(s.schema.Directives))
-
- for _, d := range s.schema.Directives {
- dNames = append(dNames, d.Name)
- dIndex[d.Name] = s.directiveFromDef(d)
- }
- sort.Strings(dNames)
-
- res := make([]Directive, len(dNames))
- for i, d := range dNames {
- res[i] = dIndex[d]
- }
-
- return res
-}
-
-func (s *Schema) directiveFromDef(d *ast.DirectiveDefinition) Directive {
- locs := make([]string, len(d.Locations))
- for i, loc := range d.Locations {
- locs[i] = string(loc)
- }
-
- args := make([]InputValue, len(d.Arguments))
- for i, arg := range d.Arguments {
- args[i] = InputValue{
- Name: arg.Name,
- description: arg.Description,
- DefaultValue: defaultValue(arg.DefaultValue),
- Type: WrapTypeFromType(s.schema, arg.Type),
- }
- }
-
- return Directive{
- Name: d.Name,
- description: d.Description,
- Locations: locs,
- Args: args,
- IsRepeatable: d.IsRepeatable,
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/introspection/type.go b/vendor/github.com/99designs/gqlgen/graphql/introspection/type.go
deleted file mode 100644
index c50733d0dfb..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/introspection/type.go
+++ /dev/null
@@ -1,191 +0,0 @@
-package introspection
-
-import (
- "strings"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Type struct {
- schema *ast.Schema
- def *ast.Definition
- typ *ast.Type
-}
-
-func WrapTypeFromDef(s *ast.Schema, def *ast.Definition) *Type {
- if def == nil {
- return nil
- }
- return &Type{schema: s, def: def}
-}
-
-func WrapTypeFromType(s *ast.Schema, typ *ast.Type) *Type {
- if typ == nil {
- return nil
- }
-
- if !typ.NonNull && typ.NamedType != "" {
- return &Type{schema: s, def: s.Types[typ.NamedType]}
- }
- return &Type{schema: s, typ: typ}
-}
-
-func (t *Type) Kind() string {
- if t.typ != nil {
- if t.typ.NonNull {
- return "NON_NULL"
- }
-
- if t.typ.Elem != nil {
- return "LIST"
- }
- } else {
- return string(t.def.Kind)
- }
-
- panic("UNKNOWN")
-}
-
-func (t *Type) Name() *string {
- if t.def == nil {
- return nil
- }
- return &t.def.Name
-}
-
-func (t *Type) Description() *string {
- if t.def == nil || t.def.Description == "" {
- return nil
- }
- return &t.def.Description
-}
-
-func (t *Type) Fields(includeDeprecated bool) []Field {
- if t.def == nil || (t.def.Kind != ast.Object && t.def.Kind != ast.Interface) {
- return []Field{}
- }
- fields := []Field{}
- for _, f := range t.def.Fields {
- if strings.HasPrefix(f.Name, "__") {
- continue
- }
-
- if !includeDeprecated && f.Directives.ForName("deprecated") != nil {
- continue
- }
-
- var args []InputValue
- for _, arg := range f.Arguments {
- args = append(args, InputValue{
- Type: WrapTypeFromType(t.schema, arg.Type),
- Name: arg.Name,
- description: arg.Description,
- DefaultValue: defaultValue(arg.DefaultValue),
- })
- }
-
- fields = append(fields, Field{
- Name: f.Name,
- description: f.Description,
- Args: args,
- Type: WrapTypeFromType(t.schema, f.Type),
- deprecation: f.Directives.ForName("deprecated"),
- })
- }
- return fields
-}
-
-func (t *Type) InputFields() []InputValue {
- if t.def == nil || t.def.Kind != ast.InputObject {
- return []InputValue{}
- }
-
- res := []InputValue{}
- for _, f := range t.def.Fields {
- res = append(res, InputValue{
- Name: f.Name,
- description: f.Description,
- Type: WrapTypeFromType(t.schema, f.Type),
- DefaultValue: defaultValue(f.DefaultValue),
- })
- }
- return res
-}
-
-func defaultValue(value *ast.Value) *string {
- if value == nil {
- return nil
- }
- val := value.String()
- return &val
-}
-
-func (t *Type) Interfaces() []Type {
- if t.def == nil || t.def.Kind != ast.Object {
- return []Type{}
- }
-
- res := []Type{}
- for _, intf := range t.def.Interfaces {
- res = append(res, *WrapTypeFromDef(t.schema, t.schema.Types[intf]))
- }
-
- return res
-}
-
-func (t *Type) PossibleTypes() []Type {
- if t.def == nil || (t.def.Kind != ast.Interface && t.def.Kind != ast.Union) {
- return []Type{}
- }
-
- res := []Type{}
- for _, pt := range t.schema.GetPossibleTypes(t.def) {
- res = append(res, *WrapTypeFromDef(t.schema, pt))
- }
- return res
-}
-
-func (t *Type) EnumValues(includeDeprecated bool) []EnumValue {
- if t.def == nil || t.def.Kind != ast.Enum {
- return []EnumValue{}
- }
-
- res := []EnumValue{}
- for _, val := range t.def.EnumValues {
- if !includeDeprecated && val.Directives.ForName("deprecated") != nil {
- continue
- }
-
- res = append(res, EnumValue{
- Name: val.Name,
- description: val.Description,
- deprecation: val.Directives.ForName("deprecated"),
- })
- }
- return res
-}
-
-func (t *Type) OfType() *Type {
- if t.typ == nil {
- return nil
- }
- if t.typ.NonNull {
- // fake non null nodes
- cpy := *t.typ
- cpy.NonNull = false
-
- return WrapTypeFromType(t.schema, &cpy)
- }
- return WrapTypeFromType(t.schema, t.typ.Elem)
-}
-
-func (t *Type) SpecifiedByURL() *string {
- directive := t.def.Directives.ForName("specifiedBy")
- if t.def.Kind != ast.Scalar || directive == nil {
- return nil
- }
- // def: directive @specifiedBy(url: String!) on SCALAR
- // the argument "url" is required.
- url := directive.Arguments.ForName("url")
- return &url.Value.Raw
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/jsonw.go b/vendor/github.com/99designs/gqlgen/graphql/jsonw.go
deleted file mode 100644
index 54e293f1ad0..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/jsonw.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package graphql
-
-import (
- "context"
- "io"
-)
-
-var (
- nullLit = []byte(`null`)
- trueLit = []byte(`true`)
- falseLit = []byte(`false`)
- openBrace = []byte(`{`)
- closeBrace = []byte(`}`)
- openBracket = []byte(`[`)
- closeBracket = []byte(`]`)
- colon = []byte(`:`)
- comma = []byte(`,`)
-)
-
-var (
- Null = &lit{nullLit}
- True = &lit{trueLit}
- False = &lit{falseLit}
-)
-
-type Marshaler interface {
- MarshalGQL(w io.Writer)
-}
-
-type Unmarshaler interface {
- UnmarshalGQL(v interface{}) error
-}
-
-type ContextMarshaler interface {
- MarshalGQLContext(ctx context.Context, w io.Writer) error
-}
-
-type ContextUnmarshaler interface {
- UnmarshalGQLContext(ctx context.Context, v interface{}) error
-}
-
-type contextMarshalerAdapter struct {
- Context context.Context
- ContextMarshaler
-}
-
-func WrapContextMarshaler(ctx context.Context, m ContextMarshaler) Marshaler {
- return contextMarshalerAdapter{Context: ctx, ContextMarshaler: m}
-}
-
-func (a contextMarshalerAdapter) MarshalGQL(w io.Writer) {
- err := a.MarshalGQLContext(a.Context, w)
- if err != nil {
- AddError(a.Context, err)
- Null.MarshalGQL(w)
- }
-}
-
-type WriterFunc func(writer io.Writer)
-
-func (f WriterFunc) MarshalGQL(w io.Writer) {
- f(w)
-}
-
-type ContextWriterFunc func(ctx context.Context, writer io.Writer) error
-
-func (f ContextWriterFunc) MarshalGQLContext(ctx context.Context, w io.Writer) error {
- return f(ctx, w)
-}
-
-type Array []Marshaler
-
-func (a Array) MarshalGQL(writer io.Writer) {
- writer.Write(openBracket)
- for i, val := range a {
- if i != 0 {
- writer.Write(comma)
- }
- val.MarshalGQL(writer)
- }
- writer.Write(closeBracket)
-}
-
-type lit struct{ b []byte }
-
-func (l lit) MarshalGQL(w io.Writer) {
- w.Write(l.b)
-}
-
-func (l lit) MarshalGQLContext(ctx context.Context, w io.Writer) error {
- w.Write(l.b)
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/map.go b/vendor/github.com/99designs/gqlgen/graphql/map.go
deleted file mode 100644
index 1e91d1d98c1..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/map.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
- "fmt"
- "io"
-)
-
-func MarshalMap(val map[string]interface{}) Marshaler {
- return WriterFunc(func(w io.Writer) {
- err := json.NewEncoder(w).Encode(val)
- if err != nil {
- panic(err)
- }
- })
-}
-
-func UnmarshalMap(v interface{}) (map[string]interface{}, error) {
- if m, ok := v.(map[string]interface{}); ok {
- return m, nil
- }
-
- return nil, fmt.Errorf("%T is not a map", v)
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/oneshot.go b/vendor/github.com/99designs/gqlgen/graphql/oneshot.go
deleted file mode 100644
index 01fa15f896b..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/oneshot.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package graphql
-
-import "context"
-
-func OneShot(resp *Response) ResponseHandler {
- var oneshot bool
-
- return func(context context.Context) *Response {
- if oneshot {
- return nil
- }
- oneshot = true
-
- return resp
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go b/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
deleted file mode 100644
index 1b04a20daf7..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package playground
-
-import (
- "html/template"
- "net/http"
-)
-
-var page = template.Must(template.New("graphiql").Parse(`
-
-
- {{.title}}
-
-
-
-
-
-
-
-
-
-
-
-
-`))
-
-func Handler(title string, endpoint string) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- w.Header().Add("Content-Type", "text/html")
- err := page.Execute(w, map[string]string{
- "title": title,
- "endpoint": endpoint,
- "version": "1.5.16",
- "cssSRI": "sha256-HADQowUuFum02+Ckkv5Yu5ygRoLllHZqg0TFZXY7NHI=",
- "jsSRI": "sha256-uHp12yvpXC4PC9+6JmITxKuLYwjlW9crq9ywPE5Rxco=",
- "reactSRI": "sha256-Ipu/TQ50iCCVZBUsZyNJfxrDk0E2yhaEIz0vqI+kFG8=",
- "reactDOMSRI": "sha256-nbMykgB6tsOFJ7OdVmPpdqMFVk4ZsqWocT6issAPUF0=",
- })
- if err != nil {
- panic(err)
- }
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/recovery.go b/vendor/github.com/99designs/gqlgen/graphql/recovery.go
deleted file mode 100644
index 9bc0e47e1df..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/recovery.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package graphql
-
-import (
- "context"
- "fmt"
- "os"
- "runtime/debug"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-type RecoverFunc func(ctx context.Context, err interface{}) (userMessage error)
-
-func DefaultRecover(ctx context.Context, err interface{}) error {
- fmt.Fprintln(os.Stderr, err)
- fmt.Fprintln(os.Stderr)
- debug.PrintStack()
-
- return gqlerror.Errorf("internal system error")
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/response.go b/vendor/github.com/99designs/gqlgen/graphql/response.go
deleted file mode 100644
index 0d36049a336..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/response.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package graphql
-
-import (
- "context"
- "encoding/json"
- "fmt"
-
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-// Errors are intentionally serialized first based on the advice in
-// https://github.com/facebook/graphql/commit/7b40390d48680b15cb93e02d46ac5eb249689876#diff-757cea6edf0288677a9eea4cfc801d87R107
-// and https://github.com/facebook/graphql/pull/384
-type Response struct {
- Errors gqlerror.List `json:"errors,omitempty"`
- Data json.RawMessage `json:"data"`
- Extensions map[string]interface{} `json:"extensions,omitempty"`
-}
-
-func ErrorResponse(ctx context.Context, messagef string, args ...interface{}) *Response {
- return &Response{
- Errors: gqlerror.List{{Message: fmt.Sprintf(messagef, args...)}},
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/root.go b/vendor/github.com/99designs/gqlgen/graphql/root.go
deleted file mode 100644
index 3405d18054d..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/root.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package graphql
-
-type Query struct{}
-
-type Mutation struct{}
-
-type Subscription struct{}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/stats.go b/vendor/github.com/99designs/gqlgen/graphql/stats.go
deleted file mode 100644
index a52e143ebe4..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/stats.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package graphql
-
-import (
- "context"
- "fmt"
- "time"
-)
-
-type Stats struct {
- OperationStart time.Time
- Read TraceTiming
- Parsing TraceTiming
- Validation TraceTiming
-
- // Stats collected by handler extensions. Dont use directly, the extension should provide a type safe way to
- // access this.
- extension map[string]interface{}
-}
-
-type TraceTiming struct {
- Start time.Time
- End time.Time
-}
-
-var ctxTraceStart key = "trace_start"
-
-// StartOperationTrace captures the current time and stores it in context. This will eventually be added to request
-// context but we want to grab it as soon as possible. For transports that can only handle a single graphql query
-// per http requests you dont need to call this at all, the server will do it for you. For transports that handle
-// multiple (eg batching, subscriptions) this should be called before decoding each request.
-func StartOperationTrace(ctx context.Context) context.Context {
- return context.WithValue(ctx, ctxTraceStart, Now())
-}
-
-// GetStartTime should only be called by the handler package, it will be set into request context
-// as Stats.Start
-func GetStartTime(ctx context.Context) time.Time {
- t, ok := ctx.Value(ctxTraceStart).(time.Time)
- if !ok {
- panic(fmt.Sprintf("missing start time: %T", ctx.Value(ctxTraceStart)))
- }
- return t
-}
-
-func (c *Stats) SetExtension(name string, data interface{}) {
- if c.extension == nil {
- c.extension = map[string]interface{}{}
- }
- c.extension[name] = data
-}
-
-func (c *Stats) GetExtension(name string) interface{} {
- if c.extension == nil {
- return nil
- }
- return c.extension[name]
-}
-
-// Now is time.Now, except in tests. Then it can be whatever you want it to be.
-var Now = time.Now
diff --git a/vendor/github.com/99designs/gqlgen/graphql/string.go b/vendor/github.com/99designs/gqlgen/graphql/string.go
deleted file mode 100644
index 742e50cc3b7..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/string.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package graphql
-
-import (
- "fmt"
- "io"
- "strconv"
-)
-
-const encodeHex = "0123456789ABCDEF"
-
-func MarshalString(s string) Marshaler {
- return WriterFunc(func(w io.Writer) {
- writeQuotedString(w, s)
- })
-}
-
-func writeQuotedString(w io.Writer, s string) {
- start := 0
- io.WriteString(w, `"`)
-
- for i, c := range s {
- if c < 0x20 || c == '\\' || c == '"' {
- io.WriteString(w, s[start:i])
-
- switch c {
- case '\t':
- io.WriteString(w, `\t`)
- case '\r':
- io.WriteString(w, `\r`)
- case '\n':
- io.WriteString(w, `\n`)
- case '\\':
- io.WriteString(w, `\\`)
- case '"':
- io.WriteString(w, `\"`)
- default:
- io.WriteString(w, `\u00`)
- w.Write([]byte{encodeHex[c>>4], encodeHex[c&0xf]})
- }
-
- start = i + 1
- }
- }
-
- io.WriteString(w, s[start:])
- io.WriteString(w, `"`)
-}
-
-func UnmarshalString(v interface{}) (string, error) {
- switch v := v.(type) {
- case string:
- return v, nil
- case int:
- return strconv.Itoa(v), nil
- case int64:
- return strconv.FormatInt(v, 10), nil
- case float64:
- return fmt.Sprintf("%f", v), nil
- case bool:
- if v {
- return "true", nil
- } else {
- return "false", nil
- }
- case nil:
- return "null", nil
- default:
- return "", fmt.Errorf("%T is not a string", v)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/time.go b/vendor/github.com/99designs/gqlgen/graphql/time.go
deleted file mode 100644
index ef3d17da329..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/time.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package graphql
-
-import (
- "errors"
- "io"
- "strconv"
- "time"
-)
-
-func MarshalTime(t time.Time) Marshaler {
- if t.IsZero() {
- return Null
- }
-
- return WriterFunc(func(w io.Writer) {
- io.WriteString(w, strconv.Quote(t.Format(time.RFC3339Nano)))
- })
-}
-
-func UnmarshalTime(v interface{}) (time.Time, error) {
- if tmpStr, ok := v.(string); ok {
- return time.Parse(time.RFC3339Nano, tmpStr)
- }
- return time.Time{}, errors.New("time should be RFC3339Nano formatted string")
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/uint.go b/vendor/github.com/99designs/gqlgen/graphql/uint.go
deleted file mode 100644
index 9349c2f4d24..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/uint.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package graphql
-
-import (
- "encoding/json"
- "fmt"
- "io"
- "strconv"
-)
-
-func MarshalUint(i uint) Marshaler {
- return WriterFunc(func(w io.Writer) {
- _, _ = io.WriteString(w, strconv.FormatUint(uint64(i), 10))
- })
-}
-
-func UnmarshalUint(v interface{}) (uint, error) {
- switch v := v.(type) {
- case string:
- u64, err := strconv.ParseUint(v, 10, 64)
- return uint(u64), err
- case int:
- return uint(v), nil
- case int64:
- return uint(v), nil
- case json.Number:
- u64, err := strconv.ParseUint(string(v), 10, 64)
- return uint(u64), err
- default:
- return 0, fmt.Errorf("%T is not an uint", v)
- }
-}
-
-func MarshalUint64(i uint64) Marshaler {
- return WriterFunc(func(w io.Writer) {
- _, _ = io.WriteString(w, strconv.FormatUint(i, 10))
- })
-}
-
-func UnmarshalUint64(v interface{}) (uint64, error) {
- switch v := v.(type) {
- case string:
- return strconv.ParseUint(v, 10, 64)
- case int:
- return uint64(v), nil
- case int64:
- return uint64(v), nil
- case json.Number:
- return strconv.ParseUint(string(v), 10, 64)
- default:
- return 0, fmt.Errorf("%T is not an uint", v)
- }
-}
-
-func MarshalUint32(i uint32) Marshaler {
- return WriterFunc(func(w io.Writer) {
- _, _ = io.WriteString(w, strconv.FormatUint(uint64(i), 10))
- })
-}
-
-func UnmarshalUint32(v interface{}) (uint32, error) {
- switch v := v.(type) {
- case string:
- iv, err := strconv.ParseInt(v, 10, 32)
- if err != nil {
- return 0, err
- }
- return uint32(iv), nil
- case int:
- return uint32(v), nil
- case int64:
- return uint32(v), nil
- case json.Number:
- iv, err := strconv.ParseUint(string(v), 10, 32)
- if err != nil {
- return 0, err
- }
- return uint32(iv), nil
- default:
- return 0, fmt.Errorf("%T is not an uint", v)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/upload.go b/vendor/github.com/99designs/gqlgen/graphql/upload.go
deleted file mode 100644
index 62f71c0dc0d..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/upload.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package graphql
-
-import (
- "fmt"
- "io"
-)
-
-type Upload struct {
- File io.Reader
- Filename string
- Size int64
- ContentType string
-}
-
-func MarshalUpload(f Upload) Marshaler {
- return WriterFunc(func(w io.Writer) {
- io.Copy(w, f.File)
- })
-}
-
-func UnmarshalUpload(v interface{}) (Upload, error) {
- upload, ok := v.(Upload)
- if !ok {
- return Upload{}, fmt.Errorf("%T is not an Upload", v)
- }
- return upload, nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/version.go b/vendor/github.com/99designs/gqlgen/graphql/version.go
deleted file mode 100644
index d2845efc7fc..00000000000
--- a/vendor/github.com/99designs/gqlgen/graphql/version.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package graphql
-
-const Version = "v0.17.2"
diff --git a/vendor/github.com/99designs/gqlgen/init-templates/gqlgen.yml.gotmpl b/vendor/github.com/99designs/gqlgen/init-templates/gqlgen.yml.gotmpl
deleted file mode 100644
index 589ce6ca5fc..00000000000
--- a/vendor/github.com/99designs/gqlgen/init-templates/gqlgen.yml.gotmpl
+++ /dev/null
@@ -1,56 +0,0 @@
-# Where are all the schema files located? globs are supported eg src/**/*.graphqls
-schema:
- - graph/*.graphqls
-
-# Where should the generated server code go?
-exec:
- filename: graph/generated/generated.go
- package: generated
-
-# Uncomment to enable federation
-# federation:
-# filename: graph/generated/federation.go
-# package: generated
-
-# Where should any generated models go?
-model:
- filename: graph/model/models_gen.go
- package: model
-
-# Where should the resolver implementations go?
-resolver:
- layout: follow-schema
- dir: graph
- package: graph
-
-# Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models
-# struct_tag: json
-
-# Optional: turn on to use []Thing instead of []*Thing
-# omit_slice_element_pointers: false
-
-# Optional: set to speed up generation time by not performing a final validation pass.
-# skip_validation: true
-
-# gqlgen will search for any type names in the schema in these go packages
-# if they match it will use them, otherwise it will generate them.
-autobind:
-# - "{{.}}/graph/model"
-
-# This section declares type mapping between the GraphQL and go type systems
-#
-# The first line in each type will be used as defaults for resolver arguments and
-# modelgen, the others will be allowed when binding to fields. Configure them to
-# your liking
-models:
- ID:
- model:
- - github.com/99designs/gqlgen/graphql.ID
- - github.com/99designs/gqlgen/graphql.Int
- - github.com/99designs/gqlgen/graphql.Int64
- - github.com/99designs/gqlgen/graphql.Int32
- Int:
- model:
- - github.com/99designs/gqlgen/graphql.Int
- - github.com/99designs/gqlgen/graphql.Int64
- - github.com/99designs/gqlgen/graphql.Int32
diff --git a/vendor/github.com/99designs/gqlgen/init-templates/schema.graphqls b/vendor/github.com/99designs/gqlgen/init-templates/schema.graphqls
deleted file mode 100644
index c6a91bb4808..00000000000
--- a/vendor/github.com/99designs/gqlgen/init-templates/schema.graphqls
+++ /dev/null
@@ -1,28 +0,0 @@
-# GraphQL schema example
-#
-# https://gqlgen.com/getting-started/
-
-type Todo {
- id: ID!
- text: String!
- done: Boolean!
- user: User!
-}
-
-type User {
- id: ID!
- name: String!
-}
-
-type Query {
- todos: [Todo!]!
-}
-
-input NewTodo {
- text: String!
- userId: String!
-}
-
-type Mutation {
- createTodo(input: NewTodo!): Todo!
-}
diff --git a/vendor/github.com/99designs/gqlgen/internal/code/compare.go b/vendor/github.com/99designs/gqlgen/internal/code/compare.go
deleted file mode 100644
index 1150a24e48c..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/code/compare.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package code
-
-import (
- "fmt"
- "go/types"
-)
-
-// CompatibleTypes isnt a strict comparison, it allows for pointer differences
-func CompatibleTypes(expected types.Type, actual types.Type) error {
- // Special case to deal with pointer mismatches
- {
- expectedPtr, expectedIsPtr := expected.(*types.Pointer)
- actualPtr, actualIsPtr := actual.(*types.Pointer)
-
- if expectedIsPtr && actualIsPtr {
- return CompatibleTypes(expectedPtr.Elem(), actualPtr.Elem())
- }
- if expectedIsPtr && !actualIsPtr {
- return CompatibleTypes(expectedPtr.Elem(), actual)
- }
- if !expectedIsPtr && actualIsPtr {
- return CompatibleTypes(expected, actualPtr.Elem())
- }
- }
-
- switch expected := expected.(type) {
- case *types.Slice:
- if actual, ok := actual.(*types.Slice); ok {
- return CompatibleTypes(expected.Elem(), actual.Elem())
- }
-
- case *types.Array:
- if actual, ok := actual.(*types.Array); ok {
- if expected.Len() != actual.Len() {
- return fmt.Errorf("array length differs")
- }
-
- return CompatibleTypes(expected.Elem(), actual.Elem())
- }
-
- case *types.Basic:
- if actual, ok := actual.(*types.Basic); ok {
- if actual.Kind() != expected.Kind() {
- return fmt.Errorf("basic kind differs, %s != %s", expected.Name(), actual.Name())
- }
-
- return nil
- }
-
- case *types.Struct:
- if actual, ok := actual.(*types.Struct); ok {
- if expected.NumFields() != actual.NumFields() {
- return fmt.Errorf("number of struct fields differ")
- }
-
- for i := 0; i < expected.NumFields(); i++ {
- if expected.Field(i).Name() != actual.Field(i).Name() {
- return fmt.Errorf("struct field %d name differs, %s != %s", i, expected.Field(i).Name(), actual.Field(i).Name())
- }
- if err := CompatibleTypes(expected.Field(i).Type(), actual.Field(i).Type()); err != nil {
- return err
- }
- }
- return nil
- }
-
- case *types.Tuple:
- if actual, ok := actual.(*types.Tuple); ok {
- if expected.Len() != actual.Len() {
- return fmt.Errorf("tuple length differs, %d != %d", expected.Len(), actual.Len())
- }
-
- for i := 0; i < expected.Len(); i++ {
- if err := CompatibleTypes(expected.At(i).Type(), actual.At(i).Type()); err != nil {
- return err
- }
- }
-
- return nil
- }
-
- case *types.Signature:
- if actual, ok := actual.(*types.Signature); ok {
- if err := CompatibleTypes(expected.Params(), actual.Params()); err != nil {
- return err
- }
- if err := CompatibleTypes(expected.Results(), actual.Results()); err != nil {
- return err
- }
-
- return nil
- }
- case *types.Interface:
- if actual, ok := actual.(*types.Interface); ok {
- if expected.NumMethods() != actual.NumMethods() {
- return fmt.Errorf("interface method count differs, %d != %d", expected.NumMethods(), actual.NumMethods())
- }
-
- for i := 0; i < expected.NumMethods(); i++ {
- if expected.Method(i).Name() != actual.Method(i).Name() {
- return fmt.Errorf("interface method %d name differs, %s != %s", i, expected.Method(i).Name(), actual.Method(i).Name())
- }
- if err := CompatibleTypes(expected.Method(i).Type(), actual.Method(i).Type()); err != nil {
- return err
- }
- }
-
- return nil
- }
-
- case *types.Map:
- if actual, ok := actual.(*types.Map); ok {
- if err := CompatibleTypes(expected.Key(), actual.Key()); err != nil {
- return err
- }
-
- if err := CompatibleTypes(expected.Elem(), actual.Elem()); err != nil {
- return err
- }
-
- return nil
- }
-
- case *types.Chan:
- if actual, ok := actual.(*types.Chan); ok {
- return CompatibleTypes(expected.Elem(), actual.Elem())
- }
-
- case *types.Named:
- if actual, ok := actual.(*types.Named); ok {
- if NormalizeVendor(expected.Obj().Pkg().Path()) != NormalizeVendor(actual.Obj().Pkg().Path()) {
- return fmt.Errorf(
- "package name of named type differs, %s != %s",
- NormalizeVendor(expected.Obj().Pkg().Path()),
- NormalizeVendor(actual.Obj().Pkg().Path()),
- )
- }
-
- if expected.Obj().Name() != actual.Obj().Name() {
- return fmt.Errorf(
- "named type name differs, %s != %s",
- NormalizeVendor(expected.Obj().Name()),
- NormalizeVendor(actual.Obj().Name()),
- )
- }
-
- return nil
- }
-
- // Before models are generated all missing references will be Invalid Basic references.
- // lets assume these are valid too.
- if actual, ok := actual.(*types.Basic); ok && actual.Kind() == types.Invalid {
- return nil
- }
-
- default:
- return fmt.Errorf("missing support for %T", expected)
- }
-
- return fmt.Errorf("type mismatch %T != %T", expected, actual)
-}
diff --git a/vendor/github.com/99designs/gqlgen/internal/code/imports.go b/vendor/github.com/99designs/gqlgen/internal/code/imports.go
deleted file mode 100644
index a46ad2c6b9f..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/code/imports.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package code
-
-import (
- "go/build"
- "go/parser"
- "go/token"
- "io/ioutil"
- "path/filepath"
- "regexp"
- "strings"
-)
-
-var gopaths []string
-
-func init() {
- gopaths = filepath.SplitList(build.Default.GOPATH)
- for i, p := range gopaths {
- gopaths[i] = filepath.ToSlash(filepath.Join(p, "src"))
- }
-}
-
-// NameForDir manually looks for package stanzas in files located in the given directory. This can be
-// much faster than having to consult go list, because we already know exactly where to look.
-func NameForDir(dir string) string {
- dir, err := filepath.Abs(dir)
- if err != nil {
- return SanitizePackageName(filepath.Base(dir))
- }
- files, err := ioutil.ReadDir(dir)
- if err != nil {
- return SanitizePackageName(filepath.Base(dir))
- }
- fset := token.NewFileSet()
- for _, file := range files {
- if !strings.HasSuffix(strings.ToLower(file.Name()), ".go") {
- continue
- }
-
- filename := filepath.Join(dir, file.Name())
- if src, err := parser.ParseFile(fset, filename, nil, parser.PackageClauseOnly); err == nil {
- return src.Name.Name
- }
- }
-
- return SanitizePackageName(filepath.Base(dir))
-}
-
-type goModuleSearchResult struct {
- path string
- goModPath string
- moduleName string
-}
-
-var goModuleRootCache = map[string]goModuleSearchResult{}
-
-// goModuleRoot returns the root of the current go module if there is a go.mod file in the directory tree
-// If not, it returns false
-func goModuleRoot(dir string) (string, bool) {
- dir, err := filepath.Abs(dir)
- if err != nil {
- panic(err)
- }
- dir = filepath.ToSlash(dir)
-
- dirs := []string{dir}
- result := goModuleSearchResult{}
-
- for {
- modDir := dirs[len(dirs)-1]
-
- if val, ok := goModuleRootCache[dir]; ok {
- result = val
- break
- }
-
- if content, err := ioutil.ReadFile(filepath.Join(modDir, "go.mod")); err == nil {
- moduleName := string(modregex.FindSubmatch(content)[1])
- result = goModuleSearchResult{
- path: moduleName,
- goModPath: modDir,
- moduleName: moduleName,
- }
- goModuleRootCache[modDir] = result
- break
- }
-
- if modDir == "" || modDir == "." || modDir == "/" || strings.HasSuffix(modDir, "\\") {
- // Reached the top of the file tree which means go.mod file is not found
- // Set root folder with a sentinel cache value
- goModuleRootCache[modDir] = result
- break
- }
-
- dirs = append(dirs, filepath.Dir(modDir))
- }
-
- // create a cache for each path in a tree traversed, except the top one as it is already cached
- for _, d := range dirs[:len(dirs)-1] {
- if result.moduleName == "" {
- // go.mod is not found in the tree, so the same sentinel value fits all the directories in a tree
- goModuleRootCache[d] = result
- } else {
- if relPath, err := filepath.Rel(result.goModPath, d); err != nil {
- panic(err)
- } else {
- path := result.moduleName
- relPath := filepath.ToSlash(relPath)
- if !strings.HasSuffix(relPath, "/") {
- path += "/"
- }
- path += relPath
-
- goModuleRootCache[d] = goModuleSearchResult{
- path: path,
- goModPath: result.goModPath,
- moduleName: result.moduleName,
- }
- }
- }
- }
-
- res := goModuleRootCache[dir]
- if res.moduleName == "" {
- return "", false
- }
- return res.path, true
-}
-
-// ImportPathForDir takes a path and returns a golang import path for the package
-func ImportPathForDir(dir string) (res string) {
- dir, err := filepath.Abs(dir)
- if err != nil {
- panic(err)
- }
- dir = filepath.ToSlash(dir)
-
- modDir, ok := goModuleRoot(dir)
- if ok {
- return modDir
- }
-
- for _, gopath := range gopaths {
- if len(gopath) < len(dir) && strings.EqualFold(gopath, dir[0:len(gopath)]) {
- return dir[len(gopath)+1:]
- }
- }
-
- return ""
-}
-
-var modregex = regexp.MustCompile(`module ([^\s]*)`)
diff --git a/vendor/github.com/99designs/gqlgen/internal/code/packages.go b/vendor/github.com/99designs/gqlgen/internal/code/packages.go
deleted file mode 100644
index c800d3d84f2..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/code/packages.go
+++ /dev/null
@@ -1,223 +0,0 @@
-package code
-
-import (
- "bytes"
- "errors"
- "fmt"
- "os"
- "os/exec"
- "path/filepath"
-
- "golang.org/x/tools/go/packages"
-)
-
-var mode = packages.NeedName |
- packages.NeedFiles |
- packages.NeedImports |
- packages.NeedTypes |
- packages.NeedSyntax |
- packages.NeedTypesInfo |
- packages.NeedModule |
- packages.NeedDeps
-
-// Packages is a wrapper around x/tools/go/packages that maintains a (hopefully prewarmed) cache of packages
-// that can be invalidated as writes are made and packages are known to change.
-type Packages struct {
- packages map[string]*packages.Package
- importToName map[string]string
- loadErrors []error
-
- numLoadCalls int // stupid test steam. ignore.
- numNameCalls int // stupid test steam. ignore.
-}
-
-// ReloadAll will call LoadAll after clearing the package cache, so we can reload
-// packages in the case that the packages have changed
-func (p *Packages) ReloadAll(importPaths ...string) []*packages.Package {
- p.packages = nil
- return p.LoadAll(importPaths...)
-}
-
-func (p *Packages) checkModuleLoaded(pkgs []*packages.Package) bool {
- for i := range pkgs {
- if pkgs[i] == nil || pkgs[i].Module == nil {
- return false
- }
- }
- return true
-}
-
-// LoadAll will call packages.Load and return the package data for the given packages,
-// but if the package already have been loaded it will return cached values instead.
-func (p *Packages) LoadAll(importPaths ...string) []*packages.Package {
- if p.packages == nil {
- p.packages = map[string]*packages.Package{}
- }
-
- missing := make([]string, 0, len(importPaths))
- for _, path := range importPaths {
- if _, ok := p.packages[path]; ok {
- continue
- }
- missing = append(missing, path)
- }
-
- if len(missing) > 0 {
- p.numLoadCalls++
- pkgs, err := packages.Load(&packages.Config{Mode: mode}, missing...)
-
- // Sometimes packages.Load not loaded the module info. Call it again to reload it.
- if !p.checkModuleLoaded(pkgs) {
- fmt.Println("reloading module info")
- pkgs, err = packages.Load(&packages.Config{Mode: mode}, missing...)
- }
-
- if err != nil {
- p.loadErrors = append(p.loadErrors, err)
- }
-
- for _, pkg := range pkgs {
- p.addToCache(pkg)
- }
- }
-
- res := make([]*packages.Package, 0, len(importPaths))
- for _, path := range importPaths {
- res = append(res, p.packages[NormalizeVendor(path)])
- }
- return res
-}
-
-func (p *Packages) addToCache(pkg *packages.Package) {
- imp := NormalizeVendor(pkg.PkgPath)
- p.packages[imp] = pkg
- for _, imp := range pkg.Imports {
- if _, found := p.packages[NormalizeVendor(imp.PkgPath)]; !found {
- p.addToCache(imp)
- }
- }
-}
-
-// Load works the same as LoadAll, except a single package at a time.
-func (p *Packages) Load(importPath string) *packages.Package {
- // Quick cache check first to avoid expensive allocations of LoadAll()
- if p.packages != nil {
- if pkg, ok := p.packages[importPath]; ok {
- return pkg
- }
- }
-
- pkgs := p.LoadAll(importPath)
- if len(pkgs) == 0 {
- return nil
- }
- return pkgs[0]
-}
-
-// LoadWithTypes tries a standard load, which may not have enough type info (TypesInfo== nil) available if the imported package is a
-// second order dependency. Fortunately this doesnt happen very often, so we can just issue a load when we detect it.
-func (p *Packages) LoadWithTypes(importPath string) *packages.Package {
- pkg := p.Load(importPath)
- if pkg == nil || pkg.TypesInfo == nil {
- p.numLoadCalls++
- pkgs, err := packages.Load(&packages.Config{Mode: mode}, importPath)
- if err != nil {
- p.loadErrors = append(p.loadErrors, err)
- return nil
- }
- p.addToCache(pkgs[0])
- pkg = pkgs[0]
- }
- return pkg
-}
-
-// NameForPackage looks up the package name from the package stanza in the go files at the given import path.
-func (p *Packages) NameForPackage(importPath string) string {
- if importPath == "" {
- panic(errors.New("import path can not be empty"))
- }
- if p.importToName == nil {
- p.importToName = map[string]string{}
- }
-
- importPath = NormalizeVendor(importPath)
-
- // if its in the name cache use it
- if name := p.importToName[importPath]; name != "" {
- return name
- }
-
- // otherwise we might have already loaded the full package data for it cached
- pkg := p.packages[importPath]
-
- if pkg == nil {
- // otherwise do a name only lookup for it but dont put it in the package cache.
- p.numNameCalls++
- pkgs, err := packages.Load(&packages.Config{Mode: packages.NeedName}, importPath)
- if err != nil {
- p.loadErrors = append(p.loadErrors, err)
- } else {
- pkg = pkgs[0]
- }
- }
-
- if pkg == nil || pkg.Name == "" {
- return SanitizePackageName(filepath.Base(importPath))
- }
-
- p.importToName[importPath] = pkg.Name
-
- return pkg.Name
-}
-
-// Evict removes a given package import path from the cache, along with any packages that depend on it. Further calls
-// to Load will fetch it from disk.
-func (p *Packages) Evict(importPath string) {
- delete(p.packages, importPath)
-
- for _, pkg := range p.packages {
- for _, imported := range pkg.Imports {
- if imported.PkgPath == importPath {
- p.Evict(pkg.PkgPath)
- }
- }
- }
-}
-
-func (p *Packages) ModTidy() error {
- p.packages = nil
- tidyCmd := exec.Command("go", "mod", "tidy")
- tidyCmd.Stdout = os.Stdout
- tidyCmd.Stderr = os.Stdout
- if err := tidyCmd.Run(); err != nil {
- return fmt.Errorf("go mod tidy failed: %w", err)
- }
- return nil
-}
-
-// Errors returns any errors that were returned by Load, either from the call itself or any of the loaded packages.
-func (p *Packages) Errors() PkgErrors {
- var res []error //nolint:prealloc
- res = append(res, p.loadErrors...)
- for _, pkg := range p.packages {
- for _, err := range pkg.Errors {
- res = append(res, err)
- }
- }
- return res
-}
-
-func (p *Packages) Count() int {
- return len(p.packages)
-}
-
-type PkgErrors []error
-
-func (p PkgErrors) Error() string {
- var b bytes.Buffer
- b.WriteString("packages.Load: ")
- for _, e := range p {
- b.WriteString(e.Error() + "\n")
- }
- return b.String()
-}
diff --git a/vendor/github.com/99designs/gqlgen/internal/code/util.go b/vendor/github.com/99designs/gqlgen/internal/code/util.go
deleted file mode 100644
index cbe40858e24..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/code/util.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package code
-
-import (
- "go/build"
- "os"
- "path/filepath"
- "regexp"
- "strings"
-)
-
-// take a string in the form github.com/package/blah.Type and split it into package and type
-func PkgAndType(name string) (string, string) {
- parts := strings.Split(name, ".")
- if len(parts) == 1 {
- return "", name
- }
-
- return strings.Join(parts[:len(parts)-1], "."), parts[len(parts)-1]
-}
-
-var modsRegex = regexp.MustCompile(`^(\*|\[\])*`)
-
-// NormalizeVendor takes a qualified package path and turns it into normal one.
-// eg .
-// github.com/foo/vendor/github.com/99designs/gqlgen/graphql becomes
-// github.com/99designs/gqlgen/graphql
-func NormalizeVendor(pkg string) string {
- modifiers := modsRegex.FindAllString(pkg, 1)[0]
- pkg = strings.TrimPrefix(pkg, modifiers)
- parts := strings.Split(pkg, "/vendor/")
- return modifiers + parts[len(parts)-1]
-}
-
-// QualifyPackagePath takes an import and fully qualifies it with a vendor dir, if one is required.
-// eg .
-// github.com/99designs/gqlgen/graphql becomes
-// github.com/foo/vendor/github.com/99designs/gqlgen/graphql
-//
-// x/tools/packages only supports 'qualified package paths' so this will need to be done prior to calling it
-// See https://github.com/golang/go/issues/30289
-func QualifyPackagePath(importPath string) string {
- wd, _ := os.Getwd()
-
- // in go module mode, the import path doesn't need fixing
- if _, ok := goModuleRoot(wd); ok {
- return importPath
- }
-
- pkg, err := build.Import(importPath, wd, 0)
- if err != nil {
- return importPath
- }
-
- return pkg.ImportPath
-}
-
-var invalidPackageNameChar = regexp.MustCompile(`[^\w]`)
-
-func SanitizePackageName(pkg string) string {
- return invalidPackageNameChar.ReplaceAllLiteralString(filepath.Base(pkg), "_")
-}
diff --git a/vendor/github.com/99designs/gqlgen/internal/imports/prune.go b/vendor/github.com/99designs/gqlgen/internal/imports/prune.go
deleted file mode 100644
index d42a4157913..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/imports/prune.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Wrapper around x/tools/imports that only removes imports, never adds new ones.
-
-package imports
-
-import (
- "bytes"
- "go/ast"
- "go/parser"
- "go/printer"
- "go/token"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
-
- "golang.org/x/tools/go/ast/astutil"
- "golang.org/x/tools/imports"
-)
-
-type visitFn func(node ast.Node)
-
-func (fn visitFn) Visit(node ast.Node) ast.Visitor {
- fn(node)
- return fn
-}
-
-// Prune removes any unused imports
-func Prune(filename string, src []byte, packages *code.Packages) ([]byte, error) {
- fset := token.NewFileSet()
-
- file, err := parser.ParseFile(fset, filename, src, parser.ParseComments|parser.AllErrors)
- if err != nil {
- return nil, err
- }
-
- unused := getUnusedImports(file, packages)
- for ipath, name := range unused {
- astutil.DeleteNamedImport(fset, file, name, ipath)
- }
- printConfig := &printer.Config{Mode: printer.TabIndent, Tabwidth: 8}
-
- var buf bytes.Buffer
- if err := printConfig.Fprint(&buf, fset, file); err != nil {
- return nil, err
- }
-
- return imports.Process(filename, buf.Bytes(), &imports.Options{FormatOnly: true, Comments: true, TabIndent: true, TabWidth: 8})
-}
-
-func getUnusedImports(file ast.Node, packages *code.Packages) map[string]string {
- imported := map[string]*ast.ImportSpec{}
- used := map[string]bool{}
-
- ast.Walk(visitFn(func(node ast.Node) {
- if node == nil {
- return
- }
- switch v := node.(type) {
- case *ast.ImportSpec:
- if v.Name != nil {
- imported[v.Name.Name] = v
- break
- }
- ipath := strings.Trim(v.Path.Value, `"`)
- if ipath == "C" {
- break
- }
-
- local := packages.NameForPackage(ipath)
-
- imported[local] = v
- case *ast.SelectorExpr:
- xident, ok := v.X.(*ast.Ident)
- if !ok {
- break
- }
- if xident.Obj != nil {
- // if the parser can resolve it, it's not a package ref
- break
- }
- used[xident.Name] = true
- }
- }), file)
-
- for pkg := range used {
- delete(imported, pkg)
- }
-
- unusedImport := map[string]string{}
- for pkg, is := range imported {
- if !used[pkg] && pkg != "_" && pkg != "." {
- name := ""
- if is.Name != nil {
- name = is.Name.Name
- }
- unusedImport[strings.Trim(is.Path.Value, `"`)] = name
- }
- }
-
- return unusedImport
-}
diff --git a/vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go b/vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go
deleted file mode 100644
index f70fbdc1d59..00000000000
--- a/vendor/github.com/99designs/gqlgen/internal/rewrite/rewriter.go
+++ /dev/null
@@ -1,195 +0,0 @@
-package rewrite
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "go/token"
- "io/ioutil"
- "path/filepath"
- "strconv"
- "strings"
-
- "github.com/99designs/gqlgen/internal/code"
- "golang.org/x/tools/go/packages"
-)
-
-type Rewriter struct {
- pkg *packages.Package
- files map[string]string
- copied map[ast.Decl]bool
-}
-
-func New(dir string) (*Rewriter, error) {
- importPath := code.ImportPathForDir(dir)
- if importPath == "" {
- return nil, fmt.Errorf("import path not found for directory: %q", dir)
- }
- pkgs, err := packages.Load(&packages.Config{
- Mode: packages.NeedSyntax | packages.NeedTypes,
- }, importPath)
- if err != nil {
- return nil, err
- }
- if len(pkgs) == 0 {
- return nil, fmt.Errorf("package not found for importPath: %s", importPath)
- }
-
- return &Rewriter{
- pkg: pkgs[0],
- files: map[string]string{},
- copied: map[ast.Decl]bool{},
- }, nil
-}
-
-func (r *Rewriter) getSource(start, end token.Pos) string {
- startPos := r.pkg.Fset.Position(start)
- endPos := r.pkg.Fset.Position(end)
-
- if startPos.Filename != endPos.Filename {
- panic("cant get source spanning multiple files")
- }
-
- file := r.getFile(startPos.Filename)
- return file[startPos.Offset:endPos.Offset]
-}
-
-func (r *Rewriter) getFile(filename string) string {
- if _, ok := r.files[filename]; !ok {
- b, err := ioutil.ReadFile(filename)
- if err != nil {
- panic(fmt.Errorf("unable to load file, already exists: %w", err))
- }
-
- r.files[filename] = string(b)
-
- }
-
- return r.files[filename]
-}
-
-func (r *Rewriter) GetMethodBody(structname string, methodname string) string {
- for _, f := range r.pkg.Syntax {
- for _, d := range f.Decls {
- d, isFunc := d.(*ast.FuncDecl)
- if !isFunc {
- continue
- }
- if d.Name.Name != methodname {
- continue
- }
- if d.Recv == nil || len(d.Recv.List) == 0 {
- continue
- }
- recv := d.Recv.List[0].Type
- if star, isStar := recv.(*ast.StarExpr); isStar {
- recv = star.X
- }
- ident, ok := recv.(*ast.Ident)
- if !ok {
- continue
- }
-
- if ident.Name != structname {
- continue
- }
-
- r.copied[d] = true
-
- return r.getSource(d.Body.Pos()+1, d.Body.End()-1)
- }
- }
-
- return ""
-}
-
-func (r *Rewriter) MarkStructCopied(name string) {
- for _, f := range r.pkg.Syntax {
- for _, d := range f.Decls {
- d, isGen := d.(*ast.GenDecl)
- if !isGen {
- continue
- }
- if d.Tok != token.TYPE || len(d.Specs) == 0 {
- continue
- }
-
- spec, isTypeSpec := d.Specs[0].(*ast.TypeSpec)
- if !isTypeSpec {
- continue
- }
-
- if spec.Name.Name != name {
- continue
- }
-
- r.copied[d] = true
- }
- }
-}
-
-func (r *Rewriter) ExistingImports(filename string) []Import {
- filename, err := filepath.Abs(filename)
- if err != nil {
- panic(err)
- }
- for _, f := range r.pkg.Syntax {
- pos := r.pkg.Fset.Position(f.Pos())
-
- if filename != pos.Filename {
- continue
- }
-
- var imps []Import
- for _, i := range f.Imports {
- name := ""
- if i.Name != nil {
- name = i.Name.Name
- }
- path, err := strconv.Unquote(i.Path.Value)
- if err != nil {
- panic(err)
- }
- imps = append(imps, Import{name, path})
- }
- return imps
- }
- return nil
-}
-
-func (r *Rewriter) RemainingSource(filename string) string {
- filename, err := filepath.Abs(filename)
- if err != nil {
- panic(err)
- }
- for _, f := range r.pkg.Syntax {
- pos := r.pkg.Fset.Position(f.Pos())
-
- if filename != pos.Filename {
- continue
- }
-
- var buf bytes.Buffer
-
- for _, d := range f.Decls {
- if r.copied[d] {
- continue
- }
-
- if d, isGen := d.(*ast.GenDecl); isGen && d.Tok == token.IMPORT {
- continue
- }
-
- buf.WriteString(r.getSource(d.Pos(), d.End()))
- buf.WriteString("\n")
- }
-
- return strings.TrimSpace(buf.String())
- }
- return ""
-}
-
-type Import struct {
- Alias string
- ImportPath string
-}
diff --git a/vendor/github.com/99designs/gqlgen/main.go b/vendor/github.com/99designs/gqlgen/main.go
deleted file mode 100644
index 82c4f1924bd..00000000000
--- a/vendor/github.com/99designs/gqlgen/main.go
+++ /dev/null
@@ -1,190 +0,0 @@
-package main
-
-import (
- "bytes"
- _ "embed"
- "errors"
- "fmt"
- "html/template"
- "io/fs"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
-
- "github.com/99designs/gqlgen/api"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/graphql"
- "github.com/99designs/gqlgen/internal/code"
- "github.com/99designs/gqlgen/plugin/servergen"
- "github.com/urfave/cli/v2"
-)
-
-//go:embed init-templates/schema.graphqls
-var schemaFileContent string
-
-//go:embed init-templates/gqlgen.yml.gotmpl
-var configFileTemplate string
-
-func getConfigFileContent(pkgName string) string {
- var buf bytes.Buffer
- if err := template.Must(template.New("gqlgen.yml").Parse(configFileTemplate)).Execute(&buf, pkgName); err != nil {
- panic(err)
- }
- return buf.String()
-}
-
-func fileExists(filename string) bool {
- _, err := os.Stat(filename)
- return !errors.Is(err, fs.ErrNotExist)
-}
-
-func initFile(filename, contents string) error {
- if err := os.MkdirAll(filepath.Dir(filename), 0o755); err != nil {
- return fmt.Errorf("unable to create directory for file '%s': %w\n", filename, err)
- }
- if err := ioutil.WriteFile(filename, []byte(contents), 0o644); err != nil {
- return fmt.Errorf("unable to write file '%s': %w\n", filename, err)
- }
-
- return nil
-}
-
-var initCmd = &cli.Command{
- Name: "init",
- Usage: "create a new gqlgen project",
- Flags: []cli.Flag{
- &cli.BoolFlag{Name: "verbose, v", Usage: "show logs"},
- &cli.StringFlag{Name: "config, c", Usage: "the config filename", Value: "gqlgen.yml"},
- &cli.StringFlag{Name: "server", Usage: "where to write the server stub to", Value: "server.go"},
- &cli.StringFlag{Name: "schema", Usage: "where to write the schema stub to", Value: "graph/schema.graphqls"},
- },
- Action: func(ctx *cli.Context) error {
- configFilename := ctx.String("config")
- serverFilename := ctx.String("server")
- schemaFilename := ctx.String("schema")
-
- pkgName := code.ImportPathForDir(".")
- if pkgName == "" {
- return fmt.Errorf("unable to determine import path for current directory, you probably need to run 'go mod init' first")
- }
-
- // check schema and config don't already exist
- for _, filename := range []string{configFilename, schemaFilename, serverFilename} {
- if fileExists(filename) {
- return fmt.Errorf("%s already exists", filename)
- }
- }
- _, err := config.LoadConfigFromDefaultLocations()
- if err == nil {
- return fmt.Errorf("gqlgen.yml already exists in a parent directory\n")
- }
-
- // create config
- fmt.Println("Creating", configFilename)
- if err := initFile(configFilename, getConfigFileContent(pkgName)); err != nil {
- return err
- }
-
- // create schema
- fmt.Println("Creating", schemaFilename)
-
- if err := initFile(schemaFilename, schemaFileContent); err != nil {
- return err
- }
-
- // create the package directory with a temporary file so that go recognises it as a package
- // and autobinding doesn't error out
- tmpPackageNameFile := "graph/model/_tmp_gqlgen_init.go"
- if err := initFile(tmpPackageNameFile, "package model"); err != nil {
- return err
- }
- defer os.Remove(tmpPackageNameFile)
-
- var cfg *config.Config
- if cfg, err = config.LoadConfig(configFilename); err != nil {
- panic(err)
- }
-
- fmt.Println("Creating", serverFilename)
- fmt.Println("Generating...")
- if err := api.Generate(cfg, api.AddPlugin(servergen.New(serverFilename))); err != nil {
- return err
- }
-
- fmt.Printf("\nExec \"go run ./%s\" to start GraphQL server\n", serverFilename)
- return nil
- },
-}
-
-var generateCmd = &cli.Command{
- Name: "generate",
- Usage: "generate a graphql server based on schema",
- Flags: []cli.Flag{
- &cli.BoolFlag{Name: "verbose, v", Usage: "show logs"},
- &cli.StringFlag{Name: "config, c", Usage: "the config filename"},
- },
- Action: func(ctx *cli.Context) error {
- var cfg *config.Config
- var err error
- if configFilename := ctx.String("config"); configFilename != "" {
- cfg, err = config.LoadConfig(configFilename)
- if err != nil {
- return err
- }
- } else {
- cfg, err = config.LoadConfigFromDefaultLocations()
- if errors.Is(err, fs.ErrNotExist) {
- cfg, err = config.LoadDefaultConfig()
- }
-
- if err != nil {
- return err
- }
- }
-
- if err = api.Generate(cfg); err != nil {
- return err
- }
- return nil
- },
-}
-
-var versionCmd = &cli.Command{
- Name: "version",
- Usage: "print the version string",
- Action: func(ctx *cli.Context) error {
- fmt.Println(graphql.Version)
- return nil
- },
-}
-
-func main() {
- app := cli.NewApp()
- app.Name = "gqlgen"
- app.Usage = generateCmd.Usage
- app.Description = "This is a library for quickly creating strictly typed graphql servers in golang. See https://gqlgen.com/ for a getting started guide."
- app.HideVersion = true
- app.Flags = generateCmd.Flags
- app.Version = graphql.Version
- app.Before = func(context *cli.Context) error {
- if context.Bool("verbose") {
- log.SetFlags(0)
- } else {
- log.SetOutput(ioutil.Discard)
- }
- return nil
- }
-
- app.Action = generateCmd.Action
- app.Commands = []*cli.Command{
- generateCmd,
- initCmd,
- versionCmd,
- }
-
- if err := app.Run(os.Args); err != nil {
- fmt.Fprint(os.Stderr, err.Error()+"\n")
- os.Exit(1)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/federation/federation.go b/vendor/github.com/99designs/gqlgen/plugin/federation/federation.go
deleted file mode 100644
index 55160bac512..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/federation/federation.go
+++ /dev/null
@@ -1,378 +0,0 @@
-package federation
-
-import (
- "fmt"
- "sort"
- "strings"
-
- "github.com/vektah/gqlparser/v2/ast"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/plugin"
- "github.com/99designs/gqlgen/plugin/federation/fieldset"
-)
-
-type federation struct {
- Entities []*Entity
-}
-
-// New returns a federation plugin that injects
-// federated directives and types into the schema
-func New() plugin.Plugin {
- return &federation{}
-}
-
-// Name returns the plugin name
-func (f *federation) Name() string {
- return "federation"
-}
-
-// MutateConfig mutates the configuration
-func (f *federation) MutateConfig(cfg *config.Config) error {
- builtins := config.TypeMap{
- "_Service": {
- Model: config.StringList{
- "github.com/99designs/gqlgen/plugin/federation/fedruntime.Service",
- },
- },
- "_Entity": {
- Model: config.StringList{
- "github.com/99designs/gqlgen/plugin/federation/fedruntime.Entity",
- },
- },
- "Entity": {
- Model: config.StringList{
- "github.com/99designs/gqlgen/plugin/federation/fedruntime.Entity",
- },
- },
- "_Any": {
- Model: config.StringList{"github.com/99designs/gqlgen/graphql.Map"},
- },
- }
- for typeName, entry := range builtins {
- if cfg.Models.Exists(typeName) {
- return fmt.Errorf("%v already exists which must be reserved when Federation is enabled", typeName)
- }
- cfg.Models[typeName] = entry
- }
- cfg.Directives["external"] = config.DirectiveConfig{SkipRuntime: true}
- cfg.Directives["requires"] = config.DirectiveConfig{SkipRuntime: true}
- cfg.Directives["provides"] = config.DirectiveConfig{SkipRuntime: true}
- cfg.Directives["key"] = config.DirectiveConfig{SkipRuntime: true}
- cfg.Directives["extends"] = config.DirectiveConfig{SkipRuntime: true}
-
- return nil
-}
-
-func (f *federation) InjectSourceEarly() *ast.Source {
- return &ast.Source{
- Name: "federation/directives.graphql",
- Input: `
-scalar _Any
-scalar _FieldSet
-
-directive @external on FIELD_DEFINITION
-directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
-directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
-directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE
-directive @extends on OBJECT | INTERFACE
-`,
- BuiltIn: true,
- }
-}
-
-// InjectSources creates a GraphQL Entity type with all
-// the fields that had the @key directive
-func (f *federation) InjectSourceLate(schema *ast.Schema) *ast.Source {
- f.setEntities(schema)
-
- var entities, resolvers, entityResolverInputDefinitions string
- for i, e := range f.Entities {
- if i != 0 {
- entities += " | "
- }
- entities += e.Name
-
- for _, r := range e.Resolvers {
- if e.Multi {
- if entityResolverInputDefinitions != "" {
- entityResolverInputDefinitions += "\n\n"
- }
- entityResolverInputDefinitions += "input " + r.InputType + " {\n"
- for _, keyField := range r.KeyFields {
- entityResolverInputDefinitions += fmt.Sprintf("\t%s: %s\n", keyField.Field.ToGo(), keyField.Definition.Type.String())
- }
- entityResolverInputDefinitions += "}"
- resolvers += fmt.Sprintf("\t%s(reps: [%s!]!): [%s]\n", r.ResolverName, r.InputType, e.Name)
- } else {
- resolverArgs := ""
- for _, keyField := range r.KeyFields {
- resolverArgs += fmt.Sprintf("%s: %s,", keyField.Field.ToGoPrivate(), keyField.Definition.Type.String())
- }
- resolvers += fmt.Sprintf("\t%s(%s): %s!\n", r.ResolverName, resolverArgs, e.Name)
- }
- }
- }
-
- var blocks []string
- if entities != "" {
- entities = `# a union of all types that use the @key directive
-union _Entity = ` + entities
- blocks = append(blocks, entities)
- }
-
- // resolvers can be empty if a service defines only "empty
- // extend" types. This should be rare.
- if resolvers != "" {
- if entityResolverInputDefinitions != "" {
- blocks = append(blocks, entityResolverInputDefinitions)
- }
- resolvers = `# fake type to build resolver interfaces for users to implement
-type Entity {
- ` + resolvers + `
-}`
- blocks = append(blocks, resolvers)
- }
-
- _serviceTypeDef := `type _Service {
- sdl: String
-}`
- blocks = append(blocks, _serviceTypeDef)
-
- var additionalQueryFields string
- // Quote from the Apollo Federation subgraph specification:
- // If no types are annotated with the key directive, then the
- // _Entity union and _entities field should be removed from the schema
- if len(f.Entities) > 0 {
- additionalQueryFields += ` _entities(representations: [_Any!]!): [_Entity]!
-`
- }
- // _service field is required in any case
- additionalQueryFields += ` _service: _Service!`
-
- extendTypeQueryDef := `extend type ` + schema.Query.Name + ` {
-` + additionalQueryFields + `
-}`
- blocks = append(blocks, extendTypeQueryDef)
-
- return &ast.Source{
- Name: "federation/entity.graphql",
- BuiltIn: true,
- Input: "\n" + strings.Join(blocks, "\n\n") + "\n",
- }
-}
-
-// Entity represents a federated type
-// that was declared in the GQL schema.
-type Entity struct {
- Name string // The same name as the type declaration
- Def *ast.Definition
- Resolvers []*EntityResolver
- Requires []*Requires
- Multi bool
-}
-
-type EntityResolver struct {
- ResolverName string // The resolver name, such as FindUserByID
- KeyFields []*KeyField // The fields declared in @key.
- InputType string // The Go generated input type for multi entity resolvers
-}
-
-type KeyField struct {
- Definition *ast.FieldDefinition
- Field fieldset.Field // len > 1 for nested fields
- Type *config.TypeReference // The Go representation of that field type
-}
-
-// Requires represents an @requires clause
-type Requires struct {
- Name string // the name of the field
- Field fieldset.Field // source Field, len > 1 for nested fields
- Type *config.TypeReference // The Go representation of that field type
-}
-
-func (e *Entity) allFieldsAreExternal() bool {
- for _, field := range e.Def.Fields {
- if field.Directives.ForName("external") == nil {
- return false
- }
- }
- return true
-}
-
-func (f *federation) GenerateCode(data *codegen.Data) error {
- if len(f.Entities) > 0 {
- if data.Objects.ByName("Entity") != nil {
- data.Objects.ByName("Entity").Root = true
- }
- for _, e := range f.Entities {
- obj := data.Objects.ByName(e.Def.Name)
-
- for _, r := range e.Resolvers {
- // fill in types for key fields
- //
- for _, keyField := range r.KeyFields {
- if len(keyField.Field) == 0 {
- fmt.Println(
- "skipping @key field " + keyField.Definition.Name + " in " + r.ResolverName + " in " + e.Def.Name,
- )
- continue
- }
- cgField := keyField.Field.TypeReference(obj, data.Objects)
- keyField.Type = cgField.TypeReference
- }
- }
-
- // fill in types for requires fields
- //
- for _, reqField := range e.Requires {
- if len(reqField.Field) == 0 {
- fmt.Println("skipping @requires field " + reqField.Name + " in " + e.Def.Name)
- continue
- }
- cgField := reqField.Field.TypeReference(obj, data.Objects)
- reqField.Type = cgField.TypeReference
- }
- }
- }
-
- return templates.Render(templates.Options{
- PackageName: data.Config.Federation.Package,
- Filename: data.Config.Federation.Filename,
- Data: f,
- GeneratedHeader: true,
- Packages: data.Config.Packages,
- })
-}
-
-func (f *federation) setEntities(schema *ast.Schema) {
- for _, schemaType := range schema.Types {
- keys, ok := isFederatedEntity(schemaType)
- if !ok {
- continue
- }
- e := &Entity{
- Name: schemaType.Name,
- Def: schemaType,
- Resolvers: nil,
- Requires: nil,
- }
-
- // Let's process custom entity resolver settings.
- dir := schemaType.Directives.ForName("entityResolver")
- if dir != nil {
- if dirArg := dir.Arguments.ForName("multi"); dirArg != nil {
- if dirVal, err := dirArg.Value.Value(nil); err == nil {
- e.Multi = dirVal.(bool)
- }
- }
- }
-
- // If our schema has a field with a type defined in
- // another service, then we need to define an "empty
- // extend" of that type in this service, so this service
- // knows what the type is like. But the graphql-server
- // will never ask us to actually resolve this "empty
- // extend", so we don't require a resolver function for
- // it. (Well, it will never ask in practice; it's
- // unclear whether the spec guarantees this. See
- // https://github.com/apollographql/apollo-server/issues/3852
- // ). Example:
- // type MyType {
- // myvar: TypeDefinedInOtherService
- // }
- // // Federation needs this type, but
- // // it doesn't need a resolver for it!
- // extend TypeDefinedInOtherService @key(fields: "id") {
- // id: ID @external
- // }
- if !e.allFieldsAreExternal() {
- for _, dir := range keys {
- if len(dir.Arguments) != 1 || dir.Arguments[0].Name != "fields" {
- panic("Exactly one `fields` argument needed for @key declaration.")
- }
- arg := dir.Arguments[0]
- keyFieldSet := fieldset.New(arg.Value.Raw, nil)
-
- keyFields := make([]*KeyField, len(keyFieldSet))
- resolverFields := []string{}
- for i, field := range keyFieldSet {
- def := field.FieldDefinition(schemaType, schema)
-
- if def == nil {
- panic(fmt.Sprintf("no field for %v", field))
- }
-
- keyFields[i] = &KeyField{Definition: def, Field: field}
- resolverFields = append(resolverFields, keyFields[i].Field.ToGo())
- }
-
- resolverFieldsToGo := schemaType.Name + "By" + strings.Join(resolverFields, "And")
- var resolverName string
- if e.Multi {
- resolverFieldsToGo += "s" // Pluralize for better API readability
- resolverName = fmt.Sprintf("findMany%s", resolverFieldsToGo)
- } else {
- resolverName = fmt.Sprintf("find%s", resolverFieldsToGo)
- }
-
- e.Resolvers = append(e.Resolvers, &EntityResolver{
- ResolverName: resolverName,
- KeyFields: keyFields,
- InputType: resolverFieldsToGo + "Input",
- })
- }
-
- e.Requires = []*Requires{}
- for _, f := range schemaType.Fields {
- dir := f.Directives.ForName("requires")
- if dir == nil {
- continue
- }
- if len(dir.Arguments) != 1 || dir.Arguments[0].Name != "fields" {
- panic("Exactly one `fields` argument needed for @requires declaration.")
- }
- requiresFieldSet := fieldset.New(dir.Arguments[0].Value.Raw, nil)
- for _, field := range requiresFieldSet {
- e.Requires = append(e.Requires, &Requires{
- Name: field.ToGoPrivate(),
- Field: field,
- })
- }
- }
- }
- f.Entities = append(f.Entities, e)
- }
-
- // make sure order remains stable across multiple builds
- sort.Slice(f.Entities, func(i, j int) bool {
- return f.Entities[i].Name < f.Entities[j].Name
- })
-}
-
-func isFederatedEntity(schemaType *ast.Definition) ([]*ast.Directive, bool) {
- switch schemaType.Kind {
- case ast.Object:
- keys := schemaType.Directives.ForNames("key")
- if len(keys) > 0 {
- return keys, true
- }
- case ast.Interface:
- // TODO: support @key and @extends for interfaces
- if dir := schemaType.Directives.ForName("key"); dir != nil {
- fmt.Printf("@key directive found on \"interface %s\". Will be ignored.\n", schemaType.Name)
- }
- if dir := schemaType.Directives.ForName("extends"); dir != nil {
- panic(
- fmt.Sprintf(
- "@extends directive is not currently supported for interfaces, use \"extend interface %s\" instead.",
- schemaType.Name,
- ))
- }
- default:
- // ignore
- }
- return nil, false
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/federation/federation.gotpl b/vendor/github.com/99designs/gqlgen/plugin/federation/federation.gotpl
deleted file mode 100644
index 4a30b6c9787..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/federation/federation.gotpl
+++ /dev/null
@@ -1,259 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "errors" }}
-{{ reserveImport "fmt" }}
-{{ reserveImport "strings" }}
-{{ reserveImport "sync" }}
-
-{{ reserveImport "github.com/99designs/gqlgen/plugin/federation/fedruntime" }}
-
-var (
- ErrUnknownType = errors.New("unknown type")
- ErrTypeNotFound = errors.New("type not found")
-)
-
-func (ec *executionContext) __resolve__service(ctx context.Context) (fedruntime.Service, error) {
- if ec.DisableIntrospection {
- return fedruntime.Service{}, errors.New("federated introspection disabled")
- }
-
- var sdl []string
-
- for _, src := range sources {
- if src.BuiltIn {
- continue
- }
- sdl = append(sdl, src.Input)
- }
-
- return fedruntime.Service{
- SDL: strings.Join(sdl, "\n"),
- }, nil
-}
-
-{{if .Entities}}
-func (ec *executionContext) __resolve_entities(ctx context.Context, representations []map[string]interface{}) []fedruntime.Entity {
- list := make([]fedruntime.Entity, len(representations))
-
- repsMap := map[string]struct {
- i []int
- r []map[string]interface{}
- }{}
-
- // We group entities by typename so that we can parallelize their resolution.
- // This is particularly helpful when there are entity groups in multi mode.
- buildRepresentationGroups := func(reps []map[string]interface{}) {
- for i, rep := range reps {
- typeName, ok := rep["__typename"].(string)
- if !ok {
- // If there is no __typename, we just skip the representation;
- // we just won't be resolving these unknown types.
- ec.Error(ctx, errors.New("__typename must be an existing string"))
- continue
- }
-
- _r := repsMap[typeName]
- _r.i = append(_r.i, i)
- _r.r = append(_r.r, rep)
- repsMap[typeName] = _r
- }
- }
-
- isMulti := func(typeName string) bool {
- switch typeName {
- {{- range .Entities -}}
- {{- if .Resolvers -}}
- {{- if .Multi -}}
- case "{{.Def.Name}}":
- return true
- {{ end }}
- {{- end -}}
- {{- end -}}
- default:
- return false
- }
- }
-
- resolveEntity := func(ctx context.Context, typeName string, rep map[string]interface{}, idx []int, i int) (err error) {
- // we need to do our own panic handling, because we may be called in a
- // goroutine, where the usual panic handling can't catch us
- defer func () {
- if r := recover(); r != nil {
- err = ec.Recover(ctx, r)
- }
- }()
-
- switch typeName {
- {{ range $_, $entity := .Entities }}
- {{- if and .Resolvers (not .Multi) -}}
- case "{{.Def.Name}}":
- resolverName, err := entityResolverNameFor{{.Def.Name}}(ctx, rep)
- if err != nil {
- return fmt.Errorf(`finding resolver for Entity "{{.Def.Name}}": %w`, err)
- }
- switch resolverName {
- {{ range $i, $resolver := .Resolvers }}
- case "{{.ResolverName}}":
- {{- range $j, $keyField := .KeyFields }}
- id{{$j}}, err := ec.{{.Type.UnmarshalFunc}}(ctx, rep["{{.Field.Join `"].(map[string]interface{})["`}}"])
- if err != nil {
- return fmt.Errorf(`unmarshalling param {{$j}} for {{$resolver.ResolverName}}(): %w`, err)
- }
- {{- end}}
- entity, err := ec.resolvers.Entity().{{.ResolverName | go}}(ctx, {{- range $j, $_ := .KeyFields -}} id{{$j}}, {{end}})
- if err != nil {
- return fmt.Errorf(`resolving Entity "{{$entity.Def.Name}}": %w`, err)
- }
- {{ range $entity.Requires }}
- entity.{{.Field.JoinGo `.`}}, err = ec.{{.Type.UnmarshalFunc}}(ctx, rep["{{.Field.Join `"].(map[string]interface{})["`}}"])
- if err != nil {
- return err
- }
- {{- end }}
- list[idx[i]] = entity
- return nil
- {{- end }}
- }
- {{ end }}
- {{- end }}
- }
- return fmt.Errorf("%w: %s", ErrUnknownType, typeName)
- }
-
- resolveManyEntities := func(ctx context.Context, typeName string, reps []map[string]interface{}, idx []int) (err error) {
- // we need to do our own panic handling, because we may be called in a
- // goroutine, where the usual panic handling can't catch us
- defer func () {
- if r := recover(); r != nil {
- err = ec.Recover(ctx, r)
- }
- }()
-
- switch typeName {
- {{ range $_, $entity := .Entities }}
- {{ if and .Resolvers .Multi -}}
- case "{{.Def.Name}}":
- {{range $i, $_ := .Resolvers -}}
- _reps := make([]*{{.InputType}}, len(reps))
-
- for i, rep := range reps {
- {{ range $i, $keyField := .KeyFields -}}
- id{{$i}}, err := ec.{{.Type.UnmarshalFunc}}(ctx, rep["{{.Field.Join `"].(map[string]interface{})["`}}"])
- if err != nil {
- return errors.New(fmt.Sprintf("Field %s undefined in schema.", "{{.Definition.Name}}"))
- }
- {{end}}
-
- _reps[i] = &{{.InputType}} {
- {{ range $i, $keyField := .KeyFields -}}
- {{$keyField.Field.ToGo}}: id{{$i}},
- {{end}}
- }
- }
-
- entities, err := ec.resolvers.Entity().{{.ResolverName | go}}(ctx, _reps)
- if err != nil {
- return err
- }
-
- for i, entity := range entities {
- {{- range $entity.Requires }}
- entity.{{.Field.JoinGo `.`}}, err = ec.{{.Type.UnmarshalFunc}}(ctx, reps[i]["{{.Field.Join `"].(map[string]interface{})["`}}"])
- if err != nil {
- return err
- }
- {{- end}}
- list[idx[i]] = entity
- }
- return nil
- {{ end }}
- {{ end }}
- {{- end }}
- default:
- return errors.New("unknown type: "+typeName)
- }
- }
-
- resolveEntityGroup := func(typeName string, reps []map[string]interface{}, idx []int) {
- if isMulti(typeName) {
- err := resolveManyEntities(ctx, typeName, reps, idx)
- if err != nil {
- ec.Error(ctx, err)
- }
- } else {
- // if there are multiple entities to resolve, parallelize (similar to
- // graphql.FieldSet.Dispatch)
- var e sync.WaitGroup
- e.Add(len(reps))
- for i, rep := range reps {
- i, rep := i, rep
- go func(i int, rep map[string]interface{}) {
- err := resolveEntity(ctx, typeName, rep, idx, i)
- if err != nil {
- ec.Error(ctx, err)
- }
- e.Done()
- }(i, rep)
- }
- e.Wait()
- }
- }
- buildRepresentationGroups(representations)
-
- switch len(repsMap) {
- case 0:
- return list
- case 1:
- for typeName, reps := range repsMap {
- resolveEntityGroup(typeName, reps.r, reps.i)
- }
- return list
- default:
- var g sync.WaitGroup
- g.Add(len(repsMap))
- for typeName, reps := range repsMap {
- go func(typeName string, reps []map[string]interface{}, idx []int) {
- resolveEntityGroup(typeName, reps, idx)
- g.Done()
- }(typeName, reps.r, reps.i)
- }
- g.Wait()
- return list
- }
-}
-
-{{- /* Make sure the required fields are in the given entity representation and return the name of the proper resolver. */ -}}
-
-{{ range $_, $entity := .Entities }}
- {{- if .Resolvers }}
-
- func entityResolverNameFor{{$entity.Name}}(ctx context.Context, rep map[string]interface{}) (string, error) {
- {{- range .Resolvers }}
- for {
- var (
- m map[string]interface{}
- val interface{}
- ok bool
- )
- _ = val
- {{- range $_, $keyField := .KeyFields }}
- m = rep
- {{- range $i, $field := .Field }}
- if {{ if (ne $i $keyField.Field.LastIndex ) -}}val{{- else -}}_{{- end -}}, ok = m["{{.}}"]; !ok {
- break
- }
- {{- if (ne $i $keyField.Field.LastIndex ) }}
- if m, ok = val.(map[string]interface{}); !ok {
- break
- }
- {{- end}}
- {{- end}}
- {{- end }}
- return "{{.ResolverName}}", nil
- }
- {{- end }}
- return "", fmt.Errorf("%w for {{$entity.Name}}", ErrTypeNotFound)
- }
- {{- end }}
-{{- end }}
-
-{{end}}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/federation/fieldset/fieldset.go b/vendor/github.com/99designs/gqlgen/plugin/federation/fieldset/fieldset.go
deleted file mode 100644
index 35616cbea3e..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/federation/fieldset/fieldset.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package fieldset
-
-import (
- "fmt"
- "strings"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-// Set represents a FieldSet that is used in federation directives @key and @requires.
-// Would be happier to reuse FieldSet parsing from gqlparser, but this suits for now.
-//
-type Set []Field
-
-// Field represents a single field in a FieldSet
-//
-type Field []string
-
-// New parses a FieldSet string into a TinyFieldSet.
-//
-func New(raw string, prefix []string) Set {
- if !strings.Contains(raw, "{") {
- return parseUnnestedKeyFieldSet(raw, prefix)
- }
-
- var (
- ret = Set{}
- subPrefix = prefix
- )
- before, during, after := extractSubs(raw)
-
- if before != "" {
- befores := New(before, prefix)
- if len(befores) > 0 {
- subPrefix = befores[len(befores)-1]
- ret = append(ret, befores[:len(befores)-1]...)
- }
- }
- if during != "" {
- ret = append(ret, New(during, subPrefix)...)
- }
- if after != "" {
- ret = append(ret, New(after, prefix)...)
- }
- return ret
-}
-
-// FieldDefinition looks up a field in the type.
-//
-func (f Field) FieldDefinition(schemaType *ast.Definition, schema *ast.Schema) *ast.FieldDefinition {
- objType := schemaType
- def := objType.Fields.ForName(f[0])
-
- for _, part := range f[1:] {
- if objType.Kind != ast.Object {
- panic(fmt.Sprintf(`invalid sub-field reference "%s" in %v: `, objType.Name, f))
- }
- x := def.Type.Name()
- objType = schema.Types[x]
- if objType == nil {
- panic("invalid schema type: " + x)
- }
- def = objType.Fields.ForName(part)
- }
- if def == nil {
- return nil
- }
- ret := *def // shallow copy
- ret.Name = f.ToGoPrivate()
-
- return &ret
-}
-
-// TypeReference looks up the type of a field.
-//
-func (f Field) TypeReference(obj *codegen.Object, objects codegen.Objects) *codegen.Field {
- var def *codegen.Field
-
- for _, part := range f {
- def = fieldByName(obj, part)
- if def == nil {
- panic("unable to find field " + f[0])
- }
- obj = objects.ByName(def.TypeReference.Definition.Name)
- }
- return def
-}
-
-// ToGo converts a (possibly nested) field into a proper public Go name.
-//
-func (f Field) ToGo() string {
- var ret string
-
- for _, field := range f {
- ret += templates.ToGo(field)
- }
- return ret
-}
-
-// ToGoPrivate converts a (possibly nested) field into a proper private Go name.
-//
-func (f Field) ToGoPrivate() string {
- var ret string
-
- for i, field := range f {
- if i == 0 {
- ret += templates.ToGoPrivate(field)
- continue
- }
- ret += templates.ToGo(field)
- }
- return ret
-}
-
-// Join concatenates the field parts with a string separator between. Useful in templates.
-//
-func (f Field) Join(str string) string {
- return strings.Join(f, str)
-}
-
-// JoinGo concatenates the Go name of field parts with a string separator between. Useful in templates.
-//
-func (f Field) JoinGo(str string) string {
- strs := []string{}
-
- for _, s := range f {
- strs = append(strs, templates.ToGo(s))
- }
- return strings.Join(strs, str)
-}
-
-func (f Field) LastIndex() int {
- return len(f) - 1
-}
-
-// local functions
-
-// parseUnnestedKeyFieldSet // handles simple case where none of the fields are nested.
-//
-func parseUnnestedKeyFieldSet(raw string, prefix []string) Set {
- ret := Set{}
-
- for _, s := range strings.Fields(raw) {
- next := append(prefix[:], s) //nolint:gocritic // slicing out on purpose
- ret = append(ret, next)
- }
- return ret
-}
-
-// extractSubs splits out and trims sub-expressions from before, inside, and after "{}".
-//
-func extractSubs(str string) (string, string, string) {
- start := strings.Index(str, "{")
- end := matchingBracketIndex(str, start)
-
- if start < 0 || end < 0 {
- panic("invalid key fieldSet: " + str)
- }
- return strings.TrimSpace(str[:start]), strings.TrimSpace(str[start+1 : end]), strings.TrimSpace(str[end+1:])
-}
-
-// matchingBracketIndex returns the index of the closing bracket, assuming an open bracket at start.
-//
-func matchingBracketIndex(str string, start int) int {
- if start < 0 || len(str) <= start+1 {
- return -1
- }
- var depth int
-
- for i, c := range str[start+1:] {
- switch c {
- case '{':
- depth++
- case '}':
- if depth == 0 {
- return start + 1 + i
- }
- depth--
- }
- }
- return -1
-}
-
-func fieldByName(obj *codegen.Object, name string) *codegen.Field {
- for _, field := range obj.Fields {
- if field.Name == name {
- return field
- }
- }
- return nil
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/federation/readme.md b/vendor/github.com/99designs/gqlgen/plugin/federation/readme.md
deleted file mode 100644
index 4333ed47979..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/federation/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Federation plugin
-
-Add support for graphql federation in your graphql Go server!
-
-TODO(miguel): add details.
-
-# Tests
-There are several different tests. Some will process the configuration file directly. You can see those in the `federation_test.go`. There are also tests for entity resolvers, which will simulate requests from a federation server like Apollo Federation.
-
-Running entity resolver tests.
-1. Go to `plugin/federation`
-2. Run the command `go generate`
-3. Run the tests with `go test ./...`.
-
-# Architecture
-
-TODO(miguel): add details.
-
-# Entity resolvers - GetMany entities
-
-The federation plugin implements `GetMany` semantics in which entity resolvers get the entire list of representations that need to be resolved. This functionality is currently optin tho, and to enable it you need to specify the directive `@entityResolver` in the federated entity you want this feature for. E.g.
-
-```
-directive @entityResolver(multi: Boolean) on OBJECT
-
-type MultiHello @key(fields: "name") @entityResolver(multi: true) {
- name: String!
-}
-```
-
-That allows the federation plugin to generate `GetMany` resolver function that can take a list of representations to be resolved.
-
-From that entity type, the resolver function would be
-
-```
-func (r *entityResolver) FindManyMultiHellosByName(ctx context.Context, reps []*generated.ManyMultiHellosByNameInput) ([]*generated.MultiHello, error) {
- ///
-}
-```
diff --git a/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go b/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go
deleted file mode 100644
index 898010d657d..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.go
+++ /dev/null
@@ -1,305 +0,0 @@
-package modelgen
-
-import (
- "fmt"
- "go/types"
- "sort"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/plugin"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type BuildMutateHook = func(b *ModelBuild) *ModelBuild
-
-type FieldMutateHook = func(td *ast.Definition, fd *ast.FieldDefinition, f *Field) (*Field, error)
-
-// defaultFieldMutateHook is the default hook for the Plugin which applies the GoTagFieldHook.
-func defaultFieldMutateHook(td *ast.Definition, fd *ast.FieldDefinition, f *Field) (*Field, error) {
- return GoTagFieldHook(td, fd, f)
-}
-
-func defaultBuildMutateHook(b *ModelBuild) *ModelBuild {
- return b
-}
-
-type ModelBuild struct {
- PackageName string
- Interfaces []*Interface
- Models []*Object
- Enums []*Enum
- Scalars []string
-}
-
-type Interface struct {
- Description string
- Name string
- Implements []string
-}
-
-type Object struct {
- Description string
- Name string
- Fields []*Field
- Implements []string
-}
-
-type Field struct {
- Description string
- Name string
- Type types.Type
- Tag string
-}
-
-type Enum struct {
- Description string
- Name string
- Values []*EnumValue
-}
-
-type EnumValue struct {
- Description string
- Name string
-}
-
-func New() plugin.Plugin {
- return &Plugin{
- MutateHook: defaultBuildMutateHook,
- FieldHook: defaultFieldMutateHook,
- }
-}
-
-type Plugin struct {
- MutateHook BuildMutateHook
- FieldHook FieldMutateHook
-}
-
-var _ plugin.ConfigMutator = &Plugin{}
-
-func (m *Plugin) Name() string {
- return "modelgen"
-}
-
-func (m *Plugin) MutateConfig(cfg *config.Config) error {
- binder := cfg.NewBinder()
-
- b := &ModelBuild{
- PackageName: cfg.Model.Package,
- }
-
- for _, schemaType := range cfg.Schema.Types {
- if cfg.Models.UserDefined(schemaType.Name) {
- continue
- }
- switch schemaType.Kind {
- case ast.Interface, ast.Union:
- it := &Interface{
- Description: schemaType.Description,
- Name: schemaType.Name,
- Implements: schemaType.Interfaces,
- }
-
- b.Interfaces = append(b.Interfaces, it)
- case ast.Object, ast.InputObject:
- if schemaType == cfg.Schema.Query || schemaType == cfg.Schema.Mutation || schemaType == cfg.Schema.Subscription {
- continue
- }
- it := &Object{
- Description: schemaType.Description,
- Name: schemaType.Name,
- }
-
- // If Interface A implements interface B, and Interface C also implements interface B
- // then both A and C have methods of B.
- // The reason for checking unique is to prevent the same method B from being generated twice.
- uniqueMap := map[string]bool{}
- for _, implementor := range cfg.Schema.GetImplements(schemaType) {
- if !uniqueMap[implementor.Name] {
- it.Implements = append(it.Implements, implementor.Name)
- uniqueMap[implementor.Name] = true
- }
- // for interface implements
- for _, iface := range implementor.Interfaces {
- if !uniqueMap[iface] {
- it.Implements = append(it.Implements, iface)
- uniqueMap[iface] = true
- }
- }
- }
-
- for _, field := range schemaType.Fields {
- var typ types.Type
- fieldDef := cfg.Schema.Types[field.Type.Name()]
-
- if cfg.Models.UserDefined(field.Type.Name()) {
- var err error
- typ, err = binder.FindTypeFromName(cfg.Models[field.Type.Name()].Model[0])
- if err != nil {
- return err
- }
- } else {
- switch fieldDef.Kind {
- case ast.Scalar:
- // no user defined model, referencing a default scalar
- typ = types.NewNamed(
- types.NewTypeName(0, cfg.Model.Pkg(), "string", nil),
- nil,
- nil,
- )
-
- case ast.Interface, ast.Union:
- // no user defined model, referencing a generated interface type
- typ = types.NewNamed(
- types.NewTypeName(0, cfg.Model.Pkg(), templates.ToGo(field.Type.Name()), nil),
- types.NewInterfaceType([]*types.Func{}, []types.Type{}),
- nil,
- )
-
- case ast.Enum:
- // no user defined model, must reference a generated enum
- typ = types.NewNamed(
- types.NewTypeName(0, cfg.Model.Pkg(), templates.ToGo(field.Type.Name()), nil),
- nil,
- nil,
- )
-
- case ast.Object, ast.InputObject:
- // no user defined model, must reference a generated struct
- typ = types.NewNamed(
- types.NewTypeName(0, cfg.Model.Pkg(), templates.ToGo(field.Type.Name()), nil),
- types.NewStruct(nil, nil),
- nil,
- )
-
- default:
- panic(fmt.Errorf("unknown ast type %s", fieldDef.Kind))
- }
- }
-
- name := field.Name
- if nameOveride := cfg.Models[schemaType.Name].Fields[field.Name].FieldName; nameOveride != "" {
- name = nameOveride
- }
-
- typ = binder.CopyModifiersFromAst(field.Type, typ)
-
- if isStruct(typ) && (fieldDef.Kind == ast.Object || fieldDef.Kind == ast.InputObject) {
- typ = types.NewPointer(typ)
- }
-
- f := &Field{
- Name: name,
- Type: typ,
- Description: field.Description,
- Tag: `json:"` + field.Name + `"`,
- }
-
- if m.FieldHook != nil {
- mf, err := m.FieldHook(schemaType, field, f)
- if err != nil {
- return fmt.Errorf("generror: field %v.%v: %w", it.Name, field.Name, err)
- }
- f = mf
- }
-
- it.Fields = append(it.Fields, f)
- }
-
- b.Models = append(b.Models, it)
- case ast.Enum:
- it := &Enum{
- Name: schemaType.Name,
- Description: schemaType.Description,
- }
-
- for _, v := range schemaType.EnumValues {
- it.Values = append(it.Values, &EnumValue{
- Name: v.Name,
- Description: v.Description,
- })
- }
-
- b.Enums = append(b.Enums, it)
- case ast.Scalar:
- b.Scalars = append(b.Scalars, schemaType.Name)
- }
- }
- sort.Slice(b.Enums, func(i, j int) bool { return b.Enums[i].Name < b.Enums[j].Name })
- sort.Slice(b.Models, func(i, j int) bool { return b.Models[i].Name < b.Models[j].Name })
- sort.Slice(b.Interfaces, func(i, j int) bool { return b.Interfaces[i].Name < b.Interfaces[j].Name })
-
- for _, it := range b.Enums {
- cfg.Models.Add(it.Name, cfg.Model.ImportPath()+"."+templates.ToGo(it.Name))
- }
- for _, it := range b.Models {
- cfg.Models.Add(it.Name, cfg.Model.ImportPath()+"."+templates.ToGo(it.Name))
- }
- for _, it := range b.Interfaces {
- cfg.Models.Add(it.Name, cfg.Model.ImportPath()+"."+templates.ToGo(it.Name))
- }
- for _, it := range b.Scalars {
- cfg.Models.Add(it, "github.com/99designs/gqlgen/graphql.String")
- }
-
- if len(b.Models) == 0 && len(b.Enums) == 0 && len(b.Interfaces) == 0 && len(b.Scalars) == 0 {
- return nil
- }
-
- if m.MutateHook != nil {
- b = m.MutateHook(b)
- }
-
- err := templates.Render(templates.Options{
- PackageName: cfg.Model.Package,
- Filename: cfg.Model.Filename,
- Data: b,
- GeneratedHeader: true,
- Packages: cfg.Packages,
- })
- if err != nil {
- return err
- }
-
- // We may have generated code in a package we already loaded, so we reload all packages
- // to allow packages to be compared correctly
- cfg.ReloadAllPackages()
-
- return nil
-}
-
-// GoTagFieldHook applies the goTag directive to the generated Field f. When applying the Tag to the field, the field
-// name is used when no value argument is present.
-func GoTagFieldHook(td *ast.Definition, fd *ast.FieldDefinition, f *Field) (*Field, error) {
- args := make([]string, 0)
- for _, goTag := range fd.Directives.ForNames("goTag") {
- key := ""
- value := fd.Name
-
- if arg := goTag.Arguments.ForName("key"); arg != nil {
- if k, err := arg.Value.Value(nil); err == nil {
- key = k.(string)
- }
- }
-
- if arg := goTag.Arguments.ForName("value"); arg != nil {
- if v, err := arg.Value.Value(nil); err == nil {
- value = v.(string)
- }
- }
-
- args = append(args, key+":\""+value+"\"")
- }
-
- if len(args) > 0 {
- f.Tag = f.Tag + " " + strings.Join(args, " ")
- }
-
- return f, nil
-}
-
-func isStruct(t types.Type) bool {
- _, is := t.Underlying().(*types.Struct)
- return is
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.gotpl b/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.gotpl
deleted file mode 100644
index 8f425e58eb4..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/modelgen/models.gotpl
+++ /dev/null
@@ -1,88 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "fmt" }}
-{{ reserveImport "io" }}
-{{ reserveImport "strconv" }}
-{{ reserveImport "time" }}
-{{ reserveImport "sync" }}
-{{ reserveImport "errors" }}
-{{ reserveImport "bytes" }}
-
-{{ reserveImport "github.com/vektah/gqlparser/v2" }}
-{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }}
-
-{{- range $model := .Interfaces }}
- {{ with .Description }} {{.|prefixLines "// "}} {{ end }}
- type {{.Name|go }} interface {
- {{- range $impl := .Implements }}
- {{ $impl|go }}
- {{- end }}
- Is{{.Name|go }}()
- }
-{{- end }}
-
-{{ range $model := .Models }}
- {{with .Description }} {{.|prefixLines "// "}} {{end}}
- type {{ .Name|go }} struct {
- {{- range $field := .Fields }}
- {{- with .Description }}
- {{.|prefixLines "// "}}
- {{- end}}
- {{ $field.Name|go }} {{$field.Type | ref}} `{{$field.Tag}}`
- {{- end }}
- }
-
- {{- range $iface := .Implements }}
- func ({{ $model.Name|go }}) Is{{ $iface|go }}() {}
- {{- end }}
-{{- end}}
-
-{{ range $enum := .Enums }}
- {{ with .Description }} {{.|prefixLines "// "}} {{end}}
- type {{.Name|go }} string
- const (
- {{- range $value := .Values}}
- {{- with .Description}}
- {{.|prefixLines "// "}}
- {{- end}}
- {{ $enum.Name|go }}{{ .Name|go }} {{$enum.Name|go }} = {{.Name|quote}}
- {{- end }}
- )
-
- var All{{.Name|go }} = []{{ .Name|go }}{
- {{- range $value := .Values}}
- {{$enum.Name|go }}{{ .Name|go }},
- {{- end }}
- }
-
- func (e {{.Name|go }}) IsValid() bool {
- switch e {
- case {{ range $index, $element := .Values}}{{if $index}},{{end}}{{ $enum.Name|go }}{{ $element.Name|go }}{{end}}:
- return true
- }
- return false
- }
-
- func (e {{.Name|go }}) String() string {
- return string(e)
- }
-
- func (e *{{.Name|go }}) UnmarshalGQL(v interface{}) error {
- str, ok := v.(string)
- if !ok {
- return fmt.Errorf("enums must be strings")
- }
-
- *e = {{ .Name|go }}(str)
- if !e.IsValid() {
- return fmt.Errorf("%s is not a valid {{ .Name }}", str)
- }
- return nil
- }
-
- func (e {{.Name|go }}) MarshalGQL(w io.Writer) {
- fmt.Fprint(w, strconv.Quote(e.String()))
- }
-
-{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/plugin.go b/vendor/github.com/99designs/gqlgen/plugin/plugin.go
deleted file mode 100644
index 7de36bd8cd5..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/plugin.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// plugin package interfaces are EXPERIMENTAL.
-
-package plugin
-
-import (
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Plugin interface {
- Name() string
-}
-
-type ConfigMutator interface {
- MutateConfig(cfg *config.Config) error
-}
-
-type CodeGenerator interface {
- GenerateCode(cfg *codegen.Data) error
-}
-
-// EarlySourceInjector is used to inject things that are required for user schema files to compile.
-type EarlySourceInjector interface {
- InjectSourceEarly() *ast.Source
-}
-
-// LateSourceInjector is used to inject more sources, after we have loaded the users schema.
-type LateSourceInjector interface {
- InjectSourceLate(schema *ast.Schema) *ast.Source
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go b/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go
deleted file mode 100644
index 538aa714b1e..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.go
+++ /dev/null
@@ -1,212 +0,0 @@
-package resolvergen
-
-import (
- "errors"
- "io/fs"
- "os"
- "path/filepath"
- "strings"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/internal/rewrite"
- "github.com/99designs/gqlgen/plugin"
-)
-
-func New() plugin.Plugin {
- return &Plugin{}
-}
-
-type Plugin struct{}
-
-var _ plugin.CodeGenerator = &Plugin{}
-
-func (m *Plugin) Name() string {
- return "resolvergen"
-}
-
-func (m *Plugin) GenerateCode(data *codegen.Data) error {
- if !data.Config.Resolver.IsDefined() {
- return nil
- }
-
- switch data.Config.Resolver.Layout {
- case config.LayoutSingleFile:
- return m.generateSingleFile(data)
- case config.LayoutFollowSchema:
- return m.generatePerSchema(data)
- }
-
- return nil
-}
-
-func (m *Plugin) generateSingleFile(data *codegen.Data) error {
- file := File{}
-
- if _, err := os.Stat(data.Config.Resolver.Filename); err == nil {
- // file already exists and we dont support updating resolvers with layout = single so just return
- return nil
- }
-
- for _, o := range data.Objects {
- if o.HasResolvers() {
- file.Objects = append(file.Objects, o)
- }
- for _, f := range o.Fields {
- if !f.IsResolver {
- continue
- }
-
- resolver := Resolver{o, f, `panic("not implemented")`}
- file.Resolvers = append(file.Resolvers, &resolver)
- }
- }
-
- resolverBuild := &ResolverBuild{
- File: &file,
- PackageName: data.Config.Resolver.Package,
- ResolverType: data.Config.Resolver.Type,
- HasRoot: true,
- }
-
- return templates.Render(templates.Options{
- PackageName: data.Config.Resolver.Package,
- FileNotice: `// THIS CODE IS A STARTING POINT ONLY. IT WILL NOT BE UPDATED WITH SCHEMA CHANGES.`,
- Filename: data.Config.Resolver.Filename,
- Data: resolverBuild,
- Packages: data.Config.Packages,
- })
-}
-
-func (m *Plugin) generatePerSchema(data *codegen.Data) error {
- rewriter, err := rewrite.New(data.Config.Resolver.Dir())
- if err != nil {
- return err
- }
-
- files := map[string]*File{}
-
- objects := make(codegen.Objects, len(data.Objects)+len(data.Inputs))
- copy(objects, data.Objects)
- copy(objects[len(data.Objects):], data.Inputs)
-
- for _, o := range objects {
- if o.HasResolvers() {
- fn := gqlToResolverName(data.Config.Resolver.Dir(), o.Position.Src.Name, data.Config.Resolver.FilenameTemplate)
- if files[fn] == nil {
- files[fn] = &File{}
- }
-
- rewriter.MarkStructCopied(templates.LcFirst(o.Name) + templates.UcFirst(data.Config.Resolver.Type))
- rewriter.GetMethodBody(data.Config.Resolver.Type, strings.Title(o.Name))
- files[fn].Objects = append(files[fn].Objects, o)
- }
- for _, f := range o.Fields {
- if !f.IsResolver {
- continue
- }
-
- structName := templates.LcFirst(o.Name) + templates.UcFirst(data.Config.Resolver.Type)
- implementation := strings.TrimSpace(rewriter.GetMethodBody(structName, f.GoFieldName))
- if implementation == "" {
- implementation = `panic(fmt.Errorf("not implemented"))`
- }
-
- resolver := Resolver{o, f, implementation}
- fn := gqlToResolverName(data.Config.Resolver.Dir(), f.Position.Src.Name, data.Config.Resolver.FilenameTemplate)
- if files[fn] == nil {
- files[fn] = &File{}
- }
-
- files[fn].Resolvers = append(files[fn].Resolvers, &resolver)
- }
- }
-
- for filename, file := range files {
- file.imports = rewriter.ExistingImports(filename)
- file.RemainingSource = rewriter.RemainingSource(filename)
- }
-
- for filename, file := range files {
- resolverBuild := &ResolverBuild{
- File: file,
- PackageName: data.Config.Resolver.Package,
- ResolverType: data.Config.Resolver.Type,
- }
-
- err := templates.Render(templates.Options{
- PackageName: data.Config.Resolver.Package,
- FileNotice: `
- // This file will be automatically regenerated based on the schema, any resolver implementations
- // will be copied through when generating and any unknown code will be moved to the end.`,
- Filename: filename,
- Data: resolverBuild,
- Packages: data.Config.Packages,
- })
- if err != nil {
- return err
- }
- }
-
- if _, err := os.Stat(data.Config.Resolver.Filename); errors.Is(err, fs.ErrNotExist) {
- err := templates.Render(templates.Options{
- PackageName: data.Config.Resolver.Package,
- FileNotice: `
- // This file will not be regenerated automatically.
- //
- // It serves as dependency injection for your app, add any dependencies you require here.`,
- Template: `type {{.}} struct {}`,
- Filename: data.Config.Resolver.Filename,
- Data: data.Config.Resolver.Type,
- Packages: data.Config.Packages,
- })
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-type ResolverBuild struct {
- *File
- HasRoot bool
- PackageName string
- ResolverType string
-}
-
-type File struct {
- // These are separated because the type definition of the resolver object may live in a different file from the
- // resolver method implementations, for example when extending a type in a different graphql schema file
- Objects []*codegen.Object
- Resolvers []*Resolver
- imports []rewrite.Import
- RemainingSource string
-}
-
-func (f *File) Imports() string {
- for _, imp := range f.imports {
- if imp.Alias == "" {
- _, _ = templates.CurrentImports.Reserve(imp.ImportPath)
- } else {
- _, _ = templates.CurrentImports.Reserve(imp.ImportPath, imp.Alias)
- }
- }
- return ""
-}
-
-type Resolver struct {
- Object *codegen.Object
- Field *codegen.Field
- Implementation string
-}
-
-func gqlToResolverName(base string, gqlname, filenameTmpl string) string {
- gqlname = filepath.Base(gqlname)
- ext := filepath.Ext(gqlname)
- if filenameTmpl == "" {
- filenameTmpl = "{name}.resolvers.go"
- }
- filename := strings.ReplaceAll(filenameTmpl, "{name}", strings.TrimSuffix(gqlname, ext))
- return filepath.Join(base, filename)
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl b/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl
deleted file mode 100644
index 16c684d6283..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/resolvergen/resolver.gotpl
+++ /dev/null
@@ -1,45 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "fmt" }}
-{{ reserveImport "io" }}
-{{ reserveImport "strconv" }}
-{{ reserveImport "time" }}
-{{ reserveImport "sync" }}
-{{ reserveImport "errors" }}
-{{ reserveImport "bytes" }}
-
-{{ reserveImport "github.com/vektah/gqlparser/v2" }}
-{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/introspection" }}
-
-{{ .Imports }}
-
-{{ if .HasRoot }}
- type {{.ResolverType}} struct {}
-{{ end }}
-
-{{ range $resolver := .Resolvers -}}
- func (r *{{lcFirst $resolver.Object.Name}}{{ucFirst $.ResolverType}}) {{$resolver.Field.GoFieldName}}{{ $resolver.Field.ShortResolverDeclaration }} {
- {{ $resolver.Implementation }}
- }
-
-{{ end }}
-
-{{ range $object := .Objects -}}
- // {{ucFirst $object.Name}} returns {{ $object.ResolverInterface | ref }} implementation.
- func (r *{{$.ResolverType}}) {{ucFirst $object.Name}}() {{ $object.ResolverInterface | ref }} { return &{{lcFirst $object.Name}}{{ucFirst $.ResolverType}}{r} }
-{{ end }}
-
-{{ range $object := .Objects -}}
- type {{lcFirst $object.Name}}{{ucFirst $.ResolverType}} struct { *{{$.ResolverType}} }
-{{ end }}
-
-{{ if (ne .RemainingSource "") }}
- // !!! WARNING !!!
- // The code below was going to be deleted when updating resolvers. It has been copied here so you have
- // one last chance to move it out of harms way if you want. There are two reasons this happens:
- // - When renaming or deleting a resolver the old code will be put in here. You can safely delete
- // it when you're done.
- // - You have helper methods in this file. Move them out to keep these resolver files clean.
- {{ .RemainingSource }}
-{{ end }}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go b/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
deleted file mode 100644
index d9b35fe4178..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package servergen
-
-import (
- "errors"
- "io/fs"
- "log"
- "os"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/plugin"
-)
-
-func New(filename string) plugin.Plugin {
- return &Plugin{filename}
-}
-
-type Plugin struct {
- filename string
-}
-
-var _ plugin.CodeGenerator = &Plugin{}
-
-func (m *Plugin) Name() string {
- return "servergen"
-}
-
-func (m *Plugin) GenerateCode(data *codegen.Data) error {
- serverBuild := &ServerBuild{
- ExecPackageName: data.Config.Exec.ImportPath(),
- ResolverPackageName: data.Config.Resolver.ImportPath(),
- }
-
- if _, err := os.Stat(m.filename); errors.Is(err, fs.ErrNotExist) {
- return templates.Render(templates.Options{
- PackageName: "main",
- Filename: m.filename,
- Data: serverBuild,
- Packages: data.Config.Packages,
- })
- }
-
- log.Printf("Skipped server: %s already exists\n", m.filename)
- return nil
-}
-
-type ServerBuild struct {
- codegen.Data
-
- ExecPackageName string
- ResolverPackageName string
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl b/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl
deleted file mode 100644
index a3ae2a877a8..00000000000
--- a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl
+++ /dev/null
@@ -1,23 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "log" }}
-{{ reserveImport "net/http" }}
-{{ reserveImport "os" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/playground" }}
-{{ reserveImport "github.com/99designs/gqlgen/graphql/handler" }}
-
-const defaultPort = "8080"
-
-func main() {
- port := os.Getenv("PORT")
- if port == "" {
- port = defaultPort
- }
-
- srv := handler.NewDefaultServer({{ lookupImport .ExecPackageName }}.NewExecutableSchema({{ lookupImport .ExecPackageName}}.Config{Resolvers: &{{ lookupImport .ResolverPackageName}}.Resolver{}}))
-
- http.Handle("/", playground.Handler("GraphQL playground", "/query"))
- http.Handle("/query", srv)
-
- log.Printf("connect to http://localhost:%s/ for GraphQL playground", port)
- log.Fatal(http.ListenAndServe(":" + port, nil))
-}
diff --git a/vendor/github.com/99designs/gqlgen/tools.go b/vendor/github.com/99designs/gqlgen/tools.go
deleted file mode 100644
index ef46208c161..00000000000
--- a/vendor/github.com/99designs/gqlgen/tools.go
+++ /dev/null
@@ -1,8 +0,0 @@
-//go:build tools
-// +build tools
-
-package main
-
-import (
- _ "github.com/matryer/moq"
-)
diff --git a/vendor/github.com/WithoutPants/sortorder/LICENSE b/vendor/github.com/WithoutPants/sortorder/LICENSE
deleted file mode 100644
index 5c695fb590f..00000000000
--- a/vendor/github.com/WithoutPants/sortorder/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-The MIT License (MIT)
-Copyright (c) 2015 Frits van Bommel
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/WithoutPants/sortorder/casefolded/README.md b/vendor/github.com/WithoutPants/sortorder/casefolded/README.md
deleted file mode 100644
index fd2d84f2e94..00000000000
--- a/vendor/github.com/WithoutPants/sortorder/casefolded/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# casefolded [![PkgGoDev](https://pkg.go.dev/badge/github.com/fvbommel/sortorder/casefolded)](https://pkg.go.dev/github.com/fvbommel/sortorder/casefolded)
-
- import "github.com/fvbommel/sortorder/casefolded"
-
-Case-folded sort orders and comparison functions.
-
-These sort characters as the lowest unicode value that is equivalent to that character, ignoring case.
-
-Not all Unicode special cases are supported.
-
-This is a separate sub-package because this needs to pull in the Unicode tables in the standard library,
-which can add significantly to the size of binaries.
diff --git a/vendor/github.com/WithoutPants/sortorder/casefolded/natsort.go b/vendor/github.com/WithoutPants/sortorder/casefolded/natsort.go
deleted file mode 100644
index cf7cd92227a..00000000000
--- a/vendor/github.com/WithoutPants/sortorder/casefolded/natsort.go
+++ /dev/null
@@ -1,190 +0,0 @@
-package casefolded
-
-import (
- "unicode"
- "unicode/utf8"
-)
-
-// Natural implements sort.Interface to sort strings in natural order. This
-// means that e.g. "abc2" < "abc12".
-//
-// This is the simple case-folded version,
-// which means that letters are considered equal if strings.SimpleFold says they are.
-// For example, "abc2" < "ABC12" < "abc100" and 'k' == '\u212a' (the Kelvin symbol).
-//
-// Non-digit sequences and numbers are compared separately.
-// The former are compared rune-by-rune using the lowest equivalent runes,
-// while digits are compared numerically
-// (except that the number of leading zeros is used as a tie-breaker, so e.g. "2" < "02")
-//
-// Limitations:
-// - only ASCII digits (0-9) are considered.
-// - comparisons are done on a rune-by-rune basis,
-// so some special case equivalences like 'ß' == 'SS" are not supported.
-// - Special cases like Turkish 'i' == 'İ' (and not regular dotless 'I')
-// are not supported either.
-type Natural []string
-
-func (n Natural) Len() int { return len(n) }
-func (n Natural) Swap(i, j int) { n[i], n[j] = n[j], n[i] }
-func (n Natural) Less(i, j int) bool { return NaturalLess(n[i], n[j]) }
-
-func isDigit(b rune) bool { return '0' <= b && b <= '9' }
-
-// caseFold returns the lowest-numbered rune equivalent to the parameter.
-func caseFold(r rune) rune {
- // Iterate until SimpleFold returns a lower value.
- // This will be the lowest-numbered equivalent rune.
- var prev rune = -1
- for r > prev {
- prev, r = r, unicode.SimpleFold(r)
- }
- return r
-}
-
-// NaturalLess compares two strings using natural ordering. This means that e.g.
-// "abc2" < "abc12".
-//
-// This is the simple case-folded version,
-// which means that letters are considered equal if strings.SimpleFold says they are.
-// For example, "abc2" < "ABC12" < "abc100" and 'k' == '\u212a' (the Kelvin symbol).
-//
-// Non-digit sequences and numbers are compared separately.
-// The former are compared rune-by-rune using the lowest equivalent runes,
-// while digits are compared numerically
-// (except that the number of leading zeros is used as a tie-breaker, so e.g. "2" < "02")
-//
-// Limitations:
-// - only ASCII digits (0-9) are considered.
-// - comparisons are done on a rune-by-rune basis,
-// so some special case equivalences like 'ß' == 'SS" are not supported.
-// - Special cases like Turkish 'i' == 'İ' (and not regular dotless 'I')
-// are not supported either.
-func NaturalLess(str1, str2 string) bool {
- // ASCII fast path.
- idx1, idx2 := 0, 0
- for idx1 < len(str1) && idx2 < len(str2) {
- c1, c2 := rune(str1[idx1]), rune(str2[idx2])
-
- // Bail out to full Unicode support?
- if c1|c2 >= utf8.RuneSelf {
- goto hasUnicode
- }
-
- dig1, dig2 := isDigit(c1), isDigit(c2)
- switch {
- case !dig1 || !dig2:
- // For ASCII it suffices to normalize letters to upper-case,
- // because upper-cased ASCII compares lexicographically.
- // Note: this does not account for regional special cases
- // like Turkish dotted capital 'İ'.
-
- // Canonicalize to upper-case.
- c1 = unicode.ToUpper(c1)
- c2 = unicode.ToUpper(c2)
- // Identical upper-cased ASCII runes are equal.
- if c1 == c2 {
- idx1++
- idx2++
- continue
- }
- return c1 < c2
- default: // Digits
- // Eat zeros.
- for ; idx1 < len(str1) && str1[idx1] == '0'; idx1++ {
- }
- for ; idx2 < len(str2) && str2[idx2] == '0'; idx2++ {
- }
- // Eat all digits.
- nonZero1, nonZero2 := idx1, idx2
- for ; idx1 < len(str1) && isDigit(rune(str1[idx1])); idx1++ {
- }
- for ; idx2 < len(str2) && isDigit(rune(str2[idx2])); idx2++ {
- }
- // If lengths of numbers with non-zero prefix differ, the shorter
- // one is less.
- if len1, len2 := idx1-nonZero1, idx2-nonZero2; len1 != len2 {
- return len1 < len2
- }
- // If they're equally long, string comparison is correct.
- if nr1, nr2 := str1[nonZero1:idx1], str2[nonZero2:idx2]; nr1 != nr2 {
- return nr1 < nr2
- }
- // Otherwise, the one with less zeros is less.
- // Because everything up to the number is equal, comparing the index
- // after the zeros is sufficient.
- if nonZero1 != nonZero2 {
- return nonZero1 < nonZero2
- }
- }
- // They're identical so far, so continue comparing.
- }
- // So far they are identical. At least one is ended. If the other continues,
- // it sorts last.
- return len(str1) < len(str2)
-
-hasUnicode:
- for idx1 < len(str1) && idx2 < len(str2) {
- c1, delta1 := utf8.DecodeRuneInString(str1[idx1:])
- c2, delta2 := utf8.DecodeRuneInString(str2[idx2:])
-
- dig1, dig2 := isDigit(c1), isDigit(c2)
- switch {
- case !dig1 || !dig2:
- idx1 += delta1
- idx2 += delta2
- // Fast path: identical runes are equal.
- if c1 == c2 {
- continue
- }
- // ASCII fast path: ASCII characters compare by their upper-case equivalent (if any)
- // because 'A' < 'a', so upper-case them.
- if c1 <= unicode.MaxASCII && c2 <= unicode.MaxASCII {
- c1 = unicode.ToUpper(c1)
- c2 = unicode.ToUpper(c2)
- if c1 != c2 {
- return c1 < c2
- }
- continue
- }
- // Compare lowest equivalent characters.
- c1 = caseFold(c1)
- c2 = caseFold(c2)
- if c1 == c2 {
- continue
- }
- return c1 < c2
- default: // Digits
- // Eat zeros.
- for ; idx1 < len(str1) && str1[idx1] == '0'; idx1++ {
- }
- for ; idx2 < len(str2) && str2[idx2] == '0'; idx2++ {
- }
- // Eat all digits.
- nonZero1, nonZero2 := idx1, idx2
- for ; idx1 < len(str1) && isDigit(rune(str1[idx1])); idx1++ {
- }
- for ; idx2 < len(str2) && isDigit(rune(str2[idx2])); idx2++ {
- }
- // If lengths of numbers with non-zero prefix differ, the shorter
- // one is less.
- if len1, len2 := idx1-nonZero1, idx2-nonZero2; len1 != len2 {
- return len1 < len2
- }
- // If they're equally long, string comparison is correct.
- if nr1, nr2 := str1[nonZero1:idx1], str2[nonZero2:idx2]; nr1 != nr2 {
- return nr1 < nr2
- }
- // Otherwise, the one with less zeros is less.
- // Because everything up to the number is equal, comparing the index
- // after the zeros is sufficient.
- if nonZero1 != nonZero2 {
- return nonZero1 < nonZero2
- }
- }
- // They're identical so far, so continue comparing.
- }
- // So far they are identical. At least one is ended. If the other continues,
- // it sorts last.
- return len(str1[idx1:]) < len(str2[idx2:])
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/.gitignore b/vendor/github.com/Yamashou/gqlgenc/.gitignore
deleted file mode 100644
index 35a663521a2..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-/.gqlgenc.yml
-/models_gen.go
-/**/.graphqlconfig
-/schema.graphql
-/client.go
-/query/
-/.idea/
-
-coverage.out
diff --git a/vendor/github.com/Yamashou/gqlgenc/.golangci.yml b/vendor/github.com/Yamashou/gqlgenc/.golangci.yml
deleted file mode 100644
index 1dd68463b98..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/.golangci.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
-run:
-linters-settings:
- govet:
- enable-all: true
- disable:
- - shadow
- unused:
- check-exported: true
- unparam:
- check-exported: true
- varcheck:
- exported-fields: true
- structcheck:
- exported-fields: true
- nakedret:
- max-func-lines: 1
-
-linters:
- enable-all: true
- disable:
- - testpackage
- - nestif
- - godot
- - wsl
- - lll
- - dupl
- - funlen
- - gochecknoinits
- - gochecknoglobals
- - godox
- - maligned
- - gocognit
- - gocyclo
- - interfacer
- - gomnd
- - goerr113
- - exhaustivestruct
- - errorlint # TODO able this lint
- - forbidigo
- - cyclop
- - govet
- - errname
- - varnamelen
- - nilnil
- - structcheck
- fast: false
-
-issues:
- exclude-rules:
- # Test
- - path: _test\.go
- text: "Using the variable on range scope `tt` in function literal"
- linters:
- - scopelint
- - path: _test\.go
- linters:
- - unused
- - structcheck
- - path: introspection/type.go
- linters:
- - structcheck # These types fits IntrospectionQuery
- - path: config/config.go
- text: "`Query` is unused" # used in main.go
- linters:
- - structcheck
- - path: graphqljson/graphql.go
- text: "`Extensions` is unused" # used in line 48
- linters:
- - structcheck
- - path: introspection/query.go
- text: "`Introspection` is unused" # used in config/config.go
- linters:
- - varcheck
- - path: config/config.go
- text: "`ClientV2` is unused" # used in config/config.go
- linters:
- - structcheck
- - path: graphqljson/graphql.go
- text: "append to slice `frontier` with non-zero initialized length" # used in config/config.go
- linters:
- - makezero
- - path: clientv2/client_test.go
- text: "should not use basic type string as key in context.WithValue"
- linters:
- - golint
- - path: clientv2/client_test.go
- text: "should not use built-in type string as key for value; define your own type to avoid collisions"
- linters:
- - staticcheck
- - path: clientv2/client_test.go
- linters:
- - revive
diff --git a/vendor/github.com/Yamashou/gqlgenc/LICENSE b/vendor/github.com/Yamashou/gqlgenc/LICENSE
deleted file mode 100644
index e16053d8f45..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Yamashou
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/Yamashou/gqlgenc/Makefile b/vendor/github.com/Yamashou/gqlgenc/Makefile
deleted file mode 100644
index c0ff3adcc00..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-MAKEFLAGS=--no-builtin-rules --no-builtin-variables --always-make
-
-fmt:
- gofumports -local github.com/Yamashou/gqlgenc -w .
-
-lint:
- golangci-lint cache clean && golangci-lint run
-
-test:
- go test -v ./...
diff --git a/vendor/github.com/Yamashou/gqlgenc/README.md b/vendor/github.com/Yamashou/gqlgenc/README.md
deleted file mode 100644
index 664ce89ec42..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/README.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# gqlgenc
-
-## What is gqlgenc ?
-
-This is Go library for building GraphQL client with [gqlgen](https://github.com/99designs/gqlgen)
-
-## Motivation
-
-Now, if you build GraphQL api client for Go, have choice:
-
- - [github.com/shurcooL/graphql](https://github.com/shurcooL/graphql)
- - [github.com/machinebox/graphql](https://github.com/machinebox/graphql)
-
-These libraries are very simple and easy to handle.
-However, as I work with [gqlgen](https://github.com/99designs/gqlgen) and [graphql-code-generator](https://graphql-code-generator.com/) every day, I find out the beauty of automatic generation.
-So I want to automatically generate types.
-
-## Installation
-
-```shell script
-go get -u github.com/Yamashou/gqlgenc
-```
-
-## How to use
-
-### Client Codes Only
-
-gqlgenc base is gqlgen with [plugins](https://gqlgen.com/reference/plugins/). So the setting is yaml in each format.
-gqlgenc can be configured using a `.gqlgenc.yml` file
-
-Load a schema from a remote server:
-
-```yaml
-model:
- package: generated
- filename: ./models_gen.go # https://github.com/99designs/gqlgen/tree/master/plugin/modelgen
-client:
- package: generated
- filename: ./client.go # Where should any generated client go?
-models:
- Int:
- model: github.com/99designs/gqlgen/graphql.Int64
- Date:
- model: github.com/99designs/gqlgen/graphql.Time
-endpoint:
- url: https://api.annict.com/graphql # Where do you want to send your request?
- headers: # If you need header for getting introspection query, set it
- Authorization: "Bearer ${ANNICT_KEY}" # support environment variables
-query:
- - "./query/*.graphql" # Where are all the query files located?
-```
-
-Load a schema from a local file:
-
-```yaml
-model:
- package: generated
- filename: ./models_gen.go # https://github.com/99designs/gqlgen/tree/master/plugin/modelgen
-client:
- package: generated
- filename: ./client.go # Where should any generated client go?
-models:
- Int:
- model: github.com/99designs/gqlgen/graphql.Int64
- Date:
- model: github.com/99designs/gqlgen/graphql.Time
-schema:
- - "schema/**/*.graphql" # Where are all the schema files located?
-query:
- - "./query/*.graphql" # Where are all the query files located?
-```
-
-Execute the following command on same directory for .gqlgenc.yml
-
-```shell script
-gqlgenc
-```
-
-### With gqlgen
-
-Do this when creating a server and client for Go.
-You create your own entrypoint for gqlgen.
-This use case is very useful for testing your server.
-
-
-```go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/Yamashou/gqlgenc/clientgen"
-
- "github.com/99designs/gqlgen/api"
- "github.com/99designs/gqlgen/codegen/config"
-)
-
-func main() {
- cfg, err := config.LoadConfigFromDefaultLocations()
- if err != nil {
- fmt.Fprintln(os.Stderr, "failed to load config", err.Error())
- os.Exit(2)
- }
- queries := []string{"client.query", "fragemt.query"}
- clientPackage := config.PackageConfig{
- Filename: "./client.go",
- Package: "gen",
- }
-
- clientPlugin := clientgen.New(queries, clientPackage)
- err = api.Generate(cfg,
- api.AddPlugin(clientPlugin),
- )
- if err != nil {
- fmt.Fprintln(os.Stderr, err.Error())
- os.Exit(3)
- }
-}
-```
-
-## Documents
-
-- [How to configure gqlgen using gqlgen.yml](https://gqlgen.com/config/)
-- [How to write plugins for gqlgen](https://gqlgen.com/reference/plugins/)
-
-
-## Comments
-
-### Japanese Comments
-These codes have Japanese comments. Replace with English.
-
-### Subscription
-
-This client does not support subscription. If you need a subscription, please create an issue or pull request.
-
-### Pre-conditions
-
-[clientgen](https://github.com/Yamashou/gqlgenc/tree/master/clientgen) is created based on [modelgen](https://github.com/99designs/gqlgen/tree/master/plugin/modelgen). So if you don't have a modelgen, it may be a mysterious move.
diff --git a/vendor/github.com/Yamashou/gqlgenc/TESTING.md b/vendor/github.com/Yamashou/gqlgenc/TESTING.md
deleted file mode 100644
index c474dfd0048..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/TESTING.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Run tests
-
-To run tests simply run
-
-```shell script
-go test ./... -coverprofile=coverage.out
-```
-
-To deep dive into test coverage, run the following command to see the result in your terminal
-
-```shell script
-go tool cover -func=coverage.out
-```
-
-or the following to see the result in your browser
-
-```shell script
-go tool cover -html=coverage.out
-```
diff --git a/vendor/github.com/Yamashou/gqlgenc/client/client.go b/vendor/github.com/Yamashou/gqlgenc/client/client.go
deleted file mode 100644
index 4f049b34f83..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/client/client.go
+++ /dev/null
@@ -1,182 +0,0 @@
-package client
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "net/http"
-
- "github.com/Yamashou/gqlgenc/graphqljson"
- "github.com/vektah/gqlparser/v2/gqlerror"
-)
-
-// HTTPRequestOption represents the options applicable to the http client
-type HTTPRequestOption func(req *http.Request)
-
-// Client is the http client wrapper
-type Client struct {
- Client *http.Client
- BaseURL string
- HTTPRequestOptions []HTTPRequestOption
-}
-
-// Request represents an outgoing GraphQL request
-type Request struct {
- Query string `json:"query"`
- Variables map[string]interface{} `json:"variables,omitempty"`
- OperationName string `json:"operationName,omitempty"`
-}
-
-// NewClient creates a new http client wrapper
-func NewClient(client *http.Client, baseURL string, options ...HTTPRequestOption) *Client {
- return &Client{
- Client: client,
- BaseURL: baseURL,
- HTTPRequestOptions: options,
- }
-}
-
-func (c *Client) newRequest(ctx context.Context, operationName, query string, vars map[string]interface{}, httpRequestOptions []HTTPRequestOption) (*http.Request, error) {
- r := &Request{
- Query: query,
- Variables: vars,
- OperationName: operationName,
- }
-
- requestBody, err := json.Marshal(r)
- if err != nil {
- return nil, fmt.Errorf("encode: %w", err)
- }
-
- req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.BaseURL, bytes.NewBuffer(requestBody))
- if err != nil {
- return nil, fmt.Errorf("create request struct failed: %w", err)
- }
-
- for _, httpRequestOption := range c.HTTPRequestOptions {
- httpRequestOption(req)
- }
- for _, httpRequestOption := range httpRequestOptions {
- httpRequestOption(req)
- }
-
- return req, nil
-}
-
-// GqlErrorList is the struct of a standard graphql error response
-type GqlErrorList struct {
- Errors gqlerror.List `json:"errors"`
-}
-
-func (e *GqlErrorList) Error() string {
- return e.Errors.Error()
-}
-
-// HTTPError is the error when a GqlErrorList cannot be parsed
-type HTTPError struct {
- Code int `json:"code"`
- Message string `json:"message"`
-}
-
-// ErrorResponse represent an handled error
-type ErrorResponse struct {
- // populated when http status code is not OK
- NetworkError *HTTPError `json:"networkErrors"`
- // populated when http status code is OK but the server returned at least one graphql error
- GqlErrors *gqlerror.List `json:"graphqlErrors"`
-}
-
-// HasErrors returns true when at least one error is declared
-func (er *ErrorResponse) HasErrors() bool {
- return er.NetworkError != nil || er.GqlErrors != nil
-}
-
-func (er *ErrorResponse) Error() string {
- content, err := json.Marshal(er)
- if err != nil {
- return err.Error()
- }
-
- return string(content)
-}
-
-// Post sends a http POST request to the graphql endpoint with the given query then unpacks
-// the response into the given object.
-func (c *Client) Post(ctx context.Context, operationName, query string, respData interface{}, vars map[string]interface{}, httpRequestOptions ...HTTPRequestOption) error {
- req, err := c.newRequest(ctx, operationName, query, vars, httpRequestOptions)
- if err != nil {
- return fmt.Errorf("don't create request: %w", err)
- }
- req.Header.Set("Content-Type", "application/json; charset=utf-8")
- req.Header.Set("Accept", "application/json; charset=utf-8")
-
- resp, err := c.Client.Do(req)
- if err != nil {
- return fmt.Errorf("request failed: %w", err)
- }
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return fmt.Errorf("failed to read response body: %w", err)
- }
-
- return parseResponse(body, resp.StatusCode, respData)
-}
-
-func parseResponse(body []byte, httpCode int, result interface{}) error {
- errResponse := &ErrorResponse{}
- isKOCode := httpCode < 200 || 299 < httpCode
- if isKOCode {
- errResponse.NetworkError = &HTTPError{
- Code: httpCode,
- Message: fmt.Sprintf("Response body %s", string(body)),
- }
- }
-
- // some servers return a graphql error with a non OK http code, try anyway to parse the body
- if err := unmarshal(body, result); err != nil {
- if gqlErr, ok := err.(*GqlErrorList); ok {
- errResponse.GqlErrors = &gqlErr.Errors
- } else if !isKOCode { // if is KO code there is already the http error, this error should not be returned
- return err
- }
- }
-
- if errResponse.HasErrors() {
- return errResponse
- }
-
- return nil
-}
-
-// response is a GraphQL layer response from a handler.
-type response struct {
- Data json.RawMessage `json:"data"`
- Errors json.RawMessage `json:"errors"`
-}
-
-func unmarshal(data []byte, res interface{}) error {
- resp := response{}
- if err := json.Unmarshal(data, &resp); err != nil {
- return fmt.Errorf("failed to decode data %s: %w", string(data), err)
- }
-
- if resp.Errors != nil && len(resp.Errors) > 0 {
- // try to parse standard graphql error
- errors := &GqlErrorList{}
- if e := json.Unmarshal(data, errors); e != nil {
- return fmt.Errorf("faild to parse graphql errors. Response content %s - %w ", string(data), e)
- }
-
- return errors
- }
-
- if err := graphqljson.UnmarshalData(resp.Data, res); err != nil {
- return fmt.Errorf("failed to decode data into response %s: %w", string(data), err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/client.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/client.go
deleted file mode 100644
index bffeb5168d6..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/client.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package clientgen
-
-import (
- "fmt"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/plugin"
- gqlgencConfig "github.com/Yamashou/gqlgenc/config"
-)
-
-var _ plugin.ConfigMutator = &Plugin{}
-
-type Plugin struct {
- queryFilePaths []string
- Client config.PackageConfig
- GenerateConfig *gqlgencConfig.GenerateConfig
-}
-
-func New(queryFilePaths []string, client config.PackageConfig, generateConfig *gqlgencConfig.GenerateConfig) *Plugin {
- return &Plugin{
- queryFilePaths: queryFilePaths,
- Client: client,
- GenerateConfig: generateConfig,
- }
-}
-
-func (p *Plugin) Name() string {
- return "clientgen"
-}
-
-func (p *Plugin) MutateConfig(cfg *config.Config) error {
- querySources, err := LoadQuerySources(p.queryFilePaths)
- if err != nil {
- return fmt.Errorf("load query sources failed: %w", err)
- }
-
- // 1. 全体のqueryDocumentを1度にparse
- // 1. Parse document from source of query
- queryDocument, err := ParseQueryDocuments(cfg.Schema, querySources, p.GenerateConfig)
- if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- // 2. OperationごとのqueryDocumentを作成
- // 2. Separate documents for each operation
- queryDocuments, err := QueryDocumentsByOperations(cfg.Schema, queryDocument.Operations)
- if err != nil {
- return fmt.Errorf("parse query document failed: %w", err)
- }
-
- // 3. テンプレートと情報ソースを元にコード生成
- // 3. Generate code from template and document source
- sourceGenerator := NewSourceGenerator(cfg, p.Client)
- source := NewSource(cfg.Schema, queryDocument, sourceGenerator, p.GenerateConfig)
- query, err := source.Query()
- if err != nil {
- return fmt.Errorf("generating query object: %w", err)
- }
-
- mutation, err := source.Mutation()
- if err != nil {
- return fmt.Errorf("generating mutation object: %w", err)
- }
-
- fragments, err := source.Fragments()
- if err != nil {
- return fmt.Errorf("generating fragment failed: %w", err)
- }
-
- operationResponses, err := source.OperationResponses()
- if err != nil {
- return fmt.Errorf("generating operation response failed: %w", err)
- }
-
- operations, err := source.Operations(queryDocuments)
- if err != nil {
- return fmt.Errorf("generating operation failed: %w", err)
- }
-
- if err := RenderTemplate(cfg, query, mutation, fragments, operations, operationResponses, p.GenerateConfig, p.Client); err != nil {
- return fmt.Errorf("template failed: %w", err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/query.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/query.go
deleted file mode 100644
index 2b651938bfa..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/query.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package clientgen
-
-import (
- "fmt"
-
- "github.com/Yamashou/gqlgenc/config"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/parser"
- "github.com/vektah/gqlparser/v2/validator"
-)
-
-type merger struct {
- document ast.QueryDocument
- unamedIndex int
- unamedPattern string
-}
-
-func newMerger(generateConfig *config.GenerateConfig) *merger {
- unamedPattern := "Unamed"
- if generateConfig != nil && generateConfig.UnamedPattern != "" {
- unamedPattern = generateConfig.UnamedPattern
- }
-
- return &merger{unamedPattern: unamedPattern}
-}
-
-func ParseQueryDocuments(schema *ast.Schema, querySources []*ast.Source, generateConfig *config.GenerateConfig) (*ast.QueryDocument, error) {
- merger := newMerger(generateConfig)
- for _, querySource := range querySources {
- query, gqlerr := parser.ParseQuery(querySource)
- if gqlerr != nil {
- return nil, fmt.Errorf(": %w", gqlerr)
- }
-
- merger.mergeQueryDocument(query)
- }
-
- if errs := validator.Validate(schema, &merger.document); errs != nil {
- return nil, fmt.Errorf(": %w", errs)
- }
-
- return &merger.document, nil
-}
-
-func (m *merger) mergeQueryDocument(other *ast.QueryDocument) {
- for _, operation := range other.Operations {
- if operation.Name == "" {
- // We increment first so unamed queries will start at 1
- m.unamedIndex++
- operation.Name = fmt.Sprintf("%s%d", m.unamedPattern, m.unamedIndex)
- }
- }
-
- m.document.Operations = append(m.document.Operations, other.Operations...)
- m.document.Fragments = append(m.document.Fragments, other.Fragments...)
-}
-
-func QueryDocumentsByOperations(schema *ast.Schema, operations ast.OperationList) ([]*ast.QueryDocument, error) {
- queryDocuments := make([]*ast.QueryDocument, 0, len(operations))
- for _, operation := range operations {
- fragments := fragmentsInOperationDefinition(operation)
-
- queryDocument := &ast.QueryDocument{
- Operations: ast.OperationList{operation},
- Fragments: fragments,
- Position: nil,
- }
-
- if errs := validator.Validate(schema, queryDocument); errs != nil {
- return nil, fmt.Errorf(": %w", errs)
- }
-
- queryDocuments = append(queryDocuments, queryDocument)
- }
-
- return queryDocuments, nil
-}
-
-func fragmentsInOperationDefinition(operation *ast.OperationDefinition) ast.FragmentDefinitionList {
- fragments := fragmentsInOperationWalker(operation.SelectionSet)
- uniqueFragments := fragmentsUnique(fragments)
-
- return uniqueFragments
-}
-
-func fragmentsUnique(fragments ast.FragmentDefinitionList) ast.FragmentDefinitionList {
- uniqueMap := make(map[string]*ast.FragmentDefinition)
- for _, fragment := range fragments {
- uniqueMap[fragment.Name] = fragment
- }
-
- uniqueFragments := make(ast.FragmentDefinitionList, 0, len(uniqueMap))
- for _, fragment := range uniqueMap {
- uniqueFragments = append(uniqueFragments, fragment)
- }
-
- return uniqueFragments
-}
-
-func fragmentsInOperationWalker(selectionSet ast.SelectionSet) ast.FragmentDefinitionList {
- var fragments ast.FragmentDefinitionList
- for _, selection := range selectionSet {
- var selectionSet ast.SelectionSet
- switch selection := selection.(type) {
- case *ast.Field:
- selectionSet = selection.SelectionSet
- case *ast.InlineFragment:
- selectionSet = selection.SelectionSet
- case *ast.FragmentSpread:
- fragments = append(fragments, selection.Definition)
- selectionSet = selection.Definition.SelectionSet
- }
-
- fragments = append(fragments, fragmentsInOperationWalker(selectionSet)...)
- }
-
- return fragments
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/query_source.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/query_source.go
deleted file mode 100644
index bc42490956d..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/query_source.go
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright (c) 2020 gqlgen authors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-package clientgen
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "regexp"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-var path2regex = strings.NewReplacer(
- `.`, `\.`,
- `*`, `.+`,
- `\`, `[\\/]`,
- `/`, `[\\/]`,
-)
-
-// LoadQuerySourceなどは、gqlgenがLoadConfigでSchemaを読み込む時の実装をコピーして一部修正している
-// **/test/*.graphqlなどに対応している
-func LoadQuerySources(queryFileNames []string) ([]*ast.Source, error) {
- var noGlobQueryFileNames config.StringList
-
- var err error
- preGlobbing := queryFileNames
- for _, f := range preGlobbing {
- var matches []string
-
- // for ** we want to override default globbing patterns and walk all
- // subdirectories to match schema files.
- if strings.Contains(f, "**") {
- pathParts := strings.SplitN(f, "**", 2)
- rest := strings.TrimPrefix(strings.TrimPrefix(pathParts[1], `\`), `/`)
- // turn the rest of the glob into a regex, anchored only at the end because ** allows
- // for any number of dirs in between and walk will let us match against the full path name
- globRe := regexp.MustCompile(path2regex.Replace(rest) + `$`)
-
- if err := filepath.Walk(pathParts[0], func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- if globRe.MatchString(strings.TrimPrefix(path, pathParts[0])) {
- matches = append(matches, path)
- }
-
- return nil
- }); err != nil {
- return nil, fmt.Errorf("failed to walk schema at root %s: %w", pathParts[0], err)
- }
- } else {
- matches, err = filepath.Glob(f)
- if err != nil {
- return nil, fmt.Errorf("failed to glob schema filename %v: %w", f, err)
- }
- }
-
- for _, m := range matches {
- if noGlobQueryFileNames.Has(m) {
- continue
- }
-
- noGlobQueryFileNames = append(noGlobQueryFileNames, m)
- }
- }
-
- querySources := make([]*ast.Source, 0, len(noGlobQueryFileNames))
- for _, filename := range noGlobQueryFileNames {
- filename = filepath.ToSlash(filename)
- var err error
- var schemaRaw []byte
- schemaRaw, err = ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to open schema: %w", err)
- }
-
- querySources = append(querySources, &ast.Source{Name: filename, Input: string(schemaRaw)})
- }
-
- return querySources, nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/source.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/source.go
deleted file mode 100644
index 1d059f3af6a..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/source.go
+++ /dev/null
@@ -1,238 +0,0 @@
-package clientgen
-
-import (
- "bytes"
- "fmt"
- "go/types"
-
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/Yamashou/gqlgenc/config"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/formatter"
-)
-
-type Source struct {
- schema *ast.Schema
- queryDocument *ast.QueryDocument
- sourceGenerator *SourceGenerator
- generateConfig *config.GenerateConfig
-}
-
-func NewSource(schema *ast.Schema, queryDocument *ast.QueryDocument, sourceGenerator *SourceGenerator, generateConfig *config.GenerateConfig) *Source {
- return &Source{
- schema: schema,
- queryDocument: queryDocument,
- sourceGenerator: sourceGenerator,
- generateConfig: generateConfig,
- }
-}
-
-type Fragment struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Fragments() ([]*Fragment, error) {
- fragments := make([]*Fragment, 0, len(s.queryDocument.Fragments))
- for _, fragment := range s.queryDocument.Fragments {
- responseFields := s.sourceGenerator.NewResponseFields(fragment.SelectionSet)
- if s.sourceGenerator.cfg.Models.Exists(fragment.Name) {
- return nil, fmt.Errorf("%s is duplicated", fragment.Name)
- }
-
- fragment := &Fragment{
- Name: fragment.Name,
- Type: responseFields.StructType(),
- }
-
- fragments = append(fragments, fragment)
- }
-
- for _, fragment := range fragments {
- name := fragment.Name
- s.sourceGenerator.cfg.Models.Add(
- name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(name)),
- )
- }
-
- return fragments, nil
-}
-
-type Operation struct {
- Name string
- ResponseStructName string
- Operation string
- Args []*Argument
- VariableDefinitions ast.VariableDefinitionList
-}
-
-func NewOperation(operation *ast.OperationDefinition, queryDocument *ast.QueryDocument, args []*Argument, generateConfig *config.GenerateConfig) *Operation {
- return &Operation{
- Name: operation.Name,
- ResponseStructName: getResponseStructName(operation, generateConfig),
- Operation: queryString(queryDocument),
- Args: args,
- VariableDefinitions: operation.VariableDefinitions,
- }
-}
-
-func (s *Source) Operations(queryDocuments []*ast.QueryDocument) ([]*Operation, error) {
- operations := make([]*Operation, 0, len(s.queryDocument.Operations))
-
- operationNames := make(map[string]struct{})
-
- queryDocumentsMap := queryDocumentMapByOperationName(queryDocuments)
- operationArgsMap := s.operationArgsMapByOperationName()
- for _, operation := range s.queryDocument.Operations {
- queryDocument := queryDocumentsMap[operation.Name]
-
- _, exist := operationNames[templates.ToGo(operation.Name)]
- if exist {
- return nil, fmt.Errorf("duplicate operation: %s", operation.Name)
- }
- operationNames[templates.ToGo(operation.Name)] = struct{}{}
-
- args := operationArgsMap[operation.Name]
- operations = append(operations, NewOperation(
- operation,
- queryDocument,
- args,
- s.generateConfig,
- ))
- }
-
- return operations, nil
-}
-
-func (s *Source) operationArgsMapByOperationName() map[string][]*Argument {
- operationArgsMap := make(map[string][]*Argument)
- for _, operation := range s.queryDocument.Operations {
- operationArgsMap[operation.Name] = s.sourceGenerator.OperationArguments(operation.VariableDefinitions)
- }
-
- return operationArgsMap
-}
-
-func queryDocumentMapByOperationName(queryDocuments []*ast.QueryDocument) map[string]*ast.QueryDocument {
- queryDocumentMap := make(map[string]*ast.QueryDocument)
- for _, queryDocument := range queryDocuments {
- operation := queryDocument.Operations[0]
- queryDocumentMap[operation.Name] = queryDocument
- }
-
- return queryDocumentMap
-}
-
-func queryString(queryDocument *ast.QueryDocument) string {
- var buf bytes.Buffer
- astFormatter := formatter.NewFormatter(&buf)
- astFormatter.FormatQueryDocument(queryDocument)
-
- return buf.String()
-}
-
-type OperationResponse struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) OperationResponses() ([]*OperationResponse, error) {
- operationResponse := make([]*OperationResponse, 0, len(s.queryDocument.Operations))
- for _, operation := range s.queryDocument.Operations {
- responseFields := s.sourceGenerator.NewResponseFields(operation.SelectionSet)
- name := getResponseStructName(operation, s.generateConfig)
- if s.sourceGenerator.cfg.Models.Exists(name) {
- return nil, fmt.Errorf("%s is duplicated", name)
- }
- operationResponse = append(operationResponse, &OperationResponse{
- Name: name,
- Type: responseFields.StructType(),
- })
- }
-
- for _, operationResponse := range operationResponse {
- name := operationResponse.Name
- s.sourceGenerator.cfg.Models.Add(
- name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(name)),
- )
- }
-
- return operationResponse, nil
-}
-
-type Query struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Query() (*Query, error) {
- fields, err := s.sourceGenerator.NewResponseFieldsByDefinition(s.schema.Query)
- if err != nil {
- return nil, fmt.Errorf("generate failed for query struct type : %w", err)
- }
-
- s.sourceGenerator.cfg.Models.Add(
- s.schema.Query.Name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(s.schema.Query.Name)),
- )
-
- return &Query{
- Name: s.schema.Query.Name,
- Type: fields.StructType(),
- }, nil
-}
-
-type Mutation struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Mutation() (*Mutation, error) {
- if s.schema.Mutation == nil {
- return nil, nil
- }
-
- fields, err := s.sourceGenerator.NewResponseFieldsByDefinition(s.schema.Mutation)
- if err != nil {
- return nil, fmt.Errorf("generate failed for mutation struct type : %w", err)
- }
-
- s.sourceGenerator.cfg.Models.Add(
- s.schema.Mutation.Name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(s.schema.Mutation.Name)),
- )
-
- return &Mutation{
- Name: s.schema.Mutation.Name,
- Type: fields.StructType(),
- }, nil
-}
-
-func getResponseStructName(operation *ast.OperationDefinition, generateConfig *config.GenerateConfig) string {
- name := operation.Name
- if generateConfig != nil {
- if generateConfig.Prefix != nil {
- if operation.Operation == ast.Mutation {
- name = fmt.Sprintf("%s%s", generateConfig.Prefix.Mutation, name)
- }
-
- if operation.Operation == ast.Query {
- name = fmt.Sprintf("%s%s", generateConfig.Prefix.Query, name)
- }
- }
-
- if generateConfig.Suffix != nil {
- if operation.Operation == ast.Mutation {
- name = fmt.Sprintf("%s%s", name, generateConfig.Suffix.Mutation)
- }
-
- if operation.Operation == ast.Query {
- name = fmt.Sprintf("%s%s", name, generateConfig.Suffix.Query)
- }
- }
- }
-
- return name
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/source_generator.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/source_generator.go
deleted file mode 100644
index a43308a3e86..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/source_generator.go
+++ /dev/null
@@ -1,231 +0,0 @@
-package clientgen
-
-import (
- "fmt"
- "go/types"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Argument struct {
- Variable string
- Type types.Type
-}
-
-type ResponseField struct {
- Name string
- IsFragmentSpread bool
- IsInlineFragment bool
- Type types.Type
- Tags []string
- ResponseFields ResponseFieldList
-}
-
-type ResponseFieldList []*ResponseField
-
-func (rs ResponseFieldList) StructType() *types.Struct {
- vars := make([]*types.Var, 0)
- structTags := make([]string, 0)
- for _, filed := range rs {
- // クエリーのフィールドの子階層がFragmentの場合、このフィールドにそのFragmentの型を追加する
- if filed.IsFragmentSpread {
- typ, ok := filed.ResponseFields.StructType().Underlying().(*types.Struct)
- if !ok {
- continue
- }
- for j := 0; j < typ.NumFields(); j++ {
- vars = append(vars, typ.Field(j))
- structTags = append(structTags, typ.Tag(j))
- }
- } else {
- vars = append(vars, types.NewVar(0, nil, templates.ToGo(filed.Name), filed.Type))
- structTags = append(structTags, strings.Join(filed.Tags, " "))
- }
- }
-
- return types.NewStruct(vars, structTags)
-}
-
-func (rs ResponseFieldList) IsFragment() bool {
- if len(rs) != 1 {
- return false
- }
-
- return rs[0].IsInlineFragment || rs[0].IsFragmentSpread
-}
-
-func (rs ResponseFieldList) IsBasicType() bool {
- return len(rs) == 0
-}
-
-func (rs ResponseFieldList) IsStructType() bool {
- return len(rs) > 0 && !rs.IsFragment()
-}
-
-type SourceGenerator struct {
- cfg *config.Config
- binder *config.Binder
- client config.PackageConfig
-}
-
-func NewSourceGenerator(cfg *config.Config, client config.PackageConfig) *SourceGenerator {
- return &SourceGenerator{
- cfg: cfg,
- binder: cfg.NewBinder(),
- client: client,
- }
-}
-
-func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet) ResponseFieldList {
- responseFields := make(ResponseFieldList, 0, len(selectionSet))
- for _, selection := range selectionSet {
- responseFields = append(responseFields, r.NewResponseField(selection))
- }
-
- return responseFields
-}
-
-func (r *SourceGenerator) NewResponseFieldsByDefinition(definition *ast.Definition) (ResponseFieldList, error) {
- fields := make(ResponseFieldList, 0, len(definition.Fields))
- for _, field := range definition.Fields {
- if field.Type.Name() == "__Schema" || field.Type.Name() == "__Type" {
- continue
- }
-
- var typ types.Type
- if field.Type.Name() == "Query" || field.Type.Name() == "Mutation" {
- var baseType types.Type
- baseType, err := r.binder.FindType(r.client.Pkg().Path(), field.Type.Name())
- if err != nil {
- if !strings.Contains(err.Error(), "unable to find type") {
- return nil, fmt.Errorf("not found type: %w", err)
- }
-
- // create new type
- baseType = types.NewPointer(types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), templates.ToGo(field.Type.Name()), nil),
- nil,
- nil,
- ))
- }
-
- // for recursive struct field in go
- typ = types.NewPointer(baseType)
- } else {
- baseType, err := r.binder.FindTypeFromName(r.cfg.Models[field.Type.Name()].Model[0])
- if err != nil {
- return nil, fmt.Errorf("not found type: %w", err)
- }
-
- typ = r.binder.CopyModifiersFromAst(field.Type, baseType)
- }
-
- tags := []string{
- fmt.Sprintf(`json:"%s"`, field.Name),
- fmt.Sprintf(`graphql:"%s"`, field.Name),
- }
-
- fields = append(fields, &ResponseField{
- Name: field.Name,
- Type: typ,
- Tags: tags,
- })
- }
-
- return fields, nil
-}
-
-func (r *SourceGenerator) NewResponseField(selection ast.Selection) *ResponseField {
- switch selection := selection.(type) {
- case *ast.Field:
- fieldsResponseFields := r.NewResponseFields(selection.SelectionSet)
-
- var baseType types.Type
- switch {
- case fieldsResponseFields.IsBasicType():
- baseType = r.Type(selection.Definition.Type.Name())
- case fieldsResponseFields.IsFragment():
- // 子フィールドがFragmentの場合はこのFragmentがフィールドの型になる
- // if a child field is fragment, this field type became fragment.
- baseType = fieldsResponseFields[0].Type
- case fieldsResponseFields.IsStructType():
- baseType = fieldsResponseFields.StructType()
- default:
- // ここにきたらバグ
- // here is bug
- panic("not match type")
- }
-
- // GraphQLの定義がオプショナルのはtypeのポインタ型が返り、配列の定義場合はポインタのスライスの型になって返ってきます
- // return pointer type then optional type or slice pointer then slice type of definition in GraphQL.
- typ := r.binder.CopyModifiersFromAst(selection.Definition.Type, baseType)
-
- tags := []string{
- fmt.Sprintf(`json:"%s"`, selection.Alias),
- fmt.Sprintf(`graphql:"%s"`, selection.Alias),
- }
-
- return &ResponseField{
- Name: selection.Alias,
- Type: typ,
- Tags: tags,
- ResponseFields: fieldsResponseFields,
- }
-
- case *ast.FragmentSpread:
- // この構造体はテンプレート側で使われることはなく、ast.FieldでFragment判定するために使用する
- fieldsResponseFields := r.NewResponseFields(selection.Definition.SelectionSet)
- typ := types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), templates.ToGo(selection.Name), nil),
- fieldsResponseFields.StructType(),
- nil,
- )
-
- return &ResponseField{
- Name: selection.Name,
- Type: typ,
- IsFragmentSpread: true,
- ResponseFields: fieldsResponseFields,
- }
-
- case *ast.InlineFragment:
- // InlineFragmentは子要素をそのままstructとしてもつので、ここで、構造体の型を作成します
- fieldsResponseFields := r.NewResponseFields(selection.SelectionSet)
-
- return &ResponseField{
- Name: selection.TypeCondition,
- Type: fieldsResponseFields.StructType(),
- IsInlineFragment: true,
- Tags: []string{fmt.Sprintf(`graphql:"... on %s"`, selection.TypeCondition)},
- ResponseFields: fieldsResponseFields,
- }
- }
-
- panic("unexpected selection type")
-}
-
-func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument {
- argumentTypes := make([]*Argument, 0, len(variableDefinitions))
- for _, v := range variableDefinitions {
- argumentTypes = append(argumentTypes, &Argument{
- Variable: v.Variable,
- Type: r.binder.CopyModifiersFromAst(v.Type, r.Type(v.Type.Name())),
- })
- }
-
- return argumentTypes
-}
-
-// Typeの引数に渡すtypeNameは解析した結果からselectionなどから求めた型の名前を渡さなければいけない
-func (r *SourceGenerator) Type(typeName string) types.Type {
- goType, err := r.binder.FindTypeFromName(r.cfg.Models[typeName].Model[0])
- if err != nil {
- // 実装として正しいtypeNameを渡していれば必ず見つかるはずなのでpanic
- panic(fmt.Sprintf("%+v", err))
- }
-
- return goType
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/template.go b/vendor/github.com/Yamashou/gqlgenc/clientgen/template.go
deleted file mode 100644
index 8a8017e79e8..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/template.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package clientgen
-
-import (
- "fmt"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- gqlgencConfig "github.com/Yamashou/gqlgenc/config"
-)
-
-func RenderTemplate(cfg *config.Config, query *Query, mutation *Mutation, fragments []*Fragment, operations []*Operation, operationResponses []*OperationResponse, generateCfg *gqlgencConfig.GenerateConfig, client config.PackageConfig) error {
- if err := templates.Render(templates.Options{
- PackageName: client.Package,
- Filename: client.Filename,
- Data: map[string]interface{}{
- "Query": query,
- "Mutation": mutation,
- "Fragment": fragments,
- "Operation": operations,
- "OperationResponse": operationResponses,
- "GenerateClient": generateCfg.ShouldGenerateClient(),
- "ClientInterfaceName": generateCfg.ClientInterfaceName,
- },
- Packages: cfg.Packages,
- PackageDoc: "// Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.\n",
- }); err != nil {
- return fmt.Errorf("%s generating failed: %w", client.Filename, err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgen/template.gotpl b/vendor/github.com/Yamashou/gqlgenc/clientgen/template.gotpl
deleted file mode 100644
index 30b2df26b04..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgen/template.gotpl
+++ /dev/null
@@ -1,75 +0,0 @@
-{{- if .GenerateClient }}
- {{ reserveImport "bytes" }}
- {{ reserveImport "context" }}
- {{ reserveImport "encoding/json" }}
- {{ reserveImport "fmt" }}
- {{ reserveImport "io" }}
- {{ reserveImport "io/ioutil" }}
- {{ reserveImport "net/http" }}
- {{ reserveImport "net/url" }}
- {{ reserveImport "path" }}
- {{ reserveImport "time" }}
-
-
- {{ reserveImport "github.com/Yamashou/gqlgenc/graphqljson" }}
- {{ reserveImport "github.com/Yamashou/gqlgenc/client" }}
-
- {{- if .ClientInterfaceName }}
- type {{ .ClientInterfaceName }} interface {
- {{- range $model := .Operation }}
- {{ $model.Name | go }} (ctx context.Context{{- range $arg := .Args }}, {{ $arg.Variable | goPrivate }} {{ $arg.Type | ref }} {{- end }}, httpRequestOptions ...client.HTTPRequestOption) (*{{ $model.ResponseStructName | go }}, error)
- {{- end }}
- }
- {{- end }}
-
- type Client struct {
- Client *client.Client
- }
-
- {{- if .ClientInterfaceName }}
- func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) {{ .ClientInterfaceName }} {
- return &Client{Client: client.NewClient(cli, baseURL, options...)}
- }
- {{- else }}
- func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) *Client {
- return &Client{Client: client.NewClient(cli, baseURL, options...)}
- }
- {{- end }}
-{{- end }}
-
-type {{ .Query.Name | go }} {{ .Query.Type | ref }}
-
-{{- if .Mutation }}
- type {{ .Mutation.Name | go }} {{ .Mutation.Type | ref }}
-{{- end }}
-
-{{- range $name, $element := .Fragment }}
- type {{ .Name | go }} {{ .Type | ref }}
-{{- end }}
-
-{{- range $name, $element := .OperationResponse }}
- type {{ .Name | go }} {{ .Type | ref }}
-{{- end }}
-
-
-
-{{- range $model := .Operation}}
- const {{ $model.Name|go }}Document = `{{ $model.Operation }}`
-
- {{- if $.GenerateClient }}
- func (c *Client) {{ $model.Name | go }} (ctx context.Context{{- range $arg := .Args }}, {{ $arg.Variable | goPrivate }} {{ $arg.Type | ref }} {{- end }}, httpRequestOptions ...client.HTTPRequestOption) (*{{ $model.ResponseStructName | go }}, error) {
- vars := map[string]interface{}{
- {{- range $args := .VariableDefinitions}}
- "{{ $args.Variable }}": {{ $args.Variable | goPrivate }},
- {{- end }}
- }
-
- var res {{ $model.ResponseStructName | go }}
- if err := c.Client.Post(ctx, "{{ $model.Name }}", {{ $model.Name|go }}Document, &res, vars, httpRequestOptions...); err != nil {
- return nil, err
- }
-
- return &res, nil
- }
- {{- end}}
-{{- end}}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/client.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/client.go
deleted file mode 100644
index 8d7ebfa1d13..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/client.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package clientgenv2
-
-import (
- "fmt"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/plugin"
- gqlgencConfig "github.com/Yamashou/gqlgenc/config"
-)
-
-var _ plugin.ConfigMutator = &Plugin{}
-
-type Plugin struct {
- queryFilePaths []string
- Client config.PackageConfig
- GenerateConfig *gqlgencConfig.GenerateConfig
-}
-
-func New(queryFilePaths []string, client config.PackageConfig, generateConfig *gqlgencConfig.GenerateConfig) *Plugin {
- return &Plugin{
- queryFilePaths: queryFilePaths,
- Client: client,
- GenerateConfig: generateConfig,
- }
-}
-
-func (p *Plugin) Name() string {
- return "clientgen"
-}
-
-func (p *Plugin) MutateConfig(cfg *config.Config) error {
- querySources, err := LoadQuerySources(p.queryFilePaths)
- if err != nil {
- return fmt.Errorf("load query sources failed: %w", err)
- }
-
- // 1. 全体のqueryDocumentを1度にparse
- // 1. Parse document from source of query
- queryDocument, err := ParseQueryDocuments(cfg.Schema, querySources)
- if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- // 2. OperationごとのqueryDocumentを作成
- // 2. Separate documents for each operation
- queryDocuments, err := QueryDocumentsByOperations(cfg.Schema, queryDocument.Operations)
- if err != nil {
- return fmt.Errorf("parse query document failed: %w", err)
- }
-
- // 3. テンプレートと情報ソースを元にコード生成
- // 3. Generate code from template and document source
- sourceGenerator := NewSourceGenerator(cfg, p.Client)
- source := NewSource(cfg.Schema, queryDocument, sourceGenerator, p.GenerateConfig)
- query, err := source.Query()
- if err != nil {
- return fmt.Errorf("generating query object: %w", err)
- }
-
- mutation, err := source.Mutation()
- if err != nil {
- return fmt.Errorf("generating mutation object: %w", err)
- }
-
- fragments, err := source.Fragments()
- if err != nil {
- return fmt.Errorf("generating fragment failed: %w", err)
- }
-
- operationResponses, err := source.OperationResponses()
- if err != nil {
- return fmt.Errorf("generating operation response failed: %w", err)
- }
-
- operations, err := source.Operations(queryDocuments)
- if err != nil {
- return fmt.Errorf("generating operation failed: %w", err)
- }
-
- if err := RenderTemplate(cfg, query, mutation, fragments, operations, operationResponses, source.ResponseSubTypes(), p.GenerateConfig, p.Client); err != nil {
- return fmt.Errorf("template failed: %w", err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query.go
deleted file mode 100644
index 3d13562cd4b..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package clientgenv2
-
-import (
- "fmt"
-
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/parser"
- "github.com/vektah/gqlparser/v2/validator"
-)
-
-func ParseQueryDocuments(schema *ast.Schema, querySources []*ast.Source) (*ast.QueryDocument, error) {
- var queryDocument ast.QueryDocument
- for _, querySource := range querySources {
- query, gqlerr := parser.ParseQuery(querySource)
- if gqlerr != nil {
- return nil, fmt.Errorf(": %w", gqlerr)
- }
-
- mergeQueryDocument(&queryDocument, query)
- }
-
- if errs := validator.Validate(schema, &queryDocument); errs != nil {
- return nil, fmt.Errorf(": %w", errs)
- }
-
- return &queryDocument, nil
-}
-
-func mergeQueryDocument(q, other *ast.QueryDocument) {
- q.Operations = append(q.Operations, other.Operations...)
- q.Fragments = append(q.Fragments, other.Fragments...)
-}
-
-func QueryDocumentsByOperations(schema *ast.Schema, operations ast.OperationList) ([]*ast.QueryDocument, error) {
- queryDocuments := make([]*ast.QueryDocument, 0, len(operations))
- for _, operation := range operations {
- fragments := fragmentsInOperationDefinition(operation)
-
- queryDocument := &ast.QueryDocument{
- Operations: ast.OperationList{operation},
- Fragments: fragments,
- Position: nil,
- }
-
- if errs := validator.Validate(schema, queryDocument); errs != nil {
- return nil, fmt.Errorf(": %w", errs)
- }
-
- queryDocuments = append(queryDocuments, queryDocument)
- }
-
- return queryDocuments, nil
-}
-
-func fragmentsInOperationDefinition(operation *ast.OperationDefinition) ast.FragmentDefinitionList {
- fragments := fragmentsInOperationWalker(operation.SelectionSet)
- uniqueFragments := fragmentsUnique(fragments)
-
- return uniqueFragments
-}
-
-func fragmentsUnique(fragments ast.FragmentDefinitionList) ast.FragmentDefinitionList {
- uniqueMap := make(map[string]*ast.FragmentDefinition)
- for _, fragment := range fragments {
- uniqueMap[fragment.Name] = fragment
- }
-
- uniqueFragments := make(ast.FragmentDefinitionList, 0, len(uniqueMap))
- for _, fragment := range uniqueMap {
- uniqueFragments = append(uniqueFragments, fragment)
- }
-
- return uniqueFragments
-}
-
-func fragmentsInOperationWalker(selectionSet ast.SelectionSet) ast.FragmentDefinitionList {
- var fragments ast.FragmentDefinitionList
- for _, selection := range selectionSet {
- var selectionSet ast.SelectionSet
- switch selection := selection.(type) {
- case *ast.Field:
- selectionSet = selection.SelectionSet
- case *ast.InlineFragment:
- selectionSet = selection.SelectionSet
- case *ast.FragmentSpread:
- fragments = append(fragments, selection.Definition)
- selectionSet = selection.Definition.SelectionSet
- }
-
- fragments = append(fragments, fragmentsInOperationWalker(selectionSet)...)
- }
-
- return fragments
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query_source.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query_source.go
deleted file mode 100644
index d7eeb0ce247..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/query_source.go
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright (c) 2020 gqlgen authors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-package clientgenv2
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "regexp"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-var path2regex = strings.NewReplacer(
- `.`, `\.`,
- `*`, `.+`,
- `\`, `[\\/]`,
- `/`, `[\\/]`,
-)
-
-// LoadQuerySourceなどは、gqlgenがLoadConfigでSchemaを読み込む時の実装をコピーして一部修正している
-// **/test/*.graphqlなどに対応している
-func LoadQuerySources(queryFileNames []string) ([]*ast.Source, error) {
- var noGlobQueryFileNames config.StringList
-
- var err error
- preGlobbing := queryFileNames
- for _, f := range preGlobbing {
- var matches []string
-
- // for ** we want to override default globbing patterns and walk all
- // subdirectories to match schema files.
- if strings.Contains(f, "**") {
- pathParts := strings.SplitN(f, "**", 2)
- rest := strings.TrimPrefix(strings.TrimPrefix(pathParts[1], `\`), `/`)
- // turn the rest of the glob into a regex, anchored only at the end because ** allows
- // for any number of dirs in between and walk will let us match against the full path name
- globRe := regexp.MustCompile(path2regex.Replace(rest) + `$`)
-
- if err := filepath.Walk(pathParts[0], func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- if globRe.MatchString(strings.TrimPrefix(path, pathParts[0])) {
- matches = append(matches, path)
- }
-
- return nil
- }); err != nil {
- return nil, fmt.Errorf("failed to walk schema at root %s: %w", pathParts[0], err)
- }
- } else {
- matches, err = filepath.Glob(f)
- if err != nil {
- return nil, fmt.Errorf("failed to glob schema filename %v: %w", f, err)
- }
- }
-
- for _, m := range matches {
- if noGlobQueryFileNames.Has(m) {
- continue
- }
-
- noGlobQueryFileNames = append(noGlobQueryFileNames, m)
- }
- }
-
- querySources := make([]*ast.Source, 0, len(noGlobQueryFileNames))
- for _, filename := range noGlobQueryFileNames {
- filename = filepath.ToSlash(filename)
- var err error
- var schemaRaw []byte
- schemaRaw, err = ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to open schema: %w", err)
- }
-
- querySources = append(querySources, &ast.Source{Name: filename, Input: string(schemaRaw)})
- }
-
- return querySources, nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source.go
deleted file mode 100644
index 4d3fa78ab06..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source.go
+++ /dev/null
@@ -1,255 +0,0 @@
-package clientgenv2
-
-import (
- "bytes"
- "fmt"
- "go/types"
-
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/Yamashou/gqlgenc/config"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/formatter"
-)
-
-type Source struct {
- schema *ast.Schema
- queryDocument *ast.QueryDocument
- sourceGenerator *SourceGenerator
- generateConfig *config.GenerateConfig
-}
-
-func NewSource(schema *ast.Schema, queryDocument *ast.QueryDocument, sourceGenerator *SourceGenerator, generateConfig *config.GenerateConfig) *Source {
- return &Source{
- schema: schema,
- queryDocument: queryDocument,
- sourceGenerator: sourceGenerator,
- generateConfig: generateConfig,
- }
-}
-
-type Fragment struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Fragments() ([]*Fragment, error) {
- fragments := make([]*Fragment, 0, len(s.queryDocument.Fragments))
- for _, fragment := range s.queryDocument.Fragments {
- responseFields := s.sourceGenerator.NewResponseFields(fragment.SelectionSet, fragment.Name)
- if s.sourceGenerator.cfg.Models.Exists(fragment.Name) {
- return nil, fmt.Errorf("%s is duplicated", fragment.Name)
- }
-
- fragment := &Fragment{
- Name: fragment.Name,
- Type: responseFields.StructType(),
- }
-
- fragments = append(fragments, fragment)
- }
-
- for _, fragment := range fragments {
- name := fragment.Name
- s.sourceGenerator.cfg.Models.Add(
- name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(name)),
- )
- }
-
- return fragments, nil
-}
-
-type Operation struct {
- Name string
- ResponseStructName string
- Operation string
- Args []*Argument
- VariableDefinitions ast.VariableDefinitionList
-}
-
-func NewOperation(operation *ast.OperationDefinition, queryDocument *ast.QueryDocument, args []*Argument, generateConfig *config.GenerateConfig) *Operation {
- return &Operation{
- Name: operation.Name,
- ResponseStructName: getResponseStructName(operation, generateConfig),
- Operation: queryString(queryDocument),
- Args: args,
- VariableDefinitions: operation.VariableDefinitions,
- }
-}
-
-func ValidateOperationList(os ast.OperationList) error {
- if err := IsUniqueName(os); err != nil {
- return fmt.Errorf("is not unique operation name: %w", err)
- }
-
- return nil
-}
-
-func IsUniqueName(os ast.OperationList) error {
- operationNames := make(map[string]struct{})
- for _, operation := range os {
- _, exist := operationNames[templates.ToGo(operation.Name)]
- if exist {
- return fmt.Errorf("duplicate operation: %s", operation.Name)
- }
- }
-
- return nil
-}
-
-func (s *Source) Operations(queryDocuments []*ast.QueryDocument) ([]*Operation, error) {
- operations := make([]*Operation, 0, len(s.queryDocument.Operations))
-
- queryDocumentsMap := queryDocumentMapByOperationName(queryDocuments)
- operationArgsMap := s.operationArgsMapByOperationName()
-
- if err := ValidateOperationList(s.queryDocument.Operations); err != nil {
- return nil, fmt.Errorf("validation error: %w", err)
- }
-
- for _, operation := range s.queryDocument.Operations {
- queryDocument := queryDocumentsMap[operation.Name]
-
- args := operationArgsMap[operation.Name]
- operations = append(operations, NewOperation(
- operation,
- queryDocument,
- args,
- s.generateConfig,
- ))
- }
-
- return operations, nil
-}
-
-func (s *Source) operationArgsMapByOperationName() map[string][]*Argument {
- operationArgsMap := make(map[string][]*Argument)
- for _, operation := range s.queryDocument.Operations {
- operationArgsMap[operation.Name] = s.sourceGenerator.OperationArguments(operation.VariableDefinitions)
- }
-
- return operationArgsMap
-}
-
-func queryDocumentMapByOperationName(queryDocuments []*ast.QueryDocument) map[string]*ast.QueryDocument {
- queryDocumentMap := make(map[string]*ast.QueryDocument)
- for _, queryDocument := range queryDocuments {
- operation := queryDocument.Operations[0]
- queryDocumentMap[operation.Name] = queryDocument
- }
-
- return queryDocumentMap
-}
-
-func queryString(queryDocument *ast.QueryDocument) string {
- var buf bytes.Buffer
- astFormatter := formatter.NewFormatter(&buf)
- astFormatter.FormatQueryDocument(queryDocument)
-
- return buf.String()
-}
-
-type OperationResponse struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) OperationResponses() ([]*OperationResponse, error) {
- operationResponse := make([]*OperationResponse, 0, len(s.queryDocument.Operations))
- for _, operation := range s.queryDocument.Operations {
- responseFields := s.sourceGenerator.NewResponseFields(operation.SelectionSet, operation.Name)
- name := getResponseStructName(operation, s.generateConfig)
- if s.sourceGenerator.cfg.Models.Exists(name) {
- return nil, fmt.Errorf("%s is duplicated", name)
- }
- operationResponse = append(operationResponse, &OperationResponse{
- Name: name,
- Type: responseFields.StructType(),
- })
- }
-
- for _, operationResponse := range operationResponse {
- name := operationResponse.Name
- s.sourceGenerator.cfg.Models.Add(
- name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(name)),
- )
- }
-
- return operationResponse, nil
-}
-
-func (s *Source) ResponseSubTypes() []*StructSource {
- return s.sourceGenerator.StructSources
-}
-
-type Query struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Query() (*Query, error) {
- fields, err := s.sourceGenerator.NewResponseFieldsByDefinition(s.schema.Query)
- if err != nil {
- return nil, fmt.Errorf("generate failed for query struct type : %w", err)
- }
-
- s.sourceGenerator.cfg.Models.Add(
- s.schema.Query.Name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(s.schema.Query.Name)),
- )
-
- return &Query{
- Name: s.schema.Query.Name,
- Type: fields.StructType(),
- }, nil
-}
-
-type Mutation struct {
- Name string
- Type types.Type
-}
-
-func (s *Source) Mutation() (*Mutation, error) {
- fields, err := s.sourceGenerator.NewResponseFieldsByDefinition(s.schema.Mutation)
- if err != nil {
- return nil, fmt.Errorf("generate failed for mutation struct type : %w", err)
- }
-
- s.sourceGenerator.cfg.Models.Add(
- s.schema.Mutation.Name,
- fmt.Sprintf("%s.%s", s.sourceGenerator.client.Pkg(), templates.ToGo(s.schema.Mutation.Name)),
- )
-
- return &Mutation{
- Name: s.schema.Mutation.Name,
- Type: fields.StructType(),
- }, nil
-}
-
-func getResponseStructName(operation *ast.OperationDefinition, generateConfig *config.GenerateConfig) string {
- name := operation.Name
- if generateConfig != nil {
- if generateConfig.Prefix != nil {
- if operation.Operation == ast.Mutation {
- name = fmt.Sprintf("%s%s", generateConfig.Prefix.Mutation, name)
- }
-
- if operation.Operation == ast.Query {
- name = fmt.Sprintf("%s%s", generateConfig.Prefix.Query, name)
- }
- }
-
- if generateConfig.Suffix != nil {
- if operation.Operation == ast.Mutation {
- name = fmt.Sprintf("%s%s", name, generateConfig.Suffix.Mutation)
- }
-
- if operation.Operation == ast.Query {
- name = fmt.Sprintf("%s%s", name, generateConfig.Suffix.Query)
- }
- }
- }
-
- return name
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source_generator.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source_generator.go
deleted file mode 100644
index 4b8a80d06d0..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/source_generator.go
+++ /dev/null
@@ -1,289 +0,0 @@
-package clientgenv2
-
-import (
- "fmt"
- "go/types"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-type Argument struct {
- Variable string
- Type types.Type
-}
-
-type ResponseField struct {
- Name string
- IsFragmentSpread bool
- IsInlineFragment bool
- Type types.Type
- Tags []string
- ResponseFields ResponseFieldList
-}
-
-type ResponseFieldList []*ResponseField
-
-func (rs ResponseFieldList) IsFragmentSpread() bool {
- if len(rs) != 1 {
- return false
- }
-
- return rs[0].IsFragmentSpread
-}
-
-func (rs ResponseFieldList) StructType() *types.Struct {
- vars := make([]*types.Var, 0)
- structTags := make([]string, 0)
- for _, filed := range rs {
- // クエリーのフィールドの子階層がFragmentの場合、このフィールドにそのFragmentの型を追加する
- if filed.IsFragmentSpread {
- typ, ok := filed.ResponseFields.StructType().Underlying().(*types.Struct)
- if !ok {
- continue
- }
- for j := 0; j < typ.NumFields(); j++ {
- vars = append(vars, typ.Field(j))
- structTags = append(structTags, typ.Tag(j))
- }
- } else {
- vars = append(vars, types.NewVar(0, nil, templates.ToGo(filed.Name), filed.Type))
- structTags = append(structTags, strings.Join(filed.Tags, " "))
- }
- }
-
- return types.NewStruct(vars, structTags)
-}
-
-func (rs ResponseFieldList) IsFragment() bool {
- if len(rs) != 1 {
- return false
- }
-
- return rs[0].IsInlineFragment || rs[0].IsFragmentSpread
-}
-
-func (rs ResponseFieldList) IsBasicType() bool {
- return len(rs) == 0
-}
-
-func (rs ResponseFieldList) IsStructType() bool {
- return len(rs) > 0 && !rs.IsFragment()
-}
-
-type StructSource struct {
- Name string
- Type types.Type
-}
-
-type SourceGenerator struct {
- cfg *config.Config
- binder *config.Binder
- client config.PackageConfig
- StructSources []*StructSource
-}
-
-func NewSourceGenerator(cfg *config.Config, client config.PackageConfig) *SourceGenerator {
- return &SourceGenerator{
- cfg: cfg,
- binder: cfg.NewBinder(),
- client: client,
- StructSources: []*StructSource{},
- }
-}
-
-func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet, typeName string) ResponseFieldList {
- responseFields := make(ResponseFieldList, 0, len(selectionSet))
- for _, selection := range selectionSet {
- responseFields = append(responseFields, r.NewResponseField(selection, typeName))
- }
-
- return responseFields
-}
-
-func (r *SourceGenerator) NewResponseFieldsByDefinition(definition *ast.Definition) (ResponseFieldList, error) {
- fields := make(ResponseFieldList, 0, len(definition.Fields))
- for _, field := range definition.Fields {
- if field.Type.Name() == "__Schema" || field.Type.Name() == "__Type" {
- continue
- }
-
- var typ types.Type
- if field.Type.Name() == "Query" || field.Type.Name() == "Mutation" {
- var baseType types.Type
- baseType, err := r.binder.FindType(r.client.Pkg().Path(), field.Type.Name())
- if err != nil {
- if !strings.Contains(err.Error(), "unable to find type") {
- return nil, fmt.Errorf("not found type: %w", err)
- }
-
- // create new type
- baseType = types.NewPointer(types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), templates.ToGo(field.Type.Name()), nil),
- nil,
- nil,
- ))
- }
-
- // for recursive struct field in go
- typ = types.NewPointer(baseType)
- } else {
- baseType, err := r.binder.FindTypeFromName(r.cfg.Models[field.Type.Name()].Model[0])
- if err != nil {
- return nil, fmt.Errorf("not found type: %w", err)
- }
-
- typ = r.binder.CopyModifiersFromAst(field.Type, baseType)
- }
-
- var tags []string
- if !field.Type.NonNull {
- tags = append(tags, fmt.Sprintf(`json:"%s,omitempty"`, field.Name), fmt.Sprintf(`graphql:"%s"`, field.Name))
- } else {
- tags = append(tags, fmt.Sprintf(`json:"%s"`, field.Name), fmt.Sprintf(`graphql:"%s"`, field.Name))
- }
-
- fields = append(fields, &ResponseField{
- Name: field.Name,
- Type: typ,
- Tags: tags,
- })
- }
-
- return fields, nil
-}
-
-func NewLayerTypeName(base, thisField string) string {
- return fmt.Sprintf("%s_%s", base, thisField)
-}
-
-func (r *SourceGenerator) NewResponseField(selection ast.Selection, typeName string) *ResponseField {
- switch selection := selection.(type) {
- case *ast.Field:
- typeName = NewLayerTypeName(typeName, templates.ToGo(selection.Alias))
- fieldsResponseFields := r.NewResponseFields(selection.SelectionSet, typeName)
-
- var baseType types.Type
- switch {
- case fieldsResponseFields.IsBasicType():
- baseType = r.Type(selection.Definition.Type.Name())
- case fieldsResponseFields.IsFragment():
- // 子フィールドがFragmentの場合はこのFragmentがフィールドの型になる
- // if a child field is fragment, this field type became fragment.
- baseType = fieldsResponseFields[0].Type
- case fieldsResponseFields.IsStructType():
- structType := fieldsResponseFields.StructType()
- r.StructSources = append(r.StructSources, &StructSource{
- Name: typeName,
- Type: structType,
- })
- baseType = types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), typeName, nil),
- structType,
- nil,
- )
- default:
- // ここにきたらバグ
- // here is bug
- panic("not match type")
- }
-
- // GraphQLの定義がオプショナルのはtypeのポインタ型が返り、配列の定義場合はポインタのスライスの型になって返ってきます
- // return pointer type then optional type or slice pointer then slice type of definition in GraphQL.
- typ := r.binder.CopyModifiersFromAst(selection.Definition.Type, baseType)
-
- tags := []string{
- fmt.Sprintf(`json:"%s"`, selection.Alias),
- fmt.Sprintf(`graphql:"%s"`, selection.Alias),
- }
-
- return &ResponseField{
- Name: selection.Alias,
- Type: typ,
- Tags: tags,
- ResponseFields: fieldsResponseFields,
- }
-
- case *ast.FragmentSpread:
- // この構造体はテンプレート側で使われることはなく、ast.FieldでFragment判定するために使用する
- fieldsResponseFields := r.NewResponseFields(selection.Definition.SelectionSet, NewLayerTypeName(typeName, templates.ToGo(selection.Name)))
- baseType := types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), templates.ToGo(selection.Name), nil),
- fieldsResponseFields.StructType(),
- nil,
- )
-
- return &ResponseField{
- Name: selection.Name,
- Type: types.NewPointer(baseType),
- IsFragmentSpread: true,
- ResponseFields: fieldsResponseFields,
- }
-
- case *ast.InlineFragment:
- // InlineFragmentは子要素をそのままstructとしてもつので、ここで、構造体の型を作成します
- name := NewLayerTypeName(typeName, templates.ToGo(selection.TypeCondition))
- fieldsResponseFields := r.NewResponseFields(selection.SelectionSet, name)
-
- if fieldsResponseFields.IsFragmentSpread() {
- typ := types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), templates.ToGo(fieldsResponseFields[0].Name), nil),
- fieldsResponseFields.StructType(),
- nil,
- )
-
- return &ResponseField{
- Name: selection.TypeCondition,
- Type: typ,
- Tags: []string{fmt.Sprintf(`graphql:"... on %s"`, selection.TypeCondition)},
- ResponseFields: fieldsResponseFields,
- }
- }
-
- structType := fieldsResponseFields.StructType()
- r.StructSources = append(r.StructSources, &StructSource{
- Name: name,
- Type: structType,
- })
- typ := types.NewNamed(
- types.NewTypeName(0, r.client.Pkg(), name, nil),
- structType,
- nil,
- )
-
- return &ResponseField{
- Name: selection.TypeCondition,
- Type: typ,
- IsInlineFragment: true,
- Tags: []string{fmt.Sprintf(`graphql:"... on %s"`, selection.TypeCondition)},
- ResponseFields: fieldsResponseFields,
- }
- }
-
- panic("unexpected selection type")
-}
-
-func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument {
- argumentTypes := make([]*Argument, 0, len(variableDefinitions))
- for _, v := range variableDefinitions {
- argumentTypes = append(argumentTypes, &Argument{
- Variable: v.Variable,
- Type: r.binder.CopyModifiersFromAst(v.Type, r.Type(v.Type.Name())),
- })
- }
-
- return argumentTypes
-}
-
-// Typeの引数に渡すtypeNameは解析した結果からselectionなどから求めた型の名前を渡さなければいけない
-func (r *SourceGenerator) Type(typeName string) types.Type {
- goType, err := r.binder.FindTypeFromName(r.cfg.Models[typeName].Model[0])
- if err != nil {
- // 実装として正しいtypeNameを渡していれば必ず見つかるはずなのでpanic
- panic(fmt.Sprintf("%+v", err))
- }
-
- return goType
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.go b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.go
deleted file mode 100644
index 156ea0de650..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package clientgenv2
-
-import (
-
- // nolint:golint, nolintlint
- _ "embed"
- "fmt"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/codegen/templates"
- gqlgencConfig "github.com/Yamashou/gqlgenc/config"
-)
-
-//go:embed template.gotpl
-var template string
-
-func RenderTemplate(cfg *config.Config, query *Query, mutation *Mutation, fragments []*Fragment, operations []*Operation, operationResponses []*OperationResponse, structSources []*StructSource, generateCfg *gqlgencConfig.GenerateConfig, client config.PackageConfig) error {
- if err := templates.Render(templates.Options{
- PackageName: client.Package,
- Filename: client.Filename,
- Template: template,
- Data: map[string]interface{}{
- "Query": query,
- "Mutation": mutation,
- "Fragment": fragments,
- "Operation": operations,
- "OperationResponse": operationResponses,
- "GenerateClient": generateCfg.ShouldGenerateClient(),
- "StructSources": structSources,
- "ClientInterfaceName": generateCfg.GetClientInterfaceName(),
- },
- Packages: cfg.Packages,
- PackageDoc: "// Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.\n",
- }); err != nil {
- return fmt.Errorf("%s generating failed: %w", client.Filename, err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.gotpl b/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.gotpl
deleted file mode 100644
index fbb6167e78a..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/clientgenv2/template.gotpl
+++ /dev/null
@@ -1,73 +0,0 @@
-{{- if .GenerateClient }}
- {{ reserveImport "bytes" }}
- {{ reserveImport "context" }}
- {{ reserveImport "encoding/json" }}
- {{ reserveImport "fmt" }}
- {{ reserveImport "io" }}
- {{ reserveImport "io/ioutil" }}
- {{ reserveImport "net/http" }}
- {{ reserveImport "net/url" }}
- {{ reserveImport "path" }}
- {{ reserveImport "time" }}
-
-
- {{ reserveImport "github.com/Yamashou/gqlgenc/graphqljson" }}
- {{ reserveImport "github.com/Yamashou/gqlgenc/clientv2" }}
-
-
- {{- if .ClientInterfaceName }}
- type {{ .ClientInterfaceName }} interface {
- {{- range $model := .Operation }}
- {{ $model.Name | go }} (ctx context.Context{{- range $arg := .Args }}, {{ $arg.Variable | goPrivate }} {{ $arg.Type | ref }} {{- end }}, interceptors ...clientv2.RequestInterceptor) (*{{ $model.ResponseStructName | go }}, error)
- {{- end }}
- }
- {{- end }}
-
- type Client struct {
- Client *clientv2.Client
- }
-
- func NewClient(cli *http.Client, baseURL string, interceptors ...clientv2.RequestInterceptor) {{- if .ClientInterfaceName }} {{ .ClientInterfaceName }} {{- else }} *Client {{- end }} {
- return &Client{Client: clientv2.NewClient(cli, baseURL, interceptors...)}
- }
-
-{{- end }}
-
-type {{ .Query.Name | go }} {{ .Query.Type | ref }}
-
-{{- if .Mutation }}
- type {{ .Mutation.Name | go }} {{ .Mutation.Type | ref }}
-{{- end }}
-
-{{- range $name, $element := .Fragment }}
- type {{ .Name | go }} {{ .Type | ref }}
-{{- end }}
-
-{{- range $name, $element := .StructSources }}
- type {{ .Name }} {{ .Type | ref }}
-{{- end}}
-
-{{- range $name, $element := .OperationResponse }}
- type {{ .Name | go }} {{ .Type | ref }}
-{{- end }}
-
-{{- range $model := .Operation}}
- const {{ $model.Name|go }}Document = `{{ $model.Operation }}`
-
- {{- if $.GenerateClient }}
- func (c *Client) {{ $model.Name|go }} (ctx context.Context{{- range $arg := .Args }}, {{ $arg.Variable | goPrivate }} {{ $arg.Type | ref }} {{- end }}, interceptors ...clientv2.RequestInterceptor) (*{{ $model.ResponseStructName | go }}, error) {
- vars := map[string]interface{}{
- {{- range $args := .VariableDefinitions}}
- "{{ $args.Variable }}": {{ $args.Variable | goPrivate }},
- {{- end }}
- }
-
- var res {{ $model.ResponseStructName | go }}
- if err := c.Client.Post(ctx, "{{ $model.Name }}", {{ $model.Name|go }}Document, &res, vars, interceptors...); err != nil {
- return nil, err
- }
-
- return &res, nil
- }
- {{- end}}
-{{- end}}
diff --git a/vendor/github.com/Yamashou/gqlgenc/config/config.go b/vendor/github.com/Yamashou/gqlgenc/config/config.go
deleted file mode 100644
index 2ac49a2a1e2..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/config/config.go
+++ /dev/null
@@ -1,311 +0,0 @@
-package config
-
-import (
- "context"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "path/filepath"
- "regexp"
- "strings"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/Yamashou/gqlgenc/client"
- "github.com/Yamashou/gqlgenc/introspection"
- "github.com/vektah/gqlparser/v2"
- "github.com/vektah/gqlparser/v2/ast"
- "github.com/vektah/gqlparser/v2/validator"
- "gopkg.in/yaml.v2"
-)
-
-// Config extends the gqlgen basic config
-// and represents the config file
-type Config struct {
- SchemaFilename StringList `yaml:"schema,omitempty"`
- Model config.PackageConfig `yaml:"model,omitempty"`
- Client config.PackageConfig `yaml:"client,omitempty"`
- Models config.TypeMap `yaml:"models,omitempty"`
- Endpoint *EndPointConfig `yaml:"endpoint,omitempty"`
- Generate *GenerateConfig `yaml:"generate,omitempty"`
-
- Query []string `yaml:"query"`
-
- // gqlgen config struct
- GQLConfig *config.Config `yaml:"-"`
-}
-
-var cfgFilenames = []string{".gqlgenc.yml", "gqlgenc.yml", "gqlgenc.yaml"}
-
-// StringList is a simple array of strings
-type StringList []string
-
-// Has checks if the strings array has a give value
-func (a StringList) Has(file string) bool {
- for _, existing := range a {
- if existing == file {
- return true
- }
- }
-
- return false
-}
-
-// LoadConfigFromDefaultLocations looks for a config file in the current directory, and all parent directories
-// walking up the tree. The closest config file will be returned.
-func LoadConfigFromDefaultLocations() (*Config, error) {
- cfgFile, err := findCfg()
- if err != nil {
- return nil, err
- }
-
- err = os.Chdir(filepath.Dir(cfgFile))
- if err != nil {
- return nil, fmt.Errorf("unable to enter config dir: %w", err)
- }
-
- return LoadConfig(cfgFile)
-}
-
-// EndPointConfig are the allowed options for the 'endpoint' config
-type EndPointConfig struct {
- URL string `yaml:"url"`
- Headers map[string]string `yaml:"headers,omitempty"`
-}
-
-// findCfg searches for the config file in this directory and all parents up the tree
-// looking for the closest match
-func findCfg() (string, error) {
- dir, err := os.Getwd()
- if err != nil {
- return "", fmt.Errorf("unable to get working dir to findCfg: %w", err)
- }
-
- cfg := findCfgInDir(dir)
-
- for cfg == "" && dir != filepath.Dir(dir) {
- dir = filepath.Dir(dir)
- cfg = findCfgInDir(dir)
- }
-
- if cfg == "" {
- return "", os.ErrNotExist
- }
-
- return cfg, nil
-}
-
-func findCfgInDir(dir string) string {
- for _, cfgName := range cfgFilenames {
- path := filepath.Join(dir, cfgName)
- if _, err := os.Stat(path); err == nil {
- return path
- }
- }
-
- return ""
-}
-
-var path2regex = strings.NewReplacer(
- `.`, `\.`,
- `*`, `.+`,
- `\`, `[\\/]`,
- `/`, `[\\/]`,
-)
-
-// LoadConfig loads and parses the config gqlgenc config
-func LoadConfig(filename string) (*Config, error) {
- var cfg Config
- b, err := ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to read config: %w", err)
- }
-
- confContent := []byte(os.ExpandEnv(string(b)))
- if err := yaml.UnmarshalStrict(confContent, &cfg); err != nil {
- return nil, fmt.Errorf("unable to parse config: %w", err)
- }
-
- if cfg.SchemaFilename != nil && cfg.Endpoint != nil {
- return nil, fmt.Errorf("'schema' and 'endpoint' both specified. Use schema to load from a local file, use endpoint to load from a remote server (using introspection)")
- }
-
- if cfg.SchemaFilename == nil && cfg.Endpoint == nil {
- return nil, fmt.Errorf("neither 'schema' nor 'endpoint' specified. Use schema to load from a local file, use endpoint to load from a remote server (using introspection)")
- }
-
- // https://github.com/99designs/gqlgen/blob/3a31a752df764738b1f6e99408df3b169d514784/codegen/config/config.go#L120
- for _, f := range cfg.SchemaFilename {
- var matches []string
-
- // for ** we want to override default globbing patterns and walk all
- // subdirectories to match schema files.
- if strings.Contains(f, "**") {
- pathParts := strings.SplitN(f, "**", 2)
- rest := strings.TrimPrefix(strings.TrimPrefix(pathParts[1], `\`), `/`)
- // turn the rest of the glob into a regex, anchored only at the end because ** allows
- // for any number of dirs in between and walk will let us match against the full path name
- globRe := regexp.MustCompile(path2regex.Replace(rest) + `$`)
-
- if err := filepath.Walk(pathParts[0], func(path string, info os.FileInfo, err error) error {
- if err != nil {
- return err
- }
-
- if globRe.MatchString(strings.TrimPrefix(path, pathParts[0])) {
- matches = append(matches, path)
- }
-
- return nil
- }); err != nil {
- return nil, fmt.Errorf("failed to walk schema at root %s: %w", pathParts[0], err)
- }
- } else {
- matches, err = filepath.Glob(f)
- if err != nil {
- return nil, fmt.Errorf("failed to glob schema filename %s: %w", f, err)
- }
- }
-
- files := StringList{}
- for _, m := range matches {
- if !files.Has(m) {
- files = append(files, m)
- }
- }
-
- cfg.SchemaFilename = files
- }
-
- models := make(config.TypeMap)
- if cfg.Models != nil {
- models = cfg.Models
- }
-
- sources := []*ast.Source{}
-
- for _, filename := range cfg.SchemaFilename {
- filename = filepath.ToSlash(filename)
- var err error
- var schemaRaw []byte
- schemaRaw, err = ioutil.ReadFile(filename)
- if err != nil {
- return nil, fmt.Errorf("unable to open schema: %w", err)
- }
-
- sources = append(sources, &ast.Source{Name: filename, Input: string(schemaRaw)})
- }
-
- cfg.GQLConfig = &config.Config{
- Model: cfg.Model,
- Models: models,
- // TODO: gqlgen must be set exec but client not used
- Exec: config.ExecConfig{Filename: "generated.go"},
- Directives: map[string]config.DirectiveConfig{},
- Sources: sources,
- }
-
- if err := cfg.Client.Check(); err != nil {
- return nil, fmt.Errorf("config.exec: %w", err)
- }
-
- return &cfg, nil
-}
-
-// LoadSchema load and parses the schema from a local file or a remote server
-func (c *Config) LoadSchema(ctx context.Context) error {
- var schema *ast.Schema
-
- if c.SchemaFilename != nil {
- s, err := c.loadLocalSchema()
- if err != nil {
- return fmt.Errorf("load local schema failed: %w", err)
- }
-
- schema = s
- } else {
- s, err := c.loadRemoteSchema(ctx)
- if err != nil {
- return fmt.Errorf("load remote schema failed: %w", err)
- }
-
- schema = s
- }
-
- if schema.Query == nil {
- schema.Query = &ast.Definition{
- Kind: ast.Object,
- Name: "Query",
- }
- schema.Types["Query"] = schema.Query
- }
-
- c.GQLConfig.Schema = schema
-
- return nil
-}
-
-func (c *Config) loadRemoteSchema(ctx context.Context) (*ast.Schema, error) {
- addHeader := func(req *http.Request) {
- for key, value := range c.Endpoint.Headers {
- req.Header.Set(key, value)
- }
- }
- gqlclient := client.NewClient(http.DefaultClient, c.Endpoint.URL, addHeader)
-
- var res introspection.Query
- if err := gqlclient.Post(ctx, "Query", introspection.Introspection, &res, nil); err != nil {
- return nil, fmt.Errorf("introspection query failed: %w", err)
- }
-
- schema, err := validator.ValidateSchemaDocument(introspection.ParseIntrospectionQuery(c.Endpoint.URL, res))
- if err != nil {
- return nil, fmt.Errorf("validation error: %w", err)
- }
-
- return schema, nil
-}
-
-func (c *Config) loadLocalSchema() (*ast.Schema, error) {
- schema, err := gqlparser.LoadSchema(c.GQLConfig.Sources...)
- if err != nil {
- return nil, err
- }
-
- return schema, nil
-}
-
-type GenerateConfig struct {
- Prefix *NamingConfig `yaml:"prefix,omitempty"`
- Suffix *NamingConfig `yaml:"suffix,omitempty"`
- UnamedPattern string `yaml:"unamedPattern,omitempty"`
- Client *bool `yaml:"client,omitempty"`
- ClientInterfaceName *string `yaml:"clientInterfaceName,omitempty"`
- // if true, used client v2 in generate code
- ClientV2 bool `yaml:"clientV2,omitempty"`
-}
-
-func (c *GenerateConfig) ShouldGenerateClient() bool {
- if c == nil {
- return true
- }
-
- if c.Client != nil && !*c.Client {
- return false
- }
-
- return true
-}
-
-func (c *GenerateConfig) GetClientInterfaceName() *string {
- if c == nil {
- return nil
- }
-
- return c.ClientInterfaceName
-}
-
-type NamingConfig struct {
- Query string `yaml:"query,omitempty"`
- Mutation string `yaml:"mutation,omitempty"`
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/generator/generater.go b/vendor/github.com/Yamashou/gqlgenc/generator/generater.go
deleted file mode 100644
index 7c803ae54b2..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/generator/generater.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package generator
-
-import (
- "context"
- "fmt"
-
- "github.com/99designs/gqlgen/api"
- codegenconfig "github.com/99designs/gqlgen/codegen/config"
- "github.com/99designs/gqlgen/plugin"
- "github.com/99designs/gqlgen/plugin/modelgen"
- "github.com/Yamashou/gqlgenc/config"
-)
-
-// mutateHook adds the "omitempty" option to nilable fields.
-// For more info see https://github.com/99designs/gqlgen/blob/master/docs/content/recipes/modelgen-hook.md
-func mutateHook(build *modelgen.ModelBuild) *modelgen.ModelBuild {
- for _, model := range build.Models {
- for _, field := range model.Fields {
- field.Tag = `json:"` + field.Name
- if codegenconfig.IsNilable(field.Type) {
- field.Tag += ",omitempty"
- }
- field.Tag += `"`
- }
- }
-
- return build
-}
-
-func Generate(ctx context.Context, cfg *config.Config, option ...api.Option) error {
- var plugins []plugin.Plugin
- if cfg.Model.IsDefined() {
- p := modelgen.Plugin{
- MutateHook: mutateHook,
- }
- plugins = append(plugins, &p)
- }
- for _, o := range option {
- o(cfg.GQLConfig, &plugins)
- }
-
- if err := cfg.LoadSchema(ctx); err != nil {
- return fmt.Errorf("failed to load schema: %w", err)
- }
-
- if err := cfg.GQLConfig.Init(); err != nil {
- return fmt.Errorf("generating core failed: %w", err)
- }
-
- for _, p := range plugins {
- if mut, ok := p.(plugin.ConfigMutator); ok {
- err := mut.MutateConfig(cfg.GQLConfig)
- if err != nil {
- return fmt.Errorf("%s failed: %w", p.Name(), err)
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/graphqljson/graphql.go b/vendor/github.com/Yamashou/gqlgenc/graphqljson/graphql.go
deleted file mode 100644
index d41e4c56578..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/graphqljson/graphql.go
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
-MIT License
-
-Copyright (c) 2017 Dmitri Shuralyov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-// Package graphqljson provides a function for decoding JSON
-// into a GraphQL query data structure.
-package graphqljson
-
-import (
- "bytes"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "reflect"
- "strings"
-)
-
-// Reference: https://blog.gopheracademy.com/advent-2017/custom-json-unmarshaler-for-graphql-client/
-
-// UnmarshalData parses the JSON-encoded GraphQL response data and stores
-// the result in the GraphQL query data structure pointed to by v.
-//
-// The implementation is created on top of the JSON tokenizer available
-// in "encoding/json".Decoder.
-func UnmarshalData(data json.RawMessage, v interface{}) error {
- d := newDecoder(bytes.NewBuffer(data))
- if err := d.Decode(v); err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- // TODO: この処理が本当に必要かは今後検討
- tok, err := d.jsonDecoder.Token()
- switch err {
- case io.EOF:
- // Expect to get io.EOF. There shouldn't be any more
- // tokens left after we've decoded v successfully.
- return nil
- case nil:
- return fmt.Errorf("invalid token '%v' after top-level value", tok)
- }
-
- return fmt.Errorf("invalid token '%v' after top-level value", tok)
-}
-
-// Decoder is a JSON Decoder that performs custom unmarshaling behavior
-// for GraphQL query data structures. It's implemented on top of a JSON tokenizer.
-type Decoder struct {
- jsonDecoder *json.Decoder
-
- // Stack of what part of input JSON we're in the middle of - objects, arrays.
- parseState []json.Delim
-
- // Stacks of values where to unmarshal.
- // The top of each stack is the reflect.Value where to unmarshal next JSON value.
- //
- // The reason there's more than one stack is because we might be unmarshaling
- // a single JSON value into multiple GraphQL fragments or embedded structs, so
- // we keep track of them all.
- vs [][]reflect.Value
-}
-
-func newDecoder(r io.Reader) *Decoder {
- jsonDecoder := json.NewDecoder(r)
- jsonDecoder.UseNumber()
-
- return &Decoder{
- jsonDecoder: jsonDecoder,
- }
-}
-
-// Decode decodes a single JSON value from d.tokenizer into v.
-func (d *Decoder) Decode(v interface{}) error {
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr {
- return fmt.Errorf("cannot decode into non-pointer %T", v)
- }
-
- d.vs = [][]reflect.Value{{rv.Elem()}}
- if err := d.decode(); err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- return nil
-}
-
-// decode decodes a single JSON value from d.tokenizer into d.vs.
-func (d *Decoder) decode() error {
- // The loop invariant is that the top of each d.vs stack
- // is where we try to unmarshal the next JSON value we see.
- for len(d.vs) > 0 {
- tok, err := d.jsonDecoder.Token()
- if err == io.EOF {
- return errors.New("unexpected end of JSON input")
- } else if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- switch {
- // Are we inside an object and seeing next key (rather than end of object)?
- case d.state() == '{' && tok != json.Delim('}'):
- key, ok := tok.(string)
- if !ok {
- return errors.New("unexpected non-key in JSON input")
- }
-
- // The last matching one is the one considered
- var matchingFieldValue *reflect.Value
- for i := range d.vs {
- v := d.vs[i][len(d.vs[i])-1]
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- var f reflect.Value
- if v.Kind() == reflect.Struct {
- f = fieldByGraphQLName(v, key)
- if f.IsValid() {
- matchingFieldValue = &f
- }
- }
- d.vs[i] = append(d.vs[i], f)
- }
- if matchingFieldValue == nil {
- return fmt.Errorf("struct field for %q doesn't exist in any of %v places to unmarshal", key, len(d.vs))
- }
-
- // We've just consumed the current token, which was the key.
- // Read the next token, which should be the value.
- // If it's of json.RawMessage type, decode the value.
- if matchingFieldValue.Type() == reflect.TypeOf(json.RawMessage{}) {
- var data json.RawMessage
- err = d.jsonDecoder.Decode(&data)
- tok = data
- } else {
- tok, err = d.jsonDecoder.Token()
- }
-
- if err == io.EOF {
- return errors.New("unexpected end of JSON input")
- } else if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- // Are we inside an array and seeing next value (rather than end of array)?
- case d.state() == '[' && tok != json.Delim(']'):
- someSliceExist := false
- for i := range d.vs {
- v := d.vs[i][len(d.vs[i])-1]
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- var f reflect.Value
- if v.Kind() == reflect.Slice {
- v.Set(reflect.Append(v, reflect.Zero(v.Type().Elem()))) // v = append(v, T).
- f = v.Index(v.Len() - 1)
- someSliceExist = true
- }
- d.vs[i] = append(d.vs[i], f)
- }
- if !someSliceExist {
- return fmt.Errorf("slice doesn't exist in any of %v places to unmarshal", len(d.vs))
- }
- }
-
- switch tok := tok.(type) {
- case string, json.Number, bool, nil, json.RawMessage:
- // Value.
-
- for i := range d.vs {
- v := d.vs[i][len(d.vs[i])-1]
- if !v.IsValid() {
- continue
- }
- err := unmarshalValue(tok, v)
- if err != nil {
- return fmt.Errorf(": %w", err)
- }
- }
- d.popAllVs()
-
- case json.Delim:
- switch tok {
- case '{':
- // Start of object.
-
- d.pushState(tok)
-
- frontier := make([]reflect.Value, len(d.vs)) // Places to look for GraphQL fragments/embedded structs.
- for i := range d.vs {
- v := d.vs[i][len(d.vs[i])-1]
- frontier[i] = v
- // TODO: Do this recursively or not? Add a test case if needed.
- if v.Kind() == reflect.Ptr && v.IsNil() {
- v.Set(reflect.New(v.Type().Elem())) // v = new(T).
- }
- }
- // Find GraphQL fragments/embedded structs recursively, adding to frontier
- // as new ones are discovered and exploring them further.
- for len(frontier) > 0 {
- v := frontier[0]
- frontier = frontier[1:]
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- if v.Kind() != reflect.Struct {
- continue
- }
- for i := 0; i < v.NumField(); i++ {
- if isGraphQLFragment(v.Type().Field(i)) || v.Type().Field(i).Anonymous {
- // Add GraphQL fragment or embedded struct.
- d.vs = append(d.vs, []reflect.Value{v.Field(i)})
- frontier = append(frontier, v.Field(i))
- }
- }
- }
- case '[':
- // Start of array.
-
- d.pushState(tok)
-
- for i := range d.vs {
- v := d.vs[i][len(d.vs[i])-1]
- // TODO: Confirm this is needed, write a test case.
- // if v.Kind() == reflect.Ptr && v.IsNil() {
- // v.Set(reflect.New(v.Type().Elem())) // v = new(T).
- //}
-
- // Reset slice to empty (in case it had non-zero initial value).
- if v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
- if v.Kind() != reflect.Slice {
- continue
- }
- v.Set(reflect.MakeSlice(v.Type(), 0, 0)) // v = make(T, 0, 0).
- }
- case '}', ']':
- // End of object or array.
- d.popAllVs()
- d.popState()
- default:
- return errors.New("unexpected delimiter in JSON input")
- }
- default:
- return errors.New("unexpected token in JSON input")
- }
- }
-
- return nil
-}
-
-// pushState pushes a new parse state s onto the stack.
-func (d *Decoder) pushState(s json.Delim) {
- d.parseState = append(d.parseState, s)
-}
-
-// popState pops a parse state (already obtained) off the stack.
-// The stack must be non-empty.
-func (d *Decoder) popState() {
- d.parseState = d.parseState[:len(d.parseState)-1]
-}
-
-// state reports the parse state on top of stack, or 0 if empty.
-func (d *Decoder) state() json.Delim {
- if len(d.parseState) == 0 {
- return 0
- }
-
- return d.parseState[len(d.parseState)-1]
-}
-
-// popAllVs pops from all d.vs stacks, keeping only non-empty ones.
-func (d *Decoder) popAllVs() {
- var nonEmpty [][]reflect.Value
- for i := range d.vs {
- d.vs[i] = d.vs[i][:len(d.vs[i])-1]
- if len(d.vs[i]) > 0 {
- nonEmpty = append(nonEmpty, d.vs[i])
- }
- }
- d.vs = nonEmpty
-}
-
-// fieldByGraphQLName returns an exported struct field of struct v
-// that matches GraphQL name, or invalid reflect.Value if none found.
-func fieldByGraphQLName(v reflect.Value, name string) reflect.Value {
- for i := 0; i < v.NumField(); i++ {
- if v.Type().Field(i).PkgPath != "" {
- // Skip unexported field.
- continue
- }
- if hasGraphQLName(v.Type().Field(i), name) {
- return v.Field(i)
- }
- }
-
- return reflect.Value{}
-}
-
-// hasGraphQLName reports whether struct field f has GraphQL name.
-func hasGraphQLName(f reflect.StructField, name string) bool {
- value, ok := f.Tag.Lookup("graphql")
- if !ok {
- // TODO: caseconv package is relatively slow. Optimize it, then consider using it here.
- // return caseconv.MixedCapsToLowerCamelCase(f.Name) == name
- return strings.EqualFold(f.Name, name)
- }
- value = strings.TrimSpace(value) // TODO: Parse better.
- if strings.HasPrefix(value, "...") {
- // GraphQL fragment. It doesn't have a name.
- return false
- }
- if i := strings.Index(value, "("); i != -1 {
- value = value[:i]
- }
- if i := strings.Index(value, ":"); i != -1 {
- value = value[:i]
- }
-
- return strings.TrimSpace(value) == name
-}
-
-// isGraphQLFragment reports whether struct field f is a GraphQL fragment.
-func isGraphQLFragment(f reflect.StructField) bool {
- value, ok := f.Tag.Lookup("graphql")
- if !ok {
- return false
- }
- value = strings.TrimSpace(value) // TODO: Parse better.
-
- return strings.HasPrefix(value, "...")
-}
-
-// unmarshalValue unmarshals JSON value into v.
-// v must be addressable and not obtained by the use of unexported
-// struct fields, otherwise unmarshalValue will panic.
-func unmarshalValue(value json.Token, v reflect.Value) error {
- b, err := json.Marshal(value) // TODO: Short-circuit (if profiling says it's worth it).
- if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- err = json.Unmarshal(b, v.Addr().Interface())
- if err != nil {
- return fmt.Errorf(": %w", err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/introspection/parse.go b/vendor/github.com/Yamashou/gqlgenc/introspection/parse.go
deleted file mode 100644
index e878125bd2e..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/introspection/parse.go
+++ /dev/null
@@ -1,326 +0,0 @@
-package introspection
-
-import (
- "fmt"
-
- "github.com/vektah/gqlparser/v2/ast"
-)
-
-func ParseIntrospectionQuery(url string, query Query) *ast.SchemaDocument {
- parser := parser{
- sharedPosition: &ast.Position{Src: &ast.Source{
- Name: "remote",
- BuiltIn: false,
- }},
- }
-
- if url != "" {
- parser.sharedPosition.Src.Name = url
- }
-
- return parser.parseIntrospectionQuery(query)
-}
-
-type parser struct {
- sharedPosition *ast.Position
-}
-
-func (p parser) parseIntrospectionQuery(query Query) *ast.SchemaDocument {
- var doc ast.SchemaDocument
- typeMap := query.Schema.Types.NameMap()
-
- doc.Schema = append(doc.Schema, p.parseSchemaDefinition(query, typeMap))
- doc.Position = p.sharedPosition
-
- for _, typeVale := range typeMap {
- doc.Definitions = append(doc.Definitions, p.parseTypeSystemDefinition(typeVale))
- }
-
- for _, directiveValue := range query.Schema.Directives {
- doc.Directives = append(doc.Directives, p.parseDirectiveDefinition(directiveValue))
- }
-
- return &doc
-}
-
-func (p parser) parseSchemaDefinition(query Query, typeMap map[string]*FullType) *ast.SchemaDefinition {
- def := ast.SchemaDefinition{}
- def.Position = p.sharedPosition
-
- if query.Schema.QueryType.Name != nil {
- def.OperationTypes = append(def.OperationTypes,
- p.parseOperationTypeDefinitionForQuery(typeMap[*query.Schema.QueryType.Name]),
- )
- }
-
- if query.Schema.MutationType != nil {
- def.OperationTypes = append(def.OperationTypes,
- p.parseOperationTypeDefinitionForMutation(typeMap[*query.Schema.MutationType.Name]),
- )
- }
-
- return &def
-}
-
-func (p parser) parseOperationTypeDefinitionForQuery(fullType *FullType) *ast.OperationTypeDefinition {
- var op ast.OperationTypeDefinition
- op.Operation = ast.Query
- op.Type = *fullType.Name
- op.Position = p.sharedPosition
-
- return &op
-}
-
-func (p parser) parseOperationTypeDefinitionForMutation(fullType *FullType) *ast.OperationTypeDefinition {
- var op ast.OperationTypeDefinition
- op.Operation = ast.Mutation
- op.Type = *fullType.Name
- op.Position = p.sharedPosition
-
- return &op
-}
-
-func (p parser) parseDirectiveDefinition(directiveValue *DirectiveType) *ast.DirectiveDefinition {
- args := make(ast.ArgumentDefinitionList, 0, len(directiveValue.Args))
- for _, arg := range directiveValue.Args {
- argumentDefinition := p.buildInputValue(arg)
- args = append(args, argumentDefinition)
- }
- locations := make([]ast.DirectiveLocation, 0, len(directiveValue.Locations))
- for _, locationValue := range directiveValue.Locations {
- locations = append(locations, ast.DirectiveLocation(locationValue))
- }
-
- return &ast.DirectiveDefinition{
- Description: pointerString(directiveValue.Description),
- Name: directiveValue.Name,
- Arguments: args,
- Locations: locations,
- Position: p.sharedPosition,
- }
-}
-
-func (p parser) parseObjectFields(typeVale *FullType) ast.FieldList {
- fieldList := make(ast.FieldList, 0, len(typeVale.Fields))
- for _, field := range typeVale.Fields {
- typ := p.getType(&field.Type)
- args := make(ast.ArgumentDefinitionList, 0, len(field.Args))
- for _, arg := range field.Args {
- argumentDefinition := p.buildInputValue(arg)
- args = append(args, argumentDefinition)
- }
-
- fieldDefinition := &ast.FieldDefinition{
- Description: pointerString(field.Description),
- Name: field.Name,
- Arguments: args,
- Type: typ,
- Position: p.sharedPosition,
- }
- fieldList = append(fieldList, fieldDefinition)
- }
-
- return fieldList
-}
-
-func (p parser) parseInputObjectFields(typeVale *FullType) ast.FieldList {
- fieldList := make(ast.FieldList, 0, len(typeVale.InputFields))
- for _, field := range typeVale.InputFields {
- typ := p.getType(&field.Type)
- fieldDefinition := &ast.FieldDefinition{
- Description: pointerString(field.Description),
- Name: field.Name,
- Type: typ,
- Position: p.sharedPosition,
- }
- fieldList = append(fieldList, fieldDefinition)
- }
-
- return fieldList
-}
-
-func (p parser) parseObjectTypeDefinition(typeVale *FullType) *ast.Definition {
- fieldList := p.parseObjectFields(typeVale)
- interfaces := make([]string, 0, len(typeVale.Interfaces))
- for _, intf := range typeVale.Interfaces {
- interfaces = append(interfaces, pointerString(intf.Name))
- }
-
- enums := make(ast.EnumValueList, 0, len(typeVale.EnumValues))
- for _, enum := range typeVale.EnumValues {
- enumValue := &ast.EnumValueDefinition{
- Description: pointerString(enum.Description),
- Name: enum.Name,
- Position: p.sharedPosition,
- }
- enums = append(enums, enumValue)
- }
-
- return &ast.Definition{
- Kind: ast.Object,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- Interfaces: interfaces,
- Fields: fieldList,
- EnumValues: enums,
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseInterfaceTypeDefinition(typeVale *FullType) *ast.Definition {
- fieldList := p.parseObjectFields(typeVale)
- interfaces := make([]string, 0, len(typeVale.Interfaces))
- for _, intf := range typeVale.Interfaces {
- interfaces = append(interfaces, pointerString(intf.Name))
- }
-
- return &ast.Definition{
- Kind: ast.Interface,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- Interfaces: interfaces,
- Fields: fieldList,
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseInputObjectTypeDefinition(typeVale *FullType) *ast.Definition {
- fieldList := p.parseInputObjectFields(typeVale)
- interfaces := make([]string, 0, len(typeVale.Interfaces))
- for _, intf := range typeVale.Interfaces {
- interfaces = append(interfaces, pointerString(intf.Name))
- }
-
- return &ast.Definition{
- Kind: ast.InputObject,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- Interfaces: interfaces,
- Fields: fieldList,
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseUnionTypeDefinition(typeVale *FullType) *ast.Definition {
- unions := make([]string, 0, len(typeVale.PossibleTypes))
- for _, unionValue := range typeVale.PossibleTypes {
- unions = append(unions, *unionValue.Name)
- }
-
- return &ast.Definition{
- Kind: ast.Union,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- Types: unions,
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseEnumTypeDefinition(typeVale *FullType) *ast.Definition {
- enums := make(ast.EnumValueList, 0, len(typeVale.EnumValues))
- for _, enum := range typeVale.EnumValues {
- enumValue := &ast.EnumValueDefinition{
- Description: pointerString(enum.Description),
- Name: enum.Name,
- Position: p.sharedPosition,
- }
- enums = append(enums, enumValue)
- }
-
- return &ast.Definition{
- Kind: ast.Enum,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- EnumValues: enums,
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseScalarTypeExtension(typeVale *FullType) *ast.Definition {
- return &ast.Definition{
- Kind: ast.Scalar,
- Description: pointerString(typeVale.Description),
- Name: pointerString(typeVale.Name),
- Position: p.sharedPosition,
- BuiltIn: true,
- }
-}
-
-func (p parser) parseTypeSystemDefinition(typeVale *FullType) *ast.Definition {
- switch typeVale.Kind {
- case TypeKindScalar:
- return p.parseScalarTypeExtension(typeVale)
- case TypeKindInterface:
- return p.parseInterfaceTypeDefinition(typeVale)
- case TypeKindEnum:
- return p.parseEnumTypeDefinition(typeVale)
- case TypeKindUnion:
- return p.parseUnionTypeDefinition(typeVale)
- case TypeKindObject:
- return p.parseObjectTypeDefinition(typeVale)
- case TypeKindInputObject:
- return p.parseInputObjectTypeDefinition(typeVale)
- case TypeKindList, TypeKindNonNull:
- panic(fmt.Sprintf("not match Kind: %s", typeVale.Kind))
- }
-
- panic(fmt.Sprintf("not match Kind: %s", typeVale.Kind))
-}
-
-func (p parser) buildInputValue(input *InputValue) *ast.ArgumentDefinition {
- typ := p.getType(&input.Type)
-
- var defaultValue *ast.Value
- if input.DefaultValue != nil {
- defaultValue = &ast.Value{
- Raw: pointerString(input.DefaultValue),
- Kind: ast.Variable,
- Position: p.sharedPosition,
- }
- }
-
- return &ast.ArgumentDefinition{
- Description: pointerString(input.Description),
- Name: input.Name,
- DefaultValue: defaultValue,
- Type: typ,
- Position: p.sharedPosition,
- }
-}
-
-func (p parser) getType(typeRef *TypeRef) *ast.Type {
- if typeRef.Kind == TypeKindList {
- itemRef := typeRef.OfType
- if itemRef == nil {
- panic("Decorated type deeper than introspection query.")
- }
-
- return ast.ListType(p.getType(itemRef), p.sharedPosition)
- }
-
- if typeRef.Kind == TypeKindNonNull {
- nullableRef := typeRef.OfType
- if nullableRef == nil {
- panic("Decorated type deeper than introspection query.")
- }
- nullableType := p.getType(nullableRef)
- nullableType.NonNull = true
-
- return nullableType
- }
-
- return ast.NamedType(pointerString(typeRef.Name), p.sharedPosition)
-}
-
-func pointerString(s *string) string {
- if s == nil {
- return ""
- }
-
- return *s
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/introspection/query.go b/vendor/github.com/Yamashou/gqlgenc/introspection/query.go
deleted file mode 100644
index 7bd126ac247..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/introspection/query.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package introspection
-
-const Introspection = `query Query {
- __schema {
- queryType { name }
- mutationType { name }
- subscriptionType { name }
- types {
- ...FullType
- }
- directives {
- name
- description
- locations
- args {
- ...InputValue
- }
- }
- }
- }
-
- fragment FullType on __Type {
- kind
- name
- description
- fields(includeDeprecated: true) {
- name
- description
- args {
- ...InputValue
- }
- type {
- ...TypeRef
- }
- isDeprecated
- deprecationReason
- }
- inputFields {
- ...InputValue
- }
- interfaces {
- ...TypeRef
- }
- enumValues(includeDeprecated: true) {
- name
- description
- isDeprecated
- deprecationReason
- }
- possibleTypes {
- ...TypeRef
- }
- }
-
- fragment InputValue on __InputValue {
- name
- description
- type { ...TypeRef }
- defaultValue
- }
-
- fragment TypeRef on __Type {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- ofType {
- kind
- name
- }
- }
- }
- }
- }
- }
- }
- }`
diff --git a/vendor/github.com/Yamashou/gqlgenc/introspection/type.go b/vendor/github.com/Yamashou/gqlgenc/introspection/type.go
deleted file mode 100644
index 789f72bf758..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/introspection/type.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package introspection
-
-type TypeKind string
-
-const (
- TypeKindScalar TypeKind = "SCALAR"
- TypeKindObject TypeKind = "OBJECT"
- TypeKindInterface TypeKind = "INTERFACE"
- TypeKindUnion TypeKind = "UNION"
- TypeKindEnum TypeKind = "ENUM"
- TypeKindInputObject TypeKind = "INPUT_OBJECT"
- TypeKindList TypeKind = "LIST"
- TypeKindNonNull TypeKind = "NON_NULL"
-)
-
-type FullTypes []*FullType
-
-func (fs FullTypes) NameMap() map[string]*FullType {
- typeMap := make(map[string]*FullType)
- for _, typ := range fs {
- typeMap[*typ.Name] = typ
- }
-
- return typeMap
-}
-
-type FullType struct {
- Kind TypeKind
- Name *string
- Description *string
- Fields []*FieldValue
- InputFields []*InputValue
- Interfaces []*TypeRef
- EnumValues []*struct {
- Name string
- Description *string
- IsDeprecated bool
- DeprecationReason *string
- }
- PossibleTypes []*TypeRef
-}
-
-type FieldValue struct {
- Name string
- Description *string
- Args []*InputValue
- Type TypeRef
- IsDeprecated bool
- DeprecationReason *string
-}
-
-type InputValue struct {
- Name string
- Description *string
- Type TypeRef
- DefaultValue *string
-}
-
-type TypeRef struct {
- Kind TypeKind
- Name *string
- OfType *TypeRef
-}
-
-type Query struct {
- Schema struct {
- QueryType struct{ Name *string }
- MutationType *struct{ Name *string }
- SubscriptionType *struct{ Name *string }
- Types FullTypes
- Directives []*DirectiveType
- } `graphql:"__schema"`
-}
-
-type DirectiveType struct {
- Name string
- Description *string
- Locations []string
- Args []*InputValue
-}
diff --git a/vendor/github.com/Yamashou/gqlgenc/main.go b/vendor/github.com/Yamashou/gqlgenc/main.go
deleted file mode 100644
index 2f3d5a8471e..00000000000
--- a/vendor/github.com/Yamashou/gqlgenc/main.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package main
-
-import (
- "context"
- "fmt"
- "os"
-
- "github.com/99designs/gqlgen/api"
- "github.com/Yamashou/gqlgenc/clientgen"
- "github.com/Yamashou/gqlgenc/clientgenv2"
- "github.com/Yamashou/gqlgenc/config"
- "github.com/Yamashou/gqlgenc/generator"
-)
-
-func main() {
- ctx := context.Background()
- cfg, err := config.LoadConfigFromDefaultLocations()
- if err != nil {
- fmt.Fprintf(os.Stderr, "%+v", err.Error())
- os.Exit(2)
- }
-
- clientGen := api.AddPlugin(clientgen.New(cfg.Query, cfg.Client, cfg.Generate))
- if cfg.Generate != nil {
- if cfg.Generate.ClientV2 {
- clientGen = api.AddPlugin(clientgenv2.New(cfg.Query, cfg.Client, cfg.Generate))
- }
- }
-
- if err := generator.Generate(ctx, cfg, clientGen); err != nil {
- fmt.Fprintf(os.Stderr, "%+v", err.Error())
- os.Exit(4)
- }
-}
diff --git a/vendor/github.com/agnivade/levenshtein/.gitignore b/vendor/github.com/agnivade/levenshtein/.gitignore
deleted file mode 100644
index 345780a4444..00000000000
--- a/vendor/github.com/agnivade/levenshtein/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-coverage.txt
-fuzz/fuzz-fuzz.zip
-fuzz/corpus/corpus/*
-fuzz/corpus/suppressions/*
-fuzz/corpus/crashes/*
diff --git a/vendor/github.com/agnivade/levenshtein/.travis.yml b/vendor/github.com/agnivade/levenshtein/.travis.yml
deleted file mode 100644
index 0873fa983fb..00000000000
--- a/vendor/github.com/agnivade/levenshtein/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: go
-
-# See https://travis-ci.community/t/goos-js-goarch-wasm-go-run-fails-panic-newosproc-not-implemented/1651
-#addons:
-# chrome: stable
-
-before_install:
-- export GO111MODULE=on
-
-#install:
-#- go get github.com/agnivade/wasmbrowsertest
-#- mv $GOPATH/bin/wasmbrowsertest $GOPATH/bin/go_js_wasm_exec
-#- export PATH=$GOPATH/bin:$PATH
-
-go:
-- 1.13.x
-- 1.14.x
-- 1.15.x
-- tip
-
-script:
-#- GOOS=js GOARCH=wasm go test -v
-- go test -v
diff --git a/vendor/github.com/agnivade/levenshtein/License.txt b/vendor/github.com/agnivade/levenshtein/License.txt
deleted file mode 100644
index 54b51f49938..00000000000
--- a/vendor/github.com/agnivade/levenshtein/License.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Agniva De Sarker
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/agnivade/levenshtein/Makefile b/vendor/github.com/agnivade/levenshtein/Makefile
deleted file mode 100644
index 5f6890d6132..00000000000
--- a/vendor/github.com/agnivade/levenshtein/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-all: test install
-
-install:
- go install
-
-lint:
- gofmt -l -s -w . && go vet . && golint -set_exit_status=1 .
-
-test: # The first 2 go gets are to support older Go versions
- go get github.com/arbovm/levenshtein
- go get github.com/dgryski/trifles/leven
- GO111MODULE=on go test -race -v -coverprofile=coverage.txt -covermode=atomic
-
-bench:
- go test -run=XXX -bench=. -benchmem -count=5
diff --git a/vendor/github.com/agnivade/levenshtein/README.md b/vendor/github.com/agnivade/levenshtein/README.md
deleted file mode 100644
index 13c52a2101a..00000000000
--- a/vendor/github.com/agnivade/levenshtein/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-levenshtein [![Build Status](https://travis-ci.org/agnivade/levenshtein.svg?branch=master)](https://travis-ci.org/agnivade/levenshtein) [![Go Report Card](https://goreportcard.com/badge/github.com/agnivade/levenshtein)](https://goreportcard.com/report/github.com/agnivade/levenshtein) [![PkgGoDev](https://pkg.go.dev/badge/github.com/agnivade/levenshtein)](https://pkg.go.dev/github.com/agnivade/levenshtein)
-===========
-
-[Go](http://golang.org) package to calculate the [Levenshtein Distance](http://en.wikipedia.org/wiki/Levenshtein_distance)
-
-The library is fully capable of working with non-ascii strings. But the strings are not normalized. That is left as a user-dependant use case. Please normalize the strings before passing it to the library if you have such a requirement.
-- https://blog.golang.org/normalization
-
-#### Limitation
-
-As a performance optimization, the library can handle strings only up to 65536 characters (runes). If you need to handle strings larger than that, please pin to version 1.0.3.
-
-Install
--------
-
- go get github.com/agnivade/levenshtein
-
-Example
--------
-
-```go
-package main
-
-import (
- "fmt"
- "github.com/agnivade/levenshtein"
-)
-
-func main() {
- s1 := "kitten"
- s2 := "sitting"
- distance := levenshtein.ComputeDistance(s1, s2)
- fmt.Printf("The distance between %s and %s is %d.\n", s1, s2, distance)
- // Output:
- // The distance between kitten and sitting is 3.
-}
-
-```
-
-Benchmarks
-----------
-
-```
-name time/op
-Simple/ASCII-4 330ns ± 2%
-Simple/French-4 617ns ± 2%
-Simple/Nordic-4 1.16µs ± 4%
-Simple/Tibetan-4 1.05µs ± 1%
-
-name alloc/op
-Simple/ASCII-4 96.0B ± 0%
-Simple/French-4 128B ± 0%
-Simple/Nordic-4 192B ± 0%
-Simple/Tibetan-4 144B ± 0%
-
-name allocs/op
-Simple/ASCII-4 1.00 ± 0%
-Simple/French-4 1.00 ± 0%
-Simple/Nordic-4 1.00 ± 0%
-Simple/Tibetan-4 1.00 ± 0%
-```
-
-Comparisons with other libraries
---------------------------------
-
-```
-name time/op
-Leven/ASCII/agniva-4 353ns ± 1%
-Leven/ASCII/arbovm-4 485ns ± 1%
-Leven/ASCII/dgryski-4 395ns ± 0%
-Leven/French/agniva-4 648ns ± 1%
-Leven/French/arbovm-4 791ns ± 0%
-Leven/French/dgryski-4 682ns ± 0%
-Leven/Nordic/agniva-4 1.28µs ± 1%
-Leven/Nordic/arbovm-4 1.52µs ± 1%
-Leven/Nordic/dgryski-4 1.32µs ± 1%
-Leven/Tibetan/agniva-4 1.12µs ± 1%
-Leven/Tibetan/arbovm-4 1.31µs ± 0%
-Leven/Tibetan/dgryski-4 1.16µs ± 0%
-```
diff --git a/vendor/github.com/agnivade/levenshtein/levenshtein.go b/vendor/github.com/agnivade/levenshtein/levenshtein.go
deleted file mode 100644
index f727a66fe71..00000000000
--- a/vendor/github.com/agnivade/levenshtein/levenshtein.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Package levenshtein is a Go implementation to calculate Levenshtein Distance.
-//
-// Implementation taken from
-// https://gist.github.com/andrei-m/982927#gistcomment-1931258
-package levenshtein
-
-import "unicode/utf8"
-
-// minLengthThreshold is the length of the string beyond which
-// an allocation will be made. Strings smaller than this will be
-// zero alloc.
-const minLengthThreshold = 32
-
-// ComputeDistance computes the levenshtein distance between the two
-// strings passed as an argument. The return value is the levenshtein distance
-//
-// Works on runes (Unicode code points) but does not normalize
-// the input strings. See https://blog.golang.org/normalization
-// and the golang.org/x/text/unicode/norm package.
-func ComputeDistance(a, b string) int {
- if len(a) == 0 {
- return utf8.RuneCountInString(b)
- }
-
- if len(b) == 0 {
- return utf8.RuneCountInString(a)
- }
-
- if a == b {
- return 0
- }
-
- // We need to convert to []rune if the strings are non-ASCII.
- // This could be avoided by using utf8.RuneCountInString
- // and then doing some juggling with rune indices,
- // but leads to far more bounds checks. It is a reasonable trade-off.
- s1 := []rune(a)
- s2 := []rune(b)
-
- // swap to save some memory O(min(a,b)) instead of O(a)
- if len(s1) > len(s2) {
- s1, s2 = s2, s1
- }
- lenS1 := len(s1)
- lenS2 := len(s2)
-
- // Init the row.
- var x []uint16
- if lenS1+1 > minLengthThreshold {
- x = make([]uint16, lenS1+1)
- } else {
- // We make a small optimization here for small strings.
- // Because a slice of constant length is effectively an array,
- // it does not allocate. So we can re-slice it to the right length
- // as long as it is below a desired threshold.
- x = make([]uint16, minLengthThreshold)
- x = x[:lenS1+1]
- }
-
- // we start from 1 because index 0 is already 0.
- for i := 1; i < len(x); i++ {
- x[i] = uint16(i)
- }
-
- // make a dummy bounds check to prevent the 2 bounds check down below.
- // The one inside the loop is particularly costly.
- _ = x[lenS1]
- // fill in the rest
- for i := 1; i <= lenS2; i++ {
- prev := uint16(i)
- for j := 1; j <= lenS1; j++ {
- current := x[j-1] // match
- if s2[i-1] != s1[j-1] {
- current = min(min(x[j-1]+1, prev+1), x[j]+1)
- }
- x[j-1] = prev
- prev = current
- }
- x[lenS1] = prev
- }
- return int(x[lenS1])
-}
-
-func min(a, b uint16) uint16 {
- if a < b {
- return a
- }
- return b
-}
diff --git a/vendor/github.com/anacrolix/dms/LICENSE b/vendor/github.com/anacrolix/dms/LICENSE
deleted file mode 100644
index 3b827a441d5..00000000000
--- a/vendor/github.com/anacrolix/dms/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2012, Matt Joiner .
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/vendor/github.com/anacrolix/dms/dlna/dlna.go b/vendor/github.com/anacrolix/dms/dlna/dlna.go
deleted file mode 100644
index 07f5880f272..00000000000
--- a/vendor/github.com/anacrolix/dms/dlna/dlna.go
+++ /dev/null
@@ -1,102 +0,0 @@
-package dlna
-
-import (
- "fmt"
- "strings"
- "time"
-)
-
-const (
- TimeSeekRangeDomain = "TimeSeekRange.dlna.org"
- ContentFeaturesDomain = "contentFeatures.dlna.org"
- TransferModeDomain = "transferMode.dlna.org"
-)
-
-type ContentFeatures struct {
- ProfileName string
- SupportTimeSeek bool
- SupportRange bool
- // Play speeds, DLNA.ORG_PS would go here if supported.
- Transcoded bool
-}
-
-func BinaryInt(b bool) uint {
- if b {
- return 1
- } else {
- return 0
- }
-}
-
-// flags are in hex. trailing 24 zeroes, 26 are after the space
-// "DLNA.ORG_OP=" time-seek-range-supp bytes-range-header-supp
-func (cf ContentFeatures) String() (ret string) {
- //DLNA.ORG_PN=[a-zA-Z0-9_]*
- params := make([]string, 0, 2)
- if cf.ProfileName != "" {
- params = append(params, "DLNA.ORG_PN="+cf.ProfileName)
- }
- params = append(params, fmt.Sprintf(
- "DLNA.ORG_OP=%b%b;DLNA.ORG_CI=%b",
- BinaryInt(cf.SupportTimeSeek),
- BinaryInt(cf.SupportRange),
- BinaryInt(cf.Transcoded)))
- return strings.Join(params, ";")
-}
-
-func ParseNPTTime(s string) (time.Duration, error) {
- var h, m, sec, ms time.Duration
- n, err := fmt.Sscanf(s, "%d:%2d:%2d.%3d", &h, &m, &sec, &ms)
- if err != nil {
- return -1, err
- }
- if n < 3 {
- return -1, fmt.Errorf("invalid npt time: %s", s)
- }
- ret := time.Duration(h) * time.Hour
- ret += time.Duration(m) * time.Minute
- ret += sec * time.Second
- ret += ms * time.Millisecond
- return ret, nil
-}
-
-func FormatNPTTime(npt time.Duration) string {
- npt /= time.Millisecond
- ms := npt % 1000
- npt /= 1000
- s := npt % 60
- npt /= 60
- m := npt % 60
- npt /= 60
- h := npt
- return fmt.Sprintf("%02d:%02d:%02d.%03d", h, m, s, ms)
-}
-
-type NPTRange struct {
- Start, End time.Duration
-}
-
-func ParseNPTRange(s string) (ret NPTRange, err error) {
- ss := strings.SplitN(s, "-", 2)
- if ss[0] != "" {
- ret.Start, err = ParseNPTTime(ss[0])
- if err != nil {
- return
- }
- }
- if ss[1] != "" {
- ret.End, err = ParseNPTTime(ss[1])
- if err != nil {
- return
- }
- }
- return
-}
-
-func (me NPTRange) String() (ret string) {
- ret = me.Start.String() + "-"
- if me.End >= 0 {
- ret += me.End.String()
- }
- return
-}
diff --git a/vendor/github.com/anacrolix/dms/soap/soap.go b/vendor/github.com/anacrolix/dms/soap/soap.go
deleted file mode 100644
index 5424bc855e9..00000000000
--- a/vendor/github.com/anacrolix/dms/soap/soap.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package soap
-
-import (
- "encoding/xml"
-)
-
-const (
- EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
- EnvelopeNS = "http://schemas.xmlsoap.org/soap/envelope/"
-)
-
-type Arg struct {
- XMLName xml.Name
- Value string `xml:",chardata"`
-}
-
-type Action struct {
- XMLName xml.Name
- Args []Arg
-}
-
-type Body struct {
- Action []byte `xml:",innerxml"`
-}
-
-type UPnPError struct {
- XMLName xml.Name `xml:"urn:schemas-upnp-org:control-1-0 UPnPError"`
- Code uint `xml:"errorCode"`
- Desc string `xml:"errorDescription"`
-}
-
-type FaultDetail struct {
- XMLName xml.Name `xml:"detail"`
- Data interface{}
-}
-
-type Fault struct {
- XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
- FaultCode string `xml:"faultcode"`
- FaultString string `xml:"faultstring"`
- Detail FaultDetail `xml:"detail"`
-}
-
-func NewFault(s string, detail interface{}) *Fault {
- return &Fault{
- FaultCode: EnvelopeNS + ":Client",
- FaultString: s,
- Detail: FaultDetail{
- Data: detail,
- },
- }
-}
-
-type Envelope struct {
- XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
- EncodingStyle string `xml:"encodingStyle,attr"`
- Body Body `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
-}
-
-/* XML marshalling of nested namespaces is broken.
-
-func NewEnvelope(action []byte) Envelope {
- return Envelope{
- EncodingStyle: EncodingStyle,
- Body: Body{action},
- }
-}
-*/
diff --git a/vendor/github.com/anacrolix/dms/ssdp/ssdp.go b/vendor/github.com/anacrolix/dms/ssdp/ssdp.go
deleted file mode 100644
index 5b03c709f0b..00000000000
--- a/vendor/github.com/anacrolix/dms/ssdp/ssdp.go
+++ /dev/null
@@ -1,330 +0,0 @@
-package ssdp
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "log"
- "math/rand"
- "net"
- "net/http"
- "net/textproto"
- "strconv"
- "strings"
- "time"
-
- "golang.org/x/net/ipv4"
-)
-
-const (
- AddrString = "239.255.255.250:1900"
- rootDevice = "upnp:rootdevice"
- aliveNTS = "ssdp:alive"
- byebyeNTS = "ssdp:byebye"
-)
-
-var (
- NetAddr *net.UDPAddr
-)
-
-func init() {
- var err error
- NetAddr, err = net.ResolveUDPAddr("udp4", AddrString)
- if err != nil {
- log.Panicf("Could not resolve %s: %s", AddrString, err)
- }
-}
-
-type badStringError struct {
- what string
- str string
-}
-
-func (e *badStringError) Error() string { return fmt.Sprintf("%s %q", e.what, e.str) }
-
-func ReadRequest(b *bufio.Reader) (req *http.Request, err error) {
- tp := textproto.NewReader(b)
- var s string
- if s, err = tp.ReadLine(); err != nil {
- return nil, err
- }
- defer func() {
- if err == io.EOF {
- err = io.ErrUnexpectedEOF
- }
- }()
-
- var f []string
- // TODO a split that only allows N values?
- if f = strings.SplitN(s, " ", 3); len(f) < 3 {
- return nil, &badStringError{"malformed request line", s}
- }
- if f[1] != "*" {
- return nil, &badStringError{"bad URL request", f[1]}
- }
- req = &http.Request{
- Method: f[0],
- }
- var ok bool
- if req.ProtoMajor, req.ProtoMinor, ok = http.ParseHTTPVersion(strings.TrimSpace(f[2])); !ok {
- return nil, &badStringError{"malformed HTTP version", f[2]}
- }
-
- mimeHeader, err := tp.ReadMIMEHeader()
- if err != nil {
- return nil, err
- }
- req.Header = http.Header(mimeHeader)
- return
-}
-
-type Server struct {
- conn *net.UDPConn
- Interface net.Interface
- Server string
- Services []string
- Devices []string
- Location func(net.IP) string
- UUID string
- NotifyInterval time.Duration
- closed chan struct{}
-}
-
-func makeConn(ifi net.Interface) (ret *net.UDPConn, err error) {
- ret, err = net.ListenMulticastUDP("udp", &ifi, NetAddr)
- if err != nil {
- return
- }
- p := ipv4.NewPacketConn(ret)
- if err := p.SetMulticastTTL(2); err != nil {
- log.Println(err)
- }
- if err := p.SetMulticastLoopback(true); err != nil {
- log.Println(err)
- }
- return
-}
-
-func (me *Server) serve() {
- for {
- b := make([]byte, me.Interface.MTU)
- n, addr, err := me.conn.ReadFromUDP(b)
- select {
- case <-me.closed:
- return
- default:
- }
- if err != nil {
- log.Printf("error reading from UDP socket: %s", err)
- break
- }
- go me.handle(b[:n], addr)
- }
-}
-
-func (me *Server) Init() (err error) {
- me.closed = make(chan struct{})
- me.conn, err = makeConn(me.Interface)
- return
-}
-
-func (me *Server) Close() {
- close(me.closed)
- me.sendByeBye()
- me.conn.Close()
-}
-
-func (me *Server) Serve() (err error) {
- go me.serve()
- for {
- addrs, err := me.Interface.Addrs()
- if err != nil {
- return err
- }
- for _, addr := range addrs {
- ip := func() net.IP {
- switch val := addr.(type) {
- case *net.IPNet:
- return val.IP
- case *net.IPAddr:
- return val.IP
- }
- panic(fmt.Sprint("unexpected addr type:", addr))
- }()
- extraHdrs := [][2]string{
- {"CACHE-CONTROL", fmt.Sprintf("max-age=%d", 5*me.NotifyInterval/2/time.Second)},
- {"LOCATION", me.Location(ip)},
- }
- me.notifyAll(aliveNTS, extraHdrs)
- }
- time.Sleep(me.NotifyInterval)
- }
-}
-
-func (me *Server) usnFromTarget(target string) string {
- if target == me.UUID {
- return target
- }
- return me.UUID + "::" + target
-}
-
-func (me *Server) makeNotifyMessage(target, nts string, extraHdrs [][2]string) []byte {
- lines := [...][2]string{
- {"HOST", AddrString},
- {"NT", target},
- {"NTS", nts},
- {"SERVER", me.Server},
- {"USN", me.usnFromTarget(target)},
- }
- buf := &bytes.Buffer{}
- fmt.Fprint(buf, "NOTIFY * HTTP/1.1\r\n")
- writeHdr := func(keyValue [2]string) {
- fmt.Fprintf(buf, "%s: %s\r\n", keyValue[0], keyValue[1])
- }
- for _, pair := range lines {
- writeHdr(pair)
- }
- for _, pair := range extraHdrs {
- writeHdr(pair)
- }
- fmt.Fprint(buf, "\r\n")
- return buf.Bytes()
-}
-
-func (me *Server) send(buf []byte, addr *net.UDPAddr) {
- if n, err := me.conn.WriteToUDP(buf, addr); err != nil {
- log.Printf("error writing to UDP socket: %s", err)
- } else if n != len(buf) {
- log.Printf("short write: %d/%d bytes", n, len(buf))
- }
-}
-
-func (me *Server) delayedSend(delay time.Duration, buf []byte, addr *net.UDPAddr) {
- go func() {
- select {
- case <-time.After(delay):
- me.send(buf, addr)
- case <-me.closed:
- }
- }()
-}
-
-func (me *Server) log(args ...interface{}) {
- args = append([]interface{}{me.Interface.Name + ":"}, args...)
- log.Print(args...)
-}
-
-func (me *Server) sendByeBye() {
- for _, type_ := range me.allTypes() {
- buf := me.makeNotifyMessage(type_, byebyeNTS, nil)
- me.send(buf, NetAddr)
- }
-}
-
-func (me *Server) notifyAll(nts string, extraHdrs [][2]string) {
- for _, type_ := range me.allTypes() {
- buf := me.makeNotifyMessage(type_, nts, extraHdrs)
- delay := time.Duration(rand.Int63n(int64(100 * time.Millisecond)))
- me.delayedSend(delay, buf, NetAddr)
- }
-}
-
-func (me *Server) allTypes() (ret []string) {
- for _, a := range [][]string{
- {rootDevice, me.UUID},
- me.Devices,
- me.Services,
- } {
- ret = append(ret, a...)
- }
- return
-}
-
-func (me *Server) handle(buf []byte, sender *net.UDPAddr) {
- req, err := ReadRequest(bufio.NewReader(bytes.NewReader(buf)))
- if err != nil {
- log.Println(err)
- return
- }
- if req.Method != "M-SEARCH" || req.Header.Get("man") != `"ssdp:discover"` {
- return
- }
- var mx uint
- if req.Header.Get("Host") == AddrString {
- mxHeader := req.Header.Get("mx")
- i, err := strconv.ParseUint(mxHeader, 0, 0)
- if err != nil {
- log.Printf("Invalid mx header %q: %s", mxHeader, err)
- return
- }
- mx = uint(i)
- } else {
- mx = 1
- }
- types := func(st string) []string {
- if st == "ssdp:all" {
- return me.allTypes()
- }
- for _, t := range me.allTypes() {
- if t == st {
- return []string{t}
- }
- }
- return nil
- }(req.Header.Get("st"))
- for _, ip := range func() (ret []net.IP) {
- addrs, err := me.Interface.Addrs()
- if err != nil {
- panic(err)
- }
- for _, addr := range addrs {
- if ip, ok := func() (net.IP, bool) {
- switch data := addr.(type) {
- case *net.IPNet:
- if data.Contains(sender.IP) {
- return data.IP, true
- }
- return nil, false
- case *net.IPAddr:
- return data.IP, true
- }
- panic(addr)
- }(); ok {
- ret = append(ret, ip)
- }
- }
- return
- }() {
- for _, type_ := range types {
- resp := me.makeResponse(ip, type_, req)
- delay := time.Duration(rand.Int63n(int64(time.Second) * int64(mx)))
- me.delayedSend(delay, resp, sender)
- }
- }
-}
-
-func (me *Server) makeResponse(ip net.IP, targ string, req *http.Request) (ret []byte) {
- resp := &http.Response{
- StatusCode: 200,
- ProtoMajor: 1,
- ProtoMinor: 1,
- Header: make(http.Header),
- Request: req,
- }
- for _, pair := range [...][2]string{
- {"CACHE-CONTROL", fmt.Sprintf("max-age=%d", 5*me.NotifyInterval/2/time.Second)},
- {"EXT", ""},
- {"LOCATION", me.Location(ip)},
- {"SERVER", me.Server},
- {"ST", targ},
- {"USN", me.usnFromTarget(targ)},
- } {
- resp.Header.Set(pair[0], pair[1])
- }
- buf := &bytes.Buffer{}
- if err := resp.Write(buf); err != nil {
- panic(err)
- }
- return buf.Bytes()
-}
diff --git a/vendor/github.com/anacrolix/dms/upnp/eventing.go b/vendor/github.com/anacrolix/dms/upnp/eventing.go
deleted file mode 100644
index 11cd88df54b..00000000000
--- a/vendor/github.com/anacrolix/dms/upnp/eventing.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package upnp
-
-import (
- "crypto/rand"
- "encoding/xml"
- "fmt"
- "io"
- "log"
- "net/url"
- "regexp"
- "time"
-)
-
-// TODO: Why use namespace prefixes in PropertySet et al? Because the spec
-// uses them, and I believe the Golang standard library XML spec implementers
-// incorrectly assume that you can get away with just xmlns="".
-
-// propertyset is the root element sent in an event callback.
-type PropertySet struct {
- XMLName struct{} `xml:"e:propertyset"`
- Properties []Property
- // This should be set to `"urn:schemas-upnp-org:event-1-0"`.
- Space string `xml:"xmlns:e,attr"`
-}
-
-// propertys provide namespacing to the contained variables.
-type Property struct {
- XMLName struct{} `xml:"e:property"`
- Variable Variable
-}
-
-// Represents an evented state variable that has sendEvents="yes" in its
-// service spec.
-type Variable struct {
- XMLName xml.Name
- Value string `xml:",chardata"`
-}
-
-type subscriber struct {
- sid string
- nextSeq uint32 // 0 for initial event, wraps from Uint32Max to 1.
- urls []*url.URL
- expiry time.Time
-}
-
-// Intended to eventually be an embeddable implementation for managing
-// eventing for a service. Not complete.
-type Eventing struct {
- subscribers map[string]*subscriber
-}
-
-func (me *Eventing) Subscribe(callback []*url.URL, timeoutSeconds int) (sid string, actualTimeout int, err error) {
- var uuid [16]byte
- io.ReadFull(rand.Reader, uuid[:])
- sid = FormatUUID(uuid[:])
- if _, ok := me.subscribers[sid]; ok {
- err = fmt.Errorf("already subscribed: %s", sid)
- return
- }
- ssr := &subscriber{
- sid: sid,
- urls: callback,
- expiry: time.Now().Add(time.Duration(timeoutSeconds) * time.Second),
- }
- if me.subscribers == nil {
- me.subscribers = make(map[string]*subscriber)
- }
- me.subscribers[sid] = ssr
- actualTimeout = int(ssr.expiry.Sub(time.Now()) / time.Second)
- return
-}
-
-func (me *Eventing) Unsubscribe(sid string) error {
- return nil
-}
-
-var callbackURLRegexp = regexp.MustCompile("<(.*?)>")
-
-// Parse the CALLBACK HTTP header in an event subscription request. See UPnP
-// Device Architecture 4.1.2.
-func ParseCallbackURLs(callback string) (ret []*url.URL) {
- for _, match := range callbackURLRegexp.FindAllStringSubmatch(callback, -1) {
- _url, err := url.Parse(match[1])
- if err != nil {
- log.Printf("bad callback url: %q", match[1])
- continue
- }
- ret = append(ret, _url)
- }
- return
-}
diff --git a/vendor/github.com/anacrolix/dms/upnp/upnp.go b/vendor/github.com/anacrolix/dms/upnp/upnp.go
deleted file mode 100644
index eef9295f9f2..00000000000
--- a/vendor/github.com/anacrolix/dms/upnp/upnp.go
+++ /dev/null
@@ -1,162 +0,0 @@
-package upnp
-
-import (
- "encoding/xml"
- "errors"
- "fmt"
- "log"
- "regexp"
- "strconv"
- "strings"
-)
-
-var serviceURNRegexp *regexp.Regexp = regexp.MustCompile(`^urn:schemas-upnp-org:service:(\w+):(\d+)$`)
-
-type ServiceURN struct {
- Type string
- Version uint64
-}
-
-func (me ServiceURN) String() string {
- return fmt.Sprintf("urn:schemas-upnp-org:service:%s:%d", me.Type, me.Version)
-}
-
-func ParseServiceType(s string) (ret ServiceURN, err error) {
- matches := serviceURNRegexp.FindStringSubmatch(s)
- if matches == nil {
- err = errors.New(s)
- return
- }
- if len(matches) != 3 {
- log.Panicf("Invalid serviceURNRegexp ?")
- }
- ret.Type = matches[1]
- ret.Version, err = strconv.ParseUint(matches[2], 0, 0)
- return
-}
-
-type SoapAction struct {
- ServiceURN
- Action string
-}
-
-func ParseActionHTTPHeader(s string) (ret SoapAction, err error) {
- if len(s) < 3 {
- return
- }
- if s[0] != '"' || s[len(s)-1] != '"' {
- return
- }
- s = s[1 : len(s)-1]
- hashIndex := strings.LastIndex(s, "#")
- if hashIndex == -1 {
- return
- }
- ret.Action = s[hashIndex+1:]
- ret.ServiceURN, err = ParseServiceType(s[:hashIndex])
- return
-}
-
-type SpecVersion struct {
- Major int `xml:"major"`
- Minor int `xml:"minor"`
-}
-
-type Icon struct {
- Mimetype string `xml:"mimetype"`
- Width int `xml:"width"`
- Height int `xml:"height"`
- Depth int `xml:"depth"`
- URL string `xml:"url"`
-}
-
-type Service struct {
- XMLName xml.Name `xml:"service"`
- ServiceType string `xml:"serviceType"`
- ServiceId string `xml:"serviceId"`
- SCPDURL string
- ControlURL string `xml:"controlURL"`
- EventSubURL string `xml:"eventSubURL"`
-}
-
-type Device struct {
- DeviceType string `xml:"deviceType"`
- FriendlyName string `xml:"friendlyName"`
- Manufacturer string `xml:"manufacturer"`
- ModelName string `xml:"modelName"`
- UDN string
- IconList []Icon `xml:"iconList>icon"`
- ServiceList []Service `xml:"serviceList>service"`
-}
-
-type DeviceDesc struct {
- XMLName xml.Name `xml:"urn:schemas-upnp-org:device-1-0 root"`
- SpecVersion SpecVersion `xml:"specVersion"`
- Device Device `xml:"device"`
-}
-
-type Error struct {
- XMLName xml.Name `xml:"urn:schemas-upnp-org:control-1-0 UPnPError"`
- Code uint `xml:"errorCode"`
- Desc string `xml:"errorDescription"`
-}
-
-func (e *Error) Error() string {
- return fmt.Sprintf("%d %s", e.Code, e.Desc)
-}
-
-const (
- InvalidActionErrorCode = 401
- ActionFailedErrorCode = 501
- ArgumentValueInvalidErrorCode = 600
-)
-
-var (
- InvalidActionError = Errorf(401, "Invalid Action")
- ArgumentValueInvalidError = Errorf(600, "The argument value is invalid")
-)
-
-// Errorf creates an UPNP error from the given code and description
-func Errorf(code uint, tpl string, args ...interface{}) *Error {
- return &Error{Code: code, Desc: fmt.Sprintf(tpl, args...)}
-}
-
-// ConvertError converts any error to an UPNP error
-func ConvertError(err error) *Error {
- if err == nil {
- return nil
- }
- if e, ok := err.(*Error); ok {
- return e
- }
- return Errorf(ActionFailedErrorCode, err.Error())
-}
-
-type Action struct {
- Name string
- Arguments []Argument
-}
-
-type Argument struct {
- Name string
- Direction string
- RelatedStateVar string
-}
-
-type SCPD struct {
- XMLName xml.Name `xml:"urn:schemas-upnp-org:service-1-0 scpd"`
- SpecVersion SpecVersion `xml:"specVersion"`
- ActionList []Action `xml:"actionList>action"`
- ServiceStateTable []StateVariable `xml:"serviceStateTable>stateVariable"`
-}
-
-type StateVariable struct {
- SendEvents string `xml:"sendEvents,attr"`
- Name string `xml:"name"`
- DataType string `xml:"dataType"`
- AllowedValues *[]string `xml:"allowedValueList>allowedValue,omitempty"`
-}
-
-func FormatUUID(buf []byte) string {
- return fmt.Sprintf("uuid:%x-%x-%x-%x-%x", buf[:4], buf[4:6], buf[6:8], buf[8:10], buf[10:16])
-}
diff --git a/vendor/github.com/anacrolix/dms/upnpav/upnpav.go b/vendor/github.com/anacrolix/dms/upnpav/upnpav.go
deleted file mode 100644
index 2ba7f8adec6..00000000000
--- a/vendor/github.com/anacrolix/dms/upnpav/upnpav.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package upnpav
-
-import (
- "encoding/xml"
-)
-
-const (
- NoSuchObjectErrorCode = 701
-)
-
-type Resource struct {
- XMLName xml.Name `xml:"res"`
- ProtocolInfo string `xml:"protocolInfo,attr"`
- URL string `xml:",chardata"`
- Size uint64 `xml:"size,attr,omitempty"`
- Bitrate uint `xml:"bitrate,attr,omitempty"`
- Duration string `xml:"duration,attr,omitempty"`
- Resolution string `xml:"resolution,attr,omitempty"`
-}
-
-type Container struct {
- Object
- XMLName xml.Name `xml:"container"`
- ChildCount int `xml:"childCount,attr"`
-}
-
-type Item struct {
- Object
- XMLName xml.Name `xml:"item"`
- Res []Resource
-}
-
-type Object struct {
- ID string `xml:"id,attr"`
- ParentID string `xml:"parentID,attr"`
- Restricted int `xml:"restricted,attr"` // indicates whether the object is modifiable
- Class string `xml:"upnp:class"`
- Icon string `xml:"upnp:icon,omitempty"`
- Title string `xml:"dc:title"`
- Artist string `xml:"upnp:artist,omitempty"`
- Album string `xml:"upnp:album,omitempty"`
- Genre string `xml:"upnp:genre,omitempty"`
- AlbumArtURI string `xml:"upnp:albumArtURI,omitempty"`
- Searchable int `xml:"searchable,attr"`
-}
diff --git a/vendor/github.com/antchfx/htmlquery/.gitignore b/vendor/github.com/antchfx/htmlquery/.gitignore
deleted file mode 100644
index 4d5d27b1d3a..00000000000
--- a/vendor/github.com/antchfx/htmlquery/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-# vscode
-.vscode
-debug
-*.test
-
-./build
-
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/htmlquery/.travis.yml b/vendor/github.com/antchfx/htmlquery/.travis.yml
deleted file mode 100644
index 86da84abe6c..00000000000
--- a/vendor/github.com/antchfx/htmlquery/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-language: go
-
-go:
- - 1.9.x
- - 1.12.x
- - 1.13.x
-
-install:
- - go get golang.org/x/net/html/charset
- - go get golang.org/x/net/html
- - go get github.com/antchfx/xpath
- - go get github.com/mattn/goveralls
- - go get github.com/golang/groupcache
-
-script:
- - $HOME/gopath/bin/goveralls -service=travis-ci
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/htmlquery/LICENSE b/vendor/github.com/antchfx/htmlquery/LICENSE
deleted file mode 100644
index e14c37141c5..00000000000
--- a/vendor/github.com/antchfx/htmlquery/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/htmlquery/README.md b/vendor/github.com/antchfx/htmlquery/README.md
deleted file mode 100644
index 5eb290d0cdc..00000000000
--- a/vendor/github.com/antchfx/htmlquery/README.md
+++ /dev/null
@@ -1,163 +0,0 @@
-htmlquery
-====
-[![Build Status](https://travis-ci.org/antchfx/htmlquery.svg?branch=master)](https://travis-ci.org/antchfx/htmlquery)
-[![Coverage Status](https://coveralls.io/repos/github/antchfx/htmlquery/badge.svg?branch=master)](https://coveralls.io/github/antchfx/htmlquery?branch=master)
-[![GoDoc](https://godoc.org/github.com/antchfx/htmlquery?status.svg)](https://godoc.org/github.com/antchfx/htmlquery)
-[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/htmlquery)](https://goreportcard.com/report/github.com/antchfx/htmlquery)
-
-Overview
-====
-
-`htmlquery` is an XPath query package for HTML, lets you extract data or evaluate from HTML documents by an XPath expression.
-
-`htmlquery` built-in the query object caching feature based on [LRU](https://godoc.org/github.com/golang/groupcache/lru), this feature will caching the recently used XPATH query string. Enable query caching can avoid re-compile XPath expression each query.
-
-You can visit this page to learn about the supported XPath(1.0/2.0) syntax. https://github.com/antchfx/xpath
-
-XPath query packages for Go
-===
-| Name | Description |
-| ------------------------------------------------- | ----------------------------------------- |
-| [htmlquery](https://github.com/antchfx/htmlquery) | XPath query package for the HTML document |
-| [xmlquery](https://github.com/antchfx/xmlquery) | XPath query package for the XML document |
-| [jsonquery](https://github.com/antchfx/jsonquery) | XPath query package for the JSON document |
-
-Installation
-====
-
-```
-go get github.com/antchfx/htmlquery
-```
-
-Getting Started
-====
-
-#### Query, returns matched elements or error.
-
-```go
-nodes, err := htmlquery.QueryAll(doc, "//a")
-if err != nil {
- panic(`not a valid XPath expression.`)
-}
-```
-
-#### Load HTML document from URL.
-
-```go
-doc, err := htmlquery.LoadURL("http://example.com/")
-```
-
-#### Load HTML from document.
-
-```go
-filePath := "/home/user/sample.html"
-doc, err := htmlquery.LoadDoc(filePath)
-```
-
-#### Load HTML document from string.
-
-```go
-s := `....`
-doc, err := htmlquery.Parse(strings.NewReader(s))
-```
-
-#### Find all A elements.
-
-```go
-list := htmlquery.Find(doc, "//a")
-```
-
-#### Find all A elements that have `href` attribute.
-
-```go
-list := htmlquery.Find(doc, "//a[@href]")
-```
-
-#### Find all A elements with `href` attribute and only return `href` value.
-
-```go
-list := htmlquery.Find(doc, "//a/@href")
-for _ , n := range list{
- fmt.Println(htmlquery.SelectAttr(n, "href")) // output @href value
-}
-```
-
-### Find the third A element.
-
-```go
-a := htmlquery.FindOne(doc, "//a[3]")
-```
-
-### Find children element (img) under A `href` and print the source
-```go
-a := htmlquery.FindOne(doc, "//a")
-img := htmlquery.FindOne(a, "//img")
-fmt.Prinln(htmlquery.SelectAttr(img, "src")) // output @src value
-```
-
-#### Evaluate the number of all IMG element.
-
-```go
-expr, _ := xpath.Compile("count(//img)")
-v := expr.Evaluate(htmlquery.CreateXPathNavigator(doc)).(float64)
-fmt.Printf("total count is %f", v)
-```
-
-
-Quick Starts
-===
-
-```go
-func main() {
- doc, err := htmlquery.LoadURL("https://www.bing.com/search?q=golang")
- if err != nil {
- panic(err)
- }
- // Find all news item.
- list, err := htmlquery.QueryAll(doc, "//ol/li")
- if err != nil {
- panic(err)
- }
- for i, n := range list {
- a := htmlquery.FindOne(n, "//a")
- if a != nil {
- fmt.Printf("%d %s(%s)\n", i, htmlquery.InnerText(a), htmlquery.SelectAttr(a, "href"))
- }
- }
-}
-```
-
-
-FAQ
-====
-
-#### `Find()` vs `QueryAll()`, which is better?
-
-`Find` and `QueryAll` both do the same things, searches all of matched html nodes.
-The `Find` will panics if you give an error XPath query, but `QueryAll` will return an error for you.
-
-#### Can I save my query expression object for the next query?
-
-Yes, you can. We offer the `QuerySelector` and `QuerySelectorAll` methods, It will accept your query expression object.
-
-Cache a query expression object(or reused) will avoid re-compile XPath query expression, improve your query performance.
-
-#### XPath query object cache performance
-
-```
-goos: windows
-goarch: amd64
-pkg: github.com/antchfx/htmlquery
-BenchmarkSelectorCache-4 20000000 55.2 ns/op
-BenchmarkDisableSelectorCache-4 500000 3162 ns/op
-```
-
-#### How to disable caching?
-
-```
-htmlquery.DisableSelectorCache = true
-```
-
-Questions
-===
-Please let me know if you have any questions.
diff --git a/vendor/github.com/antchfx/htmlquery/cache.go b/vendor/github.com/antchfx/htmlquery/cache.go
deleted file mode 100644
index e27cd289741..00000000000
--- a/vendor/github.com/antchfx/htmlquery/cache.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package htmlquery
-
-import (
- "sync"
-
- "github.com/antchfx/xpath"
- "github.com/golang/groupcache/lru"
-)
-
-// DisableSelectorCache will disable caching for the query selector if value is true.
-var DisableSelectorCache = false
-
-// SelectorCacheMaxEntries allows how many selector object can be caching. Default is 50.
-// Will disable caching if SelectorCacheMaxEntries <= 0.
-var SelectorCacheMaxEntries = 50
-
-var (
- cacheOnce sync.Once
- cache *lru.Cache
- cacheMutex sync.Mutex
-)
-
-func getQuery(expr string) (*xpath.Expr, error) {
- if DisableSelectorCache || SelectorCacheMaxEntries <= 0 {
- return xpath.Compile(expr)
- }
- cacheOnce.Do(func() {
- cache = lru.New(SelectorCacheMaxEntries)
- })
- cacheMutex.Lock()
- defer cacheMutex.Unlock()
- if v, ok := cache.Get(expr); ok {
- return v.(*xpath.Expr), nil
- }
- v, err := xpath.Compile(expr)
- if err != nil {
- return nil, err
- }
- cache.Add(expr, v)
- return v, nil
-
-}
diff --git a/vendor/github.com/antchfx/htmlquery/query.go b/vendor/github.com/antchfx/htmlquery/query.go
deleted file mode 100644
index f6742f5486c..00000000000
--- a/vendor/github.com/antchfx/htmlquery/query.go
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
-Package htmlquery provides extract data from HTML documents using XPath expression.
-*/
-package htmlquery
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "io"
- "net/http"
- "os"
-
- "github.com/antchfx/xpath"
- "golang.org/x/net/html"
- "golang.org/x/net/html/charset"
-)
-
-var _ xpath.NodeNavigator = &NodeNavigator{}
-
-// CreateXPathNavigator creates a new xpath.NodeNavigator for the specified html.Node.
-func CreateXPathNavigator(top *html.Node) *NodeNavigator {
- return &NodeNavigator{curr: top, root: top, attr: -1}
-}
-
-// Find is like QueryAll but Will panics if the expression `expr` cannot be parsed.
-//
-// See `QueryAll()` function.
-func Find(top *html.Node, expr string) []*html.Node {
- nodes, err := QueryAll(top, expr)
- if err != nil {
- panic(err)
- }
- return nodes
-}
-
-// FindOne is like Query but will panics if the expression `expr` cannot be parsed.
-// See `Query()` function.
-func FindOne(top *html.Node, expr string) *html.Node {
- node, err := Query(top, expr)
- if err != nil {
- panic(err)
- }
- return node
-}
-
-// QueryAll searches the html.Node that matches by the specified XPath expr.
-// Return an error if the expression `expr` cannot be parsed.
-func QueryAll(top *html.Node, expr string) ([]*html.Node, error) {
- exp, err := getQuery(expr)
- if err != nil {
- return nil, err
- }
- nodes := QuerySelectorAll(top, exp)
- return nodes, nil
-}
-
-// Query runs the given XPath expression against the given html.Node and
-// returns the first matching html.Node, or nil if no matches are found.
-//
-// Returns an error if the expression `expr` cannot be parsed.
-func Query(top *html.Node, expr string) (*html.Node, error) {
- exp, err := getQuery(expr)
- if err != nil {
- return nil, err
- }
- return QuerySelector(top, exp), nil
-}
-
-// QuerySelector returns the first matched html.Node by the specified XPath selector.
-func QuerySelector(top *html.Node, selector *xpath.Expr) *html.Node {
- t := selector.Select(CreateXPathNavigator(top))
- if t.MoveNext() {
- return getCurrentNode(t.Current().(*NodeNavigator))
- }
- return nil
-}
-
-// QuerySelectorAll searches all of the html.Node that matches the specified XPath selectors.
-func QuerySelectorAll(top *html.Node, selector *xpath.Expr) []*html.Node {
- var elems []*html.Node
- t := selector.Select(CreateXPathNavigator(top))
- for t.MoveNext() {
- nav := t.Current().(*NodeNavigator)
- n := getCurrentNode(nav)
- elems = append(elems, n)
- }
- return elems
-}
-
-// LoadURL loads the HTML document from the specified URL.
-func LoadURL(url string) (*html.Node, error) {
- resp, err := http.Get(url)
- if err != nil {
- return nil, err
- }
- defer resp.Body.Close()
-
- r, err := charset.NewReader(resp.Body, resp.Header.Get("Content-Type"))
- if err != nil {
- return nil, err
- }
- return html.Parse(r)
-}
-
-// LoadDoc loads the HTML document from the specified file path.
-func LoadDoc(path string) (*html.Node, error) {
- f, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- return html.Parse(bufio.NewReader(f))
-}
-
-func getCurrentNode(n *NodeNavigator) *html.Node {
- if n.NodeType() == xpath.AttributeNode {
- childNode := &html.Node{
- Type: html.TextNode,
- Data: n.Value(),
- }
- return &html.Node{
- Type: html.ElementNode,
- Data: n.LocalName(),
- FirstChild: childNode,
- LastChild: childNode,
- }
-
- }
- return n.curr
-}
-
-// Parse returns the parse tree for the HTML from the given Reader.
-func Parse(r io.Reader) (*html.Node, error) {
- return html.Parse(r)
-}
-
-// InnerText returns the text between the start and end tags of the object.
-func InnerText(n *html.Node) string {
- var output func(*bytes.Buffer, *html.Node)
- output = func(buf *bytes.Buffer, n *html.Node) {
- switch n.Type {
- case html.TextNode:
- buf.WriteString(n.Data)
- return
- case html.CommentNode:
- return
- }
- for child := n.FirstChild; child != nil; child = child.NextSibling {
- output(buf, child)
- }
- }
-
- var buf bytes.Buffer
- output(&buf, n)
- return buf.String()
-}
-
-// SelectAttr returns the attribute value with the specified name.
-func SelectAttr(n *html.Node, name string) (val string) {
- if n == nil {
- return
- }
- if n.Type == html.ElementNode && n.Parent == nil && name == n.Data {
- return InnerText(n)
- }
- for _, attr := range n.Attr {
- if attr.Key == name {
- val = attr.Val
- break
- }
- }
- return
-}
-
-// ExistsAttr returns whether attribute with specified name exists.
-func ExistsAttr(n *html.Node, name string) bool {
- if n == nil {
- return false
- }
- for _, attr := range n.Attr {
- if attr.Key == name {
- return true
- }
- }
- return false
-}
-
-// OutputHTML returns the text including tags name.
-func OutputHTML(n *html.Node, self bool) string {
- var buf bytes.Buffer
- if self {
- html.Render(&buf, n)
- } else {
- for n := n.FirstChild; n != nil; n = n.NextSibling {
- html.Render(&buf, n)
- }
- }
- return buf.String()
-}
-
-type NodeNavigator struct {
- root, curr *html.Node
- attr int
-}
-
-func (h *NodeNavigator) Current() *html.Node {
- return h.curr
-}
-
-func (h *NodeNavigator) NodeType() xpath.NodeType {
- switch h.curr.Type {
- case html.CommentNode:
- return xpath.CommentNode
- case html.TextNode:
- return xpath.TextNode
- case html.DocumentNode:
- return xpath.RootNode
- case html.ElementNode:
- if h.attr != -1 {
- return xpath.AttributeNode
- }
- return xpath.ElementNode
- case html.DoctypeNode:
- // ignored declare and as Root-Node type.
- return xpath.RootNode
- }
- panic(fmt.Sprintf("unknown HTML node type: %v", h.curr.Type))
-}
-
-func (h *NodeNavigator) LocalName() string {
- if h.attr != -1 {
- return h.curr.Attr[h.attr].Key
- }
- return h.curr.Data
-}
-
-func (*NodeNavigator) Prefix() string {
- return ""
-}
-
-func (h *NodeNavigator) Value() string {
- switch h.curr.Type {
- case html.CommentNode:
- return h.curr.Data
- case html.ElementNode:
- if h.attr != -1 {
- return h.curr.Attr[h.attr].Val
- }
- return InnerText(h.curr)
- case html.TextNode:
- return h.curr.Data
- }
- return ""
-}
-
-func (h *NodeNavigator) Copy() xpath.NodeNavigator {
- n := *h
- return &n
-}
-
-func (h *NodeNavigator) MoveToRoot() {
- h.curr = h.root
-}
-
-func (h *NodeNavigator) MoveToParent() bool {
- if h.attr != -1 {
- h.attr = -1
- return true
- } else if node := h.curr.Parent; node != nil {
- h.curr = node
- return true
- }
- return false
-}
-
-func (h *NodeNavigator) MoveToNextAttribute() bool {
- if h.attr >= len(h.curr.Attr)-1 {
- return false
- }
- h.attr++
- return true
-}
-
-func (h *NodeNavigator) MoveToChild() bool {
- if h.attr != -1 {
- return false
- }
- if node := h.curr.FirstChild; node != nil {
- h.curr = node
- return true
- }
- return false
-}
-
-func (h *NodeNavigator) MoveToFirst() bool {
- if h.attr != -1 || h.curr.PrevSibling == nil {
- return false
- }
- for {
- node := h.curr.PrevSibling
- if node == nil {
- break
- }
- h.curr = node
- }
- return true
-}
-
-func (h *NodeNavigator) String() string {
- return h.Value()
-}
-
-func (h *NodeNavigator) MoveToNext() bool {
- if h.attr != -1 {
- return false
- }
- if node := h.curr.NextSibling; node != nil {
- h.curr = node
- return true
- }
- return false
-}
-
-func (h *NodeNavigator) MoveToPrevious() bool {
- if h.attr != -1 {
- return false
- }
- if node := h.curr.PrevSibling; node != nil {
- h.curr = node
- return true
- }
- return false
-}
-
-func (h *NodeNavigator) MoveTo(other xpath.NodeNavigator) bool {
- node, ok := other.(*NodeNavigator)
- if !ok || node.root != h.root {
- return false
- }
-
- h.curr = node.curr
- h.attr = node.attr
- return true
-}
diff --git a/vendor/github.com/antchfx/xpath/.gitignore b/vendor/github.com/antchfx/xpath/.gitignore
deleted file mode 100644
index 4d5d27b1d3a..00000000000
--- a/vendor/github.com/antchfx/xpath/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-# vscode
-.vscode
-debug
-*.test
-
-./build
-
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/.travis.yml b/vendor/github.com/antchfx/xpath/.travis.yml
deleted file mode 100644
index 6b63957a8c1..00000000000
--- a/vendor/github.com/antchfx/xpath/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-
-go:
- - 1.6
- - 1.9
- - '1.10'
-
-install:
- - go get github.com/mattn/goveralls
-
-script:
- - $HOME/gopath/bin/goveralls -service=travis-ci
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/LICENSE b/vendor/github.com/antchfx/xpath/LICENSE
deleted file mode 100644
index e14c37141c5..00000000000
--- a/vendor/github.com/antchfx/xpath/LICENSE
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/README.md b/vendor/github.com/antchfx/xpath/README.md
deleted file mode 100644
index 9a58a9fc38e..00000000000
--- a/vendor/github.com/antchfx/xpath/README.md
+++ /dev/null
@@ -1,173 +0,0 @@
-XPath
-====
-[![GoDoc](https://godoc.org/github.com/antchfx/xpath?status.svg)](https://godoc.org/github.com/antchfx/xpath)
-[![Coverage Status](https://coveralls.io/repos/github/antchfx/xpath/badge.svg?branch=master)](https://coveralls.io/github/antchfx/xpath?branch=master)
-[![Build Status](https://travis-ci.org/antchfx/xpath.svg?branch=master)](https://travis-ci.org/antchfx/xpath)
-[![Go Report Card](https://goreportcard.com/badge/github.com/antchfx/xpath)](https://goreportcard.com/report/github.com/antchfx/xpath)
-
-XPath is Go package provides selecting nodes from XML, HTML or other documents using XPath expression.
-
-Implementation
-===
-
-- [htmlquery](https://github.com/antchfx/htmlquery) - an XPath query package for HTML document
-
-- [xmlquery](https://github.com/antchfx/xmlquery) - an XPath query package for XML document.
-
-- [jsonquery](https://github.com/antchfx/jsonquery) - an XPath query package for JSON document
-
-Supported Features
-===
-
-#### The basic XPath patterns.
-
-> The basic XPath patterns cover 90% of the cases that most stylesheets will need.
-
-- `node` : Selects all child elements with nodeName of node.
-
-- `*` : Selects all child elements.
-
-- `@attr` : Selects the attribute attr.
-
-- `@*` : Selects all attributes.
-
-- `node()` : Matches an org.w3c.dom.Node.
-
-- `text()` : Matches a org.w3c.dom.Text node.
-
-- `comment()` : Matches a comment.
-
-- `.` : Selects the current node.
-
-- `..` : Selects the parent of current node.
-
-- `/` : Selects the document node.
-
-- `a[expr]` : Select only those nodes matching a which also satisfy the expression expr.
-
-- `a[n]` : Selects the nth matching node matching a When a filter's expression is a number, XPath selects based on position.
-
-- `a/b` : For each node matching a, add the nodes matching b to the result.
-
-- `a//b` : For each node matching a, add the descendant nodes matching b to the result.
-
-- `//b` : Returns elements in the entire document matching b.
-
-- `a|b` : All nodes matching a or b, union operation(not boolean or).
-
-- `(a, b, c)` : Evaluates each of its operands and concatenates the resulting sequences, in order, into a single result sequence
-
-
-#### Node Axes
-
-- `child::*` : The child axis selects children of the current node.
-
-- `descendant::*` : The descendant axis selects descendants of the current node. It is equivalent to '//'.
-
-- `descendant-or-self::*` : Selects descendants including the current node.
-
-- `attribute::*` : Selects attributes of the current element. It is equivalent to @*
-
-- `following-sibling::*` : Selects nodes after the current node.
-
-- `preceding-sibling::*` : Selects nodes before the current node.
-
-- `following::*` : Selects the first matching node following in document order, excluding descendants.
-
-- `preceding::*` : Selects the first matching node preceding in document order, excluding ancestors.
-
-- `parent::*` : Selects the parent if it matches. The '..' pattern from the core is equivalent to 'parent::node()'.
-
-- `ancestor::*` : Selects matching ancestors.
-
-- `ancestor-or-self::*` : Selects ancestors including the current node.
-
-- `self::*` : Selects the current node. '.' is equivalent to 'self::node()'.
-
-#### Expressions
-
- The gxpath supported three types: number, boolean, string.
-
-- `path` : Selects nodes based on the path.
-
-- `a = b` : Standard comparisons.
-
- * a = b True if a equals b.
- * a != b True if a is not equal to b.
- * a < b True if a is less than b.
- * a <= b True if a is less than or equal to b.
- * a > b True if a is greater than b.
- * a >= b True if a is greater than or equal to b.
-
-- `a + b` : Arithmetic expressions.
-
- * `- a` Unary minus
- * a + b Add
- * a - b Substract
- * a * b Multiply
- * a div b Divide
- * a mod b Floating point mod, like Java.
-
-- `a or b` : Boolean `or` operation.
-
-- `a and b` : Boolean `and` operation.
-
-- `(expr)` : Parenthesized expressions.
-
-- `fun(arg1, ..., argn)` : Function calls:
-
-| Function | Supported |
-| --- | --- |
-`boolean()`| ✓ |
-`ceiling()`| ✓ |
-`choose()`| ✗ |
-`concat()`| ✓ |
-`contains()`| ✓ |
-`count()`| ✓ |
-`current()`| ✗ |
-`document()`| ✗ |
-`element-available()`| ✗ |
-`ends-with()`| ✓ |
-`false()`| ✓ |
-`floor()`| ✓ |
-`format-number()`| ✗ |
-`function-available()`| ✗ |
-`generate-id()`| ✗ |
-`id()`| ✗ |
-`key()`| ✗ |
-`lang()`| ✗ |
-`last()`| ✓ |
-`local-name()`| ✓ |
-`matches()`| ✓ |
-`name()`| ✓ |
-`namespace-uri()`| ✓ |
-`normalize-space()`| ✓ |
-`not()`| ✓ |
-`number()`| ✓ |
-`position()`| ✓ |
-`replace()`| ✓ |
-`reverse()`| ✓ |
-`round()`| ✓ |
-`starts-with()`| ✓ |
-`string()`| ✓ |
-`string-length()`| ✓ |
-`substring()`| ✓ |
-`substring-after()`| ✓ |
-`substring-before()`| ✓ |
-`sum()`| ✓ |
-`system-property()`| ✗ |
-`translate()`| ✓ |
-`true()`| ✓ |
-`unparsed-entity-url()` | ✗ |
-
-Changelogs
-===
-
-2019-03-19
-- optimize XPath `|` operation performance. [#33](https://github.com/antchfx/xpath/issues/33). Tips: suggest split into multiple subquery if you have a lot of `|` operations.
-
-2019-01-29
-- improvement `normalize-space` function. [#32](https://github.com/antchfx/xpath/issues/32)
-
-2018-12-07
-- supports XPath 2.0 Sequence expressions. [#30](https://github.com/antchfx/xpath/pull/30) by [@minherz](https://github.com/minherz).
\ No newline at end of file
diff --git a/vendor/github.com/antchfx/xpath/build.go b/vendor/github.com/antchfx/xpath/build.go
deleted file mode 100644
index 58d8f316e48..00000000000
--- a/vendor/github.com/antchfx/xpath/build.go
+++ /dev/null
@@ -1,545 +0,0 @@
-package xpath
-
-import (
- "errors"
- "fmt"
-)
-
-type flag int
-
-const (
- noneFlag flag = iota
- filterFlag
-)
-
-// builder provides building an XPath expressions.
-type builder struct {
- depth int
- flag flag
- firstInput query
-}
-
-// axisPredicate creates a predicate to predicating for this axis node.
-func axisPredicate(root *axisNode) func(NodeNavigator) bool {
- // get current axix node type.
- typ := ElementNode
- switch root.AxeType {
- case "attribute":
- typ = AttributeNode
- case "self", "parent":
- typ = allNode
- default:
- switch root.Prop {
- case "comment":
- typ = CommentNode
- case "text":
- typ = TextNode
- // case "processing-instruction":
- // typ = ProcessingInstructionNode
- case "node":
- typ = allNode
- }
- }
- nametest := root.LocalName != "" || root.Prefix != ""
- predicate := func(n NodeNavigator) bool {
- if typ == n.NodeType() || typ == allNode || typ == TextNode {
- if nametest {
- if root.LocalName == n.LocalName() && root.Prefix == n.Prefix() {
- return true
- }
- } else {
- return true
- }
- }
- return false
- }
-
- return predicate
-}
-
-// processAxisNode processes a query for the XPath axis node.
-func (b *builder) processAxisNode(root *axisNode) (query, error) {
- var (
- err error
- qyInput query
- qyOutput query
- predicate = axisPredicate(root)
- )
-
- if root.Input == nil {
- qyInput = &contextQuery{}
- } else {
- if root.AxeType == "child" && (root.Input.Type() == nodeAxis) {
- if input := root.Input.(*axisNode); input.AxeType == "descendant-or-self" {
- var qyGrandInput query
- if input.Input != nil {
- qyGrandInput, _ = b.processNode(input.Input)
- } else {
- qyGrandInput = &contextQuery{}
- }
- // fix #20: https://github.com/antchfx/htmlquery/issues/20
- filter := func(n NodeNavigator) bool {
- v := predicate(n)
- switch root.Prop {
- case "text":
- v = v && n.NodeType() == TextNode
- case "comment":
- v = v && n.NodeType() == CommentNode
- }
- return v
- }
- qyOutput = &descendantQuery{Input: qyGrandInput, Predicate: filter, Self: true}
- return qyOutput, nil
- }
- }
- qyInput, err = b.processNode(root.Input)
- if err != nil {
- return nil, err
- }
- }
-
- switch root.AxeType {
- case "ancestor":
- qyOutput = &ancestorQuery{Input: qyInput, Predicate: predicate}
- case "ancestor-or-self":
- qyOutput = &ancestorQuery{Input: qyInput, Predicate: predicate, Self: true}
- case "attribute":
- qyOutput = &attributeQuery{Input: qyInput, Predicate: predicate}
- case "child":
- filter := func(n NodeNavigator) bool {
- v := predicate(n)
- switch root.Prop {
- case "text":
- v = v && n.NodeType() == TextNode
- case "node":
- v = v && (n.NodeType() == ElementNode || n.NodeType() == TextNode)
- case "comment":
- v = v && n.NodeType() == CommentNode
- }
- return v
- }
- qyOutput = &childQuery{Input: qyInput, Predicate: filter}
- case "descendant":
- qyOutput = &descendantQuery{Input: qyInput, Predicate: predicate}
- case "descendant-or-self":
- qyOutput = &descendantQuery{Input: qyInput, Predicate: predicate, Self: true}
- case "following":
- qyOutput = &followingQuery{Input: qyInput, Predicate: predicate}
- case "following-sibling":
- qyOutput = &followingQuery{Input: qyInput, Predicate: predicate, Sibling: true}
- case "parent":
- qyOutput = &parentQuery{Input: qyInput, Predicate: predicate}
- case "preceding":
- qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate}
- case "preceding-sibling":
- qyOutput = &precedingQuery{Input: qyInput, Predicate: predicate, Sibling: true}
- case "self":
- qyOutput = &selfQuery{Input: qyInput, Predicate: predicate}
- case "namespace":
- // haha,what will you do someting??
- default:
- err = fmt.Errorf("unknown axe type: %s", root.AxeType)
- return nil, err
- }
- return qyOutput, nil
-}
-
-// processFilterNode builds query for the XPath filter predicate.
-func (b *builder) processFilterNode(root *filterNode) (query, error) {
- b.flag |= filterFlag
-
- qyInput, err := b.processNode(root.Input)
- if err != nil {
- return nil, err
- }
- qyCond, err := b.processNode(root.Condition)
- if err != nil {
- return nil, err
- }
- qyOutput := &filterQuery{Input: qyInput, Predicate: qyCond}
- return qyOutput, nil
-}
-
-// processFunctionNode processes query for the XPath function node.
-func (b *builder) processFunctionNode(root *functionNode) (query, error) {
- var qyOutput query
- switch root.FuncName {
- case "starts-with":
- arg1, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- arg2, err := b.processNode(root.Args[1])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: startwithFunc(arg1, arg2)}
- case "ends-with":
- arg1, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- arg2, err := b.processNode(root.Args[1])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: endwithFunc(arg1, arg2)}
- case "contains":
- arg1, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- arg2, err := b.processNode(root.Args[1])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: containsFunc(arg1, arg2)}
- case "matches":
- //matches(string , pattern)
- if len(root.Args) != 2 {
- return nil, errors.New("xpath: matches function must have two parameters")
- }
- var (
- arg1, arg2 query
- err error
- )
- if arg1, err = b.processNode(root.Args[0]); err != nil {
- return nil, err
- }
- if arg2, err = b.processNode(root.Args[1]); err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: matchesFunc(arg1, arg2)}
- case "substring":
- //substring( string , start [, length] )
- if len(root.Args) < 2 {
- return nil, errors.New("xpath: substring function must have at least two parameter")
- }
- var (
- arg1, arg2, arg3 query
- err error
- )
- if arg1, err = b.processNode(root.Args[0]); err != nil {
- return nil, err
- }
- if arg2, err = b.processNode(root.Args[1]); err != nil {
- return nil, err
- }
- if len(root.Args) == 3 {
- if arg3, err = b.processNode(root.Args[2]); err != nil {
- return nil, err
- }
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: substringFunc(arg1, arg2, arg3)}
- case "substring-before", "substring-after":
- //substring-xxxx( haystack, needle )
- if len(root.Args) != 2 {
- return nil, errors.New("xpath: substring-before function must have two parameters")
- }
- var (
- arg1, arg2 query
- err error
- )
- if arg1, err = b.processNode(root.Args[0]); err != nil {
- return nil, err
- }
- if arg2, err = b.processNode(root.Args[1]); err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{
- Input: b.firstInput,
- Func: substringIndFunc(arg1, arg2, root.FuncName == "substring-after"),
- }
- case "string-length":
- // string-length( [string] )
- if len(root.Args) < 1 {
- return nil, errors.New("xpath: string-length function must have at least one parameter")
- }
- arg1, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: stringLengthFunc(arg1)}
- case "normalize-space":
- if len(root.Args) == 0 {
- return nil, errors.New("xpath: normalize-space function must have at least one parameter")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: argQuery, Func: normalizespaceFunc}
- case "replace":
- //replace( string , string, string )
- if len(root.Args) != 3 {
- return nil, errors.New("xpath: replace function must have three parameters")
- }
- var (
- arg1, arg2, arg3 query
- err error
- )
- if arg1, err = b.processNode(root.Args[0]); err != nil {
- return nil, err
- }
- if arg2, err = b.processNode(root.Args[1]); err != nil {
- return nil, err
- }
- if arg3, err = b.processNode(root.Args[2]); err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: replaceFunc(arg1, arg2, arg3)}
- case "translate":
- //translate( string , string, string )
- if len(root.Args) != 3 {
- return nil, errors.New("xpath: translate function must have three parameters")
- }
- var (
- arg1, arg2, arg3 query
- err error
- )
- if arg1, err = b.processNode(root.Args[0]); err != nil {
- return nil, err
- }
- if arg2, err = b.processNode(root.Args[1]); err != nil {
- return nil, err
- }
- if arg3, err = b.processNode(root.Args[2]); err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: translateFunc(arg1, arg2, arg3)}
- case "not":
- if len(root.Args) == 0 {
- return nil, errors.New("xpath: not function must have at least one parameter")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: argQuery, Func: notFunc}
- case "name", "local-name", "namespace-uri":
- if len(root.Args) > 1 {
- return nil, fmt.Errorf("xpath: %s function must have at most one parameter", root.FuncName)
- }
- var (
- arg query
- err error
- )
- if len(root.Args) == 1 {
- arg, err = b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- }
- switch root.FuncName {
- case "name":
- qyOutput = &functionQuery{Input: b.firstInput, Func: nameFunc(arg)}
- case "local-name":
- qyOutput = &functionQuery{Input: b.firstInput, Func: localNameFunc(arg)}
- case "namespace-uri":
- qyOutput = &functionQuery{Input: b.firstInput, Func: namespaceFunc(arg)}
- }
- case "true", "false":
- val := root.FuncName == "true"
- qyOutput = &functionQuery{
- Input: b.firstInput,
- Func: func(_ query, _ iterator) interface{} {
- return val
- },
- }
- case "last":
- qyOutput = &functionQuery{Input: b.firstInput, Func: lastFunc}
- case "position":
- qyOutput = &functionQuery{Input: b.firstInput, Func: positionFunc}
- case "boolean", "number", "string":
- inp := b.firstInput
- if len(root.Args) > 1 {
- return nil, fmt.Errorf("xpath: %s function must have at most one parameter", root.FuncName)
- }
- if len(root.Args) == 1 {
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- inp = argQuery
- }
- f := &functionQuery{Input: inp}
- switch root.FuncName {
- case "boolean":
- f.Func = booleanFunc
- case "string":
- f.Func = stringFunc
- case "number":
- f.Func = numberFunc
- }
- qyOutput = f
- case "count":
- //if b.firstInput == nil {
- // return nil, errors.New("xpath: expression must evaluate to node-set")
- //}
- if len(root.Args) == 0 {
- return nil, fmt.Errorf("xpath: count(node-sets) function must with have parameters node-sets")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: argQuery, Func: countFunc}
- case "sum":
- if len(root.Args) == 0 {
- return nil, fmt.Errorf("xpath: sum(node-sets) function must with have parameters node-sets")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &functionQuery{Input: argQuery, Func: sumFunc}
- case "ceiling", "floor", "round":
- if len(root.Args) == 0 {
- return nil, fmt.Errorf("xpath: ceiling(node-sets) function must with have parameters node-sets")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- f := &functionQuery{Input: argQuery}
- switch root.FuncName {
- case "ceiling":
- f.Func = ceilingFunc
- case "floor":
- f.Func = floorFunc
- case "round":
- f.Func = roundFunc
- }
- qyOutput = f
- case "concat":
- if len(root.Args) < 2 {
- return nil, fmt.Errorf("xpath: concat() must have at least two arguments")
- }
- var args []query
- for _, v := range root.Args {
- q, err := b.processNode(v)
- if err != nil {
- return nil, err
- }
- args = append(args, q)
- }
- qyOutput = &functionQuery{Input: b.firstInput, Func: concatFunc(args...)}
- case "reverse":
- if len(root.Args) == 0 {
- return nil, fmt.Errorf("xpath: reverse(node-sets) function must with have parameters node-sets")
- }
- argQuery, err := b.processNode(root.Args[0])
- if err != nil {
- return nil, err
- }
- qyOutput = &transformFunctionQuery{Input: argQuery, Func: reverseFunc}
- default:
- return nil, fmt.Errorf("not yet support this function %s()", root.FuncName)
- }
- return qyOutput, nil
-}
-
-func (b *builder) processOperatorNode(root *operatorNode) (query, error) {
- left, err := b.processNode(root.Left)
- if err != nil {
- return nil, err
- }
- right, err := b.processNode(root.Right)
- if err != nil {
- return nil, err
- }
- var qyOutput query
- switch root.Op {
- case "+", "-", "*", "div", "mod": // Numeric operator
- var exprFunc func(interface{}, interface{}) interface{}
- switch root.Op {
- case "+":
- exprFunc = plusFunc
- case "-":
- exprFunc = minusFunc
- case "*":
- exprFunc = mulFunc
- case "div":
- exprFunc = divFunc
- case "mod":
- exprFunc = modFunc
- }
- qyOutput = &numericQuery{Left: left, Right: right, Do: exprFunc}
- case "=", ">", ">=", "<", "<=", "!=":
- var exprFunc func(iterator, interface{}, interface{}) interface{}
- switch root.Op {
- case "=":
- exprFunc = eqFunc
- case ">":
- exprFunc = gtFunc
- case ">=":
- exprFunc = geFunc
- case "<":
- exprFunc = ltFunc
- case "<=":
- exprFunc = leFunc
- case "!=":
- exprFunc = neFunc
- }
- qyOutput = &logicalQuery{Left: left, Right: right, Do: exprFunc}
- case "or", "and":
- isOr := false
- if root.Op == "or" {
- isOr = true
- }
- qyOutput = &booleanQuery{Left: left, Right: right, IsOr: isOr}
- case "|":
- qyOutput = &unionQuery{Left: left, Right: right}
- }
- return qyOutput, nil
-}
-
-func (b *builder) processNode(root node) (q query, err error) {
- if b.depth = b.depth + 1; b.depth > 1024 {
- err = errors.New("the xpath expressions is too complex")
- return
- }
-
- switch root.Type() {
- case nodeConstantOperand:
- n := root.(*operandNode)
- q = &constantQuery{Val: n.Val}
- case nodeRoot:
- q = &contextQuery{Root: true}
- case nodeAxis:
- q, err = b.processAxisNode(root.(*axisNode))
- b.firstInput = q
- case nodeFilter:
- q, err = b.processFilterNode(root.(*filterNode))
- case nodeFunction:
- q, err = b.processFunctionNode(root.(*functionNode))
- case nodeOperator:
- q, err = b.processOperatorNode(root.(*operatorNode))
- case nodeGroup:
- q, err = b.processNode(root.(*groupNode).Input)
- if err != nil {
- return
- }
- q = &groupQuery{Input: q}
- }
- return
-}
-
-// build builds a specified XPath expressions expr.
-func build(expr string) (q query, err error) {
- defer func() {
- if e := recover(); e != nil {
- switch x := e.(type) {
- case string:
- err = errors.New(x)
- case error:
- err = x
- default:
- err = errors.New("unknown panic")
- }
- }
- }()
- root := parse(expr)
- b := &builder{}
- return b.processNode(root)
-}
diff --git a/vendor/github.com/antchfx/xpath/cache.go b/vendor/github.com/antchfx/xpath/cache.go
deleted file mode 100644
index 31a2b335656..00000000000
--- a/vendor/github.com/antchfx/xpath/cache.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package xpath
-
-import (
- "regexp"
- "sync"
-)
-
-type loadFunc func(key interface{}) (interface{}, error)
-
-const (
- defaultCap = 65536
-)
-
-// The reason we're building a simple capacity-resetting loading cache (when capacity reached) instead of using
-// something like github.com/hashicorp/golang-lru is primarily due to (not wanting to create) external dependency.
-// Currently this library has 0 external dep (other than go sdk), and supports go 1.6, 1.9, and 1.10 (and later).
-// Creating external lib dependencies (plus their transitive dependencies) would make things hard if not impossible.
-// We expect under most circumstances, the defaultCap is big enough for any long running services that use this
-// library if their xpath regexp cardinality is low. However, in extreme cases when the capacity is reached, we
-// simply reset the cache, taking a small subsequent perf hit (next to nothing considering amortization) in trade
-// of more complex and less performant LRU type of construct.
-type loadingCache struct {
- sync.RWMutex
- cap int
- load loadFunc
- m map[interface{}]interface{}
- reset int
-}
-
-// NewLoadingCache creates a new instance of a loading cache with capacity. Capacity must be >= 0, or
-// it will panic. Capacity == 0 means the cache growth is unbounded.
-func NewLoadingCache(load loadFunc, capacity int) *loadingCache {
- if capacity < 0 {
- panic("capacity must be >= 0")
- }
- return &loadingCache{cap: capacity, load: load, m: make(map[interface{}]interface{})}
-}
-
-func (c *loadingCache) get(key interface{}) (interface{}, error) {
- c.RLock()
- v, found := c.m[key]
- c.RUnlock()
- if found {
- return v, nil
- }
- v, err := c.load(key)
- if err != nil {
- return nil, err
- }
- c.Lock()
- if c.cap > 0 && len(c.m) >= c.cap {
- c.m = map[interface{}]interface{}{key: v}
- c.reset++
- } else {
- c.m[key] = v
- }
- c.Unlock()
- return v, nil
-}
-
-var (
- // RegexpCache is a loading cache for string -> *regexp.Regexp mapping. It is exported so that in rare cases
- // client can customize load func and/or capacity.
- RegexpCache = defaultRegexpCache()
-)
-
-func defaultRegexpCache() *loadingCache {
- return NewLoadingCache(
- func(key interface{}) (interface{}, error) {
- return regexp.Compile(key.(string))
- }, defaultCap)
-}
-
-func getRegexp(pattern string) (*regexp.Regexp, error) {
- exp, err := RegexpCache.get(pattern)
- if err != nil {
- return nil, err
- }
- return exp.(*regexp.Regexp), nil
-}
diff --git a/vendor/github.com/antchfx/xpath/func.go b/vendor/github.com/antchfx/xpath/func.go
deleted file mode 100644
index fd4187ba5a6..00000000000
--- a/vendor/github.com/antchfx/xpath/func.go
+++ /dev/null
@@ -1,614 +0,0 @@
-package xpath
-
-import (
- "errors"
- "fmt"
- "math"
- "strconv"
- "strings"
- "sync"
- "unicode"
-)
-
-// Defined an interface of stringBuilder that compatible with
-// strings.Builder(go 1.10) and bytes.Buffer(< go 1.10)
-type stringBuilder interface {
- WriteRune(r rune) (n int, err error)
- WriteString(s string) (int, error)
- Reset()
- Grow(n int)
- String() string
-}
-
-var builderPool = sync.Pool{New: func() interface{} {
- return newStringBuilder()
-}}
-
-// The XPath function list.
-
-func predicate(q query) func(NodeNavigator) bool {
- type Predicater interface {
- Test(NodeNavigator) bool
- }
- if p, ok := q.(Predicater); ok {
- return p.Test
- }
- return func(NodeNavigator) bool { return true }
-}
-
-// positionFunc is a XPath Node Set functions position().
-func positionFunc(q query, t iterator) interface{} {
- var (
- count = 1
- node = t.Current().Copy()
- )
- test := predicate(q)
- for node.MoveToPrevious() {
- if test(node) {
- count++
- }
- }
- return float64(count)
-}
-
-// lastFunc is a XPath Node Set functions last().
-func lastFunc(q query, t iterator) interface{} {
- var (
- count = 0
- node = t.Current().Copy()
- )
- node.MoveToFirst()
- test := predicate(q)
- for {
- if test(node) {
- count++
- }
- if !node.MoveToNext() {
- break
- }
- }
- return float64(count)
-}
-
-// countFunc is a XPath Node Set functions count(node-set).
-func countFunc(q query, t iterator) interface{} {
- var count = 0
- q = functionArgs(q)
- test := predicate(q)
- switch typ := q.Evaluate(t).(type) {
- case query:
- for node := typ.Select(t); node != nil; node = typ.Select(t) {
- if test(node) {
- count++
- }
- }
- }
- return float64(count)
-}
-
-// sumFunc is a XPath Node Set functions sum(node-set).
-func sumFunc(q query, t iterator) interface{} {
- var sum float64
- switch typ := functionArgs(q).Evaluate(t).(type) {
- case query:
- for node := typ.Select(t); node != nil; node = typ.Select(t) {
- if v, err := strconv.ParseFloat(node.Value(), 64); err == nil {
- sum += v
- }
- }
- case float64:
- sum = typ
- case string:
- v, err := strconv.ParseFloat(typ, 64)
- if err != nil {
- panic(errors.New("sum() function argument type must be a node-set or number"))
- }
- sum = v
- }
- return sum
-}
-
-func asNumber(t iterator, o interface{}) float64 {
- switch typ := o.(type) {
- case query:
- node := typ.Select(t)
- if node == nil {
- return float64(0)
- }
- if v, err := strconv.ParseFloat(node.Value(), 64); err == nil {
- return v
- }
- case float64:
- return typ
- case string:
- v, err := strconv.ParseFloat(typ, 64)
- if err != nil {
- panic(errors.New("ceiling() function argument type must be a node-set or number"))
- }
- return v
- }
- return 0
-}
-
-// ceilingFunc is a XPath Node Set functions ceiling(node-set).
-func ceilingFunc(q query, t iterator) interface{} {
- val := asNumber(t, functionArgs(q).Evaluate(t))
- return math.Ceil(val)
-}
-
-// floorFunc is a XPath Node Set functions floor(node-set).
-func floorFunc(q query, t iterator) interface{} {
- val := asNumber(t, functionArgs(q).Evaluate(t))
- return math.Floor(val)
-}
-
-// roundFunc is a XPath Node Set functions round(node-set).
-func roundFunc(q query, t iterator) interface{} {
- val := asNumber(t, functionArgs(q).Evaluate(t))
- //return math.Round(val)
- return round(val)
-}
-
-// nameFunc is a XPath functions name([node-set]).
-func nameFunc(arg query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var v NodeNavigator
- if arg == nil {
- v = t.Current()
- } else {
- v = arg.Clone().Select(t)
- if v == nil {
- return ""
- }
- }
- ns := v.Prefix()
- if ns == "" {
- return v.LocalName()
- }
- return ns + ":" + v.LocalName()
- }
-}
-
-// localNameFunc is a XPath functions local-name([node-set]).
-func localNameFunc(arg query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var v NodeNavigator
- if arg == nil {
- v = t.Current()
- } else {
- v = arg.Clone().Select(t)
- if v == nil {
- return ""
- }
- }
- return v.LocalName()
- }
-}
-
-// namespaceFunc is a XPath functions namespace-uri([node-set]).
-func namespaceFunc(arg query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var v NodeNavigator
- if arg == nil {
- v = t.Current()
- } else {
- // Get the first node in the node-set if specified.
- v = arg.Clone().Select(t)
- if v == nil {
- return ""
- }
- }
- // fix about namespace-uri() bug: https://github.com/antchfx/xmlquery/issues/22
- // TODO: In the next version, add NamespaceURL() to the NodeNavigator interface.
- type namespaceURL interface {
- NamespaceURL() string
- }
- if f, ok := v.(namespaceURL); ok {
- return f.NamespaceURL()
- }
- return v.Prefix()
- }
-}
-
-func asBool(t iterator, v interface{}) bool {
- switch v := v.(type) {
- case nil:
- return false
- case *NodeIterator:
- return v.MoveNext()
- case bool:
- return v
- case float64:
- return v != 0
- case string:
- return v != ""
- case query:
- return v.Select(t) != nil
- default:
- panic(fmt.Errorf("unexpected type: %T", v))
- }
-}
-
-func asString(t iterator, v interface{}) string {
- switch v := v.(type) {
- case nil:
- return ""
- case bool:
- if v {
- return "true"
- }
- return "false"
- case float64:
- return strconv.FormatFloat(v, 'g', -1, 64)
- case string:
- return v
- case query:
- node := v.Select(t)
- if node == nil {
- return ""
- }
- return node.Value()
- default:
- panic(fmt.Errorf("unexpected type: %T", v))
- }
-}
-
-// booleanFunc is a XPath functions boolean([node-set]).
-func booleanFunc(q query, t iterator) interface{} {
- v := functionArgs(q).Evaluate(t)
- return asBool(t, v)
-}
-
-// numberFunc is a XPath functions number([node-set]).
-func numberFunc(q query, t iterator) interface{} {
- v := functionArgs(q).Evaluate(t)
- return asNumber(t, v)
-}
-
-// stringFunc is a XPath functions string([node-set]).
-func stringFunc(q query, t iterator) interface{} {
- v := functionArgs(q).Evaluate(t)
- return asString(t, v)
-}
-
-// startwithFunc is a XPath functions starts-with(string, string).
-func startwithFunc(arg1, arg2 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var (
- m, n string
- ok bool
- )
- switch typ := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- m = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return false
- }
- m = node.Value()
- default:
- panic(errors.New("starts-with() function argument type must be string"))
- }
- n, ok = functionArgs(arg2).Evaluate(t).(string)
- if !ok {
- panic(errors.New("starts-with() function argument type must be string"))
- }
- return strings.HasPrefix(m, n)
- }
-}
-
-// endwithFunc is a XPath functions ends-with(string, string).
-func endwithFunc(arg1, arg2 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var (
- m, n string
- ok bool
- )
- switch typ := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- m = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return false
- }
- m = node.Value()
- default:
- panic(errors.New("ends-with() function argument type must be string"))
- }
- n, ok = functionArgs(arg2).Evaluate(t).(string)
- if !ok {
- panic(errors.New("ends-with() function argument type must be string"))
- }
- return strings.HasSuffix(m, n)
- }
-}
-
-// containsFunc is a XPath functions contains(string or @attr, string).
-func containsFunc(arg1, arg2 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var (
- m, n string
- ok bool
- )
- switch typ := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- m = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return false
- }
- m = node.Value()
- default:
- panic(errors.New("contains() function argument type must be string"))
- }
-
- n, ok = functionArgs(arg2).Evaluate(t).(string)
- if !ok {
- panic(errors.New("contains() function argument type must be string"))
- }
-
- return strings.Contains(m, n)
- }
-}
-
-// matchesFunc is an XPath function that tests a given string against a regexp pattern.
-// Note: does not support https://www.w3.org/TR/xpath-functions-31/#func-matches 3rd optional `flags` argument; if
-// needed, directly put flags in the regexp pattern, such as `(?i)^pattern$` for `i` flag.
-func matchesFunc(arg1, arg2 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var s string
- switch typ := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- s = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return ""
- }
- s = node.Value()
- }
- var pattern string
- var ok bool
- if pattern, ok = functionArgs(arg2).Evaluate(t).(string); !ok {
- panic(errors.New("matches() function second argument type must be string"))
- }
- re, err := getRegexp(pattern)
- if err != nil {
- panic(fmt.Errorf("matches() function second argument is not a valid regexp pattern, err: %s", err.Error()))
- }
- return re.MatchString(s)
- }
-}
-
-// normalizespaceFunc is XPath functions normalize-space(string?)
-func normalizespaceFunc(q query, t iterator) interface{} {
- var m string
- switch typ := functionArgs(q).Evaluate(t).(type) {
- case string:
- m = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return ""
- }
- m = node.Value()
- }
- var b = builderPool.Get().(stringBuilder)
- b.Grow(len(m))
-
- runeStr := []rune(strings.TrimSpace(m))
- l := len(runeStr)
- for i := range runeStr {
- r := runeStr[i]
- isSpace := unicode.IsSpace(r)
- if !(isSpace && (i+1 < l && unicode.IsSpace(runeStr[i+1]))) {
- if isSpace {
- r = ' '
- }
- b.WriteRune(r)
- }
- }
- result := b.String()
- b.Reset()
- builderPool.Put(b)
-
- return result
-}
-
-// substringFunc is XPath functions substring function returns a part of a given string.
-func substringFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var m string
- switch typ := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- m = typ
- case query:
- node := typ.Select(t)
- if node == nil {
- return ""
- }
- m = node.Value()
- }
-
- var start, length float64
- var ok bool
-
- if start, ok = functionArgs(arg2).Evaluate(t).(float64); !ok {
- panic(errors.New("substring() function first argument type must be int"))
- } else if start < 1 {
- panic(errors.New("substring() function first argument type must be >= 1"))
- }
- start--
- if arg3 != nil {
- if length, ok = functionArgs(arg3).Evaluate(t).(float64); !ok {
- panic(errors.New("substring() function second argument type must be int"))
- }
- }
- if (len(m) - int(start)) < int(length) {
- panic(errors.New("substring() function start and length argument out of range"))
- }
- if length > 0 {
- return m[int(start):int(length+start)]
- }
- return m[int(start):]
- }
-}
-
-// substringIndFunc is XPath functions substring-before/substring-after function returns a part of a given string.
-func substringIndFunc(arg1, arg2 query, after bool) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- var str string
- switch v := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- str = v
- case query:
- node := v.Select(t)
- if node == nil {
- return ""
- }
- str = node.Value()
- }
- var word string
- switch v := functionArgs(arg2).Evaluate(t).(type) {
- case string:
- word = v
- case query:
- node := v.Select(t)
- if node == nil {
- return ""
- }
- word = node.Value()
- }
- if word == "" {
- return ""
- }
-
- i := strings.Index(str, word)
- if i < 0 {
- return ""
- }
- if after {
- return str[i+len(word):]
- }
- return str[:i]
- }
-}
-
-// stringLengthFunc is XPATH string-length( [string] ) function that returns a number
-// equal to the number of characters in a given string.
-func stringLengthFunc(arg1 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- switch v := functionArgs(arg1).Evaluate(t).(type) {
- case string:
- return float64(len(v))
- case query:
- node := v.Select(t)
- if node == nil {
- break
- }
- return float64(len(node.Value()))
- }
- return float64(0)
- }
-}
-
-// translateFunc is XPath functions translate() function returns a replaced string.
-func translateFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- str := asString(t, functionArgs(arg1).Evaluate(t))
- src := asString(t, functionArgs(arg2).Evaluate(t))
- dst := asString(t, functionArgs(arg3).Evaluate(t))
-
- replace := make([]string, 0, len(src))
- for i, s := range src {
- d := ""
- if i < len(dst) {
- d = string(dst[i])
- }
- replace = append(replace, string(s), d)
- }
- return strings.NewReplacer(replace...).Replace(str)
- }
-}
-
-// replaceFunc is XPath functions replace() function returns a replaced string.
-func replaceFunc(arg1, arg2, arg3 query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- str := asString(t, functionArgs(arg1).Evaluate(t))
- src := asString(t, functionArgs(arg2).Evaluate(t))
- dst := asString(t, functionArgs(arg3).Evaluate(t))
-
- return strings.Replace(str, src, dst, -1)
- }
-}
-
-// notFunc is XPATH functions not(expression) function operation.
-func notFunc(q query, t iterator) interface{} {
- switch v := functionArgs(q).Evaluate(t).(type) {
- case bool:
- return !v
- case query:
- node := v.Select(t)
- return node == nil
- default:
- return false
- }
-}
-
-// concatFunc is the concat function concatenates two or more
-// strings and returns the resulting string.
-// concat( string1 , string2 [, stringn]* )
-func concatFunc(args ...query) func(query, iterator) interface{} {
- return func(q query, t iterator) interface{} {
- b := builderPool.Get().(stringBuilder)
- for _, v := range args {
- v = functionArgs(v)
-
- switch v := v.Evaluate(t).(type) {
- case string:
- b.WriteString(v)
- case query:
- node := v.Select(t)
- if node != nil {
- b.WriteString(node.Value())
- }
- }
- }
- result := b.String()
- b.Reset()
- builderPool.Put(b)
-
- return result
- }
-}
-
-// https://github.com/antchfx/xpath/issues/43
-func functionArgs(q query) query {
- if _, ok := q.(*functionQuery); ok {
- return q
- }
- return q.Clone()
-}
-
-func reverseFunc(q query, t iterator) func() NodeNavigator {
- var list []NodeNavigator
- for {
- node := q.Select(t)
- if node == nil {
- break
- }
- list = append(list, node.Copy())
- }
- i := len(list)
- return func() NodeNavigator {
- if i <= 0 {
- return nil
- }
- i--
- node := list[i]
- return node
- }
-}
diff --git a/vendor/github.com/antchfx/xpath/func_go110.go b/vendor/github.com/antchfx/xpath/func_go110.go
deleted file mode 100644
index 6df30d3d7c2..00000000000
--- a/vendor/github.com/antchfx/xpath/func_go110.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build go1.10
-
-package xpath
-
-import (
- "math"
- "strings"
-)
-
-func round(f float64) int {
- return int(math.Round(f))
-}
-
-func newStringBuilder() stringBuilder{
- return &strings.Builder{}
-}
diff --git a/vendor/github.com/antchfx/xpath/func_pre_go110.go b/vendor/github.com/antchfx/xpath/func_pre_go110.go
deleted file mode 100644
index 335141f79f5..00000000000
--- a/vendor/github.com/antchfx/xpath/func_pre_go110.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build !go1.10
-
-package xpath
-
-import (
- "bytes"
- "math"
-)
-
-// math.Round() is supported by Go 1.10+,
-// This method just compatible for version <1.10.
-// https://github.com/golang/go/issues/20100
-func round(f float64) int {
- if math.Abs(f) < 0.5 {
- return 0
- }
- return int(f + math.Copysign(0.5, f))
-}
-
-func newStringBuilder() stringBuilder {
- return &bytes.Buffer{}
-}
diff --git a/vendor/github.com/antchfx/xpath/operator.go b/vendor/github.com/antchfx/xpath/operator.go
deleted file mode 100644
index 8c2f31f86c8..00000000000
--- a/vendor/github.com/antchfx/xpath/operator.go
+++ /dev/null
@@ -1,305 +0,0 @@
-package xpath
-
-import (
- "fmt"
- "reflect"
- "strconv"
-)
-
-// The XPath number operator function list.
-
-// valueType is a return value type.
-type valueType int
-
-const (
- booleanType valueType = iota
- numberType
- stringType
- nodeSetType
-)
-
-func getValueType(i interface{}) valueType {
- v := reflect.ValueOf(i)
- switch v.Kind() {
- case reflect.Float64:
- return numberType
- case reflect.String:
- return stringType
- case reflect.Bool:
- return booleanType
- default:
- if _, ok := i.(query); ok {
- return nodeSetType
- }
- }
- panic(fmt.Errorf("xpath unknown value type: %v", v.Kind()))
-}
-
-type logical func(iterator, string, interface{}, interface{}) bool
-
-var logicalFuncs = [][]logical{
- {cmpBooleanBoolean, nil, nil, nil},
- {nil, cmpNumericNumeric, cmpNumericString, cmpNumericNodeSet},
- {nil, cmpStringNumeric, cmpStringString, cmpStringNodeSet},
- {nil, cmpNodeSetNumeric, cmpNodeSetString, cmpNodeSetNodeSet},
-}
-
-// number vs number
-func cmpNumberNumberF(op string, a, b float64) bool {
- switch op {
- case "=":
- return a == b
- case ">":
- return a > b
- case "<":
- return a < b
- case ">=":
- return a >= b
- case "<=":
- return a <= b
- case "!=":
- return a != b
- }
- return false
-}
-
-// string vs string
-func cmpStringStringF(op string, a, b string) bool {
- switch op {
- case "=":
- return a == b
- case ">":
- return a > b
- case "<":
- return a < b
- case ">=":
- return a >= b
- case "<=":
- return a <= b
- case "!=":
- return a != b
- }
- return false
-}
-
-func cmpBooleanBooleanF(op string, a, b bool) bool {
- switch op {
- case "or":
- return a || b
- case "and":
- return a && b
- }
- return false
-}
-
-func cmpNumericNumeric(t iterator, op string, m, n interface{}) bool {
- a := m.(float64)
- b := n.(float64)
- return cmpNumberNumberF(op, a, b)
-}
-
-func cmpNumericString(t iterator, op string, m, n interface{}) bool {
- a := m.(float64)
- b := n.(string)
- num, err := strconv.ParseFloat(b, 64)
- if err != nil {
- panic(err)
- }
- return cmpNumberNumberF(op, a, num)
-}
-
-func cmpNumericNodeSet(t iterator, op string, m, n interface{}) bool {
- a := m.(float64)
- b := n.(query)
-
- for {
- node := b.Select(t)
- if node == nil {
- break
- }
- num, err := strconv.ParseFloat(node.Value(), 64)
- if err != nil {
- panic(err)
- }
- if cmpNumberNumberF(op, a, num) {
- return true
- }
- }
- return false
-}
-
-func cmpNodeSetNumeric(t iterator, op string, m, n interface{}) bool {
- a := m.(query)
- b := n.(float64)
- for {
- node := a.Select(t)
- if node == nil {
- break
- }
- num, err := strconv.ParseFloat(node.Value(), 64)
- if err != nil {
- panic(err)
- }
- if cmpNumberNumberF(op, num, b) {
- return true
- }
- }
- return false
-}
-
-func cmpNodeSetString(t iterator, op string, m, n interface{}) bool {
- a := m.(query)
- b := n.(string)
- for {
- node := a.Select(t)
- if node == nil {
- break
- }
- if cmpStringStringF(op, b, node.Value()) {
- return true
- }
- }
- return false
-}
-
-func cmpNodeSetNodeSet(t iterator, op string, m, n interface{}) bool {
- a := m.(query)
- b := n.(query)
- x := a.Select(t)
- if x == nil {
- return false
- }
- y := b.Select(t)
- if y == nil {
- return false
- }
- return cmpStringStringF(op, x.Value(), y.Value())
-}
-
-func cmpStringNumeric(t iterator, op string, m, n interface{}) bool {
- a := m.(string)
- b := n.(float64)
- num, err := strconv.ParseFloat(a, 64)
- if err != nil {
- panic(err)
- }
- return cmpNumberNumberF(op, b, num)
-}
-
-func cmpStringString(t iterator, op string, m, n interface{}) bool {
- a := m.(string)
- b := n.(string)
- return cmpStringStringF(op, a, b)
-}
-
-func cmpStringNodeSet(t iterator, op string, m, n interface{}) bool {
- a := m.(string)
- b := n.(query)
- for {
- node := b.Select(t)
- if node == nil {
- break
- }
- if cmpStringStringF(op, a, node.Value()) {
- return true
- }
- }
- return false
-}
-
-func cmpBooleanBoolean(t iterator, op string, m, n interface{}) bool {
- a := m.(bool)
- b := n.(bool)
- return cmpBooleanBooleanF(op, a, b)
-}
-
-// eqFunc is an `=` operator.
-func eqFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, "=", m, n)
-}
-
-// gtFunc is an `>` operator.
-func gtFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, ">", m, n)
-}
-
-// geFunc is an `>=` operator.
-func geFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, ">=", m, n)
-}
-
-// ltFunc is an `<` operator.
-func ltFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, "<", m, n)
-}
-
-// leFunc is an `<=` operator.
-func leFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, "<=", m, n)
-}
-
-// neFunc is an `!=` operator.
-func neFunc(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, "!=", m, n)
-}
-
-// orFunc is an `or` operator.
-var orFunc = func(t iterator, m, n interface{}) interface{} {
- t1 := getValueType(m)
- t2 := getValueType(n)
- return logicalFuncs[t1][t2](t, "or", m, n)
-}
-
-func numericExpr(m, n interface{}, cb func(float64, float64) float64) float64 {
- typ := reflect.TypeOf(float64(0))
- a := reflect.ValueOf(m).Convert(typ)
- b := reflect.ValueOf(n).Convert(typ)
- return cb(a.Float(), b.Float())
-}
-
-// plusFunc is an `+` operator.
-var plusFunc = func(m, n interface{}) interface{} {
- return numericExpr(m, n, func(a, b float64) float64 {
- return a + b
- })
-}
-
-// minusFunc is an `-` operator.
-var minusFunc = func(m, n interface{}) interface{} {
- return numericExpr(m, n, func(a, b float64) float64 {
- return a - b
- })
-}
-
-// mulFunc is an `*` operator.
-var mulFunc = func(m, n interface{}) interface{} {
- return numericExpr(m, n, func(a, b float64) float64 {
- return a * b
- })
-}
-
-// divFunc is an `DIV` operator.
-var divFunc = func(m, n interface{}) interface{} {
- return numericExpr(m, n, func(a, b float64) float64 {
- return a / b
- })
-}
-
-// modFunc is an 'MOD' operator.
-var modFunc = func(m, n interface{}) interface{} {
- return numericExpr(m, n, func(a, b float64) float64 {
- return float64(int(a) % int(b))
- })
-}
diff --git a/vendor/github.com/antchfx/xpath/parse.go b/vendor/github.com/antchfx/xpath/parse.go
deleted file mode 100644
index acb0db9a7f7..00000000000
--- a/vendor/github.com/antchfx/xpath/parse.go
+++ /dev/null
@@ -1,1204 +0,0 @@
-package xpath
-
-import (
- "bytes"
- "errors"
- "fmt"
- "strconv"
- "unicode"
-)
-
-// A XPath expression token type.
-type itemType int
-
-const (
- itemComma itemType = iota // ','
- itemSlash // '/'
- itemAt // '@'
- itemDot // '.'
- itemLParens // '('
- itemRParens // ')'
- itemLBracket // '['
- itemRBracket // ']'
- itemStar // '*'
- itemPlus // '+'
- itemMinus // '-'
- itemEq // '='
- itemLt // '<'
- itemGt // '>'
- itemBang // '!'
- itemDollar // '$'
- itemApos // '\''
- itemQuote // '"'
- itemUnion // '|'
- itemNe // '!='
- itemLe // '<='
- itemGe // '>='
- itemAnd // '&&'
- itemOr // '||'
- itemDotDot // '..'
- itemSlashSlash // '//'
- itemName // XML Name
- itemString // Quoted string constant
- itemNumber // Number constant
- itemAxe // Axe (like child::)
- itemEOF // END
-)
-
-// A node is an XPath node in the parse tree.
-type node interface {
- Type() nodeType
-}
-
-// nodeType identifies the type of a parse tree node.
-type nodeType int
-
-func (t nodeType) Type() nodeType {
- return t
-}
-
-const (
- nodeRoot nodeType = iota
- nodeAxis
- nodeFilter
- nodeFunction
- nodeOperator
- nodeVariable
- nodeConstantOperand
- nodeGroup
-)
-
-type parser struct {
- r *scanner
- d int
-}
-
-// newOperatorNode returns new operator node OperatorNode.
-func newOperatorNode(op string, left, right node) node {
- return &operatorNode{nodeType: nodeOperator, Op: op, Left: left, Right: right}
-}
-
-// newOperand returns new constant operand node OperandNode.
-func newOperandNode(v interface{}) node {
- return &operandNode{nodeType: nodeConstantOperand, Val: v}
-}
-
-// newAxisNode returns new axis node AxisNode.
-func newAxisNode(axeTyp, localName, prefix, prop string, n node) node {
- return &axisNode{
- nodeType: nodeAxis,
- LocalName: localName,
- Prefix: prefix,
- AxeType: axeTyp,
- Prop: prop,
- Input: n,
- }
-}
-
-// newVariableNode returns new variable node VariableNode.
-func newVariableNode(prefix, name string) node {
- return &variableNode{nodeType: nodeVariable, Name: name, Prefix: prefix}
-}
-
-// newFilterNode returns a new filter node FilterNode.
-func newFilterNode(n, m node) node {
- return &filterNode{nodeType: nodeFilter, Input: n, Condition: m}
-}
-
-func newGroupNode(n node) node {
- return &groupNode{nodeType: nodeGroup, Input: n}
-}
-
-// newRootNode returns a root node.
-func newRootNode(s string) node {
- return &rootNode{nodeType: nodeRoot, slash: s}
-}
-
-// newFunctionNode returns function call node.
-func newFunctionNode(name, prefix string, args []node) node {
- return &functionNode{nodeType: nodeFunction, Prefix: prefix, FuncName: name, Args: args}
-}
-
-// testOp reports whether current item name is an operand op.
-func testOp(r *scanner, op string) bool {
- return r.typ == itemName && r.prefix == "" && r.name == op
-}
-
-func isPrimaryExpr(r *scanner) bool {
- switch r.typ {
- case itemString, itemNumber, itemDollar, itemLParens:
- return true
- case itemName:
- return r.canBeFunc && !isNodeType(r)
- }
- return false
-}
-
-func isNodeType(r *scanner) bool {
- switch r.name {
- case "node", "text", "processing-instruction", "comment":
- return r.prefix == ""
- }
- return false
-}
-
-func isStep(item itemType) bool {
- switch item {
- case itemDot, itemDotDot, itemAt, itemAxe, itemStar, itemName:
- return true
- }
- return false
-}
-
-func checkItem(r *scanner, typ itemType) {
- if r.typ != typ {
- panic(fmt.Sprintf("%s has an invalid token", r.text))
- }
-}
-
-// parseExpression parsing the expression with input node n.
-func (p *parser) parseExpression(n node) node {
- if p.d = p.d + 1; p.d > 200 {
- panic("the xpath query is too complex(depth > 200)")
- }
- n = p.parseOrExpr(n)
- p.d--
- return n
-}
-
-// next scanning next item on forward.
-func (p *parser) next() bool {
- return p.r.nextItem()
-}
-
-func (p *parser) skipItem(typ itemType) {
- checkItem(p.r, typ)
- p.next()
-}
-
-// OrExpr ::= AndExpr | OrExpr 'or' AndExpr
-func (p *parser) parseOrExpr(n node) node {
- opnd := p.parseAndExpr(n)
- for {
- if !testOp(p.r, "or") {
- break
- }
- p.next()
- opnd = newOperatorNode("or", opnd, p.parseAndExpr(n))
- }
- return opnd
-}
-
-// AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr
-func (p *parser) parseAndExpr(n node) node {
- opnd := p.parseEqualityExpr(n)
- for {
- if !testOp(p.r, "and") {
- break
- }
- p.next()
- opnd = newOperatorNode("and", opnd, p.parseEqualityExpr(n))
- }
- return opnd
-}
-
-// EqualityExpr ::= RelationalExpr | EqualityExpr '=' RelationalExpr | EqualityExpr '!=' RelationalExpr
-func (p *parser) parseEqualityExpr(n node) node {
- opnd := p.parseRelationalExpr(n)
-Loop:
- for {
- var op string
- switch p.r.typ {
- case itemEq:
- op = "="
- case itemNe:
- op = "!="
- default:
- break Loop
- }
- p.next()
- opnd = newOperatorNode(op, opnd, p.parseRelationalExpr(n))
- }
- return opnd
-}
-
-// RelationalExpr ::= AdditiveExpr | RelationalExpr '<' AdditiveExpr | RelationalExpr '>' AdditiveExpr
-// | RelationalExpr '<=' AdditiveExpr
-// | RelationalExpr '>=' AdditiveExpr
-func (p *parser) parseRelationalExpr(n node) node {
- opnd := p.parseAdditiveExpr(n)
-Loop:
- for {
- var op string
- switch p.r.typ {
- case itemLt:
- op = "<"
- case itemGt:
- op = ">"
- case itemLe:
- op = "<="
- case itemGe:
- op = ">="
- default:
- break Loop
- }
- p.next()
- opnd = newOperatorNode(op, opnd, p.parseAdditiveExpr(n))
- }
- return opnd
-}
-
-// AdditiveExpr ::= MultiplicativeExpr | AdditiveExpr '+' MultiplicativeExpr | AdditiveExpr '-' MultiplicativeExpr
-func (p *parser) parseAdditiveExpr(n node) node {
- opnd := p.parseMultiplicativeExpr(n)
-Loop:
- for {
- var op string
- switch p.r.typ {
- case itemPlus:
- op = "+"
- case itemMinus:
- op = "-"
- default:
- break Loop
- }
- p.next()
- opnd = newOperatorNode(op, opnd, p.parseMultiplicativeExpr(n))
- }
- return opnd
-}
-
-// MultiplicativeExpr ::= UnaryExpr | MultiplicativeExpr MultiplyOperator(*) UnaryExpr
-// | MultiplicativeExpr 'div' UnaryExpr | MultiplicativeExpr 'mod' UnaryExpr
-func (p *parser) parseMultiplicativeExpr(n node) node {
- opnd := p.parseUnaryExpr(n)
-Loop:
- for {
- var op string
- if p.r.typ == itemStar {
- op = "*"
- } else if testOp(p.r, "div") || testOp(p.r, "mod") {
- op = p.r.name
- } else {
- break Loop
- }
- p.next()
- opnd = newOperatorNode(op, opnd, p.parseUnaryExpr(n))
- }
- return opnd
-}
-
-// UnaryExpr ::= UnionExpr | '-' UnaryExpr
-func (p *parser) parseUnaryExpr(n node) node {
- minus := false
- // ignore '-' sequence
- for p.r.typ == itemMinus {
- p.next()
- minus = !minus
- }
- opnd := p.parseUnionExpr(n)
- if minus {
- opnd = newOperatorNode("*", opnd, newOperandNode(float64(-1)))
- }
- return opnd
-}
-
-// UnionExpr ::= PathExpr | UnionExpr '|' PathExpr
-func (p *parser) parseUnionExpr(n node) node {
- opnd := p.parsePathExpr(n)
-Loop:
- for {
- if p.r.typ != itemUnion {
- break Loop
- }
- p.next()
- opnd2 := p.parsePathExpr(n)
- // Checking the node type that must be is node set type?
- opnd = newOperatorNode("|", opnd, opnd2)
- }
- return opnd
-}
-
-// PathExpr ::= LocationPath | FilterExpr | FilterExpr '/' RelativeLocationPath | FilterExpr '//' RelativeLocationPath
-func (p *parser) parsePathExpr(n node) node {
- var opnd node
- if isPrimaryExpr(p.r) {
- opnd = p.parseFilterExpr(n)
- switch p.r.typ {
- case itemSlash:
- p.next()
- opnd = p.parseRelativeLocationPath(opnd)
- case itemSlashSlash:
- p.next()
- opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", "", "", "", opnd))
- }
- } else {
- opnd = p.parseLocationPath(nil)
- }
- return opnd
-}
-
-// FilterExpr ::= PrimaryExpr | FilterExpr Predicate
-func (p *parser) parseFilterExpr(n node) node {
- opnd := p.parsePrimaryExpr(n)
- if p.r.typ == itemLBracket {
- opnd = newFilterNode(opnd, p.parsePredicate(opnd))
- }
- return opnd
-}
-
-// Predicate ::= '[' PredicateExpr ']'
-func (p *parser) parsePredicate(n node) node {
- p.skipItem(itemLBracket)
- opnd := p.parseExpression(n)
- p.skipItem(itemRBracket)
- return opnd
-}
-
-// LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
-func (p *parser) parseLocationPath(n node) (opnd node) {
- switch p.r.typ {
- case itemSlash:
- p.next()
- opnd = newRootNode("/")
- if isStep(p.r.typ) {
- opnd = p.parseRelativeLocationPath(opnd) // ?? child:: or self ??
- }
- case itemSlashSlash:
- p.next()
- opnd = newRootNode("//")
- opnd = p.parseRelativeLocationPath(newAxisNode("descendant-or-self", "", "", "", opnd))
- default:
- opnd = p.parseRelativeLocationPath(n)
- }
- return opnd
-}
-
-// RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath
-func (p *parser) parseRelativeLocationPath(n node) node {
- opnd := n
-Loop:
- for {
- opnd = p.parseStep(opnd)
- switch p.r.typ {
- case itemSlashSlash:
- p.next()
- opnd = newAxisNode("descendant-or-self", "", "", "", opnd)
- case itemSlash:
- p.next()
- default:
- break Loop
- }
- }
- return opnd
-}
-
-// Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep
-func (p *parser) parseStep(n node) (opnd node) {
- axeTyp := "child" // default axes value.
- if p.r.typ == itemDot || p.r.typ == itemDotDot {
- if p.r.typ == itemDot {
- axeTyp = "self"
- } else {
- axeTyp = "parent"
- }
- p.next()
- opnd = newAxisNode(axeTyp, "", "", "", n)
- if p.r.typ != itemLBracket {
- return opnd
- }
- } else {
- switch p.r.typ {
- case itemAt:
- p.next()
- axeTyp = "attribute"
- case itemAxe:
- axeTyp = p.r.name
- p.next()
- case itemLParens:
- return p.parseSequence(n)
- }
- opnd = p.parseNodeTest(n, axeTyp)
- }
- for p.r.typ == itemLBracket {
- opnd = newFilterNode(opnd, p.parsePredicate(opnd))
- }
- return opnd
-}
-
-// Expr ::= '(' Step ("," Step)* ')'
-func (p *parser) parseSequence(n node) (opnd node) {
- p.skipItem(itemLParens)
- opnd = p.parseStep(n)
- for {
- if p.r.typ != itemComma {
- break
- }
- p.next()
- opnd2 := p.parseStep(n)
- opnd = newOperatorNode("|", opnd, opnd2)
- }
- p.skipItem(itemRParens)
- return opnd
-}
-
-// NodeTest ::= NameTest | nodeType '(' ')' | 'processing-instruction' '(' Literal ')'
-func (p *parser) parseNodeTest(n node, axeTyp string) (opnd node) {
- switch p.r.typ {
- case itemName:
- if p.r.canBeFunc && isNodeType(p.r) {
- var prop string
- switch p.r.name {
- case "comment", "text", "processing-instruction", "node":
- prop = p.r.name
- }
- var name string
- p.next()
- p.skipItem(itemLParens)
- if prop == "processing-instruction" && p.r.typ != itemRParens {
- checkItem(p.r, itemString)
- name = p.r.strval
- p.next()
- }
- p.skipItem(itemRParens)
- opnd = newAxisNode(axeTyp, name, "", prop, n)
- } else {
- prefix := p.r.prefix
- name := p.r.name
- p.next()
- if p.r.name == "*" {
- name = ""
- }
- opnd = newAxisNode(axeTyp, name, prefix, "", n)
- }
- case itemStar:
- opnd = newAxisNode(axeTyp, "", "", "", n)
- p.next()
- default:
- panic("expression must evaluate to a node-set")
- }
- return opnd
-}
-
-// PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall
-func (p *parser) parsePrimaryExpr(n node) (opnd node) {
- switch p.r.typ {
- case itemString:
- opnd = newOperandNode(p.r.strval)
- p.next()
- case itemNumber:
- opnd = newOperandNode(p.r.numval)
- p.next()
- case itemDollar:
- p.next()
- checkItem(p.r, itemName)
- opnd = newVariableNode(p.r.prefix, p.r.name)
- p.next()
- case itemLParens:
- p.next()
- opnd = p.parseExpression(n)
- if opnd.Type() != nodeConstantOperand {
- opnd = newGroupNode(opnd)
- }
- p.skipItem(itemRParens)
- case itemName:
- if p.r.canBeFunc && !isNodeType(p.r) {
- opnd = p.parseMethod(nil)
- }
- }
- return opnd
-}
-
-// FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')'
-func (p *parser) parseMethod(n node) node {
- var args []node
- name := p.r.name
- prefix := p.r.prefix
-
- p.skipItem(itemName)
- p.skipItem(itemLParens)
- if p.r.typ != itemRParens {
- for {
- args = append(args, p.parseExpression(n))
- if p.r.typ == itemRParens {
- break
- }
- p.skipItem(itemComma)
- }
- }
- p.skipItem(itemRParens)
- return newFunctionNode(name, prefix, args)
-}
-
-// Parse parsing the XPath express string expr and returns a tree node.
-func parse(expr string) node {
- r := &scanner{text: expr}
- r.nextChar()
- r.nextItem()
- p := &parser{r: r}
- return p.parseExpression(nil)
-}
-
-// rootNode holds a top-level node of tree.
-type rootNode struct {
- nodeType
- slash string
-}
-
-func (r *rootNode) String() string {
- return r.slash
-}
-
-// operatorNode holds two Nodes operator.
-type operatorNode struct {
- nodeType
- Op string
- Left, Right node
-}
-
-func (o *operatorNode) String() string {
- return fmt.Sprintf("%v%s%v", o.Left, o.Op, o.Right)
-}
-
-// axisNode holds a location step.
-type axisNode struct {
- nodeType
- Input node
- Prop string // node-test name.[comment|text|processing-instruction|node]
- AxeType string // name of the axes.[attribute|ancestor|child|....]
- LocalName string // local part name of node.
- Prefix string // prefix name of node.
-}
-
-func (a *axisNode) String() string {
- var b bytes.Buffer
- if a.AxeType != "" {
- b.Write([]byte(a.AxeType + "::"))
- }
- if a.Prefix != "" {
- b.Write([]byte(a.Prefix + ":"))
- }
- b.Write([]byte(a.LocalName))
- if a.Prop != "" {
- b.Write([]byte("/" + a.Prop + "()"))
- }
- return b.String()
-}
-
-// operandNode holds a constant operand.
-type operandNode struct {
- nodeType
- Val interface{}
-}
-
-func (o *operandNode) String() string {
- return fmt.Sprintf("%v", o.Val)
-}
-
-// groupNode holds a set of node expression
-type groupNode struct {
- nodeType
- Input node
-}
-
-func (g *groupNode) String() string {
- return fmt.Sprintf("%s", g.Input)
-}
-
-// filterNode holds a condition filter.
-type filterNode struct {
- nodeType
- Input, Condition node
-}
-
-func (f *filterNode) String() string {
- return fmt.Sprintf("%s[%s]", f.Input, f.Condition)
-}
-
-// variableNode holds a variable.
-type variableNode struct {
- nodeType
- Name, Prefix string
-}
-
-func (v *variableNode) String() string {
- if v.Prefix == "" {
- return v.Name
- }
- return fmt.Sprintf("%s:%s", v.Prefix, v.Name)
-}
-
-// functionNode holds a function call.
-type functionNode struct {
- nodeType
- Args []node
- Prefix string
- FuncName string // function name
-}
-
-func (f *functionNode) String() string {
- var b bytes.Buffer
- // fun(arg1, ..., argn)
- b.Write([]byte(f.FuncName))
- b.Write([]byte("("))
- for i, arg := range f.Args {
- if i > 0 {
- b.Write([]byte(","))
- }
- b.Write([]byte(fmt.Sprintf("%s", arg)))
- }
- b.Write([]byte(")"))
- return b.String()
-}
-
-type scanner struct {
- text, name, prefix string
-
- pos int
- curr rune
- typ itemType
- strval string // text value at current pos
- numval float64 // number value at current pos
- canBeFunc bool
-}
-
-func (s *scanner) nextChar() bool {
- if s.pos >= len(s.text) {
- s.curr = rune(0)
- return false
- }
- s.curr = rune(s.text[s.pos])
- s.pos++
- return true
-}
-
-func (s *scanner) nextItem() bool {
- s.skipSpace()
- switch s.curr {
- case 0:
- s.typ = itemEOF
- return false
- case ',', '@', '(', ')', '|', '*', '[', ']', '+', '-', '=', '#', '$':
- s.typ = asItemType(s.curr)
- s.nextChar()
- case '<':
- s.typ = itemLt
- s.nextChar()
- if s.curr == '=' {
- s.typ = itemLe
- s.nextChar()
- }
- case '>':
- s.typ = itemGt
- s.nextChar()
- if s.curr == '=' {
- s.typ = itemGe
- s.nextChar()
- }
- case '!':
- s.typ = itemBang
- s.nextChar()
- if s.curr == '=' {
- s.typ = itemNe
- s.nextChar()
- }
- case '.':
- s.typ = itemDot
- s.nextChar()
- if s.curr == '.' {
- s.typ = itemDotDot
- s.nextChar()
- } else if isDigit(s.curr) {
- s.typ = itemNumber
- s.numval = s.scanFraction()
- }
- case '/':
- s.typ = itemSlash
- s.nextChar()
- if s.curr == '/' {
- s.typ = itemSlashSlash
- s.nextChar()
- }
- case '"', '\'':
- s.typ = itemString
- s.strval = s.scanString()
- default:
- if isDigit(s.curr) {
- s.typ = itemNumber
- s.numval = s.scanNumber()
- } else if isName(s.curr) {
- s.typ = itemName
- s.name = s.scanName()
- s.prefix = ""
- // "foo:bar" is one itemem not three because it doesn't allow spaces in between
- // We should distinct it from "foo::" and need process "foo ::" as well
- if s.curr == ':' {
- s.nextChar()
- // can be "foo:bar" or "foo::"
- if s.curr == ':' {
- // "foo::"
- s.nextChar()
- s.typ = itemAxe
- } else { // "foo:*", "foo:bar" or "foo: "
- s.prefix = s.name
- if s.curr == '*' {
- s.nextChar()
- s.name = "*"
- } else if isName(s.curr) {
- s.name = s.scanName()
- } else {
- panic(fmt.Sprintf("%s has an invalid qualified name.", s.text))
- }
- }
- } else {
- s.skipSpace()
- if s.curr == ':' {
- s.nextChar()
- // it can be "foo ::" or just "foo :"
- if s.curr == ':' {
- s.nextChar()
- s.typ = itemAxe
- } else {
- panic(fmt.Sprintf("%s has an invalid qualified name.", s.text))
- }
- }
- }
- s.skipSpace()
- s.canBeFunc = s.curr == '('
- } else {
- panic(fmt.Sprintf("%s has an invalid token.", s.text))
- }
- }
- return true
-}
-
-func (s *scanner) skipSpace() {
-Loop:
- for {
- if !unicode.IsSpace(s.curr) || !s.nextChar() {
- break Loop
- }
- }
-}
-
-func (s *scanner) scanFraction() float64 {
- var (
- i = s.pos - 2
- c = 1 // '.'
- )
- for isDigit(s.curr) {
- s.nextChar()
- c++
- }
- v, err := strconv.ParseFloat(s.text[i:i+c], 64)
- if err != nil {
- panic(fmt.Errorf("xpath: scanFraction parse float got error: %v", err))
- }
- return v
-}
-
-func (s *scanner) scanNumber() float64 {
- var (
- c int
- i = s.pos - 1
- )
- for isDigit(s.curr) {
- s.nextChar()
- c++
- }
- if s.curr == '.' {
- s.nextChar()
- c++
- for isDigit(s.curr) {
- s.nextChar()
- c++
- }
- }
- v, err := strconv.ParseFloat(s.text[i:i+c], 64)
- if err != nil {
- panic(fmt.Errorf("xpath: scanNumber parse float got error: %v", err))
- }
- return v
-}
-
-func (s *scanner) scanString() string {
- var (
- c = 0
- end = s.curr
- )
- s.nextChar()
- i := s.pos - 1
- for s.curr != end {
- if !s.nextChar() {
- panic(errors.New("xpath: scanString got unclosed string"))
- }
- c++
- }
- s.nextChar()
- return s.text[i : i+c]
-}
-
-func (s *scanner) scanName() string {
- var (
- c int
- i = s.pos - 1
- )
- for isName(s.curr) {
- c++
- if !s.nextChar() {
- break
- }
- }
- return s.text[i : i+c]
-}
-
-func isName(r rune) bool {
- return string(r) != ":" && string(r) != "/" &&
- (unicode.Is(first, r) || unicode.Is(second, r) || string(r) == "*")
-}
-
-func isDigit(r rune) bool {
- return unicode.IsDigit(r)
-}
-
-func asItemType(r rune) itemType {
- switch r {
- case ',':
- return itemComma
- case '@':
- return itemAt
- case '(':
- return itemLParens
- case ')':
- return itemRParens
- case '|':
- return itemUnion
- case '*':
- return itemStar
- case '[':
- return itemLBracket
- case ']':
- return itemRBracket
- case '+':
- return itemPlus
- case '-':
- return itemMinus
- case '=':
- return itemEq
- case '$':
- return itemDollar
- }
- panic(fmt.Errorf("unknown item: %v", r))
-}
-
-var first = &unicode.RangeTable{
- R16: []unicode.Range16{
- {0x003A, 0x003A, 1},
- {0x0041, 0x005A, 1},
- {0x005F, 0x005F, 1},
- {0x0061, 0x007A, 1},
- {0x00C0, 0x00D6, 1},
- {0x00D8, 0x00F6, 1},
- {0x00F8, 0x00FF, 1},
- {0x0100, 0x0131, 1},
- {0x0134, 0x013E, 1},
- {0x0141, 0x0148, 1},
- {0x014A, 0x017E, 1},
- {0x0180, 0x01C3, 1},
- {0x01CD, 0x01F0, 1},
- {0x01F4, 0x01F5, 1},
- {0x01FA, 0x0217, 1},
- {0x0250, 0x02A8, 1},
- {0x02BB, 0x02C1, 1},
- {0x0386, 0x0386, 1},
- {0x0388, 0x038A, 1},
- {0x038C, 0x038C, 1},
- {0x038E, 0x03A1, 1},
- {0x03A3, 0x03CE, 1},
- {0x03D0, 0x03D6, 1},
- {0x03DA, 0x03E0, 2},
- {0x03E2, 0x03F3, 1},
- {0x0401, 0x040C, 1},
- {0x040E, 0x044F, 1},
- {0x0451, 0x045C, 1},
- {0x045E, 0x0481, 1},
- {0x0490, 0x04C4, 1},
- {0x04C7, 0x04C8, 1},
- {0x04CB, 0x04CC, 1},
- {0x04D0, 0x04EB, 1},
- {0x04EE, 0x04F5, 1},
- {0x04F8, 0x04F9, 1},
- {0x0531, 0x0556, 1},
- {0x0559, 0x0559, 1},
- {0x0561, 0x0586, 1},
- {0x05D0, 0x05EA, 1},
- {0x05F0, 0x05F2, 1},
- {0x0621, 0x063A, 1},
- {0x0641, 0x064A, 1},
- {0x0671, 0x06B7, 1},
- {0x06BA, 0x06BE, 1},
- {0x06C0, 0x06CE, 1},
- {0x06D0, 0x06D3, 1},
- {0x06D5, 0x06D5, 1},
- {0x06E5, 0x06E6, 1},
- {0x0905, 0x0939, 1},
- {0x093D, 0x093D, 1},
- {0x0958, 0x0961, 1},
- {0x0985, 0x098C, 1},
- {0x098F, 0x0990, 1},
- {0x0993, 0x09A8, 1},
- {0x09AA, 0x09B0, 1},
- {0x09B2, 0x09B2, 1},
- {0x09B6, 0x09B9, 1},
- {0x09DC, 0x09DD, 1},
- {0x09DF, 0x09E1, 1},
- {0x09F0, 0x09F1, 1},
- {0x0A05, 0x0A0A, 1},
- {0x0A0F, 0x0A10, 1},
- {0x0A13, 0x0A28, 1},
- {0x0A2A, 0x0A30, 1},
- {0x0A32, 0x0A33, 1},
- {0x0A35, 0x0A36, 1},
- {0x0A38, 0x0A39, 1},
- {0x0A59, 0x0A5C, 1},
- {0x0A5E, 0x0A5E, 1},
- {0x0A72, 0x0A74, 1},
- {0x0A85, 0x0A8B, 1},
- {0x0A8D, 0x0A8D, 1},
- {0x0A8F, 0x0A91, 1},
- {0x0A93, 0x0AA8, 1},
- {0x0AAA, 0x0AB0, 1},
- {0x0AB2, 0x0AB3, 1},
- {0x0AB5, 0x0AB9, 1},
- {0x0ABD, 0x0AE0, 0x23},
- {0x0B05, 0x0B0C, 1},
- {0x0B0F, 0x0B10, 1},
- {0x0B13, 0x0B28, 1},
- {0x0B2A, 0x0B30, 1},
- {0x0B32, 0x0B33, 1},
- {0x0B36, 0x0B39, 1},
- {0x0B3D, 0x0B3D, 1},
- {0x0B5C, 0x0B5D, 1},
- {0x0B5F, 0x0B61, 1},
- {0x0B85, 0x0B8A, 1},
- {0x0B8E, 0x0B90, 1},
- {0x0B92, 0x0B95, 1},
- {0x0B99, 0x0B9A, 1},
- {0x0B9C, 0x0B9C, 1},
- {0x0B9E, 0x0B9F, 1},
- {0x0BA3, 0x0BA4, 1},
- {0x0BA8, 0x0BAA, 1},
- {0x0BAE, 0x0BB5, 1},
- {0x0BB7, 0x0BB9, 1},
- {0x0C05, 0x0C0C, 1},
- {0x0C0E, 0x0C10, 1},
- {0x0C12, 0x0C28, 1},
- {0x0C2A, 0x0C33, 1},
- {0x0C35, 0x0C39, 1},
- {0x0C60, 0x0C61, 1},
- {0x0C85, 0x0C8C, 1},
- {0x0C8E, 0x0C90, 1},
- {0x0C92, 0x0CA8, 1},
- {0x0CAA, 0x0CB3, 1},
- {0x0CB5, 0x0CB9, 1},
- {0x0CDE, 0x0CDE, 1},
- {0x0CE0, 0x0CE1, 1},
- {0x0D05, 0x0D0C, 1},
- {0x0D0E, 0x0D10, 1},
- {0x0D12, 0x0D28, 1},
- {0x0D2A, 0x0D39, 1},
- {0x0D60, 0x0D61, 1},
- {0x0E01, 0x0E2E, 1},
- {0x0E30, 0x0E30, 1},
- {0x0E32, 0x0E33, 1},
- {0x0E40, 0x0E45, 1},
- {0x0E81, 0x0E82, 1},
- {0x0E84, 0x0E84, 1},
- {0x0E87, 0x0E88, 1},
- {0x0E8A, 0x0E8D, 3},
- {0x0E94, 0x0E97, 1},
- {0x0E99, 0x0E9F, 1},
- {0x0EA1, 0x0EA3, 1},
- {0x0EA5, 0x0EA7, 2},
- {0x0EAA, 0x0EAB, 1},
- {0x0EAD, 0x0EAE, 1},
- {0x0EB0, 0x0EB0, 1},
- {0x0EB2, 0x0EB3, 1},
- {0x0EBD, 0x0EBD, 1},
- {0x0EC0, 0x0EC4, 1},
- {0x0F40, 0x0F47, 1},
- {0x0F49, 0x0F69, 1},
- {0x10A0, 0x10C5, 1},
- {0x10D0, 0x10F6, 1},
- {0x1100, 0x1100, 1},
- {0x1102, 0x1103, 1},
- {0x1105, 0x1107, 1},
- {0x1109, 0x1109, 1},
- {0x110B, 0x110C, 1},
- {0x110E, 0x1112, 1},
- {0x113C, 0x1140, 2},
- {0x114C, 0x1150, 2},
- {0x1154, 0x1155, 1},
- {0x1159, 0x1159, 1},
- {0x115F, 0x1161, 1},
- {0x1163, 0x1169, 2},
- {0x116D, 0x116E, 1},
- {0x1172, 0x1173, 1},
- {0x1175, 0x119E, 0x119E - 0x1175},
- {0x11A8, 0x11AB, 0x11AB - 0x11A8},
- {0x11AE, 0x11AF, 1},
- {0x11B7, 0x11B8, 1},
- {0x11BA, 0x11BA, 1},
- {0x11BC, 0x11C2, 1},
- {0x11EB, 0x11F0, 0x11F0 - 0x11EB},
- {0x11F9, 0x11F9, 1},
- {0x1E00, 0x1E9B, 1},
- {0x1EA0, 0x1EF9, 1},
- {0x1F00, 0x1F15, 1},
- {0x1F18, 0x1F1D, 1},
- {0x1F20, 0x1F45, 1},
- {0x1F48, 0x1F4D, 1},
- {0x1F50, 0x1F57, 1},
- {0x1F59, 0x1F5B, 0x1F5B - 0x1F59},
- {0x1F5D, 0x1F5D, 1},
- {0x1F5F, 0x1F7D, 1},
- {0x1F80, 0x1FB4, 1},
- {0x1FB6, 0x1FBC, 1},
- {0x1FBE, 0x1FBE, 1},
- {0x1FC2, 0x1FC4, 1},
- {0x1FC6, 0x1FCC, 1},
- {0x1FD0, 0x1FD3, 1},
- {0x1FD6, 0x1FDB, 1},
- {0x1FE0, 0x1FEC, 1},
- {0x1FF2, 0x1FF4, 1},
- {0x1FF6, 0x1FFC, 1},
- {0x2126, 0x2126, 1},
- {0x212A, 0x212B, 1},
- {0x212E, 0x212E, 1},
- {0x2180, 0x2182, 1},
- {0x3007, 0x3007, 1},
- {0x3021, 0x3029, 1},
- {0x3041, 0x3094, 1},
- {0x30A1, 0x30FA, 1},
- {0x3105, 0x312C, 1},
- {0x4E00, 0x9FA5, 1},
- {0xAC00, 0xD7A3, 1},
- },
-}
-
-var second = &unicode.RangeTable{
- R16: []unicode.Range16{
- {0x002D, 0x002E, 1},
- {0x0030, 0x0039, 1},
- {0x00B7, 0x00B7, 1},
- {0x02D0, 0x02D1, 1},
- {0x0300, 0x0345, 1},
- {0x0360, 0x0361, 1},
- {0x0387, 0x0387, 1},
- {0x0483, 0x0486, 1},
- {0x0591, 0x05A1, 1},
- {0x05A3, 0x05B9, 1},
- {0x05BB, 0x05BD, 1},
- {0x05BF, 0x05BF, 1},
- {0x05C1, 0x05C2, 1},
- {0x05C4, 0x0640, 0x0640 - 0x05C4},
- {0x064B, 0x0652, 1},
- {0x0660, 0x0669, 1},
- {0x0670, 0x0670, 1},
- {0x06D6, 0x06DC, 1},
- {0x06DD, 0x06DF, 1},
- {0x06E0, 0x06E4, 1},
- {0x06E7, 0x06E8, 1},
- {0x06EA, 0x06ED, 1},
- {0x06F0, 0x06F9, 1},
- {0x0901, 0x0903, 1},
- {0x093C, 0x093C, 1},
- {0x093E, 0x094C, 1},
- {0x094D, 0x094D, 1},
- {0x0951, 0x0954, 1},
- {0x0962, 0x0963, 1},
- {0x0966, 0x096F, 1},
- {0x0981, 0x0983, 1},
- {0x09BC, 0x09BC, 1},
- {0x09BE, 0x09BF, 1},
- {0x09C0, 0x09C4, 1},
- {0x09C7, 0x09C8, 1},
- {0x09CB, 0x09CD, 1},
- {0x09D7, 0x09D7, 1},
- {0x09E2, 0x09E3, 1},
- {0x09E6, 0x09EF, 1},
- {0x0A02, 0x0A3C, 0x3A},
- {0x0A3E, 0x0A3F, 1},
- {0x0A40, 0x0A42, 1},
- {0x0A47, 0x0A48, 1},
- {0x0A4B, 0x0A4D, 1},
- {0x0A66, 0x0A6F, 1},
- {0x0A70, 0x0A71, 1},
- {0x0A81, 0x0A83, 1},
- {0x0ABC, 0x0ABC, 1},
- {0x0ABE, 0x0AC5, 1},
- {0x0AC7, 0x0AC9, 1},
- {0x0ACB, 0x0ACD, 1},
- {0x0AE6, 0x0AEF, 1},
- {0x0B01, 0x0B03, 1},
- {0x0B3C, 0x0B3C, 1},
- {0x0B3E, 0x0B43, 1},
- {0x0B47, 0x0B48, 1},
- {0x0B4B, 0x0B4D, 1},
- {0x0B56, 0x0B57, 1},
- {0x0B66, 0x0B6F, 1},
- {0x0B82, 0x0B83, 1},
- {0x0BBE, 0x0BC2, 1},
- {0x0BC6, 0x0BC8, 1},
- {0x0BCA, 0x0BCD, 1},
- {0x0BD7, 0x0BD7, 1},
- {0x0BE7, 0x0BEF, 1},
- {0x0C01, 0x0C03, 1},
- {0x0C3E, 0x0C44, 1},
- {0x0C46, 0x0C48, 1},
- {0x0C4A, 0x0C4D, 1},
- {0x0C55, 0x0C56, 1},
- {0x0C66, 0x0C6F, 1},
- {0x0C82, 0x0C83, 1},
- {0x0CBE, 0x0CC4, 1},
- {0x0CC6, 0x0CC8, 1},
- {0x0CCA, 0x0CCD, 1},
- {0x0CD5, 0x0CD6, 1},
- {0x0CE6, 0x0CEF, 1},
- {0x0D02, 0x0D03, 1},
- {0x0D3E, 0x0D43, 1},
- {0x0D46, 0x0D48, 1},
- {0x0D4A, 0x0D4D, 1},
- {0x0D57, 0x0D57, 1},
- {0x0D66, 0x0D6F, 1},
- {0x0E31, 0x0E31, 1},
- {0x0E34, 0x0E3A, 1},
- {0x0E46, 0x0E46, 1},
- {0x0E47, 0x0E4E, 1},
- {0x0E50, 0x0E59, 1},
- {0x0EB1, 0x0EB1, 1},
- {0x0EB4, 0x0EB9, 1},
- {0x0EBB, 0x0EBC, 1},
- {0x0EC6, 0x0EC6, 1},
- {0x0EC8, 0x0ECD, 1},
- {0x0ED0, 0x0ED9, 1},
- {0x0F18, 0x0F19, 1},
- {0x0F20, 0x0F29, 1},
- {0x0F35, 0x0F39, 2},
- {0x0F3E, 0x0F3F, 1},
- {0x0F71, 0x0F84, 1},
- {0x0F86, 0x0F8B, 1},
- {0x0F90, 0x0F95, 1},
- {0x0F97, 0x0F97, 1},
- {0x0F99, 0x0FAD, 1},
- {0x0FB1, 0x0FB7, 1},
- {0x0FB9, 0x0FB9, 1},
- {0x20D0, 0x20DC, 1},
- {0x20E1, 0x3005, 0x3005 - 0x20E1},
- {0x302A, 0x302F, 1},
- {0x3031, 0x3035, 1},
- {0x3099, 0x309A, 1},
- {0x309D, 0x309E, 1},
- {0x30FC, 0x30FE, 1},
- },
-}
diff --git a/vendor/github.com/antchfx/xpath/query.go b/vendor/github.com/antchfx/xpath/query.go
deleted file mode 100644
index 6e99ce59c86..00000000000
--- a/vendor/github.com/antchfx/xpath/query.go
+++ /dev/null
@@ -1,952 +0,0 @@
-package xpath
-
-import (
- "bytes"
- "fmt"
- "hash/fnv"
- "reflect"
-)
-
-type iterator interface {
- Current() NodeNavigator
-}
-
-// An XPath query interface.
-type query interface {
- // Select traversing iterator returns a query matched node NodeNavigator.
- Select(iterator) NodeNavigator
-
- // Evaluate evaluates query and returns values of the current query.
- Evaluate(iterator) interface{}
-
- Clone() query
-}
-
-// nopQuery is an empty query that always return nil for any query.
-type nopQuery struct {
- query
-}
-
-func (nopQuery) Select(iterator) NodeNavigator { return nil }
-
-func (nopQuery) Evaluate(iterator) interface{} { return nil }
-
-func (nopQuery) Clone() query { return nopQuery{} }
-
-// contextQuery is returns current node on the iterator object query.
-type contextQuery struct {
- count int
- Root bool // Moving to root-level node in the current context iterator.
-}
-
-func (c *contextQuery) Select(t iterator) (n NodeNavigator) {
- if c.count == 0 {
- c.count++
- n = t.Current().Copy()
- if c.Root {
- n.MoveToRoot()
- }
- }
- return n
-}
-
-func (c *contextQuery) Evaluate(iterator) interface{} {
- c.count = 0
- return c
-}
-
-func (c *contextQuery) Clone() query {
- return &contextQuery{count: 0, Root: c.Root}
-}
-
-// ancestorQuery is an XPath ancestor node query.(ancestor::*|ancestor-self::*)
-type ancestorQuery struct {
- iterator func() NodeNavigator
-
- Self bool
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (a *ancestorQuery) Select(t iterator) NodeNavigator {
- for {
- if a.iterator == nil {
- node := a.Input.Select(t)
- if node == nil {
- return nil
- }
- first := true
- node = node.Copy()
- a.iterator = func() NodeNavigator {
- if first && a.Self {
- first = false
- if a.Predicate(node) {
- return node
- }
- }
- for node.MoveToParent() {
- if !a.Predicate(node) {
- continue
- }
- return node
- }
- return nil
- }
- }
-
- if node := a.iterator(); node != nil {
- return node
- }
- a.iterator = nil
- }
-}
-
-func (a *ancestorQuery) Evaluate(t iterator) interface{} {
- a.Input.Evaluate(t)
- a.iterator = nil
- return a
-}
-
-func (a *ancestorQuery) Test(n NodeNavigator) bool {
- return a.Predicate(n)
-}
-
-func (a *ancestorQuery) Clone() query {
- return &ancestorQuery{Self: a.Self, Input: a.Input.Clone(), Predicate: a.Predicate}
-}
-
-// attributeQuery is an XPath attribute node query.(@*)
-type attributeQuery struct {
- iterator func() NodeNavigator
-
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (a *attributeQuery) Select(t iterator) NodeNavigator {
- for {
- if a.iterator == nil {
- node := a.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- a.iterator = func() NodeNavigator {
- for {
- onAttr := node.MoveToNextAttribute()
- if !onAttr {
- return nil
- }
- if a.Predicate(node) {
- return node
- }
- }
- }
- }
-
- if node := a.iterator(); node != nil {
- return node
- }
- a.iterator = nil
- }
-}
-
-func (a *attributeQuery) Evaluate(t iterator) interface{} {
- a.Input.Evaluate(t)
- a.iterator = nil
- return a
-}
-
-func (a *attributeQuery) Test(n NodeNavigator) bool {
- return a.Predicate(n)
-}
-
-func (a *attributeQuery) Clone() query {
- return &attributeQuery{Input: a.Input.Clone(), Predicate: a.Predicate}
-}
-
-// childQuery is an XPath child node query.(child::*)
-type childQuery struct {
- posit int
- iterator func() NodeNavigator
-
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (c *childQuery) Select(t iterator) NodeNavigator {
- for {
- if c.iterator == nil {
- c.posit = 0
- node := c.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- first := true
- c.iterator = func() NodeNavigator {
- for {
- if (first && !node.MoveToChild()) || (!first && !node.MoveToNext()) {
- return nil
- }
- first = false
- if c.Predicate(node) {
- return node
- }
- }
- }
- }
-
- if node := c.iterator(); node != nil {
- c.posit++
- return node
- }
- c.iterator = nil
- }
-}
-
-func (c *childQuery) Evaluate(t iterator) interface{} {
- c.Input.Evaluate(t)
- c.iterator = nil
- return c
-}
-
-func (c *childQuery) Test(n NodeNavigator) bool {
- return c.Predicate(n)
-}
-
-func (c *childQuery) Clone() query {
- return &childQuery{Input: c.Input.Clone(), Predicate: c.Predicate}
-}
-
-// position returns a position of current NodeNavigator.
-func (c *childQuery) position() int {
- return c.posit
-}
-
-// descendantQuery is an XPath descendant node query.(descendant::* | descendant-or-self::*)
-type descendantQuery struct {
- iterator func() NodeNavigator
- posit int
- level int
-
- Self bool
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (d *descendantQuery) Select(t iterator) NodeNavigator {
- for {
- if d.iterator == nil {
- d.posit = 0
- node := d.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- d.level = 0
- positmap := make(map[int]int)
- first := true
- d.iterator = func() NodeNavigator {
- if first && d.Self {
- first = false
- if d.Predicate(node) {
- d.posit = 1
- positmap[d.level] = 1
- return node
- }
- }
-
- for {
- if node.MoveToChild() {
- d.level = d.level + 1
- positmap[d.level] = 0
- } else {
- for {
- if d.level == 0 {
- return nil
- }
- if node.MoveToNext() {
- break
- }
- node.MoveToParent()
- d.level = d.level - 1
- }
- }
- if d.Predicate(node) {
- positmap[d.level]++
- d.posit = positmap[d.level]
- return node
- }
- }
- }
- }
-
- if node := d.iterator(); node != nil {
- return node
- }
- d.iterator = nil
- }
-}
-
-func (d *descendantQuery) Evaluate(t iterator) interface{} {
- d.Input.Evaluate(t)
- d.iterator = nil
- return d
-}
-
-func (d *descendantQuery) Test(n NodeNavigator) bool {
- return d.Predicate(n)
-}
-
-// position returns a position of current NodeNavigator.
-func (d *descendantQuery) position() int {
- return d.posit
-}
-
-func (d *descendantQuery) depth() int {
- return d.level
-}
-
-func (d *descendantQuery) Clone() query {
- return &descendantQuery{Self: d.Self, Input: d.Input.Clone(), Predicate: d.Predicate}
-}
-
-// followingQuery is an XPath following node query.(following::*|following-sibling::*)
-type followingQuery struct {
- posit int
- iterator func() NodeNavigator
-
- Input query
- Sibling bool // The matching sibling node of current node.
- Predicate func(NodeNavigator) bool
-}
-
-func (f *followingQuery) Select(t iterator) NodeNavigator {
- for {
- if f.iterator == nil {
- f.posit = 0
- node := f.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- if f.Sibling {
- f.iterator = func() NodeNavigator {
- for {
- if !node.MoveToNext() {
- return nil
- }
- if f.Predicate(node) {
- f.posit++
- return node
- }
- }
- }
- } else {
- var q *descendantQuery // descendant query
- f.iterator = func() NodeNavigator {
- for {
- if q == nil {
- for !node.MoveToNext() {
- if !node.MoveToParent() {
- return nil
- }
- }
- q = &descendantQuery{
- Self: true,
- Input: &contextQuery{},
- Predicate: f.Predicate,
- }
- t.Current().MoveTo(node)
- }
- if node := q.Select(t); node != nil {
- f.posit = q.posit
- return node
- }
- q = nil
- }
- }
- }
- }
-
- if node := f.iterator(); node != nil {
- return node
- }
- f.iterator = nil
- }
-}
-
-func (f *followingQuery) Evaluate(t iterator) interface{} {
- f.Input.Evaluate(t)
- return f
-}
-
-func (f *followingQuery) Test(n NodeNavigator) bool {
- return f.Predicate(n)
-}
-
-func (f *followingQuery) Clone() query {
- return &followingQuery{Input: f.Input.Clone(), Sibling: f.Sibling, Predicate: f.Predicate}
-}
-
-func (f *followingQuery) position() int {
- return f.posit
-}
-
-// precedingQuery is an XPath preceding node query.(preceding::*)
-type precedingQuery struct {
- iterator func() NodeNavigator
- posit int
- Input query
- Sibling bool // The matching sibling node of current node.
- Predicate func(NodeNavigator) bool
-}
-
-func (p *precedingQuery) Select(t iterator) NodeNavigator {
- for {
- if p.iterator == nil {
- p.posit = 0
- node := p.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- if p.Sibling {
- p.iterator = func() NodeNavigator {
- for {
- for !node.MoveToPrevious() {
- return nil
- }
- if p.Predicate(node) {
- p.posit++
- return node
- }
- }
- }
- } else {
- var q query
- p.iterator = func() NodeNavigator {
- for {
- if q == nil {
- for !node.MoveToPrevious() {
- if !node.MoveToParent() {
- return nil
- }
- p.posit = 0
- }
- q = &descendantQuery{
- Self: true,
- Input: &contextQuery{},
- Predicate: p.Predicate,
- }
- t.Current().MoveTo(node)
- }
- if node := q.Select(t); node != nil {
- p.posit++
- return node
- }
- q = nil
- }
- }
- }
- }
- if node := p.iterator(); node != nil {
- return node
- }
- p.iterator = nil
- }
-}
-
-func (p *precedingQuery) Evaluate(t iterator) interface{} {
- p.Input.Evaluate(t)
- return p
-}
-
-func (p *precedingQuery) Test(n NodeNavigator) bool {
- return p.Predicate(n)
-}
-
-func (p *precedingQuery) Clone() query {
- return &precedingQuery{Input: p.Input.Clone(), Sibling: p.Sibling, Predicate: p.Predicate}
-}
-
-func (p *precedingQuery) position() int {
- return p.posit
-}
-
-// parentQuery is an XPath parent node query.(parent::*)
-type parentQuery struct {
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (p *parentQuery) Select(t iterator) NodeNavigator {
- for {
- node := p.Input.Select(t)
- if node == nil {
- return nil
- }
- node = node.Copy()
- if node.MoveToParent() && p.Predicate(node) {
- return node
- }
- }
-}
-
-func (p *parentQuery) Evaluate(t iterator) interface{} {
- p.Input.Evaluate(t)
- return p
-}
-
-func (p *parentQuery) Clone() query {
- return &parentQuery{Input: p.Input.Clone(), Predicate: p.Predicate}
-}
-
-func (p *parentQuery) Test(n NodeNavigator) bool {
- return p.Predicate(n)
-}
-
-// selfQuery is an Self node query.(self::*)
-type selfQuery struct {
- Input query
- Predicate func(NodeNavigator) bool
-}
-
-func (s *selfQuery) Select(t iterator) NodeNavigator {
- for {
- node := s.Input.Select(t)
- if node == nil {
- return nil
- }
-
- if s.Predicate(node) {
- return node
- }
- }
-}
-
-func (s *selfQuery) Evaluate(t iterator) interface{} {
- s.Input.Evaluate(t)
- return s
-}
-
-func (s *selfQuery) Test(n NodeNavigator) bool {
- return s.Predicate(n)
-}
-
-func (s *selfQuery) Clone() query {
- return &selfQuery{Input: s.Input.Clone(), Predicate: s.Predicate}
-}
-
-// filterQuery is an XPath query for predicate filter.
-type filterQuery struct {
- Input query
- Predicate query
- posit int
- positmap map[int]int
-}
-
-func (f *filterQuery) do(t iterator) bool {
- val := reflect.ValueOf(f.Predicate.Evaluate(t))
- switch val.Kind() {
- case reflect.Bool:
- return val.Bool()
- case reflect.String:
- return len(val.String()) > 0
- case reflect.Float64:
- pt := getNodePosition(f.Input)
- return int(val.Float()) == pt
- default:
- if q, ok := f.Predicate.(query); ok {
- return q.Select(t) != nil
- }
- }
- return false
-}
-
-func (f *filterQuery) position() int {
- return f.posit
-}
-
-func (f *filterQuery) Select(t iterator) NodeNavigator {
- if f.positmap == nil {
- f.positmap = make(map[int]int)
- }
- for {
-
- node := f.Input.Select(t)
- if node == nil {
- return node
- }
- node = node.Copy()
-
- t.Current().MoveTo(node)
- if f.do(t) {
- // fix https://github.com/antchfx/htmlquery/issues/26
- // Calculate and keep the each of matching node's position in the same depth.
- level := getNodeDepth(f.Input)
- f.positmap[level]++
- f.posit = f.positmap[level]
- return node
- }
- }
-}
-
-func (f *filterQuery) Evaluate(t iterator) interface{} {
- f.Input.Evaluate(t)
- return f
-}
-
-func (f *filterQuery) Clone() query {
- return &filterQuery{Input: f.Input.Clone(), Predicate: f.Predicate.Clone()}
-}
-
-// functionQuery is an XPath function that returns a computed value for
-// the Evaluate call of the current NodeNavigator node. Select call isn't
-// applicable for functionQuery.
-type functionQuery struct {
- Input query // Node Set
- Func func(query, iterator) interface{} // The xpath function.
-}
-
-func (f *functionQuery) Select(t iterator) NodeNavigator {
- return nil
-}
-
-// Evaluate call a specified function that will returns the
-// following value type: number,string,boolean.
-func (f *functionQuery) Evaluate(t iterator) interface{} {
- return f.Func(f.Input, t)
-}
-
-func (f *functionQuery) Clone() query {
- return &functionQuery{Input: f.Input.Clone(), Func: f.Func}
-}
-
-// transformFunctionQuery diffs from functionQuery where the latter computes a scalar
-// value (number,string,boolean) for the current NodeNavigator node while the former
-// (transformFunctionQuery) performs a mapping or transform of the current NodeNavigator
-// and returns a new NodeNavigator. It is used for non-scalar XPath functions such as
-// reverse(), remove(), subsequence(), unordered(), etc.
-type transformFunctionQuery struct {
- Input query
- Func func(query, iterator) func() NodeNavigator
- iterator func() NodeNavigator
-}
-
-func (f *transformFunctionQuery) Select(t iterator) NodeNavigator {
- if f.iterator == nil {
- f.iterator = f.Func(f.Input, t)
- }
- return f.iterator()
-}
-
-func (f *transformFunctionQuery) Evaluate(t iterator) interface{} {
- f.Input.Evaluate(t)
- f.iterator = nil
- return f
-}
-
-func (f *transformFunctionQuery) Clone() query {
- return &transformFunctionQuery{Input: f.Input.Clone(), Func: f.Func}
-}
-
-// constantQuery is an XPath constant operand.
-type constantQuery struct {
- Val interface{}
-}
-
-func (c *constantQuery) Select(t iterator) NodeNavigator {
- return nil
-}
-
-func (c *constantQuery) Evaluate(t iterator) interface{} {
- return c.Val
-}
-
-func (c *constantQuery) Clone() query {
- return c
-}
-
-type groupQuery struct {
- posit int
-
- Input query
-}
-
-func (g *groupQuery) Select(t iterator) NodeNavigator {
- for {
- node := g.Input.Select(t)
- if node == nil {
- return nil
- }
- g.posit++
- return node.Copy()
- }
-}
-
-func (g *groupQuery) Evaluate(t iterator) interface{} {
- return g.Input.Evaluate(t)
-}
-
-func (g *groupQuery) Clone() query {
- return &groupQuery{Input: g.Input}
-}
-
-func (g *groupQuery) position() int {
- return g.posit
-}
-
-// logicalQuery is an XPath logical expression.
-type logicalQuery struct {
- Left, Right query
-
- Do func(iterator, interface{}, interface{}) interface{}
-}
-
-func (l *logicalQuery) Select(t iterator) NodeNavigator {
- // When a XPath expr is logical expression.
- node := t.Current().Copy()
- val := l.Evaluate(t)
- switch val.(type) {
- case bool:
- if val.(bool) == true {
- return node
- }
- }
- return nil
-}
-
-func (l *logicalQuery) Evaluate(t iterator) interface{} {
- m := l.Left.Evaluate(t)
- n := l.Right.Evaluate(t)
- return l.Do(t, m, n)
-}
-
-func (l *logicalQuery) Clone() query {
- return &logicalQuery{Left: l.Left.Clone(), Right: l.Right.Clone(), Do: l.Do}
-}
-
-// numericQuery is an XPath numeric operator expression.
-type numericQuery struct {
- Left, Right query
-
- Do func(interface{}, interface{}) interface{}
-}
-
-func (n *numericQuery) Select(t iterator) NodeNavigator {
- return nil
-}
-
-func (n *numericQuery) Evaluate(t iterator) interface{} {
- m := n.Left.Evaluate(t)
- k := n.Right.Evaluate(t)
- return n.Do(m, k)
-}
-
-func (n *numericQuery) Clone() query {
- return &numericQuery{Left: n.Left.Clone(), Right: n.Right.Clone(), Do: n.Do}
-}
-
-type booleanQuery struct {
- IsOr bool
- Left, Right query
- iterator func() NodeNavigator
-}
-
-func (b *booleanQuery) Select(t iterator) NodeNavigator {
- if b.iterator == nil {
- var list []NodeNavigator
- i := 0
- root := t.Current().Copy()
- if b.IsOr {
- for {
- node := b.Left.Select(t)
- if node == nil {
- break
- }
- node = node.Copy()
- list = append(list, node)
- }
- t.Current().MoveTo(root)
- for {
- node := b.Right.Select(t)
- if node == nil {
- break
- }
- node = node.Copy()
- list = append(list, node)
- }
- } else {
- var m []NodeNavigator
- var n []NodeNavigator
- for {
- node := b.Left.Select(t)
- if node == nil {
- break
- }
- node = node.Copy()
- list = append(m, node)
- }
- t.Current().MoveTo(root)
- for {
- node := b.Right.Select(t)
- if node == nil {
- break
- }
- node = node.Copy()
- list = append(n, node)
- }
- for _, k := range m {
- for _, j := range n {
- if k == j {
- list = append(list, k)
- }
- }
- }
- }
-
- b.iterator = func() NodeNavigator {
- if i >= len(list) {
- return nil
- }
- node := list[i]
- i++
- return node
- }
- }
- return b.iterator()
-}
-
-func (b *booleanQuery) Evaluate(t iterator) interface{} {
- m := b.Left.Evaluate(t)
- left := asBool(t, m)
- if b.IsOr && left {
- return true
- } else if !b.IsOr && !left {
- return false
- }
- m = b.Right.Evaluate(t)
- return asBool(t, m)
-}
-
-func (b *booleanQuery) Clone() query {
- return &booleanQuery{IsOr: b.IsOr, Left: b.Left.Clone(), Right: b.Right.Clone()}
-}
-
-type unionQuery struct {
- Left, Right query
- iterator func() NodeNavigator
-}
-
-func (u *unionQuery) Select(t iterator) NodeNavigator {
- if u.iterator == nil {
- var list []NodeNavigator
- var m = make(map[uint64]bool)
- root := t.Current().Copy()
- for {
- node := u.Left.Select(t)
- if node == nil {
- break
- }
- code := getHashCode(node.Copy())
- if _, ok := m[code]; !ok {
- m[code] = true
- list = append(list, node.Copy())
- }
- }
- t.Current().MoveTo(root)
- for {
- node := u.Right.Select(t)
- if node == nil {
- break
- }
- code := getHashCode(node.Copy())
- if _, ok := m[code]; !ok {
- m[code] = true
- list = append(list, node.Copy())
- }
- }
- var i int
- u.iterator = func() NodeNavigator {
- if i >= len(list) {
- return nil
- }
- node := list[i]
- i++
- return node
- }
- }
- return u.iterator()
-}
-
-func (u *unionQuery) Evaluate(t iterator) interface{} {
- u.iterator = nil
- u.Left.Evaluate(t)
- u.Right.Evaluate(t)
- return u
-}
-
-func (u *unionQuery) Clone() query {
- return &unionQuery{Left: u.Left.Clone(), Right: u.Right.Clone()}
-}
-
-func getHashCode(n NodeNavigator) uint64 {
- var sb bytes.Buffer
- switch n.NodeType() {
- case AttributeNode, TextNode, CommentNode:
- sb.WriteString(fmt.Sprintf("%s=%s", n.LocalName(), n.Value()))
- // https://github.com/antchfx/htmlquery/issues/25
- d := 1
- for n.MoveToPrevious() {
- d++
- }
- sb.WriteString(fmt.Sprintf("-%d", d))
- for n.MoveToParent() {
- d = 1
- for n.MoveToPrevious() {
- d++
- }
- sb.WriteString(fmt.Sprintf("-%d", d))
- }
- case ElementNode:
- sb.WriteString(n.Prefix() + n.LocalName())
- d := 1
- for n.MoveToPrevious() {
- d++
- }
- sb.WriteString(fmt.Sprintf("-%d", d))
-
- for n.MoveToParent() {
- d = 1
- for n.MoveToPrevious() {
- d++
- }
- sb.WriteString(fmt.Sprintf("-%d", d))
- }
- }
- h := fnv.New64a()
- h.Write([]byte(sb.String()))
- return h.Sum64()
-}
-
-func getNodePosition(q query) int {
- type Position interface {
- position() int
- }
- if count, ok := q.(Position); ok {
- return count.position()
- }
- return 1
-}
-
-func getNodeDepth(q query) int {
- type Depth interface {
- depth() int
- }
- if count, ok := q.(Depth); ok {
- return count.depth()
- }
- return 0
-}
diff --git a/vendor/github.com/antchfx/xpath/xpath.go b/vendor/github.com/antchfx/xpath/xpath.go
deleted file mode 100644
index 5f6aa89a1e1..00000000000
--- a/vendor/github.com/antchfx/xpath/xpath.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package xpath
-
-import (
- "errors"
- "fmt"
-)
-
-// NodeType represents a type of XPath node.
-type NodeType int
-
-const (
- // RootNode is a root node of the XML document or node tree.
- RootNode NodeType = iota
-
- // ElementNode is an element, such as .
- ElementNode
-
- // AttributeNode is an attribute, such as id='123'.
- AttributeNode
-
- // TextNode is the text content of a node.
- TextNode
-
- // CommentNode is a comment node, such as
- CommentNode
-
- // allNode is any types of node, used by xpath package only to predicate match.
- allNode
-)
-
-// NodeNavigator provides cursor model for navigating XML data.
-type NodeNavigator interface {
- // NodeType returns the XPathNodeType of the current node.
- NodeType() NodeType
-
- // LocalName gets the Name of the current node.
- LocalName() string
-
- // Prefix returns namespace prefix associated with the current node.
- Prefix() string
-
- // Value gets the value of current node.
- Value() string
-
- // Copy does a deep copy of the NodeNavigator and all its components.
- Copy() NodeNavigator
-
- // MoveToRoot moves the NodeNavigator to the root node of the current node.
- MoveToRoot()
-
- // MoveToParent moves the NodeNavigator to the parent node of the current node.
- MoveToParent() bool
-
- // MoveToNextAttribute moves the NodeNavigator to the next attribute on current node.
- MoveToNextAttribute() bool
-
- // MoveToChild moves the NodeNavigator to the first child node of the current node.
- MoveToChild() bool
-
- // MoveToFirst moves the NodeNavigator to the first sibling node of the current node.
- MoveToFirst() bool
-
- // MoveToNext moves the NodeNavigator to the next sibling node of the current node.
- MoveToNext() bool
-
- // MoveToPrevious moves the NodeNavigator to the previous sibling node of the current node.
- MoveToPrevious() bool
-
- // MoveTo moves the NodeNavigator to the same position as the specified NodeNavigator.
- MoveTo(NodeNavigator) bool
-}
-
-// NodeIterator holds all matched Node object.
-type NodeIterator struct {
- node NodeNavigator
- query query
-}
-
-// Current returns current node which matched.
-func (t *NodeIterator) Current() NodeNavigator {
- return t.node
-}
-
-// MoveNext moves Navigator to the next match node.
-func (t *NodeIterator) MoveNext() bool {
- n := t.query.Select(t)
- if n != nil {
- if !t.node.MoveTo(n) {
- t.node = n.Copy()
- }
- return true
- }
- return false
-}
-
-// Select selects a node set using the specified XPath expression.
-// This method is deprecated, recommend using Expr.Select() method instead.
-func Select(root NodeNavigator, expr string) *NodeIterator {
- exp, err := Compile(expr)
- if err != nil {
- panic(err)
- }
- return exp.Select(root)
-}
-
-// Expr is an XPath expression for query.
-type Expr struct {
- s string
- q query
-}
-
-type iteratorFunc func() NodeNavigator
-
-func (f iteratorFunc) Current() NodeNavigator {
- return f()
-}
-
-// Evaluate returns the result of the expression.
-// The result type of the expression is one of the follow: bool,float64,string,NodeIterator).
-func (expr *Expr) Evaluate(root NodeNavigator) interface{} {
- val := expr.q.Evaluate(iteratorFunc(func() NodeNavigator { return root }))
- switch val.(type) {
- case query:
- return &NodeIterator{query: expr.q.Clone(), node: root}
- }
- return val
-}
-
-// Select selects a node set using the specified XPath expression.
-func (expr *Expr) Select(root NodeNavigator) *NodeIterator {
- return &NodeIterator{query: expr.q.Clone(), node: root}
-}
-
-// String returns XPath expression string.
-func (expr *Expr) String() string {
- return expr.s
-}
-
-// Compile compiles an XPath expression string.
-func Compile(expr string) (*Expr, error) {
- if expr == "" {
- return nil, errors.New("expr expression is nil")
- }
- qy, err := build(expr)
- if err != nil {
- return nil, err
- }
- if qy == nil {
- return nil, fmt.Errorf(fmt.Sprintf("undeclared variable in XPath expression: %s", expr))
- }
- return &Expr{s: expr, q: qy}, nil
-}
-
-// MustCompile compiles an XPath expression string and ignored error.
-func MustCompile(expr string) *Expr {
- exp, err := Compile(expr)
- if err != nil {
- return &Expr{s: expr, q: nopQuery{}}
- }
- return exp
-}
diff --git a/vendor/github.com/asticode/go-astikit/.travis.sh b/vendor/github.com/asticode/go-astikit/.travis.sh
deleted file mode 100644
index f67dc1348d7..00000000000
--- a/vendor/github.com/asticode/go-astikit/.travis.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$(go list -m all)" != "github.com/asticode/go-astikit" ]; then
- echo "This repo doesn't allow any external dependencies"
- exit 1
-else
- echo "cheers!"
-fi
\ No newline at end of file
diff --git a/vendor/github.com/asticode/go-astikit/.travis.yml b/vendor/github.com/asticode/go-astikit/.travis.yml
deleted file mode 100644
index c64e331fd7d..00000000000
--- a/vendor/github.com/asticode/go-astikit/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-go:
-- 1.x
-- tip
-install:
-- bash .travis.sh
-- go get -t ./...
-- go get golang.org/x/tools/cmd/cover
-- go get github.com/mattn/goveralls
-matrix:
- allow_failures:
- - go: tip
-script:
-- go test -race -v -coverprofile=coverage.out
-- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
\ No newline at end of file
diff --git a/vendor/github.com/asticode/go-astikit/LICENSE b/vendor/github.com/asticode/go-astikit/LICENSE
deleted file mode 100644
index 87a311287b8..00000000000
--- a/vendor/github.com/asticode/go-astikit/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Quentin Renard
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/asticode/go-astikit/README.md b/vendor/github.com/asticode/go-astikit/README.md
deleted file mode 100644
index e1356c167c9..00000000000
--- a/vendor/github.com/asticode/go-astikit/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-[![GoReportCard](http://goreportcard.com/badge/github.com/asticode/go-astikit)](http://goreportcard.com/report/github.com/asticode/go-astikit)
-[![GoDoc](https://godoc.org/github.com/asticode/go-astikit?status.svg)](https://godoc.org/github.com/asticode/go-astikit)
-[![Travis](https://travis-ci.org/asticode/go-astikit.svg?branch=master)](https://travis-ci.org/asticode/go-astikit#)
-[![Coveralls](https://coveralls.io/repos/github/asticode/go-astikit/badge.svg?branch=master)](https://coveralls.io/github/asticode/go-astikit)
-
-`astikit` is a set of golang helpers that don't require any external dependencies.
\ No newline at end of file
diff --git a/vendor/github.com/asticode/go-astikit/archive.go b/vendor/github.com/asticode/go-astikit/archive.go
deleted file mode 100644
index cde11940402..00000000000
--- a/vendor/github.com/asticode/go-astikit/archive.go
+++ /dev/null
@@ -1,214 +0,0 @@
-package astikit
-
-import (
- "archive/zip"
- "context"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
-)
-
-// internal shouldn't lead with a "/"
-func zipInternalPath(p string) (external, internal string) {
- if items := strings.Split(p, ".zip"); len(items) > 1 {
- external = items[0] + ".zip"
- internal = strings.TrimPrefix(strings.Join(items[1:], ".zip"), string(os.PathSeparator))
- return
- }
- external = p
- return
-}
-
-// Zip zips a src into a dst
-// Possible dst formats are:
-// - /path/to/zip.zip
-// - /path/to/zip.zip/root/path
-func Zip(ctx context.Context, dst, src string) (err error) {
- // Get external/internal path
- externalPath, internalPath := zipInternalPath(dst)
-
- // Make sure the directory exists
- if err = os.MkdirAll(filepath.Dir(externalPath), DefaultDirMode); err != nil {
- return fmt.Errorf("astikit: mkdirall %s failed: %w", filepath.Dir(externalPath), err)
- }
-
- // Create destination file
- var dstFile *os.File
- if dstFile, err = os.Create(externalPath); err != nil {
- return fmt.Errorf("astikit: creating %s failed: %w", externalPath, err)
- }
- defer dstFile.Close()
-
- // Create zip writer
- var zw = zip.NewWriter(dstFile)
- defer zw.Close()
-
- // Walk
- if err = filepath.Walk(src, func(path string, info os.FileInfo, e error) (err error) {
- // Process error
- if e != nil {
- err = e
- return
- }
-
- // Init header
- var h *zip.FileHeader
- if h, err = zip.FileInfoHeader(info); err != nil {
- return fmt.Errorf("astikit: initializing zip header failed: %w", err)
- }
-
- // Set header info
- h.Name = filepath.Join(internalPath, strings.TrimPrefix(path, src))
- if info.IsDir() {
- h.Name += string(os.PathSeparator)
- } else {
- h.Method = zip.Deflate
- }
-
- // Create writer
- var w io.Writer
- if w, err = zw.CreateHeader(h); err != nil {
- return fmt.Errorf("astikit: creating zip header failed: %w", err)
- }
-
- // If path is dir, stop here
- if info.IsDir() {
- return
- }
-
- // Open path
- var walkFile *os.File
- if walkFile, err = os.Open(path); err != nil {
- return fmt.Errorf("astikit: opening %s failed: %w", path, err)
- }
- defer walkFile.Close()
-
- // Copy
- if _, err = Copy(ctx, w, walkFile); err != nil {
- return fmt.Errorf("astikit: copying failed: %w", err)
- }
- return
- }); err != nil {
- return fmt.Errorf("astikit: walking failed: %w", err)
- }
- return
-}
-
-// Unzip unzips a src into a dst
-// Possible src formats are:
-// - /path/to/zip.zip
-// - /path/to/zip.zip/root/path
-func Unzip(ctx context.Context, dst, src string) (err error) {
- // Get external/internal path
- externalPath, internalPath := zipInternalPath(src)
-
- // Make sure the destination exists
- if err = os.MkdirAll(dst, DefaultDirMode); err != nil {
- return fmt.Errorf("astikit: mkdirall %s failed: %w", dst, err)
- }
-
- // Open overall reader
- var r *zip.ReadCloser
- if r, err = zip.OpenReader(externalPath); err != nil {
- return fmt.Errorf("astikit: opening overall zip reader on %s failed: %w", externalPath, err)
- }
- defer r.Close()
-
- // Loop through files to determine their type
- var dirs, files, symlinks = make(map[string]*zip.File), make(map[string]*zip.File), make(map[string]*zip.File)
- for _, f := range r.File {
- // Validate internal path
- if internalPath != "" && !strings.HasPrefix(f.Name, internalPath) {
- continue
- }
- var p = filepath.Join(dst, strings.TrimPrefix(f.Name, internalPath))
-
- // Check file type
- if f.FileInfo().Mode()&os.ModeSymlink != 0 {
- symlinks[p] = f
- } else if f.FileInfo().IsDir() {
- dirs[p] = f
- } else {
- files[p] = f
- }
- }
-
- // Invalid internal path
- if internalPath != "" && len(dirs) == 0 && len(files) == 0 && len(symlinks) == 0 {
- return fmt.Errorf("astikit: content in archive does not match specified internal path %s", internalPath)
- }
-
- // Create dirs
- for p, f := range dirs {
- if err = os.MkdirAll(p, f.FileInfo().Mode().Perm()); err != nil {
- return fmt.Errorf("astikit: mkdirall %s failed: %w", p, err)
- }
- }
-
- // Create files
- for p, f := range files {
- if err = createZipFile(ctx, f, p); err != nil {
- return fmt.Errorf("astikit: creating zip file into %s failed: %w", p, err)
- }
- }
-
- // Create symlinks
- for p, f := range symlinks {
- if err = createZipSymlink(f, p); err != nil {
- return fmt.Errorf("astikit: creating zip symlink into %s failed: %w", p, err)
- }
- }
- return
-}
-
-func createZipFile(ctx context.Context, f *zip.File, p string) (err error) {
- // Open file reader
- var fr io.ReadCloser
- if fr, err = f.Open(); err != nil {
- return fmt.Errorf("astikit: opening zip reader on file %s failed: %w", f.Name, err)
- }
- defer fr.Close()
-
- // Since dirs don't always come up we make sure the directory of the file exists with default
- // file mode
- if err = os.MkdirAll(filepath.Dir(p), DefaultDirMode); err != nil {
- return fmt.Errorf("astikit: mkdirall %s failed: %w", filepath.Dir(p), err)
- }
-
- // Open the file
- var fl *os.File
- if fl, err = os.OpenFile(p, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.FileInfo().Mode().Perm()); err != nil {
- return fmt.Errorf("astikit: opening file %s failed: %w", p, err)
- }
- defer fl.Close()
-
- // Copy
- if _, err = Copy(ctx, fl, fr); err != nil {
- return fmt.Errorf("astikit: copying %s into %s failed: %w", f.Name, p, err)
- }
- return
-}
-
-func createZipSymlink(f *zip.File, p string) (err error) {
- // Open file reader
- var fr io.ReadCloser
- if fr, err = f.Open(); err != nil {
- return fmt.Errorf("astikit: opening zip reader on file %s failed: %w", f.Name, err)
- }
- defer fr.Close()
-
- // If file is a symlink we retrieve the target path that is in the content of the file
- var b []byte
- if b, err = ioutil.ReadAll(fr); err != nil {
- return fmt.Errorf("astikit: ioutil.Readall on %s failed: %w", f.Name, err)
- }
-
- // Create the symlink
- if err = os.Symlink(string(b), p); err != nil {
- return fmt.Errorf("astikit: creating symlink from %s to %s failed: %w", string(b), p, err)
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/astikit.go b/vendor/github.com/asticode/go-astikit/astikit.go
deleted file mode 100644
index cb6909a68f4..00000000000
--- a/vendor/github.com/asticode/go-astikit/astikit.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package astikit
-
-import "os"
-
-// Default modes
-var (
- DefaultDirMode os.FileMode = 0755
-)
diff --git a/vendor/github.com/asticode/go-astikit/binary.go b/vendor/github.com/asticode/go-astikit/binary.go
deleted file mode 100644
index 521c3b50e8e..00000000000
--- a/vendor/github.com/asticode/go-astikit/binary.go
+++ /dev/null
@@ -1,297 +0,0 @@
-package astikit
-
-import (
- "encoding/binary"
- "errors"
- "io"
-)
-
-// BitsWriter represents an object that can write individual bits into a writer
-// in a developer-friendly way. Check out the Write method for more information.
-// This is particularly helpful when you want to build a slice of bytes based
-// on individual bits for testing purposes.
-type BitsWriter struct {
- bo binary.ByteOrder
- cache byte
- cacheLen byte
- bsCache []byte
- w io.Writer
- writeCb BitsWriterWriteCallback
-}
-
-type BitsWriterWriteCallback func([]byte)
-
-// BitsWriterOptions represents BitsWriter options
-type BitsWriterOptions struct {
- ByteOrder binary.ByteOrder
- // WriteCallback is called every time when full byte is written
- WriteCallback BitsWriterWriteCallback
- Writer io.Writer
-}
-
-// NewBitsWriter creates a new BitsWriter
-func NewBitsWriter(o BitsWriterOptions) (w *BitsWriter) {
- w = &BitsWriter{
- bo: o.ByteOrder,
- bsCache: make([]byte, 1),
- w: o.Writer,
- writeCb: o.WriteCallback,
- }
- if w.bo == nil {
- w.bo = binary.BigEndian
- }
- return
-}
-
-func (w *BitsWriter) SetWriteCallback(cb BitsWriterWriteCallback) {
- w.writeCb = cb
-}
-
-// Write writes bits into the writer. Bits are only written when there are
-// enough to create a byte. When using a string or a bool, bits are added
-// from left to right as if
-// Available types are:
-// - string("10010"): processed as n bits, n being the length of the input
-// - []byte: processed as n bytes, n being the length of the input
-// - bool: processed as one bit
-// - uint8/uint16/uint32/uint64: processed as n bits, if type is uintn
-func (w *BitsWriter) Write(i interface{}) error {
- // Transform input into "10010" format
-
- switch a := i.(type) {
- case string:
- for _, r := range a {
- var err error
- if r == '1' {
- err = w.writeBit(1)
- } else {
- err = w.writeBit(0)
- }
- if err != nil {
- return err
- }
- }
- case []byte:
- for _, b := range a {
- if err := w.writeFullByte(b); err != nil {
- return err
- }
- }
- case bool:
- if a {
- return w.writeBit(1)
- } else {
- return w.writeBit(0)
- }
- case uint8:
- return w.writeFullByte(a)
- case uint16:
- return w.writeFullInt(uint64(a), 2)
- case uint32:
- return w.writeFullInt(uint64(a), 4)
- case uint64:
- return w.writeFullInt(a, 8)
- default:
- return errors.New("astikit: invalid type")
- }
-
- return nil
-}
-
-// Writes exactly n bytes from bs
-// Writes first n bytes of bs if len(bs) > n
-// Pads with padByte at the end if len(bs) < n
-func (w *BitsWriter) WriteBytesN(bs []byte, n int, padByte uint8) error {
- if len(bs) >= n {
- return w.Write(bs[:n])
- }
-
- if err := w.Write(bs); err != nil {
- return err
- }
-
- // no bytes.Repeat here to avoid allocation
- for i := 0; i < n-len(bs); i++ {
- if err := w.Write(padByte); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (w *BitsWriter) writeFullInt(in uint64, len int) error {
- if w.bo == binary.BigEndian {
- for i := len - 1; i >= 0; i-- {
- err := w.writeFullByte(byte((in >> (i * 8)) & 0xff))
- if err != nil {
- return err
- }
- }
- } else {
- for i := 0; i < len; i++ {
- err := w.writeFullByte(byte((in >> (i * 8)) & 0xff))
- if err != nil {
- return err
- }
- }
- }
-
- return nil
-}
-
-func (w *BitsWriter) flushBsCache() error {
- if _, err := w.w.Write(w.bsCache); err != nil {
- return err
- }
-
- if w.writeCb != nil {
- w.writeCb(w.bsCache)
- }
-
- return nil
-}
-
-func (w *BitsWriter) writeFullByte(b byte) error {
- if w.cacheLen == 0 {
- w.bsCache[0] = b
- } else {
- w.bsCache[0] = w.cache | (b >> w.cacheLen)
- w.cache = b << (8 - w.cacheLen)
- }
- return w.flushBsCache()
-}
-
-func (w *BitsWriter) writeBit(bit byte) error {
- w.cache = w.cache | (bit)<<(7-w.cacheLen)
- w.cacheLen++
- if w.cacheLen == 8 {
- w.bsCache[0] = w.cache
- if err := w.flushBsCache(); err != nil {
- return err
- }
-
- w.cacheLen = 0
- w.cache = 0
- }
- return nil
-}
-
-// WriteN writes the input into n bits
-func (w *BitsWriter) WriteN(i interface{}, n int) error {
- var toWrite uint64
- switch a := i.(type) {
- case uint8:
- toWrite = uint64(a)
- case uint16:
- toWrite = uint64(a)
- case uint32:
- toWrite = uint64(a)
- case uint64:
- toWrite = a
- default:
- return errors.New("astikit: invalid type")
- }
-
- for i := n - 1; i >= 0; i-- {
- err := w.writeBit(byte(toWrite>>i) & 0x1)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-// BitsWriterBatch allows to chain multiple Write* calls and check for error only once
-// For more info see https://github.com/asticode/go-astikit/pull/6
-type BitsWriterBatch struct {
- err error
- w *BitsWriter
-}
-
-func NewBitsWriterBatch(w *BitsWriter) BitsWriterBatch {
- return BitsWriterBatch{
- w: w,
- }
-}
-
-// Calls BitsWriter.Write if there was no write error before
-func (b *BitsWriterBatch) Write(i interface{}) {
- if b.err == nil {
- b.err = b.w.Write(i)
- }
-}
-
-// Calls BitsWriter.WriteN if there was no write error before
-func (b *BitsWriterBatch) WriteN(i interface{}, n int) {
- if b.err == nil {
- b.err = b.w.WriteN(i, n)
- }
-}
-
-// Calls BitsWriter.WriteBytesN if there was no write error before
-func (b *BitsWriterBatch) WriteBytesN(bs []byte, n int, padByte uint8) {
- if b.err == nil {
- b.err = b.w.WriteBytesN(bs, n, padByte)
- }
-}
-
-// Returns first write error
-func (b *BitsWriterBatch) Err() error {
- return b.err
-}
-
-var byteHamming84Tab = [256]uint8{
- 0x01, 0xff, 0xff, 0x08, 0xff, 0x0c, 0x04, 0xff, 0xff, 0x08, 0x08, 0x08, 0x06, 0xff, 0xff, 0x08,
- 0xff, 0x0a, 0x02, 0xff, 0x06, 0xff, 0xff, 0x0f, 0x06, 0xff, 0xff, 0x08, 0x06, 0x06, 0x06, 0xff,
- 0xff, 0x0a, 0x04, 0xff, 0x04, 0xff, 0x04, 0x04, 0x00, 0xff, 0xff, 0x08, 0xff, 0x0d, 0x04, 0xff,
- 0x0a, 0x0a, 0xff, 0x0a, 0xff, 0x0a, 0x04, 0xff, 0xff, 0x0a, 0x03, 0xff, 0x06, 0xff, 0xff, 0x0e,
- 0x01, 0x01, 0x01, 0xff, 0x01, 0xff, 0xff, 0x0f, 0x01, 0xff, 0xff, 0x08, 0xff, 0x0d, 0x05, 0xff,
- 0x01, 0xff, 0xff, 0x0f, 0xff, 0x0f, 0x0f, 0x0f, 0xff, 0x0b, 0x03, 0xff, 0x06, 0xff, 0xff, 0x0f,
- 0x01, 0xff, 0xff, 0x09, 0xff, 0x0d, 0x04, 0xff, 0xff, 0x0d, 0x03, 0xff, 0x0d, 0x0d, 0xff, 0x0d,
- 0xff, 0x0a, 0x03, 0xff, 0x07, 0xff, 0xff, 0x0f, 0x03, 0xff, 0x03, 0x03, 0xff, 0x0d, 0x03, 0xff,
- 0xff, 0x0c, 0x02, 0xff, 0x0c, 0x0c, 0xff, 0x0c, 0x00, 0xff, 0xff, 0x08, 0xff, 0x0c, 0x05, 0xff,
- 0x02, 0xff, 0x02, 0x02, 0xff, 0x0c, 0x02, 0xff, 0xff, 0x0b, 0x02, 0xff, 0x06, 0xff, 0xff, 0x0e,
- 0x00, 0xff, 0xff, 0x09, 0xff, 0x0c, 0x04, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x0e,
- 0xff, 0x0a, 0x02, 0xff, 0x07, 0xff, 0xff, 0x0e, 0x00, 0xff, 0xff, 0x0e, 0xff, 0x0e, 0x0e, 0x0e,
- 0x01, 0xff, 0xff, 0x09, 0xff, 0x0c, 0x05, 0xff, 0xff, 0x0b, 0x05, 0xff, 0x05, 0xff, 0x05, 0x05,
- 0xff, 0x0b, 0x02, 0xff, 0x07, 0xff, 0xff, 0x0f, 0x0b, 0x0b, 0xff, 0x0b, 0xff, 0x0b, 0x05, 0xff,
- 0xff, 0x09, 0x09, 0x09, 0x07, 0xff, 0xff, 0x09, 0x00, 0xff, 0xff, 0x09, 0xff, 0x0d, 0x05, 0xff,
- 0x07, 0xff, 0xff, 0x09, 0x07, 0x07, 0x07, 0xff, 0xff, 0x0b, 0x03, 0xff, 0x07, 0xff, 0xff, 0x0e,
-}
-
-// ByteHamming84Decode hamming 8/4 decodes
-func ByteHamming84Decode(i uint8) (o uint8, ok bool) {
- o = byteHamming84Tab[i]
- if o == 0xff {
- return
- }
- ok = true
- return
-}
-
-var byteParityTab = [256]uint8{
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00,
-}
-
-// ByteParity returns the byte parity
-func ByteParity(i uint8) (o uint8, ok bool) {
- ok = byteParityTab[i] == 1
- o = i & 0x7f
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/bytes.go b/vendor/github.com/asticode/go-astikit/bytes.go
deleted file mode 100644
index 155e2f06a2c..00000000000
--- a/vendor/github.com/asticode/go-astikit/bytes.go
+++ /dev/null
@@ -1,164 +0,0 @@
-package astikit
-
-import "fmt"
-
-// BytesIterator represents an object capable of iterating sequentially and safely
-// through a slice of bytes. This is particularly useful when you need to iterate
-// through a slice of bytes and don't want to check for "index out of range" errors
-// manually.
-type BytesIterator struct {
- bs []byte
- offset int
-}
-
-// NewBytesIterator creates a new BytesIterator
-func NewBytesIterator(bs []byte) *BytesIterator {
- return &BytesIterator{bs: bs}
-}
-
-// NextByte returns the next byte
-func (i *BytesIterator) NextByte() (b byte, err error) {
- if len(i.bs) < i.offset+1 {
- err = fmt.Errorf("astikit: slice length is %d, offset %d is invalid", len(i.bs), i.offset)
- return
- }
- b = i.bs[i.offset]
- i.offset++
- return
-}
-
-// NextBytes returns the n next bytes
-func (i *BytesIterator) NextBytes(n int) (bs []byte, err error) {
- if len(i.bs) < i.offset+n {
- err = fmt.Errorf("astikit: slice length is %d, offset %d is invalid", len(i.bs), i.offset+n)
- return
- }
- bs = make([]byte, n)
- copy(bs, i.bs[i.offset:i.offset+n])
- i.offset += n
- return
-}
-
-// NextBytesNoCopy returns the n next bytes
-// Be careful with this function as it doesn't make a copy of returned data.
-// bs will point to internal BytesIterator buffer.
-// If you need to modify returned bytes or store it for some time, use NextBytes instead
-func (i *BytesIterator) NextBytesNoCopy(n int) (bs []byte, err error) {
- if len(i.bs) < i.offset+n {
- err = fmt.Errorf("astikit: slice length is %d, offset %d is invalid", len(i.bs), i.offset+n)
- return
- }
- bs = i.bs[i.offset : i.offset+n]
- i.offset += n
- return
-}
-
-// Seek seeks to the nth byte
-func (i *BytesIterator) Seek(n int) {
- i.offset = n
-}
-
-// Skip skips the n previous/next bytes
-func (i *BytesIterator) Skip(n int) {
- i.offset += n
-}
-
-// HasBytesLeft checks whether there are bytes left
-func (i *BytesIterator) HasBytesLeft() bool {
- return i.offset < len(i.bs)
-}
-
-// Offset returns the offset
-func (i *BytesIterator) Offset() int {
- return i.offset
-}
-
-// Dump dumps the rest of the slice
-func (i *BytesIterator) Dump() (bs []byte) {
- if !i.HasBytesLeft() {
- return
- }
- bs = make([]byte, len(i.bs)-i.offset)
- copy(bs, i.bs[i.offset:len(i.bs)])
- i.offset = len(i.bs)
- return
-}
-
-// Len returns the slice length
-func (i *BytesIterator) Len() int {
- return len(i.bs)
-}
-
-const (
- padRight = "right"
- padLeft = "left"
-)
-
-type bytesPadder struct {
- cut bool
- direction string
- length int
- repeat byte
-}
-
-func newBytesPadder(repeat byte, length int) *bytesPadder {
- return &bytesPadder{
- direction: padLeft,
- length: length,
- repeat: repeat,
- }
-}
-
-func (p *bytesPadder) pad(i []byte) []byte {
- if len(i) == p.length {
- return i
- } else if len(i) > p.length {
- if p.cut {
- return i[:p.length]
- }
- return i
- } else {
- o := make([]byte, len(i))
- copy(o, i)
- for idx := 0; idx < p.length-len(i); idx++ {
- if p.direction == padRight {
- o = append(o, p.repeat)
- } else {
- o = append([]byte{p.repeat}, o...)
- }
- o = append(o, p.repeat)
- }
- o = o[:p.length]
- return o
- }
-}
-
-// PadOption represents a Pad option
-type PadOption func(p *bytesPadder)
-
-// PadCut is a PadOption
-// It indicates to the padder it must cut the input to the provided length
-// if its original length is bigger
-func PadCut(p *bytesPadder) { p.cut = true }
-
-// PadLeft is a PadOption
-// It indicates additionnal bytes have to be added to the left
-func PadLeft(p *bytesPadder) { p.direction = padLeft }
-
-// PadRight is a PadOption
-// It indicates additionnal bytes have to be added to the right
-func PadRight(p *bytesPadder) { p.direction = padRight }
-
-// BytesPad pads the slice of bytes with additionnal options
-func BytesPad(i []byte, repeat byte, length int, options ...PadOption) []byte {
- p := newBytesPadder(repeat, length)
- for _, o := range options {
- o(p)
- }
- return p.pad(i)
-}
-
-// StrPad pads the string with additionnal options
-func StrPad(i string, repeat rune, length int, options ...PadOption) string {
- return string(BytesPad([]byte(i), byte(repeat), length, options...))
-}
diff --git a/vendor/github.com/asticode/go-astikit/defer.go b/vendor/github.com/asticode/go-astikit/defer.go
deleted file mode 100644
index ddca03702e4..00000000000
--- a/vendor/github.com/asticode/go-astikit/defer.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package astikit
-
-import (
- "sync"
-)
-
-// CloseFunc is a method that closes something
-type CloseFunc func() error
-
-// Closer is an object that can close several things
-type Closer struct {
- fs []CloseFunc
- m *sync.Mutex
-}
-
-// NewCloser creates a new closer
-func NewCloser() *Closer {
- return &Closer{
- m: &sync.Mutex{},
- }
-}
-
-// Close implements the io.Closer interface
-func (c *Closer) Close() error {
- // Lock
- c.m.Lock()
- defer c.m.Unlock()
-
- // Loop through closers
- err := NewErrors()
- for _, f := range c.fs {
- err.Add(f())
- }
-
- // Reset closers
- c.fs = []CloseFunc{}
-
- // Return
- if err.IsNil() {
- return nil
- }
- return err
-}
-
-// Add adds a close func at the beginning of the list
-func (c *Closer) Add(f CloseFunc) {
- c.m.Lock()
- defer c.m.Unlock()
- c.fs = append([]CloseFunc{f}, c.fs...)
-}
-
-// NewChild creates a new child closer
-func (c *Closer) NewChild() (child *Closer) {
- child = NewCloser()
- c.Add(child.Close)
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/errors.go b/vendor/github.com/asticode/go-astikit/errors.go
deleted file mode 100644
index 46e84963a3e..00000000000
--- a/vendor/github.com/asticode/go-astikit/errors.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package astikit
-
-import (
- "errors"
- "strings"
- "sync"
-)
-
-// Errors is an error containing multiple errors
-type Errors struct {
- m *sync.Mutex // Locks p
- p []error
-}
-
-// NewErrors creates new errors
-func NewErrors(errs ...error) *Errors {
- return &Errors{
- m: &sync.Mutex{},
- p: errs,
- }
-}
-
-// Add adds a new error
-func (errs *Errors) Add(err error) {
- if err == nil {
- return
- }
- errs.m.Lock()
- defer errs.m.Unlock()
- errs.p = append(errs.p, err)
-}
-
-// IsNil checks whether the error is nil
-func (errs *Errors) IsNil() bool {
- errs.m.Lock()
- defer errs.m.Unlock()
- return len(errs.p) == 0
-}
-
-// Loop loops through the errors
-func (errs *Errors) Loop(fn func(idx int, err error) bool) {
- errs.m.Lock()
- defer errs.m.Unlock()
- for idx, err := range errs.p {
- if stop := fn(idx, err); stop {
- return
- }
- }
-}
-
-// Error implements the error interface
-func (errs *Errors) Error() string {
- errs.m.Lock()
- defer errs.m.Unlock()
- var ss []string
- for _, err := range errs.p {
- ss = append(ss, err.Error())
- }
- return strings.Join(ss, " && ")
-}
-
-// ErrorCause returns the cause of an error
-func ErrorCause(err error) error {
- for {
- if u := errors.Unwrap(err); u != nil {
- err = u
- continue
- }
- return err
- }
-}
diff --git a/vendor/github.com/asticode/go-astikit/exec.go b/vendor/github.com/asticode/go-astikit/exec.go
deleted file mode 100644
index 07a0e40928d..00000000000
--- a/vendor/github.com/asticode/go-astikit/exec.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package astikit
-
-import (
- "context"
- "fmt"
- "os/exec"
- "strings"
- "sync"
-)
-
-// Statuses
-const (
- ExecStatusCrashed = "crashed"
- ExecStatusRunning = "running"
- ExecStatusStopped = "stopped"
-)
-
-// ExecHandler represents an object capable of handling the execution of a cmd
-type ExecHandler struct {
- cancel context.CancelFunc
- ctx context.Context
- err error
- o sync.Once
- stopped bool
-}
-
-// Status returns the cmd status
-func (h *ExecHandler) Status() string {
- if h.ctx.Err() != nil {
- if h.stopped || h.err == nil {
- return ExecStatusStopped
- }
- return ExecStatusCrashed
- }
- return ExecStatusRunning
-}
-
-// Stop stops the cmd
-func (h *ExecHandler) Stop() {
- h.o.Do(func() {
- h.cancel()
- h.stopped = true
- })
-}
-
-// ExecCmdOptions represents exec options
-type ExecCmdOptions struct {
- Args []string
- CmdAdapter func(cmd *exec.Cmd, h *ExecHandler) error
- Name string
- StopFunc func(cmd *exec.Cmd) error
-}
-
-// ExecCmd executes a cmd
-// The process will be stopped when the worker stops
-func ExecCmd(w *Worker, o ExecCmdOptions) (h *ExecHandler, err error) {
- // Create handler
- h = &ExecHandler{}
- h.ctx, h.cancel = context.WithCancel(w.Context())
-
- // Create command
- cmd := exec.Command(o.Name, o.Args...)
-
- // Adapt command
- if o.CmdAdapter != nil {
- if err = o.CmdAdapter(cmd, h); err != nil {
- err = fmt.Errorf("astikit: adapting cmd failed: %w", err)
- return
- }
- }
-
- // Start
- w.Logger().Infof("astikit: starting %s", strings.Join(cmd.Args, " "))
- if err = cmd.Start(); err != nil {
- err = fmt.Errorf("astikit: executing %s: %w", strings.Join(cmd.Args, " "), err)
- return
- }
-
- // Handle context
- go func() {
- // Wait for context to be done
- <-h.ctx.Done()
-
- // Get stop func
- f := func() error { return cmd.Process.Kill() }
- if o.StopFunc != nil {
- f = func() error { return o.StopFunc(cmd) }
- }
-
- // Stop
- if err = f(); err != nil {
- w.Logger().Error(fmt.Errorf("astikit: stopping cmd failed: %w", err))
- return
- }
- }()
-
- // Execute in a task
- w.NewTask().Do(func() {
- h.err = cmd.Wait()
- h.cancel()
- w.Logger().Infof("astikit: status is now %s for %s", h.Status(), strings.Join(cmd.Args, " "))
- })
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/flag.go b/vendor/github.com/asticode/go-astikit/flag.go
deleted file mode 100644
index 2c533cd91dd..00000000000
--- a/vendor/github.com/asticode/go-astikit/flag.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package astikit
-
-import (
- "os"
- "strings"
-)
-
-// FlagCmd retrieves the command from the input Args
-func FlagCmd() (o string) {
- if len(os.Args) >= 2 && os.Args[1][0] != '-' {
- o = os.Args[1]
- os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
- }
- return
-}
-
-// FlagStrings represents a flag that can be set several times and
-// stores unique string values
-type FlagStrings struct {
- Map map[string]bool
- Slice *[]string
-}
-
-// NewFlagStrings creates a new FlagStrings
-func NewFlagStrings() FlagStrings {
- return FlagStrings{
- Map: make(map[string]bool),
- Slice: &[]string{},
- }
-}
-
-// String implements the flag.Value interface
-func (f FlagStrings) String() string {
- if f.Slice == nil {
- return ""
- }
- return strings.Join(*f.Slice, ",")
-}
-
-// Set implements the flag.Value interface
-func (f FlagStrings) Set(i string) error {
- if _, ok := f.Map[i]; ok {
- return nil
- }
- f.Map[i] = true
- *f.Slice = append(*f.Slice, i)
- return nil
-}
diff --git a/vendor/github.com/asticode/go-astikit/float.go b/vendor/github.com/asticode/go-astikit/float.go
deleted file mode 100644
index 844f673a4d7..00000000000
--- a/vendor/github.com/asticode/go-astikit/float.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package astikit
-
-import (
- "bytes"
- "fmt"
- "strconv"
-)
-
-// Rational represents a rational
-type Rational struct{ den, num int }
-
-// NewRational creates a new rational
-func NewRational(num, den int) *Rational {
- return &Rational{
- den: den,
- num: num,
- }
-}
-
-// Num returns the rational num
-func (r *Rational) Num() int {
- return r.num
-}
-
-// Den returns the rational den
-func (r *Rational) Den() int {
- return r.den
-}
-
-// ToFloat64 returns the rational as a float64
-func (r *Rational) ToFloat64() float64 {
- return float64(r.num) / float64(r.den)
-}
-
-// MarshalText implements the TextMarshaler interface
-func (r *Rational) MarshalText() (b []byte, err error) {
- b = []byte(fmt.Sprintf("%d/%d", r.num, r.den))
- return
-}
-
-// UnmarshalText implements the TextUnmarshaler interface
-func (r *Rational) UnmarshalText(b []byte) (err error) {
- r.num = 0
- r.den = 1
- if len(b) == 0 {
- return
- }
- items := bytes.Split(b, []byte("/"))
- if r.num, err = strconv.Atoi(string(items[0])); err != nil {
- err = fmt.Errorf("astikit: atoi of %s failed: %w", string(items[0]), err)
- return
- }
- if len(items) > 1 {
- if r.den, err = strconv.Atoi(string(items[1])); err != nil {
- err = fmt.Errorf("astifloat: atoi of %s failed: %w", string(items[1]), err)
- return
- }
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/http.go b/vendor/github.com/asticode/go-astikit/http.go
deleted file mode 100644
index 72a3b0f0897..00000000000
--- a/vendor/github.com/asticode/go-astikit/http.go
+++ /dev/null
@@ -1,632 +0,0 @@
-package astikit
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net"
- "net/http"
- "os"
- "path/filepath"
- "strconv"
- "strings"
- "sync"
- "time"
-)
-
-var ErrHTTPSenderUnmarshaledError = errors.New("astikit: unmarshaled error")
-
-// ServeHTTPOptions represents serve options
-type ServeHTTPOptions struct {
- Addr string
- Handler http.Handler
-}
-
-// ServeHTTP spawns an HTTP server
-func ServeHTTP(w *Worker, o ServeHTTPOptions) {
- // Create server
- s := &http.Server{Addr: o.Addr, Handler: o.Handler}
-
- // Execute in a task
- w.NewTask().Do(func() {
- // Log
- w.Logger().Infof("astikit: serving on %s", o.Addr)
-
- // Serve
- var done = make(chan error)
- go func() {
- if err := s.ListenAndServe(); err != nil {
- done <- err
- }
- }()
-
- // Wait for context or done to be done
- select {
- case <-w.ctx.Done():
- if w.ctx.Err() != context.Canceled {
- w.Logger().Error(fmt.Errorf("astikit: context error: %w", w.ctx.Err()))
- }
- case err := <-done:
- if err != nil {
- w.Logger().Error(fmt.Errorf("astikit: serving failed: %w", err))
- }
- }
-
- // Shutdown
- w.Logger().Infof("astikit: shutting down server on %s", o.Addr)
- if err := s.Shutdown(context.Background()); err != nil {
- w.Logger().Error(fmt.Errorf("astikit: shutting down server on %s failed: %w", o.Addr, err))
- }
- })
-}
-
-// HTTPClient represents an HTTP client
-type HTTPClient interface {
- Do(req *http.Request) (*http.Response, error)
-}
-
-// HTTPSender represents an object capable of sending http requests
-type HTTPSender struct {
- client HTTPClient
- l SeverityLogger
- retryFunc HTTPSenderRetryFunc
- retryMax int
- retrySleep time.Duration
- timeout time.Duration
-}
-
-// HTTPSenderRetryFunc is a function that decides whether to retry an HTTP request
-type HTTPSenderRetryFunc func(resp *http.Response) error
-
-// HTTPSenderOptions represents HTTPSender options
-type HTTPSenderOptions struct {
- Client HTTPClient
- Logger StdLogger
- RetryFunc HTTPSenderRetryFunc
- RetryMax int
- RetrySleep time.Duration
- Timeout time.Duration
-}
-
-// NewHTTPSender creates a new HTTP sender
-func NewHTTPSender(o HTTPSenderOptions) (s *HTTPSender) {
- s = &HTTPSender{
- client: o.Client,
- l: AdaptStdLogger(o.Logger),
- retryFunc: o.RetryFunc,
- retryMax: o.RetryMax,
- retrySleep: o.RetrySleep,
- timeout: o.Timeout,
- }
- if s.client == nil {
- s.client = &http.Client{}
- }
- if s.retryFunc == nil {
- s.retryFunc = s.defaultHTTPRetryFunc
- }
- return
-}
-
-func (s *HTTPSender) defaultHTTPRetryFunc(resp *http.Response) error {
- if resp.StatusCode >= http.StatusInternalServerError {
- return fmt.Errorf("astikit: invalid status code %d", resp.StatusCode)
- }
- return nil
-}
-
-// Send sends a new *http.Request
-func (s *HTTPSender) Send(req *http.Request) (*http.Response, error) {
- return s.SendWithTimeout(req, s.timeout)
-}
-
-// SendWithTimeout sends a new *http.Request with a timeout
-func (s *HTTPSender) SendWithTimeout(req *http.Request, timeout time.Duration) (resp *http.Response, err error) {
- // Set name
- name := req.Method + " request"
- if req.URL != nil {
- name += " to " + req.URL.String()
- }
-
- // Timeout
- if timeout > 0 {
- // Create context
- ctx, cancel := context.WithTimeout(req.Context(), timeout)
- defer cancel()
-
- // Update request
- req = req.WithContext(ctx)
-
- // Update name
- name += " with timeout " + timeout.String()
- }
-
- // Loop
- // We start at retryMax + 1 so that it runs at least once even if retryMax == 0
- tries := 0
- for retriesLeft := s.retryMax + 1; retriesLeft > 0; retriesLeft-- {
- // Get request name
- nr := name + " (" + strconv.Itoa(s.retryMax-retriesLeft+2) + "/" + strconv.Itoa(s.retryMax+1) + ")"
- tries++
-
- // Send request
- s.l.Debugf("astikit: sending %s", nr)
- if resp, err = s.client.Do(req); err != nil {
- // Retry if error is temporary, stop here otherwise
- if netError, ok := err.(net.Error); !ok || !netError.Temporary() {
- err = fmt.Errorf("astikit: sending %s failed: %w", nr, err)
- return
- }
- } else if err = req.Context().Err(); err != nil {
- err = fmt.Errorf("astikit: request context failed: %w", err)
- return
- } else {
- err = s.retryFunc(resp)
- }
-
- // Retry
- if err != nil {
- if retriesLeft > 1 {
- s.l.Errorf("astikit: sending %s failed, sleeping %s and retrying... (%d retries left): %w", nr, s.retrySleep, retriesLeft-1, err)
- time.Sleep(s.retrySleep)
- }
- continue
- }
-
- // Return if conditions for retrying were not met
- return
- }
-
- // Max retries limit reached
- err = fmt.Errorf("astikit: sending %s failed after %d tries: %w", name, tries, err)
- return
-}
-
-// HTTPSendJSONOptions represents SendJSON options
-type HTTPSendJSONOptions struct {
- BodyError interface{}
- BodyIn interface{}
- BodyOut interface{}
- Headers map[string]string
- Method string
- URL string
-}
-
-// SendJSON sends a new JSON HTTP request
-func (s *HTTPSender) SendJSON(o HTTPSendJSONOptions) (err error) {
- // Marshal body in
- var bi io.Reader
- if o.BodyIn != nil {
- bb := &bytes.Buffer{}
- if err = json.NewEncoder(bb).Encode(o.BodyIn); err != nil {
- err = fmt.Errorf("astikit: marshaling body in failed: %w", err)
- return
- }
- bi = bb
- }
-
- // Create request
- var req *http.Request
- if req, err = http.NewRequest(o.Method, o.URL, bi); err != nil {
- err = fmt.Errorf("astikit: creating request failed: %w", err)
- return
- }
-
- // Add headers
- for k, v := range o.Headers {
- req.Header.Set(k, v)
- }
-
- // Send request
- var resp *http.Response
- if resp, err = s.Send(req); err != nil {
- err = fmt.Errorf("astikit: sending request failed: %w", err)
- return
- }
- defer resp.Body.Close()
-
- // Process status code
- if code := resp.StatusCode; code < 200 || code > 299 {
- // Try unmarshaling error
- if o.BodyError != nil {
- if err2 := json.NewDecoder(resp.Body).Decode(o.BodyError); err2 == nil {
- err = ErrHTTPSenderUnmarshaledError
- return
- }
- }
-
- // Default error
- err = fmt.Errorf("astikit: invalid status code %d", code)
- return
- }
-
- // Unmarshal body out
- if o.BodyOut != nil {
- if err = json.NewDecoder(resp.Body).Decode(o.BodyOut); err != nil {
- err = fmt.Errorf("astikit: unmarshaling failed: %w", err)
- return
- }
- }
- return
-}
-
-// HTTPResponseFunc is a func that can process an $http.Response
-type HTTPResponseFunc func(resp *http.Response) error
-
-func defaultHTTPResponseFunc(resp *http.Response) (err error) {
- if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusMultipleChoices {
- err = fmt.Errorf("astikit: invalid status code %d", resp.StatusCode)
- return
- }
- return
-}
-
-// HTTPDownloader represents an object capable of downloading several HTTP srcs simultaneously
-// and doing stuff to the results
-type HTTPDownloader struct {
- bp *BufferPool
- l *GoroutineLimiter
- responseFunc HTTPResponseFunc
- s *HTTPSender
-}
-
-// HTTPDownloaderOptions represents HTTPDownloader options
-type HTTPDownloaderOptions struct {
- Limiter GoroutineLimiterOptions
- ResponseFunc HTTPResponseFunc
- Sender HTTPSenderOptions
-}
-
-// NewHTTPDownloader creates a new HTTPDownloader
-func NewHTTPDownloader(o HTTPDownloaderOptions) (d *HTTPDownloader) {
- d = &HTTPDownloader{
- bp: NewBufferPool(),
- l: NewGoroutineLimiter(o.Limiter),
- responseFunc: o.ResponseFunc,
- s: NewHTTPSender(o.Sender),
- }
- if d.responseFunc == nil {
- d.responseFunc = defaultHTTPResponseFunc
- }
- return
-}
-
-// Close closes the downloader properly
-func (d *HTTPDownloader) Close() error {
- return d.l.Close()
-}
-
-type HTTPDownloaderSrc struct {
- Body io.Reader
- Header http.Header
- Method string
- URL string
-}
-
-// It is the responsibility of the caller to call i.Close()
-type httpDownloaderFunc func(ctx context.Context, idx int, i *BufferPoolItem) error
-
-func (d *HTTPDownloader) do(ctx context.Context, fn httpDownloaderFunc, idx int, src HTTPDownloaderSrc) (err error) {
- // Defaults
- if src.Method == "" {
- src.Method = http.MethodGet
- }
-
- // Create request
- var r *http.Request
- if r, err = http.NewRequestWithContext(ctx, src.Method, src.URL, src.Body); err != nil {
- err = fmt.Errorf("astikit: creating request to %s failed: %w", src.URL, err)
- return
- }
-
- // Copy header
- for k := range src.Header {
- r.Header.Set(k, src.Header.Get(k))
- }
-
- // Send request
- var resp *http.Response
- if resp, err = d.s.Send(r); err != nil {
- err = fmt.Errorf("astikit: sending request to %s failed: %w", src.URL, err)
- return
- }
- defer resp.Body.Close()
-
- // Create buffer pool item
- buf := d.bp.New()
-
- // Process response
- if err = d.responseFunc(resp); err != nil {
- err = fmt.Errorf("astikit: response for request to %s is invalid: %w", src.URL, err)
- return
- }
-
- // Copy body
- if _, err = Copy(ctx, buf, resp.Body); err != nil {
- err = fmt.Errorf("astikit: copying body of %s failed: %w", src.URL, err)
- return
- }
-
- // Custom
- if err = fn(ctx, idx, buf); err != nil {
- err = fmt.Errorf("astikit: custom callback on %s failed: %w", src.URL, err)
- return
- }
- return
-}
-
-func (d *HTTPDownloader) download(ctx context.Context, srcs []HTTPDownloaderSrc, fn httpDownloaderFunc) (err error) {
- // Nothing to download
- if len(srcs) == 0 {
- return nil
- }
-
- // Loop through srcs
- wg := &sync.WaitGroup{}
- wg.Add(len(srcs))
- for idx, src := range srcs {
- func(idx int, src HTTPDownloaderSrc) {
- // Update error with ctx
- if ctx.Err() != nil {
- err = ctx.Err()
- }
-
- // Do nothing if error
- if err != nil {
- wg.Done()
- return
- }
-
- // Do
- d.l.Do(func() {
- // Task is done
- defer wg.Done()
-
- // Do
- if errD := d.do(ctx, fn, idx, src); errD != nil && err == nil {
- err = errD
- return
- }
- })
- }(idx, src)
- }
-
- // Wait
- wg.Wait()
- return
-}
-
-// DownloadInDirectory downloads in parallel a set of srcs and saves them in a dst directory
-func (d *HTTPDownloader) DownloadInDirectory(ctx context.Context, dst string, srcs ...HTTPDownloaderSrc) error {
- return d.download(ctx, srcs, func(ctx context.Context, idx int, buf *BufferPoolItem) (err error) {
- // Make sure to close buffer
- defer buf.Close()
-
- // Make sure destination directory exists
- if err = os.MkdirAll(dst, DefaultDirMode); err != nil {
- err = fmt.Errorf("astikit: mkdirall %s failed: %w", dst, err)
- return
- }
-
- // Create destination file
- var f *os.File
- dst := filepath.Join(dst, filepath.Base(srcs[idx].URL))
- if f, err = os.Create(dst); err != nil {
- err = fmt.Errorf("astikit: creating %s failed: %w", dst, err)
- return
- }
- defer f.Close()
-
- // Copy buffer
- if _, err = Copy(ctx, f, buf); err != nil {
- err = fmt.Errorf("astikit: copying content to %s failed: %w", dst, err)
- return
- }
- return
- })
-}
-
-// DownloadInWriter downloads in parallel a set of srcs and concatenates them in a writer while
-// maintaining the initial order
-func (d *HTTPDownloader) DownloadInWriter(ctx context.Context, dst io.Writer, srcs ...HTTPDownloaderSrc) error {
- // Init
- type chunk struct {
- buf *BufferPoolItem
- idx int
- }
- var cs []chunk
- var m sync.Mutex // Locks cs
- var requiredIdx int
-
- // Make sure to close all buffers
- defer func() {
- for _, c := range cs {
- c.buf.Close()
- }
- }()
-
- // Download
- return d.download(ctx, srcs, func(ctx context.Context, idx int, buf *BufferPoolItem) (err error) {
- // Lock
- m.Lock()
- defer m.Unlock()
-
- // Check where to insert chunk
- var idxInsert = -1
- for idxChunk := 0; idxChunk < len(cs); idxChunk++ {
- if idx < cs[idxChunk].idx {
- idxInsert = idxChunk
- break
- }
- }
-
- // Create chunk
- c := chunk{
- buf: buf,
- idx: idx,
- }
-
- // Add chunk
- if idxInsert > -1 {
- cs = append(cs[:idxInsert], append([]chunk{c}, cs[idxInsert:]...)...)
- } else {
- cs = append(cs, c)
- }
-
- // Loop through chunks
- for idxChunk := 0; idxChunk < len(cs); idxChunk++ {
- // Get chunk
- c := cs[idxChunk]
-
- // The chunk should be copied
- if c.idx == requiredIdx {
- // Copy chunk content
- // Do not check error right away since we still want to close the buffer
- // and remove the chunk
- _, err = Copy(ctx, dst, c.buf)
-
- // Close buffer
- c.buf.Close()
-
- // Remove chunk
- requiredIdx++
- cs = append(cs[:idxChunk], cs[idxChunk+1:]...)
- idxChunk--
-
- // Check error
- if err != nil {
- err = fmt.Errorf("astikit: copying chunk #%d to dst failed: %w", c.idx, err)
- return
- }
- }
- }
- return
- })
-}
-
-// DownloadInFile downloads in parallel a set of srcs and concatenates them in a dst file while
-// maintaining the initial order
-func (d *HTTPDownloader) DownloadInFile(ctx context.Context, dst string, srcs ...HTTPDownloaderSrc) (err error) {
- // Make sure destination directory exists
- if err = os.MkdirAll(filepath.Dir(dst), DefaultDirMode); err != nil {
- err = fmt.Errorf("astikit: mkdirall %s failed: %w", filepath.Dir(dst), err)
- return
- }
-
- // Create destination file
- var f *os.File
- if f, err = os.Create(dst); err != nil {
- err = fmt.Errorf("astikit: creating %s failed: %w", dst, err)
- return
- }
- defer f.Close()
-
- // Download in writer
- return d.DownloadInWriter(ctx, f, srcs...)
-}
-
-// HTTPMiddleware represents an HTTP middleware
-type HTTPMiddleware func(http.Handler) http.Handler
-
-// ChainHTTPMiddlewares chains HTTP middlewares
-func ChainHTTPMiddlewares(h http.Handler, ms ...HTTPMiddleware) http.Handler {
- return ChainHTTPMiddlewaresWithPrefix(h, []string{}, ms...)
-}
-
-// ChainHTTPMiddlewaresWithPrefix chains HTTP middlewares if one of prefixes is present
-func ChainHTTPMiddlewaresWithPrefix(h http.Handler, prefixes []string, ms ...HTTPMiddleware) http.Handler {
- for _, m := range ms {
- if m == nil {
- continue
- }
- if len(prefixes) == 0 {
- h = m(h)
- } else {
- t := h
- h = http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- for _, prefix := range prefixes {
- if strings.HasPrefix(r.URL.EscapedPath(), prefix) {
- m(t).ServeHTTP(rw, r)
- return
- }
- }
- t.ServeHTTP(rw, r)
- })
- }
- }
- return h
-}
-
-func handleHTTPBasicAuth(username, password string, rw http.ResponseWriter, r *http.Request) bool {
- if u, p, ok := r.BasicAuth(); !ok || u != username || p != password {
- rw.Header().Set("WWW-Authenticate", "Basic Realm=Please enter your credentials")
- rw.WriteHeader(http.StatusUnauthorized)
- return true
- }
- return false
-}
-
-// HTTPMiddlewareBasicAuth adds basic HTTP auth to an HTTP handler
-func HTTPMiddlewareBasicAuth(username, password string) HTTPMiddleware {
- if username == "" && password == "" {
- return nil
- }
- return func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- // Handle basic auth
- if handleHTTPBasicAuth(username, password, rw, r) {
- return
- }
-
- // Next handler
- h.ServeHTTP(rw, r)
- })
- }
-}
-
-func setHTTPContentType(contentType string, rw http.ResponseWriter) {
- rw.Header().Set("Content-Type", contentType)
-}
-
-// HTTPMiddlewareContentType adds a content type to an HTTP handler
-func HTTPMiddlewareContentType(contentType string) HTTPMiddleware {
- return func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- // Set content type
- setHTTPContentType(contentType, rw)
-
- // Next handler
- h.ServeHTTP(rw, r)
- })
- }
-}
-
-func setHTTPHeaders(vs map[string]string, rw http.ResponseWriter) {
- for k, v := range vs {
- rw.Header().Set(k, v)
- }
-}
-
-// HTTPMiddlewareHeaders adds headers to an HTTP handler
-func HTTPMiddlewareHeaders(vs map[string]string) HTTPMiddleware {
- return func(h http.Handler) http.Handler {
- return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- // Set headers
- setHTTPHeaders(vs, rw)
-
- // Next handler
- h.ServeHTTP(rw, r)
- })
- }
-}
-
-// HTTPMiddlewareCORSHeaders adds CORS headers to an HTTP handler
-func HTTPMiddlewareCORSHeaders() HTTPMiddleware {
- return HTTPMiddlewareHeaders(map[string]string{
- "Access-Control-Allow-Headers": "*",
- "Access-Control-Allow-Methods": "*",
- "Access-Control-Allow-Origin": "*",
- })
-}
diff --git a/vendor/github.com/asticode/go-astikit/io.go b/vendor/github.com/asticode/go-astikit/io.go
deleted file mode 100644
index d9a2312c620..00000000000
--- a/vendor/github.com/asticode/go-astikit/io.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package astikit
-
-import (
- "bytes"
- "context"
- "io"
-)
-
-// Copy is a copy with a context
-func Copy(ctx context.Context, dst io.Writer, src io.Reader) (int64, error) {
- return io.Copy(dst, NewCtxReader(ctx, src))
-}
-
-type nopCloser struct {
- io.Writer
-}
-
-func (nopCloser) Close() error { return nil }
-
-// NopCloser returns a WriteCloser with a no-op Close method wrapping
-// the provided Writer w.
-func NopCloser(w io.Writer) io.WriteCloser {
- return nopCloser{w}
-}
-
-// CtxReader represents a reader with a context
-type CtxReader struct {
- ctx context.Context
- reader io.Reader
-}
-
-// NewCtxReader creates a reader with a context
-func NewCtxReader(ctx context.Context, r io.Reader) *CtxReader {
- return &CtxReader{
- ctx: ctx,
- reader: r,
- }
-}
-
-// Read implements the io.Reader interface
-func (r *CtxReader) Read(p []byte) (n int, err error) {
- // Check context
- if err = r.ctx.Err(); err != nil {
- return
- }
-
- // Read
- return r.reader.Read(p)
-}
-
-// WriterAdapter represents an object that can adapt a Writer
-type WriterAdapter struct {
- buffer *bytes.Buffer
- o WriterAdapterOptions
-}
-
-// WriterAdapterOptions represents WriterAdapter options
-type WriterAdapterOptions struct {
- Callback func(i []byte)
- Split []byte
-}
-
-// NewWriterAdapter creates a new WriterAdapter
-func NewWriterAdapter(o WriterAdapterOptions) *WriterAdapter {
- return &WriterAdapter{
- buffer: &bytes.Buffer{},
- o: o,
- }
-}
-
-// Close closes the adapter properly
-func (w *WriterAdapter) Close() error {
- if w.buffer.Len() > 0 {
- w.write(w.buffer.Bytes())
- }
- return nil
-}
-
-// Write implements the io.Writer interface
-func (w *WriterAdapter) Write(i []byte) (n int, err error) {
- // Update n to avoid broken pipe error
- defer func() {
- n = len(i)
- }()
-
- // Split
- if len(w.o.Split) > 0 {
- // Split bytes are not present, write in buffer
- if !bytes.Contains(i, w.o.Split) {
- w.buffer.Write(i)
- return
- }
-
- // Loop in split items
- items := bytes.Split(i, w.o.Split)
- for i := 0; i < len(items)-1; i++ {
- // If this is the first item, prepend the buffer
- if i == 0 {
- items[i] = append(w.buffer.Bytes(), items[i]...)
- w.buffer.Reset()
- }
-
- // Write
- w.write(items[i])
- }
-
- // Add remaining to buffer
- w.buffer.Write(items[len(items)-1])
- return
- }
-
- // By default, forward the bytes
- w.write(i)
- return
-}
-
-func (w *WriterAdapter) write(i []byte) {
- if w.o.Callback != nil {
- w.o.Callback(i)
- }
-}
diff --git a/vendor/github.com/asticode/go-astikit/limiter.go b/vendor/github.com/asticode/go-astikit/limiter.go
deleted file mode 100644
index 4eadfc01658..00000000000
--- a/vendor/github.com/asticode/go-astikit/limiter.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package astikit
-
-import (
- "context"
- "sync"
- "time"
-)
-
-// Limiter represents a limiter
-type Limiter struct {
- buckets map[string]*LimiterBucket
- m *sync.Mutex // Locks buckets
-}
-
-// NewLimiter creates a new limiter
-func NewLimiter() *Limiter {
- return &Limiter{
- buckets: make(map[string]*LimiterBucket),
- m: &sync.Mutex{},
- }
-}
-
-// Add adds a new bucket
-func (l *Limiter) Add(name string, cap int, period time.Duration) *LimiterBucket {
- l.m.Lock()
- defer l.m.Unlock()
- if _, ok := l.buckets[name]; !ok {
- l.buckets[name] = newLimiterBucket(cap, period)
- }
- return l.buckets[name]
-}
-
-// Bucket retrieves a bucket from the limiter
-func (l *Limiter) Bucket(name string) (b *LimiterBucket, ok bool) {
- l.m.Lock()
- defer l.m.Unlock()
- b, ok = l.buckets[name]
- return
-}
-
-// Close closes the limiter properly
-func (l *Limiter) Close() {
- l.m.Lock()
- defer l.m.Unlock()
- for _, b := range l.buckets {
- b.Close()
- }
-}
-
-// LimiterBucket represents a limiter bucket
-type LimiterBucket struct {
- cancel context.CancelFunc
- cap int
- ctx context.Context
- count int
- period time.Duration
- o *sync.Once
-}
-
-// newLimiterBucket creates a new bucket
-func newLimiterBucket(cap int, period time.Duration) (b *LimiterBucket) {
- b = &LimiterBucket{
- cap: cap,
- count: 0,
- period: period,
- o: &sync.Once{},
- }
- b.ctx, b.cancel = context.WithCancel(context.Background())
- go b.tick()
- return
-}
-
-// Inc increments the bucket count
-func (b *LimiterBucket) Inc() bool {
- if b.count >= b.cap {
- return false
- }
- b.count++
- return true
-}
-
-// tick runs a ticker to purge the bucket
-func (b *LimiterBucket) tick() {
- var t = time.NewTicker(b.period)
- defer t.Stop()
- for {
- select {
- case <-t.C:
- b.count = 0
- case <-b.ctx.Done():
- return
- }
- }
-}
-
-// close closes the bucket properly
-func (b *LimiterBucket) Close() {
- b.o.Do(func() {
- b.cancel()
- })
-}
diff --git a/vendor/github.com/asticode/go-astikit/logger.go b/vendor/github.com/asticode/go-astikit/logger.go
deleted file mode 100644
index b7623b992ec..00000000000
--- a/vendor/github.com/asticode/go-astikit/logger.go
+++ /dev/null
@@ -1,171 +0,0 @@
-package astikit
-
-import (
- "context"
-)
-
-// CompleteLogger represents a complete logger
-type CompleteLogger interface {
- StdLogger
- SeverityLogger
- SeverityCtxLogger
-}
-
-// StdLogger represents a standard logger
-type StdLogger interface {
- Fatal(v ...interface{})
- Fatalf(format string, v ...interface{})
- Print(v ...interface{})
- Printf(format string, v ...interface{})
-}
-
-// SeverityLogger represents a severity logger
-type SeverityLogger interface {
- Debug(v ...interface{})
- Debugf(format string, v ...interface{})
- Error(v ...interface{})
- Errorf(format string, v ...interface{})
- Info(v ...interface{})
- Infof(format string, v ...interface{})
- Warn(v ...interface{})
- Warnf(format string, v ...interface{})
-}
-
-// SeverityCtxLogger represents a severity with context logger
-type SeverityCtxLogger interface {
- DebugC(ctx context.Context, v ...interface{})
- DebugCf(ctx context.Context, format string, v ...interface{})
- ErrorC(ctx context.Context, v ...interface{})
- ErrorCf(ctx context.Context, format string, v ...interface{})
- FatalC(ctx context.Context, v ...interface{})
- FatalCf(ctx context.Context, format string, v ...interface{})
- InfoC(ctx context.Context, v ...interface{})
- InfoCf(ctx context.Context, format string, v ...interface{})
- WarnC(ctx context.Context, v ...interface{})
- WarnCf(ctx context.Context, format string, v ...interface{})
-}
-
-type completeLogger struct {
- print, debug, error, fatal, info, warn func(v ...interface{})
- printf, debugf, errorf, fatalf, infof, warnf func(format string, v ...interface{})
- debugC, errorC, fatalC, infoC, warnC func(ctx context.Context, v ...interface{})
- debugCf, errorCf, fatalCf, infoCf, warnCf func(ctx context.Context, format string, v ...interface{})
-}
-
-func newCompleteLogger() *completeLogger {
- return &completeLogger{
- debug: func(v ...interface{}) {},
- debugf: func(format string, v ...interface{}) {},
- debugC: func(ctx context.Context, v ...interface{}) {},
- debugCf: func(ctx context.Context, format string, v ...interface{}) {},
- error: func(v ...interface{}) {},
- errorf: func(format string, v ...interface{}) {},
- errorC: func(ctx context.Context, v ...interface{}) {},
- errorCf: func(ctx context.Context, format string, v ...interface{}) {},
- fatal: func(v ...interface{}) {},
- fatalf: func(format string, v ...interface{}) {},
- fatalC: func(ctx context.Context, v ...interface{}) {},
- fatalCf: func(ctx context.Context, format string, v ...interface{}) {},
- info: func(v ...interface{}) {},
- infof: func(format string, v ...interface{}) {},
- infoC: func(ctx context.Context, v ...interface{}) {},
- infoCf: func(ctx context.Context, format string, v ...interface{}) {},
- print: func(v ...interface{}) {},
- printf: func(format string, v ...interface{}) {},
- warn: func(v ...interface{}) {},
- warnf: func(format string, v ...interface{}) {},
- warnC: func(ctx context.Context, v ...interface{}) {},
- warnCf: func(ctx context.Context, format string, v ...interface{}) {},
- }
-}
-
-func (l *completeLogger) Debug(v ...interface{}) { l.debug(v...) }
-func (l *completeLogger) Debugf(format string, v ...interface{}) { l.debugf(format, v...) }
-func (l *completeLogger) DebugC(ctx context.Context, v ...interface{}) { l.debugC(ctx, v...) }
-func (l *completeLogger) DebugCf(ctx context.Context, format string, v ...interface{}) {
- l.debugCf(ctx, format, v...)
-}
-func (l *completeLogger) Error(v ...interface{}) { l.error(v...) }
-func (l *completeLogger) Errorf(format string, v ...interface{}) { l.errorf(format, v...) }
-func (l *completeLogger) ErrorC(ctx context.Context, v ...interface{}) { l.errorC(ctx, v...) }
-func (l *completeLogger) ErrorCf(ctx context.Context, format string, v ...interface{}) {
- l.errorCf(ctx, format, v...)
-}
-func (l *completeLogger) Fatal(v ...interface{}) { l.fatal(v...) }
-func (l *completeLogger) Fatalf(format string, v ...interface{}) { l.fatalf(format, v...) }
-func (l *completeLogger) FatalC(ctx context.Context, v ...interface{}) { l.fatalC(ctx, v...) }
-func (l *completeLogger) FatalCf(ctx context.Context, format string, v ...interface{}) {
- l.fatalCf(ctx, format, v...)
-}
-func (l *completeLogger) Info(v ...interface{}) { l.info(v...) }
-func (l *completeLogger) Infof(format string, v ...interface{}) { l.infof(format, v...) }
-func (l *completeLogger) InfoC(ctx context.Context, v ...interface{}) { l.infoC(ctx, v...) }
-func (l *completeLogger) InfoCf(ctx context.Context, format string, v ...interface{}) {
- l.infoCf(ctx, format, v...)
-}
-func (l *completeLogger) Print(v ...interface{}) { l.print(v...) }
-func (l *completeLogger) Printf(format string, v ...interface{}) { l.printf(format, v...) }
-func (l *completeLogger) Warn(v ...interface{}) { l.warn(v...) }
-func (l *completeLogger) Warnf(format string, v ...interface{}) { l.warnf(format, v...) }
-func (l *completeLogger) WarnC(ctx context.Context, v ...interface{}) { l.warnC(ctx, v...) }
-func (l *completeLogger) WarnCf(ctx context.Context, format string, v ...interface{}) {
- l.warnCf(ctx, format, v...)
-}
-
-// AdaptStdLogger transforms an StdLogger into a CompleteLogger if needed
-func AdaptStdLogger(i StdLogger) CompleteLogger {
- if v, ok := i.(CompleteLogger); ok {
- return v
- }
- l := newCompleteLogger()
- if i == nil {
- return l
- }
- l.fatal = i.Fatal
- l.fatalf = i.Fatalf
- l.print = i.Print
- l.printf = i.Printf
- if v, ok := i.(SeverityLogger); ok {
- l.debug = v.Debug
- l.debugf = v.Debugf
- l.error = v.Error
- l.errorf = v.Errorf
- l.info = v.Info
- l.infof = v.Infof
- l.warn = v.Warn
- l.warnf = v.Warnf
- } else {
- l.debug = l.print
- l.debugf = l.printf
- l.error = l.print
- l.errorf = l.printf
- l.info = l.print
- l.infof = l.printf
- l.warn = l.print
- l.warnf = l.printf
- }
- if v, ok := i.(SeverityCtxLogger); ok {
- l.debugC = v.DebugC
- l.debugCf = v.DebugCf
- l.errorC = v.ErrorC
- l.errorCf = v.ErrorCf
- l.fatalC = v.FatalC
- l.fatalCf = v.FatalCf
- l.infoC = v.InfoC
- l.infoCf = v.InfoCf
- l.warnC = v.WarnC
- l.warnCf = v.WarnCf
- } else {
- l.debugC = func(ctx context.Context, v ...interface{}) { l.debug(v...) }
- l.debugCf = func(ctx context.Context, format string, v ...interface{}) { l.debugf(format, v...) }
- l.errorC = func(ctx context.Context, v ...interface{}) { l.error(v...) }
- l.errorCf = func(ctx context.Context, format string, v ...interface{}) { l.errorf(format, v...) }
- l.fatalC = func(ctx context.Context, v ...interface{}) { l.fatal(v...) }
- l.fatalCf = func(ctx context.Context, format string, v ...interface{}) { l.fatalf(format, v...) }
- l.infoC = func(ctx context.Context, v ...interface{}) { l.info(v...) }
- l.infoCf = func(ctx context.Context, format string, v ...interface{}) { l.infof(format, v...) }
- l.warnC = func(ctx context.Context, v ...interface{}) { l.warn(v...) }
- l.warnCf = func(ctx context.Context, format string, v ...interface{}) { l.warnf(format, v...) }
- }
- return l
-}
diff --git a/vendor/github.com/asticode/go-astikit/map.go b/vendor/github.com/asticode/go-astikit/map.go
deleted file mode 100644
index 8ec17b20fb3..00000000000
--- a/vendor/github.com/asticode/go-astikit/map.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package astikit
-
-import (
- "fmt"
- "sync"
-)
-
-// BiMap represents a bidirectional map
-type BiMap struct {
- forward map[interface{}]interface{}
- inverse map[interface{}]interface{}
- m *sync.Mutex
-}
-
-// NewBiMap creates a new BiMap
-func NewBiMap() *BiMap {
- return &BiMap{
- forward: make(map[interface{}]interface{}),
- inverse: make(map[interface{}]interface{}),
- m: &sync.Mutex{},
- }
-}
-
-func (m *BiMap) get(k interface{}, i map[interface{}]interface{}) (v interface{}, ok bool) {
- m.m.Lock()
- defer m.m.Unlock()
- v, ok = i[k]
- return
-}
-
-// Get gets the value in the forward map based on the provided key
-func (m *BiMap) Get(k interface{}) (interface{}, bool) { return m.get(k, m.forward) }
-
-// GetInverse gets the value in the inverse map based on the provided key
-func (m *BiMap) GetInverse(k interface{}) (interface{}, bool) { return m.get(k, m.inverse) }
-
-// MustGet gets the value in the forward map based on the provided key and panics if key is not found
-func (m *BiMap) MustGet(k interface{}) interface{} {
- v, ok := m.get(k, m.forward)
- if !ok {
- panic(fmt.Sprintf("astikit: key %+v not found in foward map", k))
- }
- return v
-}
-
-// MustGetInverse gets the value in the inverse map based on the provided key and panics if key is not found
-func (m *BiMap) MustGetInverse(k interface{}) interface{} {
- v, ok := m.get(k, m.inverse)
- if !ok {
- panic(fmt.Sprintf("astikit: key %+v not found in inverse map", k))
- }
- return v
-}
-
-func (m *BiMap) set(k, v interface{}, f, i map[interface{}]interface{}) *BiMap {
- m.m.Lock()
- defer m.m.Unlock()
- f[k] = v
- i[v] = k
- return m
-}
-
-// Set sets the value in the forward and inverse map for the provided forward key
-func (m *BiMap) Set(k, v interface{}) *BiMap { return m.set(k, v, m.forward, m.inverse) }
-
-// SetInverse sets the value in the forward and inverse map for the provided inverse key
-func (m *BiMap) SetInverse(k, v interface{}) *BiMap { return m.set(k, v, m.inverse, m.forward) }
diff --git a/vendor/github.com/asticode/go-astikit/os.go b/vendor/github.com/asticode/go-astikit/os.go
deleted file mode 100644
index 3c9895c121a..00000000000
--- a/vendor/github.com/asticode/go-astikit/os.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package astikit
-
-import (
- "context"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-)
-
-// MoveFile is a cancellable move of a local file to a local or remote location
-func MoveFile(ctx context.Context, dst, src string, f CopyFileFunc) (err error) {
- // Copy
- if err = CopyFile(ctx, dst, src, f); err != nil {
- err = fmt.Errorf("astikit: copying file %s to %s failed: %w", src, dst, err)
- return
- }
-
- // Delete
- if err = os.Remove(src); err != nil {
- err = fmt.Errorf("astikit: removing %s failed: %w", src, err)
- return
- }
- return
-}
-
-// CopyFileFunc represents a CopyFile func
-type CopyFileFunc func(ctx context.Context, dst string, srcStat os.FileInfo, srcFile *os.File) error
-
-// CopyFile is a cancellable copy of a local file to a local or remote location
-func CopyFile(ctx context.Context, dst, src string, f CopyFileFunc) (err error) {
- // Check context
- if err = ctx.Err(); err != nil {
- return
- }
-
- // Stat src
- var srcStat os.FileInfo
- if srcStat, err = os.Stat(src); err != nil {
- err = fmt.Errorf("astikit: stating %s failed: %w", src, err)
- return
- }
-
- // Src is a dir
- if srcStat.IsDir() {
- // Walk through the dir
- if err = filepath.Walk(src, func(path string, info os.FileInfo, errWalk error) (err error) {
- // Check error
- if errWalk != nil {
- err = errWalk
- return
- }
-
- // Do not process root
- if src == path {
- return
- }
-
- // Copy
- p := filepath.Join(dst, strings.TrimPrefix(path, filepath.Clean(src)))
- if err = CopyFile(ctx, p, path, f); err != nil {
- err = fmt.Errorf("astikit: copying %s to %s failed: %w", path, p, err)
- return
- }
- return nil
- }); err != nil {
- err = fmt.Errorf("astikit: walking through %s failed: %w", src, err)
- return
- }
- return
- }
-
- // Open src
- var srcFile *os.File
- if srcFile, err = os.Open(src); err != nil {
- err = fmt.Errorf("astikit: opening %s failed: %w", src, err)
- return
- }
- defer srcFile.Close()
-
- // Custom
- if err = f(ctx, dst, srcStat, srcFile); err != nil {
- err = fmt.Errorf("astikit: custom failed: %w", err)
- return
- }
- return
-}
-
-// LocalCopyFileFunc is the local CopyFileFunc that allows doing cross partition copies
-func LocalCopyFileFunc(ctx context.Context, dst string, srcStat os.FileInfo, srcFile *os.File) (err error) {
- // Check context
- if err = ctx.Err(); err != nil {
- return
- }
-
- // Create the destination folder
- if err = os.MkdirAll(filepath.Dir(dst), DefaultDirMode); err != nil {
- err = fmt.Errorf("astikit: mkdirall %s failed: %w", filepath.Dir(dst), err)
- return
- }
-
- // Create the destination file
- var dstFile *os.File
- if dstFile, err = os.Create(dst); err != nil {
- err = fmt.Errorf("astikit: creating %s failed: %w", dst, err)
- return
- }
- defer dstFile.Close()
-
- // Chmod using os.chmod instead of file.Chmod
- if err = os.Chmod(dst, srcStat.Mode()); err != nil {
- err = fmt.Errorf("astikit: chmod %s %s failed, %w", dst, srcStat.Mode(), err)
- return
- }
-
- // Copy the content
- if _, err = Copy(ctx, dstFile, srcFile); err != nil {
- err = fmt.Errorf("astikit: copying content of %s to %s failed: %w", srcFile.Name(), dstFile.Name(), err)
- return
- }
- return
-}
-
-// SignalHandler represents a func that can handle a signal
-type SignalHandler func(s os.Signal)
-
-// TermSignalHandler returns a SignalHandler that is executed only on a term signal
-func TermSignalHandler(f func()) SignalHandler {
- return func(s os.Signal) {
- if isTermSignal(s) {
- f()
- }
- }
-}
-
-// LoggerSignalHandler returns a SignalHandler that logs the signal
-func LoggerSignalHandler(l SeverityLogger, ignoredSignals ...os.Signal) SignalHandler {
- ss := make(map[os.Signal]bool)
- for _, s := range ignoredSignals {
- ss[s] = true
- }
- return func(s os.Signal) {
- if _, ok := ss[s]; ok {
- return
- }
- l.Debugf("astikit: received signal %s", s)
- }
-}
diff --git a/vendor/github.com/asticode/go-astikit/os_js.go b/vendor/github.com/asticode/go-astikit/os_js.go
deleted file mode 100644
index 5403b2455b9..00000000000
--- a/vendor/github.com/asticode/go-astikit/os_js.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build js,wasm
-
-package astikit
-
-import (
- "os"
- "syscall"
-)
-
-func isTermSignal(s os.Signal) bool {
- return s == syscall.SIGKILL || s == syscall.SIGINT || s == syscall.SIGQUIT || s == syscall.SIGTERM
-}
diff --git a/vendor/github.com/asticode/go-astikit/os_others.go b/vendor/github.com/asticode/go-astikit/os_others.go
deleted file mode 100644
index 606e178f139..00000000000
--- a/vendor/github.com/asticode/go-astikit/os_others.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build !js !wasm
-
-package astikit
-
-import (
- "os"
- "syscall"
-)
-
-func isTermSignal(s os.Signal) bool {
- return s == syscall.SIGABRT || s == syscall.SIGKILL || s == syscall.SIGINT || s == syscall.SIGQUIT || s == syscall.SIGTERM
-}
diff --git a/vendor/github.com/asticode/go-astikit/pcm.go b/vendor/github.com/asticode/go-astikit/pcm.go
deleted file mode 100644
index 8d6303b7c4c..00000000000
--- a/vendor/github.com/asticode/go-astikit/pcm.go
+++ /dev/null
@@ -1,426 +0,0 @@
-package astikit
-
-import (
- "fmt"
- "math"
- "sync"
- "time"
-)
-
-// PCMLevel computes the PCM level of samples
-// https://dsp.stackexchange.com/questions/2951/loudness-of-pcm-stream
-// https://dsp.stackexchange.com/questions/290/getting-loudness-of-a-track-with-rms?noredirect=1&lq=1
-func PCMLevel(samples []int) float64 {
- // Compute sum of square values
- var sum float64
- for _, s := range samples {
- sum += math.Pow(float64(s), 2)
- }
-
- // Square root
- return math.Sqrt(sum / float64(len(samples)))
-}
-
-func maxPCMSample(bitDepth int) int {
- return int(math.Pow(2, float64(bitDepth))/2.0) - 1
-}
-
-// PCMNormalize normalizes the PCM samples
-func PCMNormalize(samples []int, bitDepth int) (o []int) {
- // Get max sample
- var m int
- for _, s := range samples {
- if v := int(math.Abs(float64(s))); v > m {
- m = v
- }
- }
-
- // Get max for bit depth
- max := maxPCMSample(bitDepth)
-
- // Loop through samples
- for _, s := range samples {
- o = append(o, s*max/m)
- }
- return
-}
-
-// ConvertPCMBitDepth converts the PCM bit depth
-func ConvertPCMBitDepth(srcSample int, srcBitDepth, dstBitDepth int) (dstSample int, err error) {
- // Nothing to do
- if srcBitDepth == dstBitDepth {
- dstSample = srcSample
- return
- }
-
- // Convert
- if srcBitDepth < dstBitDepth {
- dstSample = srcSample << uint(dstBitDepth-srcBitDepth)
- } else {
- dstSample = srcSample >> uint(srcBitDepth-dstBitDepth)
- }
- return
-}
-
-// PCMSampleFunc is a func that can process a sample
-type PCMSampleFunc func(s int) error
-
-// PCMSampleRateConverter is an object capable of converting a PCM's sample rate
-type PCMSampleRateConverter struct {
- b [][]int
- dstSampleRate int
- fn PCMSampleFunc
- numChannels int
- numChannelsProcessed int
- numSamplesOutputed int
- numSamplesProcessed int
- srcSampleRate int
-}
-
-// NewPCMSampleRateConverter creates a new PCMSampleRateConverter
-func NewPCMSampleRateConverter(srcSampleRate, dstSampleRate, numChannels int, fn PCMSampleFunc) *PCMSampleRateConverter {
- return &PCMSampleRateConverter{
- b: make([][]int, numChannels),
- dstSampleRate: dstSampleRate,
- fn: fn,
- numChannels: numChannels,
- srcSampleRate: srcSampleRate,
- }
-}
-
-// Reset resets the converter
-func (c *PCMSampleRateConverter) Reset() {
- c.b = make([][]int, c.numChannels)
- c.numChannelsProcessed = 0
- c.numSamplesOutputed = 0
- c.numSamplesProcessed = 0
-}
-
-// Add adds a new sample to the converter
-func (c *PCMSampleRateConverter) Add(i int) (err error) {
- // Forward sample
- if c.srcSampleRate == c.dstSampleRate {
- if err = c.fn(i); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- return
- }
-
- // Increment num channels processed
- c.numChannelsProcessed++
-
- // Reset num channels processed
- if c.numChannelsProcessed > c.numChannels {
- c.numChannelsProcessed = 1
- }
-
- // Only increment num samples processed if all channels have been processed
- if c.numChannelsProcessed == c.numChannels {
- c.numSamplesProcessed++
- }
-
- // Append sample to buffer
- c.b[c.numChannelsProcessed-1] = append(c.b[c.numChannelsProcessed-1], i)
-
- // Throw away data
- if c.srcSampleRate > c.dstSampleRate {
- // Make sure to always keep the first sample but do nothing until we have all channels or target sample has been
- // reached
- if (c.numSamplesOutputed > 0 && float64(c.numSamplesProcessed) < 1.0+float64(c.numSamplesOutputed)*float64(c.srcSampleRate)/float64(c.dstSampleRate)) || c.numChannelsProcessed < c.numChannels {
- return
- }
-
- // Loop through channels
- for idx, b := range c.b {
- // Merge samples
- var s int
- for _, v := range b {
- s += v
- }
- s /= len(b)
-
- // Reset buffer
- c.b[idx] = []int{}
-
- // Custom
- if err = c.fn(s); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- }
-
- // Increment num samples outputted
- c.numSamplesOutputed++
- return
- }
-
- // Do nothing until we have all channels
- if c.numChannelsProcessed < c.numChannels {
- return
- }
-
- // Repeat data
- for c.numSamplesOutputed == 0 || float64(c.numSamplesProcessed)+1.0 > 1.0+float64(c.numSamplesOutputed)*float64(c.srcSampleRate)/float64(c.dstSampleRate) {
- // Loop through channels
- for _, b := range c.b {
- // Invalid length
- if len(b) != 1 {
- err = fmt.Errorf("astikit: invalid buffer item length %d", len(b))
- return
- }
-
- // Custom
- if err = c.fn(b[0]); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- }
-
- // Increment num samples outputted
- c.numSamplesOutputed++
- }
-
- // Reset buffer
- c.b = make([][]int, c.numChannels)
- return
-}
-
-// PCMChannelsConverter is an object of converting PCM's channels
-type PCMChannelsConverter struct {
- dstNumChannels int
- fn PCMSampleFunc
- srcNumChannels int
- srcSamples int
-}
-
-// NewPCMChannelsConverter creates a new PCMChannelsConverter
-func NewPCMChannelsConverter(srcNumChannels, dstNumChannels int, fn PCMSampleFunc) *PCMChannelsConverter {
- return &PCMChannelsConverter{
- dstNumChannels: dstNumChannels,
- fn: fn,
- srcNumChannels: srcNumChannels,
- }
-}
-
-// Reset resets the converter
-func (c *PCMChannelsConverter) Reset() {
- c.srcSamples = 0
-}
-
-// Add adds a new sample to the converter
-func (c *PCMChannelsConverter) Add(i int) (err error) {
- // Forward sample
- if c.srcNumChannels == c.dstNumChannels {
- if err = c.fn(i); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- return
- }
-
- // Reset
- if c.srcSamples == c.srcNumChannels {
- c.srcSamples = 0
- }
-
- // Increment src samples
- c.srcSamples++
-
- // Throw away data
- if c.srcNumChannels > c.dstNumChannels {
- // Throw away sample
- if c.srcSamples > c.dstNumChannels {
- return
- }
-
- // Custom
- if err = c.fn(i); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- return
- }
-
- // Store
- var ss []int
- if c.srcSamples < c.srcNumChannels {
- ss = []int{i}
- } else {
- // Repeat data
- for idx := c.srcNumChannels; idx <= c.dstNumChannels; idx++ {
- ss = append(ss, i)
- }
- }
-
- // Loop through samples
- for _, s := range ss {
- // Custom
- if err = c.fn(s); err != nil {
- err = fmt.Errorf("astikit: handling sample failed: %w", err)
- return
- }
- }
- return
-}
-
-// PCMSilenceDetector represents a PCM silence detector
-type PCMSilenceDetector struct {
- analyses []pcmSilenceDetectorAnalysis
- buf []int
- m *sync.Mutex // Locks buf
- minAnalysesPerSilence int
- o PCMSilenceDetectorOptions
- samplesPerAnalysis int
-}
-
-type pcmSilenceDetectorAnalysis struct {
- level float64
- samples []int
-}
-
-// PCMSilenceDetectorOptions represents a PCM silence detector options
-type PCMSilenceDetectorOptions struct {
- MaxSilenceLevel float64 `toml:"max_silence_level"`
- MinSilenceDuration time.Duration `toml:"min_silence_duration"`
- SampleRate int `toml:"sample_rate"`
- StepDuration time.Duration `toml:"step_duration"`
-}
-
-// NewPCMSilenceDetector creates a new silence detector
-func NewPCMSilenceDetector(o PCMSilenceDetectorOptions) (d *PCMSilenceDetector) {
- // Create
- d = &PCMSilenceDetector{
- m: &sync.Mutex{},
- o: o,
- }
-
- // Reset
- d.Reset()
-
- // Default option values
- if d.o.MinSilenceDuration == 0 {
- d.o.MinSilenceDuration = time.Second
- }
- if d.o.StepDuration == 0 {
- d.o.StepDuration = 30 * time.Millisecond
- }
-
- // Compute attributes depending on options
- d.samplesPerAnalysis = int(math.Floor(float64(d.o.SampleRate) * d.o.StepDuration.Seconds()))
- d.minAnalysesPerSilence = int(math.Floor(d.o.MinSilenceDuration.Seconds() / d.o.StepDuration.Seconds()))
- return
-}
-
-// Reset resets the silence detector
-func (d *PCMSilenceDetector) Reset() {
- // Lock
- d.m.Lock()
- defer d.m.Unlock()
-
- // Reset
- d.analyses = []pcmSilenceDetectorAnalysis{}
- d.buf = []int{}
-}
-
-// Add adds samples to the buffer and checks whether there are valid samples between silences
-func (d *PCMSilenceDetector) Add(samples []int) (validSamples [][]int) {
- // Lock
- d.m.Lock()
- defer d.m.Unlock()
-
- // Append samples to buffer
- d.buf = append(d.buf, samples...)
-
- // Analyze samples by step
- for len(d.buf) >= d.samplesPerAnalysis {
- // Append analysis
- d.analyses = append(d.analyses, pcmSilenceDetectorAnalysis{
- level: PCMLevel(d.buf[:d.samplesPerAnalysis]),
- samples: append([]int(nil), d.buf[:d.samplesPerAnalysis]...),
- })
-
- // Remove samples from buffer
- d.buf = d.buf[d.samplesPerAnalysis:]
- }
-
- // Loop through analyses
- var leadingSilence, inBetween, trailingSilence int
- for i := 0; i < len(d.analyses); i++ {
- if d.analyses[i].level < d.o.MaxSilenceLevel {
- // This is a silence
-
- // This is a leading silence
- if inBetween == 0 {
- leadingSilence++
-
- // The leading silence is valid
- // We can trim its useless part
- if leadingSilence > d.minAnalysesPerSilence {
- d.analyses = d.analyses[leadingSilence-d.minAnalysesPerSilence:]
- i -= leadingSilence - d.minAnalysesPerSilence
- leadingSilence = d.minAnalysesPerSilence
- }
- continue
- }
-
- // This is a trailing silence
- trailingSilence++
-
- // Trailing silence is invalid
- if trailingSilence < d.minAnalysesPerSilence {
- continue
- }
-
- // Trailing silence is valid
- // Loop through analyses
- var ss []int
- for _, a := range d.analyses[:i+1] {
- ss = append(ss, a.samples...)
- }
-
- // Append valid samples
- validSamples = append(validSamples, ss)
-
- // Remove leading silence and non silence
- d.analyses = d.analyses[leadingSilence+inBetween:]
- i -= leadingSilence + inBetween
-
- // Reset counts
- leadingSilence, inBetween, trailingSilence = trailingSilence, 0, 0
- } else {
- // This is not a silence
-
- // This is a leading non silence
- // We need to remove it
- if i == 0 {
- d.analyses = d.analyses[1:]
- i = -1
- continue
- }
-
- // This is the first in-between
- if inBetween == 0 {
- // The leading silence is invalid
- // We need to remove it as well as this first non silence
- if leadingSilence < d.minAnalysesPerSilence {
- d.analyses = d.analyses[i+1:]
- i = -1
- continue
- }
- }
-
- // This non-silence was preceded by a silence not big enough to be a valid trailing silence
- // We incorporate it in the in-between
- if trailingSilence > 0 {
- inBetween += trailingSilence
- trailingSilence = 0
- }
-
- // This is an in-between
- inBetween++
- continue
- }
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/ptr.go b/vendor/github.com/asticode/go-astikit/ptr.go
deleted file mode 100644
index fb3e7f5aea2..00000000000
--- a/vendor/github.com/asticode/go-astikit/ptr.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package astikit
-
-import "time"
-
-// BoolPtr transforms a bool into a *bool
-func BoolPtr(i bool) *bool {
- return &i
-}
-
-// BytePtr transforms a byte into a *byte
-func BytePtr(i byte) *byte {
- return &i
-}
-
-// DurationPtr transforms a time.Duration into a *time.Duration
-func DurationPtr(i time.Duration) *time.Duration {
- return &i
-}
-
-// Float64Ptr transforms a float64 into a *float64
-func Float64Ptr(i float64) *float64 {
- return &i
-}
-
-// IntPtr transforms an int into an *int
-func IntPtr(i int) *int {
- return &i
-}
-
-// Int64Ptr transforms an int64 into an *int64
-func Int64Ptr(i int64) *int64 {
- return &i
-}
-
-// StrSlicePtr transforms a []string into a *[]string
-func StrSlicePtr(i []string) *[]string {
- return &i
-}
-
-// StrPtr transforms a string into a *string
-func StrPtr(i string) *string {
- return &i
-}
-
-// TimePtr transforms a time.Time into a *time.Time
-func TimePtr(i time.Time) *time.Time {
- return &i
-}
-
-// UInt8Ptr transforms a uint8 into a *uint8
-func UInt8Ptr(i uint8) *uint8 {
- return &i
-}
-
-// UInt32Ptr transforms a uint32 into a *uint32
-func UInt32Ptr(i uint32) *uint32 {
- return &i
-}
diff --git a/vendor/github.com/asticode/go-astikit/rand.go b/vendor/github.com/asticode/go-astikit/rand.go
deleted file mode 100644
index c10e6db386d..00000000000
--- a/vendor/github.com/asticode/go-astikit/rand.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package astikit
-
-import (
- "math/rand"
- "strings"
- "time"
-)
-
-const (
- randLetterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
- randLetterIdxBits = 6 // 6 bits to represent a letter index
- randLetterIdxMask = 1<= 0; {
- if remain == 0 {
- cache, remain = randSrc.Int63(), randLetterIdxMax
- }
- if idx := int(cache & randLetterIdxMask); idx < len(randLetterBytes) {
- sb.WriteByte(randLetterBytes[idx])
- i--
- }
- cache >>= randLetterIdxBits
- remain--
- }
- return sb.String()
-}
diff --git a/vendor/github.com/asticode/go-astikit/sort.go b/vendor/github.com/asticode/go-astikit/sort.go
deleted file mode 100644
index 45539c6f567..00000000000
--- a/vendor/github.com/asticode/go-astikit/sort.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package astikit
-
-import "sort"
-
-// SortInt64 sorts a slice of int64s in increasing order.
-func SortInt64(a []int64) { sort.Sort(SortInt64Slice(a)) }
-
-// SortInt64Slice attaches the methods of Interface to []int64, sorting in increasing order.
-type SortInt64Slice []int64
-
-func (p SortInt64Slice) Len() int { return len(p) }
-func (p SortInt64Slice) Less(i, j int) bool { return p[i] < p[j] }
-func (p SortInt64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
diff --git a/vendor/github.com/asticode/go-astikit/ssh.go b/vendor/github.com/asticode/go-astikit/ssh.go
deleted file mode 100644
index 5754895f030..00000000000
--- a/vendor/github.com/asticode/go-astikit/ssh.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package astikit
-
-import (
- "context"
- "fmt"
- "io"
- "os"
- "path/filepath"
-)
-
-// SSHSession represents an SSH Session
-type SSHSession interface {
- Run(string) error
- Start(string) error
- StdinPipe() (io.WriteCloser, error)
- Wait() error
-}
-
-// SSHSessionFunc represents a func that can return an SSHSession
-type SSHSessionFunc func() (s SSHSession, c *Closer, err error)
-
-// SSHCopyFileFunc is the SSH CopyFileFunc that allows doing SSH copies
-func SSHCopyFileFunc(fn SSHSessionFunc) CopyFileFunc {
- return func(ctx context.Context, dst string, srcStat os.FileInfo, srcFile *os.File) (err error) {
- // Check context
- if err = ctx.Err(); err != nil {
- return
- }
-
- // Using local closure allows better readibility for the defer c.Close() since it
- // isolates the use of the ssh session
- if err = func() (err error) {
- // Create ssh session
- var s SSHSession
- var c *Closer
- if s, c, err = fn(); err != nil {
- err = fmt.Errorf("astikit: creating ssh session failed: %w", err)
- return
- }
- defer c.Close()
-
- // Create the destination folder
- if err = s.Run("mkdir -p " + filepath.Dir(dst)); err != nil {
- err = fmt.Errorf("astikit: creating %s failed: %w", filepath.Dir(dst), err)
- return
- }
- return
- }(); err != nil {
- return
- }
-
- // Using local closure allows better readibility for the defer c.Close() since it
- // isolates the use of the ssh session
- if err = func() (err error) {
- // Create ssh session
- var s SSHSession
- var c *Closer
- if s, c, err = fn(); err != nil {
- err = fmt.Errorf("astikit: creating ssh session failed: %w", err)
- return
- }
- defer c.Close()
-
- // Create stdin pipe
- var stdin io.WriteCloser
- if stdin, err = s.StdinPipe(); err != nil {
- err = fmt.Errorf("astikit: creating stdin pipe failed: %w", err)
- return
- }
- defer stdin.Close()
-
- // Use "scp" command
- if err = s.Start("scp -qt \"" + filepath.Dir(dst) + "\""); err != nil {
- err = fmt.Errorf("astikit: scp to %s failed: %w", dst, err)
- return
- }
-
- // Send metadata
- if _, err = fmt.Fprintln(stdin, fmt.Sprintf("C%04o", srcStat.Mode().Perm()), srcStat.Size(), filepath.Base(dst)); err != nil {
- err = fmt.Errorf("astikit: sending metadata failed: %w", err)
- return
- }
-
- // Copy
- if _, err = Copy(ctx, stdin, srcFile); err != nil {
- err = fmt.Errorf("astikit: copying failed: %w", err)
- return
- }
-
- // Send close
- if _, err = fmt.Fprint(stdin, "\x00"); err != nil {
- err = fmt.Errorf("astikit: sending close failed: %w", err)
- return
- }
-
- // Close stdin
- if err = stdin.Close(); err != nil {
- err = fmt.Errorf("astikit: closing failed: %w", err)
- return
- }
-
- // Wait
- if err = s.Wait(); err != nil {
- err = fmt.Errorf("astikit: waiting failed: %w", err)
- return
- }
- return
- }(); err != nil {
- return
- }
- return
- }
-}
diff --git a/vendor/github.com/asticode/go-astikit/stat.go b/vendor/github.com/asticode/go-astikit/stat.go
deleted file mode 100644
index 6f66aed2abc..00000000000
--- a/vendor/github.com/asticode/go-astikit/stat.go
+++ /dev/null
@@ -1,301 +0,0 @@
-package astikit
-
-import (
- "context"
- "sync"
- "sync/atomic"
- "time"
-)
-
-// Stater is an object that can compute and handle stats
-type Stater struct {
- cancel context.CancelFunc
- ctx context.Context
- h StatsHandleFunc
- m *sync.Mutex // Locks ss
- period time.Duration
- running uint32
- ss map[*StatMetadata]StatOptions
-}
-
-// StatOptions represents stat options
-type StatOptions struct {
- Handler StatHandler
- Metadata *StatMetadata
-}
-
-// StatsHandleFunc is a method that can handle stat values
-type StatsHandleFunc func(stats []StatValue)
-
-// StatMetadata represents a stat metadata
-type StatMetadata struct {
- Description string
- Label string
- Name string
- Unit string
-}
-
-// StatHandler represents a stat handler
-type StatHandler interface {
- Start()
- Stop()
- Value(delta time.Duration) interface{}
-}
-
-// StatValue represents a stat value
-type StatValue struct {
- *StatMetadata
- Value interface{}
-}
-
-// StaterOptions represents stater options
-type StaterOptions struct {
- HandleFunc StatsHandleFunc
- Period time.Duration
-}
-
-// NewStater creates a new stater
-func NewStater(o StaterOptions) *Stater {
- return &Stater{
- h: o.HandleFunc,
- m: &sync.Mutex{},
- period: o.Period,
- ss: make(map[*StatMetadata]StatOptions),
- }
-}
-
-// Start starts the stater
-func (s *Stater) Start(ctx context.Context) {
- // Check context
- if ctx.Err() != nil {
- return
- }
-
- // Make sure to start only once
- if atomic.CompareAndSwapUint32(&s.running, 0, 1) {
- // Update status
- defer atomic.StoreUint32(&s.running, 0)
-
- // Reset context
- s.ctx, s.cancel = context.WithCancel(ctx)
-
- // Create ticker
- t := time.NewTicker(s.period)
- defer t.Stop()
-
- // Loop
- lastStatAt := now()
- for {
- select {
- case <-t.C:
- // Get delta
- n := now()
- delta := n.Sub(lastStatAt)
- lastStatAt = n
-
- // Loop through stats
- var stats []StatValue
- s.m.Lock()
- for _, v := range s.ss {
- stats = append(stats, StatValue{
- StatMetadata: v.Metadata,
- Value: v.Handler.Value(delta),
- })
- }
- s.m.Unlock()
-
- // Handle stats
- go s.h(stats)
- case <-s.ctx.Done():
- return
- }
- }
- }
-}
-
-// Stop stops the stater
-func (s *Stater) Stop() {
- if s.cancel != nil {
- s.cancel()
- }
-}
-
-// AddStats adds stats
-func (s *Stater) AddStats(os ...StatOptions) {
- s.m.Lock()
- defer s.m.Unlock()
- for _, o := range os {
- s.ss[o.Metadata] = o
- }
-}
-
-// DelStats deletes stats
-func (s *Stater) DelStats(os ...StatOptions) {
- s.m.Lock()
- defer s.m.Unlock()
- for _, o := range os {
- delete(s.ss, o.Metadata)
- }
-}
-
-type durationStat struct {
- d time.Duration
- fn func(d, delta time.Duration) interface{}
- isStarted bool
- m *sync.Mutex // Locks isStarted
- startedAt time.Time
-}
-
-func newDurationStat(fn func(d, delta time.Duration) interface{}) *durationStat {
- return &durationStat{
- fn: fn,
- m: &sync.Mutex{},
- }
-}
-
-func (s *durationStat) Begin() {
- s.m.Lock()
- defer s.m.Unlock()
- if !s.isStarted {
- return
- }
- s.startedAt = now()
-}
-
-func (s *durationStat) End() {
- s.m.Lock()
- defer s.m.Unlock()
- if !s.isStarted {
- return
- }
- s.d += now().Sub(s.startedAt)
- s.startedAt = time.Time{}
-}
-
-func (s *durationStat) Value(delta time.Duration) (o interface{}) {
- // Lock
- s.m.Lock()
- defer s.m.Unlock()
-
- // Get current values
- n := now()
- d := s.d
-
- // Recording is still in process
- if !s.startedAt.IsZero() {
- d += n.Sub(s.startedAt)
- s.startedAt = n
- }
-
- // Compute stat
- o = s.fn(d, delta)
- s.d = 0
- return
-}
-
-func (s *durationStat) Start() {
- s.m.Lock()
- defer s.m.Unlock()
- s.d = 0
- s.isStarted = true
-}
-
-func (s *durationStat) Stop() {
- s.m.Lock()
- defer s.m.Unlock()
- s.isStarted = false
-}
-
-// DurationPercentageStat is an object capable of computing the percentage of time some work is taking per second
-type DurationPercentageStat struct {
- *durationStat
-}
-
-// NewDurationPercentageStat creates a new duration percentage stat
-func NewDurationPercentageStat() *DurationPercentageStat {
- return &DurationPercentageStat{durationStat: newDurationStat(func(d, delta time.Duration) interface{} {
- if delta == 0 {
- return 0
- }
- return float64(d) / float64(delta) * 100
- })}
-}
-
-type counterStat struct {
- c float64
- fn func(c, t float64, delta time.Duration) interface{}
- isStarted bool
- m *sync.Mutex // Locks isStarted
- t float64
-}
-
-func newCounterStat(fn func(c, t float64, delta time.Duration) interface{}) *counterStat {
- return &counterStat{
- fn: fn,
- m: &sync.Mutex{},
- }
-}
-
-func (s *counterStat) Add(delta float64) {
- s.m.Lock()
- defer s.m.Unlock()
- if !s.isStarted {
- return
- }
- s.c += delta
- s.t++
-}
-
-func (s *counterStat) Start() {
- s.m.Lock()
- defer s.m.Unlock()
- s.c = 0
- s.isStarted = true
- s.t = 0
-}
-
-func (s *counterStat) Stop() {
- s.m.Lock()
- defer s.m.Unlock()
- s.isStarted = true
-}
-
-func (s *counterStat) Value(delta time.Duration) interface{} {
- s.m.Lock()
- defer s.m.Unlock()
- c := s.c
- t := s.t
- s.c = 0
- s.t = 0
- return s.fn(c, t, delta)
-}
-
-// CounterAvgStat is an object capable of computing the average value of a counter
-type CounterAvgStat struct {
- *counterStat
-}
-
-// NewCounterAvgStat creates a new counter avg stat
-func NewCounterAvgStat() *CounterAvgStat {
- return &CounterAvgStat{counterStat: newCounterStat(func(c, t float64, delta time.Duration) interface{} {
- if t == 0 {
- return 0
- }
- return c / t
- })}
-}
-
-// CounterRateStat is an object capable of computing the average value of a counter per second
-type CounterRateStat struct {
- *counterStat
-}
-
-// NewCounterRateStat creates a new counter rate stat
-func NewCounterRateStat() *CounterRateStat {
- return &CounterRateStat{counterStat: newCounterStat(func(c, t float64, delta time.Duration) interface{} {
- if delta.Seconds() == 0 {
- return 0
- }
- return c / delta.Seconds()
- })}
-}
diff --git a/vendor/github.com/asticode/go-astikit/sync.go b/vendor/github.com/asticode/go-astikit/sync.go
deleted file mode 100644
index afa2158bd93..00000000000
--- a/vendor/github.com/asticode/go-astikit/sync.go
+++ /dev/null
@@ -1,489 +0,0 @@
-package astikit
-
-import (
- "bytes"
- "context"
- "errors"
- "fmt"
- "runtime"
- "sync"
- "sync/atomic"
- "time"
-)
-
-// Stat names
-const (
- StatNameWorkRatio = "astikit.work.ratio"
-)
-
-// Chan constants
-const (
- // Calling Add() only blocks if the chan has been started and the ctx
- // has not been canceled
- ChanAddStrategyBlockWhenStarted = "block.when.started"
- // Calling Add() never blocks
- ChanAddStrategyNoBlock = "no.block"
- ChanOrderFIFO = "fifo"
- ChanOrderFILO = "filo"
-)
-
-// Chan is an object capable of executing funcs in a specific order while controlling the conditions
-// in which adding new funcs is blocking
-// Check out ChanOptions for detailed options
-type Chan struct {
- cancel context.CancelFunc
- c *sync.Cond
- ctx context.Context
- fs []func()
- mc *sync.Mutex // Locks ctx
- mf *sync.Mutex // Locks fs
- o ChanOptions
- running uint32
- statWorkRatio *DurationPercentageStat
-}
-
-// ChanOptions are Chan options
-type ChanOptions struct {
- // Determines the conditions in which Add() blocks. See constants with pattern ChanAddStrategy*
- // Default is ChanAddStrategyNoBlock
- AddStrategy string
- // Order in which the funcs will be processed. See constants with pattern ChanOrder*
- // Default is ChanOrderFIFO
- Order string
- // By default the funcs not yet processed when the context is cancelled are dropped.
- // If "ProcessAll" is true, ALL funcs are processed even after the context is cancelled.
- // However, no funcs can be added after the context is cancelled
- ProcessAll bool
-}
-
-// NewChan creates a new Chan
-func NewChan(o ChanOptions) *Chan {
- return &Chan{
- c: sync.NewCond(&sync.Mutex{}),
- mc: &sync.Mutex{},
- mf: &sync.Mutex{},
- o: o,
- }
-}
-
-// Start starts the chan by looping through functions in the buffer and
-// executing them if any, or waiting for a new one otherwise
-func (c *Chan) Start(ctx context.Context) {
- // Make sure to start only once
- if atomic.CompareAndSwapUint32(&c.running, 0, 1) {
- // Update status
- defer atomic.StoreUint32(&c.running, 0)
-
- // Create context
- c.mc.Lock()
- c.ctx, c.cancel = context.WithCancel(ctx)
- d := c.ctx.Done()
- c.mc.Unlock()
-
- // Handle context
- go func() {
- // Wait for context to be done
- <-d
-
- // Signal
- c.c.L.Lock()
- c.c.Signal()
- c.c.L.Unlock()
- }()
-
- // Loop
- for {
- // Lock cond here in case a func is added between retrieving l and doing the if on it
- c.c.L.Lock()
-
- // Get number of funcs in buffer
- c.mf.Lock()
- l := len(c.fs)
- c.mf.Unlock()
-
- // Only return if context has been cancelled and:
- // - the user wants to drop funcs that has not yet been processed
- // - the buffer is empty otherwise
- c.mc.Lock()
- if c.ctx.Err() != nil && (!c.o.ProcessAll || l == 0) {
- c.mc.Unlock()
- c.c.L.Unlock()
- return
- }
- c.mc.Unlock()
-
- // No funcs in buffer
- if l == 0 {
- c.c.Wait()
- c.c.L.Unlock()
- continue
- }
- c.c.L.Unlock()
-
- // Get first func
- c.mf.Lock()
- fn := c.fs[0]
- c.mf.Unlock()
-
- // Execute func
- if c.statWorkRatio != nil {
- c.statWorkRatio.Begin()
- }
- fn()
- if c.statWorkRatio != nil {
- c.statWorkRatio.End()
- }
-
- // Remove first func
- c.mf.Lock()
- c.fs = c.fs[1:]
- c.mf.Unlock()
- }
- }
-}
-
-// Stop stops the chan
-func (c *Chan) Stop() {
- c.mc.Lock()
- if c.cancel != nil {
- c.cancel()
- }
- c.mc.Unlock()
-}
-
-// Add adds a new item to the chan
-func (c *Chan) Add(i func()) {
- // Check context
- c.mc.Lock()
- if c.ctx != nil && c.ctx.Err() != nil {
- c.mc.Unlock()
- return
- }
- c.mc.Unlock()
-
- // Wrap the function
- var fn func()
- var wg *sync.WaitGroup
- if c.o.AddStrategy == ChanAddStrategyBlockWhenStarted {
- wg = &sync.WaitGroup{}
- wg.Add(1)
- fn = func() {
- defer wg.Done()
- i()
- }
- } else {
- fn = i
- }
-
- // Add func to buffer
- c.mf.Lock()
- if c.o.Order == ChanOrderFILO {
- c.fs = append([]func(){fn}, c.fs...)
- } else {
- c.fs = append(c.fs, fn)
- }
- c.mf.Unlock()
-
- // Signal
- c.c.L.Lock()
- c.c.Signal()
- c.c.L.Unlock()
-
- // Wait
- if wg != nil {
- wg.Wait()
- }
-}
-
-// Reset resets the chan
-func (c *Chan) Reset() {
- c.mf.Lock()
- defer c.mf.Unlock()
- c.fs = []func(){}
-}
-
-// Stats returns the chan stats
-func (c *Chan) Stats() []StatOptions {
- if c.statWorkRatio == nil {
- c.statWorkRatio = NewDurationPercentageStat()
- }
- return []StatOptions{
- {
- Handler: c.statWorkRatio,
- Metadata: &StatMetadata{
- Description: "Percentage of time doing work",
- Label: "Work ratio",
- Name: StatNameWorkRatio,
- Unit: "%",
- },
- },
- }
-}
-
-// BufferPool represents a *bytes.Buffer pool
-type BufferPool struct {
- bp *sync.Pool
-}
-
-// NewBufferPool creates a new BufferPool
-func NewBufferPool() *BufferPool {
- return &BufferPool{bp: &sync.Pool{New: func() interface{} { return &bytes.Buffer{} }}}
-}
-
-// New creates a new BufferPoolItem
-func (p *BufferPool) New() *BufferPoolItem {
- return newBufferPoolItem(p.bp.Get().(*bytes.Buffer), p.bp)
-}
-
-// BufferPoolItem represents a BufferPool item
-type BufferPoolItem struct {
- *bytes.Buffer
- bp *sync.Pool
-}
-
-func newBufferPoolItem(b *bytes.Buffer, bp *sync.Pool) *BufferPoolItem {
- return &BufferPoolItem{
- Buffer: b,
- bp: bp,
- }
-}
-
-// Close implements the io.Closer interface
-func (i *BufferPoolItem) Close() error {
- i.Reset()
- i.bp.Put(i.Buffer)
- return nil
-}
-
-// GoroutineLimiter is an object capable of doing several things in parallel while maintaining the
-// max number of things running in parallel under a threshold
-type GoroutineLimiter struct {
- busy int
- c *sync.Cond
- ctx context.Context
- cancel context.CancelFunc
- o GoroutineLimiterOptions
-}
-
-// GoroutineLimiterOptions represents GoroutineLimiter options
-type GoroutineLimiterOptions struct {
- Max int
-}
-
-// NewGoroutineLimiter creates a new GoroutineLimiter
-func NewGoroutineLimiter(o GoroutineLimiterOptions) (l *GoroutineLimiter) {
- l = &GoroutineLimiter{
- c: sync.NewCond(&sync.Mutex{}),
- o: o,
- }
- if l.o.Max <= 0 {
- l.o.Max = 1
- }
- l.ctx, l.cancel = context.WithCancel(context.Background())
- go l.handleCtx()
- return
-}
-
-// Close closes the limiter properly
-func (l *GoroutineLimiter) Close() error {
- l.cancel()
- return nil
-}
-
-func (l *GoroutineLimiter) handleCtx() {
- <-l.ctx.Done()
- l.c.L.Lock()
- l.c.Broadcast()
- l.c.L.Unlock()
-}
-
-// GoroutineLimiterFunc is a GoroutineLimiter func
-type GoroutineLimiterFunc func()
-
-// Do executes custom work in a goroutine
-func (l *GoroutineLimiter) Do(fn GoroutineLimiterFunc) (err error) {
- // Check context in case the limiter has already been closed
- if err = l.ctx.Err(); err != nil {
- return
- }
-
- // Lock
- l.c.L.Lock()
-
- // Wait for a goroutine to be available
- for l.busy >= l.o.Max {
- l.c.Wait()
- }
-
- // Check context in case the limiter has been closed while waiting
- if err = l.ctx.Err(); err != nil {
- return
- }
-
- // Increment
- l.busy++
-
- // Unlock
- l.c.L.Unlock()
-
- // Execute in a goroutine
- go func() {
- // Decrement
- defer func() {
- l.c.L.Lock()
- l.busy--
- l.c.Signal()
- l.c.L.Unlock()
- }()
-
- // Execute
- fn()
- }()
- return
-}
-
-// Eventer represents an object that can dispatch simple events (name + payload)
-type Eventer struct {
- c *Chan
- hs map[string][]EventerHandler
- mh *sync.Mutex
-}
-
-// EventerOptions represents Eventer options
-type EventerOptions struct {
- Chan ChanOptions
-}
-
-// EventerHandler represents a function that can handle the payload of an event
-type EventerHandler func(payload interface{})
-
-// NewEventer creates a new eventer
-func NewEventer(o EventerOptions) *Eventer {
- return &Eventer{
- c: NewChan(o.Chan),
- hs: make(map[string][]EventerHandler),
- mh: &sync.Mutex{},
- }
-}
-
-// On adds an handler for a specific name
-func (e *Eventer) On(name string, h EventerHandler) {
- // Lock
- e.mh.Lock()
- defer e.mh.Unlock()
-
- // Add handler
- e.hs[name] = append(e.hs[name], h)
-}
-
-// Dispatch dispatches a payload for a specific name
-func (e *Eventer) Dispatch(name string, payload interface{}) {
- // Lock
- e.mh.Lock()
- defer e.mh.Unlock()
-
- // No handlers
- hs, ok := e.hs[name]
- if !ok {
- return
- }
-
- // Loop through handlers
- for _, h := range hs {
- func(h EventerHandler) {
- // Add to chan
- e.c.Add(func() {
- h(payload)
- })
- }(h)
- }
-}
-
-// Start starts the eventer. It is blocking
-func (e *Eventer) Start(ctx context.Context) {
- e.c.Start(ctx)
-}
-
-// Stop stops the eventer
-func (e *Eventer) Stop() {
- e.c.Stop()
-}
-
-// Reset resets the eventer
-func (e *Eventer) Reset() {
- e.c.Reset()
-}
-
-// RWMutex represents a RWMutex capable of logging its actions to ease deadlock debugging
-type RWMutex struct {
- c string // Last successful caller
- l SeverityLogger
- m *sync.RWMutex
- n string // Name
-}
-
-// RWMutexOptions represents RWMutex options
-type RWMutexOptions struct {
- Logger StdLogger
- Name string
-}
-
-// NewRWMutex creates a new RWMutex
-func NewRWMutex(o RWMutexOptions) *RWMutex {
- return &RWMutex{
- l: AdaptStdLogger(o.Logger),
- m: &sync.RWMutex{},
- n: o.Name,
- }
-}
-
-func (m *RWMutex) caller() (o string) {
- if _, file, line, ok := runtime.Caller(2); ok {
- o = fmt.Sprintf("%s:%d", file, line)
- }
- return
-}
-
-// Lock write locks the mutex
-func (m *RWMutex) Lock() {
- c := m.caller()
- m.l.Debugf("astikit: requesting lock for %s at %s", m.n, c)
- m.m.Lock()
- m.l.Debugf("astikit: lock acquired for %s at %s", m.n, c)
- m.c = c
-}
-
-// Unlock write unlocks the mutex
-func (m *RWMutex) Unlock() {
- m.m.Unlock()
- m.l.Debugf("astikit: unlock executed for %s", m.n)
-}
-
-// RLock read locks the mutex
-func (m *RWMutex) RLock() {
- c := m.caller()
- m.l.Debugf("astikit: requesting rlock for %s at %s", m.n, c)
- m.m.RLock()
- m.l.Debugf("astikit: rlock acquired for %s at %s", m.n, c)
- m.c = c
-}
-
-// RUnlock read unlocks the mutex
-func (m *RWMutex) RUnlock() {
- m.m.RUnlock()
- m.l.Debugf("astikit: unlock executed for %s", m.n)
-}
-
-// IsDeadlocked checks whether the mutex is deadlocked with a given timeout
-// and returns the last caller
-func (m *RWMutex) IsDeadlocked(timeout time.Duration) (bool, string) {
- ctx, cancel := context.WithTimeout(context.Background(), timeout)
- defer cancel()
- go func() {
- m.m.Lock()
- cancel()
- m.m.Unlock()
- }()
- <-ctx.Done()
- return errors.Is(ctx.Err(), context.DeadlineExceeded), m.c
-}
diff --git a/vendor/github.com/asticode/go-astikit/template.go b/vendor/github.com/asticode/go-astikit/template.go
deleted file mode 100644
index 804ad77e1ac..00000000000
--- a/vendor/github.com/asticode/go-astikit/template.go
+++ /dev/null
@@ -1,156 +0,0 @@
-package astikit
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "sync"
- "text/template"
-)
-
-// Templater represents an object capable of storing and parsing templates
-type Templater struct {
- layouts []string
- m sync.Mutex
- templates map[string]*template.Template
-}
-
-// NewTemplater creates a new templater
-func NewTemplater() *Templater {
- return &Templater{templates: make(map[string]*template.Template)}
-}
-
-// AddLayoutsFromDir walks through a dir and add files as layouts
-func (t *Templater) AddLayoutsFromDir(dirPath, ext string) (err error) {
- // Get layouts
- if err = filepath.Walk(dirPath, func(path string, info os.FileInfo, e error) (err error) {
- // Check input error
- if e != nil {
- err = fmt.Errorf("astikit: walking layouts has an input error for path %s: %w", path, e)
- return
- }
-
- // Only process files
- if info.IsDir() {
- return
- }
-
- // Check extension
- if ext != "" && filepath.Ext(path) != ext {
- return
- }
-
- // Read layout
- var b []byte
- if b, err = ioutil.ReadFile(path); err != nil {
- err = fmt.Errorf("astikit: reading %s failed: %w", path, err)
- return
- }
-
- // Add layout
- t.AddLayout(string(b))
- return
- }); err != nil {
- err = fmt.Errorf("astikit: walking layouts in %s failed: %w", dirPath, err)
- return
- }
- return
-}
-
-// AddTemplatesFromDir walks through a dir and add files as templates
-func (t *Templater) AddTemplatesFromDir(dirPath, ext string) (err error) {
- // Loop through templates
- if err = filepath.Walk(dirPath, func(path string, info os.FileInfo, e error) (err error) {
- // Check input error
- if e != nil {
- err = fmt.Errorf("astikit: walking templates has an input error for path %s: %w", path, e)
- return
- }
-
- // Only process files
- if info.IsDir() {
- return
- }
-
- // Check extension
- if ext != "" && filepath.Ext(path) != ext {
- return
- }
-
- // Read file
- var b []byte
- if b, err = ioutil.ReadFile(path); err != nil {
- err = fmt.Errorf("astikit: reading template content of %s failed: %w", path, err)
- return
- }
-
- // Add template
- // We use ToSlash to homogenize Windows path
- if err = t.AddTemplate(filepath.ToSlash(strings.TrimPrefix(path, dirPath)), string(b)); err != nil {
- err = fmt.Errorf("astikit: adding template failed: %w", err)
- return
- }
- return
- }); err != nil {
- err = fmt.Errorf("astikit: walking templates in %s failed: %w", dirPath, err)
- return
- }
- return
-}
-
-// AddLayout adds a new layout
-func (t *Templater) AddLayout(c string) {
- t.layouts = append(t.layouts, c)
-}
-
-// AddTemplate adds a new template
-func (t *Templater) AddTemplate(path, content string) (err error) {
- // Parse
- var tpl *template.Template
- if tpl, err = t.Parse(content); err != nil {
- err = fmt.Errorf("astikit: parsing template for path %s failed: %w", path, err)
- return
- }
-
- // Add template
- t.m.Lock()
- t.templates[path] = tpl
- t.m.Unlock()
- return
-}
-
-// DelTemplate deletes a template
-func (t *Templater) DelTemplate(path string) {
- t.m.Lock()
- defer t.m.Unlock()
- delete(t.templates, path)
-}
-
-// Template retrieves a templates
-func (t *Templater) Template(path string) (tpl *template.Template, ok bool) {
- t.m.Lock()
- defer t.m.Unlock()
- tpl, ok = t.templates[path]
- return
-}
-
-// Parse parses the content of a template
-func (t *Templater) Parse(content string) (o *template.Template, err error) {
- // Parse content
- o = template.New("root")
- if o, err = o.Parse(content); err != nil {
- err = fmt.Errorf("astikit: parsing template content failed: %w", err)
- return
- }
-
- // Parse layouts
- for idx, l := range t.layouts {
- if o, err = o.Parse(l); err != nil {
- err = fmt.Errorf("astikit: parsing layout #%d failed: %w", idx+1, err)
- return
- }
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/time.go b/vendor/github.com/asticode/go-astikit/time.go
deleted file mode 100644
index c30fa01735f..00000000000
--- a/vendor/github.com/asticode/go-astikit/time.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package astikit
-
-import (
- "context"
- "strconv"
- "time"
-)
-
-var now = func() time.Time { return time.Now() }
-
-// Sleep is a cancellable sleep
-func Sleep(ctx context.Context, d time.Duration) (err error) {
- for {
- select {
- case <-time.After(d):
- return
- case <-ctx.Done():
- err = ctx.Err()
- return
- }
- }
-}
-
-// Timestamp represents a timestamp you can marshal and umarshal
-type Timestamp struct {
- time.Time
-}
-
-// NewTimestamp creates a new timestamp
-func NewTimestamp(t time.Time) *Timestamp {
- return &Timestamp{Time: t}
-}
-
-// UnmarshalJSON implements the JSONUnmarshaler interface
-func (t *Timestamp) UnmarshalJSON(text []byte) error {
- return t.UnmarshalText(text)
-}
-
-// UnmarshalText implements the TextUnmarshaler interface
-func (t *Timestamp) UnmarshalText(text []byte) (err error) {
- var i int
- if i, err = strconv.Atoi(string(text)); err != nil {
- return
- }
- t.Time = time.Unix(int64(i), 0)
- return
-}
-
-// MarshalJSON implements the JSONMarshaler interface
-func (t Timestamp) MarshalJSON() ([]byte, error) {
- return t.MarshalText()
-}
-
-// MarshalText implements the TextMarshaler interface
-func (t Timestamp) MarshalText() (text []byte, err error) {
- text = []byte(strconv.Itoa(int(t.UTC().Unix())))
- return
-}
diff --git a/vendor/github.com/asticode/go-astikit/translator.go b/vendor/github.com/asticode/go-astikit/translator.go
deleted file mode 100644
index 4e2c8310cd8..00000000000
--- a/vendor/github.com/asticode/go-astikit/translator.go
+++ /dev/null
@@ -1,184 +0,0 @@
-package astikit
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "net/http"
- "os"
- "path/filepath"
- "strings"
- "sync"
-)
-
-// Translator represents an object capable of translating stuff
-type Translator struct {
- m *sync.RWMutex // Lock p
- o TranslatorOptions
- p map[string]string
-}
-
-// TranslatorOptions represents Translator options
-type TranslatorOptions struct {
- DefaultLanguage string
-}
-
-// NewTranslator creates a new Translator
-func NewTranslator(o TranslatorOptions) *Translator {
- return &Translator{
- m: &sync.RWMutex{},
- o: o,
- p: make(map[string]string),
- }
-}
-
-// ParseDir adds translations located in ".json" files in the specified dir
-func (t *Translator) ParseDir(dirPath string) (err error) {
- // Default dir path
- if dirPath == "" {
- if dirPath, err = os.Getwd(); err != nil {
- err = fmt.Errorf("astikit: getwd failed: %w", err)
- return
- }
- }
-
- // Walk through dir
- if err = filepath.Walk(dirPath, func(path string, info os.FileInfo, e error) (err error) {
- // Check input error
- if e != nil {
- err = fmt.Errorf("astikit: walking %s has an input error for path %s: %w", dirPath, path, e)
- return
- }
-
- // Only process first level files
- if info.IsDir() {
- if path != dirPath {
- err = filepath.SkipDir
- }
- return
- }
-
- // Only process ".json" files
- if filepath.Ext(path) != ".json" {
- return
- }
-
- // Parse file
- if err = t.ParseFile(path); err != nil {
- err = fmt.Errorf("astikit: parsing %s failed: %w", path, err)
- return
- }
- return
- }); err != nil {
- err = fmt.Errorf("astikit: walking %s failed: %w", dirPath, err)
- return
- }
- return
-}
-
-// ParseFile adds translation located in the provided path
-func (t *Translator) ParseFile(path string) (err error) {
- // Lock
- t.m.Lock()
- defer t.m.Unlock()
-
- // Open file
- var f *os.File
- if f, err = os.Open(path); err != nil {
- err = fmt.Errorf("astikit: opening %s failed: %w", path, err)
- return
- }
- defer f.Close()
-
- // Unmarshal
- var p map[string]interface{}
- if err = json.NewDecoder(f).Decode(&p); err != nil {
- err = fmt.Errorf("astikit: unmarshaling %s failed: %w", path, err)
- return
- }
-
- // Parse
- t.parse(p, strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)))
- return
-}
-
-func (t *Translator) key(prefix, key string) string {
- return prefix + "." + key
-}
-
-func (t *Translator) parse(i map[string]interface{}, prefix string) {
- for k, v := range i {
- p := t.key(prefix, k)
- switch a := v.(type) {
- case string:
- t.p[p] = a
- case map[string]interface{}:
- t.parse(a, p)
- }
- }
-}
-
-// HTTPMiddleware is the Translator HTTP middleware
-func (t *Translator) HTTPMiddleware(h http.Handler) http.Handler {
- return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- // Store language in context
- if l := r.Header.Get("Accept-Language"); l != "" {
- *r = *r.WithContext(contextWithTranslatorLanguage(r.Context(), l))
- }
-
- // Next handler
- h.ServeHTTP(rw, r)
- })
-}
-
-const contextKeyTranslatorLanguage = "astikit.translator.language"
-
-func contextWithTranslatorLanguage(ctx context.Context, language string) context.Context {
- return context.WithValue(ctx, contextKeyTranslatorLanguage, language)
-}
-
-func translatorLanguageFromContext(ctx context.Context) string {
- v, ok := ctx.Value(contextKeyTranslatorLanguage).(string)
- if !ok {
- return ""
- }
- return v
-}
-
-func (t *Translator) language(language string) string {
- if language == "" {
- return t.o.DefaultLanguage
- }
- return language
-}
-
-// LanguageCtx returns the translator language from the context, or the default language if not in the context
-func (t *Translator) LanguageCtx(ctx context.Context) string {
- return t.language(translatorLanguageFromContext(ctx))
-}
-
-// Translate translates a key into a specific language
-func (t *Translator) Translate(language, key string) string {
- // Lock
- t.m.RLock()
- defer t.m.RUnlock()
-
- // Get translation
- k1 := t.key(t.language(language), key)
- v, ok := t.p[k1]
- if ok {
- return v
- }
-
- // Default translation
- k2 := t.key(t.o.DefaultLanguage, key)
- if v, ok = t.p[k2]; ok {
- return v
- }
- return k1
-}
-
-// TranslateCtx translates a key using the language specified in the context
-func (t *Translator) TranslateCtx(ctx context.Context, key string) string {
- return t.Translate(translatorLanguageFromContext(ctx), key)
-}
diff --git a/vendor/github.com/asticode/go-astikit/worker.go b/vendor/github.com/asticode/go-astikit/worker.go
deleted file mode 100644
index b9a95a3a949..00000000000
--- a/vendor/github.com/asticode/go-astikit/worker.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package astikit
-
-import (
- "context"
- "os"
- "os/signal"
- "sync"
-)
-
-// Worker represents an object capable of blocking, handling signals and stopping
-type Worker struct {
- cancel context.CancelFunc
- ctx context.Context
- l SeverityLogger
- os, ow sync.Once
- wg *sync.WaitGroup
-}
-
-// WorkerOptions represents worker options
-type WorkerOptions struct {
- Logger StdLogger
-}
-
-// NewWorker builds a new worker
-func NewWorker(o WorkerOptions) (w *Worker) {
- w = &Worker{
- l: AdaptStdLogger(o.Logger),
- wg: &sync.WaitGroup{},
- }
- w.ctx, w.cancel = context.WithCancel(context.Background())
- w.wg.Add(1)
- w.l.Info("astikit: starting worker...")
- return
-}
-
-// HandleSignals handles signals
-func (w *Worker) HandleSignals(hs ...SignalHandler) {
- // Prepend mandatory handler
- hs = append([]SignalHandler{TermSignalHandler(w.Stop)}, hs...)
-
- // Notify
- ch := make(chan os.Signal, 1)
- signal.Notify(ch)
-
- // Execute in a task
- w.NewTask().Do(func() {
- for {
- select {
- case s := <-ch:
- // Loop through handlers
- for _, h := range hs {
- h(s)
- }
-
- // Return
- if isTermSignal(s) {
- return
- }
- case <-w.Context().Done():
- return
- }
- }
- })
-}
-
-// Stop stops the Worker
-func (w *Worker) Stop() {
- w.os.Do(func() {
- w.l.Info("astikit: stopping worker...")
- w.cancel()
- w.wg.Done()
- })
-}
-
-// Wait is a blocking pattern
-func (w *Worker) Wait() {
- w.ow.Do(func() {
- w.l.Info("astikit: worker is now waiting...")
- w.wg.Wait()
- })
-}
-
-// NewTask creates a new task
-func (w *Worker) NewTask() *Task {
- return newTask(w.wg)
-}
-
-// Context returns the worker's context
-func (w *Worker) Context() context.Context {
- return w.ctx
-}
-
-// Logger returns the worker's logger
-func (w *Worker) Logger() SeverityLogger {
- return w.l
-}
-
-// TaskFunc represents a function that can create a new task
-type TaskFunc func() *Task
-
-// Task represents a task
-type Task struct {
- od, ow sync.Once
- wg, pwg *sync.WaitGroup
-}
-
-func newTask(parentWg *sync.WaitGroup) (t *Task) {
- t = &Task{
- wg: &sync.WaitGroup{},
- pwg: parentWg,
- }
- t.pwg.Add(1)
- return
-}
-
-// NewSubTask creates a new sub task
-func (t *Task) NewSubTask() *Task {
- return newTask(t.wg)
-}
-
-// Do executes the task
-func (t *Task) Do(f func()) {
- go func() {
- // Make sure to mark the task as done
- defer t.Done()
-
- // Custom
- f()
-
- // Wait for first level subtasks to be done
- // Wait() can also be called in f() if something needs to be executed just after Wait()
- t.Wait()
- }()
-}
-
-// Done indicates the task is done
-func (t *Task) Done() {
- t.od.Do(func() {
- t.pwg.Done()
- })
-}
-
-// Wait waits for first level subtasks to be finished
-func (t *Task) Wait() {
- t.ow.Do(func() {
- t.wg.Wait()
- })
-}
diff --git a/vendor/github.com/asticode/go-astisub/.gitignore b/vendor/github.com/asticode/go-astisub/.gitignore
deleted file mode 100644
index 5be2b41d1f5..00000000000
--- a/vendor/github.com/asticode/go-astisub/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.DS_Store
-Thumbs.db
-.idea/
-cover*
-test
diff --git a/vendor/github.com/asticode/go-astisub/.travis.yml b/vendor/github.com/asticode/go-astisub/.travis.yml
deleted file mode 100644
index 2295f8d4ee0..00000000000
--- a/vendor/github.com/asticode/go-astisub/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-go:
-- 1.x
-- tip
-install:
-- go get -t ./...
-- go get golang.org/x/tools/cmd/cover
-- go get github.com/mattn/goveralls
-matrix:
- allow_failures:
- - go: tip
-script:
-- go test -race -v -coverprofile=coverage.out
-- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
\ No newline at end of file
diff --git a/vendor/github.com/asticode/go-astisub/LICENSE b/vendor/github.com/asticode/go-astisub/LICENSE
deleted file mode 100644
index 606a4160fe7..00000000000
--- a/vendor/github.com/asticode/go-astisub/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Quentin Renard
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/asticode/go-astisub/README.md b/vendor/github.com/asticode/go-astisub/README.md
deleted file mode 100644
index 43e7bd62b2c..00000000000
--- a/vendor/github.com/asticode/go-astisub/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-[![GoReportCard](http://goreportcard.com/badge/github.com/asticode/go-astisub)](http://goreportcard.com/report/github.com/asticode/go-astisub)
-[![GoDoc](https://godoc.org/github.com/asticode/go-astisub?status.svg)](https://godoc.org/github.com/asticode/go-astisub)
-[![Travis](https://travis-ci.com/asticode/go-astisub.svg?branch=master)](https://travis-ci.com/asticode/go-astisub#)
-[![Coveralls](https://coveralls.io/repos/github/asticode/go-astisub/badge.svg?branch=master)](https://coveralls.io/github/asticode/go-astisub)
-
-This is a Golang library to manipulate subtitles.
-
-It allows you to manipulate `srt`, `stl`, `ttml`, `ssa/ass`, `webvtt` and `teletext` files for now.
-
-Available operations are `parsing`, `writing`, `syncing`, `fragmenting`, `unfragmenting`, `merging` and `optimizing`.
-
-# Installation
-
-To install the library:
-
- go get github.com/asticode/go-astisub
-
-To install the CLI:
-
- go install github.com/asticode/go-astisub/astisub
-
-# Using the library in your code
-
-WARNING: the code below doesn't handle errors for readibility purposes. However you SHOULD!
-
-```go
-// Open subtitles
-s1, _ := astisub.OpenFile("/path/to/example.ttml")
-s2, _ := astisub.ReadFromSRT(bytes.NewReader([]byte("00:01:00.000 --> 00:02:00.000\nCredits")))
-
-// Add a duration to every subtitles (syncing)
-s1.Add(-2*time.Second)
-
-// Fragment the subtitles
-s1.Fragment(2*time.Second)
-
-// Merge subtitles
-s1.Merge(s2)
-
-// Optimize subtitles
-s1.Optimize()
-
-// Unfragment the subtitles
-s1.Unfragment()
-
-// Write subtitles
-s1.Write("/path/to/example.srt")
-var buf = &bytes.Buffer{}
-s2.WriteToTTML(buf)
-```
-
-# Using the CLI
-
-If **astisub** has been installed properly you can:
-
-- convert any type of subtitle to any other type of subtitle:
-
- astisub convert -i example.srt -o example.ttml
-
-- fragment any type of subtitle:
-
- astisub fragment -i example.srt -f 2s -o example.out.srt
-
-- merge any type of subtitle into any other type of subtitle:
-
- astisub merge -i example.srt -i example.ttml -o example.out.srt
-
-- optimize any type of subtitle:
-
- astisub optimize -i example.srt -o example.out.srt
-
-- unfragment any type of subtitle:
-
- astisub unfragment -i example.srt -o example.out.srt
-
-- sync any type of subtitle:
-
- astisub sync -i example.srt -s "-2s" -o example.out.srt
-
-# Features and roadmap
-
-- [x] parsing
-- [x] writing
-- [x] syncing
-- [x] fragmenting/unfragmenting
-- [x] merging
-- [x] ordering
-- [x] optimizing
-- [x] .srt
-- [x] .ttml
-- [x] .vtt
-- [x] .stl
-- [x] .ssa/.ass
-- [x] .teletext
-- [ ] .smi
diff --git a/vendor/github.com/asticode/go-astisub/language.go b/vendor/github.com/asticode/go-astisub/language.go
deleted file mode 100644
index a7c762abbb6..00000000000
--- a/vendor/github.com/asticode/go-astisub/language.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package astisub
-
-// Languages
-const (
- LanguageChinese = "chinese"
- LanguageEnglish = "english"
- LanguageFrench = "french"
- LanguageJapanese = "japanese"
- LanguageNorwegian = "norwegian"
-)
diff --git a/vendor/github.com/asticode/go-astisub/srt.go b/vendor/github.com/asticode/go-astisub/srt.go
deleted file mode 100644
index 8e854e558f7..00000000000
--- a/vendor/github.com/asticode/go-astisub/srt.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package astisub
-
-import (
- "bufio"
- "fmt"
- "io"
- "strconv"
- "strings"
- "time"
-)
-
-// Constants
-const (
- srtTimeBoundariesSeparator = " --> "
-)
-
-// Vars
-var (
- bytesSRTTimeBoundariesSeparator = []byte(srtTimeBoundariesSeparator)
-)
-
-// parseDurationSRT parses an .srt duration
-func parseDurationSRT(i string) (time.Duration, error) {
- return parseDuration(i, ",", 3)
-}
-
-// ReadFromSRT parses an .srt content
-func ReadFromSRT(i io.Reader) (o *Subtitles, err error) {
- // Init
- o = NewSubtitles()
- var scanner = bufio.NewScanner(i)
-
- // Scan
- var line string
- var lineNum int
- var s = &Item{}
- for scanner.Scan() {
- // Fetch line
- line = strings.TrimSpace(scanner.Text())
- lineNum++
-
- // Remove BOM header
- if lineNum == 1 {
- line = strings.TrimPrefix(line, string(BytesBOM))
- }
-
- // Line contains time boundaries
- if strings.Contains(line, srtTimeBoundariesSeparator) {
- // Return the wrong number of rows
- if len(s.Lines) == 0 {
- err = fmt.Errorf("astisub: line %d: no lines", lineNum)
- return
- }
-
- // Remove last item of previous subtitle since it's the index
- index := s.Lines[len(s.Lines)-1]
- s.Lines = s.Lines[:len(s.Lines)-1]
-
- // Remove trailing empty lines
- if len(s.Lines) > 0 {
- for i := len(s.Lines) - 1; i >= 0; i-- {
- if len(s.Lines[i].Items) > 0 {
- for j := len(s.Lines[i].Items) - 1; j >= 0; j-- {
- if len(s.Lines[i].Items[j].Text) == 0 {
- s.Lines[i].Items = s.Lines[i].Items[:j]
- } else {
- break
- }
- }
- if len(s.Lines[i].Items) == 0 {
- s.Lines = s.Lines[:i]
- }
-
- }
- }
- }
-
- // Init subtitle
- s = &Item{}
-
- // Fetch Index
- s.Index, _ = strconv.Atoi(index.String())
-
- // Extract time boundaries
- s1 := strings.Split(line, srtTimeBoundariesSeparator)
- if l := len(s1); l < 2 {
- err = fmt.Errorf("astisub: line %d: time boundaries has only %d element(s)", lineNum, l)
- return
- }
- // We do this to eliminate extra stuff like positions which are not documented anywhere
- s2 := strings.Split(s1[1], " ")
-
- // Parse time boundaries
- if s.StartAt, err = parseDurationSRT(s1[0]); err != nil {
- err = fmt.Errorf("astisub: line %d: parsing srt duration %s failed: %w", lineNum, s1[0], err)
- return
- }
- if s.EndAt, err = parseDurationSRT(s2[0]); err != nil {
- err = fmt.Errorf("astisub: line %d: parsing srt duration %s failed: %w", lineNum, s2[0], err)
- return
- }
-
- // Append subtitle
- o.Items = append(o.Items, s)
- } else {
- // Add text
- s.Lines = append(s.Lines, Line{Items: []LineItem{{Text: strings.TrimSpace(line)}}})
- }
- }
- return
-}
-
-// formatDurationSRT formats an .srt duration
-func formatDurationSRT(i time.Duration) string {
- return formatDuration(i, ",", 3)
-}
-
-// WriteToSRT writes subtitles in .srt format
-func (s Subtitles) WriteToSRT(o io.Writer) (err error) {
- // Do not write anything if no subtitles
- if len(s.Items) == 0 {
- err = ErrNoSubtitlesToWrite
- return
- }
-
- // Add BOM header
- var c []byte
- c = append(c, BytesBOM...)
-
- // Loop through subtitles
- for k, v := range s.Items {
- // Add time boundaries
- c = append(c, []byte(strconv.Itoa(k+1))...)
- c = append(c, bytesLineSeparator...)
- c = append(c, []byte(formatDurationSRT(v.StartAt))...)
- c = append(c, bytesSRTTimeBoundariesSeparator...)
- c = append(c, []byte(formatDurationSRT(v.EndAt))...)
- c = append(c, bytesLineSeparator...)
-
- // Loop through lines
- for _, l := range v.Lines {
- c = append(c, []byte(l.String())...)
- c = append(c, bytesLineSeparator...)
- }
-
- // Add new line
- c = append(c, bytesLineSeparator...)
- }
-
- // Remove last new line
- c = c[:len(c)-1]
-
- // Write
- if _, err = o.Write(c); err != nil {
- err = fmt.Errorf("astisub: writing failed: %w", err)
- return
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astisub/ssa.go b/vendor/github.com/asticode/go-astisub/ssa.go
deleted file mode 100644
index a3a00b0001a..00000000000
--- a/vendor/github.com/asticode/go-astisub/ssa.go
+++ /dev/null
@@ -1,1297 +0,0 @@
-package astisub
-
-import (
- "bufio"
- "fmt"
- "io"
- "log"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// https://www.matroska.org/technical/specs/subtitles/ssa.html
-// http://moodub.free.fr/video/ass-specs.doc
-// https://en.wikipedia.org/wiki/SubStation_Alpha
-
-// SSA alignment
-const (
- ssaAlignmentCentered = 2
- ssaAlignmentLeft = 1
- ssaAlignmentLeftJustifiedTopTitle = 5
- ssaAlignmentMidTitle = 8
- ssaAlignmentRight = 3
- ssaAlignmentTopTitle = 4
-)
-
-// SSA border styles
-const (
- ssaBorderStyleOpaqueBox = 3
- ssaBorderStyleOutlineAndDropShadow = 1
-)
-
-// SSA collisions
-const (
- ssaCollisionsNormal = "Normal"
- ssaCollisionsReverse = "Reverse"
-)
-
-// SSA event categories
-const (
- ssaEventCategoryCommand = "Command"
- ssaEventCategoryComment = "Comment"
- ssaEventCategoryDialogue = "Dialogue"
- ssaEventCategoryMovie = "Movie"
- ssaEventCategoryPicture = "Picture"
- ssaEventCategorySound = "Sound"
-)
-
-// SSA event format names
-const (
- ssaEventFormatNameEffect = "Effect"
- ssaEventFormatNameEnd = "End"
- ssaEventFormatNameLayer = "Layer"
- ssaEventFormatNameMarginL = "MarginL"
- ssaEventFormatNameMarginR = "MarginR"
- ssaEventFormatNameMarginV = "MarginV"
- ssaEventFormatNameMarked = "Marked"
- ssaEventFormatNameName = "Name"
- ssaEventFormatNameStart = "Start"
- ssaEventFormatNameStyle = "Style"
- ssaEventFormatNameText = "Text"
-)
-
-// SSA script info names
-const (
- ssaScriptInfoNameCollisions = "Collisions"
- ssaScriptInfoNameOriginalEditing = "Original Editing"
- ssaScriptInfoNameOriginalScript = "Original Script"
- ssaScriptInfoNameOriginalTiming = "Original Timing"
- ssaScriptInfoNameOriginalTranslation = "Original Translation"
- ssaScriptInfoNamePlayDepth = "PlayDepth"
- ssaScriptInfoNamePlayResX = "PlayResX"
- ssaScriptInfoNamePlayResY = "PlayResY"
- ssaScriptInfoNameScriptType = "ScriptType"
- ssaScriptInfoNameScriptUpdatedBy = "Script Updated By"
- ssaScriptInfoNameSynchPoint = "Synch Point"
- ssaScriptInfoNameTimer = "Timer"
- ssaScriptInfoNameTitle = "Title"
- ssaScriptInfoNameUpdateDetails = "Update Details"
- ssaScriptInfoNameWrapStyle = "WrapStyle"
-)
-
-// SSA section names
-const (
- ssaSectionNameEvents = "events"
- ssaSectionNameScriptInfo = "script.info"
- ssaSectionNameStyles = "styles"
- ssaSectionNameUnknown = "unknown"
-)
-
-// SSA style format names
-const (
- ssaStyleFormatNameAlignment = "Alignment"
- ssaStyleFormatNameAlphaLevel = "AlphaLevel"
- ssaStyleFormatNameAngle = "Angle"
- ssaStyleFormatNameBackColour = "BackColour"
- ssaStyleFormatNameBold = "Bold"
- ssaStyleFormatNameBorderStyle = "BorderStyle"
- ssaStyleFormatNameEncoding = "Encoding"
- ssaStyleFormatNameFontName = "Fontname"
- ssaStyleFormatNameFontSize = "Fontsize"
- ssaStyleFormatNameItalic = "Italic"
- ssaStyleFormatNameMarginL = "MarginL"
- ssaStyleFormatNameMarginR = "MarginR"
- ssaStyleFormatNameMarginV = "MarginV"
- ssaStyleFormatNameName = "Name"
- ssaStyleFormatNameOutline = "Outline"
- ssaStyleFormatNameOutlineColour = "OutlineColour"
- ssaStyleFormatNamePrimaryColour = "PrimaryColour"
- ssaStyleFormatNameScaleX = "ScaleX"
- ssaStyleFormatNameScaleY = "ScaleY"
- ssaStyleFormatNameSecondaryColour = "SecondaryColour"
- ssaStyleFormatNameShadow = "Shadow"
- ssaStyleFormatNameSpacing = "Spacing"
- ssaStyleFormatNameStrikeout = "Strikeout"
- ssaStyleFormatNameTertiaryColour = "TertiaryColour"
- ssaStyleFormatNameUnderline = "Underline"
-)
-
-// SSA wrap style
-const (
- ssaWrapStyleEndOfLineWordWrapping = "1"
- ssaWrapStyleNoWordWrapping = "2"
- ssaWrapStyleSmartWrapping = "0"
- ssaWrapStyleSmartWrappingWithLowerLinesGettingWider = "3"
-)
-
-// SSA regexp
-var ssaRegexpEffect = regexp.MustCompile(`\{[^\{]+\}`)
-
-// ReadFromSSA parses an .ssa content
-func ReadFromSSA(i io.Reader) (o *Subtitles, err error) {
- o, err = ReadFromSSAWithOptions(i, defaultSSAOptions())
- return o, err
-}
-
-// ReadFromSSAWithOptions parses an .ssa content
-func ReadFromSSAWithOptions(i io.Reader, opts SSAOptions) (o *Subtitles, err error) {
- // Init
- o = NewSubtitles()
- var scanner = bufio.NewScanner(i)
- var si = &ssaScriptInfo{}
- var ss = []*ssaStyle{}
- var es = []*ssaEvent{}
-
- // Scan
- var line, sectionName string
- var format map[int]string
- isFirstLine := true
- for scanner.Scan() {
- // Fetch line
- line = strings.TrimSpace(scanner.Text())
-
- // Remove BOM header
- if isFirstLine {
- line = strings.TrimPrefix(line, string(BytesBOM))
- isFirstLine = false
- }
-
- // Empty line
- if len(line) == 0 {
- continue
- }
-
- // Section name
- if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {
- switch strings.ToLower(line[1 : len(line)-1]) {
- case "events":
- sectionName = ssaSectionNameEvents
- format = make(map[int]string)
- continue
- case "script info":
- sectionName = ssaSectionNameScriptInfo
- continue
- case "v4 styles", "v4+ styles", "v4 styles+":
- sectionName = ssaSectionNameStyles
- format = make(map[int]string)
- continue
- default:
- if opts.OnUnknownSectionName != nil {
- opts.OnUnknownSectionName(line)
- }
- sectionName = ssaSectionNameUnknown
- continue
- }
- }
-
- // Unknown section
- if sectionName == ssaSectionNameUnknown {
- continue
- }
-
- // Comment
- if len(line) > 0 && line[0] == ';' {
- si.comments = append(si.comments, strings.TrimSpace(line[1:]))
- continue
- }
-
- // Split on ":"
- var split = strings.Split(line, ":")
- if len(split) < 2 || split[0] == "" {
- if opts.OnInvalidLine != nil {
- opts.OnInvalidLine(line)
- }
- continue
- }
- var header = strings.TrimSpace(split[0])
- var content = strings.TrimSpace(strings.Join(split[1:], ":"))
-
- // Switch on section name
- switch sectionName {
- case ssaSectionNameScriptInfo:
- if err = si.parse(header, content); err != nil {
- err = fmt.Errorf("astisub: parsing script info block failed: %w", err)
- return
- }
- case ssaSectionNameEvents, ssaSectionNameStyles:
- // Parse format
- if header == "Format" {
- for idx, item := range strings.Split(content, ",") {
- format[idx] = strings.TrimSpace(item)
- }
- } else {
- // No format provided
- if len(format) == 0 {
- err = fmt.Errorf("astisub: no %s format provided", sectionName)
- return
- }
-
- // Switch on section name
- switch sectionName {
- case ssaSectionNameEvents:
- var e *ssaEvent
- if e, err = newSSAEventFromString(header, content, format); err != nil {
- err = fmt.Errorf("astisub: building new ssa event failed: %w", err)
- return
- }
- es = append(es, e)
- case ssaSectionNameStyles:
- var s *ssaStyle
- if s, err = newSSAStyleFromString(content, format); err != nil {
- err = fmt.Errorf("astisub: building new ssa style failed: %w", err)
- return
- }
- ss = append(ss, s)
- }
- }
- }
- }
-
- // Set metadata
- o.Metadata = si.metadata()
-
- // Loop through styles
- for _, s := range ss {
- var st = s.style()
- o.Styles[st.ID] = st
- }
-
- // Loop through events
- for _, e := range es {
- // Only process dialogues
- if e.category == ssaEventCategoryDialogue {
- // Build item
- var item *Item
- if item, err = e.item(o.Styles); err != nil {
- return
- }
-
- // Append item
- o.Items = append(o.Items, item)
- }
- }
- return
-}
-
-// newColorFromSSAColor builds a new color based on an SSA color
-func newColorFromSSAColor(i string) (_ *Color, _ error) {
- // Empty
- if len(i) == 0 {
- return
- }
-
- // Check whether input is decimal or hexadecimal
- var s = i
- var base = 10
- if strings.HasPrefix(i, "&H") {
- s = i[2:]
- base = 16
- }
- return newColorFromSSAString(s, base)
-}
-
-// newSSAColorFromColor builds a new SSA color based on a color
-func newSSAColorFromColor(i *Color) string {
- return "&H" + i.SSAString()
-}
-
-// ssaScriptInfo represents an SSA script info block
-type ssaScriptInfo struct {
- collisions string
- comments []string
- originalEditing string
- originalScript string
- originalTiming string
- originalTranslation string
- playDepth *int
- playResX, playResY *int
- scriptType string
- scriptUpdatedBy string
- synchPoint string
- timer *float64
- title string
- updateDetails string
- wrapStyle string
-}
-
-// newSSAScriptInfo builds an SSA script info block based on metadata
-func newSSAScriptInfo(m *Metadata) (o *ssaScriptInfo) {
- // Init
- o = &ssaScriptInfo{}
-
- // Add metadata
- if m != nil {
- o.collisions = m.SSACollisions
- o.comments = m.Comments
- o.originalEditing = m.SSAOriginalEditing
- o.originalScript = m.SSAOriginalScript
- o.originalTiming = m.SSAOriginalTiming
- o.originalTranslation = m.SSAOriginalTranslation
- o.playDepth = m.SSAPlayDepth
- o.playResX = m.SSAPlayResX
- o.playResY = m.SSAPlayResY
- o.scriptType = m.SSAScriptType
- o.scriptUpdatedBy = m.SSAScriptUpdatedBy
- o.synchPoint = m.SSASynchPoint
- o.timer = m.SSATimer
- o.title = m.Title
- o.updateDetails = m.SSAUpdateDetails
- o.wrapStyle = m.SSAWrapStyle
- }
- return
-}
-
-// parse parses a script info header/content
-func (b *ssaScriptInfo) parse(header, content string) (err error) {
- switch header {
- case ssaScriptInfoNameCollisions:
- b.collisions = content
- case ssaScriptInfoNameOriginalEditing:
- b.originalEditing = content
- case ssaScriptInfoNameOriginalScript:
- b.originalScript = content
- case ssaScriptInfoNameOriginalTiming:
- b.originalTiming = content
- case ssaScriptInfoNameOriginalTranslation:
- b.originalTranslation = content
- case ssaScriptInfoNameScriptType:
- b.scriptType = content
- case ssaScriptInfoNameScriptUpdatedBy:
- b.scriptUpdatedBy = content
- case ssaScriptInfoNameSynchPoint:
- b.synchPoint = content
- case ssaScriptInfoNameTitle:
- b.title = content
- case ssaScriptInfoNameUpdateDetails:
- b.updateDetails = content
- case ssaScriptInfoNameWrapStyle:
- b.wrapStyle = content
- // Int
- case ssaScriptInfoNamePlayResX, ssaScriptInfoNamePlayResY, ssaScriptInfoNamePlayDepth:
- var v int
- if v, err = strconv.Atoi(content); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", content, err)
- }
- switch header {
- case ssaScriptInfoNamePlayDepth:
- b.playDepth = astikit.IntPtr(v)
- case ssaScriptInfoNamePlayResX:
- b.playResX = astikit.IntPtr(v)
- case ssaScriptInfoNamePlayResY:
- b.playResY = astikit.IntPtr(v)
- }
- // Float
- case ssaScriptInfoNameTimer:
- var v float64
- if v, err = strconv.ParseFloat(strings.Replace(content, ",", ".", -1), 64); err != nil {
- err = fmt.Errorf("astisub: parseFloat of %s failed: %w", content, err)
- }
- b.timer = astikit.Float64Ptr(v)
- }
- return
-}
-
-// metadata returns the block as Metadata
-func (b *ssaScriptInfo) metadata() *Metadata {
- return &Metadata{
- Comments: b.comments,
- SSACollisions: b.collisions,
- SSAOriginalEditing: b.originalEditing,
- SSAOriginalScript: b.originalScript,
- SSAOriginalTiming: b.originalTiming,
- SSAOriginalTranslation: b.originalTranslation,
- SSAPlayDepth: b.playDepth,
- SSAPlayResX: b.playResX,
- SSAPlayResY: b.playResY,
- SSAScriptType: b.scriptType,
- SSAScriptUpdatedBy: b.scriptUpdatedBy,
- SSASynchPoint: b.synchPoint,
- SSATimer: b.timer,
- SSAUpdateDetails: b.updateDetails,
- SSAWrapStyle: b.wrapStyle,
- Title: b.title,
- }
-}
-
-// bytes returns the block as bytes
-func (b *ssaScriptInfo) bytes() (o []byte) {
- o = []byte("[Script Info]")
- o = append(o, bytesLineSeparator...)
- for _, c := range b.comments {
- o = appendStringToBytesWithNewLine(o, "; "+c)
- }
- if len(b.collisions) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameCollisions+": "+b.collisions)
- }
- if len(b.originalEditing) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameOriginalEditing+": "+b.originalEditing)
- }
- if len(b.originalScript) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameOriginalScript+": "+b.originalScript)
- }
- if len(b.originalTiming) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameOriginalTiming+": "+b.originalTiming)
- }
- if len(b.originalTranslation) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameOriginalTranslation+": "+b.originalTranslation)
- }
- if b.playDepth != nil {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNamePlayDepth+": "+strconv.Itoa(*b.playDepth))
- }
- if b.playResX != nil {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNamePlayResX+": "+strconv.Itoa(*b.playResX))
- }
- if b.playResY != nil {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNamePlayResY+": "+strconv.Itoa(*b.playResY))
- }
- if len(b.scriptType) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameScriptType+": "+b.scriptType)
- }
- if len(b.scriptUpdatedBy) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameScriptUpdatedBy+": "+b.scriptUpdatedBy)
- }
- if len(b.synchPoint) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameSynchPoint+": "+b.synchPoint)
- }
- if b.timer != nil {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameTimer+": "+strings.Replace(strconv.FormatFloat(*b.timer, 'f', -1, 64), ".", ",", -1))
- }
- if len(b.title) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameTitle+": "+b.title)
- }
- if len(b.updateDetails) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameUpdateDetails+": "+b.updateDetails)
- }
- if len(b.wrapStyle) > 0 {
- o = appendStringToBytesWithNewLine(o, ssaScriptInfoNameWrapStyle+": "+b.wrapStyle)
- }
- return
-}
-
-// ssaStyle represents an SSA style
-type ssaStyle struct {
- alignment *int
- alphaLevel *float64
- angle *float64 // degrees
- backColour *Color
- bold *bool
- borderStyle *int
- encoding *int
- fontName string
- fontSize *float64
- italic *bool
- outline *float64 // pixels
- outlineColour *Color
- marginLeft *int // pixels
- marginRight *int // pixels
- marginVertical *int // pixels
- name string
- primaryColour *Color
- scaleX *float64 // %
- scaleY *float64 // %
- secondaryColour *Color
- shadow *float64 // pixels
- spacing *float64 // pixels
- strikeout *bool
- underline *bool
-}
-
-// newSSAStyleFromStyle returns an SSA style based on a Style
-func newSSAStyleFromStyle(i Style) *ssaStyle {
- return &ssaStyle{
- alignment: i.InlineStyle.SSAAlignment,
- alphaLevel: i.InlineStyle.SSAAlphaLevel,
- angle: i.InlineStyle.SSAAngle,
- backColour: i.InlineStyle.SSABackColour,
- bold: i.InlineStyle.SSABold,
- borderStyle: i.InlineStyle.SSABorderStyle,
- encoding: i.InlineStyle.SSAEncoding,
- fontName: i.InlineStyle.SSAFontName,
- fontSize: i.InlineStyle.SSAFontSize,
- italic: i.InlineStyle.SSAItalic,
- outline: i.InlineStyle.SSAOutline,
- outlineColour: i.InlineStyle.SSAOutlineColour,
- marginLeft: i.InlineStyle.SSAMarginLeft,
- marginRight: i.InlineStyle.SSAMarginRight,
- marginVertical: i.InlineStyle.SSAMarginVertical,
- name: i.ID,
- primaryColour: i.InlineStyle.SSAPrimaryColour,
- scaleX: i.InlineStyle.SSAScaleX,
- scaleY: i.InlineStyle.SSAScaleY,
- secondaryColour: i.InlineStyle.SSASecondaryColour,
- shadow: i.InlineStyle.SSAShadow,
- spacing: i.InlineStyle.SSASpacing,
- strikeout: i.InlineStyle.SSAStrikeout,
- underline: i.InlineStyle.SSAUnderline,
- }
-}
-
-// newSSAStyleFromString returns an SSA style based on an input string and a format
-func newSSAStyleFromString(content string, format map[int]string) (s *ssaStyle, err error) {
- // Split content
- var items = strings.Split(content, ",")
-
- // Not enough items
- if len(items) < len(format) {
- err = fmt.Errorf("astisub: content has %d items whereas style format has %d items", len(items), len(format))
- return
- }
-
- // Loop through items
- s = &ssaStyle{}
- for idx, item := range items {
- // Index not found in format
- var attr string
- var ok bool
- if attr, ok = format[idx]; !ok {
- err = fmt.Errorf("astisub: index %d not found in style format %+v", idx, format)
- return
- }
-
- // Switch on attribute name
- switch attr {
- // Bool
- case ssaStyleFormatNameBold, ssaStyleFormatNameItalic, ssaStyleFormatNameStrikeout,
- ssaStyleFormatNameUnderline:
- var b = item == "-1"
- switch attr {
- case ssaStyleFormatNameBold:
- s.bold = astikit.BoolPtr(b)
- case ssaStyleFormatNameItalic:
- s.italic = astikit.BoolPtr(b)
- case ssaStyleFormatNameStrikeout:
- s.strikeout = astikit.BoolPtr(b)
- case ssaStyleFormatNameUnderline:
- s.underline = astikit.BoolPtr(b)
- }
- // Color
- case ssaStyleFormatNamePrimaryColour, ssaStyleFormatNameSecondaryColour,
- ssaStyleFormatNameTertiaryColour, ssaStyleFormatNameOutlineColour, ssaStyleFormatNameBackColour:
- // Build color
- var c *Color
- if c, err = newColorFromSSAColor(item); err != nil {
- err = fmt.Errorf("astisub: building new %s from ssa color %s failed: %w", attr, item, err)
- return
- }
-
- // Set color
- switch attr {
- case ssaStyleFormatNameBackColour:
- s.backColour = c
- case ssaStyleFormatNamePrimaryColour:
- s.primaryColour = c
- case ssaStyleFormatNameSecondaryColour:
- s.secondaryColour = c
- case ssaStyleFormatNameTertiaryColour, ssaStyleFormatNameOutlineColour:
- s.outlineColour = c
- }
- // Float
- case ssaStyleFormatNameAlphaLevel, ssaStyleFormatNameAngle, ssaStyleFormatNameFontSize,
- ssaStyleFormatNameScaleX, ssaStyleFormatNameScaleY,
- ssaStyleFormatNameOutline, ssaStyleFormatNameShadow, ssaStyleFormatNameSpacing:
- // Parse float
- var f float64
- if f, err = strconv.ParseFloat(item, 64); err != nil {
- err = fmt.Errorf("astisub: parsing float %s failed: %w", item, err)
- return
- }
-
- // Set float
- switch attr {
- case ssaStyleFormatNameAlphaLevel:
- s.alphaLevel = astikit.Float64Ptr(f)
- case ssaStyleFormatNameAngle:
- s.angle = astikit.Float64Ptr(f)
- case ssaStyleFormatNameFontSize:
- s.fontSize = astikit.Float64Ptr(f)
- case ssaStyleFormatNameScaleX:
- s.scaleX = astikit.Float64Ptr(f)
- case ssaStyleFormatNameScaleY:
- s.scaleY = astikit.Float64Ptr(f)
- case ssaStyleFormatNameOutline:
- s.outline = astikit.Float64Ptr(f)
- case ssaStyleFormatNameShadow:
- s.shadow = astikit.Float64Ptr(f)
- case ssaStyleFormatNameSpacing:
- s.spacing = astikit.Float64Ptr(f)
- }
- // Int
- case ssaStyleFormatNameAlignment, ssaStyleFormatNameBorderStyle, ssaStyleFormatNameEncoding,
- ssaStyleFormatNameMarginL, ssaStyleFormatNameMarginR, ssaStyleFormatNameMarginV:
- // Parse int
- var i int
- if i, err = strconv.Atoi(item); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", item, err)
- return
- }
-
- // Set int
- switch attr {
- case ssaStyleFormatNameAlignment:
- s.alignment = astikit.IntPtr(i)
- case ssaStyleFormatNameBorderStyle:
- s.borderStyle = astikit.IntPtr(i)
- case ssaStyleFormatNameEncoding:
- s.encoding = astikit.IntPtr(i)
- case ssaStyleFormatNameMarginL:
- s.marginLeft = astikit.IntPtr(i)
- case ssaStyleFormatNameMarginR:
- s.marginRight = astikit.IntPtr(i)
- case ssaStyleFormatNameMarginV:
- s.marginVertical = astikit.IntPtr(i)
- }
- // String
- case ssaStyleFormatNameFontName, ssaStyleFormatNameName:
- switch attr {
- case ssaStyleFormatNameFontName:
- s.fontName = item
- case ssaStyleFormatNameName:
- s.name = item
- }
- }
- }
- return
-}
-
-// ssaUpdateFormat updates an SSA format
-func ssaUpdateFormat(n string, formatMap map[string]bool, format []string) []string {
- if _, ok := formatMap[n]; !ok {
- formatMap[n] = true
- format = append(format, n)
- }
- return format
-}
-
-// updateFormat updates the format based on the non empty fields
-func (s ssaStyle) updateFormat(formatMap map[string]bool, format []string) []string {
- if s.alignment != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameAlignment, formatMap, format)
- }
- if s.alphaLevel != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameAlphaLevel, formatMap, format)
- }
- if s.angle != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameAngle, formatMap, format)
- }
- if s.backColour != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameBackColour, formatMap, format)
- }
- if s.bold != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameBold, formatMap, format)
- }
- if s.borderStyle != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameBorderStyle, formatMap, format)
- }
- if s.encoding != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameEncoding, formatMap, format)
- }
- if len(s.fontName) > 0 {
- format = ssaUpdateFormat(ssaStyleFormatNameFontName, formatMap, format)
- }
- if s.fontSize != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameFontSize, formatMap, format)
- }
- if s.italic != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameItalic, formatMap, format)
- }
- if s.marginLeft != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameMarginL, formatMap, format)
- }
- if s.marginRight != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameMarginR, formatMap, format)
- }
- if s.marginVertical != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameMarginV, formatMap, format)
- }
- if s.outline != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameOutline, formatMap, format)
- }
- if s.outlineColour != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameOutlineColour, formatMap, format)
- }
- if s.primaryColour != nil {
- format = ssaUpdateFormat(ssaStyleFormatNamePrimaryColour, formatMap, format)
- }
- if s.scaleX != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameScaleX, formatMap, format)
- }
- if s.scaleY != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameScaleY, formatMap, format)
- }
- if s.secondaryColour != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameSecondaryColour, formatMap, format)
- }
- if s.shadow != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameShadow, formatMap, format)
- }
- if s.spacing != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameSpacing, formatMap, format)
- }
- if s.strikeout != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameStrikeout, formatMap, format)
- }
- if s.underline != nil {
- format = ssaUpdateFormat(ssaStyleFormatNameUnderline, formatMap, format)
- }
- return format
-}
-
-// string returns the block as a string
-func (s ssaStyle) string(format []string) string {
- var ss = []string{s.name}
- for _, attr := range format {
- var v string
- var found = true
- switch attr {
- // Bool
- case ssaStyleFormatNameBold, ssaStyleFormatNameItalic, ssaStyleFormatNameStrikeout,
- ssaStyleFormatNameUnderline:
- var b *bool
- switch attr {
- case ssaStyleFormatNameBold:
- b = s.bold
- case ssaStyleFormatNameItalic:
- b = s.italic
- case ssaStyleFormatNameStrikeout:
- b = s.strikeout
- case ssaStyleFormatNameUnderline:
- b = s.underline
- }
- if b != nil {
- v = "0"
- if *b {
- v = "1"
- }
- }
- // Color
- case ssaStyleFormatNamePrimaryColour, ssaStyleFormatNameSecondaryColour,
- ssaStyleFormatNameOutlineColour, ssaStyleFormatNameBackColour:
- var c *Color
- switch attr {
- case ssaStyleFormatNameBackColour:
- c = s.backColour
- case ssaStyleFormatNamePrimaryColour:
- c = s.primaryColour
- case ssaStyleFormatNameSecondaryColour:
- c = s.secondaryColour
- case ssaStyleFormatNameOutlineColour:
- c = s.outlineColour
- }
- if c != nil {
- v = newSSAColorFromColor(c)
- }
- // Float
- case ssaStyleFormatNameAlphaLevel, ssaStyleFormatNameAngle, ssaStyleFormatNameFontSize,
- ssaStyleFormatNameScaleX, ssaStyleFormatNameScaleY,
- ssaStyleFormatNameOutline, ssaStyleFormatNameShadow, ssaStyleFormatNameSpacing:
- var f *float64
- switch attr {
- case ssaStyleFormatNameAlphaLevel:
- f = s.alphaLevel
- case ssaStyleFormatNameAngle:
- f = s.angle
- case ssaStyleFormatNameFontSize:
- f = s.fontSize
- case ssaStyleFormatNameScaleX:
- f = s.scaleX
- case ssaStyleFormatNameScaleY:
- f = s.scaleY
- case ssaStyleFormatNameOutline:
- f = s.outline
- case ssaStyleFormatNameShadow:
- f = s.shadow
- case ssaStyleFormatNameSpacing:
- f = s.spacing
- }
- if f != nil {
- v = strconv.FormatFloat(*f, 'f', 3, 64)
- }
- // Int
- case ssaStyleFormatNameAlignment, ssaStyleFormatNameBorderStyle, ssaStyleFormatNameEncoding,
- ssaStyleFormatNameMarginL, ssaStyleFormatNameMarginR, ssaStyleFormatNameMarginV:
- var i *int
- switch attr {
- case ssaStyleFormatNameAlignment:
- i = s.alignment
- case ssaStyleFormatNameBorderStyle:
- i = s.borderStyle
- case ssaStyleFormatNameEncoding:
- i = s.encoding
- case ssaStyleFormatNameMarginL:
- i = s.marginLeft
- case ssaStyleFormatNameMarginR:
- i = s.marginRight
- case ssaStyleFormatNameMarginV:
- i = s.marginVertical
- }
- if i != nil {
- v = strconv.Itoa(*i)
- }
- // String
- case ssaStyleFormatNameFontName:
- switch attr {
- case ssaStyleFormatNameFontName:
- v = s.fontName
- }
- default:
- found = false
- }
- if found {
- ss = append(ss, v)
- }
- }
- return strings.Join(ss, ",")
-}
-
-// style converts ssaStyle to Style
-func (s ssaStyle) style() (o *Style) {
- o = &Style{
- ID: s.name,
- InlineStyle: &StyleAttributes{
- SSAAlignment: s.alignment,
- SSAAlphaLevel: s.alphaLevel,
- SSAAngle: s.angle,
- SSABackColour: s.backColour,
- SSABold: s.bold,
- SSABorderStyle: s.borderStyle,
- SSAEncoding: s.encoding,
- SSAFontName: s.fontName,
- SSAFontSize: s.fontSize,
- SSAItalic: s.italic,
- SSAOutline: s.outline,
- SSAOutlineColour: s.outlineColour,
- SSAMarginLeft: s.marginLeft,
- SSAMarginRight: s.marginRight,
- SSAMarginVertical: s.marginVertical,
- SSAPrimaryColour: s.primaryColour,
- SSAScaleX: s.scaleX,
- SSAScaleY: s.scaleY,
- SSASecondaryColour: s.secondaryColour,
- SSAShadow: s.shadow,
- SSASpacing: s.spacing,
- SSAStrikeout: s.strikeout,
- SSAUnderline: s.underline,
- },
- }
- o.InlineStyle.propagateSSAAttributes()
- return
-}
-
-// ssaEvent represents an SSA event
-type ssaEvent struct {
- category string
- effect string
- end time.Duration
- layer *int
- marked *bool
- marginLeft *int // pixels
- marginRight *int // pixels
- marginVertical *int // pixels
- name string
- start time.Duration
- style string
- text string
-}
-
-// newSSAEventFromItem returns an SSA Event based on an input item
-func newSSAEventFromItem(i Item) (e *ssaEvent) {
- // Init
- e = &ssaEvent{
- category: ssaEventCategoryDialogue,
- end: i.EndAt,
- start: i.StartAt,
- }
-
- // Style
- if i.Style != nil {
- e.style = i.Style.ID
- }
-
- // Inline style
- if i.InlineStyle != nil {
- e.effect = i.InlineStyle.SSAEffect
- e.layer = i.InlineStyle.SSALayer
- e.marginLeft = i.InlineStyle.SSAMarginLeft
- e.marginRight = i.InlineStyle.SSAMarginRight
- e.marginVertical = i.InlineStyle.SSAMarginVertical
- e.marked = i.InlineStyle.SSAMarked
- }
-
- // Text
- var lines []string
- for _, l := range i.Lines {
- var items []string
- for _, item := range l.Items {
- var s string
- if item.InlineStyle != nil && len(item.InlineStyle.SSAEffect) > 0 {
- s += item.InlineStyle.SSAEffect
- }
- s += item.Text
- items = append(items, s)
- }
- if len(l.VoiceName) > 0 {
- e.name = l.VoiceName
- }
- lines = append(lines, strings.Join(items, " "))
- }
- e.text = strings.Join(lines, "\\n")
- return
-}
-
-// newSSAEventFromString returns an SSA event based on an input string and a format
-func newSSAEventFromString(header, content string, format map[int]string) (e *ssaEvent, err error) {
- // Split content
- var items = strings.Split(content, ",")
-
- // Not enough items
- if len(items) < len(format) {
- err = fmt.Errorf("astisub: content has %d items whereas style format has %d items", len(items), len(format))
- return
- }
-
- // Last item may contain commas, therefore we need to fix it
- items[len(format)-1] = strings.Join(items[len(format)-1:], ",")
- items = items[:len(format)]
-
- // Loop through items
- e = &ssaEvent{category: header}
- for idx, item := range items {
- // Index not found in format
- var attr string
- var ok bool
- if attr, ok = format[idx]; !ok {
- err = fmt.Errorf("astisub: index %d not found in event format %+v", idx, format)
- return
- }
-
- // Switch on attribute name
- switch attr {
- // Duration
- case ssaEventFormatNameStart, ssaEventFormatNameEnd:
- // Parse duration
- var d time.Duration
- if d, err = parseDurationSSA(item); err != nil {
- err = fmt.Errorf("astisub: parsing ssa duration %s failed: %w", item, err)
- return
- }
-
- // Set duration
- switch attr {
- case ssaEventFormatNameEnd:
- e.end = d
- case ssaEventFormatNameStart:
- e.start = d
- }
- // Int
- case ssaEventFormatNameLayer, ssaEventFormatNameMarginL, ssaEventFormatNameMarginR,
- ssaEventFormatNameMarginV:
- // Parse int
- var i int
- if i, err = strconv.Atoi(item); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", item, err)
- return
- }
-
- // Set int
- switch attr {
- case ssaEventFormatNameLayer:
- e.layer = astikit.IntPtr(i)
- case ssaEventFormatNameMarginL:
- e.marginLeft = astikit.IntPtr(i)
- case ssaEventFormatNameMarginR:
- e.marginRight = astikit.IntPtr(i)
- case ssaEventFormatNameMarginV:
- e.marginVertical = astikit.IntPtr(i)
- }
- // String
- case ssaEventFormatNameEffect, ssaEventFormatNameName, ssaEventFormatNameStyle, ssaEventFormatNameText:
- switch attr {
- case ssaEventFormatNameEffect:
- e.effect = item
- case ssaEventFormatNameName:
- e.name = item
- case ssaEventFormatNameStyle:
- // *Default is reserved
- // http://www.tcax.org/docs/ass-specs.htm
- if item == "*Default" {
- e.style = "Default"
- } else {
- e.style = item
- }
- case ssaEventFormatNameText:
- e.text = strings.TrimSpace(item)
- }
- // Marked
- case ssaEventFormatNameMarked:
- if item == "Marked=1" {
- e.marked = astikit.BoolPtr(true)
- } else {
- e.marked = astikit.BoolPtr(false)
- }
- }
- }
- return
-}
-
-// item converts an SSA event to an Item
-func (e *ssaEvent) item(styles map[string]*Style) (i *Item, err error) {
- // Init item
- i = &Item{
- EndAt: e.end,
- InlineStyle: &StyleAttributes{
- SSAEffect: e.effect,
- SSALayer: e.layer,
- SSAMarginLeft: e.marginLeft,
- SSAMarginRight: e.marginRight,
- SSAMarginVertical: e.marginVertical,
- SSAMarked: e.marked,
- },
- StartAt: e.start,
- }
-
- // Set style
- if len(e.style) > 0 {
- var ok bool
- if i.Style, ok = styles[e.style]; !ok {
- err = fmt.Errorf("astisub: style %s not found", e.style)
- return
- }
- }
-
- // Loop through lines
- for _, s := range strings.Split(e.text, "\\n") {
- // Init
- s = strings.TrimSpace(s)
- var l = Line{VoiceName: e.name}
-
- // Extract effects
- var matches = ssaRegexpEffect.FindAllStringIndex(s, -1)
- if len(matches) > 0 {
- // Loop through matches
- var lineItem *LineItem
- var previousEffectEndOffset int
- for _, idxs := range matches {
- if lineItem != nil {
- lineItem.Text = s[previousEffectEndOffset:idxs[0]]
- l.Items = append(l.Items, *lineItem)
- } else if idxs[0] > 0 {
- l.Items = append(l.Items, LineItem{Text: s[previousEffectEndOffset:idxs[0]]})
- }
- previousEffectEndOffset = idxs[1]
- lineItem = &LineItem{InlineStyle: &StyleAttributes{SSAEffect: s[idxs[0]:idxs[1]]}}
- }
- lineItem.Text = s[previousEffectEndOffset:]
- l.Items = append(l.Items, *lineItem)
- } else {
- l.Items = append(l.Items, LineItem{Text: s})
- }
-
- // Add line
- i.Lines = append(i.Lines, l)
- }
- return
-}
-
-// updateFormat updates the format based on the non empty fields
-func (e ssaEvent) updateFormat(formatMap map[string]bool, format []string) []string {
- if len(e.effect) > 0 {
- format = ssaUpdateFormat(ssaEventFormatNameEffect, formatMap, format)
- }
- if e.layer != nil {
- format = ssaUpdateFormat(ssaEventFormatNameLayer, formatMap, format)
- }
- if e.marginLeft != nil {
- format = ssaUpdateFormat(ssaEventFormatNameMarginL, formatMap, format)
- }
- if e.marginRight != nil {
- format = ssaUpdateFormat(ssaEventFormatNameMarginR, formatMap, format)
- }
- if e.marginVertical != nil {
- format = ssaUpdateFormat(ssaEventFormatNameMarginV, formatMap, format)
- }
- if e.marked != nil {
- format = ssaUpdateFormat(ssaEventFormatNameMarked, formatMap, format)
- }
- if len(e.name) > 0 {
- format = ssaUpdateFormat(ssaEventFormatNameName, formatMap, format)
- }
- if len(e.style) > 0 {
- format = ssaUpdateFormat(ssaEventFormatNameStyle, formatMap, format)
- }
- return format
-}
-
-// formatDurationSSA formats an .ssa duration
-func formatDurationSSA(i time.Duration) string {
- return formatDuration(i, ".", 2)
-}
-
-// string returns the block as a string
-func (e *ssaEvent) string(format []string) string {
- var ss []string
- for _, attr := range format {
- var v string
- var found = true
- switch attr {
- // Duration
- case ssaEventFormatNameEnd, ssaEventFormatNameStart:
- switch attr {
- case ssaEventFormatNameEnd:
- v = formatDurationSSA(e.end)
- case ssaEventFormatNameStart:
- v = formatDurationSSA(e.start)
- }
- // Marked
- case ssaEventFormatNameMarked:
- if e.marked != nil {
- if *e.marked {
- v = "Marked=1"
- } else {
- v = "Marked=0"
- }
- }
- // Int
- case ssaEventFormatNameLayer, ssaEventFormatNameMarginL, ssaEventFormatNameMarginR,
- ssaEventFormatNameMarginV:
- var i *int
- switch attr {
- case ssaEventFormatNameLayer:
- i = e.layer
- case ssaEventFormatNameMarginL:
- i = e.marginLeft
- case ssaEventFormatNameMarginR:
- i = e.marginRight
- case ssaEventFormatNameMarginV:
- i = e.marginVertical
- }
- if i != nil {
- v = strconv.Itoa(*i)
- }
- // String
- case ssaEventFormatNameEffect, ssaEventFormatNameName, ssaEventFormatNameStyle, ssaEventFormatNameText:
- switch attr {
- case ssaEventFormatNameEffect:
- v = e.effect
- case ssaEventFormatNameName:
- v = e.name
- case ssaEventFormatNameStyle:
- v = e.style
- case ssaEventFormatNameText:
- v = e.text
- }
- default:
- found = false
- }
- if found {
- ss = append(ss, v)
- }
- }
- return strings.Join(ss, ",")
-}
-
-// parseDurationSSA parses an .ssa duration
-func parseDurationSSA(i string) (time.Duration, error) {
- return parseDuration(i, ".", 3)
-}
-
-// WriteToSSA writes subtitles in .ssa format
-func (s Subtitles) WriteToSSA(o io.Writer) (err error) {
- // Do not write anything if no subtitles
- if len(s.Items) == 0 {
- err = ErrNoSubtitlesToWrite
- return
- }
-
- // Write Script Info block
- var si = newSSAScriptInfo(s.Metadata)
- if _, err = o.Write(si.bytes()); err != nil {
- err = fmt.Errorf("astisub: writing script info block failed: %w", err)
- return
- }
-
- // Write Styles block
- if len(s.Styles) > 0 {
- // Header
- var b = []byte("\n[V4 Styles]\n")
-
- // Format
- var formatMap = make(map[string]bool)
- var format = []string{ssaStyleFormatNameName}
- var styles = make(map[string]*ssaStyle)
- var styleNames []string
- for _, s := range s.Styles {
- var ss = newSSAStyleFromStyle(*s)
- format = ss.updateFormat(formatMap, format)
- styles[ss.name] = ss
- styleNames = append(styleNames, ss.name)
- }
- b = append(b, []byte("Format: "+strings.Join(format, ", ")+"\n")...)
-
- // Styles
- sort.Strings(styleNames)
- for _, n := range styleNames {
- b = append(b, []byte("Style: "+styles[n].string(format)+"\n")...)
- }
-
- // Write
- if _, err = o.Write(b); err != nil {
- err = fmt.Errorf("astisub: writing styles block failed: %w", err)
- return
- }
- }
-
- // Write Events block
- if len(s.Items) > 0 {
- // Header
- var b = []byte("\n[Events]\n")
-
- // Format
- var formatMap = make(map[string]bool)
- var format = []string{
- ssaEventFormatNameStart,
- ssaEventFormatNameEnd,
- }
- var events []*ssaEvent
- for _, i := range s.Items {
- var e = newSSAEventFromItem(*i)
- format = e.updateFormat(formatMap, format)
- events = append(events, e)
- }
- format = append(format, ssaEventFormatNameText)
- b = append(b, []byte("Format: "+strings.Join(format, ", ")+"\n")...)
-
- // Styles
- for _, e := range events {
- b = append(b, []byte(ssaEventCategoryDialogue+": "+e.string(format)+"\n")...)
- }
-
- // Write
- if _, err = o.Write(b); err != nil {
- err = fmt.Errorf("astisub: writing events block failed: %w", err)
- return
- }
- }
- return
-}
-
-// SSAOptions
-type SSAOptions struct {
- OnUnknownSectionName func(name string)
- OnInvalidLine func(line string)
-}
-
-func defaultSSAOptions() SSAOptions {
- return SSAOptions{
- OnUnknownSectionName: func(name string) {
- log.Printf("astisub: unknown section: %s", name)
- },
- OnInvalidLine: func(line string) {
- log.Printf("astisub: not understood: '%s', ignoring", line)
- },
- }
-}
diff --git a/vendor/github.com/asticode/go-astisub/stl.go b/vendor/github.com/asticode/go-astisub/stl.go
deleted file mode 100644
index 81a5d593823..00000000000
--- a/vendor/github.com/asticode/go-astisub/stl.go
+++ /dev/null
@@ -1,1085 +0,0 @@
-package astisub
-
-import (
- "bytes"
- "encoding/binary"
- "errors"
- "fmt"
- "io"
- "math"
- "strconv"
- "strings"
- "time"
-
- "github.com/asticode/go-astikit"
- "golang.org/x/text/unicode/norm"
-)
-
-// https://tech.ebu.ch/docs/tech/tech3264.pdf
-// https://github.com/yanncoupin/stl2srt/blob/master/to_srt.py
-
-// STL block sizes
-const (
- stlBlockSizeGSI = 1024
- stlBlockSizeTTI = 128
-)
-
-// STL character code table number
-const (
- stlCharacterCodeTableNumberLatin uint16 = 12336
- stlCharacterCodeTableNumberLatinCyrillic uint16 = 12337
- stlCharacterCodeTableNumberLatinArabic uint16 = 12338
- stlCharacterCodeTableNumberLatinGreek uint16 = 12339
- stlCharacterCodeTableNumberLatinHebrew uint16 = 12340
-)
-
-// STL character code tables
-// TODO Add missing tables
-var (
- stlCharacterCodeTables = map[uint16]*astikit.BiMap{
- stlCharacterCodeTableNumberLatin: astikit.NewBiMap().
- Set(0x20, " ").Set(0x21, "!").Set(0x22, "\"").Set(0x23, "#").
- Set(0x24, "¤").Set(0x25, "%").Set(0x26, "&").Set(0x27, "'").
- Set(0x28, "(").Set(0x29, ")").Set(0x2a, "*").Set(0x2b, "+").
- Set(0x2c, ",").Set(0x2d, "-").Set(0x2e, ".").Set(0x2f, "/").
- Set(0x30, "0").Set(0x31, "1").Set(0x32, "2").Set(0x33, "3").
- Set(0x34, "4").Set(0x35, "5").Set(0x36, "6").Set(0x37, "7").
- Set(0x38, "8").Set(0x39, "9").Set(0x3a, ":").Set(0x3b, ";").
- Set(0x3c, "<").Set(0x3d, "=").Set(0x3e, ">").Set(0x3f, "?").
- Set(0x40, "@").Set(0x41, "A").Set(0x42, "B").Set(0x43, "C").
- Set(0x44, "D").Set(0x45, "E").Set(0x46, "F").Set(0x47, "G").
- Set(0x48, "H").Set(0x49, "I").Set(0x4a, "J").Set(0x4b, "K").
- Set(0x4c, "L").Set(0x4d, "M").Set(0x4e, "N").Set(0x4f, "O").
- Set(0x50, "P").Set(0x51, "Q").Set(0x52, "R").Set(0x53, "S").
- Set(0x54, "T").Set(0x55, "U").Set(0x56, "V").Set(0x57, "W").
- Set(0x58, "X").Set(0x59, "Y").Set(0x5a, "Z").Set(0x5b, "[").
- Set(0x5c, "\\").Set(0x5d, "]").Set(0x5e, "^").Set(0x5f, "_").
- Set(0x60, "`").Set(0x61, "a").Set(0x62, "b").Set(0x63, "c").
- Set(0x64, "d").Set(0x65, "e").Set(0x66, "f").Set(0x67, "g").
- Set(0x68, "h").Set(0x69, "i").Set(0x6a, "j").Set(0x6b, "k").
- Set(0x6c, "l").Set(0x6d, "m").Set(0x6e, "n").Set(0x6f, "o").
- Set(0x70, "p").Set(0x71, "q").Set(0x72, "r").Set(0x73, "s").
- Set(0x74, "t").Set(0x75, "u").Set(0x76, "v").Set(0x77, "w").
- Set(0x78, "x").Set(0x79, "y").Set(0x7a, "z").Set(0x7b, "{").
- Set(0x7c, "|").Set(0x7d, "}").Set(0x7e, "~").
- Set(0xa0, string([]byte{0xC2, 0xA0})).Set(0xa1, "¡").Set(0xa2, "¢").
- Set(0xa3, "£").Set(0xa4, "$").Set(0xa5, "¥").Set(0xa7, "§").
- Set(0xa9, "‘").Set(0xaa, "“").Set(0xab, "«").Set(0xac, "←").
- Set(0xad, "↑").Set(0xae, "→").Set(0xaf, "↓").
- Set(0xb0, "°").Set(0xb1, "±").Set(0xb2, "²").Set(0xb3, "³").
- Set(0xb4, "×").Set(0xb5, "µ").Set(0xb6, "¶").Set(0xb7, "·").
- Set(0xb8, "÷").Set(0xb9, "’").Set(0xba, "”").Set(0xbb, "»").
- Set(0xbc, "¼").Set(0xbd, "½").Set(0xbe, "¾").Set(0xbf, "¿").
- Set(0xc1, string([]byte{0xCC, 0x80})).Set(0xc2, string([]byte{0xCC, 0x81})).
- Set(0xc3, string([]byte{0xCC, 0x82})).Set(0xc4, string([]byte{0xCC, 0x83})).
- Set(0xc5, string([]byte{0xCC, 0x84})).Set(0xc6, string([]byte{0xCC, 0x86})).
- Set(0xc7, string([]byte{0xCC, 0x87})).Set(0xc8, string([]byte{0xCC, 0x88})).
- Set(0xca, string([]byte{0xCC, 0x8A})).Set(0xcb, string([]byte{0xCC, 0xA7})).
- Set(0xcd, string([]byte{0xCC, 0x8B})).Set(0xce, string([]byte{0xCC, 0xA8})).
- Set(0xcf, string([]byte{0xCC, 0x8C})).
- Set(0xd0, "―").Set(0xd1, "¹").Set(0xd2, "®").Set(0xd3, "©").
- Set(0xd4, "™").Set(0xd5, "♪").Set(0xd6, "¬").Set(0xd7, "¦").
- Set(0xdc, "⅛").Set(0xdd, "⅜").Set(0xde, "⅝").Set(0xdf, "⅞").
- Set(0xe0, "Ω").Set(0xe1, "Æ").Set(0xe2, "Đ").Set(0xe3, "ª").
- Set(0xe4, "Ħ").Set(0xe6, "IJ").Set(0xe7, "Ŀ").Set(0xe8, "Ł").
- Set(0xe9, "Ø").Set(0xea, "Œ").Set(0xeb, "º").Set(0xec, "Þ").
- Set(0xed, "Ŧ").Set(0xee, "Ŋ").Set(0xef, "ʼn").
- Set(0xf0, "ĸ").Set(0xf1, "æ").Set(0xf2, "đ").Set(0xf3, "ð").
- Set(0xf4, "ħ").Set(0xf5, "ı").Set(0xf6, "ij").Set(0xf7, "ŀ").
- Set(0xf8, "ł").Set(0xf9, "ø").Set(0xfa, "œ").Set(0xfb, "ß").
- Set(0xfc, "þ").Set(0xfd, "ŧ").Set(0xfe, "ŋ").Set(0xff, string([]byte{0xC2, 0xAD})),
- }
-)
-
-// STL code page numbers
-const (
- stlCodePageNumberCanadaFrench uint32 = 3683891
- stlCodePageNumberMultilingual uint32 = 3683632
- stlCodePageNumberNordic uint32 = 3683893
- stlCodePageNumberPortugal uint32 = 3683888
- stlCodePageNumberUnitedStates uint32 = 3420983
-)
-
-// STL comment flag
-const (
- stlCommentFlagTextContainsSubtitleData = '\x00'
- stlCommentFlagTextContainsCommentsNotIntendedForTransmission = '\x01'
-)
-
-// STL country codes
-const (
- stlCountryCodeChinese = "CHN"
- stlCountryCodeFrance = "FRA"
- stlCountryCodeJapan = "JPN"
- stlCountryCodeNorway = "NOR"
-)
-
-// STL cumulative status
-const (
- stlCumulativeStatusFirstSubtitleOfACumulativeSet = '\x01'
- stlCumulativeStatusIntermediateSubtitleOfACumulativeSet = '\x02'
- stlCumulativeStatusLastSubtitleOfACumulativeSet = '\x03'
- stlCumulativeStatusSubtitleNotPartOfACumulativeSet = '\x00'
-)
-
-// STL display standard code
-const (
- stlDisplayStandardCodeOpenSubtitling = "0"
- stlDisplayStandardCodeLevel1Teletext = "1"
- stlDisplayStandardCodeLevel2Teletext = "2"
-)
-
-// STL framerate mapping
-var stlFramerateMapping = astikit.NewBiMap().
- Set("STL25.01", 25).
- Set("STL30.01", 30)
-
-// STL justification code
-const (
- stlJustificationCodeCentredText = '\x02'
- stlJustificationCodeLeftJustifiedText = '\x01'
- stlJustificationCodeRightJustifiedText = '\x03'
- stlJustificationCodeUnchangedPresentation = '\x00'
-)
-
-// STL language codes
-const (
- stlLanguageCodeChinese = "75"
- stlLanguageCodeEnglish = "09"
- stlLanguageCodeFrench = "0F"
- stllanguageCodeJapanese = "69"
- stlLanguageCodeNorwegian = "1E"
-)
-
-// STL language mapping
-var stlLanguageMapping = astikit.NewBiMap().
- Set(stlLanguageCodeChinese, LanguageChinese).
- Set(stlLanguageCodeEnglish, LanguageEnglish).
- Set(stlLanguageCodeFrench, LanguageFrench).
- Set(stllanguageCodeJapanese, LanguageJapanese).
- Set(stlLanguageCodeNorwegian, LanguageNorwegian)
-
- // STL timecode status
-const (
- stlTimecodeStatusNotIntendedForUse = "0"
- stlTimecodeStatusIntendedForUse = "1"
-)
-
-// TTI Special Extension Block Number
-const extensionBlockNumberReservedUserData = 0xfe
-
-const stlLineSeparator = 0x8a
-
-type STLPosition struct {
- VerticalPosition int
- MaxRows int
- Rows int
-}
-
-// STLOptions represents STL parsing options
-type STLOptions struct {
- // IgnoreTimecodeStartOfProgramme - set STLTimecodeStartOfProgramme to zero before parsing
- IgnoreTimecodeStartOfProgramme bool
-}
-
-// ReadFromSTL parses an .stl content
-func ReadFromSTL(i io.Reader, opts STLOptions) (o *Subtitles, err error) {
- // Init
- o = NewSubtitles()
-
- // Read GSI block
- var b []byte
- if b, err = readNBytes(i, stlBlockSizeGSI); err != nil {
- return
- }
-
- // Parse GSI block
- var g *gsiBlock
- if g, err = parseGSIBlock(b); err != nil {
- err = fmt.Errorf("astisub: building gsi block failed: %w", err)
- return
- }
-
- // Create character handler
- var ch *stlCharacterHandler
- if ch, err = newSTLCharacterHandler(g.characterCodeTableNumber); err != nil {
- err = fmt.Errorf("astisub: creating stl character handler failed: %w", err)
- return
- }
-
- // Update metadata
- // TODO Add more STL fields to metadata
- o.Metadata = &Metadata{
- Framerate: g.framerate,
- STLCountryOfOrigin: g.countryOfOrigin,
- STLCreationDate: &g.creationDate,
- STLDisplayStandardCode: g.displayStandardCode,
- STLMaximumNumberOfDisplayableCharactersInAnyTextRow: astikit.IntPtr(g.maximumNumberOfDisplayableCharactersInAnyTextRow),
- STLMaximumNumberOfDisplayableRows: astikit.IntPtr(g.maximumNumberOfDisplayableRows),
- STLPublisher: g.publisher,
- STLRevisionDate: &g.revisionDate,
- STLSubtitleListReferenceCode: g.subtitleListReferenceCode,
- Title: g.originalProgramTitle,
- }
- if !opts.IgnoreTimecodeStartOfProgramme {
- o.Metadata.STLTimecodeStartOfProgramme = g.timecodeStartOfProgramme
- }
- if v, ok := stlLanguageMapping.Get(g.languageCode); ok {
- o.Metadata.Language = v.(string)
- }
-
- // Parse Text and Timing Information (TTI) blocks.
- for {
- // Read TTI block
- if b, err = readNBytes(i, stlBlockSizeTTI); err != nil {
- if err == io.EOF {
- err = nil
- break
- }
- return
- }
-
- // Parse TTI block
- var t = parseTTIBlock(b, g.framerate)
-
- // Do not process reserved user data
- if t.extensionBlockNumber == extensionBlockNumberReservedUserData {
- continue
- }
-
- justification := parseSTLJustificationCode(t.justificationCode)
- rows := bytes.Split(t.text, []byte{stlLineSeparator})
-
- position := STLPosition{
- MaxRows: g.maximumNumberOfDisplayableRows,
- Rows: len(rows),
- VerticalPosition: t.verticalPosition,
- }
-
- styleAttributes := StyleAttributes{
- STLJustification: &justification,
- STLPosition: &position,
- }
- styleAttributes.propagateSTLAttributes()
-
- // Create item
- var i = &Item{
- EndAt: t.timecodeOut - o.Metadata.STLTimecodeStartOfProgramme,
- InlineStyle: &styleAttributes,
- StartAt: t.timecodeIn - o.Metadata.STLTimecodeStartOfProgramme,
- }
-
- // Loop through rows
- for _, text := range bytes.Split(t.text, []byte{stlLineSeparator}) {
- if g.displayStandardCode == stlDisplayStandardCodeOpenSubtitling {
- err = parseOpenSubtitleRow(i, ch, func() styler { return newSTLStyler() }, text)
- if err != nil {
- return nil, err
- }
- } else {
- parseTeletextRow(i, ch, func() styler { return newSTLStyler() }, text)
- }
- }
-
- // Append item
- o.Items = append(o.Items, i)
-
- }
- return
-}
-
-// readNBytes reads n bytes
-func readNBytes(i io.Reader, c int) (o []byte, err error) {
- o = make([]byte, c)
- var n int
- if n, err = i.Read(o); err != nil || n != len(o) {
- if err != nil {
- if err == io.EOF {
- return
- }
- err = fmt.Errorf("astisub: reading %d bytes failed: %w", c, err)
- return
- }
- err = fmt.Errorf("astisub: read %d bytes, should have read %d", n, c)
- return
- }
- return
-}
-
-// gsiBlock represents a GSI block
-type gsiBlock struct {
- characterCodeTableNumber uint16
- codePageNumber uint32
- countryOfOrigin string
- creationDate time.Time
- diskSequenceNumber int
- displayStandardCode string
- editorContactDetails string
- editorName string
- framerate int
- languageCode string
- maximumNumberOfDisplayableCharactersInAnyTextRow int
- maximumNumberOfDisplayableRows int
- originalEpisodeTitle string
- originalProgramTitle string
- publisher string
- revisionDate time.Time
- revisionNumber int
- subtitleListReferenceCode string
- timecodeFirstInCue time.Duration
- timecodeStartOfProgramme time.Duration
- timecodeStatus string
- totalNumberOfDisks int
- totalNumberOfSubtitleGroups int
- totalNumberOfSubtitles int
- totalNumberOfTTIBlocks int
- translatedEpisodeTitle string
- translatedProgramTitle string
- translatorContactDetails string
- translatorName string
- userDefinedArea string
-}
-
-// newGSIBlock builds the subtitles GSI block
-func newGSIBlock(s Subtitles) (g *gsiBlock) {
- // Init
- g = &gsiBlock{
- characterCodeTableNumber: stlCharacterCodeTableNumberLatin,
- codePageNumber: stlCodePageNumberMultilingual,
- countryOfOrigin: stlCountryCodeFrance,
- creationDate: Now(),
- diskSequenceNumber: 1,
- displayStandardCode: stlDisplayStandardCodeLevel1Teletext,
- framerate: 25,
- languageCode: stlLanguageCodeFrench,
- maximumNumberOfDisplayableCharactersInAnyTextRow: 40,
- maximumNumberOfDisplayableRows: 23,
- revisionDate: Now(),
- subtitleListReferenceCode: "",
- timecodeStatus: stlTimecodeStatusIntendedForUse,
- timecodeStartOfProgramme: 0,
- totalNumberOfDisks: 1,
- totalNumberOfSubtitleGroups: 1,
- totalNumberOfSubtitles: len(s.Items),
- totalNumberOfTTIBlocks: len(s.Items),
- }
-
- // Add metadata
- if s.Metadata != nil {
- if s.Metadata.STLCreationDate != nil {
- g.creationDate = *s.Metadata.STLCreationDate
- }
- g.countryOfOrigin = s.Metadata.STLCountryOfOrigin
- g.displayStandardCode = s.Metadata.STLDisplayStandardCode
- g.framerate = s.Metadata.Framerate
- if v, ok := stlLanguageMapping.GetInverse(s.Metadata.Language); ok {
- g.languageCode = v.(string)
- }
- g.originalProgramTitle = s.Metadata.Title
- if s.Metadata.STLMaximumNumberOfDisplayableCharactersInAnyTextRow != nil {
- g.maximumNumberOfDisplayableCharactersInAnyTextRow = *s.Metadata.STLMaximumNumberOfDisplayableCharactersInAnyTextRow
- }
- if s.Metadata.STLMaximumNumberOfDisplayableRows != nil {
- g.maximumNumberOfDisplayableRows = *s.Metadata.STLMaximumNumberOfDisplayableRows
- }
- g.publisher = s.Metadata.STLPublisher
- if s.Metadata.STLRevisionDate != nil {
- g.revisionDate = *s.Metadata.STLRevisionDate
- }
- g.subtitleListReferenceCode = s.Metadata.STLSubtitleListReferenceCode
- g.timecodeStartOfProgramme = s.Metadata.STLTimecodeStartOfProgramme
- }
-
- // Timecode first in cue
- if len(s.Items) > 0 {
- g.timecodeFirstInCue = s.Items[0].StartAt
- }
- return
-}
-
-// parseGSIBlock parses a GSI block
-func parseGSIBlock(b []byte) (g *gsiBlock, err error) {
- // Init
- g = &gsiBlock{
- characterCodeTableNumber: binary.BigEndian.Uint16(b[12:14]),
- countryOfOrigin: string(bytes.TrimSpace(b[274:277])),
- codePageNumber: binary.BigEndian.Uint32(append([]byte{0x0}, b[0:3]...)),
- displayStandardCode: string(bytes.TrimSpace([]byte{b[11]})),
- editorName: string(bytes.TrimSpace(b[309:341])),
- editorContactDetails: string(bytes.TrimSpace(b[341:373])),
- languageCode: string(bytes.TrimSpace(b[14:16])),
- originalEpisodeTitle: string(bytes.TrimSpace(b[48:80])),
- originalProgramTitle: string(bytes.TrimSpace(b[16:48])),
- publisher: string(bytes.TrimSpace(b[277:309])),
- subtitleListReferenceCode: string(bytes.TrimSpace(b[208:224])),
- timecodeStatus: string(bytes.TrimSpace([]byte{b[255]})),
- translatedEpisodeTitle: string(bytes.TrimSpace(b[80:112])),
- translatedProgramTitle: string(bytes.TrimSpace(b[112:144])),
- translatorContactDetails: string(bytes.TrimSpace(b[176:208])),
- translatorName: string(bytes.TrimSpace(b[144:176])),
- userDefinedArea: string(bytes.TrimSpace(b[448:])),
- }
-
- // Framerate
- if v, ok := stlFramerateMapping.Get(string(b[3:11])); ok {
- g.framerate = v.(int)
- }
-
- // Creation date
- if v := strings.TrimSpace(string(b[224:230])); len(v) > 0 {
- if g.creationDate, err = time.Parse("060102", v); err != nil {
- err = fmt.Errorf("astisub: parsing date %s failed: %w", v, err)
- return
- }
- }
-
- // Revision date
- if v := strings.TrimSpace(string(b[230:236])); len(v) > 0 {
- if g.revisionDate, err = time.Parse("060102", v); err != nil {
- err = fmt.Errorf("astisub: parsing date %s failed: %w", v, err)
- return
- }
- }
-
- // Revision number
- if v := strings.TrimSpace(string(b[236:238])); len(v) > 0 {
- if g.revisionNumber, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Total number of TTI blocks
- if v := strings.TrimSpace(string(b[238:243])); len(v) > 0 {
- if g.totalNumberOfTTIBlocks, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Total number of subtitles
- if v := strings.TrimSpace(string(b[243:248])); len(v) > 0 {
- if g.totalNumberOfSubtitles, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Total number of subtitle groups
- if v := strings.TrimSpace(string(b[248:251])); len(v) > 0 {
- if g.totalNumberOfSubtitleGroups, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Maximum number of displayable characters in any text row
- if v := strings.TrimSpace(string(b[251:253])); len(v) > 0 {
- if g.maximumNumberOfDisplayableCharactersInAnyTextRow, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Maximum number of displayable rows
- if v := strings.TrimSpace(string(b[253:255])); len(v) > 0 {
- if g.maximumNumberOfDisplayableRows, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Timecode start of programme
- if v := strings.TrimSpace(string(b[256:264])); len(v) > 0 {
- if g.timecodeStartOfProgramme, err = parseDurationSTL(v, g.framerate); err != nil {
- err = fmt.Errorf("astisub: parsing of stl duration %s failed: %w", v, err)
- return
- }
- }
-
- // Timecode first in cue
- if v := strings.TrimSpace(string(b[264:272])); len(v) > 0 {
- if g.timecodeFirstInCue, err = parseDurationSTL(v, g.framerate); err != nil {
- err = fmt.Errorf("astisub: parsing of stl duration %s failed: %w", v, err)
- return
- }
- }
-
- // Total number of disks
- if v := strings.TrimSpace(string(b[272])); len(v) > 0 {
- if g.totalNumberOfDisks, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
-
- // Disk sequence number
- if v := strings.TrimSpace(string(b[273])); len(v) > 0 {
- if g.diskSequenceNumber, err = strconv.Atoi(v); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", v, err)
- return
- }
- }
- return
-}
-
-// bytes transforms the GSI block into []byte
-func (b gsiBlock) bytes() (o []byte) {
- bs := make([]byte, 4)
- binary.BigEndian.PutUint32(bs, b.codePageNumber)
- o = append(o, astikit.BytesPad(bs[1:], ' ', 3, astikit.PadRight, astikit.PadCut)...) // Code page number
- // Disk format code
- var f string
- if v, ok := stlFramerateMapping.GetInverse(b.framerate); ok {
- f = v.(string)
- }
- o = append(o, astikit.BytesPad([]byte(f), ' ', 8, astikit.PadRight, astikit.PadCut)...)
- o = append(o, astikit.BytesPad([]byte(b.displayStandardCode), ' ', 1, astikit.PadRight, astikit.PadCut)...) // Display standard code
- binary.BigEndian.PutUint16(bs, b.characterCodeTableNumber)
- o = append(o, astikit.BytesPad(bs[:2], ' ', 2, astikit.PadRight, astikit.PadCut)...) // Character code table number
- o = append(o, astikit.BytesPad([]byte(b.languageCode), ' ', 2, astikit.PadRight, astikit.PadCut)...) // Language code
- o = append(o, astikit.BytesPad([]byte(b.originalProgramTitle), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Original program title
- o = append(o, astikit.BytesPad([]byte(b.originalEpisodeTitle), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Original episode title
- o = append(o, astikit.BytesPad([]byte(b.translatedProgramTitle), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Translated program title
- o = append(o, astikit.BytesPad([]byte(b.translatedEpisodeTitle), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Translated episode title
- o = append(o, astikit.BytesPad([]byte(b.translatorName), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Translator's name
- o = append(o, astikit.BytesPad([]byte(b.translatorContactDetails), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Translator's contact details
- o = append(o, astikit.BytesPad([]byte(b.subtitleListReferenceCode), ' ', 16, astikit.PadRight, astikit.PadCut)...) // Subtitle list reference code
- o = append(o, astikit.BytesPad([]byte(b.creationDate.Format("060102")), ' ', 6, astikit.PadRight, astikit.PadCut)...) // Creation date
- o = append(o, astikit.BytesPad([]byte(b.revisionDate.Format("060102")), ' ', 6, astikit.PadRight, astikit.PadCut)...) // Revision date
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.revisionNumber)), '0', 2, astikit.PadCut)...) // Revision number
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.totalNumberOfTTIBlocks)), '0', 5, astikit.PadCut)...) // Total number of TTI blocks
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.totalNumberOfSubtitles)), '0', 5, astikit.PadCut)...) // Total number of subtitles
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.totalNumberOfSubtitleGroups)), '0', 3, astikit.PadCut)...) // Total number of subtitle groups
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.maximumNumberOfDisplayableCharactersInAnyTextRow)), '0', 2, astikit.PadCut)...) // Maximum number of displayable characters in any text row
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.maximumNumberOfDisplayableRows)), '0', 2, astikit.PadCut)...) // Maximum number of displayable rows
- o = append(o, astikit.BytesPad([]byte(b.timecodeStatus), ' ', 1, astikit.PadRight, astikit.PadCut)...) // Timecode status
- o = append(o, astikit.BytesPad([]byte(formatDurationSTL(b.timecodeStartOfProgramme, b.framerate)), ' ', 8, astikit.PadRight, astikit.PadCut)...) // Timecode start of a programme
- o = append(o, astikit.BytesPad([]byte(formatDurationSTL(b.timecodeFirstInCue, b.framerate)), ' ', 8, astikit.PadRight, astikit.PadCut)...) // Timecode first in cue
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.totalNumberOfDisks)), ' ', 1, astikit.PadRight, astikit.PadCut)...) // Total number of disks
- o = append(o, astikit.BytesPad([]byte(strconv.Itoa(b.diskSequenceNumber)), ' ', 1, astikit.PadRight, astikit.PadCut)...) // Disk sequence number
- o = append(o, astikit.BytesPad([]byte(b.countryOfOrigin), ' ', 3, astikit.PadRight, astikit.PadCut)...) // Country of origin
- o = append(o, astikit.BytesPad([]byte(b.publisher), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Publisher
- o = append(o, astikit.BytesPad([]byte(b.editorName), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Editor's name
- o = append(o, astikit.BytesPad([]byte(b.editorContactDetails), ' ', 32, astikit.PadRight, astikit.PadCut)...) // Editor's contact details
- o = append(o, astikit.BytesPad([]byte{}, ' ', 75+576, astikit.PadRight, astikit.PadCut)...) // Spare bytes + user defined area // // Editor's contact details
- return
-}
-
-// parseDurationSTL parses a STL duration
-func parseDurationSTL(i string, framerate int) (d time.Duration, err error) {
- // Parse hours
- var hours, hoursString = 0, i[0:2]
- if hours, err = strconv.Atoi(hoursString); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", hoursString, err)
- return
- }
-
- // Parse minutes
- var minutes, minutesString = 0, i[2:4]
- if minutes, err = strconv.Atoi(minutesString); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", minutesString, err)
- return
- }
-
- // Parse seconds
- var seconds, secondsString = 0, i[4:6]
- if seconds, err = strconv.Atoi(secondsString); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", secondsString, err)
- return
- }
-
- // Parse frames
- var frames, framesString = 0, i[6:8]
- if frames, err = strconv.Atoi(framesString); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", framesString, err)
- return
- }
-
- // Set duration
- d = time.Duration(hours)*time.Hour + time.Duration(minutes)*time.Minute + time.Duration(seconds)*time.Second + time.Duration(1e9*frames/framerate)*time.Nanosecond
- return
-}
-
-// formatDurationSTL formats a STL duration
-func formatDurationSTL(d time.Duration, framerate int) (o string) {
- // Add hours
- if d.Hours() < 10 {
- o += "0"
- }
- var delta = int(math.Floor(d.Hours()))
- o += strconv.Itoa(delta)
- d -= time.Duration(delta) * time.Hour
-
- // Add minutes
- if d.Minutes() < 10 {
- o += "0"
- }
- delta = int(math.Floor(d.Minutes()))
- o += strconv.Itoa(delta)
- d -= time.Duration(delta) * time.Minute
-
- // Add seconds
- if d.Seconds() < 10 {
- o += "0"
- }
- delta = int(math.Floor(d.Seconds()))
- o += strconv.Itoa(delta)
- d -= time.Duration(delta) * time.Second
-
- // Add frames
- var frames = int(int(d.Nanoseconds()) * framerate / 1e9)
- if frames < 10 {
- o += "0"
- }
- o += strconv.Itoa(frames)
- return
-}
-
-// ttiBlock represents a TTI block
-type ttiBlock struct {
- commentFlag byte
- cumulativeStatus byte
- extensionBlockNumber int
- justificationCode byte
- subtitleGroupNumber int
- subtitleNumber int
- text []byte
- timecodeIn time.Duration
- timecodeOut time.Duration
- verticalPosition int
-}
-
-// newTTIBlock builds an item TTI block
-func newTTIBlock(i *Item, idx int) (t *ttiBlock) {
- // Init
- t = &ttiBlock{
- commentFlag: stlCommentFlagTextContainsSubtitleData,
- cumulativeStatus: stlCumulativeStatusSubtitleNotPartOfACumulativeSet,
- extensionBlockNumber: 255,
- justificationCode: stlJustificationCodeLeftJustifiedText,
- subtitleGroupNumber: 0,
- subtitleNumber: idx,
- timecodeIn: i.StartAt,
- timecodeOut: i.EndAt,
- verticalPosition: stlVerticalPositionFromStyle(i.InlineStyle),
- }
-
- // Add text
- var lines []string
- for _, l := range i.Lines {
- var lineItems []string
- for _, li := range l.Items {
- lineItems = append(lineItems, li.STLString())
- }
- lines = append(lines, strings.Join(lineItems, " "))
- }
- t.text = []byte(strings.Join(lines, string(rune(stlLineSeparator))))
- return
-}
-
-func stlVerticalPositionFromStyle(sa *StyleAttributes) int {
- if sa != nil && sa.STLPosition != nil {
- return sa.STLPosition.VerticalPosition
- } else {
- return 20
- }
-}
-
-func (li LineItem) STLString() string {
- rs := li.Text
- if li.InlineStyle != nil {
- if li.InlineStyle.STLItalics != nil && *li.InlineStyle.STLItalics {
- rs = string(rune(0x80)) + rs + string(rune(0x81))
- }
- if li.InlineStyle.STLUnderline != nil && *li.InlineStyle.STLUnderline {
- rs = string(rune(0x82)) + rs + string(rune(0x83))
- }
- if li.InlineStyle.STLBoxing != nil && *li.InlineStyle.STLBoxing {
- rs = string(rune(0x84)) + rs + string(rune(0x85))
- }
- }
- return rs
-}
-
-// parseTTIBlock parses a TTI block
-func parseTTIBlock(p []byte, framerate int) *ttiBlock {
- return &ttiBlock{
- commentFlag: p[15],
- cumulativeStatus: p[4],
- extensionBlockNumber: int(uint8(p[3])),
- justificationCode: p[14],
- subtitleGroupNumber: int(uint8(p[0])),
- subtitleNumber: int(binary.LittleEndian.Uint16(p[1:3])),
- text: p[16:128],
- timecodeIn: parseDurationSTLBytes(p[5:9], framerate),
- timecodeOut: parseDurationSTLBytes(p[9:13], framerate),
- verticalPosition: int(uint8(p[13])),
- }
-}
-
-// bytes transforms the TTI block into []byte
-func (t *ttiBlock) bytes(g *gsiBlock) (o []byte) {
- o = append(o, byte(uint8(t.subtitleGroupNumber))) // Subtitle group number
- var b = make([]byte, 2)
- binary.LittleEndian.PutUint16(b, uint16(t.subtitleNumber))
- o = append(o, b...) // Subtitle number
- o = append(o, byte(uint8(t.extensionBlockNumber))) // Extension block number
- o = append(o, t.cumulativeStatus) // Cumulative status
- o = append(o, formatDurationSTLBytes(t.timecodeIn, g.framerate)...) // Timecode in
- o = append(o, formatDurationSTLBytes(t.timecodeOut, g.framerate)...) // Timecode out
- o = append(o, validateVerticalPosition(t.verticalPosition, g.displayStandardCode)) // Vertical position
- o = append(o, t.justificationCode) // Justification code
- o = append(o, t.commentFlag) // Comment flag
- o = append(o, astikit.BytesPad(encodeTextSTL(string(t.text)), '\x8f', 112, astikit.PadRight, astikit.PadCut)...) // Text field
- return
-}
-
-// According to EBU 3264 (https://tech.ebu.ch/docs/tech/tech3264.pdf):
-// page 12:
-// for teletext subtitles, VP contains a value in the range 1-23 decimal (01h-17h)
-// corresponding to theteletext row number of the first subtitle row.
-// page 6:
-// Teletext ("closed") subtitles are indicated via the Display Standard Code
-// in the GSI block.
-func validateVerticalPosition(vp int, dsc string) byte {
- closed := false
- switch dsc {
- case stlDisplayStandardCodeLevel1Teletext, stlDisplayStandardCodeLevel2Teletext:
- closed = true
- }
- if vp < 1 && closed {
- vp = 1
- }
- if vp > 23 && closed {
- vp = 23
- }
- return byte(uint8(vp))
-}
-
-// formatDurationSTLBytes formats a STL duration in bytes
-func formatDurationSTLBytes(d time.Duration, framerate int) (o []byte) {
- // Add hours
- var hours = int(math.Floor(d.Hours()))
- o = append(o, byte(uint8(hours)))
- d -= time.Duration(hours) * time.Hour
-
- // Add minutes
- var minutes = int(math.Floor(d.Minutes()))
- o = append(o, byte(uint8(minutes)))
- d -= time.Duration(minutes) * time.Minute
-
- // Add seconds
- var seconds = int(math.Floor(d.Seconds()))
- o = append(o, byte(uint8(seconds)))
- d -= time.Duration(seconds) * time.Second
-
- // Add frames
- var frames = int(int(d.Nanoseconds()) * framerate / 1e9)
- o = append(o, byte(uint8(frames)))
- return
-}
-
-// parseDurationSTLBytes parses a STL duration in bytes
-func parseDurationSTLBytes(b []byte, framerate int) time.Duration {
- return time.Duration(uint8(b[0]))*time.Hour + time.Duration(uint8(b[1]))*time.Minute + time.Duration(uint8(b[2]))*time.Second + time.Duration(1e9*int(uint8(b[3]))/framerate)*time.Nanosecond
-}
-
-type stlCharacterHandler struct {
- accent string
- c uint16
- m *astikit.BiMap
-}
-
-func newSTLCharacterHandler(characterCodeTable uint16) (*stlCharacterHandler, error) {
- if v, ok := stlCharacterCodeTables[characterCodeTable]; ok {
- return &stlCharacterHandler{
- c: characterCodeTable,
- m: v,
- }, nil
- }
- return nil, fmt.Errorf("astisub: table doesn't exist for character code table %d", characterCodeTable)
-}
-
-// TODO Use this instead of encodeTextSTL => use in teletext process like for decode
-// TODO Test
-func (h *stlCharacterHandler) encode(i []byte) byte {
- return ' '
-}
-
-func (h *stlCharacterHandler) decode(i byte) (o []byte) {
- k := int(i)
- vi, ok := h.m.Get(k)
- if !ok {
- return
- }
- v := vi.(string)
- if len(h.accent) > 0 {
- o = norm.NFC.Bytes([]byte(v + h.accent))
- h.accent = ""
- return
- } else if h.c == stlCharacterCodeTableNumberLatin && k >= 0xc0 && k <= 0xcf {
- h.accent = v
- return
- }
- return []byte(v)
-}
-
-type stlStyler struct {
- boxing *bool
- italics *bool
- underline *bool
-}
-
-func newSTLStyler() *stlStyler {
- return &stlStyler{}
-}
-
-func (s *stlStyler) parseSpacingAttribute(i byte) {
- switch i {
- case 0x80:
- s.italics = astikit.BoolPtr(true)
- case 0x81:
- s.italics = astikit.BoolPtr(false)
- case 0x82:
- s.underline = astikit.BoolPtr(true)
- case 0x83:
- s.underline = astikit.BoolPtr(false)
- case 0x84:
- s.boxing = astikit.BoolPtr(true)
- case 0x85:
- s.boxing = astikit.BoolPtr(false)
- }
-}
-
-func (s *stlStyler) hasBeenSet() bool {
- return s.italics != nil || s.boxing != nil || s.underline != nil
-}
-
-func (s *stlStyler) hasChanged(sa *StyleAttributes) bool {
- return s.boxing != sa.STLBoxing || s.italics != sa.STLItalics || s.underline != sa.STLUnderline
-}
-
-func (s *stlStyler) propagateStyleAttributes(sa *StyleAttributes) {
- sa.propagateSTLAttributes()
-}
-
-func (s *stlStyler) update(sa *StyleAttributes) {
- if s.boxing != nil && s.boxing != sa.STLBoxing {
- sa.STLBoxing = s.boxing
- }
- if s.italics != nil && s.italics != sa.STLItalics {
- sa.STLItalics = s.italics
- }
- if s.underline != nil && s.underline != sa.STLUnderline {
- sa.STLUnderline = s.underline
- }
-}
-
-// WriteToSTL writes subtitles in .stl format
-func (s Subtitles) WriteToSTL(o io.Writer) (err error) {
- // Do not write anything if no subtitles
- if len(s.Items) == 0 {
- err = ErrNoSubtitlesToWrite
- return
- }
-
- // Write GSI block
- var g = newGSIBlock(s)
- if _, err = o.Write(g.bytes()); err != nil {
- err = fmt.Errorf("astisub: writing gsi block failed: %w", err)
- return
- }
-
- // Loop through items
- for idx, item := range s.Items {
- // Write tti block
- if _, err = o.Write(newTTIBlock(item, idx+1).bytes(g)); err != nil {
- err = fmt.Errorf("astisub: writing tti block #%d failed: %w", idx+1, err)
- return
- }
- }
- return
-}
-
-// TODO Remove below
-
-// STL unicode diacritic
-var stlUnicodeDiacritic = astikit.NewBiMap().
- Set(byte('\xc1'), "\u0300"). // Grave accent
- Set(byte('\xc2'), "\u0301"). // Acute accent
- Set(byte('\xc3'), "\u0302"). // Circumflex
- Set(byte('\xc4'), "\u0303"). // Tilde
- Set(byte('\xc5'), "\u0304"). // Macron
- Set(byte('\xc6'), "\u0306"). // Breve
- Set(byte('\xc7'), "\u0307"). // Dot
- Set(byte('\xc8'), "\u0308"). // Umlaut
- Set(byte('\xca'), "\u030a"). // Ring
- Set(byte('\xcb'), "\u0327"). // Cedilla
- Set(byte('\xcd'), "\u030B"). // Double acute accent
- Set(byte('\xce'), "\u0328"). // Ogonek
- Set(byte('\xcf'), "\u030c") // Caron
-
-// STL unicode mapping
-var stlUnicodeMapping = astikit.NewBiMap().
- Set(byte('\x8a'), "\u000a"). // Line break
- Set(byte('\xa8'), "\u00a4"). // ¤
- Set(byte('\xa9'), "\u2018"). // ‘
- Set(byte('\xaa'), "\u201C"). // “
- Set(byte('\xab'), "\u00AB"). // «
- Set(byte('\xac'), "\u2190"). // ←
- Set(byte('\xad'), "\u2191"). // ↑
- Set(byte('\xae'), "\u2192"). // →
- Set(byte('\xaf'), "\u2193"). // ↓
- Set(byte('\xb4'), "\u00D7"). // ×
- Set(byte('\xb8'), "\u00F7"). // ÷
- Set(byte('\xb9'), "\u2019"). // ’
- Set(byte('\xba'), "\u201D"). // ”
- Set(byte('\xbc'), "\u00BC"). // ¼
- Set(byte('\xbd'), "\u00BD"). // ½
- Set(byte('\xbe'), "\u00BE"). // ¾
- Set(byte('\xbf'), "\u00BF"). // ¿
- Set(byte('\xd0'), "\u2015"). // ―
- Set(byte('\xd1'), "\u00B9"). // ¹
- Set(byte('\xd2'), "\u00AE"). // ®
- Set(byte('\xd3'), "\u00A9"). // ©
- Set(byte('\xd4'), "\u2122"). // ™
- Set(byte('\xd5'), "\u266A"). // ♪
- Set(byte('\xd6'), "\u00AC"). // ¬
- Set(byte('\xd7'), "\u00A6"). // ¦
- Set(byte('\xdc'), "\u215B"). // ⅛
- Set(byte('\xdd'), "\u215C"). // ⅜
- Set(byte('\xde'), "\u215D"). // ⅝
- Set(byte('\xdf'), "\u215E"). // ⅞
- Set(byte('\xe0'), "\u2126"). // Ohm Ω
- Set(byte('\xe1'), "\u00C6"). // Æ
- Set(byte('\xe2'), "\u0110"). // Đ
- Set(byte('\xe3'), "\u00AA"). // ª
- Set(byte('\xe4'), "\u0126"). // Ħ
- Set(byte('\xe6'), "\u0132"). // IJ
- Set(byte('\xe7'), "\u013F"). // Ŀ
- Set(byte('\xe8'), "\u0141"). // Ł
- Set(byte('\xe9'), "\u00D8"). // Ø
- Set(byte('\xea'), "\u0152"). // Œ
- Set(byte('\xeb'), "\u00BA"). // º
- Set(byte('\xec'), "\u00DE"). // Þ
- Set(byte('\xed'), "\u0166"). // Ŧ
- Set(byte('\xee'), "\u014A"). // Ŋ
- Set(byte('\xef'), "\u0149"). // ʼn
- Set(byte('\xf0'), "\u0138"). // ĸ
- Set(byte('\xf1'), "\u00E6"). // æ
- Set(byte('\xf2'), "\u0111"). // đ
- Set(byte('\xf3'), "\u00F0"). // ð
- Set(byte('\xf4'), "\u0127"). // ħ
- Set(byte('\xf5'), "\u0131"). // ı
- Set(byte('\xf6'), "\u0133"). // ij
- Set(byte('\xf7'), "\u0140"). // ŀ
- Set(byte('\xf8'), "\u0142"). // ł
- Set(byte('\xf9'), "\u00F8"). // ø
- Set(byte('\xfa'), "\u0153"). // œ
- Set(byte('\xfb'), "\u00DF"). // ß
- Set(byte('\xfc'), "\u00FE"). // þ
- Set(byte('\xfd'), "\u0167"). // ŧ
- Set(byte('\xfe'), "\u014B"). // ŋ
- Set(byte('\xff'), "\u00AD") // Soft hyphen
-
-// encodeTextSTL encodes the STL text
-func encodeTextSTL(i string) (o []byte) {
- i = string(norm.NFD.Bytes([]byte(i)))
- for _, c := range i {
- if v, ok := stlUnicodeMapping.GetInverse(string(c)); ok {
- o = append(o, v.(byte))
- } else if v, ok := stlUnicodeDiacritic.GetInverse(string(c)); ok {
- o = append(o[:len(o)-1], v.(byte), o[len(o)-1])
- } else {
- o = append(o, byte(c))
- }
- }
- return
-}
-
-func parseSTLJustificationCode(i byte) Justification {
- switch i {
- case 0x00:
- return JustificationUnchanged
- case 0x01:
- return JustificationLeft
- case 0x02:
- return JustificationCentered
- case 0x03:
- return JustificationRight
- default:
- return JustificationUnchanged
- }
-}
-
-func isTeletextControlCode(i byte) (b bool) {
- return i <= 0x1f
-}
-
-func parseOpenSubtitleRow(i *Item, d decoder, fs func() styler, row []byte) error {
- // Loop through columns
- var l = Line{}
- var li = LineItem{InlineStyle: &StyleAttributes{}}
- var s styler
- for _, v := range row {
- // Create specific styler
- if fs != nil {
- s = fs()
- }
-
- if isTeletextControlCode(v) {
- return errors.New("teletext control code in open text")
- }
- if s != nil {
- s.parseSpacingAttribute(v)
- }
-
- // Style has been set
- if s != nil && s.hasBeenSet() {
- // Style has changed
- if s.hasChanged(li.InlineStyle) {
- if len(li.Text) > 0 {
- // Append line item
- appendOpenSubtitleLineItem(&l, li, s)
-
- // Create new line item
- sa := &StyleAttributes{}
- *sa = *li.InlineStyle
- li = LineItem{InlineStyle: sa}
- }
- s.update(li.InlineStyle)
- }
- } else {
- // Append text
- li.Text += string(d.decode(v))
- }
- }
-
- appendOpenSubtitleLineItem(&l, li, s)
-
- // Append line
- if len(l.Items) > 0 {
- i.Lines = append(i.Lines, l)
- }
- return nil
-}
-
-func appendOpenSubtitleLineItem(l *Line, li LineItem, s styler) {
- // There's some text
- if len(strings.TrimSpace(li.Text)) > 0 {
- // Make sure inline style exists
- if li.InlineStyle == nil {
- li.InlineStyle = &StyleAttributes{}
- }
-
- // Propagate style attributes
- if s != nil {
- s.propagateStyleAttributes(li.InlineStyle)
- }
-
- // Append line item
- li.Text = strings.TrimSpace(li.Text)
- l.Items = append(l.Items, li)
- }
-}
diff --git a/vendor/github.com/asticode/go-astisub/subtitles.go b/vendor/github.com/asticode/go-astisub/subtitles.go
deleted file mode 100644
index e6617998e68..00000000000
--- a/vendor/github.com/asticode/go-astisub/subtitles.go
+++ /dev/null
@@ -1,779 +0,0 @@
-package astisub
-
-import (
- "errors"
- "fmt"
- "math"
- "os"
- "path/filepath"
- "strconv"
- "strings"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// Bytes
-var (
- BytesBOM = []byte{239, 187, 191}
- bytesLineSeparator = []byte("\n")
- bytesSpace = []byte(" ")
-)
-
-// Colors
-var (
- ColorBlack = &Color{}
- ColorBlue = &Color{Blue: 255}
- ColorCyan = &Color{Blue: 255, Green: 255}
- ColorGray = &Color{Blue: 128, Green: 128, Red: 128}
- ColorGreen = &Color{Green: 128}
- ColorLime = &Color{Green: 255}
- ColorMagenta = &Color{Blue: 255, Red: 255}
- ColorMaroon = &Color{Red: 128}
- ColorNavy = &Color{Blue: 128}
- ColorOlive = &Color{Green: 128, Red: 128}
- ColorPurple = &Color{Blue: 128, Red: 128}
- ColorRed = &Color{Red: 255}
- ColorSilver = &Color{Blue: 192, Green: 192, Red: 192}
- ColorTeal = &Color{Blue: 128, Green: 128}
- ColorYellow = &Color{Green: 255, Red: 255}
- ColorWhite = &Color{Blue: 255, Green: 255, Red: 255}
-)
-
-// Errors
-var (
- ErrInvalidExtension = errors.New("astisub: invalid extension")
- ErrNoSubtitlesToWrite = errors.New("astisub: no subtitles to write")
-)
-
-// Now allows testing functions using it
-var Now = func() time.Time {
- return time.Now()
-}
-
-// Options represents open or write options
-type Options struct {
- Filename string
- Teletext TeletextOptions
- STL STLOptions
-}
-
-// Open opens a subtitle reader based on options
-func Open(o Options) (s *Subtitles, err error) {
- // Open the file
- var f *os.File
- if f, err = os.Open(o.Filename); err != nil {
- err = fmt.Errorf("astisub: opening %s failed: %w", o.Filename, err)
- return
- }
- defer f.Close()
-
- // Parse the content
- switch filepath.Ext(strings.ToLower(o.Filename)) {
- case ".srt":
- s, err = ReadFromSRT(f)
- case ".ssa", ".ass":
- s, err = ReadFromSSA(f)
- case ".stl":
- s, err = ReadFromSTL(f, o.STL)
- case ".ts":
- s, err = ReadFromTeletext(f, o.Teletext)
- case ".ttml":
- s, err = ReadFromTTML(f)
- case ".vtt":
- s, err = ReadFromWebVTT(f)
- default:
- err = ErrInvalidExtension
- }
- return
-}
-
-// OpenFile opens a file regardless of other options
-func OpenFile(filename string) (*Subtitles, error) {
- return Open(Options{Filename: filename})
-}
-
-// Subtitles represents an ordered list of items with formatting
-type Subtitles struct {
- Items []*Item
- Metadata *Metadata
- Regions map[string]*Region
- Styles map[string]*Style
-}
-
-// NewSubtitles creates new subtitles
-func NewSubtitles() *Subtitles {
- return &Subtitles{
- Regions: make(map[string]*Region),
- Styles: make(map[string]*Style),
- }
-}
-
-// Item represents a text to show between 2 time boundaries with formatting
-type Item struct {
- Comments []string
- Index int
- EndAt time.Duration
- InlineStyle *StyleAttributes
- Lines []Line
- Region *Region
- StartAt time.Duration
- Style *Style
-}
-
-// String implements the Stringer interface
-func (i Item) String() string {
- var os []string
- for _, l := range i.Lines {
- os = append(os, l.String())
- }
- return strings.Join(os, " - ")
-}
-
-// Color represents a color
-type Color struct {
- Alpha, Blue, Green, Red uint8
-}
-
-// newColorFromSSAString builds a new color based on an SSA string
-func newColorFromSSAString(s string, base int) (c *Color, err error) {
- var i int64
- if i, err = strconv.ParseInt(s, base, 64); err != nil {
- err = fmt.Errorf("parsing int %s with base %d failed: %w", s, base, err)
- return
- }
- c = &Color{
- Alpha: uint8(i>>24) & 0xff,
- Blue: uint8(i>>16) & 0xff,
- Green: uint8(i>>8) & 0xff,
- Red: uint8(i) & 0xff,
- }
- return
-}
-
-// SSAString expresses the color as an SSA string
-func (c *Color) SSAString() string {
- return fmt.Sprintf("%.8x", uint32(c.Alpha)<<24|uint32(c.Blue)<<16|uint32(c.Green)<<8|uint32(c.Red))
-}
-
-// TTMLString expresses the color as a TTML string
-func (c *Color) TTMLString() string {
- return fmt.Sprintf("%.6x", uint32(c.Red)<<16|uint32(c.Green)<<8|uint32(c.Blue))
-}
-
-type Justification int
-
-var (
- JustificationUnchanged = Justification(1)
- JustificationLeft = Justification(2)
- JustificationCentered = Justification(3)
- JustificationRight = Justification(4)
-)
-
-// StyleAttributes represents style attributes
-type StyleAttributes struct {
- SSAAlignment *int
- SSAAlphaLevel *float64
- SSAAngle *float64 // degrees
- SSABackColour *Color
- SSABold *bool
- SSABorderStyle *int
- SSAEffect string
- SSAEncoding *int
- SSAFontName string
- SSAFontSize *float64
- SSAItalic *bool
- SSALayer *int
- SSAMarginLeft *int // pixels
- SSAMarginRight *int // pixels
- SSAMarginVertical *int // pixels
- SSAMarked *bool
- SSAOutline *float64 // pixels
- SSAOutlineColour *Color
- SSAPrimaryColour *Color
- SSAScaleX *float64 // %
- SSAScaleY *float64 // %
- SSASecondaryColour *Color
- SSAShadow *float64 // pixels
- SSASpacing *float64 // pixels
- SSAStrikeout *bool
- SSAUnderline *bool
- STLBoxing *bool
- STLItalics *bool
- STLJustification *Justification
- STLPosition *STLPosition
- STLUnderline *bool
- TeletextColor *Color
- TeletextDoubleHeight *bool
- TeletextDoubleSize *bool
- TeletextDoubleWidth *bool
- TeletextSpacesAfter *int
- TeletextSpacesBefore *int
- // TODO Use pointers with real types below
- TTMLBackgroundColor *string // https://htmlcolorcodes.com/fr/
- TTMLColor *string
- TTMLDirection *string
- TTMLDisplay *string
- TTMLDisplayAlign *string
- TTMLExtent *string
- TTMLFontFamily *string
- TTMLFontSize *string
- TTMLFontStyle *string
- TTMLFontWeight *string
- TTMLLineHeight *string
- TTMLOpacity *string
- TTMLOrigin *string
- TTMLOverflow *string
- TTMLPadding *string
- TTMLShowBackground *string
- TTMLTextAlign *string
- TTMLTextDecoration *string
- TTMLTextOutline *string
- TTMLUnicodeBidi *string
- TTMLVisibility *string
- TTMLWrapOption *string
- TTMLWritingMode *string
- TTMLZIndex *int
- WebVTTAlign string
- WebVTTItalics bool
- WebVTTLine string
- WebVTTLines int
- WebVTTPosition string
- WebVTTRegionAnchor string
- WebVTTScroll string
- WebVTTSize string
- WebVTTVertical string
- WebVTTViewportAnchor string
- WebVTTWidth string
-}
-
-func (sa *StyleAttributes) propagateSSAAttributes() {}
-
-func (sa *StyleAttributes) propagateSTLAttributes() {
- if sa.STLJustification != nil {
- switch *sa.STLJustification {
- case JustificationCentered:
- // default to middle anyway?
- case JustificationRight:
- sa.WebVTTAlign = "right"
- case JustificationLeft:
- sa.WebVTTAlign = "left"
- }
- }
-}
-
-func (sa *StyleAttributes) propagateTeletextAttributes() {
- if sa.TeletextColor != nil {
- sa.TTMLColor = astikit.StrPtr("#" + sa.TeletextColor.TTMLString())
- }
-}
-
-//reference for migration: https://w3c.github.io/ttml-webvtt-mapping/
-func (sa *StyleAttributes) propagateTTMLAttributes() {
- if sa.TTMLTextAlign != nil {
- sa.WebVTTAlign = *sa.TTMLTextAlign
- }
- if sa.TTMLExtent != nil {
- //region settings
- lineHeight := 5 //assuming height of line as 5.33vh
- dimensions := strings.Split(*sa.TTMLExtent, " ")
- if len(dimensions) > 1 {
- sa.WebVTTWidth = dimensions[0]
- if height, err := strconv.Atoi(strings.ReplaceAll(dimensions[1], "%", "")); err == nil {
- sa.WebVTTLines = height / lineHeight
- }
- //cue settings
- //default TTML WritingMode is lrtb i.e. left to right, top to bottom
- sa.WebVTTSize = dimensions[1]
- if sa.TTMLWritingMode != nil && strings.HasPrefix(*sa.TTMLWritingMode, "tb") {
- sa.WebVTTSize = dimensions[0]
- }
- }
- }
- if sa.TTMLOrigin != nil {
- //region settings
- sa.WebVTTRegionAnchor = "0%,0%"
- sa.WebVTTViewportAnchor = strings.ReplaceAll(strings.TrimSpace(*sa.TTMLOrigin), " ", ",")
- sa.WebVTTScroll = "up"
- //cue settings
- coordinates := strings.Split(*sa.TTMLOrigin, " ")
- if len(coordinates) > 1 {
- sa.WebVTTLine = coordinates[0]
- sa.WebVTTPosition = coordinates[1]
- if sa.TTMLWritingMode != nil && strings.HasPrefix(*sa.TTMLWritingMode, "tb") {
- sa.WebVTTLine = coordinates[1]
- sa.WebVTTPosition = coordinates[0]
- }
- }
- }
-}
-
-func (sa *StyleAttributes) propagateWebVTTAttributes() {}
-
-// Metadata represents metadata
-// TODO Merge attributes
-type Metadata struct {
- Comments []string
- Framerate int
- Language string
- SSACollisions string
- SSAOriginalEditing string
- SSAOriginalScript string
- SSAOriginalTiming string
- SSAOriginalTranslation string
- SSAPlayDepth *int
- SSAPlayResX, SSAPlayResY *int
- SSAScriptType string
- SSAScriptUpdatedBy string
- SSASynchPoint string
- SSATimer *float64
- SSAUpdateDetails string
- SSAWrapStyle string
- STLCountryOfOrigin string
- STLCreationDate *time.Time
- STLDisplayStandardCode string
- STLMaximumNumberOfDisplayableCharactersInAnyTextRow *int
- STLMaximumNumberOfDisplayableRows *int
- STLPublisher string
- STLRevisionDate *time.Time
- STLSubtitleListReferenceCode string
- STLTimecodeStartOfProgramme time.Duration
- Title string
- TTMLCopyright string
-}
-
-// Region represents a subtitle's region
-type Region struct {
- ID string
- InlineStyle *StyleAttributes
- Style *Style
-}
-
-// Style represents a subtitle's style
-type Style struct {
- ID string
- InlineStyle *StyleAttributes
- Style *Style
-}
-
-// Line represents a set of formatted line items
-type Line struct {
- Items []LineItem
- VoiceName string
-}
-
-// String implement the Stringer interface
-func (l Line) String() string {
- var texts []string
- for _, i := range l.Items {
- texts = append(texts, i.Text)
- }
- return strings.Join(texts, " ")
-}
-
-// LineItem represents a formatted line item
-type LineItem struct {
- InlineStyle *StyleAttributes
- Style *Style
- Text string
-}
-
-// Add adds a duration to each time boundaries. As in the time package, duration can be negative.
-func (s *Subtitles) Add(d time.Duration) {
- for idx := 0; idx < len(s.Items); idx++ {
- s.Items[idx].EndAt += d
- s.Items[idx].StartAt += d
- if s.Items[idx].EndAt <= 0 && s.Items[idx].StartAt <= 0 {
- s.Items = append(s.Items[:idx], s.Items[idx+1:]...)
- idx--
- } else if s.Items[idx].StartAt <= 0 {
- s.Items[idx].StartAt = time.Duration(0)
- }
- }
-}
-
-// Duration returns the subtitles duration
-func (s Subtitles) Duration() time.Duration {
- if len(s.Items) == 0 {
- return time.Duration(0)
- }
- return s.Items[len(s.Items)-1].EndAt
-}
-
-// ForceDuration updates the subtitles duration.
-// If requested duration is bigger, then we create a dummy item.
-// If requested duration is smaller, then we remove useless items and we cut the last item or add a dummy item.
-func (s *Subtitles) ForceDuration(d time.Duration, addDummyItem bool) {
- // Requested duration is the same as the subtitles'one
- if s.Duration() == d {
- return
- }
-
- // Requested duration is bigger than subtitles'one
- if s.Duration() > d {
- // Find last item before input duration and update end at
- var lastIndex = -1
- for index, i := range s.Items {
- // Start at is bigger than input duration, we've found the last item
- if i.StartAt >= d {
- lastIndex = index
- break
- } else if i.EndAt > d {
- s.Items[index].EndAt = d
- }
- }
-
- // Last index has been found
- if lastIndex != -1 {
- s.Items = s.Items[:lastIndex]
- }
- }
-
- // Add dummy item with the minimum duration possible
- if addDummyItem && s.Duration() < d {
- s.Items = append(s.Items, &Item{EndAt: d, Lines: []Line{{Items: []LineItem{{Text: "..."}}}}, StartAt: d - time.Millisecond})
- }
-}
-
-// Fragment fragments subtitles with a specific fragment duration
-func (s *Subtitles) Fragment(f time.Duration) {
- // Nothing to fragment
- if len(s.Items) == 0 {
- return
- }
-
- // Here we want to simulate fragments of duration f until there are no subtitles left in that period of time
- var fragmentStartAt, fragmentEndAt = time.Duration(0), f
- for fragmentStartAt < s.Items[len(s.Items)-1].EndAt {
- // We loop through subtitles and process the ones that either contain the fragment start at,
- // or contain the fragment end at
- //
- // It's useless processing subtitles contained between fragment start at and end at
- // |____________________| <- subtitle
- // | |
- // fragment start at fragment end at
- for i, sub := range s.Items {
- // Init
- var newSub = &Item{}
- *newSub = *sub
-
- // A switch is more readable here
- switch {
- // Subtitle contains fragment start at
- // |____________________| <- subtitle
- // | |
- // fragment start at fragment end at
- case sub.StartAt < fragmentStartAt && sub.EndAt > fragmentStartAt:
- sub.StartAt = fragmentStartAt
- newSub.EndAt = fragmentStartAt
- // Subtitle contains fragment end at
- // |____________________| <- subtitle
- // | |
- // fragment start at fragment end at
- case sub.StartAt < fragmentEndAt && sub.EndAt > fragmentEndAt:
- sub.StartAt = fragmentEndAt
- newSub.EndAt = fragmentEndAt
- default:
- continue
- }
-
- // Insert new sub
- s.Items = append(s.Items[:i], append([]*Item{newSub}, s.Items[i:]...)...)
- }
-
- // Update fragments boundaries
- fragmentStartAt += f
- fragmentEndAt += f
- }
-
- // Order
- s.Order()
-}
-
-// IsEmpty returns whether the subtitles are empty
-func (s Subtitles) IsEmpty() bool {
- return len(s.Items) == 0
-}
-
-// Merge merges subtitles i into subtitles
-func (s *Subtitles) Merge(i *Subtitles) {
- // Append items
- s.Items = append(s.Items, i.Items...)
- s.Order()
-
- // Add regions
- for _, region := range i.Regions {
- if _, ok := s.Regions[region.ID]; !ok {
- s.Regions[region.ID] = region
- }
- }
-
- // Add styles
- for _, style := range i.Styles {
- if _, ok := s.Styles[style.ID]; !ok {
- s.Styles[style.ID] = style
- }
- }
-}
-
-// Optimize optimizes subtitles
-func (s *Subtitles) Optimize() {
- // Nothing to optimize
- if len(s.Items) == 0 {
- return
- }
-
- // Remove unused regions and style
- s.removeUnusedRegionsAndStyles()
-}
-
-// removeUnusedRegionsAndStyles removes unused regions and styles
-func (s *Subtitles) removeUnusedRegionsAndStyles() {
- // Loop through items
- var usedRegions, usedStyles = make(map[string]bool), make(map[string]bool)
- for _, item := range s.Items {
- // Add region
- if item.Region != nil {
- usedRegions[item.Region.ID] = true
- }
-
- // Add style
- if item.Style != nil {
- usedStyles[item.Style.ID] = true
- }
-
- // Loop through lines
- for _, line := range item.Lines {
- // Loop through line items
- for _, lineItem := range line.Items {
- // Add style
- if lineItem.Style != nil {
- usedStyles[lineItem.Style.ID] = true
- }
- }
- }
- }
-
- // Loop through regions
- for id, region := range s.Regions {
- if _, ok := usedRegions[region.ID]; ok {
- if region.Style != nil {
- usedStyles[region.Style.ID] = true
- }
- } else {
- delete(s.Regions, id)
- }
- }
-
- // Loop through style
- for id, style := range s.Styles {
- if _, ok := usedStyles[style.ID]; !ok {
- delete(s.Styles, id)
- }
- }
-}
-
-// Order orders items
-func (s *Subtitles) Order() {
- // Nothing to do if less than 1 element
- if len(s.Items) <= 1 {
- return
- }
-
- // Order
- var swapped = true
- for swapped {
- swapped = false
- for index := 1; index < len(s.Items); index++ {
- if s.Items[index-1].StartAt > s.Items[index].StartAt {
- var tmp = s.Items[index-1]
- s.Items[index-1] = s.Items[index]
- s.Items[index] = tmp
- swapped = true
- }
- }
- }
-}
-
-// RemoveStyling removes the styling from the subtitles
-func (s *Subtitles) RemoveStyling() {
- s.Regions = map[string]*Region{}
- s.Styles = map[string]*Style{}
- for _, i := range s.Items {
- i.Region = nil
- i.Style = nil
- i.InlineStyle = nil
- for idxLine, l := range i.Lines {
- for idxLineItem := range l.Items {
- i.Lines[idxLine].Items[idxLineItem].InlineStyle = nil
- i.Lines[idxLine].Items[idxLineItem].Style = nil
- }
- }
- }
-}
-
-// Unfragment unfragments subtitles
-func (s *Subtitles) Unfragment() {
- // Nothing to do if less than 1 element
- if len(s.Items) <= 1 {
- return
- }
-
- // Order
- s.Order()
-
- // Loop through items
- for i := 0; i < len(s.Items)-1; i++ {
- for j := i + 1; j < len(s.Items); j++ {
- // Items are the same
- if s.Items[i].String() == s.Items[j].String() && s.Items[i].EndAt >= s.Items[j].StartAt {
- // Only override end time if longer
- if s.Items[i].EndAt < s.Items[j].EndAt {
- s.Items[i].EndAt = s.Items[j].EndAt
- }
- s.Items = append(s.Items[:j], s.Items[j+1:]...)
- j--
- } else if s.Items[i].EndAt < s.Items[j].StartAt {
- break
- }
- }
- }
-}
-
-// Write writes subtitles to a file
-func (s Subtitles) Write(dst string) (err error) {
- // Create the file
- var f *os.File
- if f, err = os.Create(dst); err != nil {
- err = fmt.Errorf("astisub: creating %s failed: %w", dst, err)
- return
- }
- defer f.Close()
-
- // Write the content
- switch filepath.Ext(strings.ToLower(dst)) {
- case ".srt":
- err = s.WriteToSRT(f)
- case ".ssa", ".ass":
- err = s.WriteToSSA(f)
- case ".stl":
- err = s.WriteToSTL(f)
- case ".ttml":
- err = s.WriteToTTML(f)
- case ".vtt":
- err = s.WriteToWebVTT(f)
- default:
- err = ErrInvalidExtension
- }
- return
-}
-
-// parseDuration parses a duration in "00:00:00.000", "00:00:00,000" or "0:00:00:00" format
-func parseDuration(i, millisecondSep string, numberOfMillisecondDigits int) (o time.Duration, err error) {
- // Split milliseconds
- var parts = strings.Split(i, millisecondSep)
- var milliseconds int
- var s string
- if len(parts) >= 2 {
- // Invalid number of millisecond digits
- s = strings.TrimSpace(parts[len(parts)-1])
- if len(s) > 3 {
- err = fmt.Errorf("astisub: Invalid number of millisecond digits detected in %s", i)
- return
- }
-
- // Parse milliseconds
- if milliseconds, err = strconv.Atoi(s); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", s, err)
- return
- }
- milliseconds *= int(math.Pow10(numberOfMillisecondDigits - len(s)))
- s = strings.Join(parts[:len(parts)-1], millisecondSep)
- } else {
- s = i
- }
-
- // Split hours, minutes and seconds
- parts = strings.Split(strings.TrimSpace(s), ":")
- var partSeconds, partMinutes, partHours string
- if len(parts) == 2 {
- partSeconds = parts[1]
- partMinutes = parts[0]
- } else if len(parts) == 3 {
- partSeconds = parts[2]
- partMinutes = parts[1]
- partHours = parts[0]
- } else {
- err = fmt.Errorf("astisub: No hours, minutes or seconds detected in %s", i)
- return
- }
-
- // Parse seconds
- var seconds int
- s = strings.TrimSpace(partSeconds)
- if seconds, err = strconv.Atoi(s); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", s, err)
- return
- }
-
- // Parse minutes
- var minutes int
- s = strings.TrimSpace(partMinutes)
- if minutes, err = strconv.Atoi(s); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", s, err)
- return
- }
-
- // Parse hours
- var hours int
- if len(partHours) > 0 {
- s = strings.TrimSpace(partHours)
- if hours, err = strconv.Atoi(s); err != nil {
- err = fmt.Errorf("astisub: atoi of %s failed: %w", s, err)
- return
- }
- }
-
- // Generate output
- o = time.Duration(milliseconds)*time.Millisecond + time.Duration(seconds)*time.Second + time.Duration(minutes)*time.Minute + time.Duration(hours)*time.Hour
- return
-}
-
-// formatDuration formats a duration
-func formatDuration(i time.Duration, millisecondSep string, numberOfMillisecondDigits int) (s string) {
- // Parse hours
- var hours = int(i / time.Hour)
- var n = i % time.Hour
- if hours < 10 {
- s += "0"
- }
- s += strconv.Itoa(hours) + ":"
-
- // Parse minutes
- var minutes = int(n / time.Minute)
- n = i % time.Minute
- if minutes < 10 {
- s += "0"
- }
- s += strconv.Itoa(minutes) + ":"
-
- // Parse seconds
- var seconds = int(n / time.Second)
- n = i % time.Second
- if seconds < 10 {
- s += "0"
- }
- s += strconv.Itoa(seconds) + millisecondSep
-
- // Parse milliseconds
- var milliseconds = float64(n/time.Millisecond) / float64(1000)
- s += fmt.Sprintf("%."+strconv.Itoa(numberOfMillisecondDigits)+"f", milliseconds)[2:]
- return
-}
-
-// appendStringToBytesWithNewLine adds a string to bytes then adds a new line
-func appendStringToBytesWithNewLine(i []byte, s string) (o []byte) {
- o = append(i, []byte(s)...)
- o = append(o, bytesLineSeparator...)
- return
-}
diff --git a/vendor/github.com/asticode/go-astisub/teletext.go b/vendor/github.com/asticode/go-astisub/teletext.go
deleted file mode 100644
index 3223f778c3b..00000000000
--- a/vendor/github.com/asticode/go-astisub/teletext.go
+++ /dev/null
@@ -1,997 +0,0 @@
-package astisub
-
-import (
- "context"
- "errors"
- "fmt"
- "io"
- "log"
- "math/bits"
- "sort"
- "strings"
- "time"
-
- "github.com/asticode/go-astikit"
- "github.com/asticode/go-astits"
-)
-
-// Errors
-var (
- ErrNoValidTeletextPID = errors.New("astisub: no valid teletext PID")
-)
-
-type teletextCharset [96][]byte
-
-type teletextNationalSubset [13][]byte
-
-// Chapter: 15.2 | Page: 109 | Link: http://www.etsi.org/deliver/etsi_i_ets/300700_300799/300706/01_60/ets_300706e01p.pdf
-// It is indexed by triplet1 then by national option subset code
-var teletextCharsets = map[uint8]map[uint8]struct {
- g0 *teletextCharset
- g2 *teletextCharset
- national *teletextNationalSubset
-}{
- 0: {
- 0: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetEnglish},
- 1: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetFrench},
- 2: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetSwedishFinnishHungarian},
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetCzechSlovak},
- 4: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetGerman},
- 5: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetPortugueseSpanish},
- 6: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetItalian},
- 7: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- },
- 1: {
- 0: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetPolish},
- 1: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetFrench},
- 2: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetSwedishFinnishHungarian},
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetCzechSlovak},
- 4: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetGerman},
- 5: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 6: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetItalian},
- 7: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- },
- 2: {
- 0: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetEnglish},
- 1: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetFrench},
- 2: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetSwedishFinnishHungarian},
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetCzechSlovak},
- 4: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetGerman},
- 5: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetPortugueseSpanish},
- 6: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetItalian},
- 7: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- },
- 3: {
- 0: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 1: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 2: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 4: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 5: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetSerbianCroatianSlovenian},
- 6: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin},
- 7: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetRomanian},
- },
- 4: {
- 0: {g0: teletextCharsetG0CyrillicOption1, g2: teletextCharsetG2Cyrillic},
- 1: {g0: teletextCharsetG0CyrillicOption2, g2: teletextCharsetG2Cyrillic},
- 2: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetEstonian},
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetCzechSlovak},
- 4: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetGerman},
- 5: {g0: teletextCharsetG0CyrillicOption3, g2: teletextCharsetG2Cyrillic},
- 6: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetLettishLithuanian},
- },
- 6: {
- 3: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Latin, national: teletextNationalSubsetTurkish},
- 7: {g0: teletextCharsetG0Greek, g2: teletextCharsetG2Greek},
- },
- 8: {
- 0: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Arabic, national: teletextNationalSubsetEnglish},
- 1: {g0: teletextCharsetG0Latin, g2: teletextCharsetG2Arabic, national: teletextNationalSubsetFrench},
- 7: {g0: teletextCharsetG0Arabic, g2: teletextCharsetG2Arabic},
- },
- 10: {
- 5: {g0: teletextCharsetG0Hebrew, g2: teletextCharsetG2Arabic},
- 7: {g0: teletextCharsetG0Arabic, g2: teletextCharsetG2Arabic},
- },
-}
-
-// Teletext G0 charsets
-var (
- teletextCharsetG0CyrillicOption1 = &teletextCharset{
- []byte{0x20}, []byte{0x21}, []byte{0x22}, []byte{0x23}, []byte{0x24}, []byte{0x25}, []byte{0xd1, 0x8b},
- []byte{0x27}, []byte{0x28}, []byte{0x29}, []byte{0x2a}, []byte{0x2b}, []byte{0x2c}, []byte{0x2d},
- []byte{0x2e}, []byte{0x2f}, []byte{0x30}, []byte{0x31}, []byte{0xe3, 0x88, 0x80}, []byte{0x33}, []byte{0x34},
- []byte{0x35}, []byte{0x36}, []byte{0x37}, []byte{0x38}, []byte{0x39}, []byte{0x3a}, []byte{0x3b},
- []byte{0x3c}, []byte{0x3d}, []byte{0x3e}, []byte{0x3f}, []byte{0xd0, 0xa7}, []byte{0xd0, 0x90},
- []byte{0xd0, 0x91}, []byte{0xd0, 0xa6}, []byte{0xd0, 0x94}, []byte{0xd0, 0x95}, []byte{0xd0, 0xa4},
- []byte{0xd0, 0x93}, []byte{0xd0, 0xa5}, []byte{0xd0, 0x98}, []byte{0xd0, 0x88}, []byte{0xd0, 0x9a},
- []byte{0xd0, 0x9b}, []byte{0xd0, 0x9c}, []byte{0xd0, 0x9d}, []byte{0xd0, 0x9e}, []byte{0xd0, 0x9f},
- []byte{0xd0, 0x8c}, []byte{0xd0, 0xa0}, []byte{0xd0, 0xa1}, []byte{0xd0, 0xa2}, []byte{0xd0, 0xa3},
- []byte{0xd0, 0x92}, []byte{0xd0, 0x83}, []byte{0xd0, 0x89}, []byte{0xd0, 0x8a}, []byte{0xd0, 0x97},
- []byte{0xd0, 0x8b}, []byte{0xd0, 0x96}, []byte{0xd0, 0x82}, []byte{0xd0, 0xa8}, []byte{0xd0, 0x8f},
- []byte{0xd1, 0x87}, []byte{0xd0, 0xb0}, []byte{0xd0, 0xb1}, []byte{0xd1, 0x86}, []byte{0xd0, 0xb4},
- []byte{0xd0, 0xb5}, []byte{0xd1, 0x84}, []byte{0xd0, 0xb3}, []byte{0xd1, 0x85}, []byte{0xd0, 0xb8},
- []byte{0xd0, 0xa8}, []byte{0xd0, 0xba}, []byte{0xd0, 0xbb}, []byte{0xd0, 0xbc}, []byte{0xd0, 0xbd},
- []byte{0xd0, 0xbe}, []byte{0xd0, 0xbf}, []byte{0xd0, 0xac}, []byte{0xd1, 0x80}, []byte{0xd1, 0x81},
- []byte{0xd1, 0x82}, []byte{0xd1, 0x83}, []byte{0xd0, 0xb2}, []byte{0xd0, 0xa3}, []byte{0xd0, 0xa9},
- []byte{0xd0, 0xaa}, []byte{0xd0, 0xb7}, []byte{0xd0, 0xab}, []byte{0xd0, 0xb6}, []byte{0xd0, 0xa2},
- []byte{0xd1, 0x88}, []byte{0xd0, 0xaf},
- }
- teletextCharsetG0CyrillicOption2 = &teletextCharset{
- []byte{0x20}, []byte{0x21}, []byte{0x22}, []byte{0x23}, []byte{0x24}, []byte{0x25}, []byte{0xd1, 0x8b},
- []byte{0x27}, []byte{0x28}, []byte{0x29}, []byte{0x2a}, []byte{0x2b}, []byte{0x2c}, []byte{0x2d},
- []byte{0x2e}, []byte{0x2f}, []byte{0x30}, []byte{0x31}, []byte{0x32}, []byte{0x33}, []byte{0x34},
- []byte{0x35}, []byte{0x36}, []byte{0x37}, []byte{0x38}, []byte{0x39}, []byte{0x3a}, []byte{0x3b},
- []byte{0x3c}, []byte{0x3d}, []byte{0x3e}, []byte{0x3f}, []byte{0xd0, 0xae}, []byte{0xd0, 0x90},
- []byte{0xd0, 0x91}, []byte{0xd0, 0xa6}, []byte{0xd0, 0x94}, []byte{0xd0, 0x95}, []byte{0xd0, 0xa4},
- []byte{0xd0, 0x93}, []byte{0xd0, 0xa5}, []byte{0xd0, 0x98}, []byte{0xd0, 0x99}, []byte{0xd0, 0x9a},
- []byte{0xd0, 0x9b}, []byte{0xd0, 0x9c}, []byte{0xd0, 0x9d}, []byte{0xd0, 0x9e}, []byte{0xd0, 0x9f},
- []byte{0xd0, 0xaf}, []byte{0xd0, 0xa0}, []byte{0xd0, 0xa1}, []byte{0xd0, 0xa2}, []byte{0xd0, 0xa3},
- []byte{0xd0, 0x96}, []byte{0xd0, 0x92}, []byte{0xd0, 0xac}, []byte{0xd0, 0xaa}, []byte{0xd0, 0x97},
- []byte{0xd0, 0xa8}, []byte{0xd0, 0xad}, []byte{0xd0, 0xa9}, []byte{0xd0, 0xa7}, []byte{0xd0, 0xab},
- []byte{0xd1, 0x8e}, []byte{0xd0, 0xb0}, []byte{0xd0, 0xb1}, []byte{0xd1, 0x86}, []byte{0xd0, 0xb4},
- []byte{0xd0, 0xb5}, []byte{0xd1, 0x84}, []byte{0xd0, 0xb3}, []byte{0xd1, 0x85}, []byte{0xd0, 0xb8},
- []byte{0xd0, 0xb9}, []byte{0xd0, 0xba}, []byte{0xd0, 0xbb}, []byte{0xd0, 0xbc}, []byte{0xd0, 0xbd},
- []byte{0xd0, 0xbe}, []byte{0xd0, 0xbf}, []byte{0xd1, 0x8f}, []byte{0xd1, 0x80}, []byte{0xd1, 0x81},
- []byte{0xd1, 0x82}, []byte{0xd1, 0x83}, []byte{0xd0, 0xb6}, []byte{0xd0, 0xb2}, []byte{0xd1, 0x8c},
- []byte{0xd1, 0x8a}, []byte{0xd0, 0xb7}, []byte{0xd1, 0x88}, []byte{0xd1, 0x8d}, []byte{0xd1, 0x89},
- []byte{0xd1, 0x87}, []byte{0xd1, 0x8b},
- }
- teletextCharsetG0CyrillicOption3 = &teletextCharset{
- []byte{0x20}, []byte{0x21}, []byte{0x22}, []byte{0x23}, []byte{0x24}, []byte{0x25}, []byte{0xc3, 0xaf},
- []byte{0x27}, []byte{0x28}, []byte{0x29}, []byte{0x2a}, []byte{0x2b}, []byte{0x2c}, []byte{0x2d},
- []byte{0x2e}, []byte{0x2f}, []byte{0x30}, []byte{0x31}, []byte{0x32}, []byte{0x33}, []byte{0x34},
- []byte{0x35}, []byte{0x36}, []byte{0x37}, []byte{0x38}, []byte{0x39}, []byte{0x3a}, []byte{0x3b},
- []byte{0x3c}, []byte{0x3d}, []byte{0x3e}, []byte{0x3f}, []byte{0xd0, 0xae}, []byte{0xd0, 0x90},
- []byte{0xd0, 0x91}, []byte{0xd0, 0xa6}, []byte{0xd0, 0x94}, []byte{0xd0, 0x95}, []byte{0xd0, 0xa4},
- []byte{0xd0, 0x93}, []byte{0xd0, 0xa5}, []byte{0xd0, 0x98}, []byte{0xd0, 0x99}, []byte{0xd0, 0x9a},
- []byte{0xd0, 0x9b}, []byte{0xd0, 0x9c}, []byte{0xd0, 0x9d}, []byte{0xd0, 0x9e}, []byte{0xd0, 0x9f},
- []byte{0xd0, 0xaf}, []byte{0xd0, 0xa0}, []byte{0xd0, 0xa1}, []byte{0xd0, 0xa2}, []byte{0xd0, 0xa3},
- []byte{0xd0, 0x96}, []byte{0xd0, 0x92}, []byte{0xd0, 0xac}, []byte{0x49}, []byte{0xd0, 0x97},
- []byte{0xd0, 0xa8}, []byte{0xd0, 0xad}, []byte{0xd0, 0xa9}, []byte{0xd0, 0xa7}, []byte{0xc3, 0x8f},
- []byte{0xd1, 0x8e}, []byte{0xd0, 0xb0}, []byte{0xd0, 0xb1}, []byte{0xd1, 0x86}, []byte{0xd0, 0xb4},
- []byte{0xd0, 0xb5}, []byte{0xd1, 0x84}, []byte{0xd0, 0xb3}, []byte{0xd1, 0x85}, []byte{0xd0, 0xb8},
- []byte{0xd0, 0xb9}, []byte{0xd0, 0xba}, []byte{0xd0, 0xbb}, []byte{0xd0, 0xbc}, []byte{0xd0, 0xbd},
- []byte{0xd0, 0xbe}, []byte{0xd0, 0xbf}, []byte{0xd1, 0x8f}, []byte{0xd1, 0x80}, []byte{0xd1, 0x81},
- []byte{0xd1, 0x82}, []byte{0xd1, 0x83}, []byte{0xd0, 0xb6}, []byte{0xd0, 0xb2}, []byte{0xd1, 0x8c},
- []byte{0x69}, []byte{0xd0, 0xb7}, []byte{0xd1, 0x88}, []byte{0xd1, 0x8d}, []byte{0xd1, 0x89},
- []byte{0xd1, 0x87}, []byte{0xc3, 0xbf},
- }
- teletextCharsetG0Greek = &teletextCharset{
- []byte{0x20}, []byte{0x21}, []byte{0x22}, []byte{0x23}, []byte{0x24}, []byte{0x25}, []byte{0x26},
- []byte{0x27}, []byte{0x28}, []byte{0x29}, []byte{0x2a}, []byte{0x2b}, []byte{0x2c}, []byte{0x2d},
- []byte{0x2e}, []byte{0x2f}, []byte{0x30}, []byte{0x31}, []byte{0x32}, []byte{0x33}, []byte{0x34},
- []byte{0x35}, []byte{0x36}, []byte{0x37}, []byte{0x38}, []byte{0x39}, []byte{0x3a}, []byte{0x3b},
- []byte{0x3c}, []byte{0x3d}, []byte{0x3e}, []byte{0x3f}, []byte{0xce, 0x90}, []byte{0xce, 0x91},
- []byte{0xce, 0x92}, []byte{0xce, 0x93}, []byte{0xce, 0x94}, []byte{0xce, 0x95}, []byte{0xce, 0x96},
- []byte{0xce, 0x97}, []byte{0xce, 0x98}, []byte{0xce, 0x99}, []byte{0xce, 0x9a}, []byte{0xce, 0x9b},
- []byte{0xce, 0x9c}, []byte{0xce, 0x9d}, []byte{0xce, 0x9e}, []byte{0xce, 0x9f}, []byte{0xce, 0xa0},
- []byte{0xce, 0xa1}, []byte{0xce, 0xa2}, []byte{0xce, 0xa3}, []byte{0xce, 0xa4}, []byte{0xce, 0xa5},
- []byte{0xce, 0xa6}, []byte{0xce, 0xa7}, []byte{0xce, 0xa8}, []byte{0xce, 0xa9}, []byte{0xce, 0xaa},
- []byte{0xce, 0xab}, []byte{0xce, 0xac}, []byte{0xce, 0xad}, []byte{0xce, 0xae}, []byte{0xce, 0xaf},
- []byte{0xce, 0xb0}, []byte{0xce, 0xb1}, []byte{0xce, 0xb2}, []byte{0xce, 0xb3}, []byte{0xce, 0xb4},
- []byte{0xce, 0xb5}, []byte{0xce, 0xb6}, []byte{0xce, 0xb7}, []byte{0xce, 0xb8}, []byte{0xce, 0xb9},
- []byte{0xce, 0xba}, []byte{0xce, 0xbb}, []byte{0xce, 0xbc}, []byte{0xce, 0xbd}, []byte{0xce, 0xbe},
- []byte{0xce, 0xbf}, []byte{0xcf, 0x80}, []byte{0xcf, 0x81}, []byte{0xcf, 0x82}, []byte{0xcf, 0x83},
- []byte{0xcf, 0x84}, []byte{0xcf, 0x85}, []byte{0xcf, 0x86}, []byte{0xcf, 0x87}, []byte{0xcf, 0x88},
- []byte{0xcf, 0x89}, []byte{0xcf, 0x8a}, []byte{0xcf, 0x8b}, []byte{0xcf, 0x8c}, []byte{0xcf, 0x8d},
- []byte{0xcf, 0x8e}, []byte{0xcf, 0x8f},
- }
- teletextCharsetG0Latin = &teletextCharset{
- []byte{0x20}, []byte{0x21}, []byte{0x22}, []byte{0xc2, 0xa3}, []byte{0x24}, []byte{0x25}, []byte{0x26},
- []byte{0x27}, []byte{0x28}, []byte{0x29}, []byte{0x2a}, []byte{0x2b}, []byte{0x2c}, []byte{0x2d},
- []byte{0x2e}, []byte{0x2f}, []byte{0x30}, []byte{0x31}, []byte{0x32}, []byte{0x33}, []byte{0x34},
- []byte{0x35}, []byte{0x36}, []byte{0x37}, []byte{0x38}, []byte{0x39}, []byte{0x3a}, []byte{0x3b},
- []byte{0x3c}, []byte{0x3d}, []byte{0x3e}, []byte{0x3f}, []byte{0x40}, []byte{0x41}, []byte{0x42},
- []byte{0x43}, []byte{0x44}, []byte{0x45}, []byte{0x46}, []byte{0x47}, []byte{0x48}, []byte{0x49},
- []byte{0x4a}, []byte{0x4b}, []byte{0x4c}, []byte{0x4d}, []byte{0x4e}, []byte{0x4f}, []byte{0x50},
- []byte{0x51}, []byte{0x52}, []byte{0x53}, []byte{0x54}, []byte{0x55}, []byte{0x56}, []byte{0x57},
- []byte{0x58}, []byte{0x59}, []byte{0x5a}, []byte{0xc2, 0xab}, []byte{0xc2, 0xbd}, []byte{0xc2, 0xbb},
- []byte{0x5e}, []byte{0x23}, []byte{0x2d}, []byte{0x61}, []byte{0x62}, []byte{0x63}, []byte{0x64},
- []byte{0x65}, []byte{0x66}, []byte{0x67}, []byte{0x68}, []byte{0x69}, []byte{0x6a}, []byte{0x6b},
- []byte{0x6c}, []byte{0x6d}, []byte{0x6e}, []byte{0x6f}, []byte{0x70}, []byte{0x71}, []byte{0x72},
- []byte{0x73}, []byte{0x74}, []byte{0x75}, []byte{0x76}, []byte{0x77}, []byte{0x78}, []byte{0x79},
- []byte{0x7a}, []byte{0xc2, 0xbc}, []byte{0xc2, 0xa6}, []byte{0xc2, 0xbe}, []byte{0xc3, 0xb7}, []byte{0x7f},
- }
- // TODO Add
- teletextCharsetG0Arabic = teletextCharsetG0Latin
- teletextCharsetG0Hebrew = teletextCharsetG0Latin
-)
-
-// Teletext G2 charsets
-var (
- teletextCharsetG2Latin = &teletextCharset{
- []byte{0x20}, []byte{0xc2, 0xa1}, []byte{0xc2, 0xa2}, []byte{0xc2, 0xa3}, []byte{0x24},
- []byte{0xc2, 0xa5}, []byte{0x23}, []byte{0xc2, 0xa7}, []byte{0xc2, 0xa4}, []byte{0xe2, 0x80, 0x98},
- []byte{0xe2, 0x80, 0x9c}, []byte{0xc2, 0xab}, []byte{0xe2, 0x86, 0x90}, []byte{0xe2, 0x86, 0x91},
- []byte{0xe2, 0x86, 0x92}, []byte{0xe2, 0x86, 0x93}, []byte{0xc2, 0xb0}, []byte{0xc2, 0xb1},
- []byte{0xc2, 0xb2}, []byte{0xc2, 0xb3}, []byte{0xc3, 0x97}, []byte{0xc2, 0xb5}, []byte{0xc2, 0xb6},
- []byte{0xc2, 0xb7}, []byte{0xc3, 0xb7}, []byte{0xe2, 0x80, 0x99}, []byte{0xe2, 0x80, 0x9d},
- []byte{0xc2, 0xbb}, []byte{0xc2, 0xbc}, []byte{0xc2, 0xbd}, []byte{0xc2, 0xbe}, []byte{0xc2, 0xbf},
- []byte{0x20}, []byte{0xcc, 0x80}, []byte{0xcc, 0x81}, []byte{0xcc, 0x82}, []byte{0xcc, 0x83},
- []byte{0xcc, 0x84}, []byte{0xcc, 0x86}, []byte{0xcc, 0x87}, []byte{0xcc, 0x88}, []byte{0x00},
- []byte{0xcc, 0x8a}, []byte{0xcc, 0xa7}, []byte{0x5f}, []byte{0xcc, 0x8b}, []byte{0xcc, 0xa8},
- []byte{0xcc, 0x8c}, []byte{0xe2, 0x80, 0x95}, []byte{0xc2, 0xb9}, []byte{0xc2, 0xae}, []byte{0xc2, 0xa9},
- []byte{0xe2, 0x84, 0xa2}, []byte{0xe2, 0x99, 0xaa}, []byte{0xe2, 0x82, 0xac}, []byte{0xe2, 0x80, 0xb0},
- []byte{0xce, 0xb1}, []byte{0x00}, []byte{0x00}, []byte{0x00}, []byte{0xe2, 0x85, 0x9b},
- []byte{0xe2, 0x85, 0x9c}, []byte{0xe2, 0x85, 0x9d}, []byte{0xe2, 0x85, 0x9e}, []byte{0xce, 0xa9},
- []byte{0xc3, 0x86}, []byte{0xc4, 0x90}, []byte{0xc2, 0xaa}, []byte{0xc4, 0xa6}, []byte{0x00},
- []byte{0xc4, 0xb2}, []byte{0xc4, 0xbf}, []byte{0xc5, 0x81}, []byte{0xc3, 0x98}, []byte{0xc5, 0x92},
- []byte{0xc2, 0xba}, []byte{0xc3, 0x9e}, []byte{0xc5, 0xa6}, []byte{0xc5, 0x8a}, []byte{0xc5, 0x89},
- []byte{0xc4, 0xb8}, []byte{0xc3, 0xa6}, []byte{0xc4, 0x91}, []byte{0xc3, 0xb0}, []byte{0xc4, 0xa7},
- []byte{0xc4, 0xb1}, []byte{0xc4, 0xb3}, []byte{0xc5, 0x80}, []byte{0xc5, 0x82}, []byte{0xc3, 0xb8},
- []byte{0xc5, 0x93}, []byte{0xc3, 0x9f}, []byte{0xc3, 0xbe}, []byte{0xc5, 0xa7}, []byte{0xc5, 0x8b},
- []byte{0x20},
- }
- // TODO Add
- teletextCharsetG2Arabic = teletextCharsetG2Latin
- teletextCharsetG2Cyrillic = teletextCharsetG2Latin
- teletextCharsetG2Greek = teletextCharsetG2Latin
-)
-
-var teletextNationalSubsetCharactersPositionInG0 = [13]uint8{0x03, 0x04, 0x20, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x5b, 0x5c, 0x5d, 0x5e}
-
-// Teletext national subsets
-var (
- teletextNationalSubsetCzechSlovak = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc5, 0xaf}, []byte{0xc4, 0x8d}, []byte{0xc5, 0xa5}, []byte{0xc5, 0xbe},
- []byte{0xc3, 0xbd}, []byte{0xc3, 0xad}, []byte{0xc5, 0x99}, []byte{0xc3, 0xa9}, []byte{0xc3, 0xa1},
- []byte{0xc4, 0x9b}, []byte{0xc3, 0xba}, []byte{0xc5, 0xa1},
- }
- teletextNationalSubsetEnglish = &teletextNationalSubset{
- []byte{0xc2, 0xa3}, []byte{0x24}, []byte{0x40}, []byte{0xc2, 0xab}, []byte{0xc2, 0xbd}, []byte{0xc2, 0xbb},
- []byte{0x5e}, []byte{0x23}, []byte{0x2d}, []byte{0xc2, 0xbc}, []byte{0xc2, 0xa6}, []byte{0xc2, 0xbe},
- []byte{0xc3, 0xb7},
- }
- teletextNationalSubsetEstonian = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc3, 0xb5}, []byte{0xc5, 0xa0}, []byte{0xc3, 0x84}, []byte{0xc3, 0x96},
- []byte{0xc5, 0xbe}, []byte{0xc3, 0x9c}, []byte{0xc3, 0x95}, []byte{0xc5, 0xa1}, []byte{0xc3, 0xa4},
- []byte{0xc3, 0xb6}, []byte{0xc5, 0xbe}, []byte{0xc3, 0xbc},
- }
- teletextNationalSubsetFrench = &teletextNationalSubset{
- []byte{0xc3, 0xa9}, []byte{0xc3, 0xaf}, []byte{0xc3, 0xa0}, []byte{0xc3, 0xab}, []byte{0xc3, 0xaa},
- []byte{0xc3, 0xb9}, []byte{0xc3, 0xae}, []byte{0x23}, []byte{0xc3, 0xa8}, []byte{0xc3, 0xa2},
- []byte{0xc3, 0xb4}, []byte{0xc3, 0xbb}, []byte{0xc3, 0xa7},
- }
- teletextNationalSubsetGerman = &teletextNationalSubset{
- []byte{0x23}, []byte{0x24}, []byte{0xc2, 0xa7}, []byte{0xc3, 0x84}, []byte{0xc3, 0x96}, []byte{0xc3, 0x9c},
- []byte{0x5e}, []byte{0x5f}, []byte{0xc2, 0xb0}, []byte{0xc3, 0xa4}, []byte{0xc3, 0xb6}, []byte{0xc3, 0xbc},
- []byte{0xc3, 0x9f},
- }
- teletextNationalSubsetItalian = &teletextNationalSubset{
- []byte{0xc2, 0xa3}, []byte{0x24}, []byte{0xc3, 0xa9}, []byte{0xc2, 0xb0}, []byte{0xc3, 0xa7},
- []byte{0xc2, 0xbb}, []byte{0x5e}, []byte{0x23}, []byte{0xc3, 0xb9}, []byte{0xc3, 0xa0}, []byte{0xc3, 0xb2},
- []byte{0xc3, 0xa8}, []byte{0xc3, 0xac},
- }
- teletextNationalSubsetLettishLithuanian = &teletextNationalSubset{
- []byte{0x23}, []byte{0x24}, []byte{0xc5, 0xa0}, []byte{0xc4, 0x97}, []byte{0xc4, 0x99}, []byte{0xc5, 0xbd},
- []byte{0xc4, 0x8d}, []byte{0xc5, 0xab}, []byte{0xc5, 0xa1}, []byte{0xc4, 0x85}, []byte{0xc5, 0xb3},
- []byte{0xc5, 0xbe}, []byte{0xc4, 0xaf},
- }
- teletextNationalSubsetPolish = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc5, 0x84}, []byte{0xc4, 0x85}, []byte{0xc5, 0xbb}, []byte{0xc5, 0x9a},
- []byte{0xc5, 0x81}, []byte{0xc4, 0x87}, []byte{0xc3, 0xb3}, []byte{0xc4, 0x99}, []byte{0xc5, 0xbc},
- []byte{0xc5, 0x9b}, []byte{0xc5, 0x82}, []byte{0xc5, 0xba},
- }
- teletextNationalSubsetPortugueseSpanish = &teletextNationalSubset{
- []byte{0xc3, 0xa7}, []byte{0x24}, []byte{0xc2, 0xa1}, []byte{0xc3, 0xa1}, []byte{0xc3, 0xa9},
- []byte{0xc3, 0xad}, []byte{0xc3, 0xb3}, []byte{0xc3, 0xba}, []byte{0xc2, 0xbf}, []byte{0xc3, 0xbc},
- []byte{0xc3, 0xb1}, []byte{0xc3, 0xa8}, []byte{0xc3, 0xa0},
- }
- teletextNationalSubsetRomanian = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc2, 0xa4}, []byte{0xc5, 0xa2}, []byte{0xc3, 0x82}, []byte{0xc5, 0x9e},
- []byte{0xc4, 0x82}, []byte{0xc3, 0x8e}, []byte{0xc4, 0xb1}, []byte{0xc5, 0xa3}, []byte{0xc3, 0xa2},
- []byte{0xc5, 0x9f}, []byte{0xc4, 0x83}, []byte{0xc3, 0xae},
- }
- teletextNationalSubsetSerbianCroatianSlovenian = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc3, 0x8b}, []byte{0xc4, 0x8c}, []byte{0xc4, 0x86}, []byte{0xc5, 0xbd},
- []byte{0xc4, 0x90}, []byte{0xc5, 0xa0}, []byte{0xc3, 0xab}, []byte{0xc4, 0x8d}, []byte{0xc4, 0x87},
- []byte{0xc5, 0xbe}, []byte{0xc4, 0x91}, []byte{0xc5, 0xa1},
- }
- teletextNationalSubsetSwedishFinnishHungarian = &teletextNationalSubset{
- []byte{0x23}, []byte{0xc2, 0xa4}, []byte{0xc3, 0x89}, []byte{0xc3, 0x84}, []byte{0xc3, 0x96},
- []byte{0xc3, 0x85}, []byte{0xc3, 0x9c}, []byte{0x5f}, []byte{0xc3, 0xa9}, []byte{0xc3, 0xa4},
- []byte{0xc3, 0xb6}, []byte{0xc3, 0xa5}, []byte{0xc3, 0xbc},
- }
- teletextNationalSubsetTurkish = &teletextNationalSubset{
- []byte{0x54}, []byte{0xc4, 0x9f}, []byte{0xc4, 0xb0}, []byte{0xc5, 0x9e}, []byte{0xc3, 0x96},
- []byte{0xc3, 0x87}, []byte{0xc3, 0x9c}, []byte{0xc4, 0x9e}, []byte{0xc4, 0xb1}, []byte{0xc5, 0x9f},
- []byte{0xc3, 0xb6}, []byte{0xc3, 0xa7}, []byte{0xc3, 0xbc},
- }
-)
-
-// Teletext PES data types
-const (
- teletextPESDataTypeEBU = "EBU"
- teletextPESDataTypeUnknown = "unknown"
-)
-
-func teletextPESDataType(dataIdentifier uint8) string {
- switch {
- case dataIdentifier >= 0x10 && dataIdentifier <= 0x1f:
- return teletextPESDataTypeEBU
- }
- return teletextPESDataTypeUnknown
-}
-
-// Teletext PES data unit ids
-const (
- teletextPESDataUnitIDEBUNonSubtitleData = 0x2
- teletextPESDataUnitIDEBUSubtitleData = 0x3
- teletextPESDataUnitIDStuffing = 0xff
-)
-
-// TeletextOptions represents teletext options
-type TeletextOptions struct {
- Page int
- PID int
-}
-
-// ReadFromTeletext parses a teletext content
-// http://www.etsi.org/deliver/etsi_en/300400_300499/300472/01.03.01_60/en_300472v010301p.pdf
-// http://www.etsi.org/deliver/etsi_i_ets/300700_300799/300706/01_60/ets_300706e01p.pdf
-// TODO Update README
-// TODO Add tests
-func ReadFromTeletext(r io.Reader, o TeletextOptions) (s *Subtitles, err error) {
- // Init
- s = &Subtitles{}
- var dmx = astits.NewDemuxer(context.Background(), r)
-
- // Get the teletext PID
- var pid uint16
- if pid, err = teletextPID(dmx, o); err != nil {
- if err != ErrNoValidTeletextPID {
- err = fmt.Errorf("astisub: getting teletext PID failed: %w", err)
- }
- return
- }
-
- // Create character decoder
- cd := newTeletextCharacterDecoder()
-
- // Create page buffer
- b := newTeletextPageBuffer(o.Page, cd)
-
- // Loop in data
- var firstTime, lastTime time.Time
- var d *astits.DemuxerData
- var ps []*teletextPage
- for {
- // Fetch next data
- if d, err = dmx.NextData(); err != nil {
- if err == astits.ErrNoMorePackets {
- err = nil
- break
- }
- err = fmt.Errorf("astisub: fetching next data failed: %w", err)
- return
- }
-
- // We only parse PES data
- if d.PES == nil {
- continue
- }
-
- // This data is not of interest to us
- if d.PID != pid || d.PES.Header.StreamID != astits.StreamIDPrivateStream1 {
- continue
- }
-
- // Get time
- t := teletextDataTime(d)
- if t.IsZero() {
- continue
- }
-
- // First and last time
- if firstTime.IsZero() || firstTime.After(t) {
- firstTime = t
- }
- if lastTime.IsZero() || lastTime.Before(t) {
- lastTime = t
- }
-
- // Append pages
- ps = append(ps, b.process(d.PES, t)...)
- }
-
- // Dump buffer
- ps = append(ps, b.dump(lastTime)...)
-
- // Parse pages
- for _, p := range ps {
- p.parse(s, cd, firstTime)
- }
- return
-}
-
-// TODO Add tests
-func teletextDataTime(d *astits.DemuxerData) time.Time {
- if d.PES.Header != nil && d.PES.Header.OptionalHeader != nil && d.PES.Header.OptionalHeader.PTS != nil {
- return d.PES.Header.OptionalHeader.PTS.Time()
- } else if d.FirstPacket != nil && d.FirstPacket.AdaptationField != nil && d.FirstPacket.AdaptationField.PCR != nil {
- return d.FirstPacket.AdaptationField.PCR.Time()
- }
- return time.Time{}
-}
-
-// If the PID teletext option is not indicated, it will walk through the ts data until it reaches a PMT packet to
-// detect the first valid teletext PID
-// TODO Add tests
-func teletextPID(dmx *astits.Demuxer, o TeletextOptions) (pid uint16, err error) {
- // PID is in the options
- if o.PID > 0 {
- pid = uint16(o.PID)
- return
- }
-
- // Loop in data
- var d *astits.DemuxerData
- for {
- // Fetch next data
- if d, err = dmx.NextData(); err != nil {
- if err == astits.ErrNoMorePackets {
- err = ErrNoValidTeletextPID
- return
- }
- err = fmt.Errorf("astisub: fetching next data failed: %w", err)
- return
- }
-
- // PMT data
- if d.PMT != nil {
- // Retrieve valid teletext PIDs
- var pids []uint16
- for _, s := range d.PMT.ElementaryStreams {
- for _, dsc := range s.ElementaryStreamDescriptors {
- if dsc.Tag == astits.DescriptorTagTeletext || dsc.Tag == astits.DescriptorTagVBITeletext {
- pids = append(pids, s.ElementaryPID)
- }
- }
- }
-
- // No valid teletext PIDs
- if len(pids) == 0 {
- err = ErrNoValidTeletextPID
- return
- }
-
- // Set pid
- pid = pids[0]
- log.Printf("astisub: no teletext pid specified, using pid %d", pid)
-
- // Rewind
- if _, err = dmx.Rewind(); err != nil {
- err = fmt.Errorf("astisub: rewinding failed: %w", err)
- return
- }
- return
- }
- }
-}
-
-type teletextPageBuffer struct {
- cd *teletextCharacterDecoder
- currentPage *teletextPage
- donePages []*teletextPage
- magazineNumber uint8
- pageNumber int
- receiving bool
-}
-
-func newTeletextPageBuffer(page int, cd *teletextCharacterDecoder) *teletextPageBuffer {
- return &teletextPageBuffer{
- cd: cd,
- magazineNumber: uint8(page / 100),
- pageNumber: page % 100,
- }
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) dump(lastTime time.Time) (ps []*teletextPage) {
- if b.currentPage != nil {
- b.currentPage.end = lastTime
- ps = []*teletextPage{b.currentPage}
- }
- return
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) process(d *astits.PESData, t time.Time) (ps []*teletextPage) {
- // Data identifier
- var offset int
- dataIdentifier := uint8(d.Data[offset])
- offset += 1
-
- // Check data type
- if teletextPESDataType(dataIdentifier) != teletextPESDataTypeEBU {
- return
- }
-
- // Loop through data units
- for offset < len(d.Data) {
- // ID
- id := uint8(d.Data[offset])
- offset += 1
-
- // Length
- length := uint8(d.Data[offset])
- offset += 1
-
- // Offset end
- offsetEnd := offset + int(length)
- if offsetEnd > len(d.Data) {
- break
- }
-
- // Parse data unit
- b.parseDataUnit(d.Data[offset:offsetEnd], id, t)
-
- // Seek to end of data unit
- offset = offsetEnd
- }
-
- // Dump buffer
- ps = b.donePages
- b.donePages = []*teletextPage(nil)
- return ps
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parseDataUnit(i []byte, id uint8, t time.Time) {
- // Check id
- if id != teletextPESDataUnitIDEBUSubtitleData {
- return
- }
-
- // Field parity: i[0]&0x20 > 0
- // Line offset: uint8(i[0] & 0x1f)
- // Framing code
- framingCode := uint8(i[1])
-
- // Check framing code
- if framingCode != 0xe4 {
- return
- }
-
- // Magazine number and packet number
- h1, ok := astikit.ByteHamming84Decode(i[2])
- if !ok {
- return
- }
- h2, ok := astikit.ByteHamming84Decode(i[3])
- if !ok {
- return
- }
- h := h2<<4 | h1
- magazineNumber := h & 0x7
- if magazineNumber == 0 {
- magazineNumber = 8
- }
- packetNumber := h >> 3
-
- // Parse packet
- b.parsePacket(i[4:], magazineNumber, packetNumber, t)
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parsePacket(i []byte, magazineNumber, packetNumber uint8, t time.Time) {
- if packetNumber == 0 {
- b.parsePacketHeader(i, magazineNumber, t)
- } else if b.receiving && magazineNumber == b.magazineNumber && (packetNumber >= 1 && packetNumber <= 25) {
- b.parsePacketData(i, packetNumber)
- } else {
- // Designation code
- designationCode, ok := astikit.ByteHamming84Decode(i[0])
- if !ok {
- return
- }
-
- // Parse packet
- if b.receiving && magazineNumber == b.magazineNumber && packetNumber == 26 {
- // TODO Implement
- } else if b.receiving && magazineNumber == b.magazineNumber && packetNumber == 28 {
- b.parsePacket28And29(i[1:], packetNumber, designationCode)
- } else if magazineNumber == b.magazineNumber && packetNumber == 29 {
- b.parsePacket28And29(i[1:], packetNumber, designationCode)
- } else if magazineNumber == 8 && packetNumber == 30 {
- b.parsePacket30(i, designationCode)
- }
- }
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parsePacketHeader(i []byte, magazineNumber uint8, t time.Time) (transmissionDone bool) {
- // Page number units
- pageNumberUnits, ok := astikit.ByteHamming84Decode(i[0])
- if !ok {
- return
- }
-
- // Page number tens
- pageNumberTens, ok := astikit.ByteHamming84Decode(i[1])
- if !ok {
- return
- }
- pageNumber := int(pageNumberTens)*10 + int(pageNumberUnits)
-
- // 0xff is a reserved page number value
- if pageNumberTens == 0xf && pageNumberUnits == 0xf {
- return
- }
-
- // Update magazine and page number
- if b.magazineNumber == 0 && b.pageNumber == 0 {
- // C6
- controlBits, ok := astikit.ByteHamming84Decode(i[5])
- if !ok {
- return
- }
- subtitleFlag := controlBits&0x8 > 0
-
- // This is a subtitle page
- if subtitleFlag {
- b.magazineNumber = magazineNumber
- b.pageNumber = pageNumber
- log.Printf("astisub: no teletext page specified, using page %d%.2d", b.magazineNumber, b.pageNumber)
- }
- }
-
- // C11 --> C14
- controlBits, ok := astikit.ByteHamming84Decode(i[7])
- if !ok {
- return
- }
- magazineSerial := controlBits&0x1 > 0
- charsetCode := controlBits >> 1
-
- // Page transmission is done
- if b.receiving && ((magazineSerial && pageNumber != b.pageNumber) ||
- (!magazineSerial && pageNumber != b.pageNumber && magazineNumber == b.magazineNumber)) {
- b.receiving = false
- return
- }
-
- // Invalid magazine or page number
- if pageNumber != b.pageNumber || magazineNumber != b.magazineNumber {
- return
- }
-
- // Now that we know when the previous page ends we can add it to the done slice
- if b.currentPage != nil {
- b.currentPage.end = t
- b.donePages = append(b.donePages, b.currentPage)
- }
-
- // Reset
- b.receiving = true
- b.currentPage = newTeletextPage(charsetCode, t)
- return
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parsePacketData(i []byte, packetNumber uint8) {
- // Make sure the map is initialized
- if _, ok := b.currentPage.data[packetNumber]; !ok {
- b.currentPage.data[packetNumber] = make([]byte, 40)
- }
-
- // Loop through input
- b.currentPage.rows = append(b.currentPage.rows, int(packetNumber))
- for idx := uint8(0); idx < 40; idx++ {
- v, ok := astikit.ByteParity(bits.Reverse8(i[idx]))
- if !ok {
- v = 0
- }
- b.currentPage.data[packetNumber][idx] = v
- }
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parsePacket28And29(i []byte, packetNumber, designationCode uint8) {
- // Invalid designation code
- if designationCode != 0 && designationCode != 4 {
- return
- }
-
- // Triplet 1
- // TODO triplet1 should be the results of hamming 24/18 decoding
- triplet1 := uint32(i[2])<<16 | uint32(i[1])<<8 | uint32(i[0])
-
- // We only process x/28 format 1
- if packetNumber == 28 && triplet1&0xf > 0 {
- return
- }
-
- // Update character decoder
- if packetNumber == 28 {
- b.cd.setTripletX28(triplet1)
- } else {
- b.cd.setTripletM29(triplet1)
- }
-}
-
-// TODO Add tests
-func (b *teletextPageBuffer) parsePacket30(i []byte, designationCode uint8) {
- // Switch on designation code to determine format
- switch designationCode {
- case 0, 1:
- b.parsePacket30Format1(i)
- case 2, 3:
- b.parsePacket30Format2(i)
- }
-}
-
-func (b *teletextPageBuffer) parsePacket30Format1(i []byte) {
- // TODO Implement
-
-}
-
-func (b *teletextPageBuffer) parsePacket30Format2(i []byte) {
- // TODO Implement
-}
-
-type teletextCharacterDecoder struct {
- c teletextCharset
- lastPageCharsetCode *uint8
- tripletM29 *uint32
- tripletX28 *uint32
-}
-
-func newTeletextCharacterDecoder() *teletextCharacterDecoder {
- return &teletextCharacterDecoder{}
-}
-
-// TODO Add tests
-func (d *teletextCharacterDecoder) setTripletM29(i uint32) {
- if *d.tripletM29 != i {
- d.tripletM29 = astikit.UInt32Ptr(i)
- d.updateCharset(d.lastPageCharsetCode, true)
- }
-}
-
-// TODO Add tests
-func (d *teletextCharacterDecoder) setTripletX28(i uint32) {
- if *d.tripletX28 != i {
- d.tripletX28 = astikit.UInt32Ptr(i)
- d.updateCharset(d.lastPageCharsetCode, true)
- }
-}
-
-// TODO Add tests
-func (d *teletextCharacterDecoder) decode(i byte) []byte {
- if i < 0x20 {
- return []byte{}
- }
- return d.c[i-0x20]
-}
-
-// TODO Add tests
-func (d *teletextCharacterDecoder) updateCharset(pageCharsetCode *uint8, force bool) {
- // Charset is up to date
- if d.lastPageCharsetCode != nil && *pageCharsetCode == *d.lastPageCharsetCode && !force {
- return
- }
- d.lastPageCharsetCode = pageCharsetCode
-
- // Get triplet
- var triplet uint32
- if d.tripletX28 != nil {
- triplet = *d.tripletX28
- } else if d.tripletM29 != nil {
- triplet = *d.tripletM29
- }
-
- // Get charsets
- d.c = *teletextCharsetG0Latin
- var nationalOptionSubset *teletextNationalSubset
- if v1, ok := teletextCharsets[uint8((triplet&0x3f80)>>10)]; ok {
- if v2, ok := v1[*pageCharsetCode]; ok {
- d.c = *v2.g0
- nationalOptionSubset = v2.national
- }
- }
-
- // Update g0 with national option subset
- if nationalOptionSubset != nil {
- for k, v := range nationalOptionSubset {
- d.c[teletextNationalSubsetCharactersPositionInG0[k]] = v
- }
- }
-}
-
-type teletextPage struct {
- charsetCode uint8
- data map[uint8][]byte
- end time.Time
- rows []int
- start time.Time
-}
-
-func newTeletextPage(charsetCode uint8, start time.Time) *teletextPage {
- return &teletextPage{
- charsetCode: charsetCode,
- data: make(map[uint8][]byte),
- start: start,
- }
-}
-
-func (p *teletextPage) parse(s *Subtitles, d *teletextCharacterDecoder, firstTime time.Time) {
- // Update charset
- d.updateCharset(astikit.UInt8Ptr(p.charsetCode), false)
-
- // No data
- if len(p.data) == 0 {
- return
- }
-
- // Order rows
- sort.Ints(p.rows)
-
- // Create item
- i := &Item{
- EndAt: p.end.Sub(firstTime),
- StartAt: p.start.Sub(firstTime),
- }
-
- // Loop through rows
- for _, idxRow := range p.rows {
- parseTeletextRow(i, d, nil, p.data[uint8(idxRow)])
- }
-
- // Append item
- s.Items = append(s.Items, i)
-}
-
-type decoder interface {
- decode(i byte) []byte
-}
-
-type styler interface {
- hasBeenSet() bool
- hasChanged(s *StyleAttributes) bool
- parseSpacingAttribute(i byte)
- propagateStyleAttributes(s *StyleAttributes)
- update(sa *StyleAttributes)
-}
-
-func parseTeletextRow(i *Item, d decoder, fs func() styler, row []byte) {
- // Loop through columns
- var l = Line{}
- var li = LineItem{InlineStyle: &StyleAttributes{}}
- var started bool
- var s styler
- for _, v := range row {
- // Create specific styler
- if fs != nil {
- s = fs()
- }
-
- // Get spacing attributes
- var color *Color
- var doubleHeight, doubleSize, doubleWidth *bool
- switch v {
- case 0x0:
- color = ColorBlack
- case 0x1:
- color = ColorRed
- case 0x2:
- color = ColorGreen
- case 0x3:
- color = ColorYellow
- case 0x4:
- color = ColorBlue
- case 0x5:
- color = ColorMagenta
- case 0x6:
- color = ColorCyan
- case 0x7:
- color = ColorWhite
- case 0xa:
- started = false
- case 0xb:
- started = true
- case 0xc:
- doubleHeight = astikit.BoolPtr(false)
- doubleSize = astikit.BoolPtr(false)
- doubleWidth = astikit.BoolPtr(false)
- case 0xd:
- doubleHeight = astikit.BoolPtr(true)
- case 0xe:
- doubleWidth = astikit.BoolPtr(true)
- case 0xf:
- doubleSize = astikit.BoolPtr(true)
- default:
- if s != nil {
- s.parseSpacingAttribute(v)
- }
- }
-
- // Style has been set
- if color != nil || doubleHeight != nil || doubleSize != nil || doubleWidth != nil || (s != nil && s.hasBeenSet()) {
- // Style has changed
- if color != li.InlineStyle.TeletextColor || doubleHeight != li.InlineStyle.TeletextDoubleHeight ||
- doubleSize != li.InlineStyle.TeletextDoubleSize || doubleWidth != li.InlineStyle.TeletextDoubleWidth ||
- (s != nil && s.hasChanged(li.InlineStyle)) {
- // Line has started
- if started {
- // Append line item
- appendTeletextLineItem(&l, li, s)
-
- // Create new line item
- sa := &StyleAttributes{}
- *sa = *li.InlineStyle
- li = LineItem{InlineStyle: sa}
- }
-
- // Update style attributes
- if color != nil && color != li.InlineStyle.TeletextColor {
- li.InlineStyle.TeletextColor = color
- }
- if doubleHeight != nil && doubleHeight != li.InlineStyle.TeletextDoubleHeight {
- li.InlineStyle.TeletextDoubleHeight = doubleHeight
- }
- if doubleSize != nil && doubleSize != li.InlineStyle.TeletextDoubleSize {
- li.InlineStyle.TeletextDoubleSize = doubleSize
- }
- if doubleWidth != nil && doubleWidth != li.InlineStyle.TeletextDoubleWidth {
- li.InlineStyle.TeletextDoubleWidth = doubleWidth
- }
- if s != nil {
- s.update(li.InlineStyle)
- }
- }
- } else if started {
- // Append text
- li.Text += string(d.decode(v))
- }
- }
-
- // Append line item
- appendTeletextLineItem(&l, li, s)
-
- // Append line
- if len(l.Items) > 0 {
- i.Lines = append(i.Lines, l)
- }
-}
-
-func appendTeletextLineItem(l *Line, li LineItem, s styler) {
- // There's some text
- if len(strings.TrimSpace(li.Text)) > 0 {
- // Make sure inline style exists
- if li.InlineStyle == nil {
- li.InlineStyle = &StyleAttributes{}
- }
-
- // Get number of spaces before
- li.InlineStyle.TeletextSpacesBefore = astikit.IntPtr(0)
- for _, c := range li.Text {
- if c == ' ' {
- *li.InlineStyle.TeletextSpacesBefore++
- } else {
- break
- }
- }
-
- // Get number of spaces after
- li.InlineStyle.TeletextSpacesAfter = astikit.IntPtr(0)
- for idx := len(li.Text) - 1; idx >= 0; idx-- {
- if li.Text[idx] == ' ' {
- *li.InlineStyle.TeletextSpacesAfter++
- } else {
- break
- }
- }
-
- // Propagate style attributes
- li.InlineStyle.propagateTeletextAttributes()
- if s != nil {
- s.propagateStyleAttributes(li.InlineStyle)
- }
-
- // Append line item
- li.Text = strings.TrimSpace(li.Text)
- l.Items = append(l.Items, li)
- }
-}
diff --git a/vendor/github.com/asticode/go-astisub/ttml.go b/vendor/github.com/asticode/go-astisub/ttml.go
deleted file mode 100644
index 2e8046baa31..00000000000
--- a/vendor/github.com/asticode/go-astisub/ttml.go
+++ /dev/null
@@ -1,686 +0,0 @@
-package astisub
-
-import (
- "encoding/xml"
- "fmt"
- "io"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// https://www.w3.org/TR/ttaf1-dfxp/
-// http://www.skynav.com:8080/ttv/check
-// https://www.speechpad.com/captions/ttml
-
-// TTML languages
-const (
- ttmlLanguageChinese = "zh"
- ttmlLanguageEnglish = "en"
- ttmlLanguageJapanese = "ja"
- ttmlLanguageFrench = "fr"
- ttmlLanguageNorwegian = "no"
-)
-
-// TTML language mapping
-var ttmlLanguageMapping = astikit.NewBiMap().
- Set(ttmlLanguageChinese, LanguageChinese).
- Set(ttmlLanguageEnglish, LanguageEnglish).
- Set(ttmlLanguageFrench, LanguageFrench).
- Set(ttmlLanguageJapanese, LanguageJapanese).
- Set(ttmlLanguageNorwegian, LanguageNorwegian)
-
-// TTML Clock Time Frames and Offset Time
-var (
- ttmlRegexpClockTimeFrames = regexp.MustCompile(`\:[\d]+$`)
- ttmlRegexpOffsetTime = regexp.MustCompile(`^(\d+(\.\d+)?)(h|m|s|ms|f|t)$`)
-)
-
-// TTMLIn represents an input TTML that must be unmarshaled
-// We split it from the output TTML as we can't add strict namespace without breaking retrocompatibility
-type TTMLIn struct {
- Framerate int `xml:"frameRate,attr"`
- Lang string `xml:"lang,attr"`
- Metadata TTMLInMetadata `xml:"head>metadata"`
- Regions []TTMLInRegion `xml:"head>layout>region"`
- Styles []TTMLInStyle `xml:"head>styling>style"`
- Subtitles []TTMLInSubtitle `xml:"body>div>p"`
- Tickrate int `xml:"tickRate,attr"`
- XMLName xml.Name `xml:"tt"`
-}
-
-// metadata returns the Metadata of the TTML
-func (t TTMLIn) metadata() (m *Metadata) {
- m = &Metadata{
- Framerate: t.Framerate,
- Title: t.Metadata.Title,
- TTMLCopyright: t.Metadata.Copyright,
- }
- if v, ok := ttmlLanguageMapping.Get(astikit.StrPad(t.Lang, ' ', 2, astikit.PadCut)); ok {
- m.Language = v.(string)
- }
- return
-}
-
-// TTMLInMetadata represents an input TTML Metadata
-type TTMLInMetadata struct {
- Copyright string `xml:"copyright"`
- Title string `xml:"title"`
-}
-
-// TTMLInStyleAttributes represents input TTML style attributes
-type TTMLInStyleAttributes struct {
- BackgroundColor *string `xml:"backgroundColor,attr,omitempty"`
- Color *string `xml:"color,attr,omitempty"`
- Direction *string `xml:"direction,attr,omitempty"`
- Display *string `xml:"display,attr,omitempty"`
- DisplayAlign *string `xml:"displayAlign,attr,omitempty"`
- Extent *string `xml:"extent,attr,omitempty"`
- FontFamily *string `xml:"fontFamily,attr,omitempty"`
- FontSize *string `xml:"fontSize,attr,omitempty"`
- FontStyle *string `xml:"fontStyle,attr,omitempty"`
- FontWeight *string `xml:"fontWeight,attr,omitempty"`
- LineHeight *string `xml:"lineHeight,attr,omitempty"`
- Opacity *string `xml:"opacity,attr,omitempty"`
- Origin *string `xml:"origin,attr,omitempty"`
- Overflow *string `xml:"overflow,attr,omitempty"`
- Padding *string `xml:"padding,attr,omitempty"`
- ShowBackground *string `xml:"showBackground,attr,omitempty"`
- TextAlign *string `xml:"textAlign,attr,omitempty"`
- TextDecoration *string `xml:"textDecoration,attr,omitempty"`
- TextOutline *string `xml:"textOutline,attr,omitempty"`
- UnicodeBidi *string `xml:"unicodeBidi,attr,omitempty"`
- Visibility *string `xml:"visibility,attr,omitempty"`
- WrapOption *string `xml:"wrapOption,attr,omitempty"`
- WritingMode *string `xml:"writingMode,attr,omitempty"`
- ZIndex *int `xml:"zIndex,attr,omitempty"`
-}
-
-// StyleAttributes converts TTMLInStyleAttributes into a StyleAttributes
-func (s TTMLInStyleAttributes) styleAttributes() (o *StyleAttributes) {
- o = &StyleAttributes{
- TTMLBackgroundColor: s.BackgroundColor,
- TTMLColor: s.Color,
- TTMLDirection: s.Direction,
- TTMLDisplay: s.Display,
- TTMLDisplayAlign: s.DisplayAlign,
- TTMLExtent: s.Extent,
- TTMLFontFamily: s.FontFamily,
- TTMLFontSize: s.FontSize,
- TTMLFontStyle: s.FontStyle,
- TTMLFontWeight: s.FontWeight,
- TTMLLineHeight: s.LineHeight,
- TTMLOpacity: s.Opacity,
- TTMLOrigin: s.Origin,
- TTMLOverflow: s.Overflow,
- TTMLPadding: s.Padding,
- TTMLShowBackground: s.ShowBackground,
- TTMLTextAlign: s.TextAlign,
- TTMLTextDecoration: s.TextDecoration,
- TTMLTextOutline: s.TextOutline,
- TTMLUnicodeBidi: s.UnicodeBidi,
- TTMLVisibility: s.Visibility,
- TTMLWrapOption: s.WrapOption,
- TTMLWritingMode: s.WritingMode,
- TTMLZIndex: s.ZIndex,
- }
- o.propagateTTMLAttributes()
- return
-}
-
-// TTMLInHeader represents an input TTML header
-type TTMLInHeader struct {
- ID string `xml:"id,attr,omitempty"`
- Style string `xml:"style,attr,omitempty"`
- TTMLInStyleAttributes
-}
-
-// TTMLInRegion represents an input TTML region
-type TTMLInRegion struct {
- TTMLInHeader
- XMLName xml.Name `xml:"region"`
-}
-
-// TTMLInStyle represents an input TTML style
-type TTMLInStyle struct {
- TTMLInHeader
- XMLName xml.Name `xml:"style"`
-}
-
-// TTMLInSubtitle represents an input TTML subtitle
-type TTMLInSubtitle struct {
- Begin *TTMLInDuration `xml:"begin,attr,omitempty"`
- End *TTMLInDuration `xml:"end,attr,omitempty"`
- ID string `xml:"id,attr,omitempty"`
- Items string `xml:",innerxml"` // We must store inner XML here since there's no tag to describe both any tag and chardata
- Region string `xml:"region,attr,omitempty"`
- Style string `xml:"style,attr,omitempty"`
- TTMLInStyleAttributes
-}
-
-// TTMLInItems represents input TTML items
-type TTMLInItems []TTMLInItem
-
-// UnmarshalXML implements the XML unmarshaler interface
-func (i *TTMLInItems) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
- // Get next tokens
- var t xml.Token
- for {
- // Get next token
- if t, err = d.Token(); err != nil {
- if err == io.EOF {
- break
- }
- err = fmt.Errorf("astisub: getting next token failed: %w", err)
- return
- }
-
- // Start element
- if se, ok := t.(xml.StartElement); ok {
- var e = TTMLInItem{}
- if err = d.DecodeElement(&e, &se); err != nil {
- err = fmt.Errorf("astisub: decoding xml.StartElement failed: %w", err)
- return
- }
- *i = append(*i, e)
- } else if b, ok := t.(xml.CharData); ok {
- var str = strings.TrimSpace(string(b))
- if len(str) > 0 {
- *i = append(*i, TTMLInItem{Text: str})
- }
- }
- }
- return nil
-}
-
-// TTMLInItem represents an input TTML item
-type TTMLInItem struct {
- Style string `xml:"style,attr,omitempty"`
- Text string `xml:",chardata"`
- TTMLInStyleAttributes
- XMLName xml.Name
-}
-
-// TTMLInDuration represents an input TTML duration
-type TTMLInDuration struct {
- d time.Duration
- frames, framerate int // Framerate is in frame/s
- ticks, tickrate int // Tickrate is in ticks/s
-}
-
-// UnmarshalText implements the TextUnmarshaler interface
-// Possible formats are:
-// - hh:mm:ss.mmm
-// - hh:mm:ss:fff (fff being frames)
-// - [ticks]t ([ticks] being the tick amount)
-func (d *TTMLInDuration) UnmarshalText(i []byte) (err error) {
- // Reset duration
- d.d = time.Duration(0)
- d.frames = 0
- d.ticks = 0
-
- // Check offset time
- text := string(i)
- if matches := ttmlRegexpOffsetTime.FindStringSubmatch(text); matches != nil {
- // Parse value
- var value float64
- if value, err = strconv.ParseFloat(matches[1], 64); err != nil {
- err = fmt.Errorf("astisub: failed to parse value %s", matches[1])
- return
- }
-
- // Parse metric
- metric := matches[3]
-
- // Update duration
- if metric == "t" {
- d.ticks = int(value)
- } else if metric == "f" {
- d.frames = int(value)
- } else {
- // Get timebase
- var timebase time.Duration
- switch metric {
- case "h":
- timebase = time.Hour
- case "m":
- timebase = time.Minute
- case "s":
- timebase = time.Second
- case "ms":
- timebase = time.Millisecond
- default:
- err = fmt.Errorf("astisub: invalid metric %s", metric)
- return
- }
-
- // Update duration
- d.d = time.Duration(value * float64(timebase.Nanoseconds()))
- }
- return
- }
-
- // Extract clock time frames
- if indexes := ttmlRegexpClockTimeFrames.FindStringIndex(text); indexes != nil {
- // Parse frames
- var s = text[indexes[0]+1 : indexes[1]]
- if d.frames, err = strconv.Atoi(s); err != nil {
- err = fmt.Errorf("astisub: atoi %s failed: %w", s, err)
- return
- }
-
- // Update text
- text = text[:indexes[0]] + ".000"
- }
-
- d.d, err = parseDuration(text, ".", 3)
- return
-}
-
-// duration returns the input TTML Duration's time.Duration
-func (d TTMLInDuration) duration() (o time.Duration) {
- if d.ticks > 0 && d.tickrate > 0 {
- return time.Duration(float64(d.ticks) * 1e9 / float64(d.tickrate))
- }
- o = d.d
- if d.frames > 0 && d.framerate > 0 {
- o += time.Duration(float64(d.frames) / float64(d.framerate) * float64(time.Second.Nanoseconds()))
- }
- return
-}
-
-// ReadFromTTML parses a .ttml content
-func ReadFromTTML(i io.Reader) (o *Subtitles, err error) {
- // Init
- o = NewSubtitles()
-
- // Unmarshal XML
- var ttml TTMLIn
- if err = xml.NewDecoder(i).Decode(&ttml); err != nil {
- err = fmt.Errorf("astisub: xml decoding failed: %w", err)
- return
- }
-
- // Add metadata
- o.Metadata = ttml.metadata()
-
- // Loop through styles
- var parentStyles = make(map[string]*Style)
- for _, ts := range ttml.Styles {
- var s = &Style{
- ID: ts.ID,
- InlineStyle: ts.TTMLInStyleAttributes.styleAttributes(),
- }
- o.Styles[s.ID] = s
- if len(ts.Style) > 0 {
- parentStyles[ts.Style] = s
- }
- }
-
- // Take care of parent styles
- for id, s := range parentStyles {
- if _, ok := o.Styles[id]; !ok {
- err = fmt.Errorf("astisub: Style %s requested by style %s doesn't exist", id, s.ID)
- return
- }
- s.Style = o.Styles[id]
- }
-
- // Loop through regions
- for _, tr := range ttml.Regions {
- var r = &Region{
- ID: tr.ID,
- InlineStyle: tr.TTMLInStyleAttributes.styleAttributes(),
- }
- if len(tr.Style) > 0 {
- if _, ok := o.Styles[tr.Style]; !ok {
- err = fmt.Errorf("astisub: Style %s requested by region %s doesn't exist", tr.Style, r.ID)
- return
- }
- r.Style = o.Styles[tr.Style]
- }
- o.Regions[r.ID] = r
- }
-
- // Loop through subtitles
- for _, ts := range ttml.Subtitles {
- // Init item
- ts.Begin.framerate = ttml.Framerate
- ts.Begin.tickrate = ttml.Tickrate
- ts.End.framerate = ttml.Framerate
- ts.End.tickrate = ttml.Tickrate
-
- var s = &Item{
- EndAt: ts.End.duration(),
- InlineStyle: ts.TTMLInStyleAttributes.styleAttributes(),
- StartAt: ts.Begin.duration(),
- }
-
- // Add region
- if len(ts.Region) > 0 {
- if _, ok := o.Regions[ts.Region]; !ok {
- err = fmt.Errorf("astisub: Region %s requested by subtitle between %s and %s doesn't exist", ts.Region, s.StartAt, s.EndAt)
- return
- }
- s.Region = o.Regions[ts.Region]
- }
-
- // Add style
- if len(ts.Style) > 0 {
- if _, ok := o.Styles[ts.Style]; !ok {
- err = fmt.Errorf("astisub: Style %s requested by subtitle between %s and %s doesn't exist", ts.Style, s.StartAt, s.EndAt)
- return
- }
- s.Style = o.Styles[ts.Style]
- }
-
- // Unmarshal items
- var items = TTMLInItems{}
- if err = xml.Unmarshal([]byte(""+ts.Items+" "), &items); err != nil {
- err = fmt.Errorf("astisub: unmarshaling items failed: %w", err)
- return
- }
-
- // Loop through texts
- var l = &Line{}
- for _, tt := range items {
- // New line specified with the "br" tag
- if strings.ToLower(tt.XMLName.Local) == "br" {
- s.Lines = append(s.Lines, *l)
- l = &Line{}
- continue
- }
-
- // New line decoded as a line break. This can happen if there's a "br" tag within the text since
- // since the go xml unmarshaler will unmarshal a "br" tag as a line break if the field has the
- // chardata xml tag.
- for idx, li := range strings.Split(tt.Text, "\n") {
- // New line
- if idx > 0 {
- s.Lines = append(s.Lines, *l)
- l = &Line{}
- }
-
- // Init line item
- var t = LineItem{
- InlineStyle: tt.TTMLInStyleAttributes.styleAttributes(),
- Text: strings.TrimSpace(li),
- }
-
- // Add style
- if len(tt.Style) > 0 {
- if _, ok := o.Styles[tt.Style]; !ok {
- err = fmt.Errorf("astisub: Style %s requested by item with text %s doesn't exist", tt.Style, tt.Text)
- return
- }
- t.Style = o.Styles[tt.Style]
- }
-
- // Append items
- l.Items = append(l.Items, t)
- }
-
- }
- s.Lines = append(s.Lines, *l)
-
- // Append subtitle
- o.Items = append(o.Items, s)
- }
- return
-}
-
-// TTMLOut represents an output TTML that must be marshaled
-// We split it from the input TTML as this time we'll add strict namespaces
-type TTMLOut struct {
- Lang string `xml:"xml:lang,attr,omitempty"`
- Metadata *TTMLOutMetadata `xml:"head>metadata,omitempty"`
- Styles []TTMLOutStyle `xml:"head>styling>style,omitempty"` //!\\ Order is important! Keep Styling above Layout
- Regions []TTMLOutRegion `xml:"head>layout>region,omitempty"`
- Subtitles []TTMLOutSubtitle `xml:"body>div>p,omitempty"`
- XMLName xml.Name `xml:"http://www.w3.org/ns/ttml tt"`
- XMLNamespaceTTM string `xml:"xmlns:ttm,attr"`
- XMLNamespaceTTS string `xml:"xmlns:tts,attr"`
-}
-
-// TTMLOutMetadata represents an output TTML Metadata
-type TTMLOutMetadata struct {
- Copyright string `xml:"ttm:copyright,omitempty"`
- Title string `xml:"ttm:title,omitempty"`
-}
-
-// TTMLOutStyleAttributes represents output TTML style attributes
-type TTMLOutStyleAttributes struct {
- BackgroundColor *string `xml:"tts:backgroundColor,attr,omitempty"`
- Color *string `xml:"tts:color,attr,omitempty"`
- Direction *string `xml:"tts:direction,attr,omitempty"`
- Display *string `xml:"tts:display,attr,omitempty"`
- DisplayAlign *string `xml:"tts:displayAlign,attr,omitempty"`
- Extent *string `xml:"tts:extent,attr,omitempty"`
- FontFamily *string `xml:"tts:fontFamily,attr,omitempty"`
- FontSize *string `xml:"tts:fontSize,attr,omitempty"`
- FontStyle *string `xml:"tts:fontStyle,attr,omitempty"`
- FontWeight *string `xml:"tts:fontWeight,attr,omitempty"`
- LineHeight *string `xml:"tts:lineHeight,attr,omitempty"`
- Opacity *string `xml:"tts:opacity,attr,omitempty"`
- Origin *string `xml:"tts:origin,attr,omitempty"`
- Overflow *string `xml:"tts:overflow,attr,omitempty"`
- Padding *string `xml:"tts:padding,attr,omitempty"`
- ShowBackground *string `xml:"tts:showBackground,attr,omitempty"`
- TextAlign *string `xml:"tts:textAlign,attr,omitempty"`
- TextDecoration *string `xml:"tts:textDecoration,attr,omitempty"`
- TextOutline *string `xml:"tts:textOutline,attr,omitempty"`
- UnicodeBidi *string `xml:"tts:unicodeBidi,attr,omitempty"`
- Visibility *string `xml:"tts:visibility,attr,omitempty"`
- WrapOption *string `xml:"tts:wrapOption,attr,omitempty"`
- WritingMode *string `xml:"tts:writingMode,attr,omitempty"`
- ZIndex *int `xml:"tts:zIndex,attr,omitempty"`
-}
-
-// ttmlOutStyleAttributesFromStyleAttributes converts StyleAttributes into a TTMLOutStyleAttributes
-func ttmlOutStyleAttributesFromStyleAttributes(s *StyleAttributes) TTMLOutStyleAttributes {
- if s == nil {
- return TTMLOutStyleAttributes{}
- }
- return TTMLOutStyleAttributes{
- BackgroundColor: s.TTMLBackgroundColor,
- Color: s.TTMLColor,
- Direction: s.TTMLDirection,
- Display: s.TTMLDisplay,
- DisplayAlign: s.TTMLDisplayAlign,
- Extent: s.TTMLExtent,
- FontFamily: s.TTMLFontFamily,
- FontSize: s.TTMLFontSize,
- FontStyle: s.TTMLFontStyle,
- FontWeight: s.TTMLFontWeight,
- LineHeight: s.TTMLLineHeight,
- Opacity: s.TTMLOpacity,
- Origin: s.TTMLOrigin,
- Overflow: s.TTMLOverflow,
- Padding: s.TTMLPadding,
- ShowBackground: s.TTMLShowBackground,
- TextAlign: s.TTMLTextAlign,
- TextDecoration: s.TTMLTextDecoration,
- TextOutline: s.TTMLTextOutline,
- UnicodeBidi: s.TTMLUnicodeBidi,
- Visibility: s.TTMLVisibility,
- WrapOption: s.TTMLWrapOption,
- WritingMode: s.TTMLWritingMode,
- ZIndex: s.TTMLZIndex,
- }
-}
-
-// TTMLOutHeader represents an output TTML header
-type TTMLOutHeader struct {
- ID string `xml:"xml:id,attr,omitempty"`
- Style string `xml:"style,attr,omitempty"`
- TTMLOutStyleAttributes
-}
-
-// TTMLOutRegion represents an output TTML region
-type TTMLOutRegion struct {
- TTMLOutHeader
- XMLName xml.Name `xml:"region"`
-}
-
-// TTMLOutStyle represents an output TTML style
-type TTMLOutStyle struct {
- TTMLOutHeader
- XMLName xml.Name `xml:"style"`
-}
-
-// TTMLOutSubtitle represents an output TTML subtitle
-type TTMLOutSubtitle struct {
- Begin TTMLOutDuration `xml:"begin,attr"`
- End TTMLOutDuration `xml:"end,attr"`
- ID string `xml:"id,attr,omitempty"`
- Items []TTMLOutItem
- Region string `xml:"region,attr,omitempty"`
- Style string `xml:"style,attr,omitempty"`
- TTMLOutStyleAttributes
-}
-
-// TTMLOutItem represents an output TTML Item
-type TTMLOutItem struct {
- Style string `xml:"style,attr,omitempty"`
- Text string `xml:",chardata"`
- TTMLOutStyleAttributes
- XMLName xml.Name
-}
-
-// TTMLOutDuration represents an output TTML duration
-type TTMLOutDuration time.Duration
-
-// MarshalText implements the TextMarshaler interface
-func (t TTMLOutDuration) MarshalText() ([]byte, error) {
- return []byte(formatDuration(time.Duration(t), ".", 3)), nil
-}
-
-// WriteToTTML writes subtitles in .ttml format
-func (s Subtitles) WriteToTTML(o io.Writer) (err error) {
- // Do not write anything if no subtitles
- if len(s.Items) == 0 {
- return ErrNoSubtitlesToWrite
- }
-
- // Init TTML
- var ttml = TTMLOut{
- XMLNamespaceTTM: "http://www.w3.org/ns/ttml#metadata",
- XMLNamespaceTTS: "http://www.w3.org/ns/ttml#styling",
- }
-
- // Add metadata
- if s.Metadata != nil {
- if v, ok := ttmlLanguageMapping.GetInverse(s.Metadata.Language); ok {
- ttml.Lang = v.(string)
- }
- if len(s.Metadata.TTMLCopyright) > 0 || len(s.Metadata.Title) > 0 {
- ttml.Metadata = &TTMLOutMetadata{
- Copyright: s.Metadata.TTMLCopyright,
- Title: s.Metadata.Title,
- }
- }
- }
-
- // Add regions
- var k []string
- for _, region := range s.Regions {
- k = append(k, region.ID)
- }
- sort.Strings(k)
- for _, id := range k {
- var ttmlRegion = TTMLOutRegion{TTMLOutHeader: TTMLOutHeader{
- ID: s.Regions[id].ID,
- TTMLOutStyleAttributes: ttmlOutStyleAttributesFromStyleAttributes(s.Regions[id].InlineStyle),
- }}
- if s.Regions[id].Style != nil {
- ttmlRegion.Style = s.Regions[id].Style.ID
- }
- ttml.Regions = append(ttml.Regions, ttmlRegion)
- }
-
- // Add styles
- k = []string{}
- for _, style := range s.Styles {
- k = append(k, style.ID)
- }
- sort.Strings(k)
- for _, id := range k {
- var ttmlStyle = TTMLOutStyle{TTMLOutHeader: TTMLOutHeader{
- ID: s.Styles[id].ID,
- TTMLOutStyleAttributes: ttmlOutStyleAttributesFromStyleAttributes(s.Styles[id].InlineStyle),
- }}
- if s.Styles[id].Style != nil {
- ttmlStyle.Style = s.Styles[id].Style.ID
- }
- ttml.Styles = append(ttml.Styles, ttmlStyle)
- }
-
- // Add items
- for _, item := range s.Items {
- // Init subtitle
- var ttmlSubtitle = TTMLOutSubtitle{
- Begin: TTMLOutDuration(item.StartAt),
- End: TTMLOutDuration(item.EndAt),
- TTMLOutStyleAttributes: ttmlOutStyleAttributesFromStyleAttributes(item.InlineStyle),
- }
-
- // Add region
- if item.Region != nil {
- ttmlSubtitle.Region = item.Region.ID
- }
-
- // Add style
- if item.Style != nil {
- ttmlSubtitle.Style = item.Style.ID
- }
-
- // Add lines
- for _, line := range item.Lines {
- // Loop through line items
- for idx, lineItem := range line.Items {
- // Init ttml item
- var ttmlItem = TTMLOutItem{
- Text: lineItem.Text,
- TTMLOutStyleAttributes: ttmlOutStyleAttributesFromStyleAttributes(lineItem.InlineStyle),
- XMLName: xml.Name{Local: "span"},
- }
- // condition to avoid adding space as the last character.
- if idx < len(line.Items)-1 {
- ttmlItem.Text = ttmlItem.Text + " "
- }
-
- // Add style
- if lineItem.Style != nil {
- ttmlItem.Style = lineItem.Style.ID
- }
-
- // Add ttml item
- ttmlSubtitle.Items = append(ttmlSubtitle.Items, ttmlItem)
- }
-
- // Add line break
- ttmlSubtitle.Items = append(ttmlSubtitle.Items, TTMLOutItem{XMLName: xml.Name{Local: "br"}})
- }
-
- // Remove last line break
- if len(ttmlSubtitle.Items) > 0 {
- ttmlSubtitle.Items = ttmlSubtitle.Items[:len(ttmlSubtitle.Items)-1]
- }
-
- // Append subtitle
- ttml.Subtitles = append(ttml.Subtitles, ttmlSubtitle)
- }
-
- // Marshal XML
- var e = xml.NewEncoder(o)
- e.Indent("", " ")
- if err = e.Encode(ttml); err != nil {
- err = fmt.Errorf("astisub: xml encoding failed: %w", err)
- return
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astisub/webvtt.go b/vendor/github.com/asticode/go-astisub/webvtt.go
deleted file mode 100644
index c186d49f773..00000000000
--- a/vendor/github.com/asticode/go-astisub/webvtt.go
+++ /dev/null
@@ -1,537 +0,0 @@
-package astisub
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "io"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "golang.org/x/net/html"
-)
-
-// https://www.w3.org/TR/webvtt1/
-
-// Constants
-const (
- webvttBlockNameComment = "comment"
- webvttBlockNameRegion = "region"
- webvttBlockNameStyle = "style"
- webvttBlockNameText = "text"
- webvttTimeBoundariesSeparator = " --> "
- webvttTimestampMap = "X-TIMESTAMP-MAP"
-)
-
-// Vars
-var (
- bytesWebVTTItalicEndTag = []byte("")
- bytesWebVTTItalicStartTag = []byte("")
- bytesWebVTTTimeBoundariesSeparator = []byte(webvttTimeBoundariesSeparator)
- webVTTRegexpStartTag = regexp.MustCompile(`()`)
-)
-
-// parseDurationWebVTT parses a .vtt duration
-func parseDurationWebVTT(i string) (time.Duration, error) {
- return parseDuration(i, ".", 3)
-}
-
-// https://tools.ietf.org/html/rfc8216#section-3.5
-// Eg., `X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000` => 10s
-// `X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:180000` => 2s
-func parseTimestampMapWebVTT(line string) (timeOffset time.Duration, err error) {
- splits := strings.Split(line, "=")
- if len(splits) <= 1 {
- err = fmt.Errorf("astisub: invalid X-TIMESTAMP-MAP, no '=' found")
- return
- }
- right := splits[1]
-
- var local time.Duration
- var mpegts int64
- for _, split := range strings.Split(right, ",") {
- splits := strings.SplitN(split, ":", 2)
- if len(splits) <= 1 {
- err = fmt.Errorf("astisub: invalid X-TIMESTAMP-MAP, part %q didn't contain ':'", right)
- return
- }
-
- switch strings.ToLower(strings.TrimSpace(splits[0])) {
- case "local":
- local, err = parseDurationWebVTT(splits[1])
- if err != nil {
- err = fmt.Errorf("astisub: parsing webvtt duration failed: %w", err)
- return
- }
- case "mpegts":
- mpegts, err = strconv.ParseInt(splits[1], 10, 0)
- if err != nil {
- err = fmt.Errorf("astisub: parsing int %s failed: %w", splits[1], err)
- return
- }
- }
- }
-
- timeOffset = time.Duration(mpegts)*time.Second/90000 - local
- return
-}
-
-// ReadFromWebVTT parses a .vtt content
-// TODO Tags (u, i, b)
-// TODO Class
-func ReadFromWebVTT(i io.Reader) (o *Subtitles, err error) {
- // Init
- o = NewSubtitles()
- var scanner = bufio.NewScanner(i)
- var line string
- var lineNum int
-
- // Skip the header
- for scanner.Scan() {
- lineNum++
- line = scanner.Text()
- line = strings.TrimPrefix(line, string(BytesBOM))
- if fs := strings.Fields(line); len(fs) > 0 && fs[0] == "WEBVTT" {
- break
- }
- }
-
- // Scan
- var item = &Item{}
- var blockName string
- var comments []string
- var index int
- var timeOffset time.Duration
-
- for scanner.Scan() {
- // Fetch line
- line = strings.TrimSpace(scanner.Text())
- lineNum++
-
- switch {
- // Comment
- case strings.HasPrefix(line, "NOTE "):
- blockName = webvttBlockNameComment
- comments = append(comments, strings.TrimPrefix(line, "NOTE "))
- // Empty line
- case len(line) == 0:
- // Reset block name
- blockName = ""
- // Region
- case strings.HasPrefix(line, "Region: "):
- // Add region styles
- var r = &Region{InlineStyle: &StyleAttributes{}}
- for _, part := range strings.Split(strings.TrimPrefix(line, "Region: "), " ") {
- // Split on "="
- var split = strings.Split(part, "=")
- if len(split) <= 1 {
- err = fmt.Errorf("astisub: line %d: Invalid region style %s", lineNum, part)
- return
- }
-
- // Switch on key
- switch split[0] {
- case "id":
- r.ID = split[1]
- case "lines":
- if r.InlineStyle.WebVTTLines, err = strconv.Atoi(split[1]); err != nil {
- err = fmt.Errorf("atoi of %s failed: %w", split[1], err)
- return
- }
- case "regionanchor":
- r.InlineStyle.WebVTTRegionAnchor = split[1]
- case "scroll":
- r.InlineStyle.WebVTTScroll = split[1]
- case "viewportanchor":
- r.InlineStyle.WebVTTViewportAnchor = split[1]
- case "width":
- r.InlineStyle.WebVTTWidth = split[1]
- }
- }
- r.InlineStyle.propagateWebVTTAttributes()
-
- // Add region
- o.Regions[r.ID] = r
- // Style
- case strings.HasPrefix(line, "STYLE"):
- blockName = webvttBlockNameStyle
- // Time boundaries
- case strings.Contains(line, webvttTimeBoundariesSeparator):
- // Set block name
- blockName = webvttBlockNameText
-
- // Init new item
- item = &Item{
- Comments: comments,
- Index: index,
- InlineStyle: &StyleAttributes{},
- }
-
- // Reset index
- index = 0
-
- // Split line on time boundaries
- var left = strings.Split(line, webvttTimeBoundariesSeparator)
-
- // Split line on space to get remaining of time data
- var right = strings.Split(left[1], " ")
-
- // Parse time boundaries
- if item.StartAt, err = parseDurationWebVTT(left[0]); err != nil {
- err = fmt.Errorf("astisub: line %d: parsing webvtt duration %s failed: %w", lineNum, left[0], err)
- return
- }
- if item.EndAt, err = parseDurationWebVTT(right[0]); err != nil {
- err = fmt.Errorf("astisub: line %d: parsing webvtt duration %s failed: %w", lineNum, right[0], err)
- return
- }
-
- // Parse style
- if len(right) > 1 {
- // Add styles
- for index := 1; index < len(right); index++ {
- // Empty
- if right[index] == "" {
- continue
- }
-
- // Split line on ":"
- var split = strings.Split(right[index], ":")
- if len(split) <= 1 {
- err = fmt.Errorf("astisub: line %d: Invalid inline style '%s'", lineNum, right[index])
- return
- }
-
- // Switch on key
- switch split[0] {
- case "align":
- item.InlineStyle.WebVTTAlign = split[1]
- case "line":
- item.InlineStyle.WebVTTLine = split[1]
- case "position":
- item.InlineStyle.WebVTTPosition = split[1]
- case "region":
- if _, ok := o.Regions[split[1]]; !ok {
- err = fmt.Errorf("astisub: line %d: Unknown region %s", lineNum, split[1])
- return
- }
- item.Region = o.Regions[split[1]]
- case "size":
- item.InlineStyle.WebVTTSize = split[1]
- case "vertical":
- item.InlineStyle.WebVTTVertical = split[1]
- }
- }
- }
- item.InlineStyle.propagateWebVTTAttributes()
-
- // Reset comments
- comments = []string{}
-
- // Append item
- o.Items = append(o.Items, item)
-
- case strings.HasPrefix(line, webvttTimestampMap):
- if len(item.Lines) > 0 {
- err = errors.New("astisub: found timestamp map after processing subtitle items")
- return
- }
-
- timeOffset, err = parseTimestampMapWebVTT(line)
- if err != nil {
- err = fmt.Errorf("astisub: parsing webvtt timestamp map failed: %w", err)
- return
- }
-
- // Text
- default:
- // Switch on block name
- switch blockName {
- case webvttBlockNameComment:
- comments = append(comments, line)
- case webvttBlockNameStyle:
- // TODO Do something with the style
- case webvttBlockNameText:
- // Parse line
- if l := parseTextWebVTT(line); len(l.Items) > 0 {
- item.Lines = append(item.Lines, l)
- }
- default:
- // This is the ID
- index, _ = strconv.Atoi(line)
- }
- }
- }
-
- if timeOffset > 0 {
- o.Add(timeOffset)
- }
- return
-}
-
-// parseTextWebVTT parses the input line to fill the Line
-func parseTextWebVTT(i string) (o Line) {
- // Create tokenizer
- tr := html.NewTokenizer(strings.NewReader(i))
-
- // Loop
- italic := false
- for {
- // Get next tag
- t := tr.Next()
-
- // Process error
- if err := tr.Err(); err != nil {
- break
- }
-
- switch t {
- case html.EndTagToken:
- // Parse italic
- if bytes.Equal(tr.Raw(), bytesWebVTTItalicEndTag) {
- italic = false
- continue
- }
- case html.StartTagToken:
- // Parse voice name
- if matches := webVTTRegexpStartTag.FindStringSubmatch(string(tr.Raw())); len(matches) > 3 {
- if s := strings.TrimSpace(matches[3]); s != "" {
- o.VoiceName = s
- }
- continue
- }
-
- // Parse italic
- if bytes.Equal(tr.Raw(), bytesWebVTTItalicStartTag) {
- italic = true
- continue
- }
- case html.TextToken:
- if s := strings.TrimSpace(string(tr.Raw())); s != "" {
- // Get style attribute
- var sa *StyleAttributes
- if italic {
- sa = &StyleAttributes{
- WebVTTItalics: italic,
- }
- sa.propagateWebVTTAttributes()
- }
-
- // Append item
- o.Items = append(o.Items, LineItem{
- InlineStyle: sa,
- Text: s,
- })
- }
- }
- }
- return
-}
-
-// formatDurationWebVTT formats a .vtt duration
-func formatDurationWebVTT(i time.Duration) string {
- return formatDuration(i, ".", 3)
-}
-
-// WriteToWebVTT writes subtitles in .vtt format
-func (s Subtitles) WriteToWebVTT(o io.Writer) (err error) {
- // Do not write anything if no subtitles
- if len(s.Items) == 0 {
- err = ErrNoSubtitlesToWrite
- return
- }
-
- // Add header
- var c []byte
- c = append(c, []byte("WEBVTT\n\n")...)
-
- // Add regions
- var k []string
- for _, region := range s.Regions {
- k = append(k, region.ID)
- }
- sort.Strings(k)
- for _, id := range k {
- c = append(c, []byte("Region: id="+s.Regions[id].ID)...)
- if s.Regions[id].InlineStyle.WebVTTLines != 0 {
- c = append(c, bytesSpace...)
- c = append(c, []byte("lines="+strconv.Itoa(s.Regions[id].InlineStyle.WebVTTLines))...)
- } else if s.Regions[id].Style != nil && s.Regions[id].Style.InlineStyle != nil && s.Regions[id].Style.InlineStyle.WebVTTLines != 0 {
- c = append(c, bytesSpace...)
- c = append(c, []byte("lines="+strconv.Itoa(s.Regions[id].Style.InlineStyle.WebVTTLines))...)
- }
- if s.Regions[id].InlineStyle.WebVTTRegionAnchor != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("regionanchor="+s.Regions[id].InlineStyle.WebVTTRegionAnchor)...)
- } else if s.Regions[id].Style != nil && s.Regions[id].Style.InlineStyle != nil && s.Regions[id].Style.InlineStyle.WebVTTRegionAnchor != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("regionanchor="+s.Regions[id].Style.InlineStyle.WebVTTRegionAnchor)...)
- }
- if s.Regions[id].InlineStyle.WebVTTScroll != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("scroll="+s.Regions[id].InlineStyle.WebVTTScroll)...)
- } else if s.Regions[id].Style != nil && s.Regions[id].Style.InlineStyle != nil && s.Regions[id].Style.InlineStyle.WebVTTScroll != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("scroll="+s.Regions[id].Style.InlineStyle.WebVTTScroll)...)
- }
- if s.Regions[id].InlineStyle.WebVTTViewportAnchor != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("viewportanchor="+s.Regions[id].InlineStyle.WebVTTViewportAnchor)...)
- } else if s.Regions[id].Style != nil && s.Regions[id].Style.InlineStyle != nil && s.Regions[id].Style.InlineStyle.WebVTTViewportAnchor != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("viewportanchor="+s.Regions[id].Style.InlineStyle.WebVTTViewportAnchor)...)
- }
- if s.Regions[id].InlineStyle.WebVTTWidth != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("width="+s.Regions[id].InlineStyle.WebVTTWidth)...)
- } else if s.Regions[id].Style != nil && s.Regions[id].Style.InlineStyle != nil && s.Regions[id].Style.InlineStyle.WebVTTWidth != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("width="+s.Regions[id].Style.InlineStyle.WebVTTWidth)...)
- }
- c = append(c, bytesLineSeparator...)
- }
- if len(s.Regions) > 0 {
- c = append(c, bytesLineSeparator...)
- }
-
- // Loop through subtitles
- for index, item := range s.Items {
- // Add comments
- if len(item.Comments) > 0 {
- c = append(c, []byte("NOTE ")...)
- for _, comment := range item.Comments {
- c = append(c, []byte(comment)...)
- c = append(c, bytesLineSeparator...)
- }
- c = append(c, bytesLineSeparator...)
- }
-
- // Add time boundaries
- c = append(c, []byte(strconv.Itoa(index+1))...)
- c = append(c, bytesLineSeparator...)
- c = append(c, []byte(formatDurationWebVTT(item.StartAt))...)
- c = append(c, bytesWebVTTTimeBoundariesSeparator...)
- c = append(c, []byte(formatDurationWebVTT(item.EndAt))...)
-
- // Add styles
- if item.InlineStyle != nil {
- if item.InlineStyle.WebVTTAlign != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("align:"+item.InlineStyle.WebVTTAlign)...)
- } else if item.Style != nil && item.Style.InlineStyle != nil && item.Style.InlineStyle.WebVTTAlign != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("align:"+item.Style.InlineStyle.WebVTTAlign)...)
- }
- if item.InlineStyle.WebVTTLine != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("line:"+item.InlineStyle.WebVTTLine)...)
- } else if item.Style != nil && item.Style.InlineStyle != nil && item.Style.InlineStyle.WebVTTLine != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("line:"+item.Style.InlineStyle.WebVTTLine)...)
- }
- if item.InlineStyle.WebVTTPosition != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("position:"+item.InlineStyle.WebVTTPosition)...)
- } else if item.Style != nil && item.Style.InlineStyle != nil && item.Style.InlineStyle.WebVTTPosition != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("position:"+item.Style.InlineStyle.WebVTTPosition)...)
- }
- if item.Region != nil {
- c = append(c, bytesSpace...)
- c = append(c, []byte("region:"+item.Region.ID)...)
- }
- if item.InlineStyle.WebVTTSize != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("size:"+item.InlineStyle.WebVTTSize)...)
- } else if item.Style != nil && item.Style.InlineStyle != nil && item.Style.InlineStyle.WebVTTSize != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("size:"+item.Style.InlineStyle.WebVTTSize)...)
- }
- if item.InlineStyle.WebVTTVertical != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("vertical:"+item.InlineStyle.WebVTTVertical)...)
- } else if item.Style != nil && item.Style.InlineStyle != nil && item.Style.InlineStyle.WebVTTVertical != "" {
- c = append(c, bytesSpace...)
- c = append(c, []byte("vertical:"+item.Style.InlineStyle.WebVTTVertical)...)
- }
- }
-
- // Add new line
- c = append(c, bytesLineSeparator...)
-
- // Loop through lines
- for _, l := range item.Lines {
- c = append(c, l.webVTTBytes()...)
- }
-
- // Add new line
- c = append(c, bytesLineSeparator...)
- }
-
- // Remove last new line
- c = c[:len(c)-1]
-
- // Write
- if _, err = o.Write(c); err != nil {
- err = fmt.Errorf("astisub: writing failed: %w", err)
- return
- }
- return
-}
-
-func (l Line) webVTTBytes() (c []byte) {
- if l.VoiceName != "" {
- c = append(c, []byte("")...)
- }
- for idx, li := range l.Items {
- c = append(c, li.webVTTBytes()...)
- // condition to avoid adding space as the last character.
- if idx < len(l.Items)-1 {
- c = append(c, []byte(" ")...)
- }
- }
- c = append(c, bytesLineSeparator...)
- return
-}
-
-func (li LineItem) webVTTBytes() (c []byte) {
- // Get color
- var color string
- if li.InlineStyle != nil && li.InlineStyle.TTMLColor != nil {
- color = cssColor(*li.InlineStyle.TTMLColor)
- }
-
- // Get italics
- i := li.InlineStyle != nil && li.InlineStyle.WebVTTItalics
-
- // Append
- if color != "" {
- c = append(c, []byte("")...)
- }
- if i {
- c = append(c, []byte("")...)
- }
- c = append(c, []byte(li.Text)...)
- if i {
- c = append(c, []byte(" ")...)
- }
- if color != "" {
- c = append(c, []byte("")...)
- }
- return
-}
-
-func cssColor(rgb string) string {
- colors := map[string]string{
- "#00ffff": "cyan", // narrator, thought
- "#ffff00": "yellow", // out of vision
- "#ff0000": "red", // noises
- "#ff00ff": "magenta", // song
- "#00ff00": "lime", // foreign speak
- }
- return colors[strings.ToLower(rgb)] // returning the empty string is ok
-}
diff --git a/vendor/github.com/asticode/go-astits/.gitignore b/vendor/github.com/asticode/go-astits/.gitignore
deleted file mode 100644
index 5be2b41d1f5..00000000000
--- a/vendor/github.com/asticode/go-astits/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.DS_Store
-Thumbs.db
-.idea/
-cover*
-test
diff --git a/vendor/github.com/asticode/go-astits/.travis.yml b/vendor/github.com/asticode/go-astits/.travis.yml
deleted file mode 100644
index 93968bfd57c..00000000000
--- a/vendor/github.com/asticode/go-astits/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-go:
- - 1.x
- - tip
-install:
- - go get -t ./...
- - go get golang.org/x/tools/cmd/cover
- - go get github.com/mattn/goveralls
-matrix:
- allow_failures:
- - go: tip
-script:
- - go test -race -v -coverprofile=coverage.out
- - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
\ No newline at end of file
diff --git a/vendor/github.com/asticode/go-astits/LICENSE b/vendor/github.com/asticode/go-astits/LICENSE
deleted file mode 100644
index d9954a4c7bb..00000000000
--- a/vendor/github.com/asticode/go-astits/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Quentin Renard
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/asticode/go-astits/README.md b/vendor/github.com/asticode/go-astits/README.md
deleted file mode 100644
index e5756c6cdfd..00000000000
--- a/vendor/github.com/asticode/go-astits/README.md
+++ /dev/null
@@ -1,193 +0,0 @@
-[![GoReportCard](http://goreportcard.com/badge/github.com/asticode/go-astits)](http://goreportcard.com/report/github.com/asticode/go-astits)
-[![GoDoc](https://godoc.org/github.com/asticode/go-astits?status.svg)](https://godoc.org/github.com/asticode/go-astits)
-[![Travis](https://travis-ci.org/asticode/go-astits.svg?branch=master)](https://travis-ci.org/asticode/go-astits#)
-[![Coveralls](https://coveralls.io/repos/github/asticode/go-astits/badge.svg?branch=master)](https://coveralls.io/github/asticode/go-astits)
-
-This is a Golang library to natively demux and mux MPEG Transport Streams (ts) in GO.
-
-WARNING: this library is not yet production ready. Use at your own risks!
-
-# Installation
-
-To install the library use the following:
-
- go get -u github.com/asticode/go-astits/...
-
-# Before looking at the code...
-
-The transport stream is made of packets.
-Each packet has a header, an optional adaptation field and a payload.
-Several payloads can be appended and parsed as a data.
-
-```
- TRANSPORT STREAM
- +--------------------------------------------------------------------------------------------------+
- | |
-
- PACKET PACKET
- +----------------------------------------------+----------------------------------------------+----
- | | |
-
- +--------+---------------------------+---------+--------+---------------------------+---------+
- | HEADER | OPTIONAL ADAPTATION FIELD | PAYLOAD | HEADER | OPTIONAL ADAPTATION FIELD | PAYLOAD | ...
- +--------+---------------------------+---------+--------+---------------------------+---------+
-
- | | | |
- +---------+ +---------+
- | |
- +----------------------------------------------+
- DATA
-```
-
-# Using the library in your code
-
-WARNING: the code below doesn't handle errors for readability purposes. However you SHOULD!
-
-## Demux
-
-```go
-// Create a cancellable context in case you want to stop reading packets/data any time you want
-ctx, cancel := context.WithCancel(context.Background())
-
-// Handle SIGTERM signal
-ch := make(chan os.Signal, 1)
-signal.Notify(ch, syscall.SIGTERM)
-go func() {
- <-ch
- cancel()
-}()
-
-// Open your file or initialize any kind of io.Reader
-// Buffering using bufio.Reader is recommended for performance
-f, _ := os.Open("/path/to/file.ts")
-defer f.Close()
-
-// Create the demuxer
-dmx := astits.NewDemuxer(ctx, f)
-for {
- // Get the next data
- d, _ := dmx.NextData()
-
- // Data is a PMT data
- if d.PMT != nil {
- // Loop through elementary streams
- for _, es := range d.PMT.ElementaryStreams {
- fmt.Printf("Stream detected: %d\n", es.ElementaryPID)
- }
- return
- }
-}
-```
-
-## Mux
-
-```go
-// Create a cancellable context in case you want to stop writing packets/data any time you want
-ctx, cancel := context.WithCancel(context.Background())
-
-// Handle SIGTERM signal
-ch := make(chan os.Signal, 1)
-signal.Notify(ch, syscall.SIGTERM)
-go func() {
- <-ch
- cancel()
-}()
-
-// Create your file or initialize any kind of io.Writer
-// Buffering using bufio.Writer is recommended for performance
-f, _ := os.Create("/path/to/file.ts")
-defer f.Close()
-
-// Create the muxer
-mx := astits.NewMuxer(ctx, f)
-
-// Add an elementary stream
-mx.AddElementaryStream(astits.PMTElementaryStream{
- ElementaryPID: 1,
- StreamType: astits.StreamTypeMetadata,
-})
-
-// Write tables
-// Using that function is not mandatory, WriteData will retransmit tables from time to time
-mx.WriteTables()
-
-// Write data
-mx.WriteData(&astits.MuxerData{
- PES: &astits.PESData{
- Data: []byte("test"),
- },
- PID: 1,
-})
-```
-
-## Options
-
-In order to pass options to the demuxer or the muxer, look for the methods prefixed with `DemuxerOpt` or `MuxerOpt` and add them upon calling `NewDemuxer` or `NewMuxer` :
-
-```go
-// This is your custom packets parser
-p := func(ps []*astits.Packet) (ds []*astits.Data, skip bool, err error) {
- // This is your logic
- skip = true
- return
-}
-
-// Now you can create a demuxer with the proper options
-dmx := NewDemuxer(ctx, f, DemuxerOptPacketSize(192), DemuxerOptPacketsParser(p))
-```
-
-# CLI
-
-This library provides 2 CLIs that will automatically get installed in `GOPATH/bin` on `go get` execution.
-
-## astits-probe
-
-### List streams
-
- $ astits-probe -i -f
-
-### List packets
-
- $ astits-probe packets -i
-
-### List data
-
- $ astits-probe data -i -d
-
-## astits-es-split
-
-### Split streams into separate .ts files
-
- $ astits-es-split -o
-
-# Features and roadmap
-
-- [x] Add demuxer
-- [x] Add muxer
-- [x] Demux PES packets
-- [x] Mux PES packets
-- [x] Demux PAT packets
-- [x] Mux PAT packets
-- [x] Demux PMT packets
-- [x] Mux PMT packets
-- [x] Demux EIT packets
-- [ ] Mux EIT packets
-- [x] Demux NIT packets
-- [ ] Mux NIT packets
-- [x] Demux SDT packets
-- [ ] Mux SDT packets
-- [x] Demux TOT packets
-- [ ] Mux TOT packets
-- [ ] Demux BAT packets
-- [ ] Mux BAT packets
-- [ ] Demux DIT packets
-- [ ] Mux DIT packets
-- [ ] Demux RST packets
-- [ ] Mux RST packets
-- [ ] Demux SIT packets
-- [ ] Mux SIT packets
-- [ ] Mux ST packets
-- [ ] Demux TDT packets
-- [ ] Mux TDT packets
-- [ ] Demux TSDT packets
-- [ ] Mux TSDT packets
diff --git a/vendor/github.com/asticode/go-astits/clock_reference.go b/vendor/github.com/asticode/go-astits/clock_reference.go
deleted file mode 100644
index 73c147c6f93..00000000000
--- a/vendor/github.com/asticode/go-astits/clock_reference.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package astits
-
-import (
- "time"
-)
-
-// ClockReference represents a clock reference
-// Base is based on a 90 kHz clock and extension is based on a 27 MHz clock
-type ClockReference struct {
- Base, Extension int64
-}
-
-// newClockReference builds a new clock reference
-func newClockReference(base, extension int64) *ClockReference {
- return &ClockReference{
- Base: base,
- Extension: extension,
- }
-}
-
-// Duration converts the clock reference into duration
-func (p ClockReference) Duration() time.Duration {
- return time.Duration(p.Base*1e9/90000) + time.Duration(p.Extension*1e9/27000000)
-}
-
-// Time converts the clock reference into time
-func (p ClockReference) Time() time.Time {
- return time.Unix(0, p.Duration().Nanoseconds())
-}
diff --git a/vendor/github.com/asticode/go-astits/crc32.go b/vendor/github.com/asticode/go-astits/crc32.go
deleted file mode 100644
index 5a3f601bcc6..00000000000
--- a/vendor/github.com/asticode/go-astits/crc32.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package astits
-
-const (
- crc32Polynomial = uint32(0xffffffff)
-)
-
-// computeCRC32 computes a CRC32
-// https://stackoverflow.com/questions/35034042/how-to-calculate-crc32-in-psi-si-packet
-func computeCRC32(bs []byte) uint32 {
- return updateCRC32(crc32Polynomial, bs)
-}
-
-func updateCRC32(crc32 uint32, bs []byte) uint32 {
- for _, b := range bs {
- for i := 0; i < 8; i++ {
- if (crc32 >= uint32(0x80000000)) != (b >= uint8(0x80)) {
- crc32 = (crc32 << 1) ^ 0x04C11DB7
- } else {
- crc32 = crc32 << 1
- }
- b <<= 1
- }
- }
- return crc32
-}
diff --git a/vendor/github.com/asticode/go-astits/data.go b/vendor/github.com/asticode/go-astits/data.go
deleted file mode 100644
index f06bdab31d2..00000000000
--- a/vendor/github.com/asticode/go-astits/data.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-// PIDs
-const (
- PIDPAT uint16 = 0x0 // Program Association Table (PAT) contains a directory listing of all Program Map Tables.
- PIDCAT uint16 = 0x1 // Conditional Access Table (CAT) contains a directory listing of all ITU-T Rec. H.222 entitlement management message streams used by Program Map Tables.
- PIDTSDT uint16 = 0x2 // Transport Stream Description Table (TSDT) contains descriptors related to the overall transport stream
- PIDNull uint16 = 0x1fff // Null Packet (used for fixed bandwidth padding)
-)
-
-// DemuxerData represents a data parsed by Demuxer
-type DemuxerData struct {
- EIT *EITData
- FirstPacket *Packet
- NIT *NITData
- PAT *PATData
- PES *PESData
- PID uint16
- PMT *PMTData
- SDT *SDTData
- TOT *TOTData
-}
-
-// MuxerData represents a data to be written by Muxer
-type MuxerData struct {
- PID uint16
- AdaptationField *PacketAdaptationField
- PES *PESData
-}
-
-// parseData parses a payload spanning over multiple packets and returns a set of data
-func parseData(ps []*Packet, prs PacketsParser, pm programMap) (ds []*DemuxerData, err error) {
- // Use custom parser first
- if prs != nil {
- var skip bool
- if ds, skip, err = prs(ps); err != nil {
- err = fmt.Errorf("astits: custom packets parsing failed: %w", err)
- return
- } else if skip {
- return
- }
- }
-
- // Get payload length
- var l int
- for _, p := range ps {
- l += len(p.Payload)
- }
-
- // Append payload
- var payload = make([]byte, l)
- var c int
- for _, p := range ps {
- c += copy(payload[c:], p.Payload)
- }
-
- // Create reader
- i := astikit.NewBytesIterator(payload)
-
- // Parse PID
- pid := ps[0].Header.PID
-
- // Parse payload
- if pid == PIDCAT {
- // Information in a CAT payload is private and dependent on the CA system. Use the PacketsParser
- // to parse this type of payload
- } else if isPSIPayload(pid, pm) {
- // Parse PSI data
- var psiData *PSIData
- if psiData, err = parsePSIData(i); err != nil {
- err = fmt.Errorf("astits: parsing PSI data failed: %w", err)
- return
- }
-
- // Append data
- ds = psiData.toData(ps[0], pid)
- } else if isPESPayload(payload) {
- // Parse PES data
- var pesData *PESData
- if pesData, err = parsePESData(i); err != nil {
- err = fmt.Errorf("astits: parsing PES data failed: %w", err)
- return
- }
-
- // Append data
- ds = append(ds, &DemuxerData{
- FirstPacket: ps[0],
- PES: pesData,
- PID: pid,
- })
- }
- return
-}
-
-// isPSIPayload checks whether the payload is a PSI one
-func isPSIPayload(pid uint16, pm programMap) bool {
- return pid == PIDPAT || // PAT
- pm.exists(pid) || // PMT
- ((pid >= 0x10 && pid <= 0x14) || (pid >= 0x1e && pid <= 0x1f)) //DVB
-}
-
-// isPESPayload checks whether the payload is a PES one
-func isPESPayload(i []byte) bool {
- // Packet is not big enough
- if len(i) < 3 {
- return false
- }
-
- // Check prefix
- return uint32(i[0])<<16|uint32(i[1])<<8|uint32(i[2]) == 1
-}
diff --git a/vendor/github.com/asticode/go-astits/data_eit.go b/vendor/github.com/asticode/go-astits/data_eit.go
deleted file mode 100644
index 4dce53a2a1f..00000000000
--- a/vendor/github.com/asticode/go-astits/data_eit.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package astits
-
-import (
- "fmt"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// EITData represents an EIT data
-// Page: 36 | Chapter: 5.2.4 | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-type EITData struct {
- Events []*EITDataEvent
- LastTableID uint8
- OriginalNetworkID uint16
- SegmentLastSectionNumber uint8
- ServiceID uint16
- TransportStreamID uint16
-}
-
-// EITDataEvent represents an EIT data event
-type EITDataEvent struct {
- Descriptors []*Descriptor
- Duration time.Duration
- EventID uint16
- HasFreeCSAMode bool // When true indicates that access to one or more streams may be controlled by a CA system.
- RunningStatus uint8
- StartTime time.Time
-}
-
-// parseEITSection parses an EIT section
-func parseEITSection(i *astikit.BytesIterator, offsetSectionsEnd int, tableIDExtension uint16) (d *EITData, err error) {
- // Create data
- d = &EITData{ServiceID: tableIDExtension}
-
- // Get next 2 bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Transport stream ID
- d.TransportStreamID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next 2 bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Original network ID
- d.OriginalNetworkID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Segment last section number
- d.SegmentLastSectionNumber = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Last table ID
- d.LastTableID = uint8(b)
-
- // Loop until end of section data is reached
- for i.Offset() < offsetSectionsEnd {
- // Get next 2 bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Event ID
- var e = &EITDataEvent{}
- e.EventID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Start time
- if e.StartTime, err = parseDVBTime(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB time")
- return
- }
-
- // Duration
- if e.Duration, err = parseDVBDurationSeconds(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB duration seconds failed: %w", err)
- return
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Running status
- e.RunningStatus = uint8(b) >> 5
-
- // Free CA mode
- e.HasFreeCSAMode = uint8(b&0x10) > 0
-
- // We need to rewind since the current byte is used by the descriptor as well
- i.Skip(-1)
-
- // Descriptors
- if e.Descriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Add event
- d.Events = append(d.Events, e)
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/data_nit.go b/vendor/github.com/asticode/go-astits/data_nit.go
deleted file mode 100644
index 5191b5d20ba..00000000000
--- a/vendor/github.com/asticode/go-astits/data_nit.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-// NITData represents a NIT data
-// Page: 29 | Chapter: 5.2.1 | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-type NITData struct {
- NetworkDescriptors []*Descriptor
- NetworkID uint16
- TransportStreams []*NITDataTransportStream
-}
-
-// NITDataTransportStream represents a NIT data transport stream
-type NITDataTransportStream struct {
- OriginalNetworkID uint16
- TransportDescriptors []*Descriptor
- TransportStreamID uint16
-}
-
-// parseNITSection parses a NIT section
-func parseNITSection(i *astikit.BytesIterator, tableIDExtension uint16) (d *NITData, err error) {
- // Create data
- d = &NITData{NetworkID: tableIDExtension}
-
- // Network descriptors
- if d.NetworkDescriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Transport stream loop length
- transportStreamLoopLength := int(uint16(bs[0]&0xf)<<8 | uint16(bs[1]))
-
- // Transport stream loop
- offsetEnd := i.Offset() + transportStreamLoopLength
- for i.Offset() < offsetEnd {
- // Create transport stream
- ts := &NITDataTransportStream{}
-
- // Get next bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Transport stream ID
- ts.TransportStreamID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Original network ID
- ts.OriginalNetworkID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Transport descriptors
- if ts.TransportDescriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Append transport stream
- d.TransportStreams = append(d.TransportStreams, ts)
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/data_pat.go b/vendor/github.com/asticode/go-astits/data_pat.go
deleted file mode 100644
index 3b5b5551114..00000000000
--- a/vendor/github.com/asticode/go-astits/data_pat.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-const (
- patSectionEntryBytesSize = 4 // 16 bits + 3 reserved + 13 bits = 32 bits
-)
-
-// PATData represents a PAT data
-// https://en.wikipedia.org/wiki/Program-specific_information
-type PATData struct {
- Programs []*PATProgram
- TransportStreamID uint16
-}
-
-// PATProgram represents a PAT program
-type PATProgram struct {
- ProgramMapID uint16 // The packet identifier that contains the associated PMT
- ProgramNumber uint16 // Relates to the Table ID extension in the associated PMT. A value of 0 is reserved for a NIT packet identifier.
-}
-
-// parsePATSection parses a PAT section
-func parsePATSection(i *astikit.BytesIterator, offsetSectionsEnd int, tableIDExtension uint16) (d *PATData, err error) {
- // Create data
- d = &PATData{TransportStreamID: tableIDExtension}
-
- // Loop until end of section data is reached
- for i.Offset() < offsetSectionsEnd {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Append program
- d.Programs = append(d.Programs, &PATProgram{
- ProgramMapID: uint16(bs[2]&0x1f)<<8 | uint16(bs[3]),
- ProgramNumber: uint16(bs[0])<<8 | uint16(bs[1]),
- })
- }
- return
-}
-
-func calcPATSectionLength(d *PATData) uint16 {
- return uint16(4 * len(d.Programs))
-}
-
-func writePATSection(w *astikit.BitsWriter, d *PATData) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, p := range d.Programs {
- b.Write(p.ProgramNumber)
- b.WriteN(uint8(0xff), 3)
- b.WriteN(p.ProgramMapID, 13)
- }
-
- return len(d.Programs) * patSectionEntryBytesSize, b.Err()
-}
diff --git a/vendor/github.com/asticode/go-astits/data_pes.go b/vendor/github.com/asticode/go-astits/data_pes.go
deleted file mode 100644
index 9b3493f4b3e..00000000000
--- a/vendor/github.com/asticode/go-astits/data_pes.go
+++ /dev/null
@@ -1,747 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-// P-STD buffer scales
-const (
- PSTDBufferScale128Bytes = 0
- PSTDBufferScale1024Bytes = 1
-)
-
-// PTS DTS indicator
-const (
- PTSDTSIndicatorBothPresent = 3
- PTSDTSIndicatorIsForbidden = 1
- PTSDTSIndicatorNoPTSOrDTS = 0
- PTSDTSIndicatorOnlyPTS = 2
-)
-
-// Stream IDs
-const (
- StreamIDPrivateStream1 = 189
- StreamIDPaddingStream = 190
- StreamIDPrivateStream2 = 191
-)
-
-// Trick mode controls
-const (
- TrickModeControlFastForward = 0
- TrickModeControlFastReverse = 3
- TrickModeControlFreezeFrame = 2
- TrickModeControlSlowMotion = 1
- TrickModeControlSlowReverse = 4
-)
-
-const (
- pesHeaderLength = 6
- ptsOrDTSByteLength = 5
- escrLength = 6
- dsmTrickModeLength = 1
-)
-
-// PESData represents a PES data
-// https://en.wikipedia.org/wiki/Packetized_elementary_stream
-// http://dvd.sourceforge.net/dvdinfo/pes-hdr.html
-// http://happy.emu.id.au/lab/tut/dttb/dtbtut4b.htm
-type PESData struct {
- Data []byte
- Header *PESHeader
-}
-
-// PESHeader represents a packet PES header
-type PESHeader struct {
- OptionalHeader *PESOptionalHeader
- PacketLength uint16 // Specifies the number of bytes remaining in the packet after this field. Can be zero. If the PES packet length is set to zero, the PES packet can be of any length. A value of zero for the PES packet length can be used only when the PES packet payload is a video elementary stream.
- StreamID uint8 // Examples: Audio streams (0xC0-0xDF), Video streams (0xE0-0xEF)
-}
-
-// PESOptionalHeader represents a PES optional header
-type PESOptionalHeader struct {
- AdditionalCopyInfo uint8
- CRC uint16
- DataAlignmentIndicator bool // True indicates that the PES packet header is immediately followed by the video start code or audio syncword
- DSMTrickMode *DSMTrickMode
- DTS *ClockReference
- ESCR *ClockReference
- ESRate uint32
- Extension2Data []byte
- Extension2Length uint8
- HasAdditionalCopyInfo bool
- HasCRC bool
- HasDSMTrickMode bool
- HasESCR bool
- HasESRate bool
- HasExtension bool
- HasExtension2 bool
- HasOptionalFields bool
- HasPackHeaderField bool
- HasPrivateData bool
- HasProgramPacketSequenceCounter bool
- HasPSTDBuffer bool
- HeaderLength uint8
- IsCopyrighted bool
- IsOriginal bool
- MarkerBits uint8
- MPEG1OrMPEG2ID uint8
- OriginalStuffingLength uint8
- PacketSequenceCounter uint8
- PackField uint8
- Priority bool
- PrivateData []byte
- PSTDBufferScale uint8
- PSTDBufferSize uint16
- PTS *ClockReference
- PTSDTSIndicator uint8
- ScramblingControl uint8
-}
-
-// DSMTrickMode represents a DSM trick mode
-// https://books.google.fr/books?id=vwUrAwAAQBAJ&pg=PT501&lpg=PT501&dq=dsm+trick+mode+control&source=bl&ots=fI-9IHXMRL&sig=PWnhxrsoMWNQcl1rMCPmJGNO9Ds&hl=fr&sa=X&ved=0ahUKEwjogafD8bjXAhVQ3KQKHeHKD5oQ6AEINDAB#v=onepage&q=dsm%20trick%20mode%20control&f=false
-type DSMTrickMode struct {
- FieldID uint8
- FrequencyTruncation uint8
- IntraSliceRefresh uint8
- RepeatControl uint8
- TrickModeControl uint8
-}
-
-func (h *PESHeader) IsVideoStream() bool {
- return h.StreamID == 0xe0 ||
- h.StreamID == 0xfd
-}
-
-// parsePESData parses a PES data
-func parsePESData(i *astikit.BytesIterator) (d *PESData, err error) {
- // Create data
- d = &PESData{}
-
- // Skip first 3 bytes that are there to identify the PES payload
- i.Seek(3)
-
- // Parse header
- var dataStart, dataEnd int
- if d.Header, dataStart, dataEnd, err = parsePESHeader(i); err != nil {
- err = fmt.Errorf("astits: parsing PES header failed: %w", err)
- return
- }
-
- // Seek to data
- i.Seek(dataStart)
-
- // Extract data
- if d.Data, err = i.NextBytes(dataEnd - dataStart); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// hasPESOptionalHeader checks whether the data has a PES optional header
-func hasPESOptionalHeader(streamID uint8) bool {
- return streamID != StreamIDPaddingStream && streamID != StreamIDPrivateStream2
-}
-
-// parsePESData parses a PES header
-func parsePESHeader(i *astikit.BytesIterator) (h *PESHeader, dataStart, dataEnd int, err error) {
- // Create header
- h = &PESHeader{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Stream ID
- h.StreamID = uint8(b)
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Length
- h.PacketLength = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Update data end
- if h.PacketLength > 0 {
- dataEnd = i.Offset() + int(h.PacketLength)
- } else {
- dataEnd = i.Len()
- }
-
- // Optional header
- if hasPESOptionalHeader(h.StreamID) {
- if h.OptionalHeader, dataStart, err = parsePESOptionalHeader(i); err != nil {
- err = fmt.Errorf("astits: parsing PES optional header failed: %w", err)
- return
- }
- } else {
- dataStart = i.Offset()
- }
- return
-}
-
-// parsePESOptionalHeader parses a PES optional header
-func parsePESOptionalHeader(i *astikit.BytesIterator) (h *PESOptionalHeader, dataStart int, err error) {
- // Create header
- h = &PESOptionalHeader{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Marker bits
- h.MarkerBits = uint8(b) >> 6
-
- // Scrambling control
- h.ScramblingControl = uint8(b) >> 4 & 0x3
-
- // Priority
- h.Priority = uint8(b)&0x8 > 0
-
- // Data alignment indicator
- h.DataAlignmentIndicator = uint8(b)&0x4 > 0
-
- // Copyrighted
- h.IsCopyrighted = uint(b)&0x2 > 0
-
- // Original or copy
- h.IsOriginal = uint8(b)&0x1 > 0
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // PTS DST indicator
- h.PTSDTSIndicator = uint8(b) >> 6 & 0x3
-
- // Flags
- h.HasESCR = uint8(b)&0x20 > 0
- h.HasESRate = uint8(b)&0x10 > 0
- h.HasDSMTrickMode = uint8(b)&0x8 > 0
- h.HasAdditionalCopyInfo = uint8(b)&0x4 > 0
- h.HasCRC = uint8(b)&0x2 > 0
- h.HasExtension = uint8(b)&0x1 > 0
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Header length
- h.HeaderLength = uint8(b)
-
- // Update data start
- dataStart = i.Offset() + int(h.HeaderLength)
-
- // PTS/DTS
- if h.PTSDTSIndicator == PTSDTSIndicatorOnlyPTS {
- if h.PTS, err = parsePTSOrDTS(i); err != nil {
- err = fmt.Errorf("astits: parsing PTS failed: %w", err)
- return
- }
- } else if h.PTSDTSIndicator == PTSDTSIndicatorBothPresent {
- if h.PTS, err = parsePTSOrDTS(i); err != nil {
- err = fmt.Errorf("astits: parsing PTS failed: %w", err)
- return
- }
- if h.DTS, err = parsePTSOrDTS(i); err != nil {
- err = fmt.Errorf("astits: parsing PTS failed: %w", err)
- return
- }
- }
-
- // ESCR
- if h.HasESCR {
- if h.ESCR, err = parseESCR(i); err != nil {
- err = fmt.Errorf("astits: parsing ESCR failed: %w", err)
- return
- }
- }
-
- // ES rate
- if h.HasESRate {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- h.ESRate = uint32(bs[0])&0x7f<<15 | uint32(bs[1])<<7 | uint32(bs[2])>>1
- }
-
- // Trick mode
- if h.HasDSMTrickMode {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- h.DSMTrickMode = parseDSMTrickMode(b)
- }
-
- // Additional copy info
- if h.HasAdditionalCopyInfo {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- h.AdditionalCopyInfo = b & 0x7f
- }
-
- // CRC
- if h.HasCRC {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- h.CRC = uint16(bs[0])>>8 | uint16(bs[1])
- }
-
- // Extension
- if h.HasExtension {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Flags
- h.HasPrivateData = b&0x80 > 0
- h.HasPackHeaderField = b&0x40 > 0
- h.HasProgramPacketSequenceCounter = b&0x20 > 0
- h.HasPSTDBuffer = b&0x10 > 0
- h.HasExtension2 = b&0x1 > 0
-
- // Private data
- if h.HasPrivateData {
- if h.PrivateData, err = i.NextBytes(16); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
-
- // Pack field length
- if h.HasPackHeaderField {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- // TODO it's only a length of pack_header, should read it all. now it's wrong
- h.PackField = uint8(b)
- }
-
- // Program packet sequence counter
- if h.HasProgramPacketSequenceCounter {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- h.PacketSequenceCounter = uint8(bs[0]) & 0x7f
- h.MPEG1OrMPEG2ID = uint8(bs[1]) >> 6 & 0x1
- h.OriginalStuffingLength = uint8(bs[1]) & 0x3f
- }
-
- // P-STD buffer
- if h.HasPSTDBuffer {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- h.PSTDBufferScale = bs[0] >> 5 & 0x1
- h.PSTDBufferSize = uint16(bs[0])&0x1f<<8 | uint16(bs[1])
- }
-
- // Extension 2
- if h.HasExtension2 {
- // Length
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- h.Extension2Length = uint8(b) & 0x7f
-
- // Data
- if h.Extension2Data, err = i.NextBytes(int(h.Extension2Length)); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- }
- return
-}
-
-// parseDSMTrickMode parses a DSM trick mode
-func parseDSMTrickMode(i byte) (m *DSMTrickMode) {
- m = &DSMTrickMode{}
- m.TrickModeControl = i >> 5
- if m.TrickModeControl == TrickModeControlFastForward || m.TrickModeControl == TrickModeControlFastReverse {
- m.FieldID = i >> 3 & 0x3
- m.IntraSliceRefresh = i >> 2 & 0x1
- m.FrequencyTruncation = i & 0x3
- } else if m.TrickModeControl == TrickModeControlFreezeFrame {
- m.FieldID = i >> 3 & 0x3
- } else if m.TrickModeControl == TrickModeControlSlowMotion || m.TrickModeControl == TrickModeControlSlowReverse {
- m.RepeatControl = i & 0x1f
- }
- return
-}
-
-// parsePTSOrDTS parses a PTS or a DTS
-func parsePTSOrDTS(i *astikit.BytesIterator) (cr *ClockReference, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(5); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- cr = newClockReference(int64(uint64(bs[0])>>1&0x7<<30|uint64(bs[1])<<22|uint64(bs[2])>>1&0x7f<<15|uint64(bs[3])<<7|uint64(bs[4])>>1&0x7f), 0)
- return
-}
-
-// parseESCR parses an ESCR
-func parseESCR(i *astikit.BytesIterator) (cr *ClockReference, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(6); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- escr := uint64(bs[0])>>3&0x7<<39 | uint64(bs[0])&0x3<<37 | uint64(bs[1])<<29 | uint64(bs[2])>>3<<24 | uint64(bs[2])&0x3<<22 | uint64(bs[3])<<14 | uint64(bs[4])>>3<<9 | uint64(bs[4])&0x3<<7 | uint64(bs[5])>>1
- cr = newClockReference(int64(escr>>9), int64(escr&0x1ff))
- return
-}
-
-// will count how many total bytes and payload bytes will be written when writePESData is called with the same arguments
-// should be used by the caller of writePESData to determine AF stuffing size needed to be applied
-// since the length of video PES packets are often zero, we can't just stuff it with 0xff-s at the end
-func calcPESDataLength(h *PESHeader, payloadLeft []byte, isPayloadStart bool, bytesAvailable int) (totalBytes, payloadBytes int) {
- totalBytes += pesHeaderLength
- if isPayloadStart {
- totalBytes += int(calcPESOptionalHeaderLength(h.OptionalHeader))
- }
- bytesAvailable -= totalBytes
-
- if len(payloadLeft) < bytesAvailable {
- payloadBytes = len(payloadLeft)
- } else {
- payloadBytes = bytesAvailable
- }
-
- return
-}
-
-// first packet will contain PES header with optional PES header and payload, if possible
-// all consequential packets will contain just payload
-// for the last packet caller must add AF with stuffing, see calcPESDataLength
-func writePESData(w *astikit.BitsWriter, h *PESHeader, payloadLeft []byte, isPayloadStart bool, bytesAvailable int) (totalBytesWritten, payloadBytesWritten int, err error) {
- if isPayloadStart {
- var n int
- n, err = writePESHeader(w, h, len(payloadLeft))
- if err != nil {
- return
- }
- totalBytesWritten += n
- }
-
- payloadBytesWritten = bytesAvailable - totalBytesWritten
- if payloadBytesWritten > len(payloadLeft) {
- payloadBytesWritten = len(payloadLeft)
- }
-
- err = w.Write(payloadLeft[:payloadBytesWritten])
- if err != nil {
- return
- }
-
- totalBytesWritten += payloadBytesWritten
- return
-}
-
-func writePESHeader(w *astikit.BitsWriter, h *PESHeader, payloadSize int) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint32(0x000001), 24) // packet_start_code_prefix
- b.Write(h.StreamID)
-
- pesPacketLength := 0
-
- if !h.IsVideoStream() {
- pesPacketLength = payloadSize
- if hasPESOptionalHeader(h.StreamID) {
- pesPacketLength += int(calcPESOptionalHeaderLength(h.OptionalHeader))
- }
- if pesPacketLength > 0xffff {
- pesPacketLength = 0
- }
- }
-
- b.Write(uint16(pesPacketLength))
-
- bytesWritten := pesHeaderLength
-
- if hasPESOptionalHeader(h.StreamID) {
- n, err := writePESOptionalHeader(w, h.OptionalHeader)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- return bytesWritten, b.Err()
-}
-
-func calcPESOptionalHeaderLength(h *PESOptionalHeader) uint8 {
- if h == nil {
- return 0
- }
- return 3 + calcPESOptionalHeaderDataLength(h)
-}
-
-func calcPESOptionalHeaderDataLength(h *PESOptionalHeader) (length uint8) {
- if h.PTSDTSIndicator == PTSDTSIndicatorOnlyPTS {
- length += ptsOrDTSByteLength
- } else if h.PTSDTSIndicator == PTSDTSIndicatorBothPresent {
- length += 2 * ptsOrDTSByteLength
- }
-
- if h.HasESCR {
- length += escrLength
- }
-
- if h.HasESRate {
- length += 3
- }
-
- if h.HasDSMTrickMode {
- length += dsmTrickModeLength
- }
-
- if h.HasAdditionalCopyInfo {
- length++
- }
-
- if h.HasCRC {
- //length += 4 // TODO
- }
-
- if h.HasExtension {
- length++
-
- if h.HasPrivateData {
- length += 16
- }
-
- if h.HasPackHeaderField {
- // TODO
- }
-
- if h.HasProgramPacketSequenceCounter {
- length += 2
- }
-
- if h.HasPSTDBuffer {
- length += 2
- }
-
- if h.HasExtension2 {
- length += 1 + uint8(len(h.Extension2Data))
- }
- }
-
- return
-}
-
-func writePESOptionalHeader(w *astikit.BitsWriter, h *PESOptionalHeader) (int, error) {
- if h == nil {
- return 0, nil
- }
-
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint8(0b10), 2) // marker bits
- b.WriteN(h.ScramblingControl, 2)
- b.Write(h.Priority)
- b.Write(h.DataAlignmentIndicator)
- b.Write(h.IsCopyrighted)
- b.Write(h.IsOriginal)
-
- b.WriteN(h.PTSDTSIndicator, 2)
- b.Write(h.HasESCR)
- b.Write(h.HasESRate)
- b.Write(h.HasDSMTrickMode)
- b.Write(h.HasAdditionalCopyInfo)
- b.Write(false) // CRC of previous PES packet. not supported yet
- //b.Write(h.HasCRC)
- b.Write(h.HasExtension)
-
- pesOptionalHeaderDataLength := calcPESOptionalHeaderDataLength(h)
- b.Write(pesOptionalHeaderDataLength)
-
- bytesWritten := 3
-
- if h.PTSDTSIndicator == PTSDTSIndicatorOnlyPTS {
- n, err := writePTSOrDTS(w, 0b0010, h.PTS)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if h.PTSDTSIndicator == PTSDTSIndicatorBothPresent {
- n, err := writePTSOrDTS(w, 0b0011, h.PTS)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
-
- n, err = writePTSOrDTS(w, 0b0001, h.DTS)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if h.HasESCR {
- n, err := writeESCR(w, h.ESCR)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if h.HasESRate {
- b.Write(true)
- b.WriteN(h.ESRate, 22)
- b.Write(true)
- bytesWritten += 3
- }
-
- if h.HasDSMTrickMode {
- n, err := writeDSMTrickMode(w, h.DSMTrickMode)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if h.HasAdditionalCopyInfo {
- b.Write(true) // marker_bit
- b.WriteN(h.AdditionalCopyInfo, 7)
- bytesWritten++
- }
-
- if h.HasCRC {
- // TODO, not supported
- }
-
- if h.HasExtension {
- // exp 10110001
- // act 10111111
- b.Write(h.HasPrivateData)
- b.Write(false) // TODO pack_header_field_flag, not implemented
- //b.Write(h.HasPackHeaderField)
- b.Write(h.HasProgramPacketSequenceCounter)
- b.Write(h.HasPSTDBuffer)
- b.WriteN(uint8(0xff), 3) // reserved
- b.Write(h.HasExtension2)
- bytesWritten++
-
- if h.HasPrivateData {
- b.WriteBytesN(h.PrivateData, 16, 0)
- bytesWritten += 16
- }
-
- if h.HasPackHeaderField {
- // TODO (see parsePESOptionalHeader)
- }
-
- if h.HasProgramPacketSequenceCounter {
- b.Write(true) // marker_bit
- b.WriteN(h.PacketSequenceCounter, 7)
- b.Write(true) // marker_bit
- b.WriteN(h.MPEG1OrMPEG2ID, 1)
- b.WriteN(h.OriginalStuffingLength, 6)
- bytesWritten += 2
- }
-
- if h.HasPSTDBuffer {
- b.WriteN(uint8(0b01), 2)
- b.WriteN(h.PSTDBufferScale, 1)
- b.WriteN(h.PSTDBufferSize, 13)
- bytesWritten += 2
- }
-
- if h.HasExtension2 {
- b.Write(true) // marker_bit
- b.WriteN(uint8(len(h.Extension2Data)), 7)
- b.Write(h.Extension2Data)
- bytesWritten += 1 + len(h.Extension2Data)
- }
- }
-
- return bytesWritten, b.Err()
-}
-
-func writeDSMTrickMode(w *astikit.BitsWriter, m *DSMTrickMode) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(m.TrickModeControl, 3)
- if m.TrickModeControl == TrickModeControlFastForward || m.TrickModeControl == TrickModeControlFastReverse {
- b.WriteN(m.FieldID, 2)
- b.Write(m.IntraSliceRefresh == 1) // it should be boolean
- b.WriteN(m.FrequencyTruncation, 2)
- } else if m.TrickModeControl == TrickModeControlFreezeFrame {
- b.WriteN(m.FieldID, 2)
- b.WriteN(uint8(0xff), 3) // reserved
- } else if m.TrickModeControl == TrickModeControlSlowMotion || m.TrickModeControl == TrickModeControlSlowReverse {
- b.WriteN(m.RepeatControl, 5)
- } else {
- b.WriteN(uint8(0xff), 5) // reserved
- }
-
- return dsmTrickModeLength, b.Err()
-}
-
-func writeESCR(w *astikit.BitsWriter, cr *ClockReference) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint8(0xff), 2)
- b.WriteN(uint64(cr.Base>>30), 3)
- b.Write(true)
- b.WriteN(uint64(cr.Base>>15), 15)
- b.Write(true)
- b.WriteN(uint64(cr.Base), 15)
- b.Write(true)
- b.WriteN(uint64(cr.Extension), 9)
- b.Write(true)
-
- return escrLength, b.Err()
-}
-
-func writePTSOrDTS(w *astikit.BitsWriter, flag uint8, cr *ClockReference) (bytesWritten int, retErr error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(flag, 4)
- b.WriteN(uint64(cr.Base>>30), 3)
- b.Write(true)
- b.WriteN(uint64(cr.Base>>15), 15)
- b.Write(true)
- b.WriteN(uint64(cr.Base), 15)
- b.Write(true)
-
- return ptsOrDTSByteLength, b.Err()
-}
diff --git a/vendor/github.com/asticode/go-astits/data_pmt.go b/vendor/github.com/asticode/go-astits/data_pmt.go
deleted file mode 100644
index d1ea54fa372..00000000000
--- a/vendor/github.com/asticode/go-astits/data_pmt.go
+++ /dev/null
@@ -1,256 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-type StreamType uint8
-
-// Stream types
-const (
- StreamTypeMPEG1Video StreamType = 0x01
- StreamTypeMPEG2Video StreamType = 0x02
- StreamTypeMPEG1Audio StreamType = 0x03 // ISO/IEC 11172-3
- StreamTypeMPEG2HalvedSampleRateAudio StreamType = 0x04 // ISO/IEC 13818-3
- StreamTypeMPEG2Audio StreamType = 0x04
- StreamTypePrivateSection StreamType = 0x05
- StreamTypePrivateData StreamType = 0x06
- StreamTypeMPEG2PacketizedData StreamType = 0x06 // Rec. ITU-T H.222 | ISO/IEC 13818-1 i.e., DVB subtitles/VBI and AC-3
- StreamTypeADTS StreamType = 0x0F // ISO/IEC 13818-7 Audio with ADTS transport syntax
- StreamTypeAACAudio StreamType = 0x0f
- StreamTypeMPEG4Video StreamType = 0x10
- StreamTypeAACLATMAudio StreamType = 0x11
- StreamTypeMetadata StreamType = 0x15
- StreamTypeH264Video StreamType = 0x1B // Rec. ITU-T H.264 | ISO/IEC 14496-10
- StreamTypeH265Video StreamType = 0x24 // Rec. ITU-T H.265 | ISO/IEC 23008-2
- StreamTypeHEVCVideo StreamType = 0x24
- StreamTypeCAVSVideo StreamType = 0x42
- StreamTypeVC1Video StreamType = 0xea
- StreamTypeDIRACVideo StreamType = 0xd1
- StreamTypeAC3Audio StreamType = 0x81
- StreamTypeDTSAudio StreamType = 0x82
- StreamTypeTRUEHDAudio StreamType = 0x83
- StreamTypeEAC3Audio StreamType = 0x87
-)
-
-// PMTData represents a PMT data
-// https://en.wikipedia.org/wiki/Program-specific_information
-type PMTData struct {
- ElementaryStreams []*PMTElementaryStream
- PCRPID uint16 // The packet identifier that contains the program clock reference used to improve the random access accuracy of the stream's timing that is derived from the program timestamp. If this is unused. then it is set to 0x1FFF (all bits on).
- ProgramDescriptors []*Descriptor // Program descriptors
- ProgramNumber uint16
-}
-
-// PMTElementaryStream represents a PMT elementary stream
-type PMTElementaryStream struct {
- ElementaryPID uint16 // The packet identifier that contains the stream type data.
- ElementaryStreamDescriptors []*Descriptor // Elementary stream descriptors
- StreamType StreamType // This defines the structure of the data contained within the elementary packet identifier.
-}
-
-// parsePMTSection parses a PMT section
-func parsePMTSection(i *astikit.BytesIterator, offsetSectionsEnd int, tableIDExtension uint16) (d *PMTData, err error) {
- // Create data
- d = &PMTData{ProgramNumber: tableIDExtension}
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // PCR PID
- d.PCRPID = uint16(bs[0]&0x1f)<<8 | uint16(bs[1])
-
- // Program descriptors
- if d.ProgramDescriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Loop until end of section data is reached
- for i.Offset() < offsetSectionsEnd {
- // Create stream
- e := &PMTElementaryStream{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Stream type
- e.StreamType = StreamType(b)
-
- // Get next bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Elementary PID
- e.ElementaryPID = uint16(bs[0]&0x1f)<<8 | uint16(bs[1])
-
- // Elementary descriptors
- if e.ElementaryStreamDescriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Add elementary stream
- d.ElementaryStreams = append(d.ElementaryStreams, e)
- }
- return
-}
-
-func calcPMTProgramInfoLength(d *PMTData) uint16 {
- ret := uint16(2) // program_info_length
- ret += calcDescriptorsLength(d.ProgramDescriptors)
-
- for _, es := range d.ElementaryStreams {
- ret += 5 // stream_type, elementary_pid, es_info_length
- ret += calcDescriptorsLength(es.ElementaryStreamDescriptors)
- }
-
- return ret
-}
-
-func calcPMTSectionLength(d *PMTData) uint16 {
- ret := uint16(4)
- ret += calcDescriptorsLength(d.ProgramDescriptors)
-
- for _, es := range d.ElementaryStreams {
- ret += 5
- ret += calcDescriptorsLength(es.ElementaryStreamDescriptors)
- }
-
- return ret
-}
-
-func writePMTSection(w *astikit.BitsWriter, d *PMTData) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- // TODO split into sections
-
- b.WriteN(uint8(0xff), 3)
- b.WriteN(d.PCRPID, 13)
- bytesWritten := 2
-
- n, err := writeDescriptorsWithLength(w, d.ProgramDescriptors)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
-
- for _, es := range d.ElementaryStreams {
- b.Write(uint8(es.StreamType))
- b.WriteN(uint8(0xff), 3)
- b.WriteN(es.ElementaryPID, 13)
- bytesWritten += 3
-
- n, err = writeDescriptorsWithLength(w, es.ElementaryStreamDescriptors)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- return bytesWritten, b.Err()
-}
-
-func (t StreamType) IsVideo() bool {
- switch t {
- case StreamTypeMPEG1Video,
- StreamTypeMPEG2Video,
- StreamTypeMPEG4Video,
- StreamTypeH264Video,
- StreamTypeH265Video,
- StreamTypeCAVSVideo,
- StreamTypeVC1Video,
- StreamTypeDIRACVideo:
- return true
- }
- return false
-}
-
-func (t StreamType) IsAudio() bool {
- switch t {
- case StreamTypeMPEG1Audio,
- StreamTypeMPEG2Audio,
- StreamTypeAACAudio,
- StreamTypeAACLATMAudio,
- StreamTypeAC3Audio,
- StreamTypeDTSAudio,
- StreamTypeTRUEHDAudio,
- StreamTypeEAC3Audio:
- return true
- }
- return false
-}
-
-func (t StreamType) String() string {
- switch t {
- case StreamTypeMPEG1Video:
- return "MPEG1 Video"
- case StreamTypeMPEG2Video:
- return "MPEG2 Video"
- case StreamTypeMPEG1Audio:
- return "MPEG1 Audio"
- case StreamTypeMPEG2Audio:
- return "MPEG2 Audio"
- case StreamTypePrivateSection:
- return "Private Section"
- case StreamTypePrivateData:
- return "Private Data"
- case StreamTypeAACAudio:
- return "AAC Audio"
- case StreamTypeMPEG4Video:
- return "MPEG4 Video"
- case StreamTypeAACLATMAudio:
- return "AAC LATM Audio"
- case StreamTypeMetadata:
- return "Metadata"
- case StreamTypeH264Video:
- return "H264 Video"
- case StreamTypeH265Video:
- return "H265 Video"
- case StreamTypeCAVSVideo:
- return "CAVS Video"
- case StreamTypeVC1Video:
- return "VC1 Video"
- case StreamTypeDIRACVideo:
- return "DIRAC Video"
- case StreamTypeAC3Audio:
- return "AC3 Audio"
- case StreamTypeDTSAudio:
- return "DTS Audio"
- case StreamTypeTRUEHDAudio:
- return "TRUEHD Audio"
- case StreamTypeEAC3Audio:
- return "EAC3 Audio"
- }
- return "Unknown"
-}
-
-func (t StreamType) ToPESStreamID() uint8 {
- switch t {
- case StreamTypeMPEG1Video, StreamTypeMPEG2Video, StreamTypeMPEG4Video, StreamTypeH264Video,
- StreamTypeH265Video, StreamTypeCAVSVideo, StreamTypeVC1Video:
- return 0xe0
- case StreamTypeDIRACVideo:
- return 0xfd
- case StreamTypeMPEG2Audio, StreamTypeAACAudio, StreamTypeAACLATMAudio:
- return 0xc0
- case StreamTypeAC3Audio, StreamTypeEAC3Audio: // m2ts_mode???
- return 0xfd
- case StreamTypePrivateSection, StreamTypePrivateData, StreamTypeMetadata:
- return 0xfc
- default:
- return 0xbd
- }
-}
diff --git a/vendor/github.com/asticode/go-astits/data_psi.go b/vendor/github.com/asticode/go-astits/data_psi.go
deleted file mode 100644
index e0c3e780600..00000000000
--- a/vendor/github.com/asticode/go-astits/data_psi.go
+++ /dev/null
@@ -1,608 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-// PSI table IDs
-const (
- PSITableTypeBAT = "BAT"
- PSITableTypeDIT = "DIT"
- PSITableTypeEIT = "EIT"
- PSITableTypeNIT = "NIT"
- PSITableTypeNull = "Null"
- PSITableTypePAT = "PAT"
- PSITableTypePMT = "PMT"
- PSITableTypeRST = "RST"
- PSITableTypeSDT = "SDT"
- PSITableTypeSIT = "SIT"
- PSITableTypeST = "ST"
- PSITableTypeTDT = "TDT"
- PSITableTypeTOT = "TOT"
- PSITableTypeUnknown = "Unknown"
-)
-
-type PSITableID uint16
-
-const (
- PSITableIDPAT PSITableID = 0x00
- PSITableIDPMT PSITableID = 0x02
- PSITableIDBAT PSITableID = 0x4a
- PSITableIDDIT PSITableID = 0x7e
- PSITableIDRST PSITableID = 0x71
- PSITableIDSIT PSITableID = 0x7f
- PSITableIDST PSITableID = 0x72
- PSITableIDTDT PSITableID = 0x70
- PSITableIDTOT PSITableID = 0x73
- PSITableIDNull PSITableID = 0xff
-
- PSITableIDEITStart PSITableID = 0x4e
- PSITableIDEITEnd PSITableID = 0x6f
- PSITableIDSDTVariant1 PSITableID = 0x42
- PSITableIDSDTVariant2 PSITableID = 0x46
- PSITableIDNITVariant1 PSITableID = 0x40
- PSITableIDNITVariant2 PSITableID = 0x41
-)
-
-// PSIData represents a PSI data
-// https://en.wikipedia.org/wiki/Program-specific_information
-type PSIData struct {
- PointerField int // Present at the start of the TS packet payload signaled by the payload_unit_start_indicator bit in the TS header. Used to set packet alignment bytes or content before the start of tabled payload data.
- Sections []*PSISection
-}
-
-// PSISection represents a PSI section
-type PSISection struct {
- CRC32 uint32 // A checksum of the entire table excluding the pointer field, pointer filler bytes and the trailing CRC32.
- Header *PSISectionHeader
- Syntax *PSISectionSyntax
-}
-
-// PSISectionHeader represents a PSI section header
-type PSISectionHeader struct {
- PrivateBit bool // The PAT, PMT, and CAT all set this to 0. Other tables set this to 1.
- SectionLength uint16 // The number of bytes that follow for the syntax section (with CRC value) and/or table data. These bytes must not exceed a value of 1021.
- SectionSyntaxIndicator bool // A flag that indicates if the syntax section follows the section length. The PAT, PMT, and CAT all set this to 1.
- TableID PSITableID // Table Identifier, that defines the structure of the syntax section and other contained data. As an exception, if this is the byte that immediately follow previous table section and is set to 0xFF, then it indicates that the repeat of table section end here and the rest of TS data payload shall be stuffed with 0xFF. Consequently the value 0xFF shall not be used for the Table Identifier.
- TableType string
-}
-
-// PSISectionSyntax represents a PSI section syntax
-type PSISectionSyntax struct {
- Data *PSISectionSyntaxData
- Header *PSISectionSyntaxHeader
-}
-
-// PSISectionSyntaxHeader represents a PSI section syntax header
-type PSISectionSyntaxHeader struct {
- CurrentNextIndicator bool // Indicates if data is current in effect or is for future use. If the bit is flagged on, then the data is to be used at the present moment.
- LastSectionNumber uint8 // This indicates which table is the last table in the sequence of tables.
- SectionNumber uint8 // This is an index indicating which table this is in a related sequence of tables. The first table starts from 0.
- TableIDExtension uint16 // Informational only identifier. The PAT uses this for the transport stream identifier and the PMT uses this for the Program number.
- VersionNumber uint8 // Syntax version number. Incremented when data is changed and wrapped around on overflow for values greater than 32.
-}
-
-// PSISectionSyntaxData represents a PSI section syntax data
-type PSISectionSyntaxData struct {
- EIT *EITData
- NIT *NITData
- PAT *PATData
- PMT *PMTData
- SDT *SDTData
- TOT *TOTData
-}
-
-// parsePSIData parses a PSI data
-func parsePSIData(i *astikit.BytesIterator) (d *PSIData, err error) {
- // Init data
- d = &PSIData{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Pointer field
- d.PointerField = int(b)
-
- // Pointer filler bytes
- i.Skip(d.PointerField)
-
- // Parse sections
- var s *PSISection
- var stop bool
- for i.HasBytesLeft() && !stop {
- if s, stop, err = parsePSISection(i); err != nil {
- err = fmt.Errorf("astits: parsing PSI table failed: %w", err)
- return
- }
- d.Sections = append(d.Sections, s)
- }
- return
-}
-
-// parsePSISection parses a PSI section
-func parsePSISection(i *astikit.BytesIterator) (s *PSISection, stop bool, err error) {
- // Init section
- s = &PSISection{}
-
- // Parse header
- var offsetStart, offsetSectionsEnd, offsetEnd int
- if s.Header, offsetStart, _, offsetSectionsEnd, offsetEnd, err = parsePSISectionHeader(i); err != nil {
- err = fmt.Errorf("astits: parsing PSI section header failed: %w", err)
- return
- }
-
- // Check whether we need to stop the parsing
- if shouldStopPSIParsing(s.Header.TableID) {
- stop = true
- return
- }
-
- // Check whether there's a syntax section
- if s.Header.SectionLength > 0 {
- // Parse syntax
- if s.Syntax, err = parsePSISectionSyntax(i, s.Header, offsetSectionsEnd); err != nil {
- err = fmt.Errorf("astits: parsing PSI section syntax failed: %w", err)
- return
- }
-
- // Process CRC32
- if s.Header.TableID.hasCRC32() {
- // Seek to the end of the sections
- i.Seek(offsetSectionsEnd)
-
- // Parse CRC32
- if s.CRC32, err = parseCRC32(i); err != nil {
- err = fmt.Errorf("astits: parsing CRC32 failed: %w", err)
- return
- }
-
- // Get CRC32 data
- i.Seek(offsetStart)
- var crc32Data []byte
- if crc32Data, err = i.NextBytesNoCopy(offsetSectionsEnd - offsetStart); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Compute CRC32
- crc32 := computeCRC32(crc32Data)
-
- // Check CRC32
- if crc32 != s.CRC32 {
- err = fmt.Errorf("astits: Table CRC32 %x != computed CRC32 %x", s.CRC32, crc32)
- return
- }
- }
- }
-
- // Seek to the end of the section
- i.Seek(offsetEnd)
- return
-}
-
-// parseCRC32 parses a CRC32
-func parseCRC32(i *astikit.BytesIterator) (c uint32, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- c = uint32(bs[0])<<24 | uint32(bs[1])<<16 | uint32(bs[2])<<8 | uint32(bs[3])
- return
-}
-
-// shouldStopPSIParsing checks whether the PSI parsing should be stopped
-func shouldStopPSIParsing(tableID PSITableID) bool {
- return tableID == PSITableIDNull ||
- tableID.isUnknown()
-}
-
-// parsePSISectionHeader parses a PSI section header
-func parsePSISectionHeader(i *astikit.BytesIterator) (h *PSISectionHeader, offsetStart, offsetSectionsStart, offsetSectionsEnd, offsetEnd int, err error) {
- // Init
- h = &PSISectionHeader{}
- offsetStart = i.Offset()
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Table ID
- h.TableID = PSITableID(b)
-
- // Table type
- h.TableType = h.TableID.Type()
-
- // Check whether we need to stop the parsing
- if shouldStopPSIParsing(h.TableID) {
- return
- }
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Section syntax indicator
- h.SectionSyntaxIndicator = bs[0]&0x80 > 0
-
- // Private bit
- h.PrivateBit = bs[0]&0x40 > 0
-
- // Section length
- h.SectionLength = uint16(bs[0]&0xf)<<8 | uint16(bs[1])
-
- // Offsets
- offsetSectionsStart = i.Offset()
- offsetEnd = offsetSectionsStart + int(h.SectionLength)
- offsetSectionsEnd = offsetEnd
- if h.TableID.hasCRC32() {
- offsetSectionsEnd -= 4
- }
- return
-}
-
-// PSITableID.Type() returns the psi table type based on the table id
-// Page: 28 | https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-func (t PSITableID) Type() string {
- switch {
- case t == PSITableIDBAT:
- return PSITableTypeBAT
- case t >= PSITableIDEITStart && t <= PSITableIDEITEnd:
- return PSITableTypeEIT
- case t == PSITableIDDIT:
- return PSITableTypeDIT
- case t == PSITableIDNITVariant1, t == PSITableIDNITVariant2:
- return PSITableTypeNIT
- case t == PSITableIDNull:
- return PSITableTypeNull
- case t == PSITableIDPAT:
- return PSITableTypePAT
- case t == PSITableIDPMT:
- return PSITableTypePMT
- case t == PSITableIDRST:
- return PSITableTypeRST
- case t == PSITableIDSDTVariant1, t == PSITableIDSDTVariant2:
- return PSITableTypeSDT
- case t == PSITableIDSIT:
- return PSITableTypeSIT
- case t == PSITableIDST:
- return PSITableTypeST
- case t == PSITableIDTDT:
- return PSITableTypeTDT
- case t == PSITableIDTOT:
- return PSITableTypeTOT
- default:
- return PSITableTypeUnknown
- }
-}
-
-// hasPSISyntaxHeader checks whether the section has a syntax header
-func (t PSITableID) hasPSISyntaxHeader() bool {
- return t == PSITableIDPAT ||
- t == PSITableIDPMT ||
- t == PSITableIDNITVariant1 || t == PSITableIDNITVariant2 ||
- t == PSITableIDSDTVariant1 || t == PSITableIDSDTVariant2 ||
- (t >= PSITableIDEITStart && t <= PSITableIDEITEnd)
-}
-
-// hasCRC32 checks whether the table has a CRC32
-func (t PSITableID) hasCRC32() bool {
- return t == PSITableIDPAT ||
- t == PSITableIDPMT ||
- t == PSITableIDTOT ||
- t == PSITableIDNITVariant1 || t == PSITableIDNITVariant2 ||
- t == PSITableIDSDTVariant1 || t == PSITableIDSDTVariant2 ||
- (t >= PSITableIDEITStart && t <= PSITableIDEITEnd)
-}
-
-func (t PSITableID) isUnknown() bool {
- switch t {
- case PSITableIDBAT,
- PSITableIDDIT,
- PSITableIDNITVariant1, PSITableIDNITVariant2,
- PSITableIDNull,
- PSITableIDPAT,
- PSITableIDPMT,
- PSITableIDRST,
- PSITableIDSDTVariant1, PSITableIDSDTVariant2,
- PSITableIDSIT,
- PSITableIDST,
- PSITableIDTDT,
- PSITableIDTOT:
- return false
- }
- if t >= PSITableIDEITStart && t <= PSITableIDEITEnd {
- return false
- }
- return true
-}
-
-// parsePSISectionSyntax parses a PSI section syntax
-func parsePSISectionSyntax(i *astikit.BytesIterator, h *PSISectionHeader, offsetSectionsEnd int) (s *PSISectionSyntax, err error) {
- // Init
- s = &PSISectionSyntax{}
-
- // Header
- if h.TableID.hasPSISyntaxHeader() {
- if s.Header, err = parsePSISectionSyntaxHeader(i); err != nil {
- err = fmt.Errorf("astits: parsing PSI section syntax header failed: %w", err)
- return
- }
- }
-
- // Parse data
- if s.Data, err = parsePSISectionSyntaxData(i, h, s.Header, offsetSectionsEnd); err != nil {
- err = fmt.Errorf("astits: parsing PSI section syntax data failed: %w", err)
- return
- }
- return
-}
-
-// parsePSISectionSyntaxHeader parses a PSI section syntax header
-func parsePSISectionSyntaxHeader(i *astikit.BytesIterator) (h *PSISectionSyntaxHeader, err error) {
- // Init
- h = &PSISectionSyntaxHeader{}
-
- // Get next 2 bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Table ID extension
- h.TableIDExtension = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Version number
- h.VersionNumber = uint8(b&0x3f) >> 1
-
- // Current/Next indicator
- h.CurrentNextIndicator = b&0x1 > 0
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Section number
- h.SectionNumber = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Last section number
- h.LastSectionNumber = uint8(b)
- return
-}
-
-// parsePSISectionSyntaxData parses a PSI section data
-func parsePSISectionSyntaxData(i *astikit.BytesIterator, h *PSISectionHeader, sh *PSISectionSyntaxHeader, offsetSectionsEnd int) (d *PSISectionSyntaxData, err error) {
- // Init
- d = &PSISectionSyntaxData{}
-
- // Switch on table type
- switch h.TableID {
- case PSITableIDBAT:
- // TODO Parse BAT
- case PSITableIDDIT:
- // TODO Parse DIT
- case PSITableIDNITVariant1, PSITableIDNITVariant2:
- if d.NIT, err = parseNITSection(i, sh.TableIDExtension); err != nil {
- err = fmt.Errorf("astits: parsing NIT section failed: %w", err)
- return
- }
- case PSITableIDPAT:
- if d.PAT, err = parsePATSection(i, offsetSectionsEnd, sh.TableIDExtension); err != nil {
- err = fmt.Errorf("astits: parsing PAT section failed: %w", err)
- return
- }
- case PSITableIDPMT:
- if d.PMT, err = parsePMTSection(i, offsetSectionsEnd, sh.TableIDExtension); err != nil {
- err = fmt.Errorf("astits: parsing PMT section failed: %w", err)
- return
- }
- case PSITableIDRST:
- // TODO Parse RST
- case PSITableIDSDTVariant1, PSITableIDSDTVariant2:
- if d.SDT, err = parseSDTSection(i, offsetSectionsEnd, sh.TableIDExtension); err != nil {
- err = fmt.Errorf("astits: parsing PMT section failed: %w", err)
- return
- }
- case PSITableIDSIT:
- // TODO Parse SIT
- case PSITableIDST:
- // TODO Parse ST
- case PSITableIDTOT:
- if d.TOT, err = parseTOTSection(i); err != nil {
- err = fmt.Errorf("astits: parsing TOT section failed: %w", err)
- return
- }
- case PSITableIDTDT:
- // TODO Parse TDT
- }
-
- if h.TableID >= PSITableIDEITStart && h.TableID <= PSITableIDEITEnd {
- if d.EIT, err = parseEITSection(i, offsetSectionsEnd, sh.TableIDExtension); err != nil {
- err = fmt.Errorf("astits: parsing EIT section failed: %w", err)
- return
- }
- }
-
- return
-}
-
-// toData parses the PSI tables and returns a set of DemuxerData
-func (d *PSIData) toData(firstPacket *Packet, pid uint16) (ds []*DemuxerData) {
- // Loop through sections
- for _, s := range d.Sections {
- // Switch on table type
- switch s.Header.TableID {
- case PSITableIDNITVariant1, PSITableIDNITVariant2:
- ds = append(ds, &DemuxerData{FirstPacket: firstPacket, NIT: s.Syntax.Data.NIT, PID: pid})
- case PSITableIDPAT:
- ds = append(ds, &DemuxerData{FirstPacket: firstPacket, PAT: s.Syntax.Data.PAT, PID: pid})
- case PSITableIDPMT:
- ds = append(ds, &DemuxerData{FirstPacket: firstPacket, PID: pid, PMT: s.Syntax.Data.PMT})
- case PSITableIDSDTVariant1, PSITableIDSDTVariant2:
- ds = append(ds, &DemuxerData{FirstPacket: firstPacket, PID: pid, SDT: s.Syntax.Data.SDT})
- case PSITableIDTOT:
- ds = append(ds, &DemuxerData{FirstPacket: firstPacket, PID: pid, TOT: s.Syntax.Data.TOT})
- }
- if s.Header.TableID >= PSITableIDEITStart && s.Header.TableID <= PSITableIDEITEnd {
- ds = append(ds, &DemuxerData{EIT: s.Syntax.Data.EIT, FirstPacket: firstPacket, PID: pid})
- }
- }
- return
-}
-
-func writePSIData(w *astikit.BitsWriter, d *PSIData) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
- b.Write(uint8(d.PointerField))
- for i := 0; i < d.PointerField; i++ {
- b.Write(uint8(0x00))
- }
-
- bytesWritten := 1 + d.PointerField
-
- if err := b.Err(); err != nil {
- return 0, err
- }
-
- for _, s := range d.Sections {
- n, err := writePSISection(w, s)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- return bytesWritten, nil
-}
-
-func calcPSISectionLength(s *PSISection) uint16 {
- ret := uint16(0)
- if s.Header.TableID.hasPSISyntaxHeader() {
- ret += 5 // PSI syntax header length
- }
-
- switch s.Header.TableID {
- case PSITableIDPAT:
- ret += calcPATSectionLength(s.Syntax.Data.PAT)
- case PSITableIDPMT:
- ret += calcPMTSectionLength(s.Syntax.Data.PMT)
- }
-
- if s.Header.TableID.hasCRC32() {
- ret += 4
- }
-
- return ret
-}
-
-func writePSISection(w *astikit.BitsWriter, s *PSISection) (int, error) {
- if s.Header.TableID != PSITableIDPAT && s.Header.TableID != PSITableIDPMT {
- return 0, fmt.Errorf("writePSISection: table %s is not implemented", s.Header.TableID.Type())
- }
-
- b := astikit.NewBitsWriterBatch(w)
-
- sectionLength := calcPSISectionLength(s)
- sectionCRC32 := crc32Polynomial
-
- if s.Header.TableID.hasCRC32() {
- w.SetWriteCallback(func(bs []byte) {
- sectionCRC32 = updateCRC32(sectionCRC32, bs)
- })
- defer w.SetWriteCallback(nil)
- }
-
- b.Write(uint8(s.Header.TableID))
- b.Write(s.Header.SectionSyntaxIndicator)
- b.Write(s.Header.PrivateBit)
- b.WriteN(uint8(0xff), 2)
- b.WriteN(sectionLength, 12)
- bytesWritten := 3
-
- if s.Header.SectionLength > 0 {
- n, err := writePSISectionSyntax(w, s)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
-
- if s.Header.TableID.hasCRC32() {
- b.Write(sectionCRC32)
- bytesWritten += 4
- }
- }
-
- return bytesWritten, b.Err()
-}
-
-func writePSISectionSyntax(w *astikit.BitsWriter, s *PSISection) (int, error) {
- bytesWritten := 0
- if s.Header.TableID.hasPSISyntaxHeader() {
- n, err := writePSISectionSyntaxHeader(w, s.Syntax.Header)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- n, err := writePSISectionSyntaxData(w, s.Syntax.Data, s.Header.TableID)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
-
- return bytesWritten, nil
-}
-
-func writePSISectionSyntaxHeader(w *astikit.BitsWriter, h *PSISectionSyntaxHeader) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(h.TableIDExtension)
- b.WriteN(uint8(0xff), 2)
- b.WriteN(h.VersionNumber, 5)
- b.Write(h.CurrentNextIndicator)
- b.Write(h.SectionNumber)
- b.Write(h.LastSectionNumber)
-
- return 5, b.Err()
-}
-
-func writePSISectionSyntaxData(w *astikit.BitsWriter, d *PSISectionSyntaxData, tableID PSITableID) (int, error) {
- switch tableID {
- // TODO write other table types
- case PSITableIDPAT:
- return writePATSection(w, d.PAT)
- case PSITableIDPMT:
- return writePMTSection(w, d.PMT)
- }
-
- return 0, nil
-}
diff --git a/vendor/github.com/asticode/go-astits/data_sdt.go b/vendor/github.com/asticode/go-astits/data_sdt.go
deleted file mode 100644
index f060f26786d..00000000000
--- a/vendor/github.com/asticode/go-astits/data_sdt.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package astits
-
-import (
- "fmt"
-
- "github.com/asticode/go-astikit"
-)
-
-// Running statuses
-const (
- RunningStatusNotRunning = 1
- RunningStatusPausing = 3
- RunningStatusRunning = 4
- RunningStatusServiceOffAir = 5
- RunningStatusStartsInAFewSeconds = 2
- RunningStatusUndefined = 0
-)
-
-// SDTData represents an SDT data
-// Page: 33 | Chapter: 5.2.3 | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-type SDTData struct {
- OriginalNetworkID uint16
- Services []*SDTDataService
- TransportStreamID uint16
-}
-
-// SDTDataService represents an SDT data service
-type SDTDataService struct {
- Descriptors []*Descriptor
- HasEITPresentFollowing bool // When true indicates that EIT present/following information for the service is present in the current TS
- HasEITSchedule bool // When true indicates that EIT schedule information for the service is present in the current TS
- HasFreeCSAMode bool // When true indicates that access to one or more streams may be controlled by a CA system.
- RunningStatus uint8
- ServiceID uint16
-}
-
-// parseSDTSection parses an SDT section
-func parseSDTSection(i *astikit.BytesIterator, offsetSectionsEnd int, tableIDExtension uint16) (d *SDTData, err error) {
- // Create data
- d = &SDTData{TransportStreamID: tableIDExtension}
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Original network ID
- d.OriginalNetworkID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Reserved for future use
- i.Skip(1)
-
- // Loop until end of section data is reached
- for i.Offset() < offsetSectionsEnd {
- // Create service
- s := &SDTDataService{}
-
- // Get next bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Service ID
- s.ServiceID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // EIT schedule flag
- s.HasEITSchedule = uint8(b&0x2) > 0
-
- // EIT present/following flag
- s.HasEITPresentFollowing = uint8(b&0x1) > 0
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Running status
- s.RunningStatus = uint8(b) >> 5
-
- // Free CA mode
- s.HasFreeCSAMode = uint8(b&0x10) > 0
-
- // We need to rewind since the current byte is used by the descriptor as well
- i.Skip(-1)
-
- // Descriptors
- if s.Descriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
-
- // Append service
- d.Services = append(d.Services, s)
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/data_tot.go b/vendor/github.com/asticode/go-astits/data_tot.go
deleted file mode 100644
index 0bd64d2dbe2..00000000000
--- a/vendor/github.com/asticode/go-astits/data_tot.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package astits
-
-import (
- "fmt"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// TOTData represents a TOT data
-// Page: 39 | Chapter: 5.2.6 | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-type TOTData struct {
- Descriptors []*Descriptor
- UTCTime time.Time
-}
-
-// parseTOTSection parses a TOT section
-func parseTOTSection(i *astikit.BytesIterator) (d *TOTData, err error) {
- // Create data
- d = &TOTData{}
-
- // UTC time
- if d.UTCTime, err = parseDVBTime(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB time failed: %w", err)
- return
- }
-
- // Descriptors
- if d.Descriptors, err = parseDescriptors(i); err != nil {
- err = fmt.Errorf("astits: parsing descriptors failed: %w", err)
- return
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/demuxer.go b/vendor/github.com/asticode/go-astits/demuxer.go
deleted file mode 100644
index b17e82f1cf7..00000000000
--- a/vendor/github.com/asticode/go-astits/demuxer.go
+++ /dev/null
@@ -1,189 +0,0 @@
-package astits
-
-import (
- "context"
- "errors"
- "fmt"
- "io"
-)
-
-// Sync byte
-const syncByte = '\x47'
-
-// Errors
-var (
- ErrNoMorePackets = errors.New("astits: no more packets")
- ErrPacketMustStartWithASyncByte = errors.New("astits: packet must start with a sync byte")
-)
-
-// Demuxer represents a demuxer
-// https://en.wikipedia.org/wiki/MPEG_transport_stream
-// http://seidl.cs.vsb.cz/download/dvb/DVB_Poster.pdf
-// http://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.13.01_40/en_300468v011301o.pdf
-type Demuxer struct {
- ctx context.Context
- dataBuffer []*DemuxerData
- optPacketSize int
- optPacketsParser PacketsParser
- packetBuffer *packetBuffer
- packetPool *packetPool
- programMap programMap
- r io.Reader
-}
-
-// PacketsParser represents an object capable of parsing a set of packets containing a unique payload spanning over those packets
-// Use the skip returned argument to indicate whether the default process should still be executed on the set of packets
-type PacketsParser func(ps []*Packet) (ds []*DemuxerData, skip bool, err error)
-
-// NewDemuxer creates a new transport stream based on a reader
-func NewDemuxer(ctx context.Context, r io.Reader, opts ...func(*Demuxer)) (d *Demuxer) {
- // Init
- d = &Demuxer{
- ctx: ctx,
- packetPool: newPacketPool(),
- programMap: newProgramMap(),
- r: r,
- }
-
- // Apply options
- for _, opt := range opts {
- opt(d)
- }
-
- return
-}
-
-// DemuxerOptPacketSize returns the option to set the packet size
-func DemuxerOptPacketSize(packetSize int) func(*Demuxer) {
- return func(d *Demuxer) {
- d.optPacketSize = packetSize
- }
-}
-
-// DemuxerOptPacketsParser returns the option to set the packets parser
-func DemuxerOptPacketsParser(p PacketsParser) func(*Demuxer) {
- return func(d *Demuxer) {
- d.optPacketsParser = p
- }
-}
-
-// NextPacket retrieves the next packet
-func (dmx *Demuxer) NextPacket() (p *Packet, err error) {
- // Check ctx error
- // TODO Handle ctx error another way since if the read blocks, everything blocks
- // Maybe execute everything in a goroutine and listen the ctx channel in the same for loop
- if err = dmx.ctx.Err(); err != nil {
- return
- }
-
- // Create packet buffer if not exists
- if dmx.packetBuffer == nil {
- if dmx.packetBuffer, err = newPacketBuffer(dmx.r, dmx.optPacketSize); err != nil {
- err = fmt.Errorf("astits: creating packet buffer failed: %w", err)
- return
- }
- }
-
- // Fetch next packet from buffer
- if p, err = dmx.packetBuffer.next(); err != nil {
- if err != ErrNoMorePackets {
- err = fmt.Errorf("astits: fetching next packet from buffer failed: %w", err)
- }
- return
- }
- return
-}
-
-// NextData retrieves the next data
-func (dmx *Demuxer) NextData() (d *DemuxerData, err error) {
- // Check data buffer
- if len(dmx.dataBuffer) > 0 {
- d = dmx.dataBuffer[0]
- dmx.dataBuffer = dmx.dataBuffer[1:]
- return
- }
-
- // Loop through packets
- var p *Packet
- var ps []*Packet
- var ds []*DemuxerData
- for {
- // Get next packet
- if p, err = dmx.NextPacket(); err != nil {
- // If the end of the stream has been reached, we dump the packet pool
- if err == ErrNoMorePackets {
- for {
- // Dump packet pool
- if ps = dmx.packetPool.dump(); len(ps) == 0 {
- break
- }
-
- // Parse data
- if ds, err = parseData(ps, dmx.optPacketsParser, dmx.programMap); err != nil {
- // We need to silence this error as there may be some incomplete data here
- // We still want to try to parse all packets, in case final data is complete
- continue
- }
-
- // Update data
- if d = dmx.updateData(ds); d != nil {
- return
- }
- }
- return
- }
- err = fmt.Errorf("astits: fetching next packet failed: %w", err)
- return
- }
-
- // Add packet to the pool
- if ps = dmx.packetPool.add(p); len(ps) == 0 {
- continue
- }
-
- // Parse data
- if ds, err = parseData(ps, dmx.optPacketsParser, dmx.programMap); err != nil {
- err = fmt.Errorf("astits: building new data failed: %w", err)
- return
- }
-
- // Update data
- if d = dmx.updateData(ds); d != nil {
- return
- }
- }
-}
-
-func (dmx *Demuxer) updateData(ds []*DemuxerData) (d *DemuxerData) {
- // Check whether there is data to be processed
- if len(ds) > 0 {
- // Process data
- d = ds[0]
- dmx.dataBuffer = append(dmx.dataBuffer, ds[1:]...)
-
- // Update program map
- for _, v := range ds {
- if v.PAT != nil {
- for _, pgm := range v.PAT.Programs {
- // Program number 0 is reserved to NIT
- if pgm.ProgramNumber > 0 {
- dmx.programMap.set(pgm.ProgramMapID, pgm.ProgramNumber)
- }
- }
- }
- }
- }
- return
-}
-
-// Rewind rewinds the demuxer reader
-func (dmx *Demuxer) Rewind() (n int64, err error) {
- dmx.dataBuffer = []*DemuxerData{}
- dmx.packetBuffer = nil
- dmx.packetPool = newPacketPool()
- if n, err = rewind(dmx.r); err != nil {
- err = fmt.Errorf("astits: rewinding reader failed: %w", err)
- return
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/descriptor.go b/vendor/github.com/asticode/go-astits/descriptor.go
deleted file mode 100644
index 943604a4682..00000000000
--- a/vendor/github.com/asticode/go-astits/descriptor.go
+++ /dev/null
@@ -1,2162 +0,0 @@
-package astits
-
-import (
- "fmt"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// Audio types
-// Page: 683 | https://books.google.fr/books?id=6dgWB3-rChYC&printsec=frontcover&hl=fr
-const (
- AudioTypeCleanEffects = 0x1
- AudioTypeHearingImpaired = 0x2
- AudioTypeVisualImpairedCommentary = 0x3
-)
-
-// Data stream alignments
-// Page: 85 | Chapter:2.6.11 | Link: http://ecee.colorado.edu/~ecen5653/ecen5653/papers/iso13818-1.pdf
-const (
- DataStreamAligmentAudioSyncWord = 0x1
- DataStreamAligmentVideoSliceOrAccessUnit = 0x1
- DataStreamAligmentVideoAccessUnit = 0x2
- DataStreamAligmentVideoGOPOrSEQ = 0x3
- DataStreamAligmentVideoSEQ = 0x4
-)
-
-// Descriptor tags
-// Chapter: 6.1 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-const (
- DescriptorTagAC3 = 0x6a
- DescriptorTagAVCVideo = 0x28
- DescriptorTagComponent = 0x50
- DescriptorTagContent = 0x54
- DescriptorTagDataStreamAlignment = 0x6
- DescriptorTagEnhancedAC3 = 0x7a
- DescriptorTagExtendedEvent = 0x4e
- DescriptorTagExtension = 0x7f
- DescriptorTagISO639LanguageAndAudioType = 0xa
- DescriptorTagLocalTimeOffset = 0x58
- DescriptorTagMaximumBitrate = 0xe
- DescriptorTagNetworkName = 0x40
- DescriptorTagParentalRating = 0x55
- DescriptorTagPrivateDataIndicator = 0xf
- DescriptorTagPrivateDataSpecifier = 0x5f
- DescriptorTagRegistration = 0x5
- DescriptorTagService = 0x48
- DescriptorTagShortEvent = 0x4d
- DescriptorTagStreamIdentifier = 0x52
- DescriptorTagSubtitling = 0x59
- DescriptorTagTeletext = 0x56
- DescriptorTagVBIData = 0x45
- DescriptorTagVBITeletext = 0x46
-)
-
-// Descriptor extension tags
-// Chapter: 6.3 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-const (
- DescriptorTagExtensionSupplementaryAudio = 0x6
-)
-
-// Service types
-// Chapter: 6.2.33 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-const (
- ServiceTypeDigitalTelevisionService = 0x1
-)
-
-// Teletext types
-// Chapter: 6.2.43 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-const (
- TeletextTypeAdditionalInformationPage = 0x3
- TeletextTypeInitialTeletextPage = 0x1
- TeletextTypeProgramSchedulePage = 0x4
- TeletextTypeTeletextSubtitlePage = 0x2
- TeletextTypeTeletextSubtitlePageForHearingImpairedPeople = 0x5
-)
-
-// VBI data service id
-// Chapter: 6.2.47 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-const (
- VBIDataServiceIDClosedCaptioning = 0x6
- VBIDataServiceIDEBUTeletext = 0x1
- VBIDataServiceIDInvertedTeletext = 0x2
- VBIDataServiceIDMonochrome442Samples = 0x7
- VBIDataServiceIDVPS = 0x4
- VBIDataServiceIDWSS = 0x5
-)
-
-// Descriptor represents a descriptor
-// TODO Handle UTF8
-type Descriptor struct {
- AC3 *DescriptorAC3
- AVCVideo *DescriptorAVCVideo
- Component *DescriptorComponent
- Content *DescriptorContent
- DataStreamAlignment *DescriptorDataStreamAlignment
- EnhancedAC3 *DescriptorEnhancedAC3
- ExtendedEvent *DescriptorExtendedEvent
- Extension *DescriptorExtension
- ISO639LanguageAndAudioType *DescriptorISO639LanguageAndAudioType
- Length uint8
- LocalTimeOffset *DescriptorLocalTimeOffset
- MaximumBitrate *DescriptorMaximumBitrate
- NetworkName *DescriptorNetworkName
- ParentalRating *DescriptorParentalRating
- PrivateDataIndicator *DescriptorPrivateDataIndicator
- PrivateDataSpecifier *DescriptorPrivateDataSpecifier
- Registration *DescriptorRegistration
- Service *DescriptorService
- ShortEvent *DescriptorShortEvent
- StreamIdentifier *DescriptorStreamIdentifier
- Subtitling *DescriptorSubtitling
- Tag uint8 // the tag defines the structure of the contained data following the descriptor length.
- Teletext *DescriptorTeletext
- Unknown *DescriptorUnknown
- UserDefined []byte
- VBIData *DescriptorVBIData
- VBITeletext *DescriptorTeletext
-}
-
-// DescriptorAC3 represents an AC3 descriptor
-// Chapter: Annex D | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorAC3 struct {
- AdditionalInfo []byte
- ASVC uint8
- BSID uint8
- ComponentType uint8
- HasASVC bool
- HasBSID bool
- HasComponentType bool
- HasMainID bool
- MainID uint8
-}
-
-func newDescriptorAC3(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorAC3, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorAC3{
- HasASVC: uint8(b&0x10) > 0,
- HasBSID: uint8(b&0x40) > 0,
- HasComponentType: uint8(b&0x80) > 0,
- HasMainID: uint8(b&0x20) > 0,
- }
-
- // Component type
- if d.HasComponentType {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.ComponentType = uint8(b)
- }
-
- // BSID
- if d.HasBSID {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.BSID = uint8(b)
- }
-
- // Main ID
- if d.HasMainID {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.MainID = uint8(b)
- }
-
- // ASVC
- if d.HasASVC {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.ASVC = uint8(b)
- }
-
- // Additional info
- if i.Offset() < offsetEnd {
- if d.AdditionalInfo, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- return
-}
-
-// DescriptorAVCVideo represents an AVC video descriptor
-// No doc found unfortunately, basing the implementation on https://github.com/gfto/bitstream/blob/master/mpeg/psi/desc_28.h
-type DescriptorAVCVideo struct {
- AVC24HourPictureFlag bool
- AVCStillPresent bool
- CompatibleFlags uint8
- ConstraintSet0Flag bool
- ConstraintSet1Flag bool
- ConstraintSet2Flag bool
- LevelIDC uint8
- ProfileIDC uint8
-}
-
-func newDescriptorAVCVideo(i *astikit.BytesIterator) (d *DescriptorAVCVideo, err error) {
- // Init
- d = &DescriptorAVCVideo{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Profile idc
- d.ProfileIDC = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Flags
- d.ConstraintSet0Flag = b&0x80 > 0
- d.ConstraintSet1Flag = b&0x40 > 0
- d.ConstraintSet2Flag = b&0x20 > 0
- d.CompatibleFlags = b & 0x1f
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Level idc
- d.LevelIDC = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // AVC still present
- d.AVCStillPresent = b&0x80 > 0
-
- // AVC 24 hour picture flag
- d.AVC24HourPictureFlag = b&0x40 > 0
- return
-}
-
-// DescriptorComponent represents a component descriptor
-// Chapter: 6.2.8 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorComponent struct {
- ComponentTag uint8
- ComponentType uint8
- ISO639LanguageCode []byte
- StreamContent uint8
- StreamContentExt uint8
- Text []byte
-}
-
-func newDescriptorComponent(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorComponent, err error) {
- // Init
- d = &DescriptorComponent{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Stream content ext
- d.StreamContentExt = uint8(b >> 4)
-
- // Stream content
- d.StreamContent = uint8(b & 0xf)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Component type
- d.ComponentType = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Component tag
- d.ComponentTag = uint8(b)
-
- // ISO639 language code
- if d.ISO639LanguageCode, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Text
- if i.Offset() < offsetEnd {
- if d.Text, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- return
-}
-
-// DescriptorContent represents a content descriptor
-// Chapter: 6.2.9 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorContent struct {
- Items []*DescriptorContentItem
-}
-
-// DescriptorContentItem represents a content item descriptor
-// Chapter: 6.2.9 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorContentItem struct {
- ContentNibbleLevel1 uint8
- ContentNibbleLevel2 uint8
- UserByte uint8
-}
-
-func newDescriptorContent(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorContent, err error) {
- // Init
- d = &DescriptorContent{}
-
- // Add items
- for i.Offset() < offsetEnd {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Append item
- d.Items = append(d.Items, &DescriptorContentItem{
- ContentNibbleLevel1: uint8(bs[0] >> 4),
- ContentNibbleLevel2: uint8(bs[0] & 0xf),
- UserByte: uint8(bs[1]),
- })
- }
- return
-}
-
-// DescriptorDataStreamAlignment represents a data stream alignment descriptor
-type DescriptorDataStreamAlignment struct {
- Type uint8
-}
-
-func newDescriptorDataStreamAlignment(i *astikit.BytesIterator) (d *DescriptorDataStreamAlignment, err error) {
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d = &DescriptorDataStreamAlignment{Type: uint8(b)}
- return
-}
-
-// DescriptorEnhancedAC3 represents an enhanced AC3 descriptor
-// Chapter: Annex D | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorEnhancedAC3 struct {
- AdditionalInfo []byte
- ASVC uint8
- BSID uint8
- ComponentType uint8
- HasASVC bool
- HasBSID bool
- HasComponentType bool
- HasMainID bool
- HasSubStream1 bool
- HasSubStream2 bool
- HasSubStream3 bool
- MainID uint8
- MixInfoExists bool
- SubStream1 uint8
- SubStream2 uint8
- SubStream3 uint8
-}
-
-func newDescriptorEnhancedAC3(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorEnhancedAC3, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorEnhancedAC3{
- HasASVC: uint8(b&0x10) > 0,
- HasBSID: uint8(b&0x40) > 0,
- HasComponentType: uint8(b&0x80) > 0,
- HasMainID: uint8(b&0x20) > 0,
- HasSubStream1: uint8(b&0x4) > 0,
- HasSubStream2: uint8(b&0x2) > 0,
- HasSubStream3: uint8(b&0x1) > 0,
- MixInfoExists: uint8(b&0x8) > 0,
- }
-
- // Component type
- if d.HasComponentType {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.ComponentType = uint8(b)
- }
-
- // BSID
- if d.HasBSID {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.BSID = uint8(b)
- }
-
- // Main ID
- if d.HasMainID {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.MainID = uint8(b)
- }
-
- // ASVC
- if d.HasASVC {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.ASVC = uint8(b)
- }
-
- // Substream 1
- if d.HasSubStream1 {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.SubStream1 = uint8(b)
- }
-
- // Substream 2
- if d.HasSubStream2 {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.SubStream2 = uint8(b)
- }
-
- // Substream 3
- if d.HasSubStream3 {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d.SubStream3 = uint8(b)
- }
-
- // Additional info
- if i.Offset() < offsetEnd {
- if d.AdditionalInfo, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- return
-}
-
-// DescriptorExtendedEvent represents an extended event descriptor
-// Chapter: 6.2.15 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorExtendedEvent struct {
- ISO639LanguageCode []byte
- Items []*DescriptorExtendedEventItem
- LastDescriptorNumber uint8
- Number uint8
- Text []byte
-}
-
-// DescriptorExtendedEventItem represents an extended event item descriptor
-// Chapter: 6.2.15 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorExtendedEventItem struct {
- Content []byte
- Description []byte
-}
-
-func newDescriptorExtendedEvent(i *astikit.BytesIterator) (d *DescriptorExtendedEvent, err error) {
- // Init
- d = &DescriptorExtendedEvent{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Number
- d.Number = uint8(b >> 4)
-
- // Last descriptor number
- d.LastDescriptorNumber = uint8(b & 0xf)
-
- // ISO639 language code
- if d.ISO639LanguageCode, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Items length
- itemsLength := int(b)
-
- // Items
- offsetEnd := i.Offset() + itemsLength
- for i.Offset() < offsetEnd {
- // Create item
- var item *DescriptorExtendedEventItem
- if item, err = newDescriptorExtendedEventItem(i); err != nil {
- err = fmt.Errorf("astits: creating extended event item failed: %w", err)
- return
- }
-
- // Append item
- d.Items = append(d.Items, item)
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Text length
- textLength := int(b)
-
- // Text
- if d.Text, err = i.NextBytes(textLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-func newDescriptorExtendedEventItem(i *astikit.BytesIterator) (d *DescriptorExtendedEventItem, err error) {
- // Init
- d = &DescriptorExtendedEventItem{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Description length
- descriptionLength := int(b)
-
- // Description
- if d.Description, err = i.NextBytes(descriptionLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Content length
- contentLength := int(b)
-
- // Content
- if d.Content, err = i.NextBytes(contentLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// DescriptorExtension represents an extension descriptor
-// Chapter: 6.2.16 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorExtension struct {
- SupplementaryAudio *DescriptorExtensionSupplementaryAudio
- Tag uint8
- Unknown *[]byte
-}
-
-func newDescriptorExtension(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorExtension, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorExtension{Tag: uint8(b)}
-
- // Switch on tag
- switch d.Tag {
- case DescriptorTagExtensionSupplementaryAudio:
- if d.SupplementaryAudio, err = newDescriptorExtensionSupplementaryAudio(i, offsetEnd); err != nil {
- err = fmt.Errorf("astits: parsing extension supplementary audio descriptor failed: %w", err)
- return
- }
- default:
- // Get next bytes
- var b []byte
- if b, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Update unknown
- d.Unknown = &b
- }
- return
-}
-
-// DescriptorExtensionSupplementaryAudio represents a supplementary audio extension descriptor
-// Chapter: 6.4.10 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorExtensionSupplementaryAudio struct {
- EditorialClassification uint8
- HasLanguageCode bool
- LanguageCode []byte
- MixType bool
- PrivateData []byte
-}
-
-func newDescriptorExtensionSupplementaryAudio(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorExtensionSupplementaryAudio, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Init
- d = &DescriptorExtensionSupplementaryAudio{
- EditorialClassification: uint8(b >> 2 & 0x1f),
- HasLanguageCode: b&0x1 > 0,
- MixType: b&0x80 > 0,
- }
-
- // Language code
- if d.HasLanguageCode {
- if d.LanguageCode, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
-
- // Private data
- if i.Offset() < offsetEnd {
- if d.PrivateData, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- return
-}
-
-// DescriptorISO639LanguageAndAudioType represents an ISO639 language descriptor
-// https://github.com/gfto/bitstream/blob/master/mpeg/psi/desc_0a.h
-// FIXME (barbashov) according to Chapter 2.6.18 ISO/IEC 13818-1:2015 there could be not one, but multiple such descriptors
-type DescriptorISO639LanguageAndAudioType struct {
- Language []byte
- Type uint8
-}
-
-// In some actual cases, the length is 3 and the language is described in only 2 bytes
-func newDescriptorISO639LanguageAndAudioType(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorISO639LanguageAndAudioType, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorISO639LanguageAndAudioType{
- Language: bs[0 : len(bs)-1],
- Type: uint8(bs[len(bs)-1]),
- }
- return
-}
-
-// DescriptorLocalTimeOffset represents a local time offset descriptor
-// Chapter: 6.2.20 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorLocalTimeOffset struct {
- Items []*DescriptorLocalTimeOffsetItem
-}
-
-// DescriptorLocalTimeOffsetItem represents a local time offset item descriptor
-// Chapter: 6.2.20 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorLocalTimeOffsetItem struct {
- CountryCode []byte
- CountryRegionID uint8
- LocalTimeOffset time.Duration
- LocalTimeOffsetPolarity bool
- NextTimeOffset time.Duration
- TimeOfChange time.Time
-}
-
-func newDescriptorLocalTimeOffset(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorLocalTimeOffset, err error) {
- // Init
- d = &DescriptorLocalTimeOffset{}
-
- // Add items
- for i.Offset() < offsetEnd {
- // Create item
- itm := &DescriptorLocalTimeOffsetItem{}
-
- // Country code
- if itm.CountryCode, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Country region ID
- itm.CountryRegionID = uint8(b >> 2)
-
- // Local time offset polarity
- itm.LocalTimeOffsetPolarity = b&0x1 > 0
-
- // Local time offset
- if itm.LocalTimeOffset, err = parseDVBDurationMinutes(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB durationminutes failed: %w", err)
- return
- }
-
- // Time of change
- if itm.TimeOfChange, err = parseDVBTime(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB time failed: %w", err)
- return
- }
-
- // Next time offset
- if itm.NextTimeOffset, err = parseDVBDurationMinutes(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB duration minutes failed: %w", err)
- return
- }
-
- // Append item
- d.Items = append(d.Items, itm)
- }
- return
-}
-
-// DescriptorMaximumBitrate represents a maximum bitrate descriptor
-type DescriptorMaximumBitrate struct {
- Bitrate uint32 // In bytes/second
-}
-
-func newDescriptorMaximumBitrate(i *astikit.BytesIterator) (d *DescriptorMaximumBitrate, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorMaximumBitrate{Bitrate: (uint32(bs[0]&0x3f)<<16 | uint32(bs[1])<<8 | uint32(bs[2])) * 50}
- return
-}
-
-// DescriptorNetworkName represents a network name descriptor
-// Chapter: 6.2.27 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorNetworkName struct {
- Name []byte
-}
-
-func newDescriptorNetworkName(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorNetworkName, err error) {
- // Create descriptor
- d = &DescriptorNetworkName{}
-
- // Name
- if d.Name, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// DescriptorParentalRating represents a parental rating descriptor
-// Chapter: 6.2.28 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorParentalRating struct {
- Items []*DescriptorParentalRatingItem
-}
-
-// DescriptorParentalRatingItem represents a parental rating item descriptor
-// Chapter: 6.2.28 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorParentalRatingItem struct {
- CountryCode []byte
- Rating uint8
-}
-
-// MinimumAge returns the minimum age for the parental rating
-func (d DescriptorParentalRatingItem) MinimumAge() int {
- // Undefined or user defined ratings
- if d.Rating == 0 || d.Rating > 0x10 {
- return 0
- }
- return int(d.Rating) + 3
-}
-
-func newDescriptorParentalRating(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorParentalRating, err error) {
- // Create descriptor
- d = &DescriptorParentalRating{}
-
- // Add items
- for i.Offset() < offsetEnd {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytes(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Append item
- d.Items = append(d.Items, &DescriptorParentalRatingItem{
- CountryCode: bs[:3],
- Rating: uint8(bs[3]),
- })
- }
- return
-}
-
-// DescriptorPrivateDataIndicator represents a private data Indicator descriptor
-type DescriptorPrivateDataIndicator struct {
- Indicator uint32
-}
-
-func newDescriptorPrivateDataIndicator(i *astikit.BytesIterator) (d *DescriptorPrivateDataIndicator, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorPrivateDataIndicator{Indicator: uint32(bs[0])<<24 | uint32(bs[1])<<16 | uint32(bs[2])<<8 | uint32(bs[3])}
- return
-}
-
-// DescriptorPrivateDataSpecifier represents a private data specifier descriptor
-type DescriptorPrivateDataSpecifier struct {
- Specifier uint32
-}
-
-func newDescriptorPrivateDataSpecifier(i *astikit.BytesIterator) (d *DescriptorPrivateDataSpecifier, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorPrivateDataSpecifier{Specifier: uint32(bs[0])<<24 | uint32(bs[1])<<16 | uint32(bs[2])<<8 | uint32(bs[3])}
- return
-}
-
-// DescriptorRegistration represents a registration descriptor
-// Page: 84 | http://ecee.colorado.edu/~ecen5653/ecen5653/papers/iso13818-1.pdf
-type DescriptorRegistration struct {
- AdditionalIdentificationInfo []byte
- FormatIdentifier uint32
-}
-
-func newDescriptorRegistration(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorRegistration, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(4); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorRegistration{FormatIdentifier: uint32(bs[0])<<24 | uint32(bs[1])<<16 | uint32(bs[2])<<8 | uint32(bs[3])}
-
- // Additional identification info
- if i.Offset() < offsetEnd {
- if d.AdditionalIdentificationInfo, err = i.NextBytes(offsetEnd - i.Offset()); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- return
-}
-
-// DescriptorService represents a service descriptor
-// Chapter: 6.2.33 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorService struct {
- Name []byte
- Provider []byte
- Type uint8
-}
-
-func newDescriptorService(i *astikit.BytesIterator) (d *DescriptorService, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Create descriptor
- d = &DescriptorService{Type: uint8(b)}
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Provider length
- providerLength := int(b)
-
- // Provider
- if d.Provider, err = i.NextBytes(providerLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Name length
- nameLength := int(b)
-
- // Name
- if d.Name, err = i.NextBytes(nameLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// DescriptorShortEvent represents a short event descriptor
-// Chapter: 6.2.37 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorShortEvent struct {
- EventName []byte
- Language []byte
- Text []byte
-}
-
-func newDescriptorShortEvent(i *astikit.BytesIterator) (d *DescriptorShortEvent, err error) {
- // Create descriptor
- d = &DescriptorShortEvent{}
-
- // Language
- if d.Language, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Event length
- eventLength := int(b)
-
- // Event name
- if d.EventName, err = i.NextBytes(eventLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Text length
- textLength := int(b)
-
- // Text
- if d.Text, err = i.NextBytes(textLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// DescriptorStreamIdentifier represents a stream identifier descriptor
-// Chapter: 6.2.39 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorStreamIdentifier struct {
- ComponentTag uint8
-}
-
-func newDescriptorStreamIdentifier(i *astikit.BytesIterator) (d *DescriptorStreamIdentifier, err error) {
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- d = &DescriptorStreamIdentifier{ComponentTag: uint8(b)}
- return
-}
-
-// DescriptorSubtitling represents a subtitling descriptor
-// Chapter: 6.2.41 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorSubtitling struct {
- Items []*DescriptorSubtitlingItem
-}
-
-// DescriptorSubtitlingItem represents subtitling descriptor item
-// Chapter: 6.2.41 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorSubtitlingItem struct {
- AncillaryPageID uint16
- CompositionPageID uint16
- Language []byte
- Type uint8
-}
-
-func newDescriptorSubtitling(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorSubtitling, err error) {
- // Create descriptor
- d = &DescriptorSubtitling{}
-
- // Loop
- for i.Offset() < offsetEnd {
- // Create item
- itm := &DescriptorSubtitlingItem{}
-
- // Language
- if itm.Language, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Type
- itm.Type = uint8(b)
-
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Composition page ID
- itm.CompositionPageID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Get next bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Ancillary page ID
- itm.AncillaryPageID = uint16(bs[0])<<8 | uint16(bs[1])
-
- // Append item
- d.Items = append(d.Items, itm)
- }
- return
-}
-
-// DescriptorTeletext represents a teletext descriptor
-// Chapter: 6.2.43 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorTeletext struct {
- Items []*DescriptorTeletextItem
-}
-
-// DescriptorTeletextItem represents a teletext descriptor item
-// Chapter: 6.2.43 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorTeletextItem struct {
- Language []byte
- Magazine uint8
- Page uint8
- Type uint8
-}
-
-func newDescriptorTeletext(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorTeletext, err error) {
- // Create descriptor
- d = &DescriptorTeletext{}
-
- // Loop
- for i.Offset() < offsetEnd {
- // Create item
- itm := &DescriptorTeletextItem{}
-
- // Language
- if itm.Language, err = i.NextBytes(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Type
- itm.Type = uint8(b) >> 3
-
- // Magazine
- itm.Magazine = uint8(b & 0x7)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Page
- itm.Page = uint8(b)>>4*10 + uint8(b&0xf)
-
- // Append item
- d.Items = append(d.Items, itm)
- }
- return
-}
-
-type DescriptorUnknown struct {
- Content []byte
- Tag uint8
-}
-
-func newDescriptorUnknown(i *astikit.BytesIterator, tag, length uint8) (d *DescriptorUnknown, err error) {
- // Create descriptor
- d = &DescriptorUnknown{Tag: tag}
-
- // Get next bytes
- if d.Content, err = i.NextBytes(int(length)); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- return
-}
-
-// DescriptorVBIData represents a VBI data descriptor
-// Chapter: 6.2.47 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorVBIData struct {
- Services []*DescriptorVBIDataService
-}
-
-// DescriptorVBIDataService represents a vbi data service descriptor
-// Chapter: 6.2.47 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorVBIDataService struct {
- DataServiceID uint8
- Descriptors []*DescriptorVBIDataDescriptor
-}
-
-// DescriptorVBIDataItem represents a vbi data descriptor item
-// Chapter: 6.2.47 | Link: https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf
-type DescriptorVBIDataDescriptor struct {
- FieldParity bool
- LineOffset uint8
-}
-
-func newDescriptorVBIData(i *astikit.BytesIterator, offsetEnd int) (d *DescriptorVBIData, err error) {
- // Create descriptor
- d = &DescriptorVBIData{}
-
- // Loop
- for i.Offset() < offsetEnd {
- // Create service
- srv := &DescriptorVBIDataService{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Data service ID
- srv.DataServiceID = uint8(b)
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Data service descriptor length
- dataServiceDescriptorLength := int(b)
-
- // Data service descriptor
- offsetDataEnd := i.Offset() + dataServiceDescriptorLength
- for i.Offset() < offsetDataEnd {
- if srv.DataServiceID == VBIDataServiceIDClosedCaptioning ||
- srv.DataServiceID == VBIDataServiceIDEBUTeletext ||
- srv.DataServiceID == VBIDataServiceIDInvertedTeletext ||
- srv.DataServiceID == VBIDataServiceIDMonochrome442Samples ||
- srv.DataServiceID == VBIDataServiceIDVPS ||
- srv.DataServiceID == VBIDataServiceIDWSS {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Append data
- srv.Descriptors = append(srv.Descriptors, &DescriptorVBIDataDescriptor{
- FieldParity: b&0x20 > 0,
- LineOffset: uint8(b & 0x1f),
- })
- }
- }
-
- // Append service
- d.Services = append(d.Services, srv)
- }
- return
-}
-
-// parseDescriptors parses descriptors
-func parseDescriptors(i *astikit.BytesIterator) (o []*Descriptor, err error) {
- // Get next 2 bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Get length
- length := int(uint16(bs[0]&0xf)<<8 | uint16(bs[1]))
-
- // Loop
- if length > 0 {
- offsetEnd := i.Offset() + length
- for i.Offset() < offsetEnd {
- // Get next 2 bytes
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create descriptor
- d := &Descriptor{
- Length: uint8(bs[1]),
- Tag: uint8(bs[0]),
- }
-
- // Parse data
- if d.Length > 0 {
- // Unfortunately there's no way to be sure the real descriptor length is the same as the one indicated
- // previously therefore we must fetch bytes in descriptor functions and seek at the end
- offsetDescriptorEnd := i.Offset() + int(d.Length)
-
- // User defined
- if d.Tag >= 0x80 && d.Tag <= 0xfe {
- // Get next bytes
- if d.UserDefined, err = i.NextBytes(int(d.Length)); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- } else {
- // Switch on tag
- switch d.Tag {
- case DescriptorTagAC3:
- if d.AC3, err = newDescriptorAC3(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing AC3 descriptor failed: %w", err)
- return
- }
- case DescriptorTagAVCVideo:
- if d.AVCVideo, err = newDescriptorAVCVideo(i); err != nil {
- err = fmt.Errorf("astits: parsing AVC Video descriptor failed: %w", err)
- return
- }
- case DescriptorTagComponent:
- if d.Component, err = newDescriptorComponent(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Component descriptor failed: %w", err)
- return
- }
- case DescriptorTagContent:
- if d.Content, err = newDescriptorContent(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Content descriptor failed: %w", err)
- return
- }
- case DescriptorTagDataStreamAlignment:
- if d.DataStreamAlignment, err = newDescriptorDataStreamAlignment(i); err != nil {
- err = fmt.Errorf("astits: parsing Data Stream Alignment descriptor failed: %w", err)
- return
- }
- case DescriptorTagEnhancedAC3:
- if d.EnhancedAC3, err = newDescriptorEnhancedAC3(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Enhanced AC3 descriptor failed: %w", err)
- return
- }
- case DescriptorTagExtendedEvent:
- if d.ExtendedEvent, err = newDescriptorExtendedEvent(i); err != nil {
- err = fmt.Errorf("astits: parsing Extended event descriptor failed: %w", err)
- return
- }
- case DescriptorTagExtension:
- if d.Extension, err = newDescriptorExtension(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Extension descriptor failed: %w", err)
- return
- }
- case DescriptorTagISO639LanguageAndAudioType:
- if d.ISO639LanguageAndAudioType, err = newDescriptorISO639LanguageAndAudioType(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing ISO639 Language and Audio Type descriptor failed: %w", err)
- return
- }
- case DescriptorTagLocalTimeOffset:
- if d.LocalTimeOffset, err = newDescriptorLocalTimeOffset(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Local Time Offset descriptor failed: %w", err)
- return
- }
- case DescriptorTagMaximumBitrate:
- if d.MaximumBitrate, err = newDescriptorMaximumBitrate(i); err != nil {
- err = fmt.Errorf("astits: parsing Maximum Bitrate descriptor failed: %w", err)
- return
- }
- case DescriptorTagNetworkName:
- if d.NetworkName, err = newDescriptorNetworkName(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Network Name descriptor failed: %w", err)
- return
- }
- case DescriptorTagParentalRating:
- if d.ParentalRating, err = newDescriptorParentalRating(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Parental Rating descriptor failed: %w", err)
- return
- }
- case DescriptorTagPrivateDataIndicator:
- if d.PrivateDataIndicator, err = newDescriptorPrivateDataIndicator(i); err != nil {
- err = fmt.Errorf("astits: parsing Private Data Indicator descriptor failed: %w", err)
- return
- }
- case DescriptorTagPrivateDataSpecifier:
- if d.PrivateDataSpecifier, err = newDescriptorPrivateDataSpecifier(i); err != nil {
- err = fmt.Errorf("astits: parsing Private Data Specifier descriptor failed: %w", err)
- return
- }
- case DescriptorTagRegistration:
- if d.Registration, err = newDescriptorRegistration(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Registration descriptor failed: %w", err)
- return
- }
- case DescriptorTagService:
- if d.Service, err = newDescriptorService(i); err != nil {
- err = fmt.Errorf("astits: parsing Service descriptor failed: %w", err)
- return
- }
- case DescriptorTagShortEvent:
- if d.ShortEvent, err = newDescriptorShortEvent(i); err != nil {
- err = fmt.Errorf("astits: parsing Short Event descriptor failed: %w", err)
- return
- }
- case DescriptorTagStreamIdentifier:
- if d.StreamIdentifier, err = newDescriptorStreamIdentifier(i); err != nil {
- err = fmt.Errorf("astits: parsing Stream Identifier descriptor failed: %w", err)
- return
- }
- case DescriptorTagSubtitling:
- if d.Subtitling, err = newDescriptorSubtitling(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Subtitling descriptor failed: %w", err)
- return
- }
- case DescriptorTagTeletext:
- if d.Teletext, err = newDescriptorTeletext(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing Teletext descriptor failed: %w", err)
- return
- }
- case DescriptorTagVBIData:
- if d.VBIData, err = newDescriptorVBIData(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing VBI Date descriptor failed: %w", err)
- return
- }
- case DescriptorTagVBITeletext:
- if d.VBITeletext, err = newDescriptorTeletext(i, offsetDescriptorEnd); err != nil {
- err = fmt.Errorf("astits: parsing VBI Teletext descriptor failed: %w", err)
- return
- }
- default:
- if d.Unknown, err = newDescriptorUnknown(i, d.Tag, d.Length); err != nil {
- err = fmt.Errorf("astits: parsing unknown descriptor failed: %w", err)
- return
- }
- }
- }
-
- // Seek in iterator to make sure we move to the end of the descriptor since its content may be
- // corrupted
- i.Seek(offsetDescriptorEnd)
- }
- o = append(o, d)
- }
- }
- return
-}
-
-func calcDescriptorUserDefinedLength(d []byte) uint8 {
- return uint8(len(d))
-}
-
-func writeDescriptorUserDefined(w *astikit.BitsWriter, d []byte) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d)
-
- return b.Err()
-}
-
-func calcDescriptorAC3Length(d *DescriptorAC3) uint8 {
- ret := 1 // flags
-
- if d.HasComponentType {
- ret++
- }
- if d.HasBSID {
- ret++
- }
- if d.HasMainID {
- ret++
- }
- if d.HasASVC {
- ret++
- }
-
- ret += len(d.AdditionalInfo)
-
- return uint8(ret)
-}
-
-func writeDescriptorAC3(w *astikit.BitsWriter, d *DescriptorAC3) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.HasComponentType)
- b.Write(d.HasBSID)
- b.Write(d.HasMainID)
- b.Write(d.HasASVC)
- b.WriteN(uint8(0xff), 4)
-
- if d.HasComponentType {
- b.Write(d.ComponentType)
- }
- if d.HasBSID {
- b.Write(d.BSID)
- }
- if d.HasMainID {
- b.Write(d.MainID)
- }
- if d.HasASVC {
- b.Write(d.ASVC)
- }
- b.Write(d.AdditionalInfo)
-
- return b.Err()
-}
-
-func calcDescriptorAVCVideoLength(d *DescriptorAVCVideo) uint8 {
- return 4
-}
-
-func writeDescriptorAVCVideo(w *astikit.BitsWriter, d *DescriptorAVCVideo) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.ProfileIDC)
-
- b.Write(d.ConstraintSet0Flag)
- b.Write(d.ConstraintSet1Flag)
- b.Write(d.ConstraintSet2Flag)
- b.WriteN(d.CompatibleFlags, 5)
-
- b.Write(d.LevelIDC)
-
- b.Write(d.AVCStillPresent)
- b.Write(d.AVC24HourPictureFlag)
- b.WriteN(uint8(0xff), 6)
-
- return b.Err()
-}
-
-func calcDescriptorComponentLength(d *DescriptorComponent) uint8 {
- return uint8(6 + len(d.Text))
-}
-
-func writeDescriptorComponent(w *astikit.BitsWriter, d *DescriptorComponent) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(d.StreamContentExt, 4)
- b.WriteN(d.StreamContent, 4)
-
- b.Write(d.ComponentType)
- b.Write(d.ComponentTag)
-
- b.WriteBytesN(d.ISO639LanguageCode, 3, 0)
-
- b.Write(d.Text)
-
- return b.Err()
-}
-
-func calcDescriptorContentLength(d *DescriptorContent) uint8 {
- return uint8(2 * len(d.Items))
-}
-
-func writeDescriptorContent(w *astikit.BitsWriter, d *DescriptorContent) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Items {
- b.WriteN(item.ContentNibbleLevel1, 4)
- b.WriteN(item.ContentNibbleLevel2, 4)
- b.Write(item.UserByte)
- }
-
- return b.Err()
-}
-
-func calcDescriptorDataStreamAlignmentLength(d *DescriptorDataStreamAlignment) uint8 {
- return 1
-}
-
-func writeDescriptorDataStreamAlignment(w *astikit.BitsWriter, d *DescriptorDataStreamAlignment) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Type)
-
- return b.Err()
-}
-
-func calcDescriptorEnhancedAC3Length(d *DescriptorEnhancedAC3) uint8 {
- ret := 1 // flags
-
- if d.HasComponentType {
- ret++
- }
- if d.HasBSID {
- ret++
- }
- if d.HasMainID {
- ret++
- }
- if d.HasASVC {
- ret++
- }
- if d.HasSubStream1 {
- ret++
- }
- if d.HasSubStream2 {
- ret++
- }
- if d.HasSubStream3 {
- ret++
- }
-
- ret += len(d.AdditionalInfo)
-
- return uint8(ret)
-}
-
-func writeDescriptorEnhancedAC3(w *astikit.BitsWriter, d *DescriptorEnhancedAC3) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.HasComponentType)
- b.Write(d.HasBSID)
- b.Write(d.HasMainID)
- b.Write(d.HasASVC)
- b.Write(d.MixInfoExists)
- b.Write(d.HasSubStream1)
- b.Write(d.HasSubStream2)
- b.Write(d.HasSubStream3)
-
- if d.HasComponentType {
- b.Write(d.ComponentType)
- }
- if d.HasBSID {
- b.Write(d.BSID)
- }
- if d.HasMainID {
- b.Write(d.MainID)
- }
- if d.HasASVC {
- b.Write(d.ASVC)
- }
- if d.HasSubStream1 {
- b.Write(d.SubStream1)
- }
- if d.HasSubStream2 {
- b.Write(d.SubStream2)
- }
- if d.HasSubStream3 {
- b.Write(d.SubStream3)
- }
-
- b.Write(d.AdditionalInfo)
-
- return b.Err()
-}
-
-func calcDescriptorExtendedEventLength(d *DescriptorExtendedEvent) (descriptorLength, lengthOfItems uint8) {
- ret := 1 + 3 + 1 // numbers, language and items length
-
- itemsRet := 0
- for _, item := range d.Items {
- itemsRet += 1 // description length
- itemsRet += len(item.Description)
- itemsRet += 1 // content length
- itemsRet += len(item.Content)
- }
-
- ret += itemsRet
-
- ret += 1 // text length
- ret += len(d.Text)
-
- return uint8(ret), uint8(itemsRet)
-}
-
-func writeDescriptorExtendedEvent(w *astikit.BitsWriter, d *DescriptorExtendedEvent) error {
- b := astikit.NewBitsWriterBatch(w)
-
- var lengthOfItems uint8
-
- _, lengthOfItems = calcDescriptorExtendedEventLength(d)
-
- b.WriteN(d.Number, 4)
- b.WriteN(d.LastDescriptorNumber, 4)
-
- b.WriteBytesN(d.ISO639LanguageCode, 3, 0)
-
- b.Write(lengthOfItems)
- for _, item := range d.Items {
- b.Write(uint8(len(item.Description)))
- b.Write(item.Description)
- b.Write(uint8(len(item.Content)))
- b.Write(item.Content)
- }
-
- b.Write(uint8(len(d.Text)))
- b.Write(d.Text)
-
- return b.Err()
-}
-
-func calcDescriptorExtensionSupplementaryAudioLength(d *DescriptorExtensionSupplementaryAudio) int {
- ret := 1
- if d.HasLanguageCode {
- ret += 3
- }
- ret += len(d.PrivateData)
- return ret
-}
-
-func calcDescriptorExtensionLength(d *DescriptorExtension) uint8 {
- ret := 1 // tag
-
- switch d.Tag {
- case DescriptorTagExtensionSupplementaryAudio:
- ret += calcDescriptorExtensionSupplementaryAudioLength(d.SupplementaryAudio)
- default:
- if d.Unknown != nil {
- ret += len(*d.Unknown)
- }
- }
-
- return uint8(ret)
-}
-
-func writeDescriptorExtensionSupplementaryAudio(w *astikit.BitsWriter, d *DescriptorExtensionSupplementaryAudio) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.MixType)
- b.WriteN(d.EditorialClassification, 5)
- b.Write(true) // reserved
- b.Write(d.HasLanguageCode)
-
- if d.HasLanguageCode {
- b.WriteBytesN(d.LanguageCode, 3, 0)
- }
-
- b.Write(d.PrivateData)
-
- return b.Err()
-}
-
-func writeDescriptorExtension(w *astikit.BitsWriter, d *DescriptorExtension) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Tag)
-
- switch d.Tag {
- case DescriptorTagExtensionSupplementaryAudio:
- err := writeDescriptorExtensionSupplementaryAudio(w, d.SupplementaryAudio)
- if err != nil {
- return err
- }
- default:
- if d.Unknown != nil {
- b.Write(*d.Unknown)
- }
- }
-
- return b.Err()
-}
-
-func calcDescriptorISO639LanguageAndAudioTypeLength(d *DescriptorISO639LanguageAndAudioType) uint8 {
- return 3 + 1 // language code + type
-}
-
-func writeDescriptorISO639LanguageAndAudioType(w *astikit.BitsWriter, d *DescriptorISO639LanguageAndAudioType) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteBytesN(d.Language, 3, 0)
- b.Write(d.Type)
-
- return b.Err()
-}
-
-func calcDescriptorLocalTimeOffsetLength(d *DescriptorLocalTimeOffset) uint8 {
- return uint8(13 * len(d.Items))
-}
-
-func writeDescriptorLocalTimeOffset(w *astikit.BitsWriter, d *DescriptorLocalTimeOffset) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Items {
- b.WriteBytesN(item.CountryCode, 3, 0)
-
- b.WriteN(item.CountryRegionID, 6)
- b.WriteN(uint8(0xff), 1)
- b.Write(item.LocalTimeOffsetPolarity)
-
- if _, err := writeDVBDurationMinutes(w, item.LocalTimeOffset); err != nil {
- return err
- }
- if _, err := writeDVBTime(w, item.TimeOfChange); err != nil {
- return err
- }
- if _, err := writeDVBDurationMinutes(w, item.NextTimeOffset); err != nil {
- return err
- }
- }
-
- return b.Err()
-}
-
-func calcDescriptorMaximumBitrateLength(d *DescriptorMaximumBitrate) uint8 {
- return 3
-}
-
-func writeDescriptorMaximumBitrate(w *astikit.BitsWriter, d *DescriptorMaximumBitrate) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint8(0xff), 2)
- b.WriteN(uint32(d.Bitrate/50), 22)
-
- return b.Err()
-}
-
-func calcDescriptorNetworkNameLength(d *DescriptorNetworkName) uint8 {
- return uint8(len(d.Name))
-}
-
-func writeDescriptorNetworkName(w *astikit.BitsWriter, d *DescriptorNetworkName) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Name)
-
- return b.Err()
-}
-
-func calcDescriptorParentalRatingLength(d *DescriptorParentalRating) uint8 {
- return uint8(4 * len(d.Items))
-}
-
-func writeDescriptorParentalRating(w *astikit.BitsWriter, d *DescriptorParentalRating) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Items {
- b.WriteBytesN(item.CountryCode, 3, 0)
- b.Write(item.Rating)
- }
-
- return b.Err()
-}
-
-func calcDescriptorPrivateDataIndicatorLength(d *DescriptorPrivateDataIndicator) uint8 {
- return 4
-}
-
-func writeDescriptorPrivateDataIndicator(w *astikit.BitsWriter, d *DescriptorPrivateDataIndicator) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Indicator)
-
- return b.Err()
-}
-
-func calcDescriptorPrivateDataSpecifierLength(d *DescriptorPrivateDataSpecifier) uint8 {
- return 4
-}
-
-func writeDescriptorPrivateDataSpecifier(w *astikit.BitsWriter, d *DescriptorPrivateDataSpecifier) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Specifier)
-
- return b.Err()
-}
-
-func calcDescriptorRegistrationLength(d *DescriptorRegistration) uint8 {
- return uint8(4 + len(d.AdditionalIdentificationInfo))
-}
-
-func writeDescriptorRegistration(w *astikit.BitsWriter, d *DescriptorRegistration) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.FormatIdentifier)
- b.Write(d.AdditionalIdentificationInfo)
-
- return b.Err()
-}
-
-func calcDescriptorServiceLength(d *DescriptorService) uint8 {
- ret := 3 // type and lengths
- ret += len(d.Name)
- ret += len(d.Provider)
- return uint8(ret)
-}
-
-func writeDescriptorService(w *astikit.BitsWriter, d *DescriptorService) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Type)
- b.Write(uint8(len(d.Provider)))
- b.Write(d.Provider)
- b.Write(uint8(len(d.Name)))
- b.Write(d.Name)
-
- return b.Err()
-}
-
-func calcDescriptorShortEventLength(d *DescriptorShortEvent) uint8 {
- ret := 3 + 1 + 1 // language code and lengths
- ret += len(d.EventName)
- ret += len(d.Text)
- return uint8(ret)
-}
-
-func writeDescriptorShortEvent(w *astikit.BitsWriter, d *DescriptorShortEvent) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteBytesN(d.Language, 3, 0)
-
- b.Write(uint8(len(d.EventName)))
- b.Write(d.EventName)
-
- b.Write(uint8(len(d.Text)))
- b.Write(d.Text)
-
- return b.Err()
-}
-
-func calcDescriptorStreamIdentifierLength(d *DescriptorStreamIdentifier) uint8 {
- return 1
-}
-
-func writeDescriptorStreamIdentifier(w *astikit.BitsWriter, d *DescriptorStreamIdentifier) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.ComponentTag)
-
- return b.Err()
-}
-
-func calcDescriptorSubtitlingLength(d *DescriptorSubtitling) uint8 {
- return uint8(8 * len(d.Items))
-}
-
-func writeDescriptorSubtitling(w *astikit.BitsWriter, d *DescriptorSubtitling) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Items {
- b.WriteBytesN(item.Language, 3, 0)
- b.Write(item.Type)
- b.Write(item.CompositionPageID)
- b.Write(item.AncillaryPageID)
- }
-
- return b.Err()
-}
-
-func calcDescriptorTeletextLength(d *DescriptorTeletext) uint8 {
- return uint8(5 * len(d.Items))
-}
-
-func writeDescriptorTeletext(w *astikit.BitsWriter, d *DescriptorTeletext) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Items {
- b.WriteBytesN(item.Language, 3, 0)
- b.WriteN(item.Type, 5)
- b.WriteN(item.Magazine, 3)
- b.WriteN(item.Page/10, 4)
- b.WriteN(item.Page%10, 4)
- }
-
- return b.Err()
-}
-
-func calcDescriptorVBIDataLength(d *DescriptorVBIData) uint8 {
- return uint8(3 * len(d.Services))
-}
-
-func writeDescriptorVBIData(w *astikit.BitsWriter, d *DescriptorVBIData) error {
- b := astikit.NewBitsWriterBatch(w)
-
- for _, item := range d.Services {
- b.Write(item.DataServiceID)
-
- if item.DataServiceID == VBIDataServiceIDClosedCaptioning ||
- item.DataServiceID == VBIDataServiceIDEBUTeletext ||
- item.DataServiceID == VBIDataServiceIDInvertedTeletext ||
- item.DataServiceID == VBIDataServiceIDMonochrome442Samples ||
- item.DataServiceID == VBIDataServiceIDVPS ||
- item.DataServiceID == VBIDataServiceIDWSS {
-
- b.Write(uint8(len(item.Descriptors))) // each descriptor is 1 byte
- for _, desc := range item.Descriptors {
- b.WriteN(uint8(0xff), 2)
- b.Write(desc.FieldParity)
- b.WriteN(desc.LineOffset, 5)
- }
- } else {
- // let's put one reserved byte
- b.Write(uint8(1))
- b.Write(uint8(0xff))
- }
- }
-
- return b.Err()
-}
-
-func calcDescriptorUnknownLength(d *DescriptorUnknown) uint8 {
- return uint8(len(d.Content))
-}
-
-func writeDescriptorUnknown(w *astikit.BitsWriter, d *DescriptorUnknown) error {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(d.Content)
-
- return b.Err()
-}
-
-func calcDescriptorLength(d *Descriptor) uint8 {
- if d.Tag >= 0x80 && d.Tag <= 0xfe {
- return calcDescriptorUserDefinedLength(d.UserDefined)
- }
-
- switch d.Tag {
- case DescriptorTagAC3:
- return calcDescriptorAC3Length(d.AC3)
- case DescriptorTagAVCVideo:
- return calcDescriptorAVCVideoLength(d.AVCVideo)
- case DescriptorTagComponent:
- return calcDescriptorComponentLength(d.Component)
- case DescriptorTagContent:
- return calcDescriptorContentLength(d.Content)
- case DescriptorTagDataStreamAlignment:
- return calcDescriptorDataStreamAlignmentLength(d.DataStreamAlignment)
- case DescriptorTagEnhancedAC3:
- return calcDescriptorEnhancedAC3Length(d.EnhancedAC3)
- case DescriptorTagExtendedEvent:
- ret, _ := calcDescriptorExtendedEventLength(d.ExtendedEvent)
- return ret
- case DescriptorTagExtension:
- return calcDescriptorExtensionLength(d.Extension)
- case DescriptorTagISO639LanguageAndAudioType:
- return calcDescriptorISO639LanguageAndAudioTypeLength(d.ISO639LanguageAndAudioType)
- case DescriptorTagLocalTimeOffset:
- return calcDescriptorLocalTimeOffsetLength(d.LocalTimeOffset)
- case DescriptorTagMaximumBitrate:
- return calcDescriptorMaximumBitrateLength(d.MaximumBitrate)
- case DescriptorTagNetworkName:
- return calcDescriptorNetworkNameLength(d.NetworkName)
- case DescriptorTagParentalRating:
- return calcDescriptorParentalRatingLength(d.ParentalRating)
- case DescriptorTagPrivateDataIndicator:
- return calcDescriptorPrivateDataIndicatorLength(d.PrivateDataIndicator)
- case DescriptorTagPrivateDataSpecifier:
- return calcDescriptorPrivateDataSpecifierLength(d.PrivateDataSpecifier)
- case DescriptorTagRegistration:
- return calcDescriptorRegistrationLength(d.Registration)
- case DescriptorTagService:
- return calcDescriptorServiceLength(d.Service)
- case DescriptorTagShortEvent:
- return calcDescriptorShortEventLength(d.ShortEvent)
- case DescriptorTagStreamIdentifier:
- return calcDescriptorStreamIdentifierLength(d.StreamIdentifier)
- case DescriptorTagSubtitling:
- return calcDescriptorSubtitlingLength(d.Subtitling)
- case DescriptorTagTeletext:
- return calcDescriptorTeletextLength(d.Teletext)
- case DescriptorTagVBIData:
- return calcDescriptorVBIDataLength(d.VBIData)
- case DescriptorTagVBITeletext:
- return calcDescriptorTeletextLength(d.VBITeletext)
- }
-
- return calcDescriptorUnknownLength(d.Unknown)
-}
-
-func writeDescriptor(w *astikit.BitsWriter, d *Descriptor) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
- length := calcDescriptorLength(d)
-
- b.Write(d.Tag)
- b.Write(length)
-
- if err := b.Err(); err != nil {
- return 0, err
- }
-
- written := int(length) + 2
-
- if d.Tag >= 0x80 && d.Tag <= 0xfe {
- return written, writeDescriptorUserDefined(w, d.UserDefined)
- }
-
- switch d.Tag {
- case DescriptorTagAC3:
- return written, writeDescriptorAC3(w, d.AC3)
- case DescriptorTagAVCVideo:
- return written, writeDescriptorAVCVideo(w, d.AVCVideo)
- case DescriptorTagComponent:
- return written, writeDescriptorComponent(w, d.Component)
- case DescriptorTagContent:
- return written, writeDescriptorContent(w, d.Content)
- case DescriptorTagDataStreamAlignment:
- return written, writeDescriptorDataStreamAlignment(w, d.DataStreamAlignment)
- case DescriptorTagEnhancedAC3:
- return written, writeDescriptorEnhancedAC3(w, d.EnhancedAC3)
- case DescriptorTagExtendedEvent:
- return written, writeDescriptorExtendedEvent(w, d.ExtendedEvent)
- case DescriptorTagExtension:
- return written, writeDescriptorExtension(w, d.Extension)
- case DescriptorTagISO639LanguageAndAudioType:
- return written, writeDescriptorISO639LanguageAndAudioType(w, d.ISO639LanguageAndAudioType)
- case DescriptorTagLocalTimeOffset:
- return written, writeDescriptorLocalTimeOffset(w, d.LocalTimeOffset)
- case DescriptorTagMaximumBitrate:
- return written, writeDescriptorMaximumBitrate(w, d.MaximumBitrate)
- case DescriptorTagNetworkName:
- return written, writeDescriptorNetworkName(w, d.NetworkName)
- case DescriptorTagParentalRating:
- return written, writeDescriptorParentalRating(w, d.ParentalRating)
- case DescriptorTagPrivateDataIndicator:
- return written, writeDescriptorPrivateDataIndicator(w, d.PrivateDataIndicator)
- case DescriptorTagPrivateDataSpecifier:
- return written, writeDescriptorPrivateDataSpecifier(w, d.PrivateDataSpecifier)
- case DescriptorTagRegistration:
- return written, writeDescriptorRegistration(w, d.Registration)
- case DescriptorTagService:
- return written, writeDescriptorService(w, d.Service)
- case DescriptorTagShortEvent:
- return written, writeDescriptorShortEvent(w, d.ShortEvent)
- case DescriptorTagStreamIdentifier:
- return written, writeDescriptorStreamIdentifier(w, d.StreamIdentifier)
- case DescriptorTagSubtitling:
- return written, writeDescriptorSubtitling(w, d.Subtitling)
- case DescriptorTagTeletext:
- return written, writeDescriptorTeletext(w, d.Teletext)
- case DescriptorTagVBIData:
- return written, writeDescriptorVBIData(w, d.VBIData)
- case DescriptorTagVBITeletext:
- return written, writeDescriptorTeletext(w, d.VBITeletext)
- }
-
- return written, writeDescriptorUnknown(w, d.Unknown)
-}
-
-func calcDescriptorsLength(ds []*Descriptor) uint16 {
- length := uint16(0)
- for _, d := range ds {
- length += 2 // tag and length
- length += uint16(calcDescriptorLength(d))
- }
- return length
-}
-
-func writeDescriptors(w *astikit.BitsWriter, ds []*Descriptor) (int, error) {
- written := 0
-
- for _, d := range ds {
- n, err := writeDescriptor(w, d)
- if err != nil {
- return 0, err
- }
- written += n
- }
-
- return written, nil
-}
-
-func writeDescriptorsWithLength(w *astikit.BitsWriter, ds []*Descriptor) (int, error) {
- length := calcDescriptorsLength(ds)
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint8(0xff), 4) // reserved
- b.WriteN(length, 12) // program_info_length
-
- if err := b.Err(); err != nil {
- return 0, err
- }
-
- written, err := writeDescriptors(w, ds)
- return written + 2, err // 2 for length
-}
diff --git a/vendor/github.com/asticode/go-astits/dvb.go b/vendor/github.com/asticode/go-astits/dvb.go
deleted file mode 100644
index 711a984c001..00000000000
--- a/vendor/github.com/asticode/go-astits/dvb.go
+++ /dev/null
@@ -1,130 +0,0 @@
-package astits
-
-import (
- "fmt"
- "time"
-
- "github.com/asticode/go-astikit"
-)
-
-// parseDVBTime parses a DVB time
-// This field is coded as 16 bits giving the 16 LSBs of MJD followed by 24 bits coded as 6 digits in 4 - bit Binary
-// Coded Decimal (BCD). If the start time is undefined (e.g. for an event in a NVOD reference service) all bits of the
-// field are set to "1".
-// I apologize for the computation which is really messy but details are given in the documentation
-// Page: 160 | Annex C | Link: https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf
-// (barbashov) the link above can be broken, alternative: https://dvb.org/wp-content/uploads/2019/12/a038_tm1217r37_en300468v1_17_1_-_rev-134_-_si_specification.pdf
-func parseDVBTime(i *astikit.BytesIterator) (t time.Time, err error) {
- // Get next 2 bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Date
- var mjd = uint16(bs[0])<<8 | uint16(bs[1])
- var yt = int((float64(mjd) - 15078.2) / 365.25)
- var mt = int((float64(mjd) - 14956.1 - float64(int(float64(yt)*365.25))) / 30.6001)
- var d = int(float64(mjd) - 14956 - float64(int(float64(yt)*365.25)) - float64(int(float64(mt)*30.6001)))
- var k int
- if mt == 14 || mt == 15 {
- k = 1
- }
- var y = yt + k
- var m = mt - 1 - k*12
- t, _ = time.Parse("06-01-02", fmt.Sprintf("%d-%d-%d", y, m, d))
-
- // Time
- var s time.Duration
- if s, err = parseDVBDurationSeconds(i); err != nil {
- err = fmt.Errorf("astits: parsing DVB duration seconds failed: %w", err)
- return
- }
- t = t.Add(s)
- return
-}
-
-// parseDVBDurationMinutes parses a minutes duration
-// 16 bit field containing the duration of the event in hours, minutes. format: 4 digits, 4 - bit BCD = 18 bit
-func parseDVBDurationMinutes(i *astikit.BytesIterator) (d time.Duration, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- d = parseDVBDurationByte(bs[0])*time.Hour + parseDVBDurationByte(bs[1])*time.Minute
- return
-}
-
-// parseDVBDurationSeconds parses a seconds duration
-// 24 bit field containing the duration of the event in hours, minutes, seconds. format: 6 digits, 4 - bit BCD = 24 bit
-func parseDVBDurationSeconds(i *astikit.BytesIterator) (d time.Duration, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- d = parseDVBDurationByte(bs[0])*time.Hour + parseDVBDurationByte(bs[1])*time.Minute + parseDVBDurationByte(bs[2])*time.Second
- return
-}
-
-// parseDVBDurationByte parses a duration byte
-func parseDVBDurationByte(i byte) time.Duration {
- return time.Duration(uint8(i)>>4*10 + uint8(i)&0xf)
-}
-
-func writeDVBTime(w *astikit.BitsWriter, t time.Time) (int, error) {
- year := t.Year() - 1900
- month := t.Month()
- day := t.Day()
-
- l := 0
- if month <= time.February {
- l = 1
- }
-
- mjd := 14956 + day + int(float64(year-l)*365.25) + int(float64(int(month)+1+l*12)*30.6001)
-
- d := t.Sub(t.Truncate(24 * time.Hour))
-
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(uint16(mjd))
- bytesWritten, err := writeDVBDurationSeconds(w, d)
- if err != nil {
- return 2, err
- }
-
- return bytesWritten + 2, b.Err()
-}
-
-func writeDVBDurationMinutes(w *astikit.BitsWriter, d time.Duration) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- hours := uint8(d.Hours())
- minutes := uint8(int(d.Minutes()) % 60)
-
- b.Write(dvbDurationByteRepresentation(hours))
- b.Write(dvbDurationByteRepresentation(minutes))
-
- return 2, b.Err()
-}
-
-func writeDVBDurationSeconds(w *astikit.BitsWriter, d time.Duration) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- hours := uint8(d.Hours())
- minutes := uint8(int(d.Minutes()) % 60)
- seconds := uint8(int(d.Seconds()) % 60)
-
- b.Write(dvbDurationByteRepresentation(hours))
- b.Write(dvbDurationByteRepresentation(minutes))
- b.Write(dvbDurationByteRepresentation(seconds))
-
- return 3, b.Err()
-}
-
-func dvbDurationByteRepresentation(n uint8) uint8 {
- return (n/10)<<4 | n%10
-}
diff --git a/vendor/github.com/asticode/go-astits/muxer.go b/vendor/github.com/asticode/go-astits/muxer.go
deleted file mode 100644
index 0312169e90c..00000000000
--- a/vendor/github.com/asticode/go-astits/muxer.go
+++ /dev/null
@@ -1,422 +0,0 @@
-package astits
-
-import (
- "bytes"
- "context"
- "errors"
- "github.com/asticode/go-astikit"
- "io"
-)
-
-const (
- startPID uint16 = 0x0100
- pmtStartPID uint16 = 0x1000
- programNumberStart uint16 = 1
-)
-
-var (
- ErrPIDNotFound = errors.New("astits: PID not found")
- ErrPIDAlreadyExists = errors.New("astits: PID already exists")
- ErrPCRPIDInvalid = errors.New("astits: PCR PID invalid")
-)
-
-type Muxer struct {
- ctx context.Context
- w io.Writer
- bitsWriter *astikit.BitsWriter
-
- packetSize int
- tablesRetransmitPeriod int // period in PES packets
-
- pm programMap // pid -> programNumber
- pmt PMTData
- nextPID uint16
- patVersion wrappingCounter
- pmtVersion wrappingCounter
-
- patBytes bytes.Buffer
- pmtBytes bytes.Buffer
-
- buf bytes.Buffer
- bufWriter *astikit.BitsWriter
-
- esContexts map[uint16]*esContext
- tablesRetransmitCounter int
-}
-
-type esContext struct {
- es *PMTElementaryStream
- cc wrappingCounter
-}
-
-func newEsContext(es *PMTElementaryStream) *esContext {
- return &esContext{
- es: es,
- cc: newWrappingCounter(0b1111), // CC is 4 bits
- }
-}
-
-func MuxerOptTablesRetransmitPeriod(newPeriod int) func(*Muxer) {
- return func(m *Muxer) {
- m.tablesRetransmitPeriod = newPeriod
- }
-}
-
-// TODO MuxerOptAutodetectPCRPID selecting first video PID for each PMT, falling back to first audio, falling back to any other
-
-func NewMuxer(ctx context.Context, w io.Writer, opts ...func(*Muxer)) *Muxer {
- m := &Muxer{
- ctx: ctx,
- w: w,
-
- packetSize: MpegTsPacketSize, // no 192-byte packet support yet
- tablesRetransmitPeriod: 40,
-
- pm: newProgramMap(),
- pmt: PMTData{
- ElementaryStreams: []*PMTElementaryStream{},
- ProgramNumber: programNumberStart,
- },
-
- // table version is 5-bit field
- patVersion: newWrappingCounter(0b11111),
- pmtVersion: newWrappingCounter(0b11111),
-
- esContexts: map[uint16]*esContext{},
- }
-
- m.bufWriter = astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: &m.buf})
- m.bitsWriter = astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: m.w})
-
- // TODO multiple programs support
- m.pm.set(pmtStartPID, programNumberStart)
-
- for _, opt := range opts {
- opt(m)
- }
-
- // to output tables at the very start
- m.tablesRetransmitCounter = m.tablesRetransmitPeriod
-
- return m
-}
-
-// if es.ElementaryPID is zero, it will be generated automatically
-func (m *Muxer) AddElementaryStream(es PMTElementaryStream) error {
- if es.ElementaryPID != 0 {
- for _, oes := range m.pmt.ElementaryStreams {
- if oes.ElementaryPID == es.ElementaryPID {
- return ErrPIDAlreadyExists
- }
- }
- } else {
- es.ElementaryPID = m.nextPID
- m.nextPID++
- }
-
- m.pmt.ElementaryStreams = append(m.pmt.ElementaryStreams, &es)
-
- m.esContexts[es.ElementaryPID] = newEsContext(&es)
- // invalidate pmt cache
- m.pmtBytes.Reset()
- return nil
-}
-
-func (m *Muxer) RemoveElementaryStream(pid uint16) error {
- foundIdx := -1
- for i, oes := range m.pmt.ElementaryStreams {
- if oes.ElementaryPID == pid {
- foundIdx = i
- break
- }
- }
-
- if foundIdx == -1 {
- return ErrPIDNotFound
- }
-
- m.pmt.ElementaryStreams = append(m.pmt.ElementaryStreams[:foundIdx], m.pmt.ElementaryStreams[foundIdx+1:]...)
- delete(m.esContexts, pid)
- m.pmtBytes.Reset()
- return nil
-}
-
-// SetPCRPID marks pid as one to look PCRs in
-func (m *Muxer) SetPCRPID(pid uint16) {
- m.pmt.PCRPID = pid
-}
-
-// WriteData writes MuxerData to TS stream
-// Currently only PES packets are supported
-// Be aware that after successful call WriteData will set d.AdaptationField.StuffingLength value to zero
-func (m *Muxer) WriteData(d *MuxerData) (int, error) {
- ctx, ok := m.esContexts[d.PID]
- if !ok {
- return 0, ErrPIDNotFound
- }
-
- bytesWritten := 0
-
- forceTables := d.AdaptationField != nil &&
- d.AdaptationField.RandomAccessIndicator &&
- d.PID == m.pmt.PCRPID
-
- n, err := m.retransmitTables(forceTables)
- if err != nil {
- return n, err
- }
-
- bytesWritten += n
-
- payloadStart := true
- writeAf := d.AdaptationField != nil
- payloadBytesWritten := 0
- for payloadBytesWritten < len(d.PES.Data) {
- pktLen := 1 + mpegTsPacketHeaderSize // sync byte + header
- pkt := Packet{
- Header: &PacketHeader{
- ContinuityCounter: uint8(ctx.cc.get()),
- HasAdaptationField: writeAf,
- HasPayload: false,
- PayloadUnitStartIndicator: false,
- PID: d.PID,
- },
- }
-
- if writeAf {
- pkt.AdaptationField = d.AdaptationField
- // one byte for adaptation field length field
- pktLen += 1 + int(calcPacketAdaptationFieldLength(d.AdaptationField))
- writeAf = false
- }
-
- bytesAvailable := m.packetSize - pktLen
- if payloadStart {
- pesHeaderLengthCurrent := pesHeaderLength + int(calcPESOptionalHeaderLength(d.PES.Header.OptionalHeader))
- // d.AdaptationField with pes header are too big, we don't have space to write pes header
- if bytesAvailable < pesHeaderLengthCurrent {
- pkt.Header.HasAdaptationField = true
- if pkt.AdaptationField == nil {
- pkt.AdaptationField = newStuffingAdaptationField(bytesAvailable)
- } else {
- pkt.AdaptationField.StuffingLength = bytesAvailable
- }
- } else {
- pkt.Header.HasPayload = true
- pkt.Header.PayloadUnitStartIndicator = true
- }
- } else {
- pkt.Header.HasPayload = true
- }
-
- if pkt.Header.HasPayload {
- m.buf.Reset()
- if d.PES.Header.StreamID == 0 {
- d.PES.Header.StreamID = ctx.es.StreamType.ToPESStreamID()
- }
-
- ntot, npayload, err := writePESData(
- m.bufWriter,
- d.PES.Header,
- d.PES.Data[payloadBytesWritten:],
- payloadStart,
- bytesAvailable,
- )
- if err != nil {
- return bytesWritten, err
- }
-
- payloadBytesWritten += npayload
-
- pkt.Payload = m.buf.Bytes()
-
- bytesAvailable -= ntot
- // if we still have some space in packet, we should stuff it with adaptation field stuffing
- // we can't stuff packets with 0xff at the end of a packet since it's not uncommon for PES payloads to have length unspecified
- if bytesAvailable > 0 {
- pkt.Header.HasAdaptationField = true
- if pkt.AdaptationField == nil {
- pkt.AdaptationField = newStuffingAdaptationField(bytesAvailable)
- } else {
- pkt.AdaptationField.StuffingLength = bytesAvailable
- }
- }
-
- n, err = writePacket(m.bitsWriter, &pkt, m.packetSize)
- if err != nil {
- return bytesWritten, err
- }
-
- bytesWritten += n
-
- payloadStart = false
- }
- }
-
- if d.AdaptationField != nil {
- d.AdaptationField.StuffingLength = 0
- }
-
- return bytesWritten, nil
-}
-
-// Writes given packet to MPEG-TS stream
-// Stuffs with 0xffs if packet turns out to be shorter than target packet length
-func (m *Muxer) WritePacket(p *Packet) (int, error) {
- return writePacket(m.bitsWriter, p, m.packetSize)
-}
-
-func (m *Muxer) retransmitTables(force bool) (int, error) {
- m.tablesRetransmitCounter++
- if !force && m.tablesRetransmitCounter < m.tablesRetransmitPeriod {
- return 0, nil
- }
-
- n, err := m.WriteTables()
- if err != nil {
- return n, err
- }
-
- m.tablesRetransmitCounter = 0
- return n, nil
-}
-
-func (m *Muxer) WriteTables() (int, error) {
- bytesWritten := 0
-
- if m.patBytes.Len() != m.packetSize {
- if err := m.generatePAT(); err != nil {
- return bytesWritten, err
- }
- }
-
- if m.pmtBytes.Len() != m.packetSize {
- if err := m.generatePMT(); err != nil {
- return bytesWritten, err
- }
- }
-
- n, err := m.w.Write(m.patBytes.Bytes())
- if err != nil {
- return bytesWritten, err
- }
- bytesWritten += n
-
- n, err = m.w.Write(m.pmtBytes.Bytes())
- if err != nil {
- return bytesWritten, err
- }
- bytesWritten += n
-
- return bytesWritten, nil
-}
-
-func (m *Muxer) generatePAT() error {
- d := m.pm.toPATData()
- syntax := &PSISectionSyntax{
- Data: &PSISectionSyntaxData{PAT: d},
- Header: &PSISectionSyntaxHeader{
- CurrentNextIndicator: true,
- // TODO support for PAT tables longer than 1 TS packet
- //LastSectionNumber: 0,
- //SectionNumber: 0,
- TableIDExtension: d.TransportStreamID,
- VersionNumber: uint8(m.patVersion.get()),
- },
- }
- section := PSISection{
- Header: &PSISectionHeader{
- SectionLength: calcPATSectionLength(d),
- SectionSyntaxIndicator: true,
- TableID: PSITableID(d.TransportStreamID),
- },
- Syntax: syntax,
- }
- psiData := PSIData{
- Sections: []*PSISection{§ion},
- }
-
- m.buf.Reset()
- w := astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: &m.buf})
- if _, err := writePSIData(w, &psiData); err != nil {
- return err
- }
-
- m.patBytes.Reset()
- wPacket := astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: &m.patBytes})
-
- pkt := Packet{
- Header: &PacketHeader{
- HasPayload: true,
- PayloadUnitStartIndicator: true,
- PID: PIDPAT,
- },
- Payload: m.buf.Bytes(),
- }
- if _, err := writePacket(wPacket, &pkt, m.packetSize); err != nil {
- // FIXME save old PAT and rollback to it here maybe?
- return err
- }
-
- return nil
-}
-
-func (m *Muxer) generatePMT() error {
- hasPCRPID := false
- for _, es := range m.pmt.ElementaryStreams {
- if es.ElementaryPID == m.pmt.PCRPID {
- hasPCRPID = true
- break
- }
- }
- if !hasPCRPID {
- return ErrPCRPIDInvalid
- }
-
- syntax := &PSISectionSyntax{
- Data: &PSISectionSyntaxData{PMT: &m.pmt},
- Header: &PSISectionSyntaxHeader{
- CurrentNextIndicator: true,
- // TODO support for PMT tables longer than 1 TS packet
- //LastSectionNumber: 0,
- //SectionNumber: 0,
- TableIDExtension: m.pmt.ProgramNumber,
- VersionNumber: uint8(m.pmtVersion.get()),
- },
- }
- section := PSISection{
- Header: &PSISectionHeader{
- SectionLength: calcPMTSectionLength(&m.pmt),
- SectionSyntaxIndicator: true,
- TableID: PSITableIDPMT,
- },
- Syntax: syntax,
- }
- psiData := PSIData{
- Sections: []*PSISection{§ion},
- }
-
- m.buf.Reset()
- w := astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: &m.buf})
- if _, err := writePSIData(w, &psiData); err != nil {
- return err
- }
-
- m.pmtBytes.Reset()
- wPacket := astikit.NewBitsWriter(astikit.BitsWriterOptions{Writer: &m.pmtBytes})
-
- pkt := Packet{
- Header: &PacketHeader{
- HasPayload: true,
- PayloadUnitStartIndicator: true,
- PID: pmtStartPID, // FIXME multiple programs support
- },
- Payload: m.buf.Bytes(),
- }
- if _, err := writePacket(wPacket, &pkt, m.packetSize); err != nil {
- // FIXME save old PMT and rollback to it here maybe?
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/asticode/go-astits/packet.go b/vendor/github.com/asticode/go-astits/packet.go
deleted file mode 100644
index c1261209f93..00000000000
--- a/vendor/github.com/asticode/go-astits/packet.go
+++ /dev/null
@@ -1,543 +0,0 @@
-package astits
-
-import (
- "fmt"
- "github.com/asticode/go-astikit"
-)
-
-// Scrambling Controls
-const (
- ScramblingControlNotScrambled = 0
- ScramblingControlReservedForFutureUse = 1
- ScramblingControlScrambledWithEvenKey = 2
- ScramblingControlScrambledWithOddKey = 3
-)
-
-const (
- MpegTsPacketSize = 188
- mpegTsPacketHeaderSize = 3
- pcrBytesSize = 6
-)
-
-// Packet represents a packet
-// https://en.wikipedia.org/wiki/MPEG_transport_stream
-type Packet struct {
- AdaptationField *PacketAdaptationField
- Header *PacketHeader
- Payload []byte // This is only the payload content
-}
-
-// PacketHeader represents a packet header
-type PacketHeader struct {
- ContinuityCounter uint8 // Sequence number of payload packets (0x00 to 0x0F) within each stream (except PID 8191)
- HasAdaptationField bool
- HasPayload bool
- PayloadUnitStartIndicator bool // Set when a PES, PSI, or DVB-MIP packet begins immediately following the header.
- PID uint16 // Packet Identifier, describing the payload data.
- TransportErrorIndicator bool // Set when a demodulator can't correct errors from FEC data; indicating the packet is corrupt.
- TransportPriority bool // Set when the current packet has a higher priority than other packets with the same PID.
- TransportScramblingControl uint8
-}
-
-// PacketAdaptationField represents a packet adaptation field
-type PacketAdaptationField struct {
- AdaptationExtensionField *PacketAdaptationExtensionField
- DiscontinuityIndicator bool // Set if current TS packet is in a discontinuity state with respect to either the continuity counter or the program clock reference
- ElementaryStreamPriorityIndicator bool // Set when this stream should be considered "high priority"
- HasAdaptationExtensionField bool
- HasOPCR bool
- HasPCR bool
- HasTransportPrivateData bool
- HasSplicingCountdown bool
- Length int
- IsOneByteStuffing bool // Only used for one byte stuffing - if true, adaptation field will be written as one uint8(0). Not part of TS format
- StuffingLength int // Only used in writePacketAdaptationField to request stuffing
- OPCR *ClockReference // Original Program clock reference. Helps when one TS is copied into another
- PCR *ClockReference // Program clock reference
- RandomAccessIndicator bool // Set when the stream may be decoded without errors from this point
- SpliceCountdown int // Indicates how many TS packets from this one a splicing point occurs (Two's complement signed; may be negative)
- TransportPrivateDataLength int
- TransportPrivateData []byte
-}
-
-// PacketAdaptationExtensionField represents a packet adaptation extension field
-type PacketAdaptationExtensionField struct {
- DTSNextAccessUnit *ClockReference // The PES DTS of the splice point. Split up as 3 bits, 1 marker bit (0x1), 15 bits, 1 marker bit, 15 bits, and 1 marker bit, for 33 data bits total.
- HasLegalTimeWindow bool
- HasPiecewiseRate bool
- HasSeamlessSplice bool
- LegalTimeWindowIsValid bool
- LegalTimeWindowOffset uint16 // Extra information for rebroadcasters to determine the state of buffers when packets may be missing.
- Length int
- PiecewiseRate uint32 // The rate of the stream, measured in 188-byte packets, to define the end-time of the LTW.
- SpliceType uint8 // Indicates the parameters of the H.262 splice.
-}
-
-// parsePacket parses a packet
-func parsePacket(i *astikit.BytesIterator) (p *Packet, err error) {
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: getting next byte failed: %w", err)
- return
- }
-
- // Packet must start with a sync byte
- if b != syncByte {
- err = ErrPacketMustStartWithASyncByte
- return
- }
-
- // Create packet
- p = &Packet{}
-
- // In case packet size is bigger than 188 bytes, we don't care for the first bytes
- i.Seek(i.Len() - MpegTsPacketSize + 1)
- offsetStart := i.Offset()
-
- // Parse header
- if p.Header, err = parsePacketHeader(i); err != nil {
- err = fmt.Errorf("astits: parsing packet header failed: %w", err)
- return
- }
-
- // Parse adaptation field
- if p.Header.HasAdaptationField {
- if p.AdaptationField, err = parsePacketAdaptationField(i); err != nil {
- err = fmt.Errorf("astits: parsing packet adaptation field failed: %w", err)
- return
- }
- }
-
- // Build payload
- if p.Header.HasPayload {
- i.Seek(payloadOffset(offsetStart, p.Header, p.AdaptationField))
- p.Payload = i.Dump()
- }
- return
-}
-
-// payloadOffset returns the payload offset
-func payloadOffset(offsetStart int, h *PacketHeader, a *PacketAdaptationField) (offset int) {
- offset = offsetStart + 3
- if h.HasAdaptationField {
- offset += 1 + a.Length
- }
- return
-}
-
-// parsePacketHeader parses the packet header
-func parsePacketHeader(i *astikit.BytesIterator) (h *PacketHeader, err error) {
- // Get next bytes
- var bs []byte
- if bs, err = i.NextBytesNoCopy(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
-
- // Create header
- h = &PacketHeader{
- ContinuityCounter: uint8(bs[2] & 0xf),
- HasAdaptationField: bs[2]&0x20 > 0,
- HasPayload: bs[2]&0x10 > 0,
- PayloadUnitStartIndicator: bs[0]&0x40 > 0,
- PID: uint16(bs[0]&0x1f)<<8 | uint16(bs[1]),
- TransportErrorIndicator: bs[0]&0x80 > 0,
- TransportPriority: bs[0]&0x20 > 0,
- TransportScramblingControl: uint8(bs[2]) >> 6 & 0x3,
- }
- return
-}
-
-// parsePacketAdaptationField parses the packet adaptation field
-func parsePacketAdaptationField(i *astikit.BytesIterator) (a *PacketAdaptationField, err error) {
- // Create adaptation field
- a = &PacketAdaptationField{}
-
- // Get next byte
- var b byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Length
- a.Length = int(b)
-
- afStartOffset := i.Offset()
-
- // Valid length
- if a.Length > 0 {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Flags
- a.DiscontinuityIndicator = b&0x80 > 0
- a.RandomAccessIndicator = b&0x40 > 0
- a.ElementaryStreamPriorityIndicator = b&0x20 > 0
- a.HasPCR = b&0x10 > 0
- a.HasOPCR = b&0x08 > 0
- a.HasSplicingCountdown = b&0x04 > 0
- a.HasTransportPrivateData = b&0x02 > 0
- a.HasAdaptationExtensionField = b&0x01 > 0
-
- // PCR
- if a.HasPCR {
- if a.PCR, err = parsePCR(i); err != nil {
- err = fmt.Errorf("astits: parsing PCR failed: %w", err)
- return
- }
- }
-
- // OPCR
- if a.HasOPCR {
- if a.OPCR, err = parsePCR(i); err != nil {
- err = fmt.Errorf("astits: parsing PCR failed: %w", err)
- return
- }
- }
-
- // Splicing countdown
- if a.HasSplicingCountdown {
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- a.SpliceCountdown = int(b)
- }
-
- // Transport private data
- if a.HasTransportPrivateData {
- // Length
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
- a.TransportPrivateDataLength = int(b)
-
- // Data
- if a.TransportPrivateDataLength > 0 {
- if a.TransportPrivateData, err = i.NextBytes(a.TransportPrivateDataLength); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- }
- }
-
- // Adaptation extension
- if a.HasAdaptationExtensionField {
- // Create extension field
- a.AdaptationExtensionField = &PacketAdaptationExtensionField{}
-
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Length
- a.AdaptationExtensionField.Length = int(b)
- if a.AdaptationExtensionField.Length > 0 {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Basic
- a.AdaptationExtensionField.HasLegalTimeWindow = b&0x80 > 0
- a.AdaptationExtensionField.HasPiecewiseRate = b&0x40 > 0
- a.AdaptationExtensionField.HasSeamlessSplice = b&0x20 > 0
-
- // Legal time window
- if a.AdaptationExtensionField.HasLegalTimeWindow {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(2); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- a.AdaptationExtensionField.LegalTimeWindowIsValid = bs[0]&0x80 > 0
- a.AdaptationExtensionField.LegalTimeWindowOffset = uint16(bs[0]&0x7f)<<8 | uint16(bs[1])
- }
-
- // Piecewise rate
- if a.AdaptationExtensionField.HasPiecewiseRate {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(3); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- a.AdaptationExtensionField.PiecewiseRate = uint32(bs[0]&0x3f)<<16 | uint32(bs[1])<<8 | uint32(bs[2])
- }
-
- // Seamless splice
- if a.AdaptationExtensionField.HasSeamlessSplice {
- // Get next byte
- if b, err = i.NextByte(); err != nil {
- err = fmt.Errorf("astits: fetching next byte failed: %w", err)
- return
- }
-
- // Splice type
- a.AdaptationExtensionField.SpliceType = uint8(b&0xf0) >> 4
-
- // We need to rewind since the current byte is used by the DTS next access unit as well
- i.Skip(-1)
-
- // DTS Next access unit
- if a.AdaptationExtensionField.DTSNextAccessUnit, err = parsePTSOrDTS(i); err != nil {
- err = fmt.Errorf("astits: parsing DTS failed: %w", err)
- return
- }
- }
- }
- }
- }
-
- a.StuffingLength = a.Length - (i.Offset() - afStartOffset)
-
- return
-}
-
-// parsePCR parses a Program Clock Reference
-// Program clock reference, stored as 33 bits base, 6 bits reserved, 9 bits extension.
-func parsePCR(i *astikit.BytesIterator) (cr *ClockReference, err error) {
- var bs []byte
- if bs, err = i.NextBytesNoCopy(6); err != nil {
- err = fmt.Errorf("astits: fetching next bytes failed: %w", err)
- return
- }
- pcr := uint64(bs[0])<<40 | uint64(bs[1])<<32 | uint64(bs[2])<<24 | uint64(bs[3])<<16 | uint64(bs[4])<<8 | uint64(bs[5])
- cr = newClockReference(int64(pcr>>15), int64(pcr&0x1ff))
- return
-}
-
-func writePacket(w *astikit.BitsWriter, p *Packet, targetPacketSize int) (written int, retErr error) {
- if retErr = w.Write(uint8(syncByte)); retErr != nil {
- return
- }
- written += 1
-
- n, retErr := writePacketHeader(w, p.Header)
- if retErr != nil {
- return
- }
- written += n
-
- if p.Header.HasAdaptationField {
- n, retErr = writePacketAdaptationField(w, p.AdaptationField)
- if retErr != nil {
- return
- }
- written += n
- }
-
- if targetPacketSize-written < len(p.Payload) {
- return 0, fmt.Errorf(
- "writePacket: can't write %d bytes of payload: only %d is available",
- len(p.Payload),
- targetPacketSize-written,
- )
- }
-
- if p.Header.HasPayload {
- retErr = w.Write(p.Payload)
- if retErr != nil {
- return
- }
- written += len(p.Payload)
- }
-
- for written < targetPacketSize {
- if retErr = w.Write(uint8(0xff)); retErr != nil {
- return
- }
- written++
- }
-
- return written, nil
-}
-
-func writePacketHeader(w *astikit.BitsWriter, h *PacketHeader) (written int, retErr error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.Write(h.TransportErrorIndicator)
- b.Write(h.PayloadUnitStartIndicator)
- b.Write(h.TransportPriority)
- b.WriteN(h.PID, 13)
- b.WriteN(h.TransportScramblingControl, 2)
- b.Write(h.HasAdaptationField) // adaptation_field_control higher bit
- b.Write(h.HasPayload) // adaptation_field_control lower bit
- b.WriteN(h.ContinuityCounter, 4)
-
- return mpegTsPacketHeaderSize, b.Err()
-}
-
-func writePCR(w *astikit.BitsWriter, cr *ClockReference) (int, error) {
- b := astikit.NewBitsWriterBatch(w)
-
- b.WriteN(uint64(cr.Base), 33)
- b.WriteN(uint8(0xff), 6)
- b.WriteN(uint64(cr.Extension), 9)
- return pcrBytesSize, b.Err()
-}
-
-func calcPacketAdaptationFieldLength(af *PacketAdaptationField) (length uint8) {
- length++
- if af.HasPCR {
- length += pcrBytesSize
- }
- if af.HasOPCR {
- length += pcrBytesSize
- }
- if af.HasSplicingCountdown {
- length++
- }
- if af.HasTransportPrivateData {
- length += 1 + uint8(len(af.TransportPrivateData))
- }
- if af.HasAdaptationExtensionField {
- length += 1 + calcPacketAdaptationFieldExtensionLength(af.AdaptationExtensionField)
- }
- length += uint8(af.StuffingLength)
- return
-}
-
-func writePacketAdaptationField(w *astikit.BitsWriter, af *PacketAdaptationField) (bytesWritten int, retErr error) {
- b := astikit.NewBitsWriterBatch(w)
-
- if af.IsOneByteStuffing {
- b.Write(uint8(0))
- return 1, nil
- }
-
- length := calcPacketAdaptationFieldLength(af)
- b.Write(length)
- bytesWritten++
-
- b.Write(af.DiscontinuityIndicator)
- b.Write(af.RandomAccessIndicator)
- b.Write(af.ElementaryStreamPriorityIndicator)
- b.Write(af.HasPCR)
- b.Write(af.HasOPCR)
- b.Write(af.HasSplicingCountdown)
- b.Write(af.HasTransportPrivateData)
- b.Write(af.HasAdaptationExtensionField)
-
- bytesWritten++
-
- if af.HasPCR {
- n, err := writePCR(w, af.PCR)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if af.HasOPCR {
- n, err := writePCR(w, af.OPCR)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- if af.HasSplicingCountdown {
- b.Write(uint8(af.SpliceCountdown))
- bytesWritten++
- }
-
- if af.HasTransportPrivateData {
- // we can get length from TransportPrivateData itself, why do we need separate field?
- b.Write(uint8(af.TransportPrivateDataLength))
- bytesWritten++
- if af.TransportPrivateDataLength > 0 {
- b.Write(af.TransportPrivateData)
- }
- bytesWritten += len(af.TransportPrivateData)
- }
-
- if af.HasAdaptationExtensionField {
- n, err := writePacketAdaptationFieldExtension(w, af.AdaptationExtensionField)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- // stuffing
- for i := 0; i < af.StuffingLength; i++ {
- b.Write(uint8(0xff))
- bytesWritten++
- }
-
- retErr = b.Err()
- return
-}
-
-func calcPacketAdaptationFieldExtensionLength(afe *PacketAdaptationExtensionField) (length uint8) {
- length++
- if afe.HasLegalTimeWindow {
- length += 2
- }
- if afe.HasPiecewiseRate {
- length += 3
- }
- if afe.HasSeamlessSplice {
- length += ptsOrDTSByteLength
- }
- return length
-}
-
-func writePacketAdaptationFieldExtension(w *astikit.BitsWriter, afe *PacketAdaptationExtensionField) (bytesWritten int, retErr error) {
- b := astikit.NewBitsWriterBatch(w)
-
- length := calcPacketAdaptationFieldExtensionLength(afe)
- b.Write(length)
- bytesWritten++
-
- b.Write(afe.HasLegalTimeWindow)
- b.Write(afe.HasPiecewiseRate)
- b.Write(afe.HasSeamlessSplice)
- b.WriteN(uint8(0xff), 5) // reserved
- bytesWritten++
-
- if afe.HasLegalTimeWindow {
- b.Write(afe.LegalTimeWindowIsValid)
- b.WriteN(afe.LegalTimeWindowOffset, 15)
- bytesWritten += 2
- }
-
- if afe.HasPiecewiseRate {
- b.WriteN(uint8(0xff), 2)
- b.WriteN(afe.PiecewiseRate, 22)
- bytesWritten += 3
- }
-
- if afe.HasSeamlessSplice {
- n, err := writePTSOrDTS(w, afe.SpliceType, afe.DTSNextAccessUnit)
- if err != nil {
- return 0, err
- }
- bytesWritten += n
- }
-
- retErr = b.Err()
- return
-}
-
-func newStuffingAdaptationField(bytesToStuff int) *PacketAdaptationField {
- if bytesToStuff == 1 {
- return &PacketAdaptationField{
- IsOneByteStuffing: true,
- }
- }
-
- return &PacketAdaptationField{
- // one byte for length and one for flags
- StuffingLength: bytesToStuff - 2,
- }
-}
diff --git a/vendor/github.com/asticode/go-astits/packet_buffer.go b/vendor/github.com/asticode/go-astits/packet_buffer.go
deleted file mode 100644
index db3cf3ade0c..00000000000
--- a/vendor/github.com/asticode/go-astits/packet_buffer.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package astits
-
-import (
- "bufio"
- "fmt"
- "io"
-
- "github.com/asticode/go-astikit"
-)
-
-// packetBuffer represents a packet buffer
-type packetBuffer struct {
- packetSize int
- r io.Reader
- packetReadBuffer []byte
-}
-
-// newPacketBuffer creates a new packet buffer
-func newPacketBuffer(r io.Reader, packetSize int) (pb *packetBuffer, err error) {
- // Init
- pb = &packetBuffer{
- packetSize: packetSize,
- r: r,
- }
-
- // Packet size is not set
- if pb.packetSize == 0 {
- // Auto detect packet size
- if pb.packetSize, err = autoDetectPacketSize(r); err != nil {
- err = fmt.Errorf("astits: auto detecting packet size failed: %w", err)
- return
- }
- }
- return
-}
-
-// autoDetectPacketSize updates the packet size based on the first bytes
-// Minimum packet size is 188 and is bounded by 2 sync bytes
-// Assumption is made that the first byte of the reader is a sync byte
-func autoDetectPacketSize(r io.Reader) (packetSize int, err error) {
- // Read first bytes
- const l = 193
- var b = make([]byte, l)
- shouldRewind, rerr := peek(r, b)
- if rerr != nil {
- err = fmt.Errorf("astits: reading first %d bytes failed: %w", l, rerr)
- return
- }
-
- // Packet must start with a sync byte
- if b[0] != syncByte {
- err = ErrPacketMustStartWithASyncByte
- return
- }
-
- // Look for sync bytes
- for idx, b := range b {
- if b == syncByte && idx >= MpegTsPacketSize {
- // Update packet size
- packetSize = idx
-
- if !shouldRewind {
- return
- }
-
- // Rewind or sync reader
- var n int64
- if n, err = rewind(r); err != nil {
- err = fmt.Errorf("astits: rewinding failed: %w", err)
- return
- } else if n == -1 {
- var ls = packetSize - (l - packetSize)
- if _, err = r.Read(make([]byte, ls)); err != nil {
- err = fmt.Errorf("astits: reading %d bytes to sync reader failed: %w", ls, err)
- return
- }
- }
- return
- }
- }
- err = fmt.Errorf("astits: only one sync byte detected in first %d bytes", l)
- return
-}
-
-// bufio.Reader can't be rewinded, which leads to packet loss on packet size autodetection
-// but it has handy Peek() method
-// so what we do here is peeking bytes for bufio.Reader and falling back to rewinding/syncing for all other readers
-func peek(r io.Reader, b []byte) (shouldRewind bool, err error) {
- if br, ok := r.(*bufio.Reader); ok {
- var bs []byte
- bs, err = br.Peek(len(b))
- if err != nil {
- return
- }
- copy(b, bs)
- return false, nil
- }
-
- _, err = r.Read(b)
- shouldRewind = true
- return
-}
-
-// rewind rewinds the reader if possible, otherwise n = -1
-func rewind(r io.Reader) (n int64, err error) {
- if s, ok := r.(io.Seeker); ok {
- if n, err = s.Seek(0, 0); err != nil {
- err = fmt.Errorf("astits: seeking to 0 failed: %w", err)
- return
- }
- return
- }
- n = -1
- return
-}
-
-// next fetches the next packet from the buffer
-func (pb *packetBuffer) next() (p *Packet, err error) {
- // Read
- if pb.packetReadBuffer == nil || len(pb.packetReadBuffer) != pb.packetSize {
- pb.packetReadBuffer = make([]byte, pb.packetSize)
- }
-
- if _, err = io.ReadFull(pb.r, pb.packetReadBuffer); err != nil {
- if err == io.EOF || err == io.ErrUnexpectedEOF {
- err = ErrNoMorePackets
- } else {
- err = fmt.Errorf("astits: reading %d bytes failed: %w", pb.packetSize, err)
- }
- return
- }
-
- // Parse packet
- if p, err = parsePacket(astikit.NewBytesIterator(pb.packetReadBuffer)); err != nil {
- err = fmt.Errorf("astits: building packet failed: %w", err)
- return
- }
- return
-}
diff --git a/vendor/github.com/asticode/go-astits/packet_pool.go b/vendor/github.com/asticode/go-astits/packet_pool.go
deleted file mode 100644
index d38750ad7b7..00000000000
--- a/vendor/github.com/asticode/go-astits/packet_pool.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package astits
-
-import (
- "sort"
- "sync"
-)
-
-// packetPool represents a pool of packets
-type packetPool struct {
- b map[uint16][]*Packet // Indexed by PID
- m *sync.Mutex
-}
-
-// newPacketPool creates a new packet pool
-func newPacketPool() *packetPool {
- return &packetPool{
- b: make(map[uint16][]*Packet),
- m: &sync.Mutex{},
- }
-}
-
-// add adds a new packet to the pool
-func (b *packetPool) add(p *Packet) (ps []*Packet) {
- // Throw away packet if error indicator
- if p.Header.TransportErrorIndicator {
- return
- }
-
- // Throw away packets that don't have a payload until we figure out what we're going to do with them
- // TODO figure out what we're going to do with them :D
- if !p.Header.HasPayload {
- return
- }
-
- // Lock
- b.m.Lock()
- defer b.m.Unlock()
-
- // Init buffer
- var mps []*Packet
- var ok bool
- if mps, ok = b.b[p.Header.PID]; !ok {
- mps = []*Packet{}
- }
-
- // Empty buffer if we detect a discontinuity
- if hasDiscontinuity(mps, p) {
- mps = []*Packet{}
- }
-
- // Throw away packet if it's the same as the previous one
- if isSameAsPrevious(mps, p) {
- return
- }
-
- // Add packet
- if len(mps) > 0 || (len(mps) == 0 && p.Header.PayloadUnitStartIndicator) {
- mps = append(mps, p)
- }
-
- // Check payload unit start indicator
- if p.Header.PayloadUnitStartIndicator && len(mps) > 1 {
- ps = mps[:len(mps)-1]
- mps = []*Packet{p}
- }
-
- // Assign
- b.b[p.Header.PID] = mps
- return
-}
-
-// dump dumps the packet pool by looking for the first item with packets inside
-func (b *packetPool) dump() (ps []*Packet) {
- b.m.Lock()
- defer b.m.Unlock()
- var keys []int
- for k := range b.b {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
- for _, k := range keys {
- ps = b.b[uint16(k)]
- delete(b.b, uint16(k))
- if len(ps) > 0 {
- return
- }
- }
- return
-}
-
-// hasDiscontinuity checks whether a packet is discontinuous with a set of packets
-func hasDiscontinuity(ps []*Packet, p *Packet) bool {
- return (p.Header.HasAdaptationField && p.AdaptationField.DiscontinuityIndicator) ||
- (len(ps) > 0 && p.Header.HasPayload && p.Header.ContinuityCounter != (ps[len(ps)-1].Header.ContinuityCounter+1)%16) ||
- (len(ps) > 0 && !p.Header.HasPayload && p.Header.ContinuityCounter != ps[len(ps)-1].Header.ContinuityCounter)
-}
-
-// isSameAsPrevious checks whether a packet is the same as the last packet of a set of packets
-func isSameAsPrevious(ps []*Packet, p *Packet) bool {
- return len(ps) > 0 && p.Header.HasPayload && p.Header.ContinuityCounter == ps[len(ps)-1].Header.ContinuityCounter
-}
diff --git a/vendor/github.com/asticode/go-astits/program_map.go b/vendor/github.com/asticode/go-astits/program_map.go
deleted file mode 100644
index 855f2d70fa7..00000000000
--- a/vendor/github.com/asticode/go-astits/program_map.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package astits
-
-import "sync"
-
-// programMap represents a program ids map
-type programMap struct {
- m *sync.Mutex
- p map[uint16]uint16 // map[ProgramMapID]ProgramNumber
-}
-
-// newProgramMap creates a new program ids map
-func newProgramMap() programMap {
- return programMap{
- m: &sync.Mutex{},
- p: make(map[uint16]uint16),
- }
-}
-
-// exists checks whether the program with this pid exists
-func (m programMap) exists(pid uint16) (ok bool) {
- m.m.Lock()
- defer m.m.Unlock()
- _, ok = m.p[pid]
- return
-}
-
-// set sets a new program id
-func (m programMap) set(pid, number uint16) {
- m.m.Lock()
- defer m.m.Unlock()
- m.p[pid] = number
-}
-
-func (m programMap) unset(pid uint16) {
- m.m.Lock()
- defer m.m.Unlock()
- delete(m.p, pid)
-}
-
-func (m programMap) toPATData() *PATData {
- m.m.Lock()
- defer m.m.Unlock()
-
- d := &PATData{
- Programs: []*PATProgram{},
- TransportStreamID: uint16(PSITableIDPAT),
- }
-
- for pid, pnr := range m.p {
- d.Programs = append(d.Programs, &PATProgram{
- ProgramMapID: pid,
- ProgramNumber: pnr,
- })
- }
-
- return d
-}
diff --git a/vendor/github.com/asticode/go-astits/wrapping_counter.go b/vendor/github.com/asticode/go-astits/wrapping_counter.go
deleted file mode 100644
index 025bc4ffab4..00000000000
--- a/vendor/github.com/asticode/go-astits/wrapping_counter.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package astits
-
-type wrappingCounter struct {
- wrapAt int
- value int
-}
-
-func newWrappingCounter(wrapAt int) wrappingCounter {
- return wrappingCounter{
- wrapAt: wrapAt,
- }
-}
-
-// returns current counter state and increments internal value
-func (c *wrappingCounter) get() int {
- ret := c.value
- c.value++
- if c.value > c.wrapAt {
- c.value = 0
- }
- return ret
-}
diff --git a/vendor/github.com/chromedp/cdproto/.gitignore b/vendor/github.com/chromedp/cdproto/.gitignore
deleted file mode 100644
index c456f53275d..00000000000
--- a/vendor/github.com/chromedp/cdproto/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.json
-*.pdl
diff --git a/vendor/github.com/chromedp/cdproto/LICENSE b/vendor/github.com/chromedp/cdproto/LICENSE
deleted file mode 100644
index 323e87a9315..00000000000
--- a/vendor/github.com/chromedp/cdproto/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016-2021 Kenneth Shaw
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/chromedp/cdproto/README.md b/vendor/github.com/chromedp/cdproto/README.md
deleted file mode 100644
index a21f77cac6e..00000000000
--- a/vendor/github.com/chromedp/cdproto/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# About cdproto
-
-Package `cdproto` contains the generated commands, types, and events for the
-[Chrome DevTools Protocol domains][devtools-protocol].
-
-[![Unit Tests][cdproto-ci-status]][cdproto-ci]
-[![Go Reference][goref-cdproto-status]][goref-cdproto]
-
-This package is generated by the [`cdproto-gen`][cdproto-gen] command. Please
-refer to that project and to the main [`chromedp`][chromedp] project for
-information on using the commands, types, and events available here.
-
-## API
-
-Please see the [Go Reference][goref-cdproto].
-
-## Contributing
-
-If you would like to submit a change to the code in this package, please submit
-your Pull Request to the [`cdproto-gen`][cdproto-gen] project. Any Issues and
-Pull Requests submitted to this project will be closed without being reviewed.
-
-[cdproto-ci]: https://github.com/chromedp/cdproto/actions/workflows/build.yml (Build CI)
-[cdproto-ci-status]: https://github.com/chromedp/cdproto/actions/workflows/build.yml/badge.svg (Build CI)
-[cdproto-gen]: https://github.com/chromedp/cdproto-gen
-[chromedp]: https://github.com/chromedp/chromedp
-[devtools-protocol]: https://chromedevtools.github.io/devtools-protocol/
-[goref-cdproto]: https://pkg.go.dev/github.com/chromedp/cdproto
-[goref-cdproto-status]: https://pkg.go.dev/badge/github.com/chromedp/chromedp.svg
diff --git a/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go b/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go
deleted file mode 100644
index 7ac2eea0ec9..00000000000
--- a/vendor/github.com/chromedp/cdproto/accessibility/accessibility.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Package accessibility provides the Chrome DevTools Protocol
-// commands, types, and events for the Accessibility domain.
-//
-// Generated by the cdproto-gen command.
-package accessibility
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// DisableParams disables the accessibility domain.
-type DisableParams struct{}
-
-// Disable disables the accessibility domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Accessibility.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables the accessibility domain which causes AXNodeIds to
-// remain consistent between method calls. This turns on accessibility for the
-// page, which can impact performance until accessibility is disabled.
-type EnableParams struct{}
-
-// Enable enables the accessibility domain which causes AXNodeIds to remain
-// consistent between method calls. This turns on accessibility for the page,
-// which can impact performance until accessibility is disabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Accessibility.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetPartialAXTreeParams fetches the accessibility node and partial
-// accessibility tree for this DOM node, if it exists.
-type GetPartialAXTreeParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get the partial accessibility tree for.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get the partial accessibility tree for.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get the partial accessibility tree for.
- FetchRelatives bool `json:"fetchRelatives,omitempty"` // Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
-}
-
-// GetPartialAXTree fetches the accessibility node and partial accessibility
-// tree for this DOM node, if it exists.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getPartialAXTree
-//
-// parameters:
-func GetPartialAXTree() *GetPartialAXTreeParams {
- return &GetPartialAXTreeParams{}
-}
-
-// WithNodeID identifier of the node to get the partial accessibility tree
-// for.
-func (p GetPartialAXTreeParams) WithNodeID(nodeID cdp.NodeID) *GetPartialAXTreeParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node to get the partial
-// accessibility tree for.
-func (p GetPartialAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetPartialAXTreeParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper to get the partial
-// accessibility tree for.
-func (p GetPartialAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *GetPartialAXTreeParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithFetchRelatives whether to fetch this nodes ancestors, siblings and
-// children. Defaults to true.
-func (p GetPartialAXTreeParams) WithFetchRelatives(fetchRelatives bool) *GetPartialAXTreeParams {
- p.FetchRelatives = fetchRelatives
- return &p
-}
-
-// GetPartialAXTreeReturns return values.
-type GetPartialAXTreeReturns struct {
- Nodes []*Node `json:"nodes,omitempty"` // The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
-}
-
-// Do executes Accessibility.getPartialAXTree against the provided context.
-//
-// returns:
-// nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
-func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
- // execute
- var res GetPartialAXTreeReturns
- err = cdp.Execute(ctx, CommandGetPartialAXTree, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Nodes, nil
-}
-
-// GetFullAXTreeParams fetches the entire accessibility tree for the root
-// Document.
-type GetFullAXTreeParams struct {
- MaxDepth int64 `json:"max_depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
-}
-
-// GetFullAXTree fetches the entire accessibility tree for the root Document.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getFullAXTree
-//
-// parameters:
-func GetFullAXTree() *GetFullAXTreeParams {
- return &GetFullAXTreeParams{}
-}
-
-// WithMaxDepth the maximum depth at which descendants of the root node
-// should be retrieved. If omitted, the full tree is returned.
-func (p GetFullAXTreeParams) WithMaxDepth(maxDepth int64) *GetFullAXTreeParams {
- p.MaxDepth = maxDepth
- return &p
-}
-
-// GetFullAXTreeReturns return values.
-type GetFullAXTreeReturns struct {
- Nodes []*Node `json:"nodes,omitempty"`
-}
-
-// Do executes Accessibility.getFullAXTree against the provided context.
-//
-// returns:
-// nodes
-func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
- // execute
- var res GetFullAXTreeReturns
- err = cdp.Execute(ctx, CommandGetFullAXTree, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Nodes, nil
-}
-
-// GetChildAXNodesParams fetches a particular accessibility node by AXNodeId.
-// Requires enable() to have been called previously.
-type GetChildAXNodesParams struct {
- ID NodeID `json:"id"`
-}
-
-// GetChildAXNodes fetches a particular accessibility node by AXNodeId.
-// Requires enable() to have been called previously.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getChildAXNodes
-//
-// parameters:
-// id
-func GetChildAXNodes(id NodeID) *GetChildAXNodesParams {
- return &GetChildAXNodesParams{
- ID: id,
- }
-}
-
-// GetChildAXNodesReturns return values.
-type GetChildAXNodesReturns struct {
- Nodes []*Node `json:"nodes,omitempty"`
-}
-
-// Do executes Accessibility.getChildAXNodes against the provided context.
-//
-// returns:
-// nodes
-func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err error) {
- // execute
- var res GetChildAXNodesReturns
- err = cdp.Execute(ctx, CommandGetChildAXNodes, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Nodes, nil
-}
-
-// QueryAXTreeParams query a DOM node's accessibility subtree for accessible
-// name and role. This command computes the name and role for all nodes in the
-// subtree, including those that are ignored for accessibility, and returns
-// those that mactch the specified name and role. If no DOM node is specified,
-// or the DOM node does not exist, the command returns an error. If neither
-// accessibleName or role is specified, it returns all the accessibility nodes
-// in the subtree.
-type QueryAXTreeParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node for the root to query.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node for the root to query.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper for the root to query.
- AccessibleName string `json:"accessibleName,omitempty"` // Find nodes with this computed name.
- Role string `json:"role,omitempty"` // Find nodes with this computed role.
-}
-
-// QueryAXTree query a DOM node's accessibility subtree for accessible name
-// and role. This command computes the name and role for all nodes in the
-// subtree, including those that are ignored for accessibility, and returns
-// those that mactch the specified name and role. If no DOM node is specified,
-// or the DOM node does not exist, the command returns an error. If neither
-// accessibleName or role is specified, it returns all the accessibility nodes
-// in the subtree.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-queryAXTree
-//
-// parameters:
-func QueryAXTree() *QueryAXTreeParams {
- return &QueryAXTreeParams{}
-}
-
-// WithNodeID identifier of the node for the root to query.
-func (p QueryAXTreeParams) WithNodeID(nodeID cdp.NodeID) *QueryAXTreeParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node for the root to query.
-func (p QueryAXTreeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *QueryAXTreeParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper for the root to
-// query.
-func (p QueryAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *QueryAXTreeParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithAccessibleName find nodes with this computed name.
-func (p QueryAXTreeParams) WithAccessibleName(accessibleName string) *QueryAXTreeParams {
- p.AccessibleName = accessibleName
- return &p
-}
-
-// WithRole find nodes with this computed role.
-func (p QueryAXTreeParams) WithRole(role string) *QueryAXTreeParams {
- p.Role = role
- return &p
-}
-
-// QueryAXTreeReturns return values.
-type QueryAXTreeReturns struct {
- Nodes []*Node `json:"nodes,omitempty"` // A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
-}
-
-// Do executes Accessibility.queryAXTree against the provided context.
-//
-// returns:
-// nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
-func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
- // execute
- var res QueryAXTreeReturns
- err = cdp.Execute(ctx, CommandQueryAXTree, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Nodes, nil
-}
-
-// Command names.
-const (
- CommandDisable = "Accessibility.disable"
- CommandEnable = "Accessibility.enable"
- CommandGetPartialAXTree = "Accessibility.getPartialAXTree"
- CommandGetFullAXTree = "Accessibility.getFullAXTree"
- CommandGetChildAXNodes = "Accessibility.getChildAXNodes"
- CommandQueryAXTree = "Accessibility.queryAXTree"
-)
diff --git a/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go b/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go
deleted file mode 100644
index cf868d2873a..00000000000
--- a/vendor/github.com/chromedp/cdproto/accessibility/easyjson.go
+++ /dev/null
@@ -1,1682 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package accessibility
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(in *jlexer.Lexer, out *ValueSource) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(Value)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- case "attribute":
- out.Attribute = string(in.String())
- case "attributeValue":
- if in.IsNull() {
- in.Skip()
- out.AttributeValue = nil
- } else {
- if out.AttributeValue == nil {
- out.AttributeValue = new(Value)
- }
- (*out.AttributeValue).UnmarshalEasyJSON(in)
- }
- case "superseded":
- out.Superseded = bool(in.Bool())
- case "nativeSource":
- (out.NativeSource).UnmarshalEasyJSON(in)
- case "nativeSourceValue":
- if in.IsNull() {
- in.Skip()
- out.NativeSourceValue = nil
- } else {
- if out.NativeSourceValue == nil {
- out.NativeSourceValue = new(Value)
- }
- (*out.NativeSourceValue).UnmarshalEasyJSON(in)
- }
- case "invalid":
- out.Invalid = bool(in.Bool())
- case "invalidReason":
- out.InvalidReason = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(out *jwriter.Writer, in ValueSource) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Value != nil {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (*in.Value).MarshalEasyJSON(out)
- }
- if in.Attribute != "" {
- const prefix string = ",\"attribute\":"
- out.RawString(prefix)
- out.String(string(in.Attribute))
- }
- if in.AttributeValue != nil {
- const prefix string = ",\"attributeValue\":"
- out.RawString(prefix)
- (*in.AttributeValue).MarshalEasyJSON(out)
- }
- if in.Superseded {
- const prefix string = ",\"superseded\":"
- out.RawString(prefix)
- out.Bool(bool(in.Superseded))
- }
- if in.NativeSource != "" {
- const prefix string = ",\"nativeSource\":"
- out.RawString(prefix)
- (in.NativeSource).MarshalEasyJSON(out)
- }
- if in.NativeSourceValue != nil {
- const prefix string = ",\"nativeSourceValue\":"
- out.RawString(prefix)
- (*in.NativeSourceValue).MarshalEasyJSON(out)
- }
- if in.Invalid {
- const prefix string = ",\"invalid\":"
- out.RawString(prefix)
- out.Bool(bool(in.Invalid))
- }
- if in.InvalidReason != "" {
- const prefix string = ",\"invalidReason\":"
- out.RawString(prefix)
- out.String(string(in.InvalidReason))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ValueSource) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ValueSource) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ValueSource) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ValueSource) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(in *jlexer.Lexer, out *Value) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "value":
- (out.Value).UnmarshalEasyJSON(in)
- case "relatedNodes":
- if in.IsNull() {
- in.Skip()
- out.RelatedNodes = nil
- } else {
- in.Delim('[')
- if out.RelatedNodes == nil {
- if !in.IsDelim(']') {
- out.RelatedNodes = make([]*RelatedNode, 0, 8)
- } else {
- out.RelatedNodes = []*RelatedNode{}
- }
- } else {
- out.RelatedNodes = (out.RelatedNodes)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *RelatedNode
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(RelatedNode)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.RelatedNodes = append(out.RelatedNodes, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "sources":
- if in.IsNull() {
- in.Skip()
- out.Sources = nil
- } else {
- in.Delim('[')
- if out.Sources == nil {
- if !in.IsDelim(']') {
- out.Sources = make([]*ValueSource, 0, 8)
- } else {
- out.Sources = []*ValueSource{}
- }
- } else {
- out.Sources = (out.Sources)[:0]
- }
- for !in.IsDelim(']') {
- var v2 *ValueSource
- if in.IsNull() {
- in.Skip()
- v2 = nil
- } else {
- if v2 == nil {
- v2 = new(ValueSource)
- }
- (*v2).UnmarshalEasyJSON(in)
- }
- out.Sources = append(out.Sources, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(out *jwriter.Writer, in Value) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if (in.Value).IsDefined() {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (in.Value).MarshalEasyJSON(out)
- }
- if len(in.RelatedNodes) != 0 {
- const prefix string = ",\"relatedNodes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v3, v4 := range in.RelatedNodes {
- if v3 > 0 {
- out.RawByte(',')
- }
- if v4 == nil {
- out.RawString("null")
- } else {
- (*v4).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Sources) != 0 {
- const prefix string = ",\"sources\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v5, v6 := range in.Sources {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Value) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Value) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Value) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(in *jlexer.Lexer, out *RelatedNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backendDOMNodeId":
- (out.BackendDOMNodeID).UnmarshalEasyJSON(in)
- case "idref":
- out.Idref = string(in.String())
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(out *jwriter.Writer, in RelatedNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"backendDOMNodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.BackendDOMNodeID))
- }
- if in.Idref != "" {
- const prefix string = ",\"idref\":"
- out.RawString(prefix)
- out.String(string(in.Idref))
- }
- if in.Text != "" {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RelatedNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RelatedNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RelatedNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RelatedNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(in *jlexer.Lexer, out *QueryAXTreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*Node, 0, 8)
- } else {
- out.Nodes = []*Node{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Node
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Node)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(out *jwriter.Writer, in QueryAXTreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Nodes) != 0 {
- const prefix string = ",\"nodes\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Nodes {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QueryAXTreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QueryAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QueryAXTreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QueryAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(in *jlexer.Lexer, out *QueryAXTreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "accessibleName":
- out.AccessibleName = string(in.String())
- case "role":
- out.Role = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(out *jwriter.Writer, in QueryAXTreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- if in.AccessibleName != "" {
- const prefix string = ",\"accessibleName\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.AccessibleName))
- }
- if in.Role != "" {
- const prefix string = ",\"role\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Role))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QueryAXTreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QueryAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QueryAXTreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QueryAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(in *jlexer.Lexer, out *Property) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- (out.Name).UnmarshalEasyJSON(in)
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(Value)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(out *jwriter.Writer, in Property) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- (in.Name).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil {
- out.RawString("null")
- } else {
- (*in.Value).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Property) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Property) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Property) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(in *jlexer.Lexer, out *Node) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- out.NodeID = NodeID(in.String())
- case "ignored":
- out.Ignored = bool(in.Bool())
- case "ignoredReasons":
- if in.IsNull() {
- in.Skip()
- out.IgnoredReasons = nil
- } else {
- in.Delim('[')
- if out.IgnoredReasons == nil {
- if !in.IsDelim(']') {
- out.IgnoredReasons = make([]*Property, 0, 8)
- } else {
- out.IgnoredReasons = []*Property{}
- }
- } else {
- out.IgnoredReasons = (out.IgnoredReasons)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *Property
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(Property)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.IgnoredReasons = append(out.IgnoredReasons, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "role":
- if in.IsNull() {
- in.Skip()
- out.Role = nil
- } else {
- if out.Role == nil {
- out.Role = new(Value)
- }
- (*out.Role).UnmarshalEasyJSON(in)
- }
- case "name":
- if in.IsNull() {
- in.Skip()
- out.Name = nil
- } else {
- if out.Name == nil {
- out.Name = new(Value)
- }
- (*out.Name).UnmarshalEasyJSON(in)
- }
- case "description":
- if in.IsNull() {
- in.Skip()
- out.Description = nil
- } else {
- if out.Description == nil {
- out.Description = new(Value)
- }
- (*out.Description).UnmarshalEasyJSON(in)
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(Value)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- case "properties":
- if in.IsNull() {
- in.Skip()
- out.Properties = nil
- } else {
- in.Delim('[')
- if out.Properties == nil {
- if !in.IsDelim(']') {
- out.Properties = make([]*Property, 0, 8)
- } else {
- out.Properties = []*Property{}
- }
- } else {
- out.Properties = (out.Properties)[:0]
- }
- for !in.IsDelim(']') {
- var v11 *Property
- if in.IsNull() {
- in.Skip()
- v11 = nil
- } else {
- if v11 == nil {
- v11 = new(Property)
- }
- (*v11).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v11)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "childIds":
- if in.IsNull() {
- in.Skip()
- out.ChildIds = nil
- } else {
- in.Delim('[')
- if out.ChildIds == nil {
- if !in.IsDelim(']') {
- out.ChildIds = make([]NodeID, 0, 4)
- } else {
- out.ChildIds = []NodeID{}
- }
- } else {
- out.ChildIds = (out.ChildIds)[:0]
- }
- for !in.IsDelim(']') {
- var v12 NodeID
- v12 = NodeID(in.String())
- out.ChildIds = append(out.ChildIds, v12)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "backendDOMNodeId":
- (out.BackendDOMNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(out *jwriter.Writer, in Node) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.String(string(in.NodeID))
- }
- {
- const prefix string = ",\"ignored\":"
- out.RawString(prefix)
- out.Bool(bool(in.Ignored))
- }
- if len(in.IgnoredReasons) != 0 {
- const prefix string = ",\"ignoredReasons\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v13, v14 := range in.IgnoredReasons {
- if v13 > 0 {
- out.RawByte(',')
- }
- if v14 == nil {
- out.RawString("null")
- } else {
- (*v14).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Role != nil {
- const prefix string = ",\"role\":"
- out.RawString(prefix)
- (*in.Role).MarshalEasyJSON(out)
- }
- if in.Name != nil {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- (*in.Name).MarshalEasyJSON(out)
- }
- if in.Description != nil {
- const prefix string = ",\"description\":"
- out.RawString(prefix)
- (*in.Description).MarshalEasyJSON(out)
- }
- if in.Value != nil {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (*in.Value).MarshalEasyJSON(out)
- }
- if len(in.Properties) != 0 {
- const prefix string = ",\"properties\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v15, v16 := range in.Properties {
- if v15 > 0 {
- out.RawByte(',')
- }
- if v16 == nil {
- out.RawString("null")
- } else {
- (*v16).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ChildIds) != 0 {
- const prefix string = ",\"childIds\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v17, v18 := range in.ChildIds {
- if v17 > 0 {
- out.RawByte(',')
- }
- out.String(string(v18))
- }
- out.RawByte(']')
- }
- }
- if in.BackendDOMNodeID != 0 {
- const prefix string = ",\"backendDOMNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendDOMNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Node) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Node) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Node) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(in *jlexer.Lexer, out *GetPartialAXTreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*Node, 0, 8)
- } else {
- out.Nodes = []*Node{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *Node
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(Node)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(out *jwriter.Writer, in GetPartialAXTreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Nodes) != 0 {
- const prefix string = ",\"nodes\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v20, v21 := range in.Nodes {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPartialAXTreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPartialAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPartialAXTreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPartialAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(in *jlexer.Lexer, out *GetPartialAXTreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "fetchRelatives":
- out.FetchRelatives = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(out *jwriter.Writer, in GetPartialAXTreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- if in.FetchRelatives {
- const prefix string = ",\"fetchRelatives\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.FetchRelatives))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPartialAXTreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPartialAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPartialAXTreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPartialAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(in *jlexer.Lexer, out *GetFullAXTreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*Node, 0, 8)
- } else {
- out.Nodes = []*Node{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *Node
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(Node)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(out *jwriter.Writer, in GetFullAXTreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Nodes) != 0 {
- const prefix string = ",\"nodes\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v23, v24 := range in.Nodes {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFullAXTreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFullAXTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFullAXTreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFullAXTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(in *jlexer.Lexer, out *GetFullAXTreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "max_depth":
- out.MaxDepth = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(out *jwriter.Writer, in GetFullAXTreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.MaxDepth != 0 {
- const prefix string = ",\"max_depth\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.MaxDepth))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFullAXTreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFullAXTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFullAXTreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFullAXTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(in *jlexer.Lexer, out *GetChildAXNodesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*Node, 0, 8)
- } else {
- out.Nodes = []*Node{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v25 *Node
- if in.IsNull() {
- in.Skip()
- v25 = nil
- } else {
- if v25 == nil {
- v25 = new(Node)
- }
- (*v25).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(out *jwriter.Writer, in GetChildAXNodesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Nodes) != 0 {
- const prefix string = ",\"nodes\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v26, v27 := range in.Nodes {
- if v26 > 0 {
- out.RawByte(',')
- }
- if v27 == nil {
- out.RawString("null")
- } else {
- (*v27).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetChildAXNodesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetChildAXNodesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetChildAXNodesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetChildAXNodesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(in *jlexer.Lexer, out *GetChildAXNodesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = NodeID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(out *jwriter.Writer, in GetChildAXNodesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetChildAXNodesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetChildAXNodesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetChildAXNodesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetChildAXNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAccessibility14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAccessibility14(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/accessibility/types.go b/vendor/github.com/chromedp/cdproto/accessibility/types.go
deleted file mode 100644
index 655fc11c989..00000000000
--- a/vendor/github.com/chromedp/cdproto/accessibility/types.go
+++ /dev/null
@@ -1,451 +0,0 @@
-package accessibility
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// NodeID unique accessibility node identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNodeId
-type NodeID string
-
-// String returns the NodeID as string value.
-func (t NodeID) String() string {
- return string(t)
-}
-
-// ValueType enum of possible property types.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueType
-type ValueType string
-
-// String returns the ValueType as string value.
-func (t ValueType) String() string {
- return string(t)
-}
-
-// ValueType values.
-const (
- ValueTypeBoolean ValueType = "boolean"
- ValueTypeTristate ValueType = "tristate"
- ValueTypeBooleanOrUndefined ValueType = "booleanOrUndefined"
- ValueTypeIdref ValueType = "idref"
- ValueTypeIdrefList ValueType = "idrefList"
- ValueTypeInteger ValueType = "integer"
- ValueTypeNode ValueType = "node"
- ValueTypeNodeList ValueType = "nodeList"
- ValueTypeNumber ValueType = "number"
- ValueTypeString ValueType = "string"
- ValueTypeComputedString ValueType = "computedString"
- ValueTypeToken ValueType = "token"
- ValueTypeTokenList ValueType = "tokenList"
- ValueTypeDomRelation ValueType = "domRelation"
- ValueTypeRole ValueType = "role"
- ValueTypeInternalRole ValueType = "internalRole"
- ValueTypeValueUndefined ValueType = "valueUndefined"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ValueType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ValueType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ValueType(in.String()) {
- case ValueTypeBoolean:
- *t = ValueTypeBoolean
- case ValueTypeTristate:
- *t = ValueTypeTristate
- case ValueTypeBooleanOrUndefined:
- *t = ValueTypeBooleanOrUndefined
- case ValueTypeIdref:
- *t = ValueTypeIdref
- case ValueTypeIdrefList:
- *t = ValueTypeIdrefList
- case ValueTypeInteger:
- *t = ValueTypeInteger
- case ValueTypeNode:
- *t = ValueTypeNode
- case ValueTypeNodeList:
- *t = ValueTypeNodeList
- case ValueTypeNumber:
- *t = ValueTypeNumber
- case ValueTypeString:
- *t = ValueTypeString
- case ValueTypeComputedString:
- *t = ValueTypeComputedString
- case ValueTypeToken:
- *t = ValueTypeToken
- case ValueTypeTokenList:
- *t = ValueTypeTokenList
- case ValueTypeDomRelation:
- *t = ValueTypeDomRelation
- case ValueTypeRole:
- *t = ValueTypeRole
- case ValueTypeInternalRole:
- *t = ValueTypeInternalRole
- case ValueTypeValueUndefined:
- *t = ValueTypeValueUndefined
-
- default:
- in.AddError(errors.New("unknown ValueType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ValueType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ValueSourceType enum of possible property sources.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSourceType
-type ValueSourceType string
-
-// String returns the ValueSourceType as string value.
-func (t ValueSourceType) String() string {
- return string(t)
-}
-
-// ValueSourceType values.
-const (
- ValueSourceTypeAttribute ValueSourceType = "attribute"
- ValueSourceTypeImplicit ValueSourceType = "implicit"
- ValueSourceTypeStyle ValueSourceType = "style"
- ValueSourceTypeContents ValueSourceType = "contents"
- ValueSourceTypePlaceholder ValueSourceType = "placeholder"
- ValueSourceTypeRelatedElement ValueSourceType = "relatedElement"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ValueSourceType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ValueSourceType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ValueSourceType(in.String()) {
- case ValueSourceTypeAttribute:
- *t = ValueSourceTypeAttribute
- case ValueSourceTypeImplicit:
- *t = ValueSourceTypeImplicit
- case ValueSourceTypeStyle:
- *t = ValueSourceTypeStyle
- case ValueSourceTypeContents:
- *t = ValueSourceTypeContents
- case ValueSourceTypePlaceholder:
- *t = ValueSourceTypePlaceholder
- case ValueSourceTypeRelatedElement:
- *t = ValueSourceTypeRelatedElement
-
- default:
- in.AddError(errors.New("unknown ValueSourceType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ValueSourceType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ValueNativeSourceType enum of possible native property sources (as a
-// subtype of a particular AXValueSourceType).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueNativeSourceType
-type ValueNativeSourceType string
-
-// String returns the ValueNativeSourceType as string value.
-func (t ValueNativeSourceType) String() string {
- return string(t)
-}
-
-// ValueNativeSourceType values.
-const (
- ValueNativeSourceTypeFigcaption ValueNativeSourceType = "figcaption"
- ValueNativeSourceTypeLabel ValueNativeSourceType = "label"
- ValueNativeSourceTypeLabelfor ValueNativeSourceType = "labelfor"
- ValueNativeSourceTypeLabelwrapped ValueNativeSourceType = "labelwrapped"
- ValueNativeSourceTypeLegend ValueNativeSourceType = "legend"
- ValueNativeSourceTypeRubyannotation ValueNativeSourceType = "rubyannotation"
- ValueNativeSourceTypeTablecaption ValueNativeSourceType = "tablecaption"
- ValueNativeSourceTypeTitle ValueNativeSourceType = "title"
- ValueNativeSourceTypeOther ValueNativeSourceType = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ValueNativeSourceType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ValueNativeSourceType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ValueNativeSourceType(in.String()) {
- case ValueNativeSourceTypeFigcaption:
- *t = ValueNativeSourceTypeFigcaption
- case ValueNativeSourceTypeLabel:
- *t = ValueNativeSourceTypeLabel
- case ValueNativeSourceTypeLabelfor:
- *t = ValueNativeSourceTypeLabelfor
- case ValueNativeSourceTypeLabelwrapped:
- *t = ValueNativeSourceTypeLabelwrapped
- case ValueNativeSourceTypeLegend:
- *t = ValueNativeSourceTypeLegend
- case ValueNativeSourceTypeRubyannotation:
- *t = ValueNativeSourceTypeRubyannotation
- case ValueNativeSourceTypeTablecaption:
- *t = ValueNativeSourceTypeTablecaption
- case ValueNativeSourceTypeTitle:
- *t = ValueNativeSourceTypeTitle
- case ValueNativeSourceTypeOther:
- *t = ValueNativeSourceTypeOther
-
- default:
- in.AddError(errors.New("unknown ValueNativeSourceType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ValueNativeSourceType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ValueSource a single source for a computed AX property.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValueSource
-type ValueSource struct {
- Type ValueSourceType `json:"type"` // What type of source this is.
- Value *Value `json:"value,omitempty"` // The value of this property source.
- Attribute string `json:"attribute,omitempty"` // The name of the relevant attribute, if any.
- AttributeValue *Value `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any.
- Superseded bool `json:"superseded,omitempty"` // Whether this source is superseded by a higher priority source.
- NativeSource ValueNativeSourceType `json:"nativeSource,omitempty"` // The native markup source for this value, e.g. a element.
- NativeSourceValue *Value `json:"nativeSourceValue,omitempty"` // The value, such as a node or node list, of the native source.
- Invalid bool `json:"invalid,omitempty"` // Whether the value for this property is invalid.
- InvalidReason string `json:"invalidReason,omitempty"` // Reason for the value being invalid, if it is.
-}
-
-// RelatedNode [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXRelatedNode
-type RelatedNode struct {
- BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node.
- Idref string `json:"idref,omitempty"` // The IDRef value provided, if any.
- Text string `json:"text,omitempty"` // The text alternative of this node in the current context.
-}
-
-// Property [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXProperty
-type Property struct {
- Name PropertyName `json:"name"` // The name of this property.
- Value *Value `json:"value"` // The value of this property.
-}
-
-// Value a single computed AX property.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXValue
-type Value struct {
- Type ValueType `json:"type"` // The type of this value.
- Value easyjson.RawMessage `json:"value,omitempty"` // The computed value of this property.
- RelatedNodes []*RelatedNode `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable.
- Sources []*ValueSource `json:"sources,omitempty"` // The sources which contributed to the computation of this property.
-}
-
-// PropertyName values of AXProperty name: - from 'busy' to
-// 'roledescription': states which apply to every AX node - from 'live' to
-// 'root': attributes which apply to nodes in live regions - from 'autocomplete'
-// to 'valuetext': attributes which apply to widgets - from 'checked' to
-// 'selected': states which apply to widgets - from 'activedescendant' to 'owns'
-// - relationships between elements other than parent/child/sibling.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXPropertyName
-type PropertyName string
-
-// String returns the PropertyName as string value.
-func (t PropertyName) String() string {
- return string(t)
-}
-
-// PropertyName values.
-const (
- PropertyNameBusy PropertyName = "busy"
- PropertyNameDisabled PropertyName = "disabled"
- PropertyNameEditable PropertyName = "editable"
- PropertyNameFocusable PropertyName = "focusable"
- PropertyNameFocused PropertyName = "focused"
- PropertyNameHidden PropertyName = "hidden"
- PropertyNameHiddenRoot PropertyName = "hiddenRoot"
- PropertyNameInvalid PropertyName = "invalid"
- PropertyNameKeyshortcuts PropertyName = "keyshortcuts"
- PropertyNameSettable PropertyName = "settable"
- PropertyNameRoledescription PropertyName = "roledescription"
- PropertyNameLive PropertyName = "live"
- PropertyNameAtomic PropertyName = "atomic"
- PropertyNameRelevant PropertyName = "relevant"
- PropertyNameRoot PropertyName = "root"
- PropertyNameAutocomplete PropertyName = "autocomplete"
- PropertyNameHasPopup PropertyName = "hasPopup"
- PropertyNameLevel PropertyName = "level"
- PropertyNameMultiselectable PropertyName = "multiselectable"
- PropertyNameOrientation PropertyName = "orientation"
- PropertyNameMultiline PropertyName = "multiline"
- PropertyNameReadonly PropertyName = "readonly"
- PropertyNameRequired PropertyName = "required"
- PropertyNameValuemin PropertyName = "valuemin"
- PropertyNameValuemax PropertyName = "valuemax"
- PropertyNameValuetext PropertyName = "valuetext"
- PropertyNameChecked PropertyName = "checked"
- PropertyNameExpanded PropertyName = "expanded"
- PropertyNameModal PropertyName = "modal"
- PropertyNamePressed PropertyName = "pressed"
- PropertyNameSelected PropertyName = "selected"
- PropertyNameActivedescendant PropertyName = "activedescendant"
- PropertyNameControls PropertyName = "controls"
- PropertyNameDescribedby PropertyName = "describedby"
- PropertyNameDetails PropertyName = "details"
- PropertyNameErrormessage PropertyName = "errormessage"
- PropertyNameFlowto PropertyName = "flowto"
- PropertyNameLabelledby PropertyName = "labelledby"
- PropertyNameOwns PropertyName = "owns"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PropertyName) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PropertyName) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PropertyName(in.String()) {
- case PropertyNameBusy:
- *t = PropertyNameBusy
- case PropertyNameDisabled:
- *t = PropertyNameDisabled
- case PropertyNameEditable:
- *t = PropertyNameEditable
- case PropertyNameFocusable:
- *t = PropertyNameFocusable
- case PropertyNameFocused:
- *t = PropertyNameFocused
- case PropertyNameHidden:
- *t = PropertyNameHidden
- case PropertyNameHiddenRoot:
- *t = PropertyNameHiddenRoot
- case PropertyNameInvalid:
- *t = PropertyNameInvalid
- case PropertyNameKeyshortcuts:
- *t = PropertyNameKeyshortcuts
- case PropertyNameSettable:
- *t = PropertyNameSettable
- case PropertyNameRoledescription:
- *t = PropertyNameRoledescription
- case PropertyNameLive:
- *t = PropertyNameLive
- case PropertyNameAtomic:
- *t = PropertyNameAtomic
- case PropertyNameRelevant:
- *t = PropertyNameRelevant
- case PropertyNameRoot:
- *t = PropertyNameRoot
- case PropertyNameAutocomplete:
- *t = PropertyNameAutocomplete
- case PropertyNameHasPopup:
- *t = PropertyNameHasPopup
- case PropertyNameLevel:
- *t = PropertyNameLevel
- case PropertyNameMultiselectable:
- *t = PropertyNameMultiselectable
- case PropertyNameOrientation:
- *t = PropertyNameOrientation
- case PropertyNameMultiline:
- *t = PropertyNameMultiline
- case PropertyNameReadonly:
- *t = PropertyNameReadonly
- case PropertyNameRequired:
- *t = PropertyNameRequired
- case PropertyNameValuemin:
- *t = PropertyNameValuemin
- case PropertyNameValuemax:
- *t = PropertyNameValuemax
- case PropertyNameValuetext:
- *t = PropertyNameValuetext
- case PropertyNameChecked:
- *t = PropertyNameChecked
- case PropertyNameExpanded:
- *t = PropertyNameExpanded
- case PropertyNameModal:
- *t = PropertyNameModal
- case PropertyNamePressed:
- *t = PropertyNamePressed
- case PropertyNameSelected:
- *t = PropertyNameSelected
- case PropertyNameActivedescendant:
- *t = PropertyNameActivedescendant
- case PropertyNameControls:
- *t = PropertyNameControls
- case PropertyNameDescribedby:
- *t = PropertyNameDescribedby
- case PropertyNameDetails:
- *t = PropertyNameDetails
- case PropertyNameErrormessage:
- *t = PropertyNameErrormessage
- case PropertyNameFlowto:
- *t = PropertyNameFlowto
- case PropertyNameLabelledby:
- *t = PropertyNameLabelledby
- case PropertyNameOwns:
- *t = PropertyNameOwns
-
- default:
- in.AddError(errors.New("unknown PropertyName value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PropertyName) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Node a node in the accessibility tree.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#type-AXNode
-type Node struct {
- NodeID NodeID `json:"nodeId"` // Unique identifier for this node.
- Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility
- IgnoredReasons []*Property `json:"ignoredReasons,omitempty"` // Collection of reasons why this node is hidden.
- Role *Value `json:"role,omitempty"` // This Node's role, whether explicit or implicit.
- Name *Value `json:"name,omitempty"` // The accessible name for this Node.
- Description *Value `json:"description,omitempty"` // The accessible description for this Node.
- Value *Value `json:"value,omitempty"` // The value for this Node.
- Properties []*Property `json:"properties,omitempty"` // All other properties
- ChildIds []NodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes.
- BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any.
-}
diff --git a/vendor/github.com/chromedp/cdproto/animation/animation.go b/vendor/github.com/chromedp/cdproto/animation/animation.go
deleted file mode 100644
index dd6f126e7f1..00000000000
--- a/vendor/github.com/chromedp/cdproto/animation/animation.go
+++ /dev/null
@@ -1,288 +0,0 @@
-// Package animation provides the Chrome DevTools Protocol
-// commands, types, and events for the Animation domain.
-//
-// Generated by the cdproto-gen command.
-package animation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// DisableParams disables animation domain notifications.
-type DisableParams struct{}
-
-// Disable disables animation domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Animation.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables animation domain notifications.
-type EnableParams struct{}
-
-// Enable enables animation domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Animation.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetCurrentTimeParams returns the current time of the an animation.
-type GetCurrentTimeParams struct {
- ID string `json:"id"` // Id of animation.
-}
-
-// GetCurrentTime returns the current time of the an animation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getCurrentTime
-//
-// parameters:
-// id - Id of animation.
-func GetCurrentTime(id string) *GetCurrentTimeParams {
- return &GetCurrentTimeParams{
- ID: id,
- }
-}
-
-// GetCurrentTimeReturns return values.
-type GetCurrentTimeReturns struct {
- CurrentTime float64 `json:"currentTime,omitempty"` // Current time of the page.
-}
-
-// Do executes Animation.getCurrentTime against the provided context.
-//
-// returns:
-// currentTime - Current time of the page.
-func (p *GetCurrentTimeParams) Do(ctx context.Context) (currentTime float64, err error) {
- // execute
- var res GetCurrentTimeReturns
- err = cdp.Execute(ctx, CommandGetCurrentTime, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.CurrentTime, nil
-}
-
-// GetPlaybackRateParams gets the playback rate of the document timeline.
-type GetPlaybackRateParams struct{}
-
-// GetPlaybackRate gets the playback rate of the document timeline.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getPlaybackRate
-func GetPlaybackRate() *GetPlaybackRateParams {
- return &GetPlaybackRateParams{}
-}
-
-// GetPlaybackRateReturns return values.
-type GetPlaybackRateReturns struct {
- PlaybackRate float64 `json:"playbackRate,omitempty"` // Playback rate for animations on page.
-}
-
-// Do executes Animation.getPlaybackRate against the provided context.
-//
-// returns:
-// playbackRate - Playback rate for animations on page.
-func (p *GetPlaybackRateParams) Do(ctx context.Context) (playbackRate float64, err error) {
- // execute
- var res GetPlaybackRateReturns
- err = cdp.Execute(ctx, CommandGetPlaybackRate, nil, &res)
- if err != nil {
- return 0, err
- }
-
- return res.PlaybackRate, nil
-}
-
-// ReleaseAnimationsParams releases a set of animations to no longer be
-// manipulated.
-type ReleaseAnimationsParams struct {
- Animations []string `json:"animations"` // List of animation ids to seek.
-}
-
-// ReleaseAnimations releases a set of animations to no longer be
-// manipulated.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-releaseAnimations
-//
-// parameters:
-// animations - List of animation ids to seek.
-func ReleaseAnimations(animations []string) *ReleaseAnimationsParams {
- return &ReleaseAnimationsParams{
- Animations: animations,
- }
-}
-
-// Do executes Animation.releaseAnimations against the provided context.
-func (p *ReleaseAnimationsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReleaseAnimations, p, nil)
-}
-
-// ResolveAnimationParams gets the remote object of the Animation.
-type ResolveAnimationParams struct {
- AnimationID string `json:"animationId"` // Animation id.
-}
-
-// ResolveAnimation gets the remote object of the Animation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-resolveAnimation
-//
-// parameters:
-// animationID - Animation id.
-func ResolveAnimation(animationID string) *ResolveAnimationParams {
- return &ResolveAnimationParams{
- AnimationID: animationID,
- }
-}
-
-// ResolveAnimationReturns return values.
-type ResolveAnimationReturns struct {
- RemoteObject *runtime.RemoteObject `json:"remoteObject,omitempty"` // Corresponding remote object.
-}
-
-// Do executes Animation.resolveAnimation against the provided context.
-//
-// returns:
-// remoteObject - Corresponding remote object.
-func (p *ResolveAnimationParams) Do(ctx context.Context) (remoteObject *runtime.RemoteObject, err error) {
- // execute
- var res ResolveAnimationReturns
- err = cdp.Execute(ctx, CommandResolveAnimation, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.RemoteObject, nil
-}
-
-// SeekAnimationsParams seek a set of animations to a particular time within
-// each animation.
-type SeekAnimationsParams struct {
- Animations []string `json:"animations"` // List of animation ids to seek.
- CurrentTime float64 `json:"currentTime"` // Set the current time of each animation.
-}
-
-// SeekAnimations seek a set of animations to a particular time within each
-// animation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-seekAnimations
-//
-// parameters:
-// animations - List of animation ids to seek.
-// currentTime - Set the current time of each animation.
-func SeekAnimations(animations []string, currentTime float64) *SeekAnimationsParams {
- return &SeekAnimationsParams{
- Animations: animations,
- CurrentTime: currentTime,
- }
-}
-
-// Do executes Animation.seekAnimations against the provided context.
-func (p *SeekAnimationsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSeekAnimations, p, nil)
-}
-
-// SetPausedParams sets the paused state of a set of animations.
-type SetPausedParams struct {
- Animations []string `json:"animations"` // Animations to set the pause state of.
- Paused bool `json:"paused"` // Paused state to set to.
-}
-
-// SetPaused sets the paused state of a set of animations.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPaused
-//
-// parameters:
-// animations - Animations to set the pause state of.
-// paused - Paused state to set to.
-func SetPaused(animations []string, paused bool) *SetPausedParams {
- return &SetPausedParams{
- Animations: animations,
- Paused: paused,
- }
-}
-
-// Do executes Animation.setPaused against the provided context.
-func (p *SetPausedParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPaused, p, nil)
-}
-
-// SetPlaybackRateParams sets the playback rate of the document timeline.
-type SetPlaybackRateParams struct {
- PlaybackRate float64 `json:"playbackRate"` // Playback rate for animations on page
-}
-
-// SetPlaybackRate sets the playback rate of the document timeline.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPlaybackRate
-//
-// parameters:
-// playbackRate - Playback rate for animations on page
-func SetPlaybackRate(playbackRate float64) *SetPlaybackRateParams {
- return &SetPlaybackRateParams{
- PlaybackRate: playbackRate,
- }
-}
-
-// Do executes Animation.setPlaybackRate against the provided context.
-func (p *SetPlaybackRateParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPlaybackRate, p, nil)
-}
-
-// SetTimingParams sets the timing of an animation node.
-type SetTimingParams struct {
- AnimationID string `json:"animationId"` // Animation id.
- Duration float64 `json:"duration"` // Duration of the animation.
- Delay float64 `json:"delay"` // Delay of the animation.
-}
-
-// SetTiming sets the timing of an animation node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setTiming
-//
-// parameters:
-// animationID - Animation id.
-// duration - Duration of the animation.
-// delay - Delay of the animation.
-func SetTiming(animationID string, duration float64, delay float64) *SetTimingParams {
- return &SetTimingParams{
- AnimationID: animationID,
- Duration: duration,
- Delay: delay,
- }
-}
-
-// Do executes Animation.setTiming against the provided context.
-func (p *SetTimingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetTiming, p, nil)
-}
-
-// Command names.
-const (
- CommandDisable = "Animation.disable"
- CommandEnable = "Animation.enable"
- CommandGetCurrentTime = "Animation.getCurrentTime"
- CommandGetPlaybackRate = "Animation.getPlaybackRate"
- CommandReleaseAnimations = "Animation.releaseAnimations"
- CommandResolveAnimation = "Animation.resolveAnimation"
- CommandSeekAnimations = "Animation.seekAnimations"
- CommandSetPaused = "Animation.setPaused"
- CommandSetPlaybackRate = "Animation.setPlaybackRate"
- CommandSetTiming = "Animation.setTiming"
-)
diff --git a/vendor/github.com/chromedp/cdproto/animation/easyjson.go b/vendor/github.com/chromedp/cdproto/animation/easyjson.go
deleted file mode 100644
index a1f459343ac..00000000000
--- a/vendor/github.com/chromedp/cdproto/animation/easyjson.go
+++ /dev/null
@@ -1,1672 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package animation
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation(in *jlexer.Lexer, out *SetTimingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animationId":
- out.AnimationID = string(in.String())
- case "duration":
- out.Duration = float64(in.Float64())
- case "delay":
- out.Delay = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation(out *jwriter.Writer, in SetTimingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animationId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AnimationID))
- }
- {
- const prefix string = ",\"duration\":"
- out.RawString(prefix)
- out.Float64(float64(in.Duration))
- }
- {
- const prefix string = ",\"delay\":"
- out.RawString(prefix)
- out.Float64(float64(in.Delay))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetTimingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetTimingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetTimingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetTimingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation1(in *jlexer.Lexer, out *SetPlaybackRateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playbackRate":
- out.PlaybackRate = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation1(out *jwriter.Writer, in SetPlaybackRateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playbackRate\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.PlaybackRate))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPlaybackRateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPlaybackRateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation2(in *jlexer.Lexer, out *SetPausedParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animations":
- if in.IsNull() {
- in.Skip()
- out.Animations = nil
- } else {
- in.Delim('[')
- if out.Animations == nil {
- if !in.IsDelim(']') {
- out.Animations = make([]string, 0, 4)
- } else {
- out.Animations = []string{}
- }
- } else {
- out.Animations = (out.Animations)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.Animations = append(out.Animations, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "paused":
- out.Paused = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation2(out *jwriter.Writer, in SetPausedParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animations\":"
- out.RawString(prefix[1:])
- if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Animations {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"paused\":"
- out.RawString(prefix)
- out.Bool(bool(in.Paused))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPausedParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPausedParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPausedParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPausedParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation3(in *jlexer.Lexer, out *SeekAnimationsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animations":
- if in.IsNull() {
- in.Skip()
- out.Animations = nil
- } else {
- in.Delim('[')
- if out.Animations == nil {
- if !in.IsDelim(']') {
- out.Animations = make([]string, 0, 4)
- } else {
- out.Animations = []string{}
- }
- } else {
- out.Animations = (out.Animations)[:0]
- }
- for !in.IsDelim(']') {
- var v4 string
- v4 = string(in.String())
- out.Animations = append(out.Animations, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "currentTime":
- out.CurrentTime = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation3(out *jwriter.Writer, in SeekAnimationsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animations\":"
- out.RawString(prefix[1:])
- if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Animations {
- if v5 > 0 {
- out.RawByte(',')
- }
- out.String(string(v6))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"currentTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.CurrentTime))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SeekAnimationsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SeekAnimationsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SeekAnimationsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SeekAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation4(in *jlexer.Lexer, out *ResolveAnimationReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "remoteObject":
- if in.IsNull() {
- in.Skip()
- out.RemoteObject = nil
- } else {
- if out.RemoteObject == nil {
- out.RemoteObject = new(runtime.RemoteObject)
- }
- (*out.RemoteObject).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation4(out *jwriter.Writer, in ResolveAnimationReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.RemoteObject != nil {
- const prefix string = ",\"remoteObject\":"
- first = false
- out.RawString(prefix[1:])
- (*in.RemoteObject).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveAnimationReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveAnimationReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveAnimationReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveAnimationReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation5(in *jlexer.Lexer, out *ResolveAnimationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animationId":
- out.AnimationID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation5(out *jwriter.Writer, in ResolveAnimationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animationId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AnimationID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveAnimationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveAnimationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveAnimationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveAnimationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation6(in *jlexer.Lexer, out *ReleaseAnimationsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animations":
- if in.IsNull() {
- in.Skip()
- out.Animations = nil
- } else {
- in.Delim('[')
- if out.Animations == nil {
- if !in.IsDelim(']') {
- out.Animations = make([]string, 0, 4)
- } else {
- out.Animations = []string{}
- }
- } else {
- out.Animations = (out.Animations)[:0]
- }
- for !in.IsDelim(']') {
- var v7 string
- v7 = string(in.String())
- out.Animations = append(out.Animations, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation6(out *jwriter.Writer, in ReleaseAnimationsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animations\":"
- out.RawString(prefix[1:])
- if in.Animations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Animations {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReleaseAnimationsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReleaseAnimationsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReleaseAnimationsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReleaseAnimationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation7(in *jlexer.Lexer, out *KeyframesRule) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "keyframes":
- if in.IsNull() {
- in.Skip()
- out.Keyframes = nil
- } else {
- in.Delim('[')
- if out.Keyframes == nil {
- if !in.IsDelim(']') {
- out.Keyframes = make([]*KeyframeStyle, 0, 8)
- } else {
- out.Keyframes = []*KeyframeStyle{}
- }
- } else {
- out.Keyframes = (out.Keyframes)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *KeyframeStyle
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(KeyframeStyle)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Keyframes = append(out.Keyframes, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation7(out *jwriter.Writer, in KeyframesRule) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Name != "" {
- const prefix string = ",\"name\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"keyframes\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Keyframes {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyframesRule) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyframesRule) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation8(in *jlexer.Lexer, out *KeyframeStyle) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "offset":
- out.Offset = string(in.String())
- case "easing":
- out.Easing = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation8(out *jwriter.Writer, in KeyframeStyle) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"offset\":"
- out.RawString(prefix[1:])
- out.String(string(in.Offset))
- }
- {
- const prefix string = ",\"easing\":"
- out.RawString(prefix)
- out.String(string(in.Easing))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyframeStyle) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyframeStyle) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyframeStyle) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyframeStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation9(in *jlexer.Lexer, out *GetPlaybackRateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playbackRate":
- out.PlaybackRate = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation9(out *jwriter.Writer, in GetPlaybackRateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.PlaybackRate != 0 {
- const prefix string = ",\"playbackRate\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.PlaybackRate))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPlaybackRateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPlaybackRateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPlaybackRateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPlaybackRateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation10(in *jlexer.Lexer, out *GetPlaybackRateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation10(out *jwriter.Writer, in GetPlaybackRateParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPlaybackRateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPlaybackRateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPlaybackRateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPlaybackRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation11(in *jlexer.Lexer, out *GetCurrentTimeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "currentTime":
- out.CurrentTime = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation11(out *jwriter.Writer, in GetCurrentTimeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.CurrentTime != 0 {
- const prefix string = ",\"currentTime\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.CurrentTime))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCurrentTimeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCurrentTimeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCurrentTimeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCurrentTimeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation12(in *jlexer.Lexer, out *GetCurrentTimeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation12(out *jwriter.Writer, in GetCurrentTimeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCurrentTimeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCurrentTimeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCurrentTimeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCurrentTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation13(in *jlexer.Lexer, out *EventAnimationStarted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animation":
- if in.IsNull() {
- in.Skip()
- out.Animation = nil
- } else {
- if out.Animation == nil {
- out.Animation = new(Animation)
- }
- (*out.Animation).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation13(out *jwriter.Writer, in EventAnimationStarted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animation\":"
- out.RawString(prefix[1:])
- if in.Animation == nil {
- out.RawString("null")
- } else {
- (*in.Animation).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAnimationStarted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAnimationStarted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAnimationStarted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAnimationStarted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation14(in *jlexer.Lexer, out *EventAnimationCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation14(out *jwriter.Writer, in EventAnimationCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAnimationCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAnimationCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAnimationCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAnimationCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation15(in *jlexer.Lexer, out *EventAnimationCanceled) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation15(out *jwriter.Writer, in EventAnimationCanceled) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAnimationCanceled) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAnimationCanceled) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAnimationCanceled) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAnimationCanceled) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation16(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation16(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation17(in *jlexer.Lexer, out *Effect) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "delay":
- out.Delay = float64(in.Float64())
- case "endDelay":
- out.EndDelay = float64(in.Float64())
- case "iterationStart":
- out.IterationStart = float64(in.Float64())
- case "iterations":
- out.Iterations = float64(in.Float64())
- case "duration":
- out.Duration = float64(in.Float64())
- case "direction":
- out.Direction = string(in.String())
- case "fill":
- out.Fill = string(in.String())
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "keyframesRule":
- if in.IsNull() {
- in.Skip()
- out.KeyframesRule = nil
- } else {
- if out.KeyframesRule == nil {
- out.KeyframesRule = new(KeyframesRule)
- }
- (*out.KeyframesRule).UnmarshalEasyJSON(in)
- }
- case "easing":
- out.Easing = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation17(out *jwriter.Writer, in Effect) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"delay\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Delay))
- }
- {
- const prefix string = ",\"endDelay\":"
- out.RawString(prefix)
- out.Float64(float64(in.EndDelay))
- }
- {
- const prefix string = ",\"iterationStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.IterationStart))
- }
- {
- const prefix string = ",\"iterations\":"
- out.RawString(prefix)
- out.Float64(float64(in.Iterations))
- }
- {
- const prefix string = ",\"duration\":"
- out.RawString(prefix)
- out.Float64(float64(in.Duration))
- }
- {
- const prefix string = ",\"direction\":"
- out.RawString(prefix)
- out.String(string(in.Direction))
- }
- {
- const prefix string = ",\"fill\":"
- out.RawString(prefix)
- out.String(string(in.Fill))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if in.KeyframesRule != nil {
- const prefix string = ",\"keyframesRule\":"
- out.RawString(prefix)
- (*in.KeyframesRule).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"easing\":"
- out.RawString(prefix)
- out.String(string(in.Easing))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Effect) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Effect) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Effect) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Effect) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation18(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation18(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation19(in *jlexer.Lexer, out *Animation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "pausedState":
- out.PausedState = bool(in.Bool())
- case "playState":
- out.PlayState = string(in.String())
- case "playbackRate":
- out.PlaybackRate = float64(in.Float64())
- case "startTime":
- out.StartTime = float64(in.Float64())
- case "currentTime":
- out.CurrentTime = float64(in.Float64())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "source":
- if in.IsNull() {
- in.Skip()
- out.Source = nil
- } else {
- if out.Source == nil {
- out.Source = new(Effect)
- }
- (*out.Source).UnmarshalEasyJSON(in)
- }
- case "cssId":
- out.CSSID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation19(out *jwriter.Writer, in Animation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"pausedState\":"
- out.RawString(prefix)
- out.Bool(bool(in.PausedState))
- }
- {
- const prefix string = ",\"playState\":"
- out.RawString(prefix)
- out.String(string(in.PlayState))
- }
- {
- const prefix string = ",\"playbackRate\":"
- out.RawString(prefix)
- out.Float64(float64(in.PlaybackRate))
- }
- {
- const prefix string = ",\"startTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.StartTime))
- }
- {
- const prefix string = ",\"currentTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.CurrentTime))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Source != nil {
- const prefix string = ",\"source\":"
- out.RawString(prefix)
- (*in.Source).MarshalEasyJSON(out)
- }
- if in.CSSID != "" {
- const prefix string = ",\"cssId\":"
- out.RawString(prefix)
- out.String(string(in.CSSID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Animation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Animation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAnimation19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Animation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Animation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAnimation19(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/animation/events.go b/vendor/github.com/chromedp/cdproto/animation/events.go
deleted file mode 100644
index d85b0343fe1..00000000000
--- a/vendor/github.com/chromedp/cdproto/animation/events.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package animation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventAnimationCanceled event for when an animation has been cancelled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCanceled
-type EventAnimationCanceled struct {
- ID string `json:"id"` // Id of the animation that was cancelled.
-}
-
-// EventAnimationCreated event for each animation that has been created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationCreated
-type EventAnimationCreated struct {
- ID string `json:"id"` // Id of the animation that was created.
-}
-
-// EventAnimationStarted event for animation that has been started.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#event-animationStarted
-type EventAnimationStarted struct {
- Animation *Animation `json:"animation"` // Animation that was started.
-}
diff --git a/vendor/github.com/chromedp/cdproto/animation/types.go b/vendor/github.com/chromedp/cdproto/animation/types.go
deleted file mode 100644
index a5e438bb81e..00000000000
--- a/vendor/github.com/chromedp/cdproto/animation/types.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package animation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// Animation animation instance.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
-type Animation struct {
- ID string `json:"id"` // Animation's id.
- Name string `json:"name"` // Animation's name.
- PausedState bool `json:"pausedState"` // Animation's internal paused state.
- PlayState string `json:"playState"` // Animation's play state.
- PlaybackRate float64 `json:"playbackRate"` // Animation's playback rate.
- StartTime float64 `json:"startTime"` // Animation's start time.
- CurrentTime float64 `json:"currentTime"` // Animation's current time.
- Type Type `json:"type"` // Animation type of Animation.
- Source *Effect `json:"source,omitempty"` // Animation's source animation node.
- CSSID string `json:"cssId,omitempty"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition.
-}
-
-// Effect animationEffect instance.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-AnimationEffect
-type Effect struct {
- Delay float64 `json:"delay"` // AnimationEffect's delay.
- EndDelay float64 `json:"endDelay"` // AnimationEffect's end delay.
- IterationStart float64 `json:"iterationStart"` // AnimationEffect's iteration start.
- Iterations float64 `json:"iterations"` // AnimationEffect's iterations.
- Duration float64 `json:"duration"` // AnimationEffect's iteration duration.
- Direction string `json:"direction"` // AnimationEffect's playback direction.
- Fill string `json:"fill"` // AnimationEffect's fill mode.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // AnimationEffect's target node.
- KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // AnimationEffect's keyframes.
- Easing string `json:"easing"` // AnimationEffect's timing function.
-}
-
-// KeyframesRule keyframes Rule.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-KeyframesRule
-type KeyframesRule struct {
- Name string `json:"name,omitempty"` // CSS keyframed animation's name.
- Keyframes []*KeyframeStyle `json:"keyframes"` // List of animation keyframes.
-}
-
-// KeyframeStyle keyframe Style.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-KeyframeStyle
-type KeyframeStyle struct {
- Offset string `json:"offset"` // Keyframe's time offset.
- Easing string `json:"easing"` // AnimationEffect's timing function.
-}
-
-// Type animation type of Animation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#type-Animation
-type Type string
-
-// String returns the Type as string value.
-func (t Type) String() string {
- return string(t)
-}
-
-// Type values.
-const (
- TypeCSSTransition Type = "CSSTransition"
- TypeCSSAnimation Type = "CSSAnimation"
- TypeWebAnimation Type = "WebAnimation"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Type) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Type) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Type(in.String()) {
- case TypeCSSTransition:
- *t = TypeCSSTransition
- case TypeCSSAnimation:
- *t = TypeCSSAnimation
- case TypeWebAnimation:
- *t = TypeWebAnimation
-
- default:
- in.AddError(errors.New("unknown Type value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Type) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go b/vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go
deleted file mode 100644
index b90a54981fe..00000000000
--- a/vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Package applicationcache provides the Chrome DevTools Protocol
-// commands, types, and events for the ApplicationCache domain.
-//
-// Generated by the cdproto-gen command.
-package applicationcache
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams enables application cache domain notifications.
-type EnableParams struct{}
-
-// Enable enables application cache domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes ApplicationCache.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetApplicationCacheForFrameParams returns relevant application cache data
-// for the document in given frame.
-type GetApplicationCacheForFrameParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache is retrieved.
-}
-
-// GetApplicationCacheForFrame returns relevant application cache data for
-// the document in given frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getApplicationCacheForFrame
-//
-// parameters:
-// frameID - Identifier of the frame containing document whose application cache is retrieved.
-func GetApplicationCacheForFrame(frameID cdp.FrameID) *GetApplicationCacheForFrameParams {
- return &GetApplicationCacheForFrameParams{
- FrameID: frameID,
- }
-}
-
-// GetApplicationCacheForFrameReturns return values.
-type GetApplicationCacheForFrameReturns struct {
- ApplicationCache *ApplicationCache `json:"applicationCache,omitempty"` // Relevant application cache data for the document in given frame.
-}
-
-// Do executes ApplicationCache.getApplicationCacheForFrame against the provided context.
-//
-// returns:
-// applicationCache - Relevant application cache data for the document in given frame.
-func (p *GetApplicationCacheForFrameParams) Do(ctx context.Context) (applicationCache *ApplicationCache, err error) {
- // execute
- var res GetApplicationCacheForFrameReturns
- err = cdp.Execute(ctx, CommandGetApplicationCacheForFrame, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ApplicationCache, nil
-}
-
-// GetFramesWithManifestsParams returns array of frame identifiers with
-// manifest urls for each frame containing a document associated with some
-// application cache.
-type GetFramesWithManifestsParams struct{}
-
-// GetFramesWithManifests returns array of frame identifiers with manifest
-// urls for each frame containing a document associated with some application
-// cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getFramesWithManifests
-func GetFramesWithManifests() *GetFramesWithManifestsParams {
- return &GetFramesWithManifestsParams{}
-}
-
-// GetFramesWithManifestsReturns return values.
-type GetFramesWithManifestsReturns struct {
- FrameIds []*FrameWithManifest `json:"frameIds,omitempty"` // Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
-}
-
-// Do executes ApplicationCache.getFramesWithManifests against the provided context.
-//
-// returns:
-// frameIds - Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
-func (p *GetFramesWithManifestsParams) Do(ctx context.Context) (frameIds []*FrameWithManifest, err error) {
- // execute
- var res GetFramesWithManifestsReturns
- err = cdp.Execute(ctx, CommandGetFramesWithManifests, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.FrameIds, nil
-}
-
-// GetManifestForFrameParams returns manifest URL for document in the given
-// frame.
-type GetManifestForFrameParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose manifest is retrieved.
-}
-
-// GetManifestForFrame returns manifest URL for document in the given frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getManifestForFrame
-//
-// parameters:
-// frameID - Identifier of the frame containing document whose manifest is retrieved.
-func GetManifestForFrame(frameID cdp.FrameID) *GetManifestForFrameParams {
- return &GetManifestForFrameParams{
- FrameID: frameID,
- }
-}
-
-// GetManifestForFrameReturns return values.
-type GetManifestForFrameReturns struct {
- ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL for document in the given frame.
-}
-
-// Do executes ApplicationCache.getManifestForFrame against the provided context.
-//
-// returns:
-// manifestURL - Manifest URL for document in the given frame.
-func (p *GetManifestForFrameParams) Do(ctx context.Context) (manifestURL string, err error) {
- // execute
- var res GetManifestForFrameReturns
- err = cdp.Execute(ctx, CommandGetManifestForFrame, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.ManifestURL, nil
-}
-
-// Command names.
-const (
- CommandEnable = "ApplicationCache.enable"
- CommandGetApplicationCacheForFrame = "ApplicationCache.getApplicationCacheForFrame"
- CommandGetFramesWithManifests = "ApplicationCache.getFramesWithManifests"
- CommandGetManifestForFrame = "ApplicationCache.getManifestForFrame"
-)
diff --git a/vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go b/vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go
deleted file mode 100644
index 171b486ec5f..00000000000
--- a/vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go
+++ /dev/null
@@ -1,964 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package applicationcache
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(in *jlexer.Lexer, out *Resource) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "size":
- out.Size = int64(in.Int64())
- case "type":
- out.Type = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(out *jwriter.Writer, in Resource) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Int64(int64(in.Size))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- out.String(string(in.Type))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Resource) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Resource) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Resource) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Resource) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(in *jlexer.Lexer, out *GetManifestForFrameReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "manifestURL":
- out.ManifestURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(out *jwriter.Writer, in GetManifestForFrameReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ManifestURL != "" {
- const prefix string = ",\"manifestURL\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ManifestURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetManifestForFrameReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetManifestForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetManifestForFrameReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetManifestForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(in *jlexer.Lexer, out *GetManifestForFrameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(out *jwriter.Writer, in GetManifestForFrameParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetManifestForFrameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetManifestForFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetManifestForFrameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetManifestForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(in *jlexer.Lexer, out *GetFramesWithManifestsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameIds":
- if in.IsNull() {
- in.Skip()
- out.FrameIds = nil
- } else {
- in.Delim('[')
- if out.FrameIds == nil {
- if !in.IsDelim(']') {
- out.FrameIds = make([]*FrameWithManifest, 0, 8)
- } else {
- out.FrameIds = []*FrameWithManifest{}
- }
- } else {
- out.FrameIds = (out.FrameIds)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *FrameWithManifest
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(FrameWithManifest)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.FrameIds = append(out.FrameIds, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(out *jwriter.Writer, in GetFramesWithManifestsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.FrameIds) != 0 {
- const prefix string = ",\"frameIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.FrameIds {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFramesWithManifestsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFramesWithManifestsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFramesWithManifestsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFramesWithManifestsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(in *jlexer.Lexer, out *GetFramesWithManifestsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(out *jwriter.Writer, in GetFramesWithManifestsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFramesWithManifestsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFramesWithManifestsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFramesWithManifestsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFramesWithManifestsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(in *jlexer.Lexer, out *GetApplicationCacheForFrameReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "applicationCache":
- if in.IsNull() {
- in.Skip()
- out.ApplicationCache = nil
- } else {
- if out.ApplicationCache == nil {
- out.ApplicationCache = new(ApplicationCache)
- }
- (*out.ApplicationCache).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(out *jwriter.Writer, in GetApplicationCacheForFrameReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ApplicationCache != nil {
- const prefix string = ",\"applicationCache\":"
- first = false
- out.RawString(prefix[1:])
- (*in.ApplicationCache).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetApplicationCacheForFrameReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetApplicationCacheForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetApplicationCacheForFrameReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetApplicationCacheForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(in *jlexer.Lexer, out *GetApplicationCacheForFrameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(out *jwriter.Writer, in GetApplicationCacheForFrameParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetApplicationCacheForFrameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetApplicationCacheForFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetApplicationCacheForFrameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetApplicationCacheForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(in *jlexer.Lexer, out *FrameWithManifest) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "manifestURL":
- out.ManifestURL = string(in.String())
- case "status":
- out.Status = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(out *jwriter.Writer, in FrameWithManifest) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"manifestURL\":"
- out.RawString(prefix)
- out.String(string(in.ManifestURL))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- out.Int64(int64(in.Status))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FrameWithManifest) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FrameWithManifest) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FrameWithManifest) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FrameWithManifest) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(in *jlexer.Lexer, out *EventNetworkStateUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "isNowOnline":
- out.IsNowOnline = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(out *jwriter.Writer, in EventNetworkStateUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"isNowOnline\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.IsNowOnline))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNetworkStateUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNetworkStateUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNetworkStateUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNetworkStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(in *jlexer.Lexer, out *EventApplicationCacheStatusUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "manifestURL":
- out.ManifestURL = string(in.String())
- case "status":
- out.Status = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(out *jwriter.Writer, in EventApplicationCacheStatusUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"manifestURL\":"
- out.RawString(prefix)
- out.String(string(in.ManifestURL))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- out.Int64(int64(in.Status))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventApplicationCacheStatusUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventApplicationCacheStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventApplicationCacheStatusUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventApplicationCacheStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(in *jlexer.Lexer, out *ApplicationCache) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "manifestURL":
- out.ManifestURL = string(in.String())
- case "size":
- out.Size = float64(in.Float64())
- case "creationTime":
- out.CreationTime = float64(in.Float64())
- case "updateTime":
- out.UpdateTime = float64(in.Float64())
- case "resources":
- if in.IsNull() {
- in.Skip()
- out.Resources = nil
- } else {
- in.Delim('[')
- if out.Resources == nil {
- if !in.IsDelim(']') {
- out.Resources = make([]*Resource, 0, 8)
- } else {
- out.Resources = []*Resource{}
- }
- } else {
- out.Resources = (out.Resources)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Resource
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Resource)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Resources = append(out.Resources, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(out *jwriter.Writer, in ApplicationCache) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"manifestURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.ManifestURL))
- }
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Float64(float64(in.Size))
- }
- {
- const prefix string = ",\"creationTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.CreationTime))
- }
- {
- const prefix string = ",\"updateTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.UpdateTime))
- }
- {
- const prefix string = ",\"resources\":"
- out.RawString(prefix)
- if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Resources {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ApplicationCache) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ApplicationCache) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ApplicationCache) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ApplicationCache) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/applicationcache/events.go b/vendor/github.com/chromedp/cdproto/applicationcache/events.go
deleted file mode 100644
index 6981e66d0f6..00000000000
--- a/vendor/github.com/chromedp/cdproto/applicationcache/events.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package applicationcache
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EventApplicationCacheStatusUpdated [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#event-applicationCacheStatusUpdated
-type EventApplicationCacheStatusUpdated struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache updated status.
- ManifestURL string `json:"manifestURL"` // Manifest URL.
- Status int64 `json:"status"` // Updated application cache status.
-}
-
-// EventNetworkStateUpdated [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#event-networkStateUpdated
-type EventNetworkStateUpdated struct {
- IsNowOnline bool `json:"isNowOnline"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/applicationcache/types.go b/vendor/github.com/chromedp/cdproto/applicationcache/types.go
deleted file mode 100644
index f53aae46561..00000000000
--- a/vendor/github.com/chromedp/cdproto/applicationcache/types.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package applicationcache
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// Resource detailed application cache resource information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-ApplicationCacheResource
-type Resource struct {
- URL string `json:"url"` // Resource url.
- Size int64 `json:"size"` // Resource size.
- Type string `json:"type"` // Resource type.
-}
-
-// ApplicationCache detailed application cache information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-ApplicationCache
-type ApplicationCache struct {
- ManifestURL string `json:"manifestURL"` // Manifest URL.
- Size float64 `json:"size"` // Application cache size.
- CreationTime float64 `json:"creationTime"` // Application cache creation time.
- UpdateTime float64 `json:"updateTime"` // Application cache update time.
- Resources []*Resource `json:"resources"` // Application cache resources.
-}
-
-// FrameWithManifest frame identifier - manifest URL pair.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-FrameWithManifest
-type FrameWithManifest struct {
- FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
- ManifestURL string `json:"manifestURL"` // Manifest URL.
- Status int64 `json:"status"` // Application cache status.
-}
diff --git a/vendor/github.com/chromedp/cdproto/audits/audits.go b/vendor/github.com/chromedp/cdproto/audits/audits.go
deleted file mode 100644
index d15d813f050..00000000000
--- a/vendor/github.com/chromedp/cdproto/audits/audits.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Package audits provides the Chrome DevTools Protocol
-// commands, types, and events for the Audits domain.
-//
-// Audits domain allows investigation of page violations and possible
-// improvements.
-//
-// Generated by the cdproto-gen command.
-package audits
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/network"
-)
-
-// GetEncodedResponseParams returns the response body and size if it were
-// re-encoded with the specified settings. Only applies to images.
-type GetEncodedResponseParams struct {
- RequestID network.RequestID `json:"requestId"` // Identifier of the network request to get content for.
- Encoding GetEncodedResponseEncoding `json:"encoding"` // The encoding to use.
- Quality float64 `json:"quality,omitempty"` // The quality of the encoding (0-1). (defaults to 1)
- SizeOnly bool `json:"sizeOnly,omitempty"` // Whether to only return the size information (defaults to false).
-}
-
-// GetEncodedResponse returns the response body and size if it were
-// re-encoded with the specified settings. Only applies to images.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
-//
-// parameters:
-// requestID - Identifier of the network request to get content for.
-// encoding - The encoding to use.
-func GetEncodedResponse(requestID network.RequestID, encoding GetEncodedResponseEncoding) *GetEncodedResponseParams {
- return &GetEncodedResponseParams{
- RequestID: requestID,
- Encoding: encoding,
- }
-}
-
-// WithQuality the quality of the encoding (0-1). (defaults to 1).
-func (p GetEncodedResponseParams) WithQuality(quality float64) *GetEncodedResponseParams {
- p.Quality = quality
- return &p
-}
-
-// WithSizeOnly whether to only return the size information (defaults to
-// false).
-func (p GetEncodedResponseParams) WithSizeOnly(sizeOnly bool) *GetEncodedResponseParams {
- p.SizeOnly = sizeOnly
- return &p
-}
-
-// GetEncodedResponseReturns return values.
-type GetEncodedResponseReturns struct {
- Body string `json:"body,omitempty"` // The encoded body as a base64 string. Omitted if sizeOnly is true.
- OriginalSize int64 `json:"originalSize,omitempty"` // Size before re-encoding.
- EncodedSize int64 `json:"encodedSize,omitempty"` // Size after re-encoding.
-}
-
-// Do executes Audits.getEncodedResponse against the provided context.
-//
-// returns:
-// body - The encoded body as a base64 string. Omitted if sizeOnly is true.
-// originalSize - Size before re-encoding.
-// encodedSize - Size after re-encoding.
-func (p *GetEncodedResponseParams) Do(ctx context.Context) (body []byte, originalSize int64, encodedSize int64, err error) {
- // execute
- var res GetEncodedResponseReturns
- err = cdp.Execute(ctx, CommandGetEncodedResponse, p, &res)
- if err != nil {
- return nil, 0, 0, err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.Body)
- if err != nil {
- return nil, 0, 0, err
- }
- return dec, res.OriginalSize, res.EncodedSize, nil
-}
-
-// DisableParams disables issues domain, prevents further issues from being
-// reported to the client.
-type DisableParams struct{}
-
-// Disable disables issues domain, prevents further issues from being
-// reported to the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Audits.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables issues domain, sends the issues collected so far to
-// the client by means of the issueAdded event.
-type EnableParams struct{}
-
-// Enable enables issues domain, sends the issues collected so far to the
-// client by means of the issueAdded event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Audits.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// CheckContrastParams runs the contrast check for the target page. Found
-// issues are reported using Audits.issueAdded event.
-type CheckContrastParams struct {
- ReportAAA bool `json:"reportAAA,omitempty"` // Whether to report WCAG AAA level issues. Default is false.
-}
-
-// CheckContrast runs the contrast check for the target page. Found issues
-// are reported using Audits.issueAdded event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-checkContrast
-//
-// parameters:
-func CheckContrast() *CheckContrastParams {
- return &CheckContrastParams{}
-}
-
-// WithReportAAA whether to report WCAG AAA level issues. Default is false.
-func (p CheckContrastParams) WithReportAAA(reportAAA bool) *CheckContrastParams {
- p.ReportAAA = reportAAA
- return &p
-}
-
-// Do executes Audits.checkContrast against the provided context.
-func (p *CheckContrastParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCheckContrast, p, nil)
-}
-
-// Command names.
-const (
- CommandGetEncodedResponse = "Audits.getEncodedResponse"
- CommandDisable = "Audits.disable"
- CommandEnable = "Audits.enable"
- CommandCheckContrast = "Audits.checkContrast"
-)
diff --git a/vendor/github.com/chromedp/cdproto/audits/easyjson.go b/vendor/github.com/chromedp/cdproto/audits/easyjson.go
deleted file mode 100644
index aa5d18f4be9..00000000000
--- a/vendor/github.com/chromedp/cdproto/audits/easyjson.go
+++ /dev/null
@@ -1,2555 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package audits
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- network "github.com/chromedp/cdproto/network"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits(in *jlexer.Lexer, out *TrustedWebActivityIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "violationType":
- (out.ViolationType).UnmarshalEasyJSON(in)
- case "httpStatusCode":
- out.HTTPStatusCode = int64(in.Int64())
- case "packageName":
- out.PackageName = string(in.String())
- case "signature":
- out.Signature = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits(out *jwriter.Writer, in TrustedWebActivityIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"violationType\":"
- out.RawString(prefix)
- (in.ViolationType).MarshalEasyJSON(out)
- }
- if in.HTTPStatusCode != 0 {
- const prefix string = ",\"httpStatusCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.HTTPStatusCode))
- }
- if in.PackageName != "" {
- const prefix string = ",\"packageName\":"
- out.RawString(prefix)
- out.String(string(in.PackageName))
- }
- if in.Signature != "" {
- const prefix string = ",\"signature\":"
- out.RawString(prefix)
- out.String(string(in.Signature))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrustedWebActivityIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrustedWebActivityIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrustedWebActivityIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrustedWebActivityIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits1(in *jlexer.Lexer, out *SourceCodeLocation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits1(out *jwriter.Writer, in SourceCodeLocation) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ScriptID != "" {
- const prefix string = ",\"scriptId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SourceCodeLocation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SourceCodeLocation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SourceCodeLocation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SourceCodeLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits2(in *jlexer.Lexer, out *SharedArrayBufferIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sourceCodeLocation":
- if in.IsNull() {
- in.Skip()
- out.SourceCodeLocation = nil
- } else {
- if out.SourceCodeLocation == nil {
- out.SourceCodeLocation = new(SourceCodeLocation)
- }
- (*out.SourceCodeLocation).UnmarshalEasyJSON(in)
- }
- case "isWarning":
- out.IsWarning = bool(in.Bool())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits2(out *jwriter.Writer, in SharedArrayBufferIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sourceCodeLocation\":"
- out.RawString(prefix[1:])
- if in.SourceCodeLocation == nil {
- out.RawString("null")
- } else {
- (*in.SourceCodeLocation).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"isWarning\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsWarning))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SharedArrayBufferIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SharedArrayBufferIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SharedArrayBufferIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SharedArrayBufferIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits3(in *jlexer.Lexer, out *SameSiteCookieIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookie":
- if in.IsNull() {
- in.Skip()
- out.Cookie = nil
- } else {
- if out.Cookie == nil {
- out.Cookie = new(AffectedCookie)
- }
- (*out.Cookie).UnmarshalEasyJSON(in)
- }
- case "rawCookieLine":
- out.RawCookieLine = string(in.String())
- case "cookieWarningReasons":
- if in.IsNull() {
- in.Skip()
- out.CookieWarningReasons = nil
- } else {
- in.Delim('[')
- if out.CookieWarningReasons == nil {
- if !in.IsDelim(']') {
- out.CookieWarningReasons = make([]SameSiteCookieWarningReason, 0, 4)
- } else {
- out.CookieWarningReasons = []SameSiteCookieWarningReason{}
- }
- } else {
- out.CookieWarningReasons = (out.CookieWarningReasons)[:0]
- }
- for !in.IsDelim(']') {
- var v1 SameSiteCookieWarningReason
- (v1).UnmarshalEasyJSON(in)
- out.CookieWarningReasons = append(out.CookieWarningReasons, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cookieExclusionReasons":
- if in.IsNull() {
- in.Skip()
- out.CookieExclusionReasons = nil
- } else {
- in.Delim('[')
- if out.CookieExclusionReasons == nil {
- if !in.IsDelim(']') {
- out.CookieExclusionReasons = make([]SameSiteCookieExclusionReason, 0, 4)
- } else {
- out.CookieExclusionReasons = []SameSiteCookieExclusionReason{}
- }
- } else {
- out.CookieExclusionReasons = (out.CookieExclusionReasons)[:0]
- }
- for !in.IsDelim(']') {
- var v2 SameSiteCookieExclusionReason
- (v2).UnmarshalEasyJSON(in)
- out.CookieExclusionReasons = append(out.CookieExclusionReasons, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "operation":
- (out.Operation).UnmarshalEasyJSON(in)
- case "siteForCookies":
- out.SiteForCookies = string(in.String())
- case "cookieUrl":
- out.CookieURL = string(in.String())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(AffectedRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits3(out *jwriter.Writer, in SameSiteCookieIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Cookie != nil {
- const prefix string = ",\"cookie\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Cookie).MarshalEasyJSON(out)
- }
- if in.RawCookieLine != "" {
- const prefix string = ",\"rawCookieLine\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.RawCookieLine))
- }
- {
- const prefix string = ",\"cookieWarningReasons\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.CookieWarningReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v3, v4 := range in.CookieWarningReasons {
- if v3 > 0 {
- out.RawByte(',')
- }
- (v4).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"cookieExclusionReasons\":"
- out.RawString(prefix)
- if in.CookieExclusionReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.CookieExclusionReasons {
- if v5 > 0 {
- out.RawByte(',')
- }
- (v6).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"operation\":"
- out.RawString(prefix)
- (in.Operation).MarshalEasyJSON(out)
- }
- if in.SiteForCookies != "" {
- const prefix string = ",\"siteForCookies\":"
- out.RawString(prefix)
- out.String(string(in.SiteForCookies))
- }
- if in.CookieURL != "" {
- const prefix string = ",\"cookieUrl\":"
- out.RawString(prefix)
- out.String(string(in.CookieURL))
- }
- if in.Request != nil {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- (*in.Request).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SameSiteCookieIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SameSiteCookieIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SameSiteCookieIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SameSiteCookieIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits4(in *jlexer.Lexer, out *QuirksModeIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "isLimitedQuirksMode":
- out.IsLimitedQuirksMode = bool(in.Bool())
- case "documentNodeId":
- (out.DocumentNodeID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits4(out *jwriter.Writer, in QuirksModeIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"isLimitedQuirksMode\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.IsLimitedQuirksMode))
- }
- {
- const prefix string = ",\"documentNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.DocumentNodeID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QuirksModeIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QuirksModeIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QuirksModeIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QuirksModeIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits5(in *jlexer.Lexer, out *NavigatorUserAgentIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(SourceCodeLocation)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits5(out *jwriter.Writer, in NavigatorUserAgentIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if in.Location != nil {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- (*in.Location).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NavigatorUserAgentIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NavigatorUserAgentIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NavigatorUserAgentIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NavigatorUserAgentIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits6(in *jlexer.Lexer, out *MixedContentIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "resourceType":
- (out.ResourceType).UnmarshalEasyJSON(in)
- case "resolutionStatus":
- (out.ResolutionStatus).UnmarshalEasyJSON(in)
- case "insecureURL":
- out.InsecureURL = string(in.String())
- case "mainResourceURL":
- out.MainResourceURL = string(in.String())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(AffectedRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(AffectedFrame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits6(out *jwriter.Writer, in MixedContentIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ResourceType != "" {
- const prefix string = ",\"resourceType\":"
- first = false
- out.RawString(prefix[1:])
- (in.ResourceType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"resolutionStatus\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.ResolutionStatus).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"insecureURL\":"
- out.RawString(prefix)
- out.String(string(in.InsecureURL))
- }
- {
- const prefix string = ",\"mainResourceURL\":"
- out.RawString(prefix)
- out.String(string(in.MainResourceURL))
- }
- if in.Request != nil {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- (*in.Request).MarshalEasyJSON(out)
- }
- if in.Frame != nil {
- const prefix string = ",\"frame\":"
- out.RawString(prefix)
- (*in.Frame).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MixedContentIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MixedContentIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MixedContentIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MixedContentIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits7(in *jlexer.Lexer, out *LowTextContrastIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "violatingNodeId":
- (out.ViolatingNodeID).UnmarshalEasyJSON(in)
- case "violatingNodeSelector":
- out.ViolatingNodeSelector = string(in.String())
- case "contrastRatio":
- out.ContrastRatio = float64(in.Float64())
- case "thresholdAA":
- out.ThresholdAA = float64(in.Float64())
- case "thresholdAAA":
- out.ThresholdAAA = float64(in.Float64())
- case "fontSize":
- out.FontSize = string(in.String())
- case "fontWeight":
- out.FontWeight = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits7(out *jwriter.Writer, in LowTextContrastIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"violatingNodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ViolatingNodeID))
- }
- {
- const prefix string = ",\"violatingNodeSelector\":"
- out.RawString(prefix)
- out.String(string(in.ViolatingNodeSelector))
- }
- {
- const prefix string = ",\"contrastRatio\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContrastRatio))
- }
- {
- const prefix string = ",\"thresholdAA\":"
- out.RawString(prefix)
- out.Float64(float64(in.ThresholdAA))
- }
- {
- const prefix string = ",\"thresholdAAA\":"
- out.RawString(prefix)
- out.Float64(float64(in.ThresholdAAA))
- }
- {
- const prefix string = ",\"fontSize\":"
- out.RawString(prefix)
- out.String(string(in.FontSize))
- }
- {
- const prefix string = ",\"fontWeight\":"
- out.RawString(prefix)
- out.String(string(in.FontWeight))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LowTextContrastIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LowTextContrastIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LowTextContrastIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LowTextContrastIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits8(in *jlexer.Lexer, out *InspectorIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sameSiteCookieIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.SameSiteCookieIssueDetails = nil
- } else {
- if out.SameSiteCookieIssueDetails == nil {
- out.SameSiteCookieIssueDetails = new(SameSiteCookieIssueDetails)
- }
- (*out.SameSiteCookieIssueDetails).UnmarshalEasyJSON(in)
- }
- case "mixedContentIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.MixedContentIssueDetails = nil
- } else {
- if out.MixedContentIssueDetails == nil {
- out.MixedContentIssueDetails = new(MixedContentIssueDetails)
- }
- (*out.MixedContentIssueDetails).UnmarshalEasyJSON(in)
- }
- case "blockedByResponseIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.BlockedByResponseIssueDetails = nil
- } else {
- if out.BlockedByResponseIssueDetails == nil {
- out.BlockedByResponseIssueDetails = new(BlockedByResponseIssueDetails)
- }
- (*out.BlockedByResponseIssueDetails).UnmarshalEasyJSON(in)
- }
- case "heavyAdIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.HeavyAdIssueDetails = nil
- } else {
- if out.HeavyAdIssueDetails == nil {
- out.HeavyAdIssueDetails = new(HeavyAdIssueDetails)
- }
- (*out.HeavyAdIssueDetails).UnmarshalEasyJSON(in)
- }
- case "contentSecurityPolicyIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.ContentSecurityPolicyIssueDetails = nil
- } else {
- if out.ContentSecurityPolicyIssueDetails == nil {
- out.ContentSecurityPolicyIssueDetails = new(ContentSecurityPolicyIssueDetails)
- }
- (*out.ContentSecurityPolicyIssueDetails).UnmarshalEasyJSON(in)
- }
- case "sharedArrayBufferIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.SharedArrayBufferIssueDetails = nil
- } else {
- if out.SharedArrayBufferIssueDetails == nil {
- out.SharedArrayBufferIssueDetails = new(SharedArrayBufferIssueDetails)
- }
- (*out.SharedArrayBufferIssueDetails).UnmarshalEasyJSON(in)
- }
- case "twaQualityEnforcementDetails":
- if in.IsNull() {
- in.Skip()
- out.TwaQualityEnforcementDetails = nil
- } else {
- if out.TwaQualityEnforcementDetails == nil {
- out.TwaQualityEnforcementDetails = new(TrustedWebActivityIssueDetails)
- }
- (*out.TwaQualityEnforcementDetails).UnmarshalEasyJSON(in)
- }
- case "lowTextContrastIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.LowTextContrastIssueDetails = nil
- } else {
- if out.LowTextContrastIssueDetails == nil {
- out.LowTextContrastIssueDetails = new(LowTextContrastIssueDetails)
- }
- (*out.LowTextContrastIssueDetails).UnmarshalEasyJSON(in)
- }
- case "corsIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.CorsIssueDetails = nil
- } else {
- if out.CorsIssueDetails == nil {
- out.CorsIssueDetails = new(CorsIssueDetails)
- }
- (*out.CorsIssueDetails).UnmarshalEasyJSON(in)
- }
- case "attributionReportingIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.AttributionReportingIssueDetails = nil
- } else {
- if out.AttributionReportingIssueDetails == nil {
- out.AttributionReportingIssueDetails = new(AttributionReportingIssueDetails)
- }
- (*out.AttributionReportingIssueDetails).UnmarshalEasyJSON(in)
- }
- case "quirksModeIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.QuirksModeIssueDetails = nil
- } else {
- if out.QuirksModeIssueDetails == nil {
- out.QuirksModeIssueDetails = new(QuirksModeIssueDetails)
- }
- (*out.QuirksModeIssueDetails).UnmarshalEasyJSON(in)
- }
- case "navigatorUserAgentIssueDetails":
- if in.IsNull() {
- in.Skip()
- out.NavigatorUserAgentIssueDetails = nil
- } else {
- if out.NavigatorUserAgentIssueDetails == nil {
- out.NavigatorUserAgentIssueDetails = new(NavigatorUserAgentIssueDetails)
- }
- (*out.NavigatorUserAgentIssueDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits8(out *jwriter.Writer, in InspectorIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SameSiteCookieIssueDetails != nil {
- const prefix string = ",\"sameSiteCookieIssueDetails\":"
- first = false
- out.RawString(prefix[1:])
- (*in.SameSiteCookieIssueDetails).MarshalEasyJSON(out)
- }
- if in.MixedContentIssueDetails != nil {
- const prefix string = ",\"mixedContentIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.MixedContentIssueDetails).MarshalEasyJSON(out)
- }
- if in.BlockedByResponseIssueDetails != nil {
- const prefix string = ",\"blockedByResponseIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.BlockedByResponseIssueDetails).MarshalEasyJSON(out)
- }
- if in.HeavyAdIssueDetails != nil {
- const prefix string = ",\"heavyAdIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.HeavyAdIssueDetails).MarshalEasyJSON(out)
- }
- if in.ContentSecurityPolicyIssueDetails != nil {
- const prefix string = ",\"contentSecurityPolicyIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ContentSecurityPolicyIssueDetails).MarshalEasyJSON(out)
- }
- if in.SharedArrayBufferIssueDetails != nil {
- const prefix string = ",\"sharedArrayBufferIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.SharedArrayBufferIssueDetails).MarshalEasyJSON(out)
- }
- if in.TwaQualityEnforcementDetails != nil {
- const prefix string = ",\"twaQualityEnforcementDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.TwaQualityEnforcementDetails).MarshalEasyJSON(out)
- }
- if in.LowTextContrastIssueDetails != nil {
- const prefix string = ",\"lowTextContrastIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.LowTextContrastIssueDetails).MarshalEasyJSON(out)
- }
- if in.CorsIssueDetails != nil {
- const prefix string = ",\"corsIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CorsIssueDetails).MarshalEasyJSON(out)
- }
- if in.AttributionReportingIssueDetails != nil {
- const prefix string = ",\"attributionReportingIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AttributionReportingIssueDetails).MarshalEasyJSON(out)
- }
- if in.QuirksModeIssueDetails != nil {
- const prefix string = ",\"quirksModeIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.QuirksModeIssueDetails).MarshalEasyJSON(out)
- }
- if in.NavigatorUserAgentIssueDetails != nil {
- const prefix string = ",\"navigatorUserAgentIssueDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.NavigatorUserAgentIssueDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InspectorIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InspectorIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InspectorIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InspectorIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits9(in *jlexer.Lexer, out *InspectorIssue) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "code":
- (out.Code).UnmarshalEasyJSON(in)
- case "details":
- if in.IsNull() {
- in.Skip()
- out.Details = nil
- } else {
- if out.Details == nil {
- out.Details = new(InspectorIssueDetails)
- }
- (*out.Details).UnmarshalEasyJSON(in)
- }
- case "issueId":
- out.IssueID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits9(out *jwriter.Writer, in InspectorIssue) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"code\":"
- out.RawString(prefix[1:])
- (in.Code).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"details\":"
- out.RawString(prefix)
- if in.Details == nil {
- out.RawString("null")
- } else {
- (*in.Details).MarshalEasyJSON(out)
- }
- }
- if in.IssueID != "" {
- const prefix string = ",\"issueId\":"
- out.RawString(prefix)
- out.String(string(in.IssueID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InspectorIssue) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InspectorIssue) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InspectorIssue) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InspectorIssue) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits10(in *jlexer.Lexer, out *HeavyAdIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "resolution":
- (out.Resolution).UnmarshalEasyJSON(in)
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(AffectedFrame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits10(out *jwriter.Writer, in HeavyAdIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"resolution\":"
- out.RawString(prefix[1:])
- (in.Resolution).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"frame\":"
- out.RawString(prefix)
- if in.Frame == nil {
- out.RawString("null")
- } else {
- (*in.Frame).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HeavyAdIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HeavyAdIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HeavyAdIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HeavyAdIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits11(in *jlexer.Lexer, out *GetEncodedResponseReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- case "originalSize":
- out.OriginalSize = int64(in.Int64())
- case "encodedSize":
- out.EncodedSize = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits11(out *jwriter.Writer, in GetEncodedResponseReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Body != "" {
- const prefix string = ",\"body\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- if in.OriginalSize != 0 {
- const prefix string = ",\"originalSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.OriginalSize))
- }
- if in.EncodedSize != 0 {
- const prefix string = ",\"encodedSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.EncodedSize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetEncodedResponseReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetEncodedResponseReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetEncodedResponseReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetEncodedResponseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits12(in *jlexer.Lexer, out *GetEncodedResponseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = network.RequestID(in.String())
- case "encoding":
- (out.Encoding).UnmarshalEasyJSON(in)
- case "quality":
- out.Quality = float64(in.Float64())
- case "sizeOnly":
- out.SizeOnly = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits12(out *jwriter.Writer, in GetEncodedResponseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"encoding\":"
- out.RawString(prefix)
- (in.Encoding).MarshalEasyJSON(out)
- }
- if in.Quality != 0 {
- const prefix string = ",\"quality\":"
- out.RawString(prefix)
- out.Float64(float64(in.Quality))
- }
- if in.SizeOnly {
- const prefix string = ",\"sizeOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.SizeOnly))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetEncodedResponseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetEncodedResponseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetEncodedResponseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetEncodedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits13(in *jlexer.Lexer, out *EventIssueAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "issue":
- if in.IsNull() {
- in.Skip()
- out.Issue = nil
- } else {
- if out.Issue == nil {
- out.Issue = new(InspectorIssue)
- }
- (*out.Issue).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits13(out *jwriter.Writer, in EventIssueAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"issue\":"
- out.RawString(prefix[1:])
- if in.Issue == nil {
- out.RawString("null")
- } else {
- (*in.Issue).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventIssueAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventIssueAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventIssueAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventIssueAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits14(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits14(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits15(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits15(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits16(in *jlexer.Lexer, out *CorsIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "corsErrorStatus":
- if in.IsNull() {
- in.Skip()
- out.CorsErrorStatus = nil
- } else {
- if out.CorsErrorStatus == nil {
- out.CorsErrorStatus = new(network.CorsErrorStatus)
- }
- (*out.CorsErrorStatus).UnmarshalEasyJSON(in)
- }
- case "isWarning":
- out.IsWarning = bool(in.Bool())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(AffectedRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(SourceCodeLocation)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "initiatorOrigin":
- out.InitiatorOrigin = string(in.String())
- case "resourceIPAddressSpace":
- (out.ResourceIPAddressSpace).UnmarshalEasyJSON(in)
- case "clientSecurityState":
- if in.IsNull() {
- in.Skip()
- out.ClientSecurityState = nil
- } else {
- if out.ClientSecurityState == nil {
- out.ClientSecurityState = new(network.ClientSecurityState)
- }
- (*out.ClientSecurityState).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits16(out *jwriter.Writer, in CorsIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"corsErrorStatus\":"
- out.RawString(prefix[1:])
- if in.CorsErrorStatus == nil {
- out.RawString("null")
- } else {
- (*in.CorsErrorStatus).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"isWarning\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsWarning))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- if in.Location != nil {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- (*in.Location).MarshalEasyJSON(out)
- }
- if in.InitiatorOrigin != "" {
- const prefix string = ",\"initiatorOrigin\":"
- out.RawString(prefix)
- out.String(string(in.InitiatorOrigin))
- }
- if in.ResourceIPAddressSpace != "" {
- const prefix string = ",\"resourceIPAddressSpace\":"
- out.RawString(prefix)
- (in.ResourceIPAddressSpace).MarshalEasyJSON(out)
- }
- if in.ClientSecurityState != nil {
- const prefix string = ",\"clientSecurityState\":"
- out.RawString(prefix)
- (*in.ClientSecurityState).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CorsIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CorsIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CorsIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CorsIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits17(in *jlexer.Lexer, out *ContentSecurityPolicyIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "blockedURL":
- out.BlockedURL = string(in.String())
- case "violatedDirective":
- out.ViolatedDirective = string(in.String())
- case "isReportOnly":
- out.IsReportOnly = bool(in.Bool())
- case "contentSecurityPolicyViolationType":
- (out.ContentSecurityPolicyViolationType).UnmarshalEasyJSON(in)
- case "frameAncestor":
- if in.IsNull() {
- in.Skip()
- out.FrameAncestor = nil
- } else {
- if out.FrameAncestor == nil {
- out.FrameAncestor = new(AffectedFrame)
- }
- (*out.FrameAncestor).UnmarshalEasyJSON(in)
- }
- case "sourceCodeLocation":
- if in.IsNull() {
- in.Skip()
- out.SourceCodeLocation = nil
- } else {
- if out.SourceCodeLocation == nil {
- out.SourceCodeLocation = new(SourceCodeLocation)
- }
- (*out.SourceCodeLocation).UnmarshalEasyJSON(in)
- }
- case "violatingNodeId":
- (out.ViolatingNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits17(out *jwriter.Writer, in ContentSecurityPolicyIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BlockedURL != "" {
- const prefix string = ",\"blockedURL\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BlockedURL))
- }
- {
- const prefix string = ",\"violatedDirective\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ViolatedDirective))
- }
- {
- const prefix string = ",\"isReportOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsReportOnly))
- }
- {
- const prefix string = ",\"contentSecurityPolicyViolationType\":"
- out.RawString(prefix)
- (in.ContentSecurityPolicyViolationType).MarshalEasyJSON(out)
- }
- if in.FrameAncestor != nil {
- const prefix string = ",\"frameAncestor\":"
- out.RawString(prefix)
- (*in.FrameAncestor).MarshalEasyJSON(out)
- }
- if in.SourceCodeLocation != nil {
- const prefix string = ",\"sourceCodeLocation\":"
- out.RawString(prefix)
- (*in.SourceCodeLocation).MarshalEasyJSON(out)
- }
- if in.ViolatingNodeID != 0 {
- const prefix string = ",\"violatingNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ViolatingNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContentSecurityPolicyIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContentSecurityPolicyIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContentSecurityPolicyIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContentSecurityPolicyIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits18(in *jlexer.Lexer, out *CheckContrastParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "reportAAA":
- out.ReportAAA = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits18(out *jwriter.Writer, in CheckContrastParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ReportAAA {
- const prefix string = ",\"reportAAA\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.ReportAAA))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CheckContrastParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CheckContrastParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CheckContrastParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CheckContrastParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits19(in *jlexer.Lexer, out *BlockedByResponseIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(AffectedRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "parentFrame":
- if in.IsNull() {
- in.Skip()
- out.ParentFrame = nil
- } else {
- if out.ParentFrame == nil {
- out.ParentFrame = new(AffectedFrame)
- }
- (*out.ParentFrame).UnmarshalEasyJSON(in)
- }
- case "blockedFrame":
- if in.IsNull() {
- in.Skip()
- out.BlockedFrame = nil
- } else {
- if out.BlockedFrame == nil {
- out.BlockedFrame = new(AffectedFrame)
- }
- (*out.BlockedFrame).UnmarshalEasyJSON(in)
- }
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits19(out *jwriter.Writer, in BlockedByResponseIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix[1:])
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- if in.ParentFrame != nil {
- const prefix string = ",\"parentFrame\":"
- out.RawString(prefix)
- (*in.ParentFrame).MarshalEasyJSON(out)
- }
- if in.BlockedFrame != nil {
- const prefix string = ",\"blockedFrame\":"
- out.RawString(prefix)
- (*in.BlockedFrame).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BlockedByResponseIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BlockedByResponseIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BlockedByResponseIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BlockedByResponseIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits20(in *jlexer.Lexer, out *AttributionReportingIssueDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "violationType":
- (out.ViolationType).UnmarshalEasyJSON(in)
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(AffectedFrame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(AffectedRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "violatingNodeId":
- (out.ViolatingNodeID).UnmarshalEasyJSON(in)
- case "invalidParameter":
- out.InvalidParameter = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits20(out *jwriter.Writer, in AttributionReportingIssueDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"violationType\":"
- out.RawString(prefix[1:])
- (in.ViolationType).MarshalEasyJSON(out)
- }
- if in.Frame != nil {
- const prefix string = ",\"frame\":"
- out.RawString(prefix)
- (*in.Frame).MarshalEasyJSON(out)
- }
- if in.Request != nil {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- (*in.Request).MarshalEasyJSON(out)
- }
- if in.ViolatingNodeID != 0 {
- const prefix string = ",\"violatingNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ViolatingNodeID))
- }
- if in.InvalidParameter != "" {
- const prefix string = ",\"invalidParameter\":"
- out.RawString(prefix)
- out.String(string(in.InvalidParameter))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AttributionReportingIssueDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AttributionReportingIssueDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AttributionReportingIssueDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AttributionReportingIssueDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits21(in *jlexer.Lexer, out *AffectedRequest) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = network.RequestID(in.String())
- case "url":
- out.URL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits21(out *jwriter.Writer, in AffectedRequest) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AffectedRequest) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AffectedRequest) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AffectedRequest) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AffectedRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits22(in *jlexer.Lexer, out *AffectedFrame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits22(out *jwriter.Writer, in AffectedFrame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AffectedFrame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AffectedFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AffectedFrame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AffectedFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits23(in *jlexer.Lexer, out *AffectedCookie) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "path":
- out.Path = string(in.String())
- case "domain":
- out.Domain = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits23(out *jwriter.Writer, in AffectedCookie) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"path\":"
- out.RawString(prefix)
- out.String(string(in.Path))
- }
- {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AffectedCookie) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AffectedCookie) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AffectedCookie) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AffectedCookie) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits23(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/audits/events.go b/vendor/github.com/chromedp/cdproto/audits/events.go
deleted file mode 100644
index 495b433db28..00000000000
--- a/vendor/github.com/chromedp/cdproto/audits/events.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package audits
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventIssueAdded [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#event-issueAdded
-type EventIssueAdded struct {
- Issue *InspectorIssue `json:"issue"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/audits/types.go b/vendor/github.com/chromedp/cdproto/audits/types.go
deleted file mode 100644
index 084d4d751fe..00000000000
--- a/vendor/github.com/chromedp/cdproto/audits/types.go
+++ /dev/null
@@ -1,1010 +0,0 @@
-package audits
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/network"
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// AffectedCookie information about a cookie that is affected by an inspector
-// issue.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedCookie
-type AffectedCookie struct {
- Name string `json:"name"` // The following three properties uniquely identify a cookie
- Path string `json:"path"`
- Domain string `json:"domain"`
-}
-
-// AffectedRequest information about a request that is affected by an
-// inspector issue.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedRequest
-type AffectedRequest struct {
- RequestID network.RequestID `json:"requestId"` // The unique request id.
- URL string `json:"url,omitempty"`
-}
-
-// AffectedFrame information about the frame affected by an inspector issue.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedFrame
-type AffectedFrame struct {
- FrameID cdp.FrameID `json:"frameId"`
-}
-
-// SameSiteCookieExclusionReason [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SameSiteCookieExclusionReason
-type SameSiteCookieExclusionReason string
-
-// String returns the SameSiteCookieExclusionReason as string value.
-func (t SameSiteCookieExclusionReason) String() string {
- return string(t)
-}
-
-// SameSiteCookieExclusionReason values.
-const (
- SameSiteCookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax SameSiteCookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"
- SameSiteCookieExclusionReasonExcludeSameSiteNoneInsecure SameSiteCookieExclusionReason = "ExcludeSameSiteNoneInsecure"
- SameSiteCookieExclusionReasonExcludeSameSiteLax SameSiteCookieExclusionReason = "ExcludeSameSiteLax"
- SameSiteCookieExclusionReasonExcludeSameSiteStrict SameSiteCookieExclusionReason = "ExcludeSameSiteStrict"
- SameSiteCookieExclusionReasonExcludeInvalidSameParty SameSiteCookieExclusionReason = "ExcludeInvalidSameParty"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SameSiteCookieExclusionReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SameSiteCookieExclusionReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SameSiteCookieExclusionReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SameSiteCookieExclusionReason(in.String()) {
- case SameSiteCookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax:
- *t = SameSiteCookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax
- case SameSiteCookieExclusionReasonExcludeSameSiteNoneInsecure:
- *t = SameSiteCookieExclusionReasonExcludeSameSiteNoneInsecure
- case SameSiteCookieExclusionReasonExcludeSameSiteLax:
- *t = SameSiteCookieExclusionReasonExcludeSameSiteLax
- case SameSiteCookieExclusionReasonExcludeSameSiteStrict:
- *t = SameSiteCookieExclusionReasonExcludeSameSiteStrict
- case SameSiteCookieExclusionReasonExcludeInvalidSameParty:
- *t = SameSiteCookieExclusionReasonExcludeInvalidSameParty
-
- default:
- in.AddError(errors.New("unknown SameSiteCookieExclusionReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SameSiteCookieExclusionReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SameSiteCookieWarningReason [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SameSiteCookieWarningReason
-type SameSiteCookieWarningReason string
-
-// String returns the SameSiteCookieWarningReason as string value.
-func (t SameSiteCookieWarningReason) String() string {
- return string(t)
-}
-
-// SameSiteCookieWarningReason values.
-const (
- SameSiteCookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext SameSiteCookieWarningReason = "WarnSameSiteUnspecifiedCrossSiteContext"
- SameSiteCookieWarningReasonWarnSameSiteNoneInsecure SameSiteCookieWarningReason = "WarnSameSiteNoneInsecure"
- SameSiteCookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe SameSiteCookieWarningReason = "WarnSameSiteUnspecifiedLaxAllowUnsafe"
- SameSiteCookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict SameSiteCookieWarningReason = "WarnSameSiteStrictLaxDowngradeStrict"
- SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict SameSiteCookieWarningReason = "WarnSameSiteStrictCrossDowngradeStrict"
- SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeLax SameSiteCookieWarningReason = "WarnSameSiteStrictCrossDowngradeLax"
- SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict SameSiteCookieWarningReason = "WarnSameSiteLaxCrossDowngradeStrict"
- SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeLax SameSiteCookieWarningReason = "WarnSameSiteLaxCrossDowngradeLax"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SameSiteCookieWarningReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SameSiteCookieWarningReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SameSiteCookieWarningReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SameSiteCookieWarningReason(in.String()) {
- case SameSiteCookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext:
- *t = SameSiteCookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext
- case SameSiteCookieWarningReasonWarnSameSiteNoneInsecure:
- *t = SameSiteCookieWarningReasonWarnSameSiteNoneInsecure
- case SameSiteCookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe:
- *t = SameSiteCookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe
- case SameSiteCookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict:
- *t = SameSiteCookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict
- case SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict:
- *t = SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict
- case SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeLax:
- *t = SameSiteCookieWarningReasonWarnSameSiteStrictCrossDowngradeLax
- case SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict:
- *t = SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict
- case SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeLax:
- *t = SameSiteCookieWarningReasonWarnSameSiteLaxCrossDowngradeLax
-
- default:
- in.AddError(errors.New("unknown SameSiteCookieWarningReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SameSiteCookieWarningReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SameSiteCookieOperation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SameSiteCookieOperation
-type SameSiteCookieOperation string
-
-// String returns the SameSiteCookieOperation as string value.
-func (t SameSiteCookieOperation) String() string {
- return string(t)
-}
-
-// SameSiteCookieOperation values.
-const (
- SameSiteCookieOperationSetCookie SameSiteCookieOperation = "SetCookie"
- SameSiteCookieOperationReadCookie SameSiteCookieOperation = "ReadCookie"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SameSiteCookieOperation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SameSiteCookieOperation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SameSiteCookieOperation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SameSiteCookieOperation(in.String()) {
- case SameSiteCookieOperationSetCookie:
- *t = SameSiteCookieOperationSetCookie
- case SameSiteCookieOperationReadCookie:
- *t = SameSiteCookieOperationReadCookie
-
- default:
- in.AddError(errors.New("unknown SameSiteCookieOperation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SameSiteCookieOperation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SameSiteCookieIssueDetails this information is currently necessary, as the
-// front-end has a difficult time finding a specific cookie. With this, we can
-// convey specific error information without the cookie.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SameSiteCookieIssueDetails
-type SameSiteCookieIssueDetails struct {
- Cookie *AffectedCookie `json:"cookie,omitempty"` // If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.
- RawCookieLine string `json:"rawCookieLine,omitempty"`
- CookieWarningReasons []SameSiteCookieWarningReason `json:"cookieWarningReasons"`
- CookieExclusionReasons []SameSiteCookieExclusionReason `json:"cookieExclusionReasons"`
- Operation SameSiteCookieOperation `json:"operation"` // Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.
- SiteForCookies string `json:"siteForCookies,omitempty"`
- CookieURL string `json:"cookieUrl,omitempty"`
- Request *AffectedRequest `json:"request,omitempty"`
-}
-
-// MixedContentResolutionStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentResolutionStatus
-type MixedContentResolutionStatus string
-
-// String returns the MixedContentResolutionStatus as string value.
-func (t MixedContentResolutionStatus) String() string {
- return string(t)
-}
-
-// MixedContentResolutionStatus values.
-const (
- MixedContentResolutionStatusMixedContentBlocked MixedContentResolutionStatus = "MixedContentBlocked"
- MixedContentResolutionStatusMixedContentAutomaticallyUpgraded MixedContentResolutionStatus = "MixedContentAutomaticallyUpgraded"
- MixedContentResolutionStatusMixedContentWarning MixedContentResolutionStatus = "MixedContentWarning"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MixedContentResolutionStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MixedContentResolutionStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MixedContentResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MixedContentResolutionStatus(in.String()) {
- case MixedContentResolutionStatusMixedContentBlocked:
- *t = MixedContentResolutionStatusMixedContentBlocked
- case MixedContentResolutionStatusMixedContentAutomaticallyUpgraded:
- *t = MixedContentResolutionStatusMixedContentAutomaticallyUpgraded
- case MixedContentResolutionStatusMixedContentWarning:
- *t = MixedContentResolutionStatusMixedContentWarning
-
- default:
- in.AddError(errors.New("unknown MixedContentResolutionStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MixedContentResolutionStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MixedContentResourceType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentResourceType
-type MixedContentResourceType string
-
-// String returns the MixedContentResourceType as string value.
-func (t MixedContentResourceType) String() string {
- return string(t)
-}
-
-// MixedContentResourceType values.
-const (
- MixedContentResourceTypeAudio MixedContentResourceType = "Audio"
- MixedContentResourceTypeBeacon MixedContentResourceType = "Beacon"
- MixedContentResourceTypeCSPReport MixedContentResourceType = "CSPReport"
- MixedContentResourceTypeDownload MixedContentResourceType = "Download"
- MixedContentResourceTypeEventSource MixedContentResourceType = "EventSource"
- MixedContentResourceTypeFavicon MixedContentResourceType = "Favicon"
- MixedContentResourceTypeFont MixedContentResourceType = "Font"
- MixedContentResourceTypeForm MixedContentResourceType = "Form"
- MixedContentResourceTypeFrame MixedContentResourceType = "Frame"
- MixedContentResourceTypeImage MixedContentResourceType = "Image"
- MixedContentResourceTypeImport MixedContentResourceType = "Import"
- MixedContentResourceTypeManifest MixedContentResourceType = "Manifest"
- MixedContentResourceTypePing MixedContentResourceType = "Ping"
- MixedContentResourceTypePluginData MixedContentResourceType = "PluginData"
- MixedContentResourceTypePluginResource MixedContentResourceType = "PluginResource"
- MixedContentResourceTypePrefetch MixedContentResourceType = "Prefetch"
- MixedContentResourceTypeResource MixedContentResourceType = "Resource"
- MixedContentResourceTypeScript MixedContentResourceType = "Script"
- MixedContentResourceTypeServiceWorker MixedContentResourceType = "ServiceWorker"
- MixedContentResourceTypeSharedWorker MixedContentResourceType = "SharedWorker"
- MixedContentResourceTypeStylesheet MixedContentResourceType = "Stylesheet"
- MixedContentResourceTypeTrack MixedContentResourceType = "Track"
- MixedContentResourceTypeVideo MixedContentResourceType = "Video"
- MixedContentResourceTypeWorker MixedContentResourceType = "Worker"
- MixedContentResourceTypeXMLHTTPRequest MixedContentResourceType = "XMLHttpRequest"
- MixedContentResourceTypeXSLT MixedContentResourceType = "XSLT"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MixedContentResourceType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MixedContentResourceType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MixedContentResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MixedContentResourceType(in.String()) {
- case MixedContentResourceTypeAudio:
- *t = MixedContentResourceTypeAudio
- case MixedContentResourceTypeBeacon:
- *t = MixedContentResourceTypeBeacon
- case MixedContentResourceTypeCSPReport:
- *t = MixedContentResourceTypeCSPReport
- case MixedContentResourceTypeDownload:
- *t = MixedContentResourceTypeDownload
- case MixedContentResourceTypeEventSource:
- *t = MixedContentResourceTypeEventSource
- case MixedContentResourceTypeFavicon:
- *t = MixedContentResourceTypeFavicon
- case MixedContentResourceTypeFont:
- *t = MixedContentResourceTypeFont
- case MixedContentResourceTypeForm:
- *t = MixedContentResourceTypeForm
- case MixedContentResourceTypeFrame:
- *t = MixedContentResourceTypeFrame
- case MixedContentResourceTypeImage:
- *t = MixedContentResourceTypeImage
- case MixedContentResourceTypeImport:
- *t = MixedContentResourceTypeImport
- case MixedContentResourceTypeManifest:
- *t = MixedContentResourceTypeManifest
- case MixedContentResourceTypePing:
- *t = MixedContentResourceTypePing
- case MixedContentResourceTypePluginData:
- *t = MixedContentResourceTypePluginData
- case MixedContentResourceTypePluginResource:
- *t = MixedContentResourceTypePluginResource
- case MixedContentResourceTypePrefetch:
- *t = MixedContentResourceTypePrefetch
- case MixedContentResourceTypeResource:
- *t = MixedContentResourceTypeResource
- case MixedContentResourceTypeScript:
- *t = MixedContentResourceTypeScript
- case MixedContentResourceTypeServiceWorker:
- *t = MixedContentResourceTypeServiceWorker
- case MixedContentResourceTypeSharedWorker:
- *t = MixedContentResourceTypeSharedWorker
- case MixedContentResourceTypeStylesheet:
- *t = MixedContentResourceTypeStylesheet
- case MixedContentResourceTypeTrack:
- *t = MixedContentResourceTypeTrack
- case MixedContentResourceTypeVideo:
- *t = MixedContentResourceTypeVideo
- case MixedContentResourceTypeWorker:
- *t = MixedContentResourceTypeWorker
- case MixedContentResourceTypeXMLHTTPRequest:
- *t = MixedContentResourceTypeXMLHTTPRequest
- case MixedContentResourceTypeXSLT:
- *t = MixedContentResourceTypeXSLT
-
- default:
- in.AddError(errors.New("unknown MixedContentResourceType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MixedContentResourceType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MixedContentIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentIssueDetails
-type MixedContentIssueDetails struct {
- ResourceType MixedContentResourceType `json:"resourceType,omitempty"` // The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination
- ResolutionStatus MixedContentResolutionStatus `json:"resolutionStatus"` // The way the mixed content issue is being resolved.
- InsecureURL string `json:"insecureURL"` // The unsafe http url causing the mixed content issue.
- MainResourceURL string `json:"mainResourceURL"` // The url responsible for the call to an unsafe url.
- Request *AffectedRequest `json:"request,omitempty"` // The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
- Frame *AffectedFrame `json:"frame,omitempty"` // Optional because not every mixed content issue is necessarily linked to a frame.
-}
-
-// BlockedByResponseReason enum indicating the reason a response has been
-// blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BlockedByResponseReason
-type BlockedByResponseReason string
-
-// String returns the BlockedByResponseReason as string value.
-func (t BlockedByResponseReason) String() string {
- return string(t)
-}
-
-// BlockedByResponseReason values.
-const (
- BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"
- BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage BlockedByResponseReason = "CoopSandboxedIFrameCannotNavigateToCoopPage"
- BlockedByResponseReasonCorpNotSameOrigin BlockedByResponseReason = "CorpNotSameOrigin"
- BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"
- BlockedByResponseReasonCorpNotSameSite BlockedByResponseReason = "CorpNotSameSite"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t BlockedByResponseReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t BlockedByResponseReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BlockedByResponseReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch BlockedByResponseReason(in.String()) {
- case BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader:
- *t = BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader
- case BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage:
- *t = BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage
- case BlockedByResponseReasonCorpNotSameOrigin:
- *t = BlockedByResponseReasonCorpNotSameOrigin
- case BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep:
- *t = BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep
- case BlockedByResponseReasonCorpNotSameSite:
- *t = BlockedByResponseReasonCorpNotSameSite
-
- default:
- in.AddError(errors.New("unknown BlockedByResponseReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BlockedByResponseReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BlockedByResponseIssueDetails details for a request that has been blocked
-// with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may
-// be extended to include some CSP errors in the future.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BlockedByResponseIssueDetails
-type BlockedByResponseIssueDetails struct {
- Request *AffectedRequest `json:"request"`
- ParentFrame *AffectedFrame `json:"parentFrame,omitempty"`
- BlockedFrame *AffectedFrame `json:"blockedFrame,omitempty"`
- Reason BlockedByResponseReason `json:"reason"`
-}
-
-// HeavyAdResolutionStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdResolutionStatus
-type HeavyAdResolutionStatus string
-
-// String returns the HeavyAdResolutionStatus as string value.
-func (t HeavyAdResolutionStatus) String() string {
- return string(t)
-}
-
-// HeavyAdResolutionStatus values.
-const (
- HeavyAdResolutionStatusHeavyAdBlocked HeavyAdResolutionStatus = "HeavyAdBlocked"
- HeavyAdResolutionStatusHeavyAdWarning HeavyAdResolutionStatus = "HeavyAdWarning"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t HeavyAdResolutionStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t HeavyAdResolutionStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *HeavyAdResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch HeavyAdResolutionStatus(in.String()) {
- case HeavyAdResolutionStatusHeavyAdBlocked:
- *t = HeavyAdResolutionStatusHeavyAdBlocked
- case HeavyAdResolutionStatusHeavyAdWarning:
- *t = HeavyAdResolutionStatusHeavyAdWarning
-
- default:
- in.AddError(errors.New("unknown HeavyAdResolutionStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *HeavyAdResolutionStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// HeavyAdReason [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdReason
-type HeavyAdReason string
-
-// String returns the HeavyAdReason as string value.
-func (t HeavyAdReason) String() string {
- return string(t)
-}
-
-// HeavyAdReason values.
-const (
- HeavyAdReasonNetworkTotalLimit HeavyAdReason = "NetworkTotalLimit"
- HeavyAdReasonCPUTotalLimit HeavyAdReason = "CpuTotalLimit"
- HeavyAdReasonCPUPeakLimit HeavyAdReason = "CpuPeakLimit"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t HeavyAdReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t HeavyAdReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *HeavyAdReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch HeavyAdReason(in.String()) {
- case HeavyAdReasonNetworkTotalLimit:
- *t = HeavyAdReasonNetworkTotalLimit
- case HeavyAdReasonCPUTotalLimit:
- *t = HeavyAdReasonCPUTotalLimit
- case HeavyAdReasonCPUPeakLimit:
- *t = HeavyAdReasonCPUPeakLimit
-
- default:
- in.AddError(errors.New("unknown HeavyAdReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *HeavyAdReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// HeavyAdIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdIssueDetails
-type HeavyAdIssueDetails struct {
- Resolution HeavyAdResolutionStatus `json:"resolution"` // The resolution status, either blocking the content or warning.
- Reason HeavyAdReason `json:"reason"` // The reason the ad was blocked, total network or cpu or peak cpu.
- Frame *AffectedFrame `json:"frame"` // The frame that was blocked.
-}
-
-// ContentSecurityPolicyViolationType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ContentSecurityPolicyViolationType
-type ContentSecurityPolicyViolationType string
-
-// String returns the ContentSecurityPolicyViolationType as string value.
-func (t ContentSecurityPolicyViolationType) String() string {
- return string(t)
-}
-
-// ContentSecurityPolicyViolationType values.
-const (
- ContentSecurityPolicyViolationTypeKInlineViolation ContentSecurityPolicyViolationType = "kInlineViolation"
- ContentSecurityPolicyViolationTypeKEvalViolation ContentSecurityPolicyViolationType = "kEvalViolation"
- ContentSecurityPolicyViolationTypeKURLViolation ContentSecurityPolicyViolationType = "kURLViolation"
- ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation ContentSecurityPolicyViolationType = "kTrustedTypesSinkViolation"
- ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation ContentSecurityPolicyViolationType = "kTrustedTypesPolicyViolation"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContentSecurityPolicyViolationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContentSecurityPolicyViolationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContentSecurityPolicyViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContentSecurityPolicyViolationType(in.String()) {
- case ContentSecurityPolicyViolationTypeKInlineViolation:
- *t = ContentSecurityPolicyViolationTypeKInlineViolation
- case ContentSecurityPolicyViolationTypeKEvalViolation:
- *t = ContentSecurityPolicyViolationTypeKEvalViolation
- case ContentSecurityPolicyViolationTypeKURLViolation:
- *t = ContentSecurityPolicyViolationTypeKURLViolation
- case ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation:
- *t = ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation
- case ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation:
- *t = ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation
-
- default:
- in.AddError(errors.New("unknown ContentSecurityPolicyViolationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContentSecurityPolicyViolationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SourceCodeLocation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SourceCodeLocation
-type SourceCodeLocation struct {
- ScriptID runtime.ScriptID `json:"scriptId,omitempty"`
- URL string `json:"url"`
- LineNumber int64 `json:"lineNumber"`
- ColumnNumber int64 `json:"columnNumber"`
-}
-
-// ContentSecurityPolicyIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ContentSecurityPolicyIssueDetails
-type ContentSecurityPolicyIssueDetails struct {
- BlockedURL string `json:"blockedURL,omitempty"` // The url not included in allowed sources.
- ViolatedDirective string `json:"violatedDirective"` // Specific directive that is violated, causing the CSP issue.
- IsReportOnly bool `json:"isReportOnly"`
- ContentSecurityPolicyViolationType ContentSecurityPolicyViolationType `json:"contentSecurityPolicyViolationType"`
- FrameAncestor *AffectedFrame `json:"frameAncestor,omitempty"`
- SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation,omitempty"`
- ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
-}
-
-// SharedArrayBufferIssueType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SharedArrayBufferIssueType
-type SharedArrayBufferIssueType string
-
-// String returns the SharedArrayBufferIssueType as string value.
-func (t SharedArrayBufferIssueType) String() string {
- return string(t)
-}
-
-// SharedArrayBufferIssueType values.
-const (
- SharedArrayBufferIssueTypeTransferIssue SharedArrayBufferIssueType = "TransferIssue"
- SharedArrayBufferIssueTypeCreationIssue SharedArrayBufferIssueType = "CreationIssue"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SharedArrayBufferIssueType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SharedArrayBufferIssueType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SharedArrayBufferIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SharedArrayBufferIssueType(in.String()) {
- case SharedArrayBufferIssueTypeTransferIssue:
- *t = SharedArrayBufferIssueTypeTransferIssue
- case SharedArrayBufferIssueTypeCreationIssue:
- *t = SharedArrayBufferIssueTypeCreationIssue
-
- default:
- in.AddError(errors.New("unknown SharedArrayBufferIssueType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SharedArrayBufferIssueType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SharedArrayBufferIssueDetails details for a issue arising from an SAB
-// being instantiated in, or transferred to a context that is not cross-origin
-// isolated.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SharedArrayBufferIssueDetails
-type SharedArrayBufferIssueDetails struct {
- SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"`
- IsWarning bool `json:"isWarning"`
- Type SharedArrayBufferIssueType `json:"type"`
-}
-
-// TwaQualityEnforcementViolationType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-TwaQualityEnforcementViolationType
-type TwaQualityEnforcementViolationType string
-
-// String returns the TwaQualityEnforcementViolationType as string value.
-func (t TwaQualityEnforcementViolationType) String() string {
- return string(t)
-}
-
-// TwaQualityEnforcementViolationType values.
-const (
- TwaQualityEnforcementViolationTypeKHTTPError TwaQualityEnforcementViolationType = "kHttpError"
- TwaQualityEnforcementViolationTypeKUnavailableOffline TwaQualityEnforcementViolationType = "kUnavailableOffline"
- TwaQualityEnforcementViolationTypeKDigitalAssetLinks TwaQualityEnforcementViolationType = "kDigitalAssetLinks"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TwaQualityEnforcementViolationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TwaQualityEnforcementViolationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TwaQualityEnforcementViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TwaQualityEnforcementViolationType(in.String()) {
- case TwaQualityEnforcementViolationTypeKHTTPError:
- *t = TwaQualityEnforcementViolationTypeKHTTPError
- case TwaQualityEnforcementViolationTypeKUnavailableOffline:
- *t = TwaQualityEnforcementViolationTypeKUnavailableOffline
- case TwaQualityEnforcementViolationTypeKDigitalAssetLinks:
- *t = TwaQualityEnforcementViolationTypeKDigitalAssetLinks
-
- default:
- in.AddError(errors.New("unknown TwaQualityEnforcementViolationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TwaQualityEnforcementViolationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TrustedWebActivityIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-TrustedWebActivityIssueDetails
-type TrustedWebActivityIssueDetails struct {
- URL string `json:"url"` // The url that triggers the violation.
- ViolationType TwaQualityEnforcementViolationType `json:"violationType"`
- HTTPStatusCode int64 `json:"httpStatusCode,omitempty"`
- PackageName string `json:"packageName,omitempty"` // The package name of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
- Signature string `json:"signature,omitempty"` // The signature of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
-}
-
-// LowTextContrastIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-LowTextContrastIssueDetails
-type LowTextContrastIssueDetails struct {
- ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId"`
- ViolatingNodeSelector string `json:"violatingNodeSelector"`
- ContrastRatio float64 `json:"contrastRatio"`
- ThresholdAA float64 `json:"thresholdAA"`
- ThresholdAAA float64 `json:"thresholdAAA"`
- FontSize string `json:"fontSize"`
- FontWeight string `json:"fontWeight"`
-}
-
-// CorsIssueDetails details for a CORS related issue, e.g. a warning or error
-// related to CORS RFC1918 enforcement.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CorsIssueDetails
-type CorsIssueDetails struct {
- CorsErrorStatus *network.CorsErrorStatus `json:"corsErrorStatus"`
- IsWarning bool `json:"isWarning"`
- Request *AffectedRequest `json:"request"`
- Location *SourceCodeLocation `json:"location,omitempty"`
- InitiatorOrigin string `json:"initiatorOrigin,omitempty"`
- ResourceIPAddressSpace network.IPAddressSpace `json:"resourceIPAddressSpace,omitempty"`
- ClientSecurityState *network.ClientSecurityState `json:"clientSecurityState,omitempty"`
-}
-
-// AttributionReportingIssueType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AttributionReportingIssueType
-type AttributionReportingIssueType string
-
-// String returns the AttributionReportingIssueType as string value.
-func (t AttributionReportingIssueType) String() string {
- return string(t)
-}
-
-// AttributionReportingIssueType values.
-const (
- AttributionReportingIssueTypePermissionPolicyDisabled AttributionReportingIssueType = "PermissionPolicyDisabled"
- AttributionReportingIssueTypeInvalidAttributionSourceEventID AttributionReportingIssueType = "InvalidAttributionSourceEventId"
- AttributionReportingIssueTypeInvalidAttributionData AttributionReportingIssueType = "InvalidAttributionData"
- AttributionReportingIssueTypeAttributionSourceUntrustworthyOrigin AttributionReportingIssueType = "AttributionSourceUntrustworthyOrigin"
- AttributionReportingIssueTypeAttributionUntrustworthyOrigin AttributionReportingIssueType = "AttributionUntrustworthyOrigin"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AttributionReportingIssueType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AttributionReportingIssueType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AttributionReportingIssueType(in.String()) {
- case AttributionReportingIssueTypePermissionPolicyDisabled:
- *t = AttributionReportingIssueTypePermissionPolicyDisabled
- case AttributionReportingIssueTypeInvalidAttributionSourceEventID:
- *t = AttributionReportingIssueTypeInvalidAttributionSourceEventID
- case AttributionReportingIssueTypeInvalidAttributionData:
- *t = AttributionReportingIssueTypeInvalidAttributionData
- case AttributionReportingIssueTypeAttributionSourceUntrustworthyOrigin:
- *t = AttributionReportingIssueTypeAttributionSourceUntrustworthyOrigin
- case AttributionReportingIssueTypeAttributionUntrustworthyOrigin:
- *t = AttributionReportingIssueTypeAttributionUntrustworthyOrigin
-
- default:
- in.AddError(errors.New("unknown AttributionReportingIssueType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AttributionReportingIssueType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AttributionReportingIssueDetails details for issues around "Attribution
-// Reporting API" usage. Explainer:
-// https://github.com/WICG/conversion-measurement-api.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AttributionReportingIssueDetails
-type AttributionReportingIssueDetails struct {
- ViolationType AttributionReportingIssueType `json:"violationType"`
- Frame *AffectedFrame `json:"frame,omitempty"`
- Request *AffectedRequest `json:"request,omitempty"`
- ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
- InvalidParameter string `json:"invalidParameter,omitempty"`
-}
-
-// QuirksModeIssueDetails details for issues about documents in Quirks Mode
-// or Limited Quirks Mode that affects page layouting.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-QuirksModeIssueDetails
-type QuirksModeIssueDetails struct {
- IsLimitedQuirksMode bool `json:"isLimitedQuirksMode"` // If false, it means the document's mode is "quirks" instead of "limited-quirks".
- DocumentNodeID cdp.BackendNodeID `json:"documentNodeId"`
- URL string `json:"url"`
- FrameID cdp.FrameID `json:"frameId"`
- LoaderID cdp.LoaderID `json:"loaderId"`
-}
-
-// NavigatorUserAgentIssueDetails [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-NavigatorUserAgentIssueDetails
-type NavigatorUserAgentIssueDetails struct {
- URL string `json:"url"`
- Location *SourceCodeLocation `json:"location,omitempty"`
-}
-
-// InspectorIssueCode a unique identifier for the type of issue. Each type
-// may use one of the optional fields in InspectorIssueDetails to convey more
-// specific information about the kind of issue.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-InspectorIssueCode
-type InspectorIssueCode string
-
-// String returns the InspectorIssueCode as string value.
-func (t InspectorIssueCode) String() string {
- return string(t)
-}
-
-// InspectorIssueCode values.
-const (
- InspectorIssueCodeSameSiteCookieIssue InspectorIssueCode = "SameSiteCookieIssue"
- InspectorIssueCodeMixedContentIssue InspectorIssueCode = "MixedContentIssue"
- InspectorIssueCodeBlockedByResponseIssue InspectorIssueCode = "BlockedByResponseIssue"
- InspectorIssueCodeHeavyAdIssue InspectorIssueCode = "HeavyAdIssue"
- InspectorIssueCodeContentSecurityPolicyIssue InspectorIssueCode = "ContentSecurityPolicyIssue"
- InspectorIssueCodeSharedArrayBufferIssue InspectorIssueCode = "SharedArrayBufferIssue"
- InspectorIssueCodeTrustedWebActivityIssue InspectorIssueCode = "TrustedWebActivityIssue"
- InspectorIssueCodeLowTextContrastIssue InspectorIssueCode = "LowTextContrastIssue"
- InspectorIssueCodeCorsIssue InspectorIssueCode = "CorsIssue"
- InspectorIssueCodeAttributionReportingIssue InspectorIssueCode = "AttributionReportingIssue"
- InspectorIssueCodeQuirksModeIssue InspectorIssueCode = "QuirksModeIssue"
- InspectorIssueCodeNavigatorUserAgentIssue InspectorIssueCode = "NavigatorUserAgentIssue"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t InspectorIssueCode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t InspectorIssueCode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *InspectorIssueCode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch InspectorIssueCode(in.String()) {
- case InspectorIssueCodeSameSiteCookieIssue:
- *t = InspectorIssueCodeSameSiteCookieIssue
- case InspectorIssueCodeMixedContentIssue:
- *t = InspectorIssueCodeMixedContentIssue
- case InspectorIssueCodeBlockedByResponseIssue:
- *t = InspectorIssueCodeBlockedByResponseIssue
- case InspectorIssueCodeHeavyAdIssue:
- *t = InspectorIssueCodeHeavyAdIssue
- case InspectorIssueCodeContentSecurityPolicyIssue:
- *t = InspectorIssueCodeContentSecurityPolicyIssue
- case InspectorIssueCodeSharedArrayBufferIssue:
- *t = InspectorIssueCodeSharedArrayBufferIssue
- case InspectorIssueCodeTrustedWebActivityIssue:
- *t = InspectorIssueCodeTrustedWebActivityIssue
- case InspectorIssueCodeLowTextContrastIssue:
- *t = InspectorIssueCodeLowTextContrastIssue
- case InspectorIssueCodeCorsIssue:
- *t = InspectorIssueCodeCorsIssue
- case InspectorIssueCodeAttributionReportingIssue:
- *t = InspectorIssueCodeAttributionReportingIssue
- case InspectorIssueCodeQuirksModeIssue:
- *t = InspectorIssueCodeQuirksModeIssue
- case InspectorIssueCodeNavigatorUserAgentIssue:
- *t = InspectorIssueCodeNavigatorUserAgentIssue
-
- default:
- in.AddError(errors.New("unknown InspectorIssueCode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *InspectorIssueCode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// InspectorIssueDetails this struct holds a list of optional fields with
-// additional information specific to the kind of issue. When adding a new issue
-// code, please also add a new optional field to this type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-InspectorIssueDetails
-type InspectorIssueDetails struct {
- SameSiteCookieIssueDetails *SameSiteCookieIssueDetails `json:"sameSiteCookieIssueDetails,omitempty"`
- MixedContentIssueDetails *MixedContentIssueDetails `json:"mixedContentIssueDetails,omitempty"`
- BlockedByResponseIssueDetails *BlockedByResponseIssueDetails `json:"blockedByResponseIssueDetails,omitempty"`
- HeavyAdIssueDetails *HeavyAdIssueDetails `json:"heavyAdIssueDetails,omitempty"`
- ContentSecurityPolicyIssueDetails *ContentSecurityPolicyIssueDetails `json:"contentSecurityPolicyIssueDetails,omitempty"`
- SharedArrayBufferIssueDetails *SharedArrayBufferIssueDetails `json:"sharedArrayBufferIssueDetails,omitempty"`
- TwaQualityEnforcementDetails *TrustedWebActivityIssueDetails `json:"twaQualityEnforcementDetails,omitempty"`
- LowTextContrastIssueDetails *LowTextContrastIssueDetails `json:"lowTextContrastIssueDetails,omitempty"`
- CorsIssueDetails *CorsIssueDetails `json:"corsIssueDetails,omitempty"`
- AttributionReportingIssueDetails *AttributionReportingIssueDetails `json:"attributionReportingIssueDetails,omitempty"`
- QuirksModeIssueDetails *QuirksModeIssueDetails `json:"quirksModeIssueDetails,omitempty"`
- NavigatorUserAgentIssueDetails *NavigatorUserAgentIssueDetails `json:"navigatorUserAgentIssueDetails,omitempty"`
-}
-
-// InspectorIssue an inspector issue reported from the back-end.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-InspectorIssue
-type InspectorIssue struct {
- Code InspectorIssueCode `json:"code"`
- Details *InspectorIssueDetails `json:"details"`
- IssueID string `json:"issueId,omitempty"` // A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.
-}
-
-// GetEncodedResponseEncoding the encoding to use.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
-type GetEncodedResponseEncoding string
-
-// String returns the GetEncodedResponseEncoding as string value.
-func (t GetEncodedResponseEncoding) String() string {
- return string(t)
-}
-
-// GetEncodedResponseEncoding values.
-const (
- GetEncodedResponseEncodingWebp GetEncodedResponseEncoding = "webp"
- GetEncodedResponseEncodingJpeg GetEncodedResponseEncoding = "jpeg"
- GetEncodedResponseEncodingPng GetEncodedResponseEncoding = "png"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t GetEncodedResponseEncoding) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t GetEncodedResponseEncoding) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *GetEncodedResponseEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch GetEncodedResponseEncoding(in.String()) {
- case GetEncodedResponseEncodingWebp:
- *t = GetEncodedResponseEncodingWebp
- case GetEncodedResponseEncodingJpeg:
- *t = GetEncodedResponseEncodingJpeg
- case GetEncodedResponseEncodingPng:
- *t = GetEncodedResponseEncodingPng
-
- default:
- in.AddError(errors.New("unknown GetEncodedResponseEncoding value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *GetEncodedResponseEncoding) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go b/vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go
deleted file mode 100644
index dd0b5193471..00000000000
--- a/vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Package backgroundservice provides the Chrome DevTools Protocol
-// commands, types, and events for the BackgroundService domain.
-//
-// Defines events for background web platform features.
-//
-// Generated by the cdproto-gen command.
-package backgroundservice
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// StartObservingParams enables event updates for the service.
-type StartObservingParams struct {
- Service ServiceName `json:"service"`
-}
-
-// StartObserving enables event updates for the service.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-startObserving
-//
-// parameters:
-// service
-func StartObserving(service ServiceName) *StartObservingParams {
- return &StartObservingParams{
- Service: service,
- }
-}
-
-// Do executes BackgroundService.startObserving against the provided context.
-func (p *StartObservingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartObserving, p, nil)
-}
-
-// StopObservingParams disables event updates for the service.
-type StopObservingParams struct {
- Service ServiceName `json:"service"`
-}
-
-// StopObserving disables event updates for the service.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-stopObserving
-//
-// parameters:
-// service
-func StopObserving(service ServiceName) *StopObservingParams {
- return &StopObservingParams{
- Service: service,
- }
-}
-
-// Do executes BackgroundService.stopObserving against the provided context.
-func (p *StopObservingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopObserving, p, nil)
-}
-
-// SetRecordingParams set the recording state for the service.
-type SetRecordingParams struct {
- ShouldRecord bool `json:"shouldRecord"`
- Service ServiceName `json:"service"`
-}
-
-// SetRecording set the recording state for the service.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-setRecording
-//
-// parameters:
-// shouldRecord
-// service
-func SetRecording(shouldRecord bool, service ServiceName) *SetRecordingParams {
- return &SetRecordingParams{
- ShouldRecord: shouldRecord,
- Service: service,
- }
-}
-
-// Do executes BackgroundService.setRecording against the provided context.
-func (p *SetRecordingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetRecording, p, nil)
-}
-
-// ClearEventsParams clears all stored data for the service.
-type ClearEventsParams struct {
- Service ServiceName `json:"service"`
-}
-
-// ClearEvents clears all stored data for the service.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-clearEvents
-//
-// parameters:
-// service
-func ClearEvents(service ServiceName) *ClearEventsParams {
- return &ClearEventsParams{
- Service: service,
- }
-}
-
-// Do executes BackgroundService.clearEvents against the provided context.
-func (p *ClearEventsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearEvents, p, nil)
-}
-
-// Command names.
-const (
- CommandStartObserving = "BackgroundService.startObserving"
- CommandStopObserving = "BackgroundService.stopObserving"
- CommandSetRecording = "BackgroundService.setRecording"
- CommandClearEvents = "BackgroundService.clearEvents"
-)
diff --git a/vendor/github.com/chromedp/cdproto/backgroundservice/easyjson.go b/vendor/github.com/chromedp/cdproto/backgroundservice/easyjson.go
deleted file mode 100644
index 02d4a838b56..00000000000
--- a/vendor/github.com/chromedp/cdproto/backgroundservice/easyjson.go
+++ /dev/null
@@ -1,680 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package backgroundservice
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- serviceworker "github.com/chromedp/cdproto/serviceworker"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(in *jlexer.Lexer, out *StopObservingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(out *jwriter.Writer, in StopObservingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix[1:])
- (in.Service).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopObservingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopObservingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopObservingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopObservingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(in *jlexer.Lexer, out *StartObservingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(out *jwriter.Writer, in StartObservingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix[1:])
- (in.Service).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartObservingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartObservingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartObservingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartObservingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(in *jlexer.Lexer, out *SetRecordingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "shouldRecord":
- out.ShouldRecord = bool(in.Bool())
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(out *jwriter.Writer, in SetRecordingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"shouldRecord\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.ShouldRecord))
- }
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix)
- (in.Service).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetRecordingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetRecordingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetRecordingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetRecordingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(in *jlexer.Lexer, out *EventRecordingStateChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "isRecording":
- out.IsRecording = bool(in.Bool())
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(out *jwriter.Writer, in EventRecordingStateChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"isRecording\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.IsRecording))
- }
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix)
- (in.Service).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventRecordingStateChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventRecordingStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventRecordingStateChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventRecordingStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(in *jlexer.Lexer, out *EventMetadata) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "key":
- out.Key = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(out *jwriter.Writer, in EventMetadata) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix[1:])
- out.String(string(in.Key))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventMetadata) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventMetadata) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventMetadata) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventMetadata) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(in *jlexer.Lexer, out *EventBackgroundServiceEventReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backgroundServiceEvent":
- if in.IsNull() {
- in.Skip()
- out.BackgroundServiceEvent = nil
- } else {
- if out.BackgroundServiceEvent == nil {
- out.BackgroundServiceEvent = new(Event)
- }
- (*out.BackgroundServiceEvent).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(out *jwriter.Writer, in EventBackgroundServiceEventReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"backgroundServiceEvent\":"
- out.RawString(prefix[1:])
- if in.BackgroundServiceEvent == nil {
- out.RawString("null")
- } else {
- (*in.BackgroundServiceEvent).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventBackgroundServiceEventReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventBackgroundServiceEventReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventBackgroundServiceEventReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventBackgroundServiceEventReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(in *jlexer.Lexer, out *Event) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "origin":
- out.Origin = string(in.String())
- case "serviceWorkerRegistrationId":
- out.ServiceWorkerRegistrationID = serviceworker.RegistrationID(in.String())
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- case "eventName":
- out.EventName = string(in.String())
- case "instanceId":
- out.InstanceID = string(in.String())
- case "eventMetadata":
- if in.IsNull() {
- in.Skip()
- out.EventMetadata = nil
- } else {
- in.Delim('[')
- if out.EventMetadata == nil {
- if !in.IsDelim(']') {
- out.EventMetadata = make([]*EventMetadata, 0, 8)
- } else {
- out.EventMetadata = []*EventMetadata{}
- }
- } else {
- out.EventMetadata = (out.EventMetadata)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *EventMetadata
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(EventMetadata)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.EventMetadata = append(out.EventMetadata, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(out *jwriter.Writer, in Event) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"serviceWorkerRegistrationId\":"
- out.RawString(prefix)
- out.String(string(in.ServiceWorkerRegistrationID))
- }
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix)
- (in.Service).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix)
- out.String(string(in.EventName))
- }
- {
- const prefix string = ",\"instanceId\":"
- out.RawString(prefix)
- out.String(string(in.InstanceID))
- }
- {
- const prefix string = ",\"eventMetadata\":"
- out.RawString(prefix)
- if in.EventMetadata == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.EventMetadata {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Event) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Event) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Event) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Event) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(in *jlexer.Lexer, out *ClearEventsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "service":
- (out.Service).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(out *jwriter.Writer, in ClearEventsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"service\":"
- out.RawString(prefix[1:])
- (in.Service).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearEventsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearEventsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearEventsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/backgroundservice/events.go b/vendor/github.com/chromedp/cdproto/backgroundservice/events.go
deleted file mode 100644
index f2eae95dd21..00000000000
--- a/vendor/github.com/chromedp/cdproto/backgroundservice/events.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package backgroundservice
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventRecordingStateChanged called when the recording state for the service
-// has been updated.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#event-recordingStateChanged
-type EventRecordingStateChanged struct {
- IsRecording bool `json:"isRecording"`
- Service ServiceName `json:"service"`
-}
-
-// EventBackgroundServiceEventReceived called with all existing
-// backgroundServiceEvents when enabled, and all new events afterwards if
-// enabled and recording.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#event-backgroundServiceEventReceived
-type EventBackgroundServiceEventReceived struct {
- BackgroundServiceEvent *Event `json:"backgroundServiceEvent"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/backgroundservice/types.go b/vendor/github.com/chromedp/cdproto/backgroundservice/types.go
deleted file mode 100644
index 10257cdab41..00000000000
--- a/vendor/github.com/chromedp/cdproto/backgroundservice/types.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package backgroundservice
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/serviceworker"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// ServiceName the Background Service that will be associated with the
-// commands/events. Every Background Service operates independently, but they
-// share the same API.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#type-ServiceName
-type ServiceName string
-
-// String returns the ServiceName as string value.
-func (t ServiceName) String() string {
- return string(t)
-}
-
-// ServiceName values.
-const (
- ServiceNameBackgroundFetch ServiceName = "backgroundFetch"
- ServiceNameBackgroundSync ServiceName = "backgroundSync"
- ServiceNamePushMessaging ServiceName = "pushMessaging"
- ServiceNameNotifications ServiceName = "notifications"
- ServiceNamePaymentHandler ServiceName = "paymentHandler"
- ServiceNamePeriodicBackgroundSync ServiceName = "periodicBackgroundSync"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ServiceName) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ServiceName) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ServiceName) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ServiceName(in.String()) {
- case ServiceNameBackgroundFetch:
- *t = ServiceNameBackgroundFetch
- case ServiceNameBackgroundSync:
- *t = ServiceNameBackgroundSync
- case ServiceNamePushMessaging:
- *t = ServiceNamePushMessaging
- case ServiceNameNotifications:
- *t = ServiceNameNotifications
- case ServiceNamePaymentHandler:
- *t = ServiceNamePaymentHandler
- case ServiceNamePeriodicBackgroundSync:
- *t = ServiceNamePeriodicBackgroundSync
-
- default:
- in.AddError(errors.New("unknown ServiceName value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ServiceName) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// EventMetadata a key-value pair for additional event information to pass
-// along.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#type-EventMetadata
-type EventMetadata struct {
- Key string `json:"key"`
- Value string `json:"value"`
-}
-
-// Event [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#type-BackgroundServiceEvent
-type Event struct {
- Timestamp *cdp.TimeSinceEpoch `json:"timestamp"` // Timestamp of the event (in seconds).
- Origin string `json:"origin"` // The origin this event belongs to.
- ServiceWorkerRegistrationID serviceworker.RegistrationID `json:"serviceWorkerRegistrationId"` // The Service Worker ID that initiated the event.
- Service ServiceName `json:"service"` // The Background Service this event belongs to.
- EventName string `json:"eventName"` // A description of the event.
- InstanceID string `json:"instanceId"` // An identifier that groups related events together.
- EventMetadata []*EventMetadata `json:"eventMetadata"` // A list of event-specific information.
-}
diff --git a/vendor/github.com/chromedp/cdproto/browser/browser.go b/vendor/github.com/chromedp/cdproto/browser/browser.go
deleted file mode 100644
index 5a71127bcc6..00000000000
--- a/vendor/github.com/chromedp/cdproto/browser/browser.go
+++ /dev/null
@@ -1,587 +0,0 @@
-// Package browser provides the Chrome DevTools Protocol
-// commands, types, and events for the Browser domain.
-//
-// The Browser domain defines methods and events for browser managing.
-//
-// Generated by the cdproto-gen command.
-package browser
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/target"
-)
-
-// SetPermissionParams set permission settings for given origin.
-type SetPermissionParams struct {
- Permission *PermissionDescriptor `json:"permission"` // Descriptor of permission to override.
- Setting PermissionSetting `json:"setting"` // Setting of the permission.
- Origin string `json:"origin,omitempty"` // Origin the permission applies to, all origins if not specified.
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // Context to override. When omitted, default browser context is used.
-}
-
-// SetPermission set permission settings for given origin.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setPermission
-//
-// parameters:
-// permission - Descriptor of permission to override.
-// setting - Setting of the permission.
-func SetPermission(permission *PermissionDescriptor, setting PermissionSetting) *SetPermissionParams {
- return &SetPermissionParams{
- Permission: permission,
- Setting: setting,
- }
-}
-
-// WithOrigin origin the permission applies to, all origins if not specified.
-func (p SetPermissionParams) WithOrigin(origin string) *SetPermissionParams {
- p.Origin = origin
- return &p
-}
-
-// WithBrowserContextID context to override. When omitted, default browser
-// context is used.
-func (p SetPermissionParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *SetPermissionParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Browser.setPermission against the provided context.
-func (p *SetPermissionParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPermission, p, nil)
-}
-
-// GrantPermissionsParams grant specific permissions to the given origin and
-// reject all others.
-type GrantPermissionsParams struct {
- Permissions []PermissionType `json:"permissions"`
- Origin string `json:"origin,omitempty"` // Origin the permission applies to, all origins if not specified.
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to override permissions. When omitted, default browser context is used.
-}
-
-// GrantPermissions grant specific permissions to the given origin and reject
-// all others.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-grantPermissions
-//
-// parameters:
-// permissions
-func GrantPermissions(permissions []PermissionType) *GrantPermissionsParams {
- return &GrantPermissionsParams{
- Permissions: permissions,
- }
-}
-
-// WithOrigin origin the permission applies to, all origins if not specified.
-func (p GrantPermissionsParams) WithOrigin(origin string) *GrantPermissionsParams {
- p.Origin = origin
- return &p
-}
-
-// WithBrowserContextID browserContext to override permissions. When omitted,
-// default browser context is used.
-func (p GrantPermissionsParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *GrantPermissionsParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Browser.grantPermissions against the provided context.
-func (p *GrantPermissionsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandGrantPermissions, p, nil)
-}
-
-// ResetPermissionsParams reset all permission management for all origins.
-type ResetPermissionsParams struct {
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to reset permissions. When omitted, default browser context is used.
-}
-
-// ResetPermissions reset all permission management for all origins.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-resetPermissions
-//
-// parameters:
-func ResetPermissions() *ResetPermissionsParams {
- return &ResetPermissionsParams{}
-}
-
-// WithBrowserContextID browserContext to reset permissions. When omitted,
-// default browser context is used.
-func (p ResetPermissionsParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *ResetPermissionsParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Browser.resetPermissions against the provided context.
-func (p *ResetPermissionsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandResetPermissions, p, nil)
-}
-
-// SetDownloadBehaviorParams set the behavior when downloading a file.
-type SetDownloadBehaviorParams struct {
- Behavior SetDownloadBehaviorBehavior `json:"behavior"` // Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids.
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to set download behavior. When omitted, default browser context is used.
- DownloadPath string `json:"downloadPath,omitempty"` // The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.
- EventsEnabled bool `json:"eventsEnabled,omitempty"` // Whether to emit download events (defaults to false).
-}
-
-// SetDownloadBehavior set the behavior when downloading a file.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
-//
-// parameters:
-// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids.
-func SetDownloadBehavior(behavior SetDownloadBehaviorBehavior) *SetDownloadBehaviorParams {
- return &SetDownloadBehaviorParams{
- Behavior: behavior,
- }
-}
-
-// WithBrowserContextID browserContext to set download behavior. When
-// omitted, default browser context is used.
-func (p SetDownloadBehaviorParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *SetDownloadBehaviorParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// WithDownloadPath the default path to save downloaded files to. This is
-// required if behavior is set to 'allow' or 'allowAndName'.
-func (p SetDownloadBehaviorParams) WithDownloadPath(downloadPath string) *SetDownloadBehaviorParams {
- p.DownloadPath = downloadPath
- return &p
-}
-
-// WithEventsEnabled whether to emit download events (defaults to false).
-func (p SetDownloadBehaviorParams) WithEventsEnabled(eventsEnabled bool) *SetDownloadBehaviorParams {
- p.EventsEnabled = eventsEnabled
- return &p
-}
-
-// Do executes Browser.setDownloadBehavior against the provided context.
-func (p *SetDownloadBehaviorParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDownloadBehavior, p, nil)
-}
-
-// CancelDownloadParams cancel a download if in progress.
-type CancelDownloadParams struct {
- GUID string `json:"guid"` // Global unique identifier of the download.
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // BrowserContext to perform the action in. When omitted, default browser context is used.
-}
-
-// CancelDownload cancel a download if in progress.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-cancelDownload
-//
-// parameters:
-// guid - Global unique identifier of the download.
-func CancelDownload(guid string) *CancelDownloadParams {
- return &CancelDownloadParams{
- GUID: guid,
- }
-}
-
-// WithBrowserContextID browserContext to perform the action in. When
-// omitted, default browser context is used.
-func (p CancelDownloadParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *CancelDownloadParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Browser.cancelDownload against the provided context.
-func (p *CancelDownloadParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCancelDownload, p, nil)
-}
-
-// CloseParams close browser gracefully.
-type CloseParams struct{}
-
-// Close close browser gracefully.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-close
-func Close() *CloseParams {
- return &CloseParams{}
-}
-
-// Do executes Browser.close against the provided context.
-func (p *CloseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClose, nil, nil)
-}
-
-// CrashParams crashes browser on the main thread.
-type CrashParams struct{}
-
-// Crash crashes browser on the main thread.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crash
-func Crash() *CrashParams {
- return &CrashParams{}
-}
-
-// Do executes Browser.crash against the provided context.
-func (p *CrashParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCrash, nil, nil)
-}
-
-// CrashGpuProcessParams crashes GPU process.
-type CrashGpuProcessParams struct{}
-
-// CrashGpuProcess crashes GPU process.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-crashGpuProcess
-func CrashGpuProcess() *CrashGpuProcessParams {
- return &CrashGpuProcessParams{}
-}
-
-// Do executes Browser.crashGpuProcess against the provided context.
-func (p *CrashGpuProcessParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCrashGpuProcess, nil, nil)
-}
-
-// GetVersionParams returns version information.
-type GetVersionParams struct{}
-
-// GetVersion returns version information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getVersion
-func GetVersion() *GetVersionParams {
- return &GetVersionParams{}
-}
-
-// GetVersionReturns return values.
-type GetVersionReturns struct {
- ProtocolVersion string `json:"protocolVersion,omitempty"` // Protocol version.
- Product string `json:"product,omitempty"` // Product name.
- Revision string `json:"revision,omitempty"` // Product revision.
- UserAgent string `json:"userAgent,omitempty"` // User-Agent.
- JsVersion string `json:"jsVersion,omitempty"` // V8 version.
-}
-
-// Do executes Browser.getVersion against the provided context.
-//
-// returns:
-// protocolVersion - Protocol version.
-// product - Product name.
-// revision - Product revision.
-// userAgent - User-Agent.
-// jsVersion - V8 version.
-func (p *GetVersionParams) Do(ctx context.Context) (protocolVersion string, product string, revision string, userAgent string, jsVersion string, err error) {
- // execute
- var res GetVersionReturns
- err = cdp.Execute(ctx, CommandGetVersion, nil, &res)
- if err != nil {
- return "", "", "", "", "", err
- }
-
- return res.ProtocolVersion, res.Product, res.Revision, res.UserAgent, res.JsVersion, nil
-}
-
-// GetBrowserCommandLineParams returns the command line switches for the
-// browser process if, and only if --enable-automation is on the commandline.
-type GetBrowserCommandLineParams struct{}
-
-// GetBrowserCommandLine returns the command line switches for the browser
-// process if, and only if --enable-automation is on the commandline.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getBrowserCommandLine
-func GetBrowserCommandLine() *GetBrowserCommandLineParams {
- return &GetBrowserCommandLineParams{}
-}
-
-// GetBrowserCommandLineReturns return values.
-type GetBrowserCommandLineReturns struct {
- Arguments []string `json:"arguments,omitempty"` // Commandline parameters
-}
-
-// Do executes Browser.getBrowserCommandLine against the provided context.
-//
-// returns:
-// arguments - Commandline parameters
-func (p *GetBrowserCommandLineParams) Do(ctx context.Context) (arguments []string, err error) {
- // execute
- var res GetBrowserCommandLineReturns
- err = cdp.Execute(ctx, CommandGetBrowserCommandLine, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Arguments, nil
-}
-
-// GetHistogramsParams get Chrome histograms.
-type GetHistogramsParams struct {
- Query string `json:"query,omitempty"` // Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
- Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call.
-}
-
-// GetHistograms get Chrome histograms.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistograms
-//
-// parameters:
-func GetHistograms() *GetHistogramsParams {
- return &GetHistogramsParams{}
-}
-
-// WithQuery requested substring in name. Only histograms which have query as
-// a substring in their name are extracted. An empty or absent query returns all
-// histograms.
-func (p GetHistogramsParams) WithQuery(query string) *GetHistogramsParams {
- p.Query = query
- return &p
-}
-
-// WithDelta if true, retrieve delta since last call.
-func (p GetHistogramsParams) WithDelta(delta bool) *GetHistogramsParams {
- p.Delta = delta
- return &p
-}
-
-// GetHistogramsReturns return values.
-type GetHistogramsReturns struct {
- Histograms []*Histogram `json:"histograms,omitempty"` // Histograms.
-}
-
-// Do executes Browser.getHistograms against the provided context.
-//
-// returns:
-// histograms - Histograms.
-func (p *GetHistogramsParams) Do(ctx context.Context) (histograms []*Histogram, err error) {
- // execute
- var res GetHistogramsReturns
- err = cdp.Execute(ctx, CommandGetHistograms, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Histograms, nil
-}
-
-// GetHistogramParams get a Chrome histogram by name.
-type GetHistogramParams struct {
- Name string `json:"name"` // Requested histogram name.
- Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call.
-}
-
-// GetHistogram get a Chrome histogram by name.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistogram
-//
-// parameters:
-// name - Requested histogram name.
-func GetHistogram(name string) *GetHistogramParams {
- return &GetHistogramParams{
- Name: name,
- }
-}
-
-// WithDelta if true, retrieve delta since last call.
-func (p GetHistogramParams) WithDelta(delta bool) *GetHistogramParams {
- p.Delta = delta
- return &p
-}
-
-// GetHistogramReturns return values.
-type GetHistogramReturns struct {
- Histogram *Histogram `json:"histogram,omitempty"` // Histogram.
-}
-
-// Do executes Browser.getHistogram against the provided context.
-//
-// returns:
-// histogram - Histogram.
-func (p *GetHistogramParams) Do(ctx context.Context) (histogram *Histogram, err error) {
- // execute
- var res GetHistogramReturns
- err = cdp.Execute(ctx, CommandGetHistogram, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Histogram, nil
-}
-
-// GetWindowBoundsParams get position and size of the browser window.
-type GetWindowBoundsParams struct {
- WindowID WindowID `json:"windowId"` // Browser window id.
-}
-
-// GetWindowBounds get position and size of the browser window.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowBounds
-//
-// parameters:
-// windowID - Browser window id.
-func GetWindowBounds(windowID WindowID) *GetWindowBoundsParams {
- return &GetWindowBoundsParams{
- WindowID: windowID,
- }
-}
-
-// GetWindowBoundsReturns return values.
-type GetWindowBoundsReturns struct {
- Bounds *Bounds `json:"bounds,omitempty"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
-}
-
-// Do executes Browser.getWindowBounds against the provided context.
-//
-// returns:
-// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
-func (p *GetWindowBoundsParams) Do(ctx context.Context) (bounds *Bounds, err error) {
- // execute
- var res GetWindowBoundsReturns
- err = cdp.Execute(ctx, CommandGetWindowBounds, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Bounds, nil
-}
-
-// GetWindowForTargetParams get the browser window that contains the devtools
-// target.
-type GetWindowForTargetParams struct {
- TargetID target.ID `json:"targetId,omitempty"` // Devtools agent host id. If called as a part of the session, associated targetId is used.
-}
-
-// GetWindowForTarget get the browser window that contains the devtools
-// target.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowForTarget
-//
-// parameters:
-func GetWindowForTarget() *GetWindowForTargetParams {
- return &GetWindowForTargetParams{}
-}
-
-// WithTargetID devtools agent host id. If called as a part of the session,
-// associated targetId is used.
-func (p GetWindowForTargetParams) WithTargetID(targetID target.ID) *GetWindowForTargetParams {
- p.TargetID = targetID
- return &p
-}
-
-// GetWindowForTargetReturns return values.
-type GetWindowForTargetReturns struct {
- WindowID WindowID `json:"windowId,omitempty"` // Browser window id.
- Bounds *Bounds `json:"bounds,omitempty"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
-}
-
-// Do executes Browser.getWindowForTarget against the provided context.
-//
-// returns:
-// windowID - Browser window id.
-// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
-func (p *GetWindowForTargetParams) Do(ctx context.Context) (windowID WindowID, bounds *Bounds, err error) {
- // execute
- var res GetWindowForTargetReturns
- err = cdp.Execute(ctx, CommandGetWindowForTarget, p, &res)
- if err != nil {
- return 0, nil, err
- }
-
- return res.WindowID, res.Bounds, nil
-}
-
-// SetWindowBoundsParams set position and/or size of the browser window.
-type SetWindowBoundsParams struct {
- WindowID WindowID `json:"windowId"` // Browser window id.
- Bounds *Bounds `json:"bounds"` // New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
-}
-
-// SetWindowBounds set position and/or size of the browser window.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setWindowBounds
-//
-// parameters:
-// windowID - Browser window id.
-// bounds - New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
-func SetWindowBounds(windowID WindowID, bounds *Bounds) *SetWindowBoundsParams {
- return &SetWindowBoundsParams{
- WindowID: windowID,
- Bounds: bounds,
- }
-}
-
-// Do executes Browser.setWindowBounds against the provided context.
-func (p *SetWindowBoundsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetWindowBounds, p, nil)
-}
-
-// SetDockTileParams set dock tile details, platform-specific.
-type SetDockTileParams struct {
- BadgeLabel string `json:"badgeLabel,omitempty"`
- Image string `json:"image,omitempty"` // Png encoded image.
-}
-
-// SetDockTile set dock tile details, platform-specific.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDockTile
-//
-// parameters:
-func SetDockTile() *SetDockTileParams {
- return &SetDockTileParams{}
-}
-
-// WithBadgeLabel [no description].
-func (p SetDockTileParams) WithBadgeLabel(badgeLabel string) *SetDockTileParams {
- p.BadgeLabel = badgeLabel
- return &p
-}
-
-// WithImage png encoded image.
-func (p SetDockTileParams) WithImage(image string) *SetDockTileParams {
- p.Image = image
- return &p
-}
-
-// Do executes Browser.setDockTile against the provided context.
-func (p *SetDockTileParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDockTile, p, nil)
-}
-
-// ExecuteBrowserCommandParams invoke custom browser commands used by
-// telemetry.
-type ExecuteBrowserCommandParams struct {
- CommandID CommandID `json:"commandId"`
-}
-
-// ExecuteBrowserCommand invoke custom browser commands used by telemetry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-executeBrowserCommand
-//
-// parameters:
-// commandID
-func ExecuteBrowserCommand(commandID CommandID) *ExecuteBrowserCommandParams {
- return &ExecuteBrowserCommandParams{
- CommandID: commandID,
- }
-}
-
-// Do executes Browser.executeBrowserCommand against the provided context.
-func (p *ExecuteBrowserCommandParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandExecuteBrowserCommand, p, nil)
-}
-
-// Command names.
-const (
- CommandSetPermission = "Browser.setPermission"
- CommandGrantPermissions = "Browser.grantPermissions"
- CommandResetPermissions = "Browser.resetPermissions"
- CommandSetDownloadBehavior = "Browser.setDownloadBehavior"
- CommandCancelDownload = "Browser.cancelDownload"
- CommandClose = "Browser.close"
- CommandCrash = "Browser.crash"
- CommandCrashGpuProcess = "Browser.crashGpuProcess"
- CommandGetVersion = "Browser.getVersion"
- CommandGetBrowserCommandLine = "Browser.getBrowserCommandLine"
- CommandGetHistograms = "Browser.getHistograms"
- CommandGetHistogram = "Browser.getHistogram"
- CommandGetWindowBounds = "Browser.getWindowBounds"
- CommandGetWindowForTarget = "Browser.getWindowForTarget"
- CommandSetWindowBounds = "Browser.setWindowBounds"
- CommandSetDockTile = "Browser.setDockTile"
- CommandExecuteBrowserCommand = "Browser.executeBrowserCommand"
-)
diff --git a/vendor/github.com/chromedp/cdproto/browser/easyjson.go b/vendor/github.com/chromedp/cdproto/browser/easyjson.go
deleted file mode 100644
index 95854e0b8bc..00000000000
--- a/vendor/github.com/chromedp/cdproto/browser/easyjson.go
+++ /dev/null
@@ -1,2421 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package browser
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- target "github.com/chromedp/cdproto/target"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(in *jlexer.Lexer, out *SetWindowBoundsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "windowId":
- out.WindowID = WindowID(in.Int64())
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- if out.Bounds == nil {
- out.Bounds = new(Bounds)
- }
- (*out.Bounds).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(out *jwriter.Writer, in SetWindowBoundsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"windowId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.WindowID))
- }
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix)
- if in.Bounds == nil {
- out.RawString("null")
- } else {
- (*in.Bounds).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetWindowBoundsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetWindowBoundsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(in *jlexer.Lexer, out *SetPermissionParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "permission":
- if in.IsNull() {
- in.Skip()
- out.Permission = nil
- } else {
- if out.Permission == nil {
- out.Permission = new(PermissionDescriptor)
- }
- (*out.Permission).UnmarshalEasyJSON(in)
- }
- case "setting":
- (out.Setting).UnmarshalEasyJSON(in)
- case "origin":
- out.Origin = string(in.String())
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(out *jwriter.Writer, in SetPermissionParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"permission\":"
- out.RawString(prefix[1:])
- if in.Permission == nil {
- out.RawString("null")
- } else {
- (*in.Permission).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"setting\":"
- out.RawString(prefix)
- (in.Setting).MarshalEasyJSON(out)
- }
- if in.Origin != "" {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- out.String(string(in.Origin))
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPermissionParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPermissionParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPermissionParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPermissionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(in *jlexer.Lexer, out *SetDownloadBehaviorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "behavior":
- (out.Behavior).UnmarshalEasyJSON(in)
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- case "downloadPath":
- out.DownloadPath = string(in.String())
- case "eventsEnabled":
- out.EventsEnabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(out *jwriter.Writer, in SetDownloadBehaviorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"behavior\":"
- out.RawString(prefix[1:])
- (in.Behavior).MarshalEasyJSON(out)
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- if in.DownloadPath != "" {
- const prefix string = ",\"downloadPath\":"
- out.RawString(prefix)
- out.String(string(in.DownloadPath))
- }
- if in.EventsEnabled {
- const prefix string = ",\"eventsEnabled\":"
- out.RawString(prefix)
- out.Bool(bool(in.EventsEnabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDownloadBehaviorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDownloadBehaviorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDownloadBehaviorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDownloadBehaviorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(in *jlexer.Lexer, out *SetDockTileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "badgeLabel":
- out.BadgeLabel = string(in.String())
- case "image":
- out.Image = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(out *jwriter.Writer, in SetDockTileParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BadgeLabel != "" {
- const prefix string = ",\"badgeLabel\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BadgeLabel))
- }
- if in.Image != "" {
- const prefix string = ",\"image\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Image))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDockTileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDockTileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDockTileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDockTileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(in *jlexer.Lexer, out *ResetPermissionsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(out *jwriter.Writer, in ResetPermissionsParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResetPermissionsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResetPermissionsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResetPermissionsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResetPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(in *jlexer.Lexer, out *PermissionDescriptor) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "sysex":
- out.Sysex = bool(in.Bool())
- case "userVisibleOnly":
- out.UserVisibleOnly = bool(in.Bool())
- case "allowWithoutSanitization":
- out.AllowWithoutSanitization = bool(in.Bool())
- case "panTiltZoom":
- out.PanTiltZoom = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(out *jwriter.Writer, in PermissionDescriptor) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.Sysex {
- const prefix string = ",\"sysex\":"
- out.RawString(prefix)
- out.Bool(bool(in.Sysex))
- }
- if in.UserVisibleOnly {
- const prefix string = ",\"userVisibleOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.UserVisibleOnly))
- }
- if in.AllowWithoutSanitization {
- const prefix string = ",\"allowWithoutSanitization\":"
- out.RawString(prefix)
- out.Bool(bool(in.AllowWithoutSanitization))
- }
- if in.PanTiltZoom {
- const prefix string = ",\"panTiltZoom\":"
- out.RawString(prefix)
- out.Bool(bool(in.PanTiltZoom))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PermissionDescriptor) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PermissionDescriptor) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PermissionDescriptor) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PermissionDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(in *jlexer.Lexer, out *Histogram) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "sum":
- out.Sum = int64(in.Int64())
- case "count":
- out.Count = int64(in.Int64())
- case "buckets":
- if in.IsNull() {
- in.Skip()
- out.Buckets = nil
- } else {
- in.Delim('[')
- if out.Buckets == nil {
- if !in.IsDelim(']') {
- out.Buckets = make([]*Bucket, 0, 8)
- } else {
- out.Buckets = []*Bucket{}
- }
- } else {
- out.Buckets = (out.Buckets)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *Bucket
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(Bucket)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Buckets = append(out.Buckets, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(out *jwriter.Writer, in Histogram) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"sum\":"
- out.RawString(prefix)
- out.Int64(int64(in.Sum))
- }
- {
- const prefix string = ",\"count\":"
- out.RawString(prefix)
- out.Int64(int64(in.Count))
- }
- {
- const prefix string = ",\"buckets\":"
- out.RawString(prefix)
- if in.Buckets == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Buckets {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Histogram) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Histogram) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Histogram) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Histogram) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(in *jlexer.Lexer, out *GrantPermissionsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "permissions":
- if in.IsNull() {
- in.Skip()
- out.Permissions = nil
- } else {
- in.Delim('[')
- if out.Permissions == nil {
- if !in.IsDelim(']') {
- out.Permissions = make([]PermissionType, 0, 4)
- } else {
- out.Permissions = []PermissionType{}
- }
- } else {
- out.Permissions = (out.Permissions)[:0]
- }
- for !in.IsDelim(']') {
- var v4 PermissionType
- (v4).UnmarshalEasyJSON(in)
- out.Permissions = append(out.Permissions, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "origin":
- out.Origin = string(in.String())
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(out *jwriter.Writer, in GrantPermissionsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"permissions\":"
- out.RawString(prefix[1:])
- if in.Permissions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Permissions {
- if v5 > 0 {
- out.RawByte(',')
- }
- (v6).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- if in.Origin != "" {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- out.String(string(in.Origin))
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GrantPermissionsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GrantPermissionsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GrantPermissionsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GrantPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(in *jlexer.Lexer, out *GetWindowForTargetReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "windowId":
- out.WindowID = WindowID(in.Int64())
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- if out.Bounds == nil {
- out.Bounds = new(Bounds)
- }
- (*out.Bounds).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(out *jwriter.Writer, in GetWindowForTargetReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.WindowID != 0 {
- const prefix string = ",\"windowId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.WindowID))
- }
- if in.Bounds != nil {
- const prefix string = ",\"bounds\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Bounds).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetWindowForTargetReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetWindowForTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetWindowForTargetReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetWindowForTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(in *jlexer.Lexer, out *GetWindowForTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = target.ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(out *jwriter.Writer, in GetWindowForTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TargetID != "" {
- const prefix string = ",\"targetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetWindowForTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetWindowForTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetWindowForTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetWindowForTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(in *jlexer.Lexer, out *GetWindowBoundsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- if out.Bounds == nil {
- out.Bounds = new(Bounds)
- }
- (*out.Bounds).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(out *jwriter.Writer, in GetWindowBoundsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Bounds != nil {
- const prefix string = ",\"bounds\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Bounds).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetWindowBoundsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetWindowBoundsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetWindowBoundsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetWindowBoundsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(in *jlexer.Lexer, out *GetWindowBoundsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "windowId":
- out.WindowID = WindowID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(out *jwriter.Writer, in GetWindowBoundsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"windowId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.WindowID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetWindowBoundsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetWindowBoundsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(in *jlexer.Lexer, out *GetVersionReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "protocolVersion":
- out.ProtocolVersion = string(in.String())
- case "product":
- out.Product = string(in.String())
- case "revision":
- out.Revision = string(in.String())
- case "userAgent":
- out.UserAgent = string(in.String())
- case "jsVersion":
- out.JsVersion = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(out *jwriter.Writer, in GetVersionReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ProtocolVersion != "" {
- const prefix string = ",\"protocolVersion\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ProtocolVersion))
- }
- if in.Product != "" {
- const prefix string = ",\"product\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Product))
- }
- if in.Revision != "" {
- const prefix string = ",\"revision\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Revision))
- }
- if in.UserAgent != "" {
- const prefix string = ",\"userAgent\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.UserAgent))
- }
- if in.JsVersion != "" {
- const prefix string = ",\"jsVersion\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.JsVersion))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetVersionReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetVersionReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetVersionReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetVersionReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(in *jlexer.Lexer, out *GetVersionParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(out *jwriter.Writer, in GetVersionParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetVersionParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetVersionParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetVersionParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(in *jlexer.Lexer, out *GetHistogramsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "histograms":
- if in.IsNull() {
- in.Skip()
- out.Histograms = nil
- } else {
- in.Delim('[')
- if out.Histograms == nil {
- if !in.IsDelim(']') {
- out.Histograms = make([]*Histogram, 0, 8)
- } else {
- out.Histograms = []*Histogram{}
- }
- } else {
- out.Histograms = (out.Histograms)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Histogram
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Histogram)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Histograms = append(out.Histograms, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(out *jwriter.Writer, in GetHistogramsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Histograms) != 0 {
- const prefix string = ",\"histograms\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Histograms {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHistogramsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHistogramsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHistogramsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHistogramsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(in *jlexer.Lexer, out *GetHistogramsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "query":
- out.Query = string(in.String())
- case "delta":
- out.Delta = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(out *jwriter.Writer, in GetHistogramsParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Query != "" {
- const prefix string = ",\"query\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Query))
- }
- if in.Delta {
- const prefix string = ",\"delta\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Delta))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHistogramsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHistogramsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHistogramsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHistogramsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(in *jlexer.Lexer, out *GetHistogramReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "histogram":
- if in.IsNull() {
- in.Skip()
- out.Histogram = nil
- } else {
- if out.Histogram == nil {
- out.Histogram = new(Histogram)
- }
- (*out.Histogram).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(out *jwriter.Writer, in GetHistogramReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Histogram != nil {
- const prefix string = ",\"histogram\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Histogram).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHistogramReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHistogramReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHistogramReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHistogramReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(in *jlexer.Lexer, out *GetHistogramParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "delta":
- out.Delta = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(out *jwriter.Writer, in GetHistogramParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.Delta {
- const prefix string = ",\"delta\":"
- out.RawString(prefix)
- out.Bool(bool(in.Delta))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHistogramParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHistogramParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHistogramParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHistogramParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(in *jlexer.Lexer, out *GetBrowserCommandLineReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "arguments":
- if in.IsNull() {
- in.Skip()
- out.Arguments = nil
- } else {
- in.Delim('[')
- if out.Arguments == nil {
- if !in.IsDelim(']') {
- out.Arguments = make([]string, 0, 4)
- } else {
- out.Arguments = []string{}
- }
- } else {
- out.Arguments = (out.Arguments)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Arguments = append(out.Arguments, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(out *jwriter.Writer, in GetBrowserCommandLineReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Arguments) != 0 {
- const prefix string = ",\"arguments\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v11, v12 := range in.Arguments {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserCommandLineReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserCommandLineReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserCommandLineReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserCommandLineReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(in *jlexer.Lexer, out *GetBrowserCommandLineParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(out *jwriter.Writer, in GetBrowserCommandLineParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserCommandLineParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserCommandLineParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserCommandLineParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserCommandLineParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(in *jlexer.Lexer, out *ExecuteBrowserCommandParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "commandId":
- (out.CommandID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(out *jwriter.Writer, in ExecuteBrowserCommandParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"commandId\":"
- out.RawString(prefix[1:])
- (in.CommandID).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExecuteBrowserCommandParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExecuteBrowserCommandParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExecuteBrowserCommandParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExecuteBrowserCommandParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(in *jlexer.Lexer, out *EventDownloadWillBegin) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "guid":
- out.GUID = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "suggestedFilename":
- out.SuggestedFilename = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(out *jwriter.Writer, in EventDownloadWillBegin) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"guid\":"
- out.RawString(prefix)
- out.String(string(in.GUID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"suggestedFilename\":"
- out.RawString(prefix)
- out.String(string(in.SuggestedFilename))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDownloadWillBegin) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDownloadWillBegin) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDownloadWillBegin) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDownloadWillBegin) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(in *jlexer.Lexer, out *EventDownloadProgress) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "guid":
- out.GUID = string(in.String())
- case "totalBytes":
- out.TotalBytes = float64(in.Float64())
- case "receivedBytes":
- out.ReceivedBytes = float64(in.Float64())
- case "state":
- (out.State).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(out *jwriter.Writer, in EventDownloadProgress) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"guid\":"
- out.RawString(prefix[1:])
- out.String(string(in.GUID))
- }
- {
- const prefix string = ",\"totalBytes\":"
- out.RawString(prefix)
- out.Float64(float64(in.TotalBytes))
- }
- {
- const prefix string = ",\"receivedBytes\":"
- out.RawString(prefix)
- out.Float64(float64(in.ReceivedBytes))
- }
- {
- const prefix string = ",\"state\":"
- out.RawString(prefix)
- (in.State).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDownloadProgress) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDownloadProgress) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDownloadProgress) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDownloadProgress) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(in *jlexer.Lexer, out *CrashParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(out *jwriter.Writer, in CrashParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CrashParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CrashParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CrashParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CrashParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(in *jlexer.Lexer, out *CrashGpuProcessParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(out *jwriter.Writer, in CrashGpuProcessParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CrashGpuProcessParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CrashGpuProcessParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CrashGpuProcessParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CrashGpuProcessParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(in *jlexer.Lexer, out *CloseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(out *jwriter.Writer, in CloseParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CloseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CloseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(in *jlexer.Lexer, out *CancelDownloadParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "guid":
- out.GUID = string(in.String())
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(out *jwriter.Writer, in CancelDownloadParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"guid\":"
- out.RawString(prefix[1:])
- out.String(string(in.GUID))
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CancelDownloadParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CancelDownloadParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CancelDownloadParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CancelDownloadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(in *jlexer.Lexer, out *Bucket) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "low":
- out.Low = int64(in.Int64())
- case "high":
- out.High = int64(in.Int64())
- case "count":
- out.Count = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(out *jwriter.Writer, in Bucket) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"low\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Low))
- }
- {
- const prefix string = ",\"high\":"
- out.RawString(prefix)
- out.Int64(int64(in.High))
- }
- {
- const prefix string = ",\"count\":"
- out.RawString(prefix)
- out.Int64(int64(in.Count))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Bucket) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Bucket) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Bucket) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Bucket) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(in *jlexer.Lexer, out *Bounds) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "left":
- out.Left = int64(in.Int64())
- case "top":
- out.Top = int64(in.Int64())
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- case "windowState":
- (out.WindowState).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(out *jwriter.Writer, in Bounds) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Left != 0 {
- const prefix string = ",\"left\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.Left))
- }
- if in.Top != 0 {
- const prefix string = ",\"top\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Top))
- }
- if in.Width != 0 {
- const prefix string = ",\"width\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Width))
- }
- if in.Height != 0 {
- const prefix string = ",\"height\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Height))
- }
- if in.WindowState != "" {
- const prefix string = ",\"windowState\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.WindowState).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Bounds) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Bounds) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Bounds) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Bounds) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/browser/events.go b/vendor/github.com/chromedp/cdproto/browser/events.go
deleted file mode 100644
index fd7368d191f..00000000000
--- a/vendor/github.com/chromedp/cdproto/browser/events.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package browser
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EventDownloadWillBegin fired when page is about to start a download.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadWillBegin
-type EventDownloadWillBegin struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that caused the download to begin.
- GUID string `json:"guid"` // Global unique identifier of the download.
- URL string `json:"url"` // URL of the resource being downloaded.
- SuggestedFilename string `json:"suggestedFilename"` // Suggested file name of the resource (the actual name of the file saved on disk may differ).
-}
-
-// EventDownloadProgress fired when download makes progress. Last call has
-// |done| == true.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
-type EventDownloadProgress struct {
- GUID string `json:"guid"` // Global unique identifier of the download.
- TotalBytes float64 `json:"totalBytes"` // Total expected bytes to download.
- ReceivedBytes float64 `json:"receivedBytes"` // Total bytes received.
- State DownloadProgressState `json:"state"` // Download status.
-}
diff --git a/vendor/github.com/chromedp/cdproto/browser/types.go b/vendor/github.com/chromedp/cdproto/browser/types.go
deleted file mode 100644
index 81f89710dc4..00000000000
--- a/vendor/github.com/chromedp/cdproto/browser/types.go
+++ /dev/null
@@ -1,412 +0,0 @@
-package browser
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// WindowID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowID
-type WindowID int64
-
-// Int64 returns the WindowID as int64 value.
-func (t WindowID) Int64() int64 {
- return int64(t)
-}
-
-// WindowState the state of the browser window.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-WindowState
-type WindowState string
-
-// String returns the WindowState as string value.
-func (t WindowState) String() string {
- return string(t)
-}
-
-// WindowState values.
-const (
- WindowStateNormal WindowState = "normal"
- WindowStateMinimized WindowState = "minimized"
- WindowStateMaximized WindowState = "maximized"
- WindowStateFullscreen WindowState = "fullscreen"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t WindowState) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t WindowState) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *WindowState) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch WindowState(in.String()) {
- case WindowStateNormal:
- *t = WindowStateNormal
- case WindowStateMinimized:
- *t = WindowStateMinimized
- case WindowStateMaximized:
- *t = WindowStateMaximized
- case WindowStateFullscreen:
- *t = WindowStateFullscreen
-
- default:
- in.AddError(errors.New("unknown WindowState value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *WindowState) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Bounds browser window bounds information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bounds
-type Bounds struct {
- Left int64 `json:"left,omitempty"` // The offset from the left edge of the screen to the window in pixels.
- Top int64 `json:"top,omitempty"` // The offset from the top edge of the screen to the window in pixels.
- Width int64 `json:"width,omitempty"` // The window width in pixels.
- Height int64 `json:"height,omitempty"` // The window height in pixels.
- WindowState WindowState `json:"windowState,omitempty"` // The window state. Default to normal.
-}
-
-// PermissionType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionType
-type PermissionType string
-
-// String returns the PermissionType as string value.
-func (t PermissionType) String() string {
- return string(t)
-}
-
-// PermissionType values.
-const (
- PermissionTypeAccessibilityEvents PermissionType = "accessibilityEvents"
- PermissionTypeAudioCapture PermissionType = "audioCapture"
- PermissionTypeBackgroundSync PermissionType = "backgroundSync"
- PermissionTypeBackgroundFetch PermissionType = "backgroundFetch"
- PermissionTypeClipboardReadWrite PermissionType = "clipboardReadWrite"
- PermissionTypeClipboardSanitizedWrite PermissionType = "clipboardSanitizedWrite"
- PermissionTypeDisplayCapture PermissionType = "displayCapture"
- PermissionTypeDurableStorage PermissionType = "durableStorage"
- PermissionTypeFlash PermissionType = "flash"
- PermissionTypeGeolocation PermissionType = "geolocation"
- PermissionTypeMidi PermissionType = "midi"
- PermissionTypeMidiSysex PermissionType = "midiSysex"
- PermissionTypeNfc PermissionType = "nfc"
- PermissionTypeNotifications PermissionType = "notifications"
- PermissionTypePaymentHandler PermissionType = "paymentHandler"
- PermissionTypePeriodicBackgroundSync PermissionType = "periodicBackgroundSync"
- PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier"
- PermissionTypeSensors PermissionType = "sensors"
- PermissionTypeVideoCapture PermissionType = "videoCapture"
- PermissionTypeVideoCapturePanTiltZoom PermissionType = "videoCapturePanTiltZoom"
- PermissionTypeIdleDetection PermissionType = "idleDetection"
- PermissionTypeWakeLockScreen PermissionType = "wakeLockScreen"
- PermissionTypeWakeLockSystem PermissionType = "wakeLockSystem"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PermissionType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PermissionType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PermissionType(in.String()) {
- case PermissionTypeAccessibilityEvents:
- *t = PermissionTypeAccessibilityEvents
- case PermissionTypeAudioCapture:
- *t = PermissionTypeAudioCapture
- case PermissionTypeBackgroundSync:
- *t = PermissionTypeBackgroundSync
- case PermissionTypeBackgroundFetch:
- *t = PermissionTypeBackgroundFetch
- case PermissionTypeClipboardReadWrite:
- *t = PermissionTypeClipboardReadWrite
- case PermissionTypeClipboardSanitizedWrite:
- *t = PermissionTypeClipboardSanitizedWrite
- case PermissionTypeDisplayCapture:
- *t = PermissionTypeDisplayCapture
- case PermissionTypeDurableStorage:
- *t = PermissionTypeDurableStorage
- case PermissionTypeFlash:
- *t = PermissionTypeFlash
- case PermissionTypeGeolocation:
- *t = PermissionTypeGeolocation
- case PermissionTypeMidi:
- *t = PermissionTypeMidi
- case PermissionTypeMidiSysex:
- *t = PermissionTypeMidiSysex
- case PermissionTypeNfc:
- *t = PermissionTypeNfc
- case PermissionTypeNotifications:
- *t = PermissionTypeNotifications
- case PermissionTypePaymentHandler:
- *t = PermissionTypePaymentHandler
- case PermissionTypePeriodicBackgroundSync:
- *t = PermissionTypePeriodicBackgroundSync
- case PermissionTypeProtectedMediaIdentifier:
- *t = PermissionTypeProtectedMediaIdentifier
- case PermissionTypeSensors:
- *t = PermissionTypeSensors
- case PermissionTypeVideoCapture:
- *t = PermissionTypeVideoCapture
- case PermissionTypeVideoCapturePanTiltZoom:
- *t = PermissionTypeVideoCapturePanTiltZoom
- case PermissionTypeIdleDetection:
- *t = PermissionTypeIdleDetection
- case PermissionTypeWakeLockScreen:
- *t = PermissionTypeWakeLockScreen
- case PermissionTypeWakeLockSystem:
- *t = PermissionTypeWakeLockSystem
-
- default:
- in.AddError(errors.New("unknown PermissionType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PermissionType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PermissionSetting [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionSetting
-type PermissionSetting string
-
-// String returns the PermissionSetting as string value.
-func (t PermissionSetting) String() string {
- return string(t)
-}
-
-// PermissionSetting values.
-const (
- PermissionSettingGranted PermissionSetting = "granted"
- PermissionSettingDenied PermissionSetting = "denied"
- PermissionSettingPrompt PermissionSetting = "prompt"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PermissionSetting) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PermissionSetting) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PermissionSetting) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PermissionSetting(in.String()) {
- case PermissionSettingGranted:
- *t = PermissionSettingGranted
- case PermissionSettingDenied:
- *t = PermissionSettingDenied
- case PermissionSettingPrompt:
- *t = PermissionSettingPrompt
-
- default:
- in.AddError(errors.New("unknown PermissionSetting value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PermissionSetting) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PermissionDescriptor definition of PermissionDescriptor defined in the
-// Permissions API:
-// https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-PermissionDescriptor
-type PermissionDescriptor struct {
- Name string `json:"name"` // Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
- Sysex bool `json:"sysex,omitempty"` // For "midi" permission, may also specify sysex control.
- UserVisibleOnly bool `json:"userVisibleOnly,omitempty"` // For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
- AllowWithoutSanitization bool `json:"allowWithoutSanitization,omitempty"` // For "clipboard" permission, may specify allowWithoutSanitization.
- PanTiltZoom bool `json:"panTiltZoom,omitempty"` // For "camera" permission, may specify panTiltZoom.
-}
-
-// CommandID browser command ids used by executeBrowserCommand.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-BrowserCommandId
-type CommandID string
-
-// String returns the CommandID as string value.
-func (t CommandID) String() string {
- return string(t)
-}
-
-// CommandID values.
-const (
- CommandIDOpenTabSearch CommandID = "openTabSearch"
- CommandIDCloseTabSearch CommandID = "closeTabSearch"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CommandID) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CommandID) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CommandID) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CommandID(in.String()) {
- case CommandIDOpenTabSearch:
- *t = CommandIDOpenTabSearch
- case CommandIDCloseTabSearch:
- *t = CommandIDCloseTabSearch
-
- default:
- in.AddError(errors.New("unknown CommandID value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CommandID) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Bucket chrome histogram bucket.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Bucket
-type Bucket struct {
- Low int64 `json:"low"` // Minimum value (inclusive).
- High int64 `json:"high"` // Maximum value (exclusive).
- Count int64 `json:"count"` // Number of samples.
-}
-
-// Histogram chrome histogram.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-Histogram
-type Histogram struct {
- Name string `json:"name"` // Name.
- Sum int64 `json:"sum"` // Sum of sample values.
- Count int64 `json:"count"` // Total number of samples.
- Buckets []*Bucket `json:"buckets"` // Buckets.
-}
-
-// DownloadProgressState download status.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#event-downloadProgress
-type DownloadProgressState string
-
-// String returns the DownloadProgressState as string value.
-func (t DownloadProgressState) String() string {
- return string(t)
-}
-
-// DownloadProgressState values.
-const (
- DownloadProgressStateInProgress DownloadProgressState = "inProgress"
- DownloadProgressStateCompleted DownloadProgressState = "completed"
- DownloadProgressStateCanceled DownloadProgressState = "canceled"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DownloadProgressState) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DownloadProgressState) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DownloadProgressState) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DownloadProgressState(in.String()) {
- case DownloadProgressStateInProgress:
- *t = DownloadProgressStateInProgress
- case DownloadProgressStateCompleted:
- *t = DownloadProgressStateCompleted
- case DownloadProgressStateCanceled:
- *t = DownloadProgressStateCanceled
-
- default:
- in.AddError(errors.New("unknown DownloadProgressState value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DownloadProgressState) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetDownloadBehaviorBehavior whether to allow all or deny all download
-// requests, or use default Chrome behavior if available (otherwise deny).
-// |allowAndName| allows download and names files according to their dowmload
-// guids.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
-type SetDownloadBehaviorBehavior string
-
-// String returns the SetDownloadBehaviorBehavior as string value.
-func (t SetDownloadBehaviorBehavior) String() string {
- return string(t)
-}
-
-// SetDownloadBehaviorBehavior values.
-const (
- SetDownloadBehaviorBehaviorDeny SetDownloadBehaviorBehavior = "deny"
- SetDownloadBehaviorBehaviorAllow SetDownloadBehaviorBehavior = "allow"
- SetDownloadBehaviorBehaviorAllowAndName SetDownloadBehaviorBehavior = "allowAndName"
- SetDownloadBehaviorBehaviorDefault SetDownloadBehaviorBehavior = "default"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetDownloadBehaviorBehavior) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetDownloadBehaviorBehavior) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetDownloadBehaviorBehavior(in.String()) {
- case SetDownloadBehaviorBehaviorDeny:
- *t = SetDownloadBehaviorBehaviorDeny
- case SetDownloadBehaviorBehaviorAllow:
- *t = SetDownloadBehaviorBehaviorAllow
- case SetDownloadBehaviorBehaviorAllowAndName:
- *t = SetDownloadBehaviorBehaviorAllowAndName
- case SetDownloadBehaviorBehaviorDefault:
- *t = SetDownloadBehaviorBehaviorDefault
-
- default:
- in.AddError(errors.New("unknown SetDownloadBehaviorBehavior value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetDownloadBehaviorBehavior) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go b/vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go
deleted file mode 100644
index 24b277932d8..00000000000
--- a/vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Package cachestorage provides the Chrome DevTools Protocol
-// commands, types, and events for the CacheStorage domain.
-//
-// Generated by the cdproto-gen command.
-package cachestorage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DeleteCacheParams deletes a cache.
-type DeleteCacheParams struct {
- CacheID CacheID `json:"cacheId"` // Id of cache for deletion.
-}
-
-// DeleteCache deletes a cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache
-//
-// parameters:
-// cacheID - Id of cache for deletion.
-func DeleteCache(cacheID CacheID) *DeleteCacheParams {
- return &DeleteCacheParams{
- CacheID: cacheID,
- }
-}
-
-// Do executes CacheStorage.deleteCache against the provided context.
-func (p *DeleteCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeleteCache, p, nil)
-}
-
-// DeleteEntryParams deletes a cache entry.
-type DeleteEntryParams struct {
- CacheID CacheID `json:"cacheId"` // Id of cache where the entry will be deleted.
- Request string `json:"request"` // URL spec of the request.
-}
-
-// DeleteEntry deletes a cache entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteEntry
-//
-// parameters:
-// cacheID - Id of cache where the entry will be deleted.
-// request - URL spec of the request.
-func DeleteEntry(cacheID CacheID, request string) *DeleteEntryParams {
- return &DeleteEntryParams{
- CacheID: cacheID,
- Request: request,
- }
-}
-
-// Do executes CacheStorage.deleteEntry against the provided context.
-func (p *DeleteEntryParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeleteEntry, p, nil)
-}
-
-// RequestCacheNamesParams requests cache names.
-type RequestCacheNamesParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
-}
-
-// RequestCacheNames requests cache names.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames
-//
-// parameters:
-// securityOrigin - Security origin.
-func RequestCacheNames(securityOrigin string) *RequestCacheNamesParams {
- return &RequestCacheNamesParams{
- SecurityOrigin: securityOrigin,
- }
-}
-
-// RequestCacheNamesReturns return values.
-type RequestCacheNamesReturns struct {
- Caches []*Cache `json:"caches,omitempty"` // Caches for the security origin.
-}
-
-// Do executes CacheStorage.requestCacheNames against the provided context.
-//
-// returns:
-// caches - Caches for the security origin.
-func (p *RequestCacheNamesParams) Do(ctx context.Context) (caches []*Cache, err error) {
- // execute
- var res RequestCacheNamesReturns
- err = cdp.Execute(ctx, CommandRequestCacheNames, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Caches, nil
-}
-
-// RequestCachedResponseParams fetches cache entry.
-type RequestCachedResponseParams struct {
- CacheID CacheID `json:"cacheId"` // Id of cache that contains the entry.
- RequestURL string `json:"requestURL"` // URL spec of the request.
- RequestHeaders []*Header `json:"requestHeaders"` // headers of the request.
-}
-
-// RequestCachedResponse fetches cache entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCachedResponse
-//
-// parameters:
-// cacheID - Id of cache that contains the entry.
-// requestURL - URL spec of the request.
-// requestHeaders - headers of the request.
-func RequestCachedResponse(cacheID CacheID, requestURL string, requestHeaders []*Header) *RequestCachedResponseParams {
- return &RequestCachedResponseParams{
- CacheID: cacheID,
- RequestURL: requestURL,
- RequestHeaders: requestHeaders,
- }
-}
-
-// RequestCachedResponseReturns return values.
-type RequestCachedResponseReturns struct {
- Response *CachedResponse `json:"response,omitempty"` // Response read from the cache.
-}
-
-// Do executes CacheStorage.requestCachedResponse against the provided context.
-//
-// returns:
-// response - Response read from the cache.
-func (p *RequestCachedResponseParams) Do(ctx context.Context) (response *CachedResponse, err error) {
- // execute
- var res RequestCachedResponseReturns
- err = cdp.Execute(ctx, CommandRequestCachedResponse, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Response, nil
-}
-
-// RequestEntriesParams requests data from cache.
-type RequestEntriesParams struct {
- CacheID CacheID `json:"cacheId"` // ID of cache to get entries from.
- SkipCount int64 `json:"skipCount,omitempty"` // Number of records to skip.
- PageSize int64 `json:"pageSize,omitempty"` // Number of records to fetch.
- PathFilter string `json:"pathFilter,omitempty"` // If present, only return the entries containing this substring in the path
-}
-
-// RequestEntries requests data from cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestEntries
-//
-// parameters:
-// cacheID - ID of cache to get entries from.
-func RequestEntries(cacheID CacheID) *RequestEntriesParams {
- return &RequestEntriesParams{
- CacheID: cacheID,
- }
-}
-
-// WithSkipCount number of records to skip.
-func (p RequestEntriesParams) WithSkipCount(skipCount int64) *RequestEntriesParams {
- p.SkipCount = skipCount
- return &p
-}
-
-// WithPageSize number of records to fetch.
-func (p RequestEntriesParams) WithPageSize(pageSize int64) *RequestEntriesParams {
- p.PageSize = pageSize
- return &p
-}
-
-// WithPathFilter if present, only return the entries containing this
-// substring in the path.
-func (p RequestEntriesParams) WithPathFilter(pathFilter string) *RequestEntriesParams {
- p.PathFilter = pathFilter
- return &p
-}
-
-// RequestEntriesReturns return values.
-type RequestEntriesReturns struct {
- CacheDataEntries []*DataEntry `json:"cacheDataEntries,omitempty"` // Array of object store data entries.
- ReturnCount float64 `json:"returnCount,omitempty"` // Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
-}
-
-// Do executes CacheStorage.requestEntries against the provided context.
-//
-// returns:
-// cacheDataEntries - Array of object store data entries.
-// returnCount - Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
-func (p *RequestEntriesParams) Do(ctx context.Context) (cacheDataEntries []*DataEntry, returnCount float64, err error) {
- // execute
- var res RequestEntriesReturns
- err = cdp.Execute(ctx, CommandRequestEntries, p, &res)
- if err != nil {
- return nil, 0, err
- }
-
- return res.CacheDataEntries, res.ReturnCount, nil
-}
-
-// Command names.
-const (
- CommandDeleteCache = "CacheStorage.deleteCache"
- CommandDeleteEntry = "CacheStorage.deleteEntry"
- CommandRequestCacheNames = "CacheStorage.requestCacheNames"
- CommandRequestCachedResponse = "CacheStorage.requestCachedResponse"
- CommandRequestEntries = "CacheStorage.requestEntries"
-)
diff --git a/vendor/github.com/chromedp/cdproto/cachestorage/easyjson.go b/vendor/github.com/chromedp/cdproto/cachestorage/easyjson.go
deleted file mode 100644
index 26730b64b5e..00000000000
--- a/vendor/github.com/chromedp/cdproto/cachestorage/easyjson.go
+++ /dev/null
@@ -1,1162 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package cachestorage
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(in *jlexer.Lexer, out *RequestEntriesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheDataEntries":
- if in.IsNull() {
- in.Skip()
- out.CacheDataEntries = nil
- } else {
- in.Delim('[')
- if out.CacheDataEntries == nil {
- if !in.IsDelim(']') {
- out.CacheDataEntries = make([]*DataEntry, 0, 8)
- } else {
- out.CacheDataEntries = []*DataEntry{}
- }
- } else {
- out.CacheDataEntries = (out.CacheDataEntries)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *DataEntry
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(DataEntry)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.CacheDataEntries = append(out.CacheDataEntries, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "returnCount":
- out.ReturnCount = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(out *jwriter.Writer, in RequestEntriesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.CacheDataEntries) != 0 {
- const prefix string = ",\"cacheDataEntries\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.CacheDataEntries {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.ReturnCount != 0 {
- const prefix string = ",\"returnCount\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.ReturnCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestEntriesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestEntriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestEntriesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestEntriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(in *jlexer.Lexer, out *RequestEntriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "skipCount":
- out.SkipCount = int64(in.Int64())
- case "pageSize":
- out.PageSize = int64(in.Int64())
- case "pathFilter":
- out.PathFilter = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(out *jwriter.Writer, in RequestEntriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- if in.SkipCount != 0 {
- const prefix string = ",\"skipCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.SkipCount))
- }
- if in.PageSize != 0 {
- const prefix string = ",\"pageSize\":"
- out.RawString(prefix)
- out.Int64(int64(in.PageSize))
- }
- if in.PathFilter != "" {
- const prefix string = ",\"pathFilter\":"
- out.RawString(prefix)
- out.String(string(in.PathFilter))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestEntriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestEntriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(in *jlexer.Lexer, out *RequestCachedResponseReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(CachedResponse)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(out *jwriter.Writer, in RequestCachedResponseReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Response != nil {
- const prefix string = ",\"response\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Response).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestCachedResponseReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestCachedResponseReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestCachedResponseReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestCachedResponseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(in *jlexer.Lexer, out *RequestCachedResponseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "requestURL":
- out.RequestURL = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- out.RequestHeaders = nil
- } else {
- in.Delim('[')
- if out.RequestHeaders == nil {
- if !in.IsDelim(']') {
- out.RequestHeaders = make([]*Header, 0, 8)
- } else {
- out.RequestHeaders = []*Header{}
- }
- } else {
- out.RequestHeaders = (out.RequestHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Header
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Header)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.RequestHeaders = append(out.RequestHeaders, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(out *jwriter.Writer, in RequestCachedResponseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"requestURL\":"
- out.RawString(prefix)
- out.String(string(in.RequestURL))
- }
- {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- if in.RequestHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.RequestHeaders {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestCachedResponseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestCachedResponseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestCachedResponseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestCachedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(in *jlexer.Lexer, out *RequestCacheNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "caches":
- if in.IsNull() {
- in.Skip()
- out.Caches = nil
- } else {
- in.Delim('[')
- if out.Caches == nil {
- if !in.IsDelim(']') {
- out.Caches = make([]*Cache, 0, 8)
- } else {
- out.Caches = []*Cache{}
- }
- } else {
- out.Caches = (out.Caches)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Cache
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Cache)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Caches = append(out.Caches, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(out *jwriter.Writer, in RequestCacheNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Caches) != 0 {
- const prefix string = ",\"caches\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Caches {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestCacheNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestCacheNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestCacheNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestCacheNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(in *jlexer.Lexer, out *RequestCacheNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(out *jwriter.Writer, in RequestCacheNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestCacheNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(in *jlexer.Lexer, out *Header) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(out *jwriter.Writer, in Header) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Header) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Header) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Header) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Header) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(in *jlexer.Lexer, out *DeleteEntryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "request":
- out.Request = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(out *jwriter.Writer, in DeleteEntryParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- out.String(string(in.Request))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeleteEntryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(in *jlexer.Lexer, out *DeleteCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(out *jwriter.Writer, in DeleteCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeleteCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(in *jlexer.Lexer, out *DataEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestURL":
- out.RequestURL = string(in.String())
- case "requestMethod":
- out.RequestMethod = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- out.RequestHeaders = nil
- } else {
- in.Delim('[')
- if out.RequestHeaders == nil {
- if !in.IsDelim(']') {
- out.RequestHeaders = make([]*Header, 0, 8)
- } else {
- out.RequestHeaders = []*Header{}
- }
- } else {
- out.RequestHeaders = (out.RequestHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *Header
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(Header)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.RequestHeaders = append(out.RequestHeaders, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "responseTime":
- out.ResponseTime = float64(in.Float64())
- case "responseStatus":
- out.ResponseStatus = int64(in.Int64())
- case "responseStatusText":
- out.ResponseStatusText = string(in.String())
- case "responseType":
- (out.ResponseType).UnmarshalEasyJSON(in)
- case "responseHeaders":
- if in.IsNull() {
- in.Skip()
- out.ResponseHeaders = nil
- } else {
- in.Delim('[')
- if out.ResponseHeaders == nil {
- if !in.IsDelim(']') {
- out.ResponseHeaders = make([]*Header, 0, 8)
- } else {
- out.ResponseHeaders = []*Header{}
- }
- } else {
- out.ResponseHeaders = (out.ResponseHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v11 *Header
- if in.IsNull() {
- in.Skip()
- v11 = nil
- } else {
- if v11 == nil {
- v11 = new(Header)
- }
- (*v11).UnmarshalEasyJSON(in)
- }
- out.ResponseHeaders = append(out.ResponseHeaders, v11)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(out *jwriter.Writer, in DataEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestURL))
- }
- {
- const prefix string = ",\"requestMethod\":"
- out.RawString(prefix)
- out.String(string(in.RequestMethod))
- }
- {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- if in.RequestHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.RequestHeaders {
- if v12 > 0 {
- out.RawByte(',')
- }
- if v13 == nil {
- out.RawString("null")
- } else {
- (*v13).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"responseTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.ResponseTime))
- }
- {
- const prefix string = ",\"responseStatus\":"
- out.RawString(prefix)
- out.Int64(int64(in.ResponseStatus))
- }
- {
- const prefix string = ",\"responseStatusText\":"
- out.RawString(prefix)
- out.String(string(in.ResponseStatusText))
- }
- {
- const prefix string = ",\"responseType\":"
- out.RawString(prefix)
- (in.ResponseType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"responseHeaders\":"
- out.RawString(prefix)
- if in.ResponseHeaders == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.ResponseHeaders {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DataEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DataEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(in *jlexer.Lexer, out *CachedResponse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(out *jwriter.Writer, in CachedResponse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"body\":"
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CachedResponse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CachedResponse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CachedResponse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CachedResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(in *jlexer.Lexer, out *Cache) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheId":
- out.CacheID = CacheID(in.String())
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "cacheName":
- out.CacheName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(out *jwriter.Writer, in Cache) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CacheID))
- }
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix)
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"cacheName\":"
- out.RawString(prefix)
- out.String(string(in.CacheName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Cache) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Cache) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Cache) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/cachestorage/types.go b/vendor/github.com/chromedp/cdproto/cachestorage/types.go
deleted file mode 100644
index ef899fe8039..00000000000
--- a/vendor/github.com/chromedp/cdproto/cachestorage/types.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package cachestorage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// CacheID unique identifier of the Cache object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CacheId
-type CacheID string
-
-// String returns the CacheID as string value.
-func (t CacheID) String() string {
- return string(t)
-}
-
-// CachedResponseType type of HTTP response cached.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CachedResponseType
-type CachedResponseType string
-
-// String returns the CachedResponseType as string value.
-func (t CachedResponseType) String() string {
- return string(t)
-}
-
-// CachedResponseType values.
-const (
- CachedResponseTypeBasic CachedResponseType = "basic"
- CachedResponseTypeCors CachedResponseType = "cors"
- CachedResponseTypeDefault CachedResponseType = "default"
- CachedResponseTypeError CachedResponseType = "error"
- CachedResponseTypeOpaqueResponse CachedResponseType = "opaqueResponse"
- CachedResponseTypeOpaqueRedirect CachedResponseType = "opaqueRedirect"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CachedResponseType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CachedResponseType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CachedResponseType(in.String()) {
- case CachedResponseTypeBasic:
- *t = CachedResponseTypeBasic
- case CachedResponseTypeCors:
- *t = CachedResponseTypeCors
- case CachedResponseTypeDefault:
- *t = CachedResponseTypeDefault
- case CachedResponseTypeError:
- *t = CachedResponseTypeError
- case CachedResponseTypeOpaqueResponse:
- *t = CachedResponseTypeOpaqueResponse
- case CachedResponseTypeOpaqueRedirect:
- *t = CachedResponseTypeOpaqueRedirect
-
- default:
- in.AddError(errors.New("unknown CachedResponseType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CachedResponseType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DataEntry data entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-DataEntry
-type DataEntry struct {
- RequestURL string `json:"requestURL"` // Request URL.
- RequestMethod string `json:"requestMethod"` // Request method.
- RequestHeaders []*Header `json:"requestHeaders"` // Request headers
- ResponseTime float64 `json:"responseTime"` // Number of seconds since epoch.
- ResponseStatus int64 `json:"responseStatus"` // HTTP response status code.
- ResponseStatusText string `json:"responseStatusText"` // HTTP response status text.
- ResponseType CachedResponseType `json:"responseType"` // HTTP response type
- ResponseHeaders []*Header `json:"responseHeaders"` // Response headers
-}
-
-// Cache cache identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Cache
-type Cache struct {
- CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
- SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
- CacheName string `json:"cacheName"` // The name of the cache.
-}
-
-// Header [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Header
-type Header struct {
- Name string `json:"name"`
- Value string `json:"value"`
-}
-
-// CachedResponse cached response.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CachedResponse
-type CachedResponse struct {
- Body string `json:"body"` // Entry content, base64-encoded.
-}
diff --git a/vendor/github.com/chromedp/cdproto/cast/cast.go b/vendor/github.com/chromedp/cdproto/cast/cast.go
deleted file mode 100644
index 16983123105..00000000000
--- a/vendor/github.com/chromedp/cdproto/cast/cast.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Package cast provides the Chrome DevTools Protocol
-// commands, types, and events for the Cast domain.
-//
-// A domain for interacting with Cast, Presentation API, and Remote Playback
-// API functionalities.
-//
-// Generated by the cdproto-gen command.
-package cast
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams starts observing for sinks that can be used for tab
-// mirroring, and if set, sinks compatible with |presentationUrl| as well. When
-// sinks are found, a |sinksUpdated| event is fired. Also starts observing for
-// issue messages. When an issue is added or removed, an |issueUpdated| event is
-// fired.
-type EnableParams struct {
- PresentationURL string `json:"presentationUrl,omitempty"`
-}
-
-// Enable starts observing for sinks that can be used for tab mirroring, and
-// if set, sinks compatible with |presentationUrl| as well. When sinks are
-// found, a |sinksUpdated| event is fired. Also starts observing for issue
-// messages. When an issue is added or removed, an |issueUpdated| event is
-// fired.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-enable
-//
-// parameters:
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// WithPresentationURL [no description].
-func (p EnableParams) WithPresentationURL(presentationURL string) *EnableParams {
- p.PresentationURL = presentationURL
- return &p
-}
-
-// Do executes Cast.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, p, nil)
-}
-
-// DisableParams stops observing for sinks and issues.
-type DisableParams struct{}
-
-// Disable stops observing for sinks and issues.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Cast.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// SetSinkToUseParams sets a sink to be used when the web page requests the
-// browser to choose a sink via Presentation API, Remote Playback API, or Cast
-// SDK.
-type SetSinkToUseParams struct {
- SinkName string `json:"sinkName"`
-}
-
-// SetSinkToUse sets a sink to be used when the web page requests the browser
-// to choose a sink via Presentation API, Remote Playback API, or Cast SDK.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-setSinkToUse
-//
-// parameters:
-// sinkName
-func SetSinkToUse(sinkName string) *SetSinkToUseParams {
- return &SetSinkToUseParams{
- SinkName: sinkName,
- }
-}
-
-// Do executes Cast.setSinkToUse against the provided context.
-func (p *SetSinkToUseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetSinkToUse, p, nil)
-}
-
-// StartTabMirroringParams starts mirroring the tab to the sink.
-type StartTabMirroringParams struct {
- SinkName string `json:"sinkName"`
-}
-
-// StartTabMirroring starts mirroring the tab to the sink.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startTabMirroring
-//
-// parameters:
-// sinkName
-func StartTabMirroring(sinkName string) *StartTabMirroringParams {
- return &StartTabMirroringParams{
- SinkName: sinkName,
- }
-}
-
-// Do executes Cast.startTabMirroring against the provided context.
-func (p *StartTabMirroringParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartTabMirroring, p, nil)
-}
-
-// StopCastingParams stops the active Cast session on the sink.
-type StopCastingParams struct {
- SinkName string `json:"sinkName"`
-}
-
-// StopCasting stops the active Cast session on the sink.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-stopCasting
-//
-// parameters:
-// sinkName
-func StopCasting(sinkName string) *StopCastingParams {
- return &StopCastingParams{
- SinkName: sinkName,
- }
-}
-
-// Do executes Cast.stopCasting against the provided context.
-func (p *StopCastingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopCasting, p, nil)
-}
-
-// Command names.
-const (
- CommandEnable = "Cast.enable"
- CommandDisable = "Cast.disable"
- CommandSetSinkToUse = "Cast.setSinkToUse"
- CommandStartTabMirroring = "Cast.startTabMirroring"
- CommandStopCasting = "Cast.stopCasting"
-)
diff --git a/vendor/github.com/chromedp/cdproto/cast/easyjson.go b/vendor/github.com/chromedp/cdproto/cast/easyjson.go
deleted file mode 100644
index 54a0ae74c57..00000000000
--- a/vendor/github.com/chromedp/cdproto/cast/easyjson.go
+++ /dev/null
@@ -1,599 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package cast
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast(in *jlexer.Lexer, out *StopCastingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sinkName":
- out.SinkName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast(out *jwriter.Writer, in StopCastingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sinkName\":"
- out.RawString(prefix[1:])
- out.String(string(in.SinkName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopCastingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopCastingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopCastingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopCastingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast1(in *jlexer.Lexer, out *StartTabMirroringParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sinkName":
- out.SinkName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast1(out *jwriter.Writer, in StartTabMirroringParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sinkName\":"
- out.RawString(prefix[1:])
- out.String(string(in.SinkName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartTabMirroringParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartTabMirroringParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartTabMirroringParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartTabMirroringParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(in *jlexer.Lexer, out *Sink) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "id":
- out.ID = string(in.String())
- case "session":
- out.Session = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(out *jwriter.Writer, in Sink) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix)
- out.String(string(in.ID))
- }
- if in.Session != "" {
- const prefix string = ",\"session\":"
- out.RawString(prefix)
- out.String(string(in.Session))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Sink) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Sink) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Sink) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Sink) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(in *jlexer.Lexer, out *SetSinkToUseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sinkName":
- out.SinkName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(out *jwriter.Writer, in SetSinkToUseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sinkName\":"
- out.RawString(prefix[1:])
- out.String(string(in.SinkName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetSinkToUseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetSinkToUseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetSinkToUseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetSinkToUseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(in *jlexer.Lexer, out *EventSinksUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sinks":
- if in.IsNull() {
- in.Skip()
- out.Sinks = nil
- } else {
- in.Delim('[')
- if out.Sinks == nil {
- if !in.IsDelim(']') {
- out.Sinks = make([]*Sink, 0, 8)
- } else {
- out.Sinks = []*Sink{}
- }
- } else {
- out.Sinks = (out.Sinks)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *Sink
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(Sink)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Sinks = append(out.Sinks, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(out *jwriter.Writer, in EventSinksUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sinks\":"
- out.RawString(prefix[1:])
- if in.Sinks == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Sinks {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSinksUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSinksUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSinksUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSinksUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(in *jlexer.Lexer, out *EventIssueUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "issueMessage":
- out.IssueMessage = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(out *jwriter.Writer, in EventIssueUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"issueMessage\":"
- out.RawString(prefix[1:])
- out.String(string(in.IssueMessage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventIssueUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventIssueUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventIssueUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventIssueUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "presentationUrl":
- out.PresentationURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.PresentationURL != "" {
- const prefix string = ",\"presentationUrl\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.PresentationURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/cast/events.go b/vendor/github.com/chromedp/cdproto/cast/events.go
deleted file mode 100644
index 8b368e2315b..00000000000
--- a/vendor/github.com/chromedp/cdproto/cast/events.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package cast
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventSinksUpdated this is fired whenever the list of available sinks
-// changes. A sink is a device or a software surface that you can cast to.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#event-sinksUpdated
-type EventSinksUpdated struct {
- Sinks []*Sink `json:"sinks"`
-}
-
-// EventIssueUpdated this is fired whenever the outstanding issue/error
-// message changes. |issueMessage| is empty if there is no issue.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#event-issueUpdated
-type EventIssueUpdated struct {
- IssueMessage string `json:"issueMessage"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/cast/types.go b/vendor/github.com/chromedp/cdproto/cast/types.go
deleted file mode 100644
index 19ffb40829f..00000000000
--- a/vendor/github.com/chromedp/cdproto/cast/types.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package cast
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// Sink [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#type-Sink
-type Sink struct {
- Name string `json:"name"`
- ID string `json:"id"`
- Session string `json:"session,omitempty"` // Text describing the current session. Present only if there is an active session on the sink.
-}
diff --git a/vendor/github.com/chromedp/cdproto/cdp/easyjson.go b/vendor/github.com/chromedp/cdproto/cdp/easyjson.go
deleted file mode 100644
index b93397c9b9c..00000000000
--- a/vendor/github.com/chromedp/cdproto/cdp/easyjson.go
+++ /dev/null
@@ -1,1329 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package cdp
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp(in *jlexer.Lexer, out *RGBA) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "r":
- out.R = int64(in.Int64())
- case "g":
- out.G = int64(in.Int64())
- case "b":
- out.B = int64(in.Int64())
- case "a":
- out.A = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp(out *jwriter.Writer, in RGBA) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"r\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.R))
- }
- {
- const prefix string = ",\"g\":"
- out.RawString(prefix)
- out.Int64(int64(in.G))
- }
- {
- const prefix string = ",\"b\":"
- out.RawString(prefix)
- out.Int64(int64(in.B))
- }
- {
- const prefix string = ",\"a\":"
- out.RawString(prefix)
- out.Float64(float64(in.A))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RGBA) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RGBA) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RGBA) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RGBA) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp1(in *jlexer.Lexer, out *OriginTrialTokenWithStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rawTokenText":
- out.RawTokenText = string(in.String())
- case "parsedToken":
- if in.IsNull() {
- in.Skip()
- out.ParsedToken = nil
- } else {
- if out.ParsedToken == nil {
- out.ParsedToken = new(OriginTrialToken)
- }
- (*out.ParsedToken).UnmarshalEasyJSON(in)
- }
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp1(out *jwriter.Writer, in OriginTrialTokenWithStatus) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"rawTokenText\":"
- out.RawString(prefix[1:])
- out.String(string(in.RawTokenText))
- }
- if in.ParsedToken != nil {
- const prefix string = ",\"parsedToken\":"
- out.RawString(prefix)
- (*in.ParsedToken).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- (in.Status).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v OriginTrialTokenWithStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v OriginTrialTokenWithStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *OriginTrialTokenWithStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *OriginTrialTokenWithStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp2(in *jlexer.Lexer, out *OriginTrialToken) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "matchSubDomains":
- out.MatchSubDomains = bool(in.Bool())
- case "trialName":
- out.TrialName = string(in.String())
- case "expiryTime":
- if in.IsNull() {
- in.Skip()
- out.ExpiryTime = nil
- } else {
- if out.ExpiryTime == nil {
- out.ExpiryTime = new(TimeSinceEpoch)
- }
- (*out.ExpiryTime).UnmarshalEasyJSON(in)
- }
- case "isThirdParty":
- out.IsThirdParty = bool(in.Bool())
- case "usageRestriction":
- (out.UsageRestriction).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp2(out *jwriter.Writer, in OriginTrialToken) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"matchSubDomains\":"
- out.RawString(prefix)
- out.Bool(bool(in.MatchSubDomains))
- }
- {
- const prefix string = ",\"trialName\":"
- out.RawString(prefix)
- out.String(string(in.TrialName))
- }
- {
- const prefix string = ",\"expiryTime\":"
- out.RawString(prefix)
- if in.ExpiryTime == nil {
- out.RawString("null")
- } else {
- (*in.ExpiryTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"isThirdParty\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsThirdParty))
- }
- {
- const prefix string = ",\"usageRestriction\":"
- out.RawString(prefix)
- (in.UsageRestriction).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v OriginTrialToken) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v OriginTrialToken) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *OriginTrialToken) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *OriginTrialToken) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp3(in *jlexer.Lexer, out *OriginTrial) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "trialName":
- out.TrialName = string(in.String())
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- case "tokensWithStatus":
- if in.IsNull() {
- in.Skip()
- out.TokensWithStatus = nil
- } else {
- in.Delim('[')
- if out.TokensWithStatus == nil {
- if !in.IsDelim(']') {
- out.TokensWithStatus = make([]*OriginTrialTokenWithStatus, 0, 8)
- } else {
- out.TokensWithStatus = []*OriginTrialTokenWithStatus{}
- }
- } else {
- out.TokensWithStatus = (out.TokensWithStatus)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *OriginTrialTokenWithStatus
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(OriginTrialTokenWithStatus)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.TokensWithStatus = append(out.TokensWithStatus, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp3(out *jwriter.Writer, in OriginTrial) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"trialName\":"
- out.RawString(prefix[1:])
- out.String(string(in.TrialName))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- (in.Status).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"tokensWithStatus\":"
- out.RawString(prefix)
- if in.TokensWithStatus == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.TokensWithStatus {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v OriginTrial) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v OriginTrial) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *OriginTrial) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *OriginTrial) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp4(in *jlexer.Lexer, out *Node) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "parentId":
- (out.ParentID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "nodeType":
- (out.NodeType).UnmarshalEasyJSON(in)
- case "nodeName":
- out.NodeName = string(in.String())
- case "localName":
- out.LocalName = string(in.String())
- case "nodeValue":
- out.NodeValue = string(in.String())
- case "childNodeCount":
- out.ChildNodeCount = int64(in.Int64())
- case "children":
- if in.IsNull() {
- in.Skip()
- out.Children = nil
- } else {
- in.Delim('[')
- if out.Children == nil {
- if !in.IsDelim(']') {
- out.Children = make([]*Node, 0, 8)
- } else {
- out.Children = []*Node{}
- }
- } else {
- out.Children = (out.Children)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Node
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Node)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Children = append(out.Children, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "attributes":
- if in.IsNull() {
- in.Skip()
- out.Attributes = nil
- } else {
- in.Delim('[')
- if out.Attributes == nil {
- if !in.IsDelim(']') {
- out.Attributes = make([]string, 0, 4)
- } else {
- out.Attributes = []string{}
- }
- } else {
- out.Attributes = (out.Attributes)[:0]
- }
- for !in.IsDelim(']') {
- var v5 string
- v5 = string(in.String())
- out.Attributes = append(out.Attributes, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "documentURL":
- out.DocumentURL = string(in.String())
- case "baseURL":
- out.BaseURL = string(in.String())
- case "publicId":
- out.PublicID = string(in.String())
- case "systemId":
- out.SystemID = string(in.String())
- case "internalSubset":
- out.InternalSubset = string(in.String())
- case "xmlVersion":
- out.XMLVersion = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "pseudoType":
- (out.PseudoType).UnmarshalEasyJSON(in)
- case "shadowRootType":
- (out.ShadowRootType).UnmarshalEasyJSON(in)
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "contentDocument":
- if in.IsNull() {
- in.Skip()
- out.ContentDocument = nil
- } else {
- if out.ContentDocument == nil {
- out.ContentDocument = new(Node)
- }
- (*out.ContentDocument).UnmarshalEasyJSON(in)
- }
- case "shadowRoots":
- if in.IsNull() {
- in.Skip()
- out.ShadowRoots = nil
- } else {
- in.Delim('[')
- if out.ShadowRoots == nil {
- if !in.IsDelim(']') {
- out.ShadowRoots = make([]*Node, 0, 8)
- } else {
- out.ShadowRoots = []*Node{}
- }
- } else {
- out.ShadowRoots = (out.ShadowRoots)[:0]
- }
- for !in.IsDelim(']') {
- var v6 *Node
- if in.IsNull() {
- in.Skip()
- v6 = nil
- } else {
- if v6 == nil {
- v6 = new(Node)
- }
- (*v6).UnmarshalEasyJSON(in)
- }
- out.ShadowRoots = append(out.ShadowRoots, v6)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "templateContent":
- if in.IsNull() {
- in.Skip()
- out.TemplateContent = nil
- } else {
- if out.TemplateContent == nil {
- out.TemplateContent = new(Node)
- }
- (*out.TemplateContent).UnmarshalEasyJSON(in)
- }
- case "pseudoElements":
- if in.IsNull() {
- in.Skip()
- out.PseudoElements = nil
- } else {
- in.Delim('[')
- if out.PseudoElements == nil {
- if !in.IsDelim(']') {
- out.PseudoElements = make([]*Node, 0, 8)
- } else {
- out.PseudoElements = []*Node{}
- }
- } else {
- out.PseudoElements = (out.PseudoElements)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Node
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Node)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.PseudoElements = append(out.PseudoElements, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "distributedNodes":
- if in.IsNull() {
- in.Skip()
- out.DistributedNodes = nil
- } else {
- in.Delim('[')
- if out.DistributedNodes == nil {
- if !in.IsDelim(']') {
- out.DistributedNodes = make([]*BackendNode, 0, 8)
- } else {
- out.DistributedNodes = []*BackendNode{}
- }
- } else {
- out.DistributedNodes = (out.DistributedNodes)[:0]
- }
- for !in.IsDelim(']') {
- var v8 *BackendNode
- if in.IsNull() {
- in.Skip()
- v8 = nil
- } else {
- if v8 == nil {
- v8 = new(BackendNode)
- }
- (*v8).UnmarshalEasyJSON(in)
- }
- out.DistributedNodes = append(out.DistributedNodes, v8)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "isSVG":
- out.IsSVG = bool(in.Bool())
- case "compatibilityMode":
- (out.CompatibilityMode).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp4(out *jwriter.Writer, in Node) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.ParentID != 0 {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ParentID))
- }
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- {
- const prefix string = ",\"nodeType\":"
- out.RawString(prefix)
- (in.NodeType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"nodeName\":"
- out.RawString(prefix)
- out.String(string(in.NodeName))
- }
- {
- const prefix string = ",\"localName\":"
- out.RawString(prefix)
- out.String(string(in.LocalName))
- }
- {
- const prefix string = ",\"nodeValue\":"
- out.RawString(prefix)
- out.String(string(in.NodeValue))
- }
- if in.ChildNodeCount != 0 {
- const prefix string = ",\"childNodeCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.ChildNodeCount))
- }
- if len(in.Children) != 0 {
- const prefix string = ",\"children\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v9, v10 := range in.Children {
- if v9 > 0 {
- out.RawByte(',')
- }
- if v10 == nil {
- out.RawString("null")
- } else {
- (*v10).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v11, v12 := range in.Attributes {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- if in.DocumentURL != "" {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix)
- out.String(string(in.DocumentURL))
- }
- if in.BaseURL != "" {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.String(string(in.BaseURL))
- }
- if in.PublicID != "" {
- const prefix string = ",\"publicId\":"
- out.RawString(prefix)
- out.String(string(in.PublicID))
- }
- if in.SystemID != "" {
- const prefix string = ",\"systemId\":"
- out.RawString(prefix)
- out.String(string(in.SystemID))
- }
- if in.InternalSubset != "" {
- const prefix string = ",\"internalSubset\":"
- out.RawString(prefix)
- out.String(string(in.InternalSubset))
- }
- if in.XMLVersion != "" {
- const prefix string = ",\"xmlVersion\":"
- out.RawString(prefix)
- out.String(string(in.XMLVersion))
- }
- if in.Name != "" {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- if in.Value != "" {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.PseudoType != "" {
- const prefix string = ",\"pseudoType\":"
- out.RawString(prefix)
- (in.PseudoType).MarshalEasyJSON(out)
- }
- if in.ShadowRootType != "" {
- const prefix string = ",\"shadowRootType\":"
- out.RawString(prefix)
- (in.ShadowRootType).MarshalEasyJSON(out)
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- if in.ContentDocument != nil {
- const prefix string = ",\"contentDocument\":"
- out.RawString(prefix)
- (*in.ContentDocument).MarshalEasyJSON(out)
- }
- if len(in.ShadowRoots) != 0 {
- const prefix string = ",\"shadowRoots\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v13, v14 := range in.ShadowRoots {
- if v13 > 0 {
- out.RawByte(',')
- }
- if v14 == nil {
- out.RawString("null")
- } else {
- (*v14).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.TemplateContent != nil {
- const prefix string = ",\"templateContent\":"
- out.RawString(prefix)
- (*in.TemplateContent).MarshalEasyJSON(out)
- }
- if len(in.PseudoElements) != 0 {
- const prefix string = ",\"pseudoElements\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v15, v16 := range in.PseudoElements {
- if v15 > 0 {
- out.RawByte(',')
- }
- if v16 == nil {
- out.RawString("null")
- } else {
- (*v16).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.DistributedNodes) != 0 {
- const prefix string = ",\"distributedNodes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v17, v18 := range in.DistributedNodes {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.IsSVG {
- const prefix string = ",\"isSVG\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsSVG))
- }
- if in.CompatibilityMode != "" {
- const prefix string = ",\"compatibilityMode\":"
- out.RawString(prefix)
- (in.CompatibilityMode).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Node) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Node) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Node) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp5(in *jlexer.Lexer, out *Frame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- (out.ID).UnmarshalEasyJSON(in)
- case "parentId":
- (out.ParentID).UnmarshalEasyJSON(in)
- case "loaderId":
- out.LoaderID = LoaderID(in.String())
- case "name":
- out.Name = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "urlFragment":
- out.URLFragment = string(in.String())
- case "domainAndRegistry":
- out.DomainAndRegistry = string(in.String())
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "mimeType":
- out.MimeType = string(in.String())
- case "unreachableUrl":
- out.UnreachableURL = string(in.String())
- case "adFrameStatus":
- if in.IsNull() {
- in.Skip()
- out.AdFrameStatus = nil
- } else {
- if out.AdFrameStatus == nil {
- out.AdFrameStatus = new(AdFrameStatus)
- }
- (*out.AdFrameStatus).UnmarshalEasyJSON(in)
- }
- case "secureContextType":
- (out.SecureContextType).UnmarshalEasyJSON(in)
- case "crossOriginIsolatedContextType":
- (out.CrossOriginIsolatedContextType).UnmarshalEasyJSON(in)
- case "gatedAPIFeatures":
- if in.IsNull() {
- in.Skip()
- out.GatedAPIFeatures = nil
- } else {
- in.Delim('[')
- if out.GatedAPIFeatures == nil {
- if !in.IsDelim(']') {
- out.GatedAPIFeatures = make([]GatedAPIFeatures, 0, 4)
- } else {
- out.GatedAPIFeatures = []GatedAPIFeatures{}
- }
- } else {
- out.GatedAPIFeatures = (out.GatedAPIFeatures)[:0]
- }
- for !in.IsDelim(']') {
- var v19 GatedAPIFeatures
- (v19).UnmarshalEasyJSON(in)
- out.GatedAPIFeatures = append(out.GatedAPIFeatures, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "originTrials":
- if in.IsNull() {
- in.Skip()
- out.OriginTrials = nil
- } else {
- in.Delim('[')
- if out.OriginTrials == nil {
- if !in.IsDelim(']') {
- out.OriginTrials = make([]*OriginTrial, 0, 8)
- } else {
- out.OriginTrials = []*OriginTrial{}
- }
- } else {
- out.OriginTrials = (out.OriginTrials)[:0]
- }
- for !in.IsDelim(']') {
- var v20 *OriginTrial
- if in.IsNull() {
- in.Skip()
- v20 = nil
- } else {
- if v20 == nil {
- v20 = new(OriginTrial)
- }
- (*v20).UnmarshalEasyJSON(in)
- }
- out.OriginTrials = append(out.OriginTrials, v20)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp5(out *jwriter.Writer, in Frame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- if in.ParentID != "" {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix)
- out.String(string(in.ParentID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- if in.Name != "" {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.URLFragment != "" {
- const prefix string = ",\"urlFragment\":"
- out.RawString(prefix)
- out.String(string(in.URLFragment))
- }
- {
- const prefix string = ",\"domainAndRegistry\":"
- out.RawString(prefix)
- out.String(string(in.DomainAndRegistry))
- }
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix)
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"mimeType\":"
- out.RawString(prefix)
- out.String(string(in.MimeType))
- }
- if in.UnreachableURL != "" {
- const prefix string = ",\"unreachableUrl\":"
- out.RawString(prefix)
- out.String(string(in.UnreachableURL))
- }
- if in.AdFrameStatus != nil {
- const prefix string = ",\"adFrameStatus\":"
- out.RawString(prefix)
- (*in.AdFrameStatus).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"secureContextType\":"
- out.RawString(prefix)
- (in.SecureContextType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"crossOriginIsolatedContextType\":"
- out.RawString(prefix)
- (in.CrossOriginIsolatedContextType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"gatedAPIFeatures\":"
- out.RawString(prefix)
- if in.GatedAPIFeatures == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v21, v22 := range in.GatedAPIFeatures {
- if v21 > 0 {
- out.RawByte(',')
- }
- (v22).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- if len(in.OriginTrials) != 0 {
- const prefix string = ",\"originTrials\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v23, v24 := range in.OriginTrials {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Frame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Frame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Frame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Frame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp6(in *jlexer.Lexer, out *BackendNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeType":
- (out.NodeType).UnmarshalEasyJSON(in)
- case "nodeName":
- out.NodeName = string(in.String())
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp6(out *jwriter.Writer, in BackendNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeType\":"
- out.RawString(prefix[1:])
- (in.NodeType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"nodeName\":"
- out.RawString(prefix)
- out.String(string(in.NodeName))
- }
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BackendNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BackendNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BackendNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BackendNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp7(in *jlexer.Lexer, out *AdFrameStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "adFrameType":
- (out.AdFrameType).UnmarshalEasyJSON(in)
- case "explanations":
- if in.IsNull() {
- in.Skip()
- out.Explanations = nil
- } else {
- in.Delim('[')
- if out.Explanations == nil {
- if !in.IsDelim(']') {
- out.Explanations = make([]AdFrameExplanation, 0, 4)
- } else {
- out.Explanations = []AdFrameExplanation{}
- }
- } else {
- out.Explanations = (out.Explanations)[:0]
- }
- for !in.IsDelim(']') {
- var v25 AdFrameExplanation
- (v25).UnmarshalEasyJSON(in)
- out.Explanations = append(out.Explanations, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp7(out *jwriter.Writer, in AdFrameStatus) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"adFrameType\":"
- out.RawString(prefix[1:])
- (in.AdFrameType).MarshalEasyJSON(out)
- }
- if len(in.Explanations) != 0 {
- const prefix string = ",\"explanations\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v26, v27 := range in.Explanations {
- if v26 > 0 {
- out.RawByte(',')
- }
- (v27).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AdFrameStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AdFrameStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AdFrameStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AdFrameStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp7(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/cdp/types.go b/vendor/github.com/chromedp/cdproto/cdp/types.go
deleted file mode 100644
index 103bc1f8365..00000000000
--- a/vendor/github.com/chromedp/cdproto/cdp/types.go
+++ /dev/null
@@ -1,1304 +0,0 @@
-package cdp
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "errors"
- "fmt"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "github.com/chromedp/sysutil"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// Executor is the common interface for executing a command.
-type Executor interface {
- // Execute executes the command.
- Execute(context.Context, string, easyjson.Marshaler, easyjson.Unmarshaler) error
-}
-
-// contextKey is the context key type.
-type contextKey int
-
-// context keys.
-const (
- executorKey contextKey = iota
-)
-
-// WithExecutor sets the message executor for the context.
-func WithExecutor(parent context.Context, executor Executor) context.Context {
- return context.WithValue(parent, executorKey, executor)
-}
-
-// ExecutorFromContext returns the message executor for the context.
-func ExecutorFromContext(ctx context.Context) Executor {
- return ctx.Value(executorKey).(Executor)
-}
-
-// Execute uses the context's message executor to send a command or event
-// method marshaling the provided parameters, and unmarshaling to res.
-func Execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
- if executor := ctx.Value(executorKey); executor != nil {
- return executor.(Executor).Execute(ctx, method, params, res)
- }
- return ErrInvalidContext
-}
-
-// Error is a error.
-type Error string
-
-// Error values.
-const (
- // ErrInvalidContext is the invalid context error.
- ErrInvalidContext Error = "invalid context"
-
- // ErrMsgMissingParamsOrResult is the msg missing params or result error.
- ErrMsgMissingParamsOrResult Error = "msg missing params or result"
-)
-
-// Error satisfies the error interface.
-func (err Error) Error() string {
- return string(err)
-}
-
-// ErrUnknownCommandOrEvent is an unknown command or event error.
-type ErrUnknownCommandOrEvent string
-
-// Error satisfies the error interface.
-func (err ErrUnknownCommandOrEvent) Error() string {
- return fmt.Sprintf("unknown command or event %q", string(err))
-}
-
-// BrowserContextID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-BrowserContextID
-type BrowserContextID string
-
-// String returns the BrowserContextID as string value.
-func (t BrowserContextID) String() string {
- return string(t)
-}
-
-// NodeID unique DOM node identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-NodeId
-type NodeID int64
-
-// Int64 returns the NodeID as int64 value.
-func (t NodeID) Int64() int64 {
- return int64(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *NodeID) UnmarshalEasyJSON(in *jlexer.Lexer) {
- buf := in.Raw()
- if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
- buf = buf[1 : l-1]
- }
-
- v, err := strconv.ParseInt(string(buf), 10, 64)
- if err != nil {
- in.AddError(err)
- }
-
- *t = NodeID(v)
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *NodeID) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BackendNodeID unique DOM node identifier used to reference a node that may
-// not have been pushed to the front-end.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BackendNodeId
-type BackendNodeID int64
-
-// Int64 returns the BackendNodeID as int64 value.
-func (t BackendNodeID) Int64() int64 {
- return int64(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BackendNodeID) UnmarshalEasyJSON(in *jlexer.Lexer) {
- buf := in.Raw()
- if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
- buf = buf[1 : l-1]
- }
-
- v, err := strconv.ParseInt(string(buf), 10, 64)
- if err != nil {
- in.AddError(err)
- }
-
- *t = BackendNodeID(v)
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BackendNodeID) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BackendNode backend node with a friendly name.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BackendNode
-type BackendNode struct {
- NodeType NodeType `json:"nodeType"` // Node's nodeType.
- NodeName string `json:"nodeName"` // Node's nodeName.
- BackendNodeID BackendNodeID `json:"backendNodeId"`
-}
-
-// PseudoType pseudo element type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-PseudoType
-type PseudoType string
-
-// String returns the PseudoType as string value.
-func (t PseudoType) String() string {
- return string(t)
-}
-
-// PseudoType values.
-const (
- PseudoTypeFirstLine PseudoType = "first-line"
- PseudoTypeFirstLetter PseudoType = "first-letter"
- PseudoTypeBefore PseudoType = "before"
- PseudoTypeAfter PseudoType = "after"
- PseudoTypeMarker PseudoType = "marker"
- PseudoTypeBackdrop PseudoType = "backdrop"
- PseudoTypeSelection PseudoType = "selection"
- PseudoTypeTargetText PseudoType = "target-text"
- PseudoTypeSpellingError PseudoType = "spelling-error"
- PseudoTypeGrammarError PseudoType = "grammar-error"
- PseudoTypeFirstLineInherited PseudoType = "first-line-inherited"
- PseudoTypeScrollbar PseudoType = "scrollbar"
- PseudoTypeScrollbarThumb PseudoType = "scrollbar-thumb"
- PseudoTypeScrollbarButton PseudoType = "scrollbar-button"
- PseudoTypeScrollbarTrack PseudoType = "scrollbar-track"
- PseudoTypeScrollbarTrackPiece PseudoType = "scrollbar-track-piece"
- PseudoTypeScrollbarCorner PseudoType = "scrollbar-corner"
- PseudoTypeResizer PseudoType = "resizer"
- PseudoTypeInputListButton PseudoType = "input-list-button"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PseudoType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PseudoType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PseudoType(in.String()) {
- case PseudoTypeFirstLine:
- *t = PseudoTypeFirstLine
- case PseudoTypeFirstLetter:
- *t = PseudoTypeFirstLetter
- case PseudoTypeBefore:
- *t = PseudoTypeBefore
- case PseudoTypeAfter:
- *t = PseudoTypeAfter
- case PseudoTypeMarker:
- *t = PseudoTypeMarker
- case PseudoTypeBackdrop:
- *t = PseudoTypeBackdrop
- case PseudoTypeSelection:
- *t = PseudoTypeSelection
- case PseudoTypeTargetText:
- *t = PseudoTypeTargetText
- case PseudoTypeSpellingError:
- *t = PseudoTypeSpellingError
- case PseudoTypeGrammarError:
- *t = PseudoTypeGrammarError
- case PseudoTypeFirstLineInherited:
- *t = PseudoTypeFirstLineInherited
- case PseudoTypeScrollbar:
- *t = PseudoTypeScrollbar
- case PseudoTypeScrollbarThumb:
- *t = PseudoTypeScrollbarThumb
- case PseudoTypeScrollbarButton:
- *t = PseudoTypeScrollbarButton
- case PseudoTypeScrollbarTrack:
- *t = PseudoTypeScrollbarTrack
- case PseudoTypeScrollbarTrackPiece:
- *t = PseudoTypeScrollbarTrackPiece
- case PseudoTypeScrollbarCorner:
- *t = PseudoTypeScrollbarCorner
- case PseudoTypeResizer:
- *t = PseudoTypeResizer
- case PseudoTypeInputListButton:
- *t = PseudoTypeInputListButton
-
- default:
- in.AddError(errors.New("unknown PseudoType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PseudoType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ShadowRootType shadow root type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ShadowRootType
-type ShadowRootType string
-
-// String returns the ShadowRootType as string value.
-func (t ShadowRootType) String() string {
- return string(t)
-}
-
-// ShadowRootType values.
-const (
- ShadowRootTypeUserAgent ShadowRootType = "user-agent"
- ShadowRootTypeOpen ShadowRootType = "open"
- ShadowRootTypeClosed ShadowRootType = "closed"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ShadowRootType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ShadowRootType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ShadowRootType(in.String()) {
- case ShadowRootTypeUserAgent:
- *t = ShadowRootTypeUserAgent
- case ShadowRootTypeOpen:
- *t = ShadowRootTypeOpen
- case ShadowRootTypeClosed:
- *t = ShadowRootTypeClosed
-
- default:
- in.AddError(errors.New("unknown ShadowRootType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ShadowRootType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CompatibilityMode document compatibility mode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-CompatibilityMode
-type CompatibilityMode string
-
-// String returns the CompatibilityMode as string value.
-func (t CompatibilityMode) String() string {
- return string(t)
-}
-
-// CompatibilityMode values.
-const (
- CompatibilityModeQuirksMode CompatibilityMode = "QuirksMode"
- CompatibilityModeLimitedQuirksMode CompatibilityMode = "LimitedQuirksMode"
- CompatibilityModeNoQuirksMode CompatibilityMode = "NoQuirksMode"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CompatibilityMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CompatibilityMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CompatibilityMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CompatibilityMode(in.String()) {
- case CompatibilityModeQuirksMode:
- *t = CompatibilityModeQuirksMode
- case CompatibilityModeLimitedQuirksMode:
- *t = CompatibilityModeLimitedQuirksMode
- case CompatibilityModeNoQuirksMode:
- *t = CompatibilityModeNoQuirksMode
-
- default:
- in.AddError(errors.New("unknown CompatibilityMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CompatibilityMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Node DOM interaction is implemented in terms of mirror objects that
-// represent the actual DOM nodes. DOMNode is a base node mirror type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Node
-type Node struct {
- NodeID NodeID `json:"nodeId"` // Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
- ParentID NodeID `json:"parentId,omitempty"` // The id of the parent node if any.
- BackendNodeID BackendNodeID `json:"backendNodeId"` // The BackendNodeId for this node.
- NodeType NodeType `json:"nodeType"` // Node's nodeType.
- NodeName string `json:"nodeName"` // Node's nodeName.
- LocalName string `json:"localName"` // Node's localName.
- NodeValue string `json:"nodeValue"` // Node's nodeValue.
- ChildNodeCount int64 `json:"childNodeCount,omitempty"` // Child count for Container nodes.
- Children []*Node `json:"children,omitempty"` // Child nodes of this node when requested with children.
- Attributes []string `json:"attributes,omitempty"` // Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
- DocumentURL string `json:"documentURL,omitempty"` // Document URL that Document or FrameOwner node points to.
- BaseURL string `json:"baseURL,omitempty"` // Base URL that Document or FrameOwner node uses for URL completion.
- PublicID string `json:"publicId,omitempty"` // DocumentType's publicId.
- SystemID string `json:"systemId,omitempty"` // DocumentType's systemId.
- InternalSubset string `json:"internalSubset,omitempty"` // DocumentType's internalSubset.
- XMLVersion string `json:"xmlVersion,omitempty"` // Document's XML version in case of XML documents.
- Name string `json:"name,omitempty"` // Attr's name.
- Value string `json:"value,omitempty"` // Attr's value.
- PseudoType PseudoType `json:"pseudoType,omitempty"` // Pseudo element type for this node.
- ShadowRootType ShadowRootType `json:"shadowRootType,omitempty"` // Shadow root type.
- FrameID FrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements.
- ContentDocument *Node `json:"contentDocument,omitempty"` // Content document for frame owner elements.
- ShadowRoots []*Node `json:"shadowRoots,omitempty"` // Shadow root list for given element host.
- TemplateContent *Node `json:"templateContent,omitempty"` // Content document fragment for template elements.
- PseudoElements []*Node `json:"pseudoElements,omitempty"` // Pseudo elements associated with this node.
- DistributedNodes []*BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
- IsSVG bool `json:"isSVG,omitempty"` // Whether the node is SVG.
- CompatibilityMode CompatibilityMode `json:"compatibilityMode,omitempty"`
- Parent *Node `json:"-"` // Parent node.
- Invalidated chan struct{} `json:"-"` // Invalidated channel.
- State NodeState `json:"-"` // Node state.
- sync.RWMutex `json:"-"` // Read write mutex.
-}
-
-// AttributeValue returns the named attribute for the node.
-func (n *Node) AttributeValue(name string) string {
- value, _ := n.Attribute(name)
- return value
-}
-
-// Attribute returns the named attribute for the node and if it exists.
-func (n *Node) Attribute(name string) (string, bool) {
- n.RLock()
- defer n.RUnlock()
-
- for i := 0; i < len(n.Attributes); i += 2 {
- if n.Attributes[i] == name {
- return n.Attributes[i+1], true
- }
- }
-
- return "", false
-}
-
-// xpath builds the xpath string.
-func (n *Node) xpath(stopAtDocument, stopAtID bool) string {
- n.RLock()
- defer n.RUnlock()
-
- p, pos, id := "", "", n.AttributeValue("id")
- switch {
- case n.Parent == nil:
- return n.LocalName
-
- case stopAtDocument && n.NodeType == NodeTypeDocument:
- return ""
-
- case stopAtID && id != "":
- p = "/"
- pos = `[@id='` + id + `']`
-
- case n.Parent != nil:
- var i int
- var found bool
-
- n.Parent.RLock()
- for j := 0; j < len(n.Parent.Children); j++ {
- if n.Parent.Children[j].LocalName == n.LocalName {
- i++
- }
- if n.Parent.Children[j].NodeID == n.NodeID {
- found = true
- break
- }
- }
- n.Parent.RUnlock()
-
- if found {
- pos = "[" + strconv.Itoa(i) + "]"
- }
-
- p = n.Parent.xpath(stopAtDocument, stopAtID)
- }
-
- localName := n.LocalName
- if n.IsSVG {
- localName = `*[local-name()='` + localName + `']`
- }
- return p + "/" + localName + pos
-}
-
-// PartialXPathByID returns the partial XPath for the node, stopping at the
-// first parent with an id attribute or at nearest parent document node.
-func (n *Node) PartialXPathByID() string {
- return n.xpath(true, true)
-}
-
-// PartialXPath returns the partial XPath for the node, stopping at the nearest
-// parent document node.
-func (n *Node) PartialXPath() string {
- return n.xpath(true, false)
-}
-
-// FullXPathByID returns the full XPath for the node, stopping at the top most
-// document root or at the closest parent node with an id attribute.
-func (n *Node) FullXPathByID() string {
- return n.xpath(false, true)
-}
-
-// FullXPath returns the full XPath for the node, stopping only at the top most
-// document root.
-func (n *Node) FullXPath() string {
- return n.xpath(false, false)
-}
-
-// Dump builds a printable string representation of the node and its children.
-func (n *Node) Dump(prefix, indent string, nodeIDs bool) string {
- if n == nil {
- return prefix + ""
- }
-
- n.RLock()
- defer n.RUnlock()
-
- s := n.LocalName
- if s == "" {
- s = n.NodeName
- }
-
- for i := 0; i < len(n.Attributes); i += 2 {
- if strings.ToLower(n.Attributes[i]) == "id" {
- s += "#" + n.Attributes[i+1]
- break
- }
- }
-
- if n.NodeType != NodeTypeElement && n.NodeType != NodeTypeText {
- s += fmt.Sprintf(" <%s>", n.NodeType)
- }
-
- if n.NodeType == NodeTypeText {
- v := n.NodeValue
- if len(v) > 15 {
- v = v[:15] + "..."
- }
- s += fmt.Sprintf(" %q", v)
- }
-
- if n.NodeType == NodeTypeElement && len(n.Attributes) > 0 {
- attrs := ""
- for i := 0; i < len(n.Attributes); i += 2 {
- if strings.ToLower(n.Attributes[i]) == "id" {
- continue
- }
- if attrs != "" {
- attrs += " "
- }
- attrs += fmt.Sprintf("%s=%q", n.Attributes[i], n.Attributes[i+1])
- }
- if attrs != "" {
- s += " [" + attrs + "]"
- }
- }
-
- if nodeIDs {
- s += fmt.Sprintf(" (%d)", n.NodeID)
- }
-
- for i := 0; i < len(n.Children); i++ {
- s += "\n" + n.Children[i].Dump(prefix+indent, indent, nodeIDs)
- }
-
- return prefix + s
-}
-
-// NodeState is the state of a DOM node.
-type NodeState uint8
-
-// NodeState enum values.
-const (
- NodeReady NodeState = 1 << (7 - iota)
- NodeVisible
- NodeHighlighted
-)
-
-// nodeStateNames are the names of the node states.
-var nodeStateNames = map[NodeState]string{
- NodeReady: "Ready",
- NodeVisible: "Visible",
- NodeHighlighted: "Highlighted",
-}
-
-// String satisfies stringer interface.
-func (ns NodeState) String() string {
- var s []string
- for k, v := range nodeStateNames {
- if ns&k != 0 {
- s = append(s, v)
- }
- }
- return "[" + strings.Join(s, " ") + "]"
-}
-
-// EmptyNodeID is the "non-existent" node id.
-const EmptyNodeID = NodeID(0)
-
-// RGBA a structure holding an RGBA color.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-RGBA
-type RGBA struct {
- R int64 `json:"r"` // The red component, in the [0-255] range.
- G int64 `json:"g"` // The green component, in the [0-255] range.
- B int64 `json:"b"` // The blue component, in the [0-255] range.
- A float64 `json:"a"` // The alpha component, in the [0-1] range (default: 1).
-}
-
-// NodeType node type.
-//
-// See: https://developer.mozilla.org/en/docs/Web/API/Node/nodeType
-type NodeType int64
-
-// Int64 returns the NodeType as int64 value.
-func (t NodeType) Int64() int64 {
- return int64(t)
-}
-
-// NodeType values.
-const (
- NodeTypeElement NodeType = 1
- NodeTypeAttribute NodeType = 2
- NodeTypeText NodeType = 3
- NodeTypeCDATA NodeType = 4
- NodeTypeEntityReference NodeType = 5
- NodeTypeEntity NodeType = 6
- NodeTypeProcessingInstruction NodeType = 7
- NodeTypeComment NodeType = 8
- NodeTypeDocument NodeType = 9
- NodeTypeDocumentType NodeType = 10
- NodeTypeDocumentFragment NodeType = 11
- NodeTypeNotation NodeType = 12
-)
-
-// String returns the NodeType as string value.
-func (t NodeType) String() string {
- switch t {
- case NodeTypeElement:
- return "Element"
- case NodeTypeAttribute:
- return "Attribute"
- case NodeTypeText:
- return "Text"
- case NodeTypeCDATA:
- return "CDATA"
- case NodeTypeEntityReference:
- return "EntityReference"
- case NodeTypeEntity:
- return "Entity"
- case NodeTypeProcessingInstruction:
- return "ProcessingInstruction"
- case NodeTypeComment:
- return "Comment"
- case NodeTypeDocument:
- return "Document"
- case NodeTypeDocumentType:
- return "DocumentType"
- case NodeTypeDocumentFragment:
- return "DocumentFragment"
- case NodeTypeNotation:
- return "Notation"
- }
-
- return fmt.Sprintf("NodeType(%d)", t)
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t NodeType) MarshalEasyJSON(out *jwriter.Writer) {
- out.Int64(int64(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t NodeType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch NodeType(in.Int64()) {
- case NodeTypeElement:
- *t = NodeTypeElement
- case NodeTypeAttribute:
- *t = NodeTypeAttribute
- case NodeTypeText:
- *t = NodeTypeText
- case NodeTypeCDATA:
- *t = NodeTypeCDATA
- case NodeTypeEntityReference:
- *t = NodeTypeEntityReference
- case NodeTypeEntity:
- *t = NodeTypeEntity
- case NodeTypeProcessingInstruction:
- *t = NodeTypeProcessingInstruction
- case NodeTypeComment:
- *t = NodeTypeComment
- case NodeTypeDocument:
- *t = NodeTypeDocument
- case NodeTypeDocumentType:
- *t = NodeTypeDocumentType
- case NodeTypeDocumentFragment:
- *t = NodeTypeDocumentFragment
- case NodeTypeNotation:
- *t = NodeTypeNotation
-
- default:
- in.AddError(errors.New("unknown NodeType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *NodeType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// LoaderID unique loader identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-LoaderId
-type LoaderID string
-
-// String returns the LoaderID as string value.
-func (t LoaderID) String() string {
- return string(t)
-}
-
-// TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TimeSinceEpoch
-type TimeSinceEpoch time.Time
-
-// Time returns the TimeSinceEpoch as time.Time value.
-func (t TimeSinceEpoch) Time() time.Time {
- return time.Time(t)
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TimeSinceEpoch) MarshalEasyJSON(out *jwriter.Writer) {
- v := float64(time.Time(t).UnixNano() / int64(time.Second))
-
- out.Buffer.EnsureSpace(20)
- out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64)
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TimeSinceEpoch) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TimeSinceEpoch) UnmarshalEasyJSON(in *jlexer.Lexer) {
- *t = TimeSinceEpoch(time.Unix(0, int64(in.Float64()*float64(time.Second))))
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MonotonicTime monotonically increasing time in seconds since an arbitrary
-// point in the past.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-MonotonicTime
-type MonotonicTime time.Time
-
-// Time returns the MonotonicTime as time.Time value.
-func (t MonotonicTime) Time() time.Time {
- return time.Time(t)
-}
-
-// MonotonicTimeEpoch is the MonotonicTime time epoch.
-var MonotonicTimeEpoch *time.Time
-
-func init() {
- // initialize epoch
- bt := sysutil.BootTime()
- MonotonicTimeEpoch = &bt
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MonotonicTime) MarshalEasyJSON(out *jwriter.Writer) {
- v := float64(time.Time(t).Sub(*MonotonicTimeEpoch)) / float64(time.Second)
-
- out.Buffer.EnsureSpace(20)
- out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64)
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MonotonicTime) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MonotonicTime) UnmarshalEasyJSON(in *jlexer.Lexer) {
- *t = MonotonicTime(MonotonicTimeEpoch.Add(time.Duration(in.Float64() * float64(time.Second))))
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MonotonicTime) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// FrameID unique frame identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameId
-type FrameID string
-
-// String returns the FrameID as string value.
-func (t FrameID) String() string {
- return string(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *FrameID) UnmarshalEasyJSON(in *jlexer.Lexer) {
- buf := in.Raw()
- if l := len(buf); l > 2 && buf[0] == '"' && buf[l-1] == '"' {
- buf = buf[1 : l-1]
- }
-
- *t = FrameID(buf)
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *FrameID) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AdFrameType indicates whether a frame has been identified as an ad.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameType
-type AdFrameType string
-
-// String returns the AdFrameType as string value.
-func (t AdFrameType) String() string {
- return string(t)
-}
-
-// AdFrameType values.
-const (
- AdFrameTypeNone AdFrameType = "none"
- AdFrameTypeChild AdFrameType = "child"
- AdFrameTypeRoot AdFrameType = "root"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AdFrameType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AdFrameType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AdFrameType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AdFrameType(in.String()) {
- case AdFrameTypeNone:
- *t = AdFrameTypeNone
- case AdFrameTypeChild:
- *t = AdFrameTypeChild
- case AdFrameTypeRoot:
- *t = AdFrameTypeRoot
-
- default:
- in.AddError(errors.New("unknown AdFrameType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AdFrameType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AdFrameExplanation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameExplanation
-type AdFrameExplanation string
-
-// String returns the AdFrameExplanation as string value.
-func (t AdFrameExplanation) String() string {
- return string(t)
-}
-
-// AdFrameExplanation values.
-const (
- AdFrameExplanationParentIsAd AdFrameExplanation = "ParentIsAd"
- AdFrameExplanationCreatedByAdScript AdFrameExplanation = "CreatedByAdScript"
- AdFrameExplanationMatchedBlockingRule AdFrameExplanation = "MatchedBlockingRule"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AdFrameExplanation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AdFrameExplanation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AdFrameExplanation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AdFrameExplanation(in.String()) {
- case AdFrameExplanationParentIsAd:
- *t = AdFrameExplanationParentIsAd
- case AdFrameExplanationCreatedByAdScript:
- *t = AdFrameExplanationCreatedByAdScript
- case AdFrameExplanationMatchedBlockingRule:
- *t = AdFrameExplanationMatchedBlockingRule
-
- default:
- in.AddError(errors.New("unknown AdFrameExplanation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AdFrameExplanation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AdFrameStatus indicates whether a frame has been identified as an ad and
-// why.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameStatus
-type AdFrameStatus struct {
- AdFrameType AdFrameType `json:"adFrameType"`
- Explanations []AdFrameExplanation `json:"explanations,omitempty"`
-}
-
-// SecureContextType indicates whether the frame is a secure context and why
-// it is the case.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-SecureContextType
-type SecureContextType string
-
-// String returns the SecureContextType as string value.
-func (t SecureContextType) String() string {
- return string(t)
-}
-
-// SecureContextType values.
-const (
- SecureContextTypeSecure SecureContextType = "Secure"
- SecureContextTypeSecureLocalhost SecureContextType = "SecureLocalhost"
- SecureContextTypeInsecureScheme SecureContextType = "InsecureScheme"
- SecureContextTypeInsecureAncestor SecureContextType = "InsecureAncestor"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SecureContextType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SecureContextType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SecureContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SecureContextType(in.String()) {
- case SecureContextTypeSecure:
- *t = SecureContextTypeSecure
- case SecureContextTypeSecureLocalhost:
- *t = SecureContextTypeSecureLocalhost
- case SecureContextTypeInsecureScheme:
- *t = SecureContextTypeInsecureScheme
- case SecureContextTypeInsecureAncestor:
- *t = SecureContextTypeInsecureAncestor
-
- default:
- in.AddError(errors.New("unknown SecureContextType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SecureContextType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CrossOriginIsolatedContextType indicates whether the frame is cross-origin
-// isolated and why it is the case.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-CrossOriginIsolatedContextType
-type CrossOriginIsolatedContextType string
-
-// String returns the CrossOriginIsolatedContextType as string value.
-func (t CrossOriginIsolatedContextType) String() string {
- return string(t)
-}
-
-// CrossOriginIsolatedContextType values.
-const (
- CrossOriginIsolatedContextTypeIsolated CrossOriginIsolatedContextType = "Isolated"
- CrossOriginIsolatedContextTypeNotIsolated CrossOriginIsolatedContextType = "NotIsolated"
- CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled CrossOriginIsolatedContextType = "NotIsolatedFeatureDisabled"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CrossOriginIsolatedContextType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CrossOriginIsolatedContextType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CrossOriginIsolatedContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CrossOriginIsolatedContextType(in.String()) {
- case CrossOriginIsolatedContextTypeIsolated:
- *t = CrossOriginIsolatedContextTypeIsolated
- case CrossOriginIsolatedContextTypeNotIsolated:
- *t = CrossOriginIsolatedContextTypeNotIsolated
- case CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled:
- *t = CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled
-
- default:
- in.AddError(errors.New("unknown CrossOriginIsolatedContextType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CrossOriginIsolatedContextType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// GatedAPIFeatures [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-GatedAPIFeatures
-type GatedAPIFeatures string
-
-// String returns the GatedAPIFeatures as string value.
-func (t GatedAPIFeatures) String() string {
- return string(t)
-}
-
-// GatedAPIFeatures values.
-const (
- GatedAPIFeaturesSharedArrayBuffers GatedAPIFeatures = "SharedArrayBuffers"
- GatedAPIFeaturesSharedArrayBuffersTransferAllowed GatedAPIFeatures = "SharedArrayBuffersTransferAllowed"
- GatedAPIFeaturesPerformanceMeasureMemory GatedAPIFeatures = "PerformanceMeasureMemory"
- GatedAPIFeaturesPerformanceProfile GatedAPIFeatures = "PerformanceProfile"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t GatedAPIFeatures) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t GatedAPIFeatures) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *GatedAPIFeatures) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch GatedAPIFeatures(in.String()) {
- case GatedAPIFeaturesSharedArrayBuffers:
- *t = GatedAPIFeaturesSharedArrayBuffers
- case GatedAPIFeaturesSharedArrayBuffersTransferAllowed:
- *t = GatedAPIFeaturesSharedArrayBuffersTransferAllowed
- case GatedAPIFeaturesPerformanceMeasureMemory:
- *t = GatedAPIFeaturesPerformanceMeasureMemory
- case GatedAPIFeaturesPerformanceProfile:
- *t = GatedAPIFeaturesPerformanceProfile
-
- default:
- in.AddError(errors.New("unknown GatedAPIFeatures value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *GatedAPIFeatures) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// OriginTrialTokenStatus origin
-// Trial(https://www.chromium.org/blink/origin-trials) support. Status for an
-// Origin Trial token.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialTokenStatus
-type OriginTrialTokenStatus string
-
-// String returns the OriginTrialTokenStatus as string value.
-func (t OriginTrialTokenStatus) String() string {
- return string(t)
-}
-
-// OriginTrialTokenStatus values.
-const (
- OriginTrialTokenStatusSuccess OriginTrialTokenStatus = "Success"
- OriginTrialTokenStatusNotSupported OriginTrialTokenStatus = "NotSupported"
- OriginTrialTokenStatusInsecure OriginTrialTokenStatus = "Insecure"
- OriginTrialTokenStatusExpired OriginTrialTokenStatus = "Expired"
- OriginTrialTokenStatusWrongOrigin OriginTrialTokenStatus = "WrongOrigin"
- OriginTrialTokenStatusInvalidSignature OriginTrialTokenStatus = "InvalidSignature"
- OriginTrialTokenStatusMalformed OriginTrialTokenStatus = "Malformed"
- OriginTrialTokenStatusWrongVersion OriginTrialTokenStatus = "WrongVersion"
- OriginTrialTokenStatusFeatureDisabled OriginTrialTokenStatus = "FeatureDisabled"
- OriginTrialTokenStatusTokenDisabled OriginTrialTokenStatus = "TokenDisabled"
- OriginTrialTokenStatusFeatureDisabledForUser OriginTrialTokenStatus = "FeatureDisabledForUser"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t OriginTrialTokenStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t OriginTrialTokenStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *OriginTrialTokenStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch OriginTrialTokenStatus(in.String()) {
- case OriginTrialTokenStatusSuccess:
- *t = OriginTrialTokenStatusSuccess
- case OriginTrialTokenStatusNotSupported:
- *t = OriginTrialTokenStatusNotSupported
- case OriginTrialTokenStatusInsecure:
- *t = OriginTrialTokenStatusInsecure
- case OriginTrialTokenStatusExpired:
- *t = OriginTrialTokenStatusExpired
- case OriginTrialTokenStatusWrongOrigin:
- *t = OriginTrialTokenStatusWrongOrigin
- case OriginTrialTokenStatusInvalidSignature:
- *t = OriginTrialTokenStatusInvalidSignature
- case OriginTrialTokenStatusMalformed:
- *t = OriginTrialTokenStatusMalformed
- case OriginTrialTokenStatusWrongVersion:
- *t = OriginTrialTokenStatusWrongVersion
- case OriginTrialTokenStatusFeatureDisabled:
- *t = OriginTrialTokenStatusFeatureDisabled
- case OriginTrialTokenStatusTokenDisabled:
- *t = OriginTrialTokenStatusTokenDisabled
- case OriginTrialTokenStatusFeatureDisabledForUser:
- *t = OriginTrialTokenStatusFeatureDisabledForUser
-
- default:
- in.AddError(errors.New("unknown OriginTrialTokenStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *OriginTrialTokenStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// OriginTrialStatus status for an Origin Trial.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialStatus
-type OriginTrialStatus string
-
-// String returns the OriginTrialStatus as string value.
-func (t OriginTrialStatus) String() string {
- return string(t)
-}
-
-// OriginTrialStatus values.
-const (
- OriginTrialStatusEnabled OriginTrialStatus = "Enabled"
- OriginTrialStatusValidTokenNotProvided OriginTrialStatus = "ValidTokenNotProvided"
- OriginTrialStatusOSNotSupported OriginTrialStatus = "OSNotSupported"
- OriginTrialStatusTrialNotAllowed OriginTrialStatus = "TrialNotAllowed"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t OriginTrialStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t OriginTrialStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *OriginTrialStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch OriginTrialStatus(in.String()) {
- case OriginTrialStatusEnabled:
- *t = OriginTrialStatusEnabled
- case OriginTrialStatusValidTokenNotProvided:
- *t = OriginTrialStatusValidTokenNotProvided
- case OriginTrialStatusOSNotSupported:
- *t = OriginTrialStatusOSNotSupported
- case OriginTrialStatusTrialNotAllowed:
- *t = OriginTrialStatusTrialNotAllowed
-
- default:
- in.AddError(errors.New("unknown OriginTrialStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *OriginTrialStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// OriginTrialUsageRestriction [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialUsageRestriction
-type OriginTrialUsageRestriction string
-
-// String returns the OriginTrialUsageRestriction as string value.
-func (t OriginTrialUsageRestriction) String() string {
- return string(t)
-}
-
-// OriginTrialUsageRestriction values.
-const (
- OriginTrialUsageRestrictionNone OriginTrialUsageRestriction = "None"
- OriginTrialUsageRestrictionSubset OriginTrialUsageRestriction = "Subset"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t OriginTrialUsageRestriction) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t OriginTrialUsageRestriction) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *OriginTrialUsageRestriction) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch OriginTrialUsageRestriction(in.String()) {
- case OriginTrialUsageRestrictionNone:
- *t = OriginTrialUsageRestrictionNone
- case OriginTrialUsageRestrictionSubset:
- *t = OriginTrialUsageRestrictionSubset
-
- default:
- in.AddError(errors.New("unknown OriginTrialUsageRestriction value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *OriginTrialUsageRestriction) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// OriginTrialToken [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialToken
-type OriginTrialToken struct {
- Origin string `json:"origin"`
- MatchSubDomains bool `json:"matchSubDomains"`
- TrialName string `json:"trialName"`
- ExpiryTime *TimeSinceEpoch `json:"expiryTime"`
- IsThirdParty bool `json:"isThirdParty"`
- UsageRestriction OriginTrialUsageRestriction `json:"usageRestriction"`
-}
-
-// OriginTrialTokenWithStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialTokenWithStatus
-type OriginTrialTokenWithStatus struct {
- RawTokenText string `json:"rawTokenText"`
- ParsedToken *OriginTrialToken `json:"parsedToken,omitempty"` // parsedToken is present only when the token is extractable and parsable.
- Status OriginTrialTokenStatus `json:"status"`
-}
-
-// OriginTrial [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrial
-type OriginTrial struct {
- TrialName string `json:"trialName"`
- Status OriginTrialStatus `json:"status"`
- TokensWithStatus []*OriginTrialTokenWithStatus `json:"tokensWithStatus"`
-}
-
-// Frame information about the Frame on the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Frame
-type Frame struct {
- ID FrameID `json:"id"` // Frame unique identifier.
- ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier.
- LoaderID LoaderID `json:"loaderId"` // Identifier of the loader associated with this frame.
- Name string `json:"name,omitempty"` // Frame's name as specified in the tag.
- URL string `json:"url"` // Frame document's URL without fragment.
- URLFragment string `json:"urlFragment,omitempty"` // Frame document's URL fragment including the '#'.
- DomainAndRegistry string `json:"domainAndRegistry"` // Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com" http://a.b.co.uk/file.html -> "b.co.uk"
- SecurityOrigin string `json:"securityOrigin"` // Frame document's security origin.
- MimeType string `json:"mimeType"` // Frame document's mimeType as determined by the browser.
- UnreachableURL string `json:"unreachableUrl,omitempty"` // If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
- AdFrameStatus *AdFrameStatus `json:"adFrameStatus,omitempty"` // Indicates whether this frame was tagged as an ad and why.
- SecureContextType SecureContextType `json:"secureContextType"` // Indicates whether the main document is a secure context and explains why that is the case.
- CrossOriginIsolatedContextType CrossOriginIsolatedContextType `json:"crossOriginIsolatedContextType"` // Indicates whether this is a cross origin isolated context.
- GatedAPIFeatures []GatedAPIFeatures `json:"gatedAPIFeatures"` // Indicated which gated APIs / features are available.
- OriginTrials []*OriginTrial `json:"originTrials,omitempty"` // Frame document's origin trials with at least one token present.
- State FrameState `json:"-"` // Frame state.
- Root *Node `json:"-"` // Frame document root.
- Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
- sync.RWMutex `json:"-"` // Read write mutex.
-}
-
-// FrameState is the state of a Frame.
-type FrameState uint16
-
-// FrameState enum values.
-const (
- FrameDOMContentEventFired FrameState = 1 << (15 - iota)
- FrameLoadEventFired
- FrameAttached
- FrameNavigated
- FrameLoading
- FrameScheduledNavigation
-)
-
-// frameStateNames are the names of the frame states.
-var frameStateNames = map[FrameState]string{
- FrameDOMContentEventFired: "DOMContentEventFired",
- FrameLoadEventFired: "LoadEventFired",
- FrameAttached: "Attached",
- FrameNavigated: "Navigated",
- FrameLoading: "Loading",
- FrameScheduledNavigation: "ScheduledNavigation",
-}
-
-// String satisfies stringer interface.
-func (fs FrameState) String() string {
- var s []string
- for k, v := range frameStateNames {
- if fs&k != 0 {
- s = append(s, v)
- }
- }
- return "[" + strings.Join(s, " ") + "]"
-}
-
-// EmptyFrameID is the "non-existent" frame id.
-const EmptyFrameID = FrameID("")
diff --git a/vendor/github.com/chromedp/cdproto/cdproto.go b/vendor/github.com/chromedp/cdproto/cdproto.go
deleted file mode 100644
index a8478486d4e..00000000000
--- a/vendor/github.com/chromedp/cdproto/cdproto.go
+++ /dev/null
@@ -1,2685 +0,0 @@
-// Package cdproto provides the Chrome DevTools Protocol
-// commands, types, and events for the cdproto domain.
-//
-// Chrome DevTools Protocol types.
-//
-// Generated by the cdproto-gen command.
-package cdproto
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "fmt"
- "strings"
-
- "github.com/chromedp/cdproto/accessibility"
- "github.com/chromedp/cdproto/animation"
- "github.com/chromedp/cdproto/applicationcache"
- "github.com/chromedp/cdproto/audits"
- "github.com/chromedp/cdproto/backgroundservice"
- "github.com/chromedp/cdproto/browser"
- "github.com/chromedp/cdproto/cachestorage"
- "github.com/chromedp/cdproto/cast"
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/css"
- "github.com/chromedp/cdproto/database"
- "github.com/chromedp/cdproto/debugger"
- "github.com/chromedp/cdproto/deviceorientation"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/domdebugger"
- "github.com/chromedp/cdproto/domsnapshot"
- "github.com/chromedp/cdproto/domstorage"
- "github.com/chromedp/cdproto/emulation"
- "github.com/chromedp/cdproto/fetch"
- "github.com/chromedp/cdproto/headlessexperimental"
- "github.com/chromedp/cdproto/heapprofiler"
- "github.com/chromedp/cdproto/indexeddb"
- "github.com/chromedp/cdproto/input"
- "github.com/chromedp/cdproto/inspector"
- "github.com/chromedp/cdproto/io"
- "github.com/chromedp/cdproto/layertree"
- "github.com/chromedp/cdproto/log"
- "github.com/chromedp/cdproto/media"
- "github.com/chromedp/cdproto/memory"
- "github.com/chromedp/cdproto/network"
- "github.com/chromedp/cdproto/overlay"
- "github.com/chromedp/cdproto/page"
- "github.com/chromedp/cdproto/performance"
- "github.com/chromedp/cdproto/performancetimeline"
- "github.com/chromedp/cdproto/profiler"
- "github.com/chromedp/cdproto/runtime"
- "github.com/chromedp/cdproto/security"
- "github.com/chromedp/cdproto/serviceworker"
- "github.com/chromedp/cdproto/storage"
- "github.com/chromedp/cdproto/systeminfo"
- "github.com/chromedp/cdproto/target"
- "github.com/chromedp/cdproto/tethering"
- "github.com/chromedp/cdproto/tracing"
- "github.com/chromedp/cdproto/webaudio"
- "github.com/chromedp/cdproto/webauthn"
- "github.com/mailru/easyjson"
-)
-
-// MethodType chrome DevTools Protocol method type (ie, event and command
-// names).
-type MethodType string
-
-// String returns the MethodType as string value.
-func (t MethodType) String() string {
- return string(t)
-}
-
-// Domain returns the Chrome DevTools Protocol domain of the event or command.
-func (t MethodType) Domain() string {
- return string(t[:strings.IndexByte(string(t), '.')])
-}
-
-// MethodType values.
-const (
- CommandAccessibilityDisable = accessibility.CommandDisable
- CommandAccessibilityEnable = accessibility.CommandEnable
- CommandAccessibilityGetPartialAXTree = accessibility.CommandGetPartialAXTree
- CommandAccessibilityGetFullAXTree = accessibility.CommandGetFullAXTree
- CommandAccessibilityGetChildAXNodes = accessibility.CommandGetChildAXNodes
- CommandAccessibilityQueryAXTree = accessibility.CommandQueryAXTree
- CommandAnimationDisable = animation.CommandDisable
- CommandAnimationEnable = animation.CommandEnable
- CommandAnimationGetCurrentTime = animation.CommandGetCurrentTime
- CommandAnimationGetPlaybackRate = animation.CommandGetPlaybackRate
- CommandAnimationReleaseAnimations = animation.CommandReleaseAnimations
- CommandAnimationResolveAnimation = animation.CommandResolveAnimation
- CommandAnimationSeekAnimations = animation.CommandSeekAnimations
- CommandAnimationSetPaused = animation.CommandSetPaused
- CommandAnimationSetPlaybackRate = animation.CommandSetPlaybackRate
- CommandAnimationSetTiming = animation.CommandSetTiming
- EventAnimationAnimationCanceled = "Animation.animationCanceled"
- EventAnimationAnimationCreated = "Animation.animationCreated"
- EventAnimationAnimationStarted = "Animation.animationStarted"
- CommandApplicationCacheEnable = applicationcache.CommandEnable
- CommandApplicationCacheGetApplicationCacheForFrame = applicationcache.CommandGetApplicationCacheForFrame
- CommandApplicationCacheGetFramesWithManifests = applicationcache.CommandGetFramesWithManifests
- CommandApplicationCacheGetManifestForFrame = applicationcache.CommandGetManifestForFrame
- EventApplicationCacheApplicationCacheStatusUpdated = "ApplicationCache.applicationCacheStatusUpdated"
- EventApplicationCacheNetworkStateUpdated = "ApplicationCache.networkStateUpdated"
- CommandAuditsGetEncodedResponse = audits.CommandGetEncodedResponse
- CommandAuditsDisable = audits.CommandDisable
- CommandAuditsEnable = audits.CommandEnable
- CommandAuditsCheckContrast = audits.CommandCheckContrast
- EventAuditsIssueAdded = "Audits.issueAdded"
- CommandBackgroundServiceStartObserving = backgroundservice.CommandStartObserving
- CommandBackgroundServiceStopObserving = backgroundservice.CommandStopObserving
- CommandBackgroundServiceSetRecording = backgroundservice.CommandSetRecording
- CommandBackgroundServiceClearEvents = backgroundservice.CommandClearEvents
- EventBackgroundServiceRecordingStateChanged = "BackgroundService.recordingStateChanged"
- EventBackgroundServiceBackgroundServiceEventReceived = "BackgroundService.backgroundServiceEventReceived"
- CommandBrowserSetPermission = browser.CommandSetPermission
- CommandBrowserGrantPermissions = browser.CommandGrantPermissions
- CommandBrowserResetPermissions = browser.CommandResetPermissions
- CommandBrowserSetDownloadBehavior = browser.CommandSetDownloadBehavior
- CommandBrowserCancelDownload = browser.CommandCancelDownload
- CommandBrowserClose = browser.CommandClose
- CommandBrowserCrash = browser.CommandCrash
- CommandBrowserCrashGpuProcess = browser.CommandCrashGpuProcess
- CommandBrowserGetVersion = browser.CommandGetVersion
- CommandBrowserGetBrowserCommandLine = browser.CommandGetBrowserCommandLine
- CommandBrowserGetHistograms = browser.CommandGetHistograms
- CommandBrowserGetHistogram = browser.CommandGetHistogram
- CommandBrowserGetWindowBounds = browser.CommandGetWindowBounds
- CommandBrowserGetWindowForTarget = browser.CommandGetWindowForTarget
- CommandBrowserSetWindowBounds = browser.CommandSetWindowBounds
- CommandBrowserSetDockTile = browser.CommandSetDockTile
- CommandBrowserExecuteBrowserCommand = browser.CommandExecuteBrowserCommand
- EventBrowserDownloadWillBegin = "Browser.downloadWillBegin"
- EventBrowserDownloadProgress = "Browser.downloadProgress"
- CommandCSSAddRule = css.CommandAddRule
- CommandCSSCollectClassNames = css.CommandCollectClassNames
- CommandCSSCreateStyleSheet = css.CommandCreateStyleSheet
- CommandCSSDisable = css.CommandDisable
- CommandCSSEnable = css.CommandEnable
- CommandCSSForcePseudoState = css.CommandForcePseudoState
- CommandCSSGetBackgroundColors = css.CommandGetBackgroundColors
- CommandCSSGetComputedStyleForNode = css.CommandGetComputedStyleForNode
- CommandCSSGetInlineStylesForNode = css.CommandGetInlineStylesForNode
- CommandCSSGetMatchedStylesForNode = css.CommandGetMatchedStylesForNode
- CommandCSSGetMediaQueries = css.CommandGetMediaQueries
- CommandCSSGetPlatformFontsForNode = css.CommandGetPlatformFontsForNode
- CommandCSSGetStyleSheetText = css.CommandGetStyleSheetText
- CommandCSSTrackComputedStyleUpdates = css.CommandTrackComputedStyleUpdates
- CommandCSSTakeComputedStyleUpdates = css.CommandTakeComputedStyleUpdates
- CommandCSSSetEffectivePropertyValueForNode = css.CommandSetEffectivePropertyValueForNode
- CommandCSSSetKeyframeKey = css.CommandSetKeyframeKey
- CommandCSSSetMediaText = css.CommandSetMediaText
- CommandCSSSetContainerQueryText = css.CommandSetContainerQueryText
- CommandCSSSetRuleSelector = css.CommandSetRuleSelector
- CommandCSSSetStyleSheetText = css.CommandSetStyleSheetText
- CommandCSSSetStyleTexts = css.CommandSetStyleTexts
- CommandCSSStartRuleUsageTracking = css.CommandStartRuleUsageTracking
- CommandCSSStopRuleUsageTracking = css.CommandStopRuleUsageTracking
- CommandCSSTakeCoverageDelta = css.CommandTakeCoverageDelta
- CommandCSSSetLocalFontsEnabled = css.CommandSetLocalFontsEnabled
- EventCSSFontsUpdated = "CSS.fontsUpdated"
- EventCSSMediaQueryResultChanged = "CSS.mediaQueryResultChanged"
- EventCSSStyleSheetAdded = "CSS.styleSheetAdded"
- EventCSSStyleSheetChanged = "CSS.styleSheetChanged"
- EventCSSStyleSheetRemoved = "CSS.styleSheetRemoved"
- CommandCacheStorageDeleteCache = cachestorage.CommandDeleteCache
- CommandCacheStorageDeleteEntry = cachestorage.CommandDeleteEntry
- CommandCacheStorageRequestCacheNames = cachestorage.CommandRequestCacheNames
- CommandCacheStorageRequestCachedResponse = cachestorage.CommandRequestCachedResponse
- CommandCacheStorageRequestEntries = cachestorage.CommandRequestEntries
- CommandCastEnable = cast.CommandEnable
- CommandCastDisable = cast.CommandDisable
- CommandCastSetSinkToUse = cast.CommandSetSinkToUse
- CommandCastStartTabMirroring = cast.CommandStartTabMirroring
- CommandCastStopCasting = cast.CommandStopCasting
- EventCastSinksUpdated = "Cast.sinksUpdated"
- EventCastIssueUpdated = "Cast.issueUpdated"
- CommandDOMCollectClassNamesFromSubtree = dom.CommandCollectClassNamesFromSubtree
- CommandDOMCopyTo = dom.CommandCopyTo
- CommandDOMDescribeNode = dom.CommandDescribeNode
- CommandDOMScrollIntoViewIfNeeded = dom.CommandScrollIntoViewIfNeeded
- CommandDOMDisable = dom.CommandDisable
- CommandDOMDiscardSearchResults = dom.CommandDiscardSearchResults
- CommandDOMEnable = dom.CommandEnable
- CommandDOMFocus = dom.CommandFocus
- CommandDOMGetAttributes = dom.CommandGetAttributes
- CommandDOMGetBoxModel = dom.CommandGetBoxModel
- CommandDOMGetContentQuads = dom.CommandGetContentQuads
- CommandDOMGetDocument = dom.CommandGetDocument
- CommandDOMGetNodesForSubtreeByStyle = dom.CommandGetNodesForSubtreeByStyle
- CommandDOMGetNodeForLocation = dom.CommandGetNodeForLocation
- CommandDOMGetOuterHTML = dom.CommandGetOuterHTML
- CommandDOMGetRelayoutBoundary = dom.CommandGetRelayoutBoundary
- CommandDOMGetSearchResults = dom.CommandGetSearchResults
- CommandDOMMarkUndoableState = dom.CommandMarkUndoableState
- CommandDOMMoveTo = dom.CommandMoveTo
- CommandDOMPerformSearch = dom.CommandPerformSearch
- CommandDOMPushNodeByPathToFrontend = dom.CommandPushNodeByPathToFrontend
- CommandDOMPushNodesByBackendIdsToFrontend = dom.CommandPushNodesByBackendIdsToFrontend
- CommandDOMQuerySelector = dom.CommandQuerySelector
- CommandDOMQuerySelectorAll = dom.CommandQuerySelectorAll
- CommandDOMRedo = dom.CommandRedo
- CommandDOMRemoveAttribute = dom.CommandRemoveAttribute
- CommandDOMRemoveNode = dom.CommandRemoveNode
- CommandDOMRequestChildNodes = dom.CommandRequestChildNodes
- CommandDOMRequestNode = dom.CommandRequestNode
- CommandDOMResolveNode = dom.CommandResolveNode
- CommandDOMSetAttributeValue = dom.CommandSetAttributeValue
- CommandDOMSetAttributesAsText = dom.CommandSetAttributesAsText
- CommandDOMSetFileInputFiles = dom.CommandSetFileInputFiles
- CommandDOMSetNodeStackTracesEnabled = dom.CommandSetNodeStackTracesEnabled
- CommandDOMGetNodeStackTraces = dom.CommandGetNodeStackTraces
- CommandDOMGetFileInfo = dom.CommandGetFileInfo
- CommandDOMSetInspectedNode = dom.CommandSetInspectedNode
- CommandDOMSetNodeName = dom.CommandSetNodeName
- CommandDOMSetNodeValue = dom.CommandSetNodeValue
- CommandDOMSetOuterHTML = dom.CommandSetOuterHTML
- CommandDOMUndo = dom.CommandUndo
- CommandDOMGetFrameOwner = dom.CommandGetFrameOwner
- EventDOMAttributeModified = "DOM.attributeModified"
- EventDOMAttributeRemoved = "DOM.attributeRemoved"
- EventDOMCharacterDataModified = "DOM.characterDataModified"
- EventDOMChildNodeCountUpdated = "DOM.childNodeCountUpdated"
- EventDOMChildNodeInserted = "DOM.childNodeInserted"
- EventDOMChildNodeRemoved = "DOM.childNodeRemoved"
- EventDOMDistributedNodesUpdated = "DOM.distributedNodesUpdated"
- EventDOMDocumentUpdated = "DOM.documentUpdated"
- EventDOMInlineStyleInvalidated = "DOM.inlineStyleInvalidated"
- EventDOMPseudoElementAdded = "DOM.pseudoElementAdded"
- EventDOMPseudoElementRemoved = "DOM.pseudoElementRemoved"
- EventDOMSetChildNodes = "DOM.setChildNodes"
- EventDOMShadowRootPopped = "DOM.shadowRootPopped"
- EventDOMShadowRootPushed = "DOM.shadowRootPushed"
- CommandDOMDebuggerGetEventListeners = domdebugger.CommandGetEventListeners
- CommandDOMDebuggerRemoveDOMBreakpoint = domdebugger.CommandRemoveDOMBreakpoint
- CommandDOMDebuggerRemoveEventListenerBreakpoint = domdebugger.CommandRemoveEventListenerBreakpoint
- CommandDOMDebuggerRemoveInstrumentationBreakpoint = domdebugger.CommandRemoveInstrumentationBreakpoint
- CommandDOMDebuggerRemoveXHRBreakpoint = domdebugger.CommandRemoveXHRBreakpoint
- CommandDOMDebuggerSetBreakOnCSPViolation = domdebugger.CommandSetBreakOnCSPViolation
- CommandDOMDebuggerSetDOMBreakpoint = domdebugger.CommandSetDOMBreakpoint
- CommandDOMDebuggerSetEventListenerBreakpoint = domdebugger.CommandSetEventListenerBreakpoint
- CommandDOMDebuggerSetInstrumentationBreakpoint = domdebugger.CommandSetInstrumentationBreakpoint
- CommandDOMDebuggerSetXHRBreakpoint = domdebugger.CommandSetXHRBreakpoint
- CommandDOMSnapshotDisable = domsnapshot.CommandDisable
- CommandDOMSnapshotEnable = domsnapshot.CommandEnable
- CommandDOMSnapshotCaptureSnapshot = domsnapshot.CommandCaptureSnapshot
- CommandDOMStorageClear = domstorage.CommandClear
- CommandDOMStorageDisable = domstorage.CommandDisable
- CommandDOMStorageEnable = domstorage.CommandEnable
- CommandDOMStorageGetDOMStorageItems = domstorage.CommandGetDOMStorageItems
- CommandDOMStorageRemoveDOMStorageItem = domstorage.CommandRemoveDOMStorageItem
- CommandDOMStorageSetDOMStorageItem = domstorage.CommandSetDOMStorageItem
- EventDOMStorageDomStorageItemAdded = "DOMStorage.domStorageItemAdded"
- EventDOMStorageDomStorageItemRemoved = "DOMStorage.domStorageItemRemoved"
- EventDOMStorageDomStorageItemUpdated = "DOMStorage.domStorageItemUpdated"
- EventDOMStorageDomStorageItemsCleared = "DOMStorage.domStorageItemsCleared"
- CommandDatabaseDisable = database.CommandDisable
- CommandDatabaseEnable = database.CommandEnable
- CommandDatabaseExecuteSQL = database.CommandExecuteSQL
- CommandDatabaseGetDatabaseTableNames = database.CommandGetDatabaseTableNames
- EventDatabaseAddDatabase = "Database.addDatabase"
- CommandDebuggerContinueToLocation = debugger.CommandContinueToLocation
- CommandDebuggerDisable = debugger.CommandDisable
- CommandDebuggerEnable = debugger.CommandEnable
- CommandDebuggerEvaluateOnCallFrame = debugger.CommandEvaluateOnCallFrame
- CommandDebuggerGetPossibleBreakpoints = debugger.CommandGetPossibleBreakpoints
- CommandDebuggerGetScriptSource = debugger.CommandGetScriptSource
- CommandDebuggerGetStackTrace = debugger.CommandGetStackTrace
- CommandDebuggerPause = debugger.CommandPause
- CommandDebuggerRemoveBreakpoint = debugger.CommandRemoveBreakpoint
- CommandDebuggerResume = debugger.CommandResume
- CommandDebuggerSearchInContent = debugger.CommandSearchInContent
- CommandDebuggerSetAsyncCallStackDepth = debugger.CommandSetAsyncCallStackDepth
- CommandDebuggerSetBlackboxPatterns = debugger.CommandSetBlackboxPatterns
- CommandDebuggerSetBlackboxedRanges = debugger.CommandSetBlackboxedRanges
- CommandDebuggerSetBreakpoint = debugger.CommandSetBreakpoint
- CommandDebuggerSetInstrumentationBreakpoint = debugger.CommandSetInstrumentationBreakpoint
- CommandDebuggerSetBreakpointByURL = debugger.CommandSetBreakpointByURL
- CommandDebuggerSetBreakpointOnFunctionCall = debugger.CommandSetBreakpointOnFunctionCall
- CommandDebuggerSetBreakpointsActive = debugger.CommandSetBreakpointsActive
- CommandDebuggerSetPauseOnExceptions = debugger.CommandSetPauseOnExceptions
- CommandDebuggerSetReturnValue = debugger.CommandSetReturnValue
- CommandDebuggerSetScriptSource = debugger.CommandSetScriptSource
- CommandDebuggerSetSkipAllPauses = debugger.CommandSetSkipAllPauses
- CommandDebuggerSetVariableValue = debugger.CommandSetVariableValue
- CommandDebuggerStepInto = debugger.CommandStepInto
- CommandDebuggerStepOut = debugger.CommandStepOut
- CommandDebuggerStepOver = debugger.CommandStepOver
- EventDebuggerBreakpointResolved = "Debugger.breakpointResolved"
- EventDebuggerPaused = "Debugger.paused"
- EventDebuggerResumed = "Debugger.resumed"
- EventDebuggerScriptFailedToParse = "Debugger.scriptFailedToParse"
- EventDebuggerScriptParsed = "Debugger.scriptParsed"
- CommandDeviceOrientationClearDeviceOrientationOverride = deviceorientation.CommandClearDeviceOrientationOverride
- CommandDeviceOrientationSetDeviceOrientationOverride = deviceorientation.CommandSetDeviceOrientationOverride
- CommandEmulationCanEmulate = emulation.CommandCanEmulate
- CommandEmulationClearDeviceMetricsOverride = emulation.CommandClearDeviceMetricsOverride
- CommandEmulationClearGeolocationOverride = emulation.CommandClearGeolocationOverride
- CommandEmulationResetPageScaleFactor = emulation.CommandResetPageScaleFactor
- CommandEmulationSetFocusEmulationEnabled = emulation.CommandSetFocusEmulationEnabled
- CommandEmulationSetCPUThrottlingRate = emulation.CommandSetCPUThrottlingRate
- CommandEmulationSetDefaultBackgroundColorOverride = emulation.CommandSetDefaultBackgroundColorOverride
- CommandEmulationSetDeviceMetricsOverride = emulation.CommandSetDeviceMetricsOverride
- CommandEmulationSetScrollbarsHidden = emulation.CommandSetScrollbarsHidden
- CommandEmulationSetDocumentCookieDisabled = emulation.CommandSetDocumentCookieDisabled
- CommandEmulationSetEmitTouchEventsForMouse = emulation.CommandSetEmitTouchEventsForMouse
- CommandEmulationSetEmulatedMedia = emulation.CommandSetEmulatedMedia
- CommandEmulationSetEmulatedVisionDeficiency = emulation.CommandSetEmulatedVisionDeficiency
- CommandEmulationSetGeolocationOverride = emulation.CommandSetGeolocationOverride
- CommandEmulationSetIdleOverride = emulation.CommandSetIdleOverride
- CommandEmulationClearIdleOverride = emulation.CommandClearIdleOverride
- CommandEmulationSetPageScaleFactor = emulation.CommandSetPageScaleFactor
- CommandEmulationSetScriptExecutionDisabled = emulation.CommandSetScriptExecutionDisabled
- CommandEmulationSetTouchEmulationEnabled = emulation.CommandSetTouchEmulationEnabled
- CommandEmulationSetVirtualTimePolicy = emulation.CommandSetVirtualTimePolicy
- CommandEmulationSetLocaleOverride = emulation.CommandSetLocaleOverride
- CommandEmulationSetTimezoneOverride = emulation.CommandSetTimezoneOverride
- CommandEmulationSetDisabledImageTypes = emulation.CommandSetDisabledImageTypes
- CommandEmulationSetUserAgentOverride = emulation.CommandSetUserAgentOverride
- EventEmulationVirtualTimeBudgetExpired = "Emulation.virtualTimeBudgetExpired"
- CommandFetchDisable = fetch.CommandDisable
- CommandFetchEnable = fetch.CommandEnable
- CommandFetchFailRequest = fetch.CommandFailRequest
- CommandFetchFulfillRequest = fetch.CommandFulfillRequest
- CommandFetchContinueRequest = fetch.CommandContinueRequest
- CommandFetchContinueWithAuth = fetch.CommandContinueWithAuth
- CommandFetchGetResponseBody = fetch.CommandGetResponseBody
- CommandFetchTakeResponseBodyAsStream = fetch.CommandTakeResponseBodyAsStream
- EventFetchRequestPaused = "Fetch.requestPaused"
- EventFetchAuthRequired = "Fetch.authRequired"
- CommandHeadlessExperimentalBeginFrame = headlessexperimental.CommandBeginFrame
- CommandHeadlessExperimentalDisable = headlessexperimental.CommandDisable
- CommandHeadlessExperimentalEnable = headlessexperimental.CommandEnable
- CommandHeapProfilerAddInspectedHeapObject = heapprofiler.CommandAddInspectedHeapObject
- CommandHeapProfilerCollectGarbage = heapprofiler.CommandCollectGarbage
- CommandHeapProfilerDisable = heapprofiler.CommandDisable
- CommandHeapProfilerEnable = heapprofiler.CommandEnable
- CommandHeapProfilerGetHeapObjectID = heapprofiler.CommandGetHeapObjectID
- CommandHeapProfilerGetObjectByHeapObjectID = heapprofiler.CommandGetObjectByHeapObjectID
- CommandHeapProfilerGetSamplingProfile = heapprofiler.CommandGetSamplingProfile
- CommandHeapProfilerStartSampling = heapprofiler.CommandStartSampling
- CommandHeapProfilerStartTrackingHeapObjects = heapprofiler.CommandStartTrackingHeapObjects
- CommandHeapProfilerStopSampling = heapprofiler.CommandStopSampling
- CommandHeapProfilerStopTrackingHeapObjects = heapprofiler.CommandStopTrackingHeapObjects
- CommandHeapProfilerTakeHeapSnapshot = heapprofiler.CommandTakeHeapSnapshot
- EventHeapProfilerAddHeapSnapshotChunk = "HeapProfiler.addHeapSnapshotChunk"
- EventHeapProfilerHeapStatsUpdate = "HeapProfiler.heapStatsUpdate"
- EventHeapProfilerLastSeenObjectID = "HeapProfiler.lastSeenObjectId"
- EventHeapProfilerReportHeapSnapshotProgress = "HeapProfiler.reportHeapSnapshotProgress"
- EventHeapProfilerResetProfiles = "HeapProfiler.resetProfiles"
- CommandIOClose = io.CommandClose
- CommandIORead = io.CommandRead
- CommandIOResolveBlob = io.CommandResolveBlob
- CommandIndexedDBClearObjectStore = indexeddb.CommandClearObjectStore
- CommandIndexedDBDeleteDatabase = indexeddb.CommandDeleteDatabase
- CommandIndexedDBDeleteObjectStoreEntries = indexeddb.CommandDeleteObjectStoreEntries
- CommandIndexedDBDisable = indexeddb.CommandDisable
- CommandIndexedDBEnable = indexeddb.CommandEnable
- CommandIndexedDBRequestData = indexeddb.CommandRequestData
- CommandIndexedDBGetMetadata = indexeddb.CommandGetMetadata
- CommandIndexedDBRequestDatabase = indexeddb.CommandRequestDatabase
- CommandIndexedDBRequestDatabaseNames = indexeddb.CommandRequestDatabaseNames
- CommandInputDispatchDragEvent = input.CommandDispatchDragEvent
- CommandInputDispatchKeyEvent = input.CommandDispatchKeyEvent
- CommandInputInsertText = input.CommandInsertText
- CommandInputDispatchMouseEvent = input.CommandDispatchMouseEvent
- CommandInputDispatchTouchEvent = input.CommandDispatchTouchEvent
- CommandInputEmulateTouchFromMouseEvent = input.CommandEmulateTouchFromMouseEvent
- CommandInputSetIgnoreInputEvents = input.CommandSetIgnoreInputEvents
- CommandInputSetInterceptDrags = input.CommandSetInterceptDrags
- CommandInputSynthesizePinchGesture = input.CommandSynthesizePinchGesture
- CommandInputSynthesizeScrollGesture = input.CommandSynthesizeScrollGesture
- CommandInputSynthesizeTapGesture = input.CommandSynthesizeTapGesture
- EventInputDragIntercepted = "Input.dragIntercepted"
- CommandInspectorDisable = inspector.CommandDisable
- CommandInspectorEnable = inspector.CommandEnable
- EventInspectorDetached = "Inspector.detached"
- EventInspectorTargetCrashed = "Inspector.targetCrashed"
- EventInspectorTargetReloadedAfterCrash = "Inspector.targetReloadedAfterCrash"
- CommandLayerTreeCompositingReasons = layertree.CommandCompositingReasons
- CommandLayerTreeDisable = layertree.CommandDisable
- CommandLayerTreeEnable = layertree.CommandEnable
- CommandLayerTreeLoadSnapshot = layertree.CommandLoadSnapshot
- CommandLayerTreeMakeSnapshot = layertree.CommandMakeSnapshot
- CommandLayerTreeProfileSnapshot = layertree.CommandProfileSnapshot
- CommandLayerTreeReleaseSnapshot = layertree.CommandReleaseSnapshot
- CommandLayerTreeReplaySnapshot = layertree.CommandReplaySnapshot
- CommandLayerTreeSnapshotCommandLog = layertree.CommandSnapshotCommandLog
- EventLayerTreeLayerPainted = "LayerTree.layerPainted"
- EventLayerTreeLayerTreeDidChange = "LayerTree.layerTreeDidChange"
- CommandLogClear = log.CommandClear
- CommandLogDisable = log.CommandDisable
- CommandLogEnable = log.CommandEnable
- CommandLogStartViolationsReport = log.CommandStartViolationsReport
- CommandLogStopViolationsReport = log.CommandStopViolationsReport
- EventLogEntryAdded = "Log.entryAdded"
- CommandMediaEnable = media.CommandEnable
- CommandMediaDisable = media.CommandDisable
- EventMediaPlayerPropertiesChanged = "Media.playerPropertiesChanged"
- EventMediaPlayerEventsAdded = "Media.playerEventsAdded"
- EventMediaPlayerMessagesLogged = "Media.playerMessagesLogged"
- EventMediaPlayerErrorsRaised = "Media.playerErrorsRaised"
- EventMediaPlayersCreated = "Media.playersCreated"
- CommandMemoryGetDOMCounters = memory.CommandGetDOMCounters
- CommandMemoryPrepareForLeakDetection = memory.CommandPrepareForLeakDetection
- CommandMemoryForciblyPurgeJavaScriptMemory = memory.CommandForciblyPurgeJavaScriptMemory
- CommandMemorySetPressureNotificationsSuppressed = memory.CommandSetPressureNotificationsSuppressed
- CommandMemorySimulatePressureNotification = memory.CommandSimulatePressureNotification
- CommandMemoryStartSampling = memory.CommandStartSampling
- CommandMemoryStopSampling = memory.CommandStopSampling
- CommandMemoryGetAllTimeSamplingProfile = memory.CommandGetAllTimeSamplingProfile
- CommandMemoryGetBrowserSamplingProfile = memory.CommandGetBrowserSamplingProfile
- CommandMemoryGetSamplingProfile = memory.CommandGetSamplingProfile
- CommandNetworkSetAcceptedEncodings = network.CommandSetAcceptedEncodings
- CommandNetworkClearAcceptedEncodingsOverride = network.CommandClearAcceptedEncodingsOverride
- CommandNetworkClearBrowserCache = network.CommandClearBrowserCache
- CommandNetworkClearBrowserCookies = network.CommandClearBrowserCookies
- CommandNetworkDeleteCookies = network.CommandDeleteCookies
- CommandNetworkDisable = network.CommandDisable
- CommandNetworkEmulateNetworkConditions = network.CommandEmulateNetworkConditions
- CommandNetworkEnable = network.CommandEnable
- CommandNetworkGetAllCookies = network.CommandGetAllCookies
- CommandNetworkGetCertificate = network.CommandGetCertificate
- CommandNetworkGetCookies = network.CommandGetCookies
- CommandNetworkGetResponseBody = network.CommandGetResponseBody
- CommandNetworkGetRequestPostData = network.CommandGetRequestPostData
- CommandNetworkGetResponseBodyForInterception = network.CommandGetResponseBodyForInterception
- CommandNetworkTakeResponseBodyForInterceptionAsStream = network.CommandTakeResponseBodyForInterceptionAsStream
- CommandNetworkReplayXHR = network.CommandReplayXHR
- CommandNetworkSearchInResponseBody = network.CommandSearchInResponseBody
- CommandNetworkSetBlockedURLS = network.CommandSetBlockedURLS
- CommandNetworkSetBypassServiceWorker = network.CommandSetBypassServiceWorker
- CommandNetworkSetCacheDisabled = network.CommandSetCacheDisabled
- CommandNetworkSetCookie = network.CommandSetCookie
- CommandNetworkSetCookies = network.CommandSetCookies
- CommandNetworkSetExtraHTTPHeaders = network.CommandSetExtraHTTPHeaders
- CommandNetworkSetAttachDebugStack = network.CommandSetAttachDebugStack
- CommandNetworkGetSecurityIsolationStatus = network.CommandGetSecurityIsolationStatus
- CommandNetworkLoadNetworkResource = network.CommandLoadNetworkResource
- EventNetworkDataReceived = "Network.dataReceived"
- EventNetworkEventSourceMessageReceived = "Network.eventSourceMessageReceived"
- EventNetworkLoadingFailed = "Network.loadingFailed"
- EventNetworkLoadingFinished = "Network.loadingFinished"
- EventNetworkRequestServedFromCache = "Network.requestServedFromCache"
- EventNetworkRequestWillBeSent = "Network.requestWillBeSent"
- EventNetworkResourceChangedPriority = "Network.resourceChangedPriority"
- EventNetworkSignedExchangeReceived = "Network.signedExchangeReceived"
- EventNetworkResponseReceived = "Network.responseReceived"
- EventNetworkWebSocketClosed = "Network.webSocketClosed"
- EventNetworkWebSocketCreated = "Network.webSocketCreated"
- EventNetworkWebSocketFrameError = "Network.webSocketFrameError"
- EventNetworkWebSocketFrameReceived = "Network.webSocketFrameReceived"
- EventNetworkWebSocketFrameSent = "Network.webSocketFrameSent"
- EventNetworkWebSocketHandshakeResponseReceived = "Network.webSocketHandshakeResponseReceived"
- EventNetworkWebSocketWillSendHandshakeRequest = "Network.webSocketWillSendHandshakeRequest"
- EventNetworkWebTransportCreated = "Network.webTransportCreated"
- EventNetworkWebTransportConnectionEstablished = "Network.webTransportConnectionEstablished"
- EventNetworkWebTransportClosed = "Network.webTransportClosed"
- EventNetworkRequestWillBeSentExtraInfo = "Network.requestWillBeSentExtraInfo"
- EventNetworkResponseReceivedExtraInfo = "Network.responseReceivedExtraInfo"
- EventNetworkTrustTokenOperationDone = "Network.trustTokenOperationDone"
- EventNetworkSubresourceWebBundleMetadataReceived = "Network.subresourceWebBundleMetadataReceived"
- EventNetworkSubresourceWebBundleMetadataError = "Network.subresourceWebBundleMetadataError"
- EventNetworkSubresourceWebBundleInnerResponseParsed = "Network.subresourceWebBundleInnerResponseParsed"
- EventNetworkSubresourceWebBundleInnerResponseError = "Network.subresourceWebBundleInnerResponseError"
- CommandOverlayDisable = overlay.CommandDisable
- CommandOverlayEnable = overlay.CommandEnable
- CommandOverlayGetHighlightObjectForTest = overlay.CommandGetHighlightObjectForTest
- CommandOverlayGetGridHighlightObjectsForTest = overlay.CommandGetGridHighlightObjectsForTest
- CommandOverlayGetSourceOrderHighlightObjectForTest = overlay.CommandGetSourceOrderHighlightObjectForTest
- CommandOverlayHideHighlight = overlay.CommandHideHighlight
- CommandOverlayHighlightFrame = overlay.CommandHighlightFrame
- CommandOverlayHighlightNode = overlay.CommandHighlightNode
- CommandOverlayHighlightQuad = overlay.CommandHighlightQuad
- CommandOverlayHighlightRect = overlay.CommandHighlightRect
- CommandOverlayHighlightSourceOrder = overlay.CommandHighlightSourceOrder
- CommandOverlaySetInspectMode = overlay.CommandSetInspectMode
- CommandOverlaySetShowAdHighlights = overlay.CommandSetShowAdHighlights
- CommandOverlaySetPausedInDebuggerMessage = overlay.CommandSetPausedInDebuggerMessage
- CommandOverlaySetShowDebugBorders = overlay.CommandSetShowDebugBorders
- CommandOverlaySetShowFPSCounter = overlay.CommandSetShowFPSCounter
- CommandOverlaySetShowGridOverlays = overlay.CommandSetShowGridOverlays
- CommandOverlaySetShowFlexOverlays = overlay.CommandSetShowFlexOverlays
- CommandOverlaySetShowScrollSnapOverlays = overlay.CommandSetShowScrollSnapOverlays
- CommandOverlaySetShowPaintRects = overlay.CommandSetShowPaintRects
- CommandOverlaySetShowLayoutShiftRegions = overlay.CommandSetShowLayoutShiftRegions
- CommandOverlaySetShowScrollBottleneckRects = overlay.CommandSetShowScrollBottleneckRects
- CommandOverlaySetShowHitTestBorders = overlay.CommandSetShowHitTestBorders
- CommandOverlaySetShowWebVitals = overlay.CommandSetShowWebVitals
- CommandOverlaySetShowViewportSizeOnResize = overlay.CommandSetShowViewportSizeOnResize
- CommandOverlaySetShowHinge = overlay.CommandSetShowHinge
- EventOverlayInspectNodeRequested = "Overlay.inspectNodeRequested"
- EventOverlayNodeHighlightRequested = "Overlay.nodeHighlightRequested"
- EventOverlayScreenshotRequested = "Overlay.screenshotRequested"
- EventOverlayInspectModeCanceled = "Overlay.inspectModeCanceled"
- CommandPageAddScriptToEvaluateOnNewDocument = page.CommandAddScriptToEvaluateOnNewDocument
- CommandPageBringToFront = page.CommandBringToFront
- CommandPageCaptureScreenshot = page.CommandCaptureScreenshot
- CommandPageCaptureSnapshot = page.CommandCaptureSnapshot
- CommandPageCreateIsolatedWorld = page.CommandCreateIsolatedWorld
- CommandPageDisable = page.CommandDisable
- CommandPageEnable = page.CommandEnable
- CommandPageGetAppManifest = page.CommandGetAppManifest
- CommandPageGetInstallabilityErrors = page.CommandGetInstallabilityErrors
- CommandPageGetManifestIcons = page.CommandGetManifestIcons
- CommandPageGetFrameTree = page.CommandGetFrameTree
- CommandPageGetLayoutMetrics = page.CommandGetLayoutMetrics
- CommandPageGetNavigationHistory = page.CommandGetNavigationHistory
- CommandPageResetNavigationHistory = page.CommandResetNavigationHistory
- CommandPageGetResourceContent = page.CommandGetResourceContent
- CommandPageGetResourceTree = page.CommandGetResourceTree
- CommandPageHandleJavaScriptDialog = page.CommandHandleJavaScriptDialog
- CommandPageNavigate = page.CommandNavigate
- CommandPageNavigateToHistoryEntry = page.CommandNavigateToHistoryEntry
- CommandPagePrintToPDF = page.CommandPrintToPDF
- CommandPageReload = page.CommandReload
- CommandPageRemoveScriptToEvaluateOnNewDocument = page.CommandRemoveScriptToEvaluateOnNewDocument
- CommandPageScreencastFrameAck = page.CommandScreencastFrameAck
- CommandPageSearchInResource = page.CommandSearchInResource
- CommandPageSetAdBlockingEnabled = page.CommandSetAdBlockingEnabled
- CommandPageSetBypassCSP = page.CommandSetBypassCSP
- CommandPageGetPermissionsPolicyState = page.CommandGetPermissionsPolicyState
- CommandPageSetFontFamilies = page.CommandSetFontFamilies
- CommandPageSetFontSizes = page.CommandSetFontSizes
- CommandPageSetDocumentContent = page.CommandSetDocumentContent
- CommandPageSetDownloadBehavior = page.CommandSetDownloadBehavior
- CommandPageSetLifecycleEventsEnabled = page.CommandSetLifecycleEventsEnabled
- CommandPageStartScreencast = page.CommandStartScreencast
- CommandPageStopLoading = page.CommandStopLoading
- CommandPageCrash = page.CommandCrash
- CommandPageClose = page.CommandClose
- CommandPageSetWebLifecycleState = page.CommandSetWebLifecycleState
- CommandPageStopScreencast = page.CommandStopScreencast
- CommandPageSetProduceCompilationCache = page.CommandSetProduceCompilationCache
- CommandPageProduceCompilationCache = page.CommandProduceCompilationCache
- CommandPageAddCompilationCache = page.CommandAddCompilationCache
- CommandPageClearCompilationCache = page.CommandClearCompilationCache
- CommandPageGenerateTestReport = page.CommandGenerateTestReport
- CommandPageWaitForDebugger = page.CommandWaitForDebugger
- CommandPageSetInterceptFileChooserDialog = page.CommandSetInterceptFileChooserDialog
- EventPageDomContentEventFired = "Page.domContentEventFired"
- EventPageFileChooserOpened = "Page.fileChooserOpened"
- EventPageFrameAttached = "Page.frameAttached"
- EventPageFrameDetached = "Page.frameDetached"
- EventPageFrameNavigated = "Page.frameNavigated"
- EventPageDocumentOpened = "Page.documentOpened"
- EventPageFrameResized = "Page.frameResized"
- EventPageFrameRequestedNavigation = "Page.frameRequestedNavigation"
- EventPageFrameStartedLoading = "Page.frameStartedLoading"
- EventPageFrameStoppedLoading = "Page.frameStoppedLoading"
- EventPageInterstitialHidden = "Page.interstitialHidden"
- EventPageInterstitialShown = "Page.interstitialShown"
- EventPageJavascriptDialogClosed = "Page.javascriptDialogClosed"
- EventPageJavascriptDialogOpening = "Page.javascriptDialogOpening"
- EventPageLifecycleEvent = "Page.lifecycleEvent"
- EventPageBackForwardCacheNotUsed = "Page.backForwardCacheNotUsed"
- EventPageLoadEventFired = "Page.loadEventFired"
- EventPageNavigatedWithinDocument = "Page.navigatedWithinDocument"
- EventPageScreencastFrame = "Page.screencastFrame"
- EventPageScreencastVisibilityChanged = "Page.screencastVisibilityChanged"
- EventPageWindowOpen = "Page.windowOpen"
- EventPageCompilationCacheProduced = "Page.compilationCacheProduced"
- CommandPerformanceDisable = performance.CommandDisable
- CommandPerformanceEnable = performance.CommandEnable
- CommandPerformanceGetMetrics = performance.CommandGetMetrics
- EventPerformanceMetrics = "Performance.metrics"
- CommandPerformanceTimelineEnable = performancetimeline.CommandEnable
- EventPerformanceTimelineTimelineEventAdded = "PerformanceTimeline.timelineEventAdded"
- CommandProfilerDisable = profiler.CommandDisable
- CommandProfilerEnable = profiler.CommandEnable
- CommandProfilerGetBestEffortCoverage = profiler.CommandGetBestEffortCoverage
- CommandProfilerSetSamplingInterval = profiler.CommandSetSamplingInterval
- CommandProfilerStart = profiler.CommandStart
- CommandProfilerStartPreciseCoverage = profiler.CommandStartPreciseCoverage
- CommandProfilerStartTypeProfile = profiler.CommandStartTypeProfile
- CommandProfilerStop = profiler.CommandStop
- CommandProfilerStopPreciseCoverage = profiler.CommandStopPreciseCoverage
- CommandProfilerStopTypeProfile = profiler.CommandStopTypeProfile
- CommandProfilerTakePreciseCoverage = profiler.CommandTakePreciseCoverage
- CommandProfilerTakeTypeProfile = profiler.CommandTakeTypeProfile
- CommandProfilerEnableCounters = profiler.CommandEnableCounters
- CommandProfilerDisableCounters = profiler.CommandDisableCounters
- CommandProfilerGetCounters = profiler.CommandGetCounters
- CommandProfilerEnableRuntimeCallStats = profiler.CommandEnableRuntimeCallStats
- CommandProfilerDisableRuntimeCallStats = profiler.CommandDisableRuntimeCallStats
- CommandProfilerGetRuntimeCallStats = profiler.CommandGetRuntimeCallStats
- EventProfilerConsoleProfileFinished = "Profiler.consoleProfileFinished"
- EventProfilerConsoleProfileStarted = "Profiler.consoleProfileStarted"
- EventProfilerPreciseCoverageDeltaUpdate = "Profiler.preciseCoverageDeltaUpdate"
- CommandRuntimeAwaitPromise = runtime.CommandAwaitPromise
- CommandRuntimeCallFunctionOn = runtime.CommandCallFunctionOn
- CommandRuntimeCompileScript = runtime.CommandCompileScript
- CommandRuntimeDisable = runtime.CommandDisable
- CommandRuntimeDiscardConsoleEntries = runtime.CommandDiscardConsoleEntries
- CommandRuntimeEnable = runtime.CommandEnable
- CommandRuntimeEvaluate = runtime.CommandEvaluate
- CommandRuntimeGetIsolateID = runtime.CommandGetIsolateID
- CommandRuntimeGetHeapUsage = runtime.CommandGetHeapUsage
- CommandRuntimeGetProperties = runtime.CommandGetProperties
- CommandRuntimeGlobalLexicalScopeNames = runtime.CommandGlobalLexicalScopeNames
- CommandRuntimeQueryObjects = runtime.CommandQueryObjects
- CommandRuntimeReleaseObject = runtime.CommandReleaseObject
- CommandRuntimeReleaseObjectGroup = runtime.CommandReleaseObjectGroup
- CommandRuntimeRunIfWaitingForDebugger = runtime.CommandRunIfWaitingForDebugger
- CommandRuntimeRunScript = runtime.CommandRunScript
- CommandRuntimeSetCustomObjectFormatterEnabled = runtime.CommandSetCustomObjectFormatterEnabled
- CommandRuntimeSetMaxCallStackSizeToCapture = runtime.CommandSetMaxCallStackSizeToCapture
- CommandRuntimeTerminateExecution = runtime.CommandTerminateExecution
- CommandRuntimeAddBinding = runtime.CommandAddBinding
- CommandRuntimeRemoveBinding = runtime.CommandRemoveBinding
- EventRuntimeBindingCalled = "Runtime.bindingCalled"
- EventRuntimeConsoleAPICalled = "Runtime.consoleAPICalled"
- EventRuntimeExceptionRevoked = "Runtime.exceptionRevoked"
- EventRuntimeExceptionThrown = "Runtime.exceptionThrown"
- EventRuntimeExecutionContextCreated = "Runtime.executionContextCreated"
- EventRuntimeExecutionContextDestroyed = "Runtime.executionContextDestroyed"
- EventRuntimeExecutionContextsCleared = "Runtime.executionContextsCleared"
- EventRuntimeInspectRequested = "Runtime.inspectRequested"
- CommandSecurityDisable = security.CommandDisable
- CommandSecurityEnable = security.CommandEnable
- CommandSecuritySetIgnoreCertificateErrors = security.CommandSetIgnoreCertificateErrors
- EventSecurityVisibleSecurityStateChanged = "Security.visibleSecurityStateChanged"
- EventSecuritySecurityStateChanged = "Security.securityStateChanged"
- CommandServiceWorkerDeliverPushMessage = serviceworker.CommandDeliverPushMessage
- CommandServiceWorkerDisable = serviceworker.CommandDisable
- CommandServiceWorkerDispatchSyncEvent = serviceworker.CommandDispatchSyncEvent
- CommandServiceWorkerDispatchPeriodicSyncEvent = serviceworker.CommandDispatchPeriodicSyncEvent
- CommandServiceWorkerEnable = serviceworker.CommandEnable
- CommandServiceWorkerInspectWorker = serviceworker.CommandInspectWorker
- CommandServiceWorkerSetForceUpdateOnPageLoad = serviceworker.CommandSetForceUpdateOnPageLoad
- CommandServiceWorkerSkipWaiting = serviceworker.CommandSkipWaiting
- CommandServiceWorkerStartWorker = serviceworker.CommandStartWorker
- CommandServiceWorkerStopAllWorkers = serviceworker.CommandStopAllWorkers
- CommandServiceWorkerStopWorker = serviceworker.CommandStopWorker
- CommandServiceWorkerUnregister = serviceworker.CommandUnregister
- CommandServiceWorkerUpdateRegistration = serviceworker.CommandUpdateRegistration
- EventServiceWorkerWorkerErrorReported = "ServiceWorker.workerErrorReported"
- EventServiceWorkerWorkerRegistrationUpdated = "ServiceWorker.workerRegistrationUpdated"
- EventServiceWorkerWorkerVersionUpdated = "ServiceWorker.workerVersionUpdated"
- CommandStorageClearDataForOrigin = storage.CommandClearDataForOrigin
- CommandStorageGetCookies = storage.CommandGetCookies
- CommandStorageSetCookies = storage.CommandSetCookies
- CommandStorageClearCookies = storage.CommandClearCookies
- CommandStorageGetUsageAndQuota = storage.CommandGetUsageAndQuota
- CommandStorageOverrideQuotaForOrigin = storage.CommandOverrideQuotaForOrigin
- CommandStorageTrackCacheStorageForOrigin = storage.CommandTrackCacheStorageForOrigin
- CommandStorageTrackIndexedDBForOrigin = storage.CommandTrackIndexedDBForOrigin
- CommandStorageUntrackCacheStorageForOrigin = storage.CommandUntrackCacheStorageForOrigin
- CommandStorageUntrackIndexedDBForOrigin = storage.CommandUntrackIndexedDBForOrigin
- CommandStorageGetTrustTokens = storage.CommandGetTrustTokens
- CommandStorageClearTrustTokens = storage.CommandClearTrustTokens
- EventStorageCacheStorageContentUpdated = "Storage.cacheStorageContentUpdated"
- EventStorageCacheStorageListUpdated = "Storage.cacheStorageListUpdated"
- EventStorageIndexedDBContentUpdated = "Storage.indexedDBContentUpdated"
- EventStorageIndexedDBListUpdated = "Storage.indexedDBListUpdated"
- CommandSystemInfoGetInfo = systeminfo.CommandGetInfo
- CommandSystemInfoGetProcessInfo = systeminfo.CommandGetProcessInfo
- CommandTargetActivateTarget = target.CommandActivateTarget
- CommandTargetAttachToTarget = target.CommandAttachToTarget
- CommandTargetAttachToBrowserTarget = target.CommandAttachToBrowserTarget
- CommandTargetCloseTarget = target.CommandCloseTarget
- CommandTargetExposeDevToolsProtocol = target.CommandExposeDevToolsProtocol
- CommandTargetCreateBrowserContext = target.CommandCreateBrowserContext
- CommandTargetGetBrowserContexts = target.CommandGetBrowserContexts
- CommandTargetCreateTarget = target.CommandCreateTarget
- CommandTargetDetachFromTarget = target.CommandDetachFromTarget
- CommandTargetDisposeBrowserContext = target.CommandDisposeBrowserContext
- CommandTargetGetTargetInfo = target.CommandGetTargetInfo
- CommandTargetGetTargets = target.CommandGetTargets
- CommandTargetSetAutoAttach = target.CommandSetAutoAttach
- CommandTargetSetDiscoverTargets = target.CommandSetDiscoverTargets
- CommandTargetSetRemoteLocations = target.CommandSetRemoteLocations
- EventTargetAttachedToTarget = "Target.attachedToTarget"
- EventTargetDetachedFromTarget = "Target.detachedFromTarget"
- EventTargetReceivedMessageFromTarget = "Target.receivedMessageFromTarget"
- EventTargetTargetCreated = "Target.targetCreated"
- EventTargetTargetDestroyed = "Target.targetDestroyed"
- EventTargetTargetCrashed = "Target.targetCrashed"
- EventTargetTargetInfoChanged = "Target.targetInfoChanged"
- CommandTetheringBind = tethering.CommandBind
- CommandTetheringUnbind = tethering.CommandUnbind
- EventTetheringAccepted = "Tethering.accepted"
- CommandTracingEnd = tracing.CommandEnd
- CommandTracingGetCategories = tracing.CommandGetCategories
- CommandTracingRecordClockSyncMarker = tracing.CommandRecordClockSyncMarker
- CommandTracingRequestMemoryDump = tracing.CommandRequestMemoryDump
- CommandTracingStart = tracing.CommandStart
- EventTracingBufferUsage = "Tracing.bufferUsage"
- EventTracingDataCollected = "Tracing.dataCollected"
- EventTracingTracingComplete = "Tracing.tracingComplete"
- CommandWebAudioEnable = webaudio.CommandEnable
- CommandWebAudioDisable = webaudio.CommandDisable
- CommandWebAudioGetRealtimeData = webaudio.CommandGetRealtimeData
- EventWebAudioContextCreated = "WebAudio.contextCreated"
- EventWebAudioContextWillBeDestroyed = "WebAudio.contextWillBeDestroyed"
- EventWebAudioContextChanged = "WebAudio.contextChanged"
- EventWebAudioAudioListenerCreated = "WebAudio.audioListenerCreated"
- EventWebAudioAudioListenerWillBeDestroyed = "WebAudio.audioListenerWillBeDestroyed"
- EventWebAudioAudioNodeCreated = "WebAudio.audioNodeCreated"
- EventWebAudioAudioNodeWillBeDestroyed = "WebAudio.audioNodeWillBeDestroyed"
- EventWebAudioAudioParamCreated = "WebAudio.audioParamCreated"
- EventWebAudioAudioParamWillBeDestroyed = "WebAudio.audioParamWillBeDestroyed"
- EventWebAudioNodesConnected = "WebAudio.nodesConnected"
- EventWebAudioNodesDisconnected = "WebAudio.nodesDisconnected"
- EventWebAudioNodeParamConnected = "WebAudio.nodeParamConnected"
- EventWebAudioNodeParamDisconnected = "WebAudio.nodeParamDisconnected"
- CommandWebAuthnEnable = webauthn.CommandEnable
- CommandWebAuthnDisable = webauthn.CommandDisable
- CommandWebAuthnAddVirtualAuthenticator = webauthn.CommandAddVirtualAuthenticator
- CommandWebAuthnRemoveVirtualAuthenticator = webauthn.CommandRemoveVirtualAuthenticator
- CommandWebAuthnAddCredential = webauthn.CommandAddCredential
- CommandWebAuthnGetCredential = webauthn.CommandGetCredential
- CommandWebAuthnGetCredentials = webauthn.CommandGetCredentials
- CommandWebAuthnRemoveCredential = webauthn.CommandRemoveCredential
- CommandWebAuthnClearCredentials = webauthn.CommandClearCredentials
- CommandWebAuthnSetUserVerified = webauthn.CommandSetUserVerified
- CommandWebAuthnSetAutomaticPresenceSimulation = webauthn.CommandSetAutomaticPresenceSimulation
-)
-
-// Error error type.
-type Error struct {
- Code int64 `json:"code"` // Error code.
- Message string `json:"message"` // Error message.
-}
-
-// Error satisfies the error interface.
-func (e *Error) Error() string {
- return fmt.Sprintf("%s (%d)", e.Message, e.Code)
-}
-
-// Message chrome DevTools Protocol message sent/read over websocket
-// connection.
-type Message struct {
- ID int64 `json:"id,omitempty"` // Unique message identifier.
- SessionID target.SessionID `json:"sessionId,omitempty"` // Session that the message belongs to when using flat access.
- Method MethodType `json:"method,omitempty"` // Event or command type.
- Params easyjson.RawMessage `json:"params,omitempty"` // Event or command parameters.
- Result easyjson.RawMessage `json:"result,omitempty"` // Command return values.
- Error *Error `json:"error,omitempty"` // Error message.
-}
-
-type empty struct{}
-
-var emptyVal = &empty{}
-
-// UnmarshalMessage unmarshals the message result or params.
-func UnmarshalMessage(msg *Message) (interface{}, error) {
- var v easyjson.Unmarshaler
- switch msg.Method {
- case CommandAccessibilityDisable:
- return emptyVal, nil
-
- case CommandAccessibilityEnable:
- return emptyVal, nil
-
- case CommandAccessibilityGetPartialAXTree:
- v = new(accessibility.GetPartialAXTreeReturns)
-
- case CommandAccessibilityGetFullAXTree:
- v = new(accessibility.GetFullAXTreeReturns)
-
- case CommandAccessibilityGetChildAXNodes:
- v = new(accessibility.GetChildAXNodesReturns)
-
- case CommandAccessibilityQueryAXTree:
- v = new(accessibility.QueryAXTreeReturns)
-
- case CommandAnimationDisable:
- return emptyVal, nil
-
- case CommandAnimationEnable:
- return emptyVal, nil
-
- case CommandAnimationGetCurrentTime:
- v = new(animation.GetCurrentTimeReturns)
-
- case CommandAnimationGetPlaybackRate:
- v = new(animation.GetPlaybackRateReturns)
-
- case CommandAnimationReleaseAnimations:
- return emptyVal, nil
-
- case CommandAnimationResolveAnimation:
- v = new(animation.ResolveAnimationReturns)
-
- case CommandAnimationSeekAnimations:
- return emptyVal, nil
-
- case CommandAnimationSetPaused:
- return emptyVal, nil
-
- case CommandAnimationSetPlaybackRate:
- return emptyVal, nil
-
- case CommandAnimationSetTiming:
- return emptyVal, nil
-
- case EventAnimationAnimationCanceled:
- v = new(animation.EventAnimationCanceled)
-
- case EventAnimationAnimationCreated:
- v = new(animation.EventAnimationCreated)
-
- case EventAnimationAnimationStarted:
- v = new(animation.EventAnimationStarted)
-
- case CommandApplicationCacheEnable:
- return emptyVal, nil
-
- case CommandApplicationCacheGetApplicationCacheForFrame:
- v = new(applicationcache.GetApplicationCacheForFrameReturns)
-
- case CommandApplicationCacheGetFramesWithManifests:
- v = new(applicationcache.GetFramesWithManifestsReturns)
-
- case CommandApplicationCacheGetManifestForFrame:
- v = new(applicationcache.GetManifestForFrameReturns)
-
- case EventApplicationCacheApplicationCacheStatusUpdated:
- v = new(applicationcache.EventApplicationCacheStatusUpdated)
-
- case EventApplicationCacheNetworkStateUpdated:
- v = new(applicationcache.EventNetworkStateUpdated)
-
- case CommandAuditsGetEncodedResponse:
- v = new(audits.GetEncodedResponseReturns)
-
- case CommandAuditsDisable:
- return emptyVal, nil
-
- case CommandAuditsEnable:
- return emptyVal, nil
-
- case CommandAuditsCheckContrast:
- return emptyVal, nil
-
- case EventAuditsIssueAdded:
- v = new(audits.EventIssueAdded)
-
- case CommandBackgroundServiceStartObserving:
- return emptyVal, nil
-
- case CommandBackgroundServiceStopObserving:
- return emptyVal, nil
-
- case CommandBackgroundServiceSetRecording:
- return emptyVal, nil
-
- case CommandBackgroundServiceClearEvents:
- return emptyVal, nil
-
- case EventBackgroundServiceRecordingStateChanged:
- v = new(backgroundservice.EventRecordingStateChanged)
-
- case EventBackgroundServiceBackgroundServiceEventReceived:
- v = new(backgroundservice.EventBackgroundServiceEventReceived)
-
- case CommandBrowserSetPermission:
- return emptyVal, nil
-
- case CommandBrowserGrantPermissions:
- return emptyVal, nil
-
- case CommandBrowserResetPermissions:
- return emptyVal, nil
-
- case CommandBrowserSetDownloadBehavior:
- return emptyVal, nil
-
- case CommandBrowserCancelDownload:
- return emptyVal, nil
-
- case CommandBrowserClose:
- return emptyVal, nil
-
- case CommandBrowserCrash:
- return emptyVal, nil
-
- case CommandBrowserCrashGpuProcess:
- return emptyVal, nil
-
- case CommandBrowserGetVersion:
- v = new(browser.GetVersionReturns)
-
- case CommandBrowserGetBrowserCommandLine:
- v = new(browser.GetBrowserCommandLineReturns)
-
- case CommandBrowserGetHistograms:
- v = new(browser.GetHistogramsReturns)
-
- case CommandBrowserGetHistogram:
- v = new(browser.GetHistogramReturns)
-
- case CommandBrowserGetWindowBounds:
- v = new(browser.GetWindowBoundsReturns)
-
- case CommandBrowserGetWindowForTarget:
- v = new(browser.GetWindowForTargetReturns)
-
- case CommandBrowserSetWindowBounds:
- return emptyVal, nil
-
- case CommandBrowserSetDockTile:
- return emptyVal, nil
-
- case CommandBrowserExecuteBrowserCommand:
- return emptyVal, nil
-
- case EventBrowserDownloadWillBegin:
- v = new(browser.EventDownloadWillBegin)
-
- case EventBrowserDownloadProgress:
- v = new(browser.EventDownloadProgress)
-
- case CommandCSSAddRule:
- v = new(css.AddRuleReturns)
-
- case CommandCSSCollectClassNames:
- v = new(css.CollectClassNamesReturns)
-
- case CommandCSSCreateStyleSheet:
- v = new(css.CreateStyleSheetReturns)
-
- case CommandCSSDisable:
- return emptyVal, nil
-
- case CommandCSSEnable:
- return emptyVal, nil
-
- case CommandCSSForcePseudoState:
- return emptyVal, nil
-
- case CommandCSSGetBackgroundColors:
- v = new(css.GetBackgroundColorsReturns)
-
- case CommandCSSGetComputedStyleForNode:
- v = new(css.GetComputedStyleForNodeReturns)
-
- case CommandCSSGetInlineStylesForNode:
- v = new(css.GetInlineStylesForNodeReturns)
-
- case CommandCSSGetMatchedStylesForNode:
- v = new(css.GetMatchedStylesForNodeReturns)
-
- case CommandCSSGetMediaQueries:
- v = new(css.GetMediaQueriesReturns)
-
- case CommandCSSGetPlatformFontsForNode:
- v = new(css.GetPlatformFontsForNodeReturns)
-
- case CommandCSSGetStyleSheetText:
- v = new(css.GetStyleSheetTextReturns)
-
- case CommandCSSTrackComputedStyleUpdates:
- return emptyVal, nil
-
- case CommandCSSTakeComputedStyleUpdates:
- v = new(css.TakeComputedStyleUpdatesReturns)
-
- case CommandCSSSetEffectivePropertyValueForNode:
- return emptyVal, nil
-
- case CommandCSSSetKeyframeKey:
- v = new(css.SetKeyframeKeyReturns)
-
- case CommandCSSSetMediaText:
- v = new(css.SetMediaTextReturns)
-
- case CommandCSSSetContainerQueryText:
- v = new(css.SetContainerQueryTextReturns)
-
- case CommandCSSSetRuleSelector:
- v = new(css.SetRuleSelectorReturns)
-
- case CommandCSSSetStyleSheetText:
- v = new(css.SetStyleSheetTextReturns)
-
- case CommandCSSSetStyleTexts:
- v = new(css.SetStyleTextsReturns)
-
- case CommandCSSStartRuleUsageTracking:
- return emptyVal, nil
-
- case CommandCSSStopRuleUsageTracking:
- v = new(css.StopRuleUsageTrackingReturns)
-
- case CommandCSSTakeCoverageDelta:
- v = new(css.TakeCoverageDeltaReturns)
-
- case CommandCSSSetLocalFontsEnabled:
- return emptyVal, nil
-
- case EventCSSFontsUpdated:
- v = new(css.EventFontsUpdated)
-
- case EventCSSMediaQueryResultChanged:
- v = new(css.EventMediaQueryResultChanged)
-
- case EventCSSStyleSheetAdded:
- v = new(css.EventStyleSheetAdded)
-
- case EventCSSStyleSheetChanged:
- v = new(css.EventStyleSheetChanged)
-
- case EventCSSStyleSheetRemoved:
- v = new(css.EventStyleSheetRemoved)
-
- case CommandCacheStorageDeleteCache:
- return emptyVal, nil
-
- case CommandCacheStorageDeleteEntry:
- return emptyVal, nil
-
- case CommandCacheStorageRequestCacheNames:
- v = new(cachestorage.RequestCacheNamesReturns)
-
- case CommandCacheStorageRequestCachedResponse:
- v = new(cachestorage.RequestCachedResponseReturns)
-
- case CommandCacheStorageRequestEntries:
- v = new(cachestorage.RequestEntriesReturns)
-
- case CommandCastEnable:
- return emptyVal, nil
-
- case CommandCastDisable:
- return emptyVal, nil
-
- case CommandCastSetSinkToUse:
- return emptyVal, nil
-
- case CommandCastStartTabMirroring:
- return emptyVal, nil
-
- case CommandCastStopCasting:
- return emptyVal, nil
-
- case EventCastSinksUpdated:
- v = new(cast.EventSinksUpdated)
-
- case EventCastIssueUpdated:
- v = new(cast.EventIssueUpdated)
-
- case CommandDOMCollectClassNamesFromSubtree:
- v = new(dom.CollectClassNamesFromSubtreeReturns)
-
- case CommandDOMCopyTo:
- v = new(dom.CopyToReturns)
-
- case CommandDOMDescribeNode:
- v = new(dom.DescribeNodeReturns)
-
- case CommandDOMScrollIntoViewIfNeeded:
- return emptyVal, nil
-
- case CommandDOMDisable:
- return emptyVal, nil
-
- case CommandDOMDiscardSearchResults:
- return emptyVal, nil
-
- case CommandDOMEnable:
- return emptyVal, nil
-
- case CommandDOMFocus:
- return emptyVal, nil
-
- case CommandDOMGetAttributes:
- v = new(dom.GetAttributesReturns)
-
- case CommandDOMGetBoxModel:
- v = new(dom.GetBoxModelReturns)
-
- case CommandDOMGetContentQuads:
- v = new(dom.GetContentQuadsReturns)
-
- case CommandDOMGetDocument:
- v = new(dom.GetDocumentReturns)
-
- case CommandDOMGetNodesForSubtreeByStyle:
- v = new(dom.GetNodesForSubtreeByStyleReturns)
-
- case CommandDOMGetNodeForLocation:
- v = new(dom.GetNodeForLocationReturns)
-
- case CommandDOMGetOuterHTML:
- v = new(dom.GetOuterHTMLReturns)
-
- case CommandDOMGetRelayoutBoundary:
- v = new(dom.GetRelayoutBoundaryReturns)
-
- case CommandDOMGetSearchResults:
- v = new(dom.GetSearchResultsReturns)
-
- case CommandDOMMarkUndoableState:
- return emptyVal, nil
-
- case CommandDOMMoveTo:
- v = new(dom.MoveToReturns)
-
- case CommandDOMPerformSearch:
- v = new(dom.PerformSearchReturns)
-
- case CommandDOMPushNodeByPathToFrontend:
- v = new(dom.PushNodeByPathToFrontendReturns)
-
- case CommandDOMPushNodesByBackendIdsToFrontend:
- v = new(dom.PushNodesByBackendIdsToFrontendReturns)
-
- case CommandDOMQuerySelector:
- v = new(dom.QuerySelectorReturns)
-
- case CommandDOMQuerySelectorAll:
- v = new(dom.QuerySelectorAllReturns)
-
- case CommandDOMRedo:
- return emptyVal, nil
-
- case CommandDOMRemoveAttribute:
- return emptyVal, nil
-
- case CommandDOMRemoveNode:
- return emptyVal, nil
-
- case CommandDOMRequestChildNodes:
- return emptyVal, nil
-
- case CommandDOMRequestNode:
- v = new(dom.RequestNodeReturns)
-
- case CommandDOMResolveNode:
- v = new(dom.ResolveNodeReturns)
-
- case CommandDOMSetAttributeValue:
- return emptyVal, nil
-
- case CommandDOMSetAttributesAsText:
- return emptyVal, nil
-
- case CommandDOMSetFileInputFiles:
- return emptyVal, nil
-
- case CommandDOMSetNodeStackTracesEnabled:
- return emptyVal, nil
-
- case CommandDOMGetNodeStackTraces:
- v = new(dom.GetNodeStackTracesReturns)
-
- case CommandDOMGetFileInfo:
- v = new(dom.GetFileInfoReturns)
-
- case CommandDOMSetInspectedNode:
- return emptyVal, nil
-
- case CommandDOMSetNodeName:
- v = new(dom.SetNodeNameReturns)
-
- case CommandDOMSetNodeValue:
- return emptyVal, nil
-
- case CommandDOMSetOuterHTML:
- return emptyVal, nil
-
- case CommandDOMUndo:
- return emptyVal, nil
-
- case CommandDOMGetFrameOwner:
- v = new(dom.GetFrameOwnerReturns)
-
- case EventDOMAttributeModified:
- v = new(dom.EventAttributeModified)
-
- case EventDOMAttributeRemoved:
- v = new(dom.EventAttributeRemoved)
-
- case EventDOMCharacterDataModified:
- v = new(dom.EventCharacterDataModified)
-
- case EventDOMChildNodeCountUpdated:
- v = new(dom.EventChildNodeCountUpdated)
-
- case EventDOMChildNodeInserted:
- v = new(dom.EventChildNodeInserted)
-
- case EventDOMChildNodeRemoved:
- v = new(dom.EventChildNodeRemoved)
-
- case EventDOMDistributedNodesUpdated:
- v = new(dom.EventDistributedNodesUpdated)
-
- case EventDOMDocumentUpdated:
- v = new(dom.EventDocumentUpdated)
-
- case EventDOMInlineStyleInvalidated:
- v = new(dom.EventInlineStyleInvalidated)
-
- case EventDOMPseudoElementAdded:
- v = new(dom.EventPseudoElementAdded)
-
- case EventDOMPseudoElementRemoved:
- v = new(dom.EventPseudoElementRemoved)
-
- case EventDOMSetChildNodes:
- v = new(dom.EventSetChildNodes)
-
- case EventDOMShadowRootPopped:
- v = new(dom.EventShadowRootPopped)
-
- case EventDOMShadowRootPushed:
- v = new(dom.EventShadowRootPushed)
-
- case CommandDOMDebuggerGetEventListeners:
- v = new(domdebugger.GetEventListenersReturns)
-
- case CommandDOMDebuggerRemoveDOMBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerRemoveEventListenerBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerRemoveInstrumentationBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerRemoveXHRBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerSetBreakOnCSPViolation:
- return emptyVal, nil
-
- case CommandDOMDebuggerSetDOMBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerSetEventListenerBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerSetInstrumentationBreakpoint:
- return emptyVal, nil
-
- case CommandDOMDebuggerSetXHRBreakpoint:
- return emptyVal, nil
-
- case CommandDOMSnapshotDisable:
- return emptyVal, nil
-
- case CommandDOMSnapshotEnable:
- return emptyVal, nil
-
- case CommandDOMSnapshotCaptureSnapshot:
- v = new(domsnapshot.CaptureSnapshotReturns)
-
- case CommandDOMStorageClear:
- return emptyVal, nil
-
- case CommandDOMStorageDisable:
- return emptyVal, nil
-
- case CommandDOMStorageEnable:
- return emptyVal, nil
-
- case CommandDOMStorageGetDOMStorageItems:
- v = new(domstorage.GetDOMStorageItemsReturns)
-
- case CommandDOMStorageRemoveDOMStorageItem:
- return emptyVal, nil
-
- case CommandDOMStorageSetDOMStorageItem:
- return emptyVal, nil
-
- case EventDOMStorageDomStorageItemAdded:
- v = new(domstorage.EventDomStorageItemAdded)
-
- case EventDOMStorageDomStorageItemRemoved:
- v = new(domstorage.EventDomStorageItemRemoved)
-
- case EventDOMStorageDomStorageItemUpdated:
- v = new(domstorage.EventDomStorageItemUpdated)
-
- case EventDOMStorageDomStorageItemsCleared:
- v = new(domstorage.EventDomStorageItemsCleared)
-
- case CommandDatabaseDisable:
- return emptyVal, nil
-
- case CommandDatabaseEnable:
- return emptyVal, nil
-
- case CommandDatabaseExecuteSQL:
- v = new(database.ExecuteSQLReturns)
-
- case CommandDatabaseGetDatabaseTableNames:
- v = new(database.GetDatabaseTableNamesReturns)
-
- case EventDatabaseAddDatabase:
- v = new(database.EventAddDatabase)
-
- case CommandDebuggerContinueToLocation:
- return emptyVal, nil
-
- case CommandDebuggerDisable:
- return emptyVal, nil
-
- case CommandDebuggerEnable:
- v = new(debugger.EnableReturns)
-
- case CommandDebuggerEvaluateOnCallFrame:
- v = new(debugger.EvaluateOnCallFrameReturns)
-
- case CommandDebuggerGetPossibleBreakpoints:
- v = new(debugger.GetPossibleBreakpointsReturns)
-
- case CommandDebuggerGetScriptSource:
- v = new(debugger.GetScriptSourceReturns)
-
- case CommandDebuggerGetStackTrace:
- v = new(debugger.GetStackTraceReturns)
-
- case CommandDebuggerPause:
- return emptyVal, nil
-
- case CommandDebuggerRemoveBreakpoint:
- return emptyVal, nil
-
- case CommandDebuggerResume:
- return emptyVal, nil
-
- case CommandDebuggerSearchInContent:
- v = new(debugger.SearchInContentReturns)
-
- case CommandDebuggerSetAsyncCallStackDepth:
- return emptyVal, nil
-
- case CommandDebuggerSetBlackboxPatterns:
- return emptyVal, nil
-
- case CommandDebuggerSetBlackboxedRanges:
- return emptyVal, nil
-
- case CommandDebuggerSetBreakpoint:
- v = new(debugger.SetBreakpointReturns)
-
- case CommandDebuggerSetInstrumentationBreakpoint:
- v = new(debugger.SetInstrumentationBreakpointReturns)
-
- case CommandDebuggerSetBreakpointByURL:
- v = new(debugger.SetBreakpointByURLReturns)
-
- case CommandDebuggerSetBreakpointOnFunctionCall:
- v = new(debugger.SetBreakpointOnFunctionCallReturns)
-
- case CommandDebuggerSetBreakpointsActive:
- return emptyVal, nil
-
- case CommandDebuggerSetPauseOnExceptions:
- return emptyVal, nil
-
- case CommandDebuggerSetReturnValue:
- return emptyVal, nil
-
- case CommandDebuggerSetScriptSource:
- v = new(debugger.SetScriptSourceReturns)
-
- case CommandDebuggerSetSkipAllPauses:
- return emptyVal, nil
-
- case CommandDebuggerSetVariableValue:
- return emptyVal, nil
-
- case CommandDebuggerStepInto:
- return emptyVal, nil
-
- case CommandDebuggerStepOut:
- return emptyVal, nil
-
- case CommandDebuggerStepOver:
- return emptyVal, nil
-
- case EventDebuggerBreakpointResolved:
- v = new(debugger.EventBreakpointResolved)
-
- case EventDebuggerPaused:
- v = new(debugger.EventPaused)
-
- case EventDebuggerResumed:
- v = new(debugger.EventResumed)
-
- case EventDebuggerScriptFailedToParse:
- v = new(debugger.EventScriptFailedToParse)
-
- case EventDebuggerScriptParsed:
- v = new(debugger.EventScriptParsed)
-
- case CommandDeviceOrientationClearDeviceOrientationOverride:
- return emptyVal, nil
-
- case CommandDeviceOrientationSetDeviceOrientationOverride:
- return emptyVal, nil
-
- case CommandEmulationCanEmulate:
- v = new(emulation.CanEmulateReturns)
-
- case CommandEmulationClearDeviceMetricsOverride:
- return emptyVal, nil
-
- case CommandEmulationClearGeolocationOverride:
- return emptyVal, nil
-
- case CommandEmulationResetPageScaleFactor:
- return emptyVal, nil
-
- case CommandEmulationSetFocusEmulationEnabled:
- return emptyVal, nil
-
- case CommandEmulationSetCPUThrottlingRate:
- return emptyVal, nil
-
- case CommandEmulationSetDefaultBackgroundColorOverride:
- return emptyVal, nil
-
- case CommandEmulationSetDeviceMetricsOverride:
- return emptyVal, nil
-
- case CommandEmulationSetScrollbarsHidden:
- return emptyVal, nil
-
- case CommandEmulationSetDocumentCookieDisabled:
- return emptyVal, nil
-
- case CommandEmulationSetEmitTouchEventsForMouse:
- return emptyVal, nil
-
- case CommandEmulationSetEmulatedMedia:
- return emptyVal, nil
-
- case CommandEmulationSetEmulatedVisionDeficiency:
- return emptyVal, nil
-
- case CommandEmulationSetGeolocationOverride:
- return emptyVal, nil
-
- case CommandEmulationSetIdleOverride:
- return emptyVal, nil
-
- case CommandEmulationClearIdleOverride:
- return emptyVal, nil
-
- case CommandEmulationSetPageScaleFactor:
- return emptyVal, nil
-
- case CommandEmulationSetScriptExecutionDisabled:
- return emptyVal, nil
-
- case CommandEmulationSetTouchEmulationEnabled:
- return emptyVal, nil
-
- case CommandEmulationSetVirtualTimePolicy:
- v = new(emulation.SetVirtualTimePolicyReturns)
-
- case CommandEmulationSetLocaleOverride:
- return emptyVal, nil
-
- case CommandEmulationSetTimezoneOverride:
- return emptyVal, nil
-
- case CommandEmulationSetDisabledImageTypes:
- return emptyVal, nil
-
- case CommandEmulationSetUserAgentOverride:
- return emptyVal, nil
-
- case EventEmulationVirtualTimeBudgetExpired:
- v = new(emulation.EventVirtualTimeBudgetExpired)
-
- case CommandFetchDisable:
- return emptyVal, nil
-
- case CommandFetchEnable:
- return emptyVal, nil
-
- case CommandFetchFailRequest:
- return emptyVal, nil
-
- case CommandFetchFulfillRequest:
- return emptyVal, nil
-
- case CommandFetchContinueRequest:
- return emptyVal, nil
-
- case CommandFetchContinueWithAuth:
- return emptyVal, nil
-
- case CommandFetchGetResponseBody:
- v = new(fetch.GetResponseBodyReturns)
-
- case CommandFetchTakeResponseBodyAsStream:
- v = new(fetch.TakeResponseBodyAsStreamReturns)
-
- case EventFetchRequestPaused:
- v = new(fetch.EventRequestPaused)
-
- case EventFetchAuthRequired:
- v = new(fetch.EventAuthRequired)
-
- case CommandHeadlessExperimentalBeginFrame:
- v = new(headlessexperimental.BeginFrameReturns)
-
- case CommandHeadlessExperimentalDisable:
- return emptyVal, nil
-
- case CommandHeadlessExperimentalEnable:
- return emptyVal, nil
-
- case CommandHeapProfilerAddInspectedHeapObject:
- return emptyVal, nil
-
- case CommandHeapProfilerCollectGarbage:
- return emptyVal, nil
-
- case CommandHeapProfilerDisable:
- return emptyVal, nil
-
- case CommandHeapProfilerEnable:
- return emptyVal, nil
-
- case CommandHeapProfilerGetHeapObjectID:
- v = new(heapprofiler.GetHeapObjectIDReturns)
-
- case CommandHeapProfilerGetObjectByHeapObjectID:
- v = new(heapprofiler.GetObjectByHeapObjectIDReturns)
-
- case CommandHeapProfilerGetSamplingProfile:
- v = new(heapprofiler.GetSamplingProfileReturns)
-
- case CommandHeapProfilerStartSampling:
- return emptyVal, nil
-
- case CommandHeapProfilerStartTrackingHeapObjects:
- return emptyVal, nil
-
- case CommandHeapProfilerStopSampling:
- v = new(heapprofiler.StopSamplingReturns)
-
- case CommandHeapProfilerStopTrackingHeapObjects:
- return emptyVal, nil
-
- case CommandHeapProfilerTakeHeapSnapshot:
- return emptyVal, nil
-
- case EventHeapProfilerAddHeapSnapshotChunk:
- v = new(heapprofiler.EventAddHeapSnapshotChunk)
-
- case EventHeapProfilerHeapStatsUpdate:
- v = new(heapprofiler.EventHeapStatsUpdate)
-
- case EventHeapProfilerLastSeenObjectID:
- v = new(heapprofiler.EventLastSeenObjectID)
-
- case EventHeapProfilerReportHeapSnapshotProgress:
- v = new(heapprofiler.EventReportHeapSnapshotProgress)
-
- case EventHeapProfilerResetProfiles:
- v = new(heapprofiler.EventResetProfiles)
-
- case CommandIOClose:
- return emptyVal, nil
-
- case CommandIORead:
- v = new(io.ReadReturns)
-
- case CommandIOResolveBlob:
- v = new(io.ResolveBlobReturns)
-
- case CommandIndexedDBClearObjectStore:
- return emptyVal, nil
-
- case CommandIndexedDBDeleteDatabase:
- return emptyVal, nil
-
- case CommandIndexedDBDeleteObjectStoreEntries:
- return emptyVal, nil
-
- case CommandIndexedDBDisable:
- return emptyVal, nil
-
- case CommandIndexedDBEnable:
- return emptyVal, nil
-
- case CommandIndexedDBRequestData:
- v = new(indexeddb.RequestDataReturns)
-
- case CommandIndexedDBGetMetadata:
- v = new(indexeddb.GetMetadataReturns)
-
- case CommandIndexedDBRequestDatabase:
- v = new(indexeddb.RequestDatabaseReturns)
-
- case CommandIndexedDBRequestDatabaseNames:
- v = new(indexeddb.RequestDatabaseNamesReturns)
-
- case CommandInputDispatchDragEvent:
- return emptyVal, nil
-
- case CommandInputDispatchKeyEvent:
- return emptyVal, nil
-
- case CommandInputInsertText:
- return emptyVal, nil
-
- case CommandInputDispatchMouseEvent:
- return emptyVal, nil
-
- case CommandInputDispatchTouchEvent:
- return emptyVal, nil
-
- case CommandInputEmulateTouchFromMouseEvent:
- return emptyVal, nil
-
- case CommandInputSetIgnoreInputEvents:
- return emptyVal, nil
-
- case CommandInputSetInterceptDrags:
- return emptyVal, nil
-
- case CommandInputSynthesizePinchGesture:
- return emptyVal, nil
-
- case CommandInputSynthesizeScrollGesture:
- return emptyVal, nil
-
- case CommandInputSynthesizeTapGesture:
- return emptyVal, nil
-
- case EventInputDragIntercepted:
- v = new(input.EventDragIntercepted)
-
- case CommandInspectorDisable:
- return emptyVal, nil
-
- case CommandInspectorEnable:
- return emptyVal, nil
-
- case EventInspectorDetached:
- v = new(inspector.EventDetached)
-
- case EventInspectorTargetCrashed:
- v = new(inspector.EventTargetCrashed)
-
- case EventInspectorTargetReloadedAfterCrash:
- v = new(inspector.EventTargetReloadedAfterCrash)
-
- case CommandLayerTreeCompositingReasons:
- v = new(layertree.CompositingReasonsReturns)
-
- case CommandLayerTreeDisable:
- return emptyVal, nil
-
- case CommandLayerTreeEnable:
- return emptyVal, nil
-
- case CommandLayerTreeLoadSnapshot:
- v = new(layertree.LoadSnapshotReturns)
-
- case CommandLayerTreeMakeSnapshot:
- v = new(layertree.MakeSnapshotReturns)
-
- case CommandLayerTreeProfileSnapshot:
- v = new(layertree.ProfileSnapshotReturns)
-
- case CommandLayerTreeReleaseSnapshot:
- return emptyVal, nil
-
- case CommandLayerTreeReplaySnapshot:
- v = new(layertree.ReplaySnapshotReturns)
-
- case CommandLayerTreeSnapshotCommandLog:
- v = new(layertree.SnapshotCommandLogReturns)
-
- case EventLayerTreeLayerPainted:
- v = new(layertree.EventLayerPainted)
-
- case EventLayerTreeLayerTreeDidChange:
- v = new(layertree.EventLayerTreeDidChange)
-
- case CommandLogClear:
- return emptyVal, nil
-
- case CommandLogDisable:
- return emptyVal, nil
-
- case CommandLogEnable:
- return emptyVal, nil
-
- case CommandLogStartViolationsReport:
- return emptyVal, nil
-
- case CommandLogStopViolationsReport:
- return emptyVal, nil
-
- case EventLogEntryAdded:
- v = new(log.EventEntryAdded)
-
- case CommandMediaEnable:
- return emptyVal, nil
-
- case CommandMediaDisable:
- return emptyVal, nil
-
- case EventMediaPlayerPropertiesChanged:
- v = new(media.EventPlayerPropertiesChanged)
-
- case EventMediaPlayerEventsAdded:
- v = new(media.EventPlayerEventsAdded)
-
- case EventMediaPlayerMessagesLogged:
- v = new(media.EventPlayerMessagesLogged)
-
- case EventMediaPlayerErrorsRaised:
- v = new(media.EventPlayerErrorsRaised)
-
- case EventMediaPlayersCreated:
- v = new(media.EventPlayersCreated)
-
- case CommandMemoryGetDOMCounters:
- v = new(memory.GetDOMCountersReturns)
-
- case CommandMemoryPrepareForLeakDetection:
- return emptyVal, nil
-
- case CommandMemoryForciblyPurgeJavaScriptMemory:
- return emptyVal, nil
-
- case CommandMemorySetPressureNotificationsSuppressed:
- return emptyVal, nil
-
- case CommandMemorySimulatePressureNotification:
- return emptyVal, nil
-
- case CommandMemoryStartSampling:
- return emptyVal, nil
-
- case CommandMemoryStopSampling:
- return emptyVal, nil
-
- case CommandMemoryGetAllTimeSamplingProfile:
- v = new(memory.GetAllTimeSamplingProfileReturns)
-
- case CommandMemoryGetBrowserSamplingProfile:
- v = new(memory.GetBrowserSamplingProfileReturns)
-
- case CommandMemoryGetSamplingProfile:
- v = new(memory.GetSamplingProfileReturns)
-
- case CommandNetworkSetAcceptedEncodings:
- return emptyVal, nil
-
- case CommandNetworkClearAcceptedEncodingsOverride:
- return emptyVal, nil
-
- case CommandNetworkClearBrowserCache:
- return emptyVal, nil
-
- case CommandNetworkClearBrowserCookies:
- return emptyVal, nil
-
- case CommandNetworkDeleteCookies:
- return emptyVal, nil
-
- case CommandNetworkDisable:
- return emptyVal, nil
-
- case CommandNetworkEmulateNetworkConditions:
- return emptyVal, nil
-
- case CommandNetworkEnable:
- return emptyVal, nil
-
- case CommandNetworkGetAllCookies:
- v = new(network.GetAllCookiesReturns)
-
- case CommandNetworkGetCertificate:
- v = new(network.GetCertificateReturns)
-
- case CommandNetworkGetCookies:
- v = new(network.GetCookiesReturns)
-
- case CommandNetworkGetResponseBody:
- v = new(network.GetResponseBodyReturns)
-
- case CommandNetworkGetRequestPostData:
- v = new(network.GetRequestPostDataReturns)
-
- case CommandNetworkGetResponseBodyForInterception:
- v = new(network.GetResponseBodyForInterceptionReturns)
-
- case CommandNetworkTakeResponseBodyForInterceptionAsStream:
- v = new(network.TakeResponseBodyForInterceptionAsStreamReturns)
-
- case CommandNetworkReplayXHR:
- return emptyVal, nil
-
- case CommandNetworkSearchInResponseBody:
- v = new(network.SearchInResponseBodyReturns)
-
- case CommandNetworkSetBlockedURLS:
- return emptyVal, nil
-
- case CommandNetworkSetBypassServiceWorker:
- return emptyVal, nil
-
- case CommandNetworkSetCacheDisabled:
- return emptyVal, nil
-
- case CommandNetworkSetCookie:
- return emptyVal, nil
-
- case CommandNetworkSetCookies:
- return emptyVal, nil
-
- case CommandNetworkSetExtraHTTPHeaders:
- return emptyVal, nil
-
- case CommandNetworkSetAttachDebugStack:
- return emptyVal, nil
-
- case CommandNetworkGetSecurityIsolationStatus:
- v = new(network.GetSecurityIsolationStatusReturns)
-
- case CommandNetworkLoadNetworkResource:
- v = new(network.LoadNetworkResourceReturns)
-
- case EventNetworkDataReceived:
- v = new(network.EventDataReceived)
-
- case EventNetworkEventSourceMessageReceived:
- v = new(network.EventEventSourceMessageReceived)
-
- case EventNetworkLoadingFailed:
- v = new(network.EventLoadingFailed)
-
- case EventNetworkLoadingFinished:
- v = new(network.EventLoadingFinished)
-
- case EventNetworkRequestServedFromCache:
- v = new(network.EventRequestServedFromCache)
-
- case EventNetworkRequestWillBeSent:
- v = new(network.EventRequestWillBeSent)
-
- case EventNetworkResourceChangedPriority:
- v = new(network.EventResourceChangedPriority)
-
- case EventNetworkSignedExchangeReceived:
- v = new(network.EventSignedExchangeReceived)
-
- case EventNetworkResponseReceived:
- v = new(network.EventResponseReceived)
-
- case EventNetworkWebSocketClosed:
- v = new(network.EventWebSocketClosed)
-
- case EventNetworkWebSocketCreated:
- v = new(network.EventWebSocketCreated)
-
- case EventNetworkWebSocketFrameError:
- v = new(network.EventWebSocketFrameError)
-
- case EventNetworkWebSocketFrameReceived:
- v = new(network.EventWebSocketFrameReceived)
-
- case EventNetworkWebSocketFrameSent:
- v = new(network.EventWebSocketFrameSent)
-
- case EventNetworkWebSocketHandshakeResponseReceived:
- v = new(network.EventWebSocketHandshakeResponseReceived)
-
- case EventNetworkWebSocketWillSendHandshakeRequest:
- v = new(network.EventWebSocketWillSendHandshakeRequest)
-
- case EventNetworkWebTransportCreated:
- v = new(network.EventWebTransportCreated)
-
- case EventNetworkWebTransportConnectionEstablished:
- v = new(network.EventWebTransportConnectionEstablished)
-
- case EventNetworkWebTransportClosed:
- v = new(network.EventWebTransportClosed)
-
- case EventNetworkRequestWillBeSentExtraInfo:
- v = new(network.EventRequestWillBeSentExtraInfo)
-
- case EventNetworkResponseReceivedExtraInfo:
- v = new(network.EventResponseReceivedExtraInfo)
-
- case EventNetworkTrustTokenOperationDone:
- v = new(network.EventTrustTokenOperationDone)
-
- case EventNetworkSubresourceWebBundleMetadataReceived:
- v = new(network.EventSubresourceWebBundleMetadataReceived)
-
- case EventNetworkSubresourceWebBundleMetadataError:
- v = new(network.EventSubresourceWebBundleMetadataError)
-
- case EventNetworkSubresourceWebBundleInnerResponseParsed:
- v = new(network.EventSubresourceWebBundleInnerResponseParsed)
-
- case EventNetworkSubresourceWebBundleInnerResponseError:
- v = new(network.EventSubresourceWebBundleInnerResponseError)
-
- case CommandOverlayDisable:
- return emptyVal, nil
-
- case CommandOverlayEnable:
- return emptyVal, nil
-
- case CommandOverlayGetHighlightObjectForTest:
- v = new(overlay.GetHighlightObjectForTestReturns)
-
- case CommandOverlayGetGridHighlightObjectsForTest:
- v = new(overlay.GetGridHighlightObjectsForTestReturns)
-
- case CommandOverlayGetSourceOrderHighlightObjectForTest:
- v = new(overlay.GetSourceOrderHighlightObjectForTestReturns)
-
- case CommandOverlayHideHighlight:
- return emptyVal, nil
-
- case CommandOverlayHighlightFrame:
- return emptyVal, nil
-
- case CommandOverlayHighlightNode:
- return emptyVal, nil
-
- case CommandOverlayHighlightQuad:
- return emptyVal, nil
-
- case CommandOverlayHighlightRect:
- return emptyVal, nil
-
- case CommandOverlayHighlightSourceOrder:
- return emptyVal, nil
-
- case CommandOverlaySetInspectMode:
- return emptyVal, nil
-
- case CommandOverlaySetShowAdHighlights:
- return emptyVal, nil
-
- case CommandOverlaySetPausedInDebuggerMessage:
- return emptyVal, nil
-
- case CommandOverlaySetShowDebugBorders:
- return emptyVal, nil
-
- case CommandOverlaySetShowFPSCounter:
- return emptyVal, nil
-
- case CommandOverlaySetShowGridOverlays:
- return emptyVal, nil
-
- case CommandOverlaySetShowFlexOverlays:
- return emptyVal, nil
-
- case CommandOverlaySetShowScrollSnapOverlays:
- return emptyVal, nil
-
- case CommandOverlaySetShowPaintRects:
- return emptyVal, nil
-
- case CommandOverlaySetShowLayoutShiftRegions:
- return emptyVal, nil
-
- case CommandOverlaySetShowScrollBottleneckRects:
- return emptyVal, nil
-
- case CommandOverlaySetShowHitTestBorders:
- return emptyVal, nil
-
- case CommandOverlaySetShowWebVitals:
- return emptyVal, nil
-
- case CommandOverlaySetShowViewportSizeOnResize:
- return emptyVal, nil
-
- case CommandOverlaySetShowHinge:
- return emptyVal, nil
-
- case EventOverlayInspectNodeRequested:
- v = new(overlay.EventInspectNodeRequested)
-
- case EventOverlayNodeHighlightRequested:
- v = new(overlay.EventNodeHighlightRequested)
-
- case EventOverlayScreenshotRequested:
- v = new(overlay.EventScreenshotRequested)
-
- case EventOverlayInspectModeCanceled:
- v = new(overlay.EventInspectModeCanceled)
-
- case CommandPageAddScriptToEvaluateOnNewDocument:
- v = new(page.AddScriptToEvaluateOnNewDocumentReturns)
-
- case CommandPageBringToFront:
- return emptyVal, nil
-
- case CommandPageCaptureScreenshot:
- v = new(page.CaptureScreenshotReturns)
-
- case CommandPageCaptureSnapshot:
- v = new(page.CaptureSnapshotReturns)
-
- case CommandPageCreateIsolatedWorld:
- v = new(page.CreateIsolatedWorldReturns)
-
- case CommandPageDisable:
- return emptyVal, nil
-
- case CommandPageEnable:
- return emptyVal, nil
-
- case CommandPageGetAppManifest:
- v = new(page.GetAppManifestReturns)
-
- case CommandPageGetInstallabilityErrors:
- v = new(page.GetInstallabilityErrorsReturns)
-
- case CommandPageGetManifestIcons:
- v = new(page.GetManifestIconsReturns)
-
- case CommandPageGetFrameTree:
- v = new(page.GetFrameTreeReturns)
-
- case CommandPageGetLayoutMetrics:
- v = new(page.GetLayoutMetricsReturns)
-
- case CommandPageGetNavigationHistory:
- v = new(page.GetNavigationHistoryReturns)
-
- case CommandPageResetNavigationHistory:
- return emptyVal, nil
-
- case CommandPageGetResourceContent:
- v = new(page.GetResourceContentReturns)
-
- case CommandPageGetResourceTree:
- v = new(page.GetResourceTreeReturns)
-
- case CommandPageHandleJavaScriptDialog:
- return emptyVal, nil
-
- case CommandPageNavigate:
- v = new(page.NavigateReturns)
-
- case CommandPageNavigateToHistoryEntry:
- return emptyVal, nil
-
- case CommandPagePrintToPDF:
- v = new(page.PrintToPDFReturns)
-
- case CommandPageReload:
- return emptyVal, nil
-
- case CommandPageRemoveScriptToEvaluateOnNewDocument:
- return emptyVal, nil
-
- case CommandPageScreencastFrameAck:
- return emptyVal, nil
-
- case CommandPageSearchInResource:
- v = new(page.SearchInResourceReturns)
-
- case CommandPageSetAdBlockingEnabled:
- return emptyVal, nil
-
- case CommandPageSetBypassCSP:
- return emptyVal, nil
-
- case CommandPageGetPermissionsPolicyState:
- v = new(page.GetPermissionsPolicyStateReturns)
-
- case CommandPageSetFontFamilies:
- return emptyVal, nil
-
- case CommandPageSetFontSizes:
- return emptyVal, nil
-
- case CommandPageSetDocumentContent:
- return emptyVal, nil
-
- case CommandPageSetDownloadBehavior:
- return emptyVal, nil
-
- case CommandPageSetLifecycleEventsEnabled:
- return emptyVal, nil
-
- case CommandPageStartScreencast:
- return emptyVal, nil
-
- case CommandPageStopLoading:
- return emptyVal, nil
-
- case CommandPageCrash:
- return emptyVal, nil
-
- case CommandPageClose:
- return emptyVal, nil
-
- case CommandPageSetWebLifecycleState:
- return emptyVal, nil
-
- case CommandPageStopScreencast:
- return emptyVal, nil
-
- case CommandPageSetProduceCompilationCache:
- return emptyVal, nil
-
- case CommandPageProduceCompilationCache:
- return emptyVal, nil
-
- case CommandPageAddCompilationCache:
- return emptyVal, nil
-
- case CommandPageClearCompilationCache:
- return emptyVal, nil
-
- case CommandPageGenerateTestReport:
- return emptyVal, nil
-
- case CommandPageWaitForDebugger:
- return emptyVal, nil
-
- case CommandPageSetInterceptFileChooserDialog:
- return emptyVal, nil
-
- case EventPageDomContentEventFired:
- v = new(page.EventDomContentEventFired)
-
- case EventPageFileChooserOpened:
- v = new(page.EventFileChooserOpened)
-
- case EventPageFrameAttached:
- v = new(page.EventFrameAttached)
-
- case EventPageFrameDetached:
- v = new(page.EventFrameDetached)
-
- case EventPageFrameNavigated:
- v = new(page.EventFrameNavigated)
-
- case EventPageDocumentOpened:
- v = new(page.EventDocumentOpened)
-
- case EventPageFrameResized:
- v = new(page.EventFrameResized)
-
- case EventPageFrameRequestedNavigation:
- v = new(page.EventFrameRequestedNavigation)
-
- case EventPageFrameStartedLoading:
- v = new(page.EventFrameStartedLoading)
-
- case EventPageFrameStoppedLoading:
- v = new(page.EventFrameStoppedLoading)
-
- case EventPageInterstitialHidden:
- v = new(page.EventInterstitialHidden)
-
- case EventPageInterstitialShown:
- v = new(page.EventInterstitialShown)
-
- case EventPageJavascriptDialogClosed:
- v = new(page.EventJavascriptDialogClosed)
-
- case EventPageJavascriptDialogOpening:
- v = new(page.EventJavascriptDialogOpening)
-
- case EventPageLifecycleEvent:
- v = new(page.EventLifecycleEvent)
-
- case EventPageBackForwardCacheNotUsed:
- v = new(page.EventBackForwardCacheNotUsed)
-
- case EventPageLoadEventFired:
- v = new(page.EventLoadEventFired)
-
- case EventPageNavigatedWithinDocument:
- v = new(page.EventNavigatedWithinDocument)
-
- case EventPageScreencastFrame:
- v = new(page.EventScreencastFrame)
-
- case EventPageScreencastVisibilityChanged:
- v = new(page.EventScreencastVisibilityChanged)
-
- case EventPageWindowOpen:
- v = new(page.EventWindowOpen)
-
- case EventPageCompilationCacheProduced:
- v = new(page.EventCompilationCacheProduced)
-
- case CommandPerformanceDisable:
- return emptyVal, nil
-
- case CommandPerformanceEnable:
- return emptyVal, nil
-
- case CommandPerformanceGetMetrics:
- v = new(performance.GetMetricsReturns)
-
- case EventPerformanceMetrics:
- v = new(performance.EventMetrics)
-
- case CommandPerformanceTimelineEnable:
- return emptyVal, nil
-
- case EventPerformanceTimelineTimelineEventAdded:
- v = new(performancetimeline.EventTimelineEventAdded)
-
- case CommandProfilerDisable:
- return emptyVal, nil
-
- case CommandProfilerEnable:
- return emptyVal, nil
-
- case CommandProfilerGetBestEffortCoverage:
- v = new(profiler.GetBestEffortCoverageReturns)
-
- case CommandProfilerSetSamplingInterval:
- return emptyVal, nil
-
- case CommandProfilerStart:
- return emptyVal, nil
-
- case CommandProfilerStartPreciseCoverage:
- v = new(profiler.StartPreciseCoverageReturns)
-
- case CommandProfilerStartTypeProfile:
- return emptyVal, nil
-
- case CommandProfilerStop:
- v = new(profiler.StopReturns)
-
- case CommandProfilerStopPreciseCoverage:
- return emptyVal, nil
-
- case CommandProfilerStopTypeProfile:
- return emptyVal, nil
-
- case CommandProfilerTakePreciseCoverage:
- v = new(profiler.TakePreciseCoverageReturns)
-
- case CommandProfilerTakeTypeProfile:
- v = new(profiler.TakeTypeProfileReturns)
-
- case CommandProfilerEnableCounters:
- return emptyVal, nil
-
- case CommandProfilerDisableCounters:
- return emptyVal, nil
-
- case CommandProfilerGetCounters:
- v = new(profiler.GetCountersReturns)
-
- case CommandProfilerEnableRuntimeCallStats:
- return emptyVal, nil
-
- case CommandProfilerDisableRuntimeCallStats:
- return emptyVal, nil
-
- case CommandProfilerGetRuntimeCallStats:
- v = new(profiler.GetRuntimeCallStatsReturns)
-
- case EventProfilerConsoleProfileFinished:
- v = new(profiler.EventConsoleProfileFinished)
-
- case EventProfilerConsoleProfileStarted:
- v = new(profiler.EventConsoleProfileStarted)
-
- case EventProfilerPreciseCoverageDeltaUpdate:
- v = new(profiler.EventPreciseCoverageDeltaUpdate)
-
- case CommandRuntimeAwaitPromise:
- v = new(runtime.AwaitPromiseReturns)
-
- case CommandRuntimeCallFunctionOn:
- v = new(runtime.CallFunctionOnReturns)
-
- case CommandRuntimeCompileScript:
- v = new(runtime.CompileScriptReturns)
-
- case CommandRuntimeDisable:
- return emptyVal, nil
-
- case CommandRuntimeDiscardConsoleEntries:
- return emptyVal, nil
-
- case CommandRuntimeEnable:
- return emptyVal, nil
-
- case CommandRuntimeEvaluate:
- v = new(runtime.EvaluateReturns)
-
- case CommandRuntimeGetIsolateID:
- v = new(runtime.GetIsolateIDReturns)
-
- case CommandRuntimeGetHeapUsage:
- v = new(runtime.GetHeapUsageReturns)
-
- case CommandRuntimeGetProperties:
- v = new(runtime.GetPropertiesReturns)
-
- case CommandRuntimeGlobalLexicalScopeNames:
- v = new(runtime.GlobalLexicalScopeNamesReturns)
-
- case CommandRuntimeQueryObjects:
- v = new(runtime.QueryObjectsReturns)
-
- case CommandRuntimeReleaseObject:
- return emptyVal, nil
-
- case CommandRuntimeReleaseObjectGroup:
- return emptyVal, nil
-
- case CommandRuntimeRunIfWaitingForDebugger:
- return emptyVal, nil
-
- case CommandRuntimeRunScript:
- v = new(runtime.RunScriptReturns)
-
- case CommandRuntimeSetCustomObjectFormatterEnabled:
- return emptyVal, nil
-
- case CommandRuntimeSetMaxCallStackSizeToCapture:
- return emptyVal, nil
-
- case CommandRuntimeTerminateExecution:
- return emptyVal, nil
-
- case CommandRuntimeAddBinding:
- return emptyVal, nil
-
- case CommandRuntimeRemoveBinding:
- return emptyVal, nil
-
- case EventRuntimeBindingCalled:
- v = new(runtime.EventBindingCalled)
-
- case EventRuntimeConsoleAPICalled:
- v = new(runtime.EventConsoleAPICalled)
-
- case EventRuntimeExceptionRevoked:
- v = new(runtime.EventExceptionRevoked)
-
- case EventRuntimeExceptionThrown:
- v = new(runtime.EventExceptionThrown)
-
- case EventRuntimeExecutionContextCreated:
- v = new(runtime.EventExecutionContextCreated)
-
- case EventRuntimeExecutionContextDestroyed:
- v = new(runtime.EventExecutionContextDestroyed)
-
- case EventRuntimeExecutionContextsCleared:
- v = new(runtime.EventExecutionContextsCleared)
-
- case EventRuntimeInspectRequested:
- v = new(runtime.EventInspectRequested)
-
- case CommandSecurityDisable:
- return emptyVal, nil
-
- case CommandSecurityEnable:
- return emptyVal, nil
-
- case CommandSecuritySetIgnoreCertificateErrors:
- return emptyVal, nil
-
- case EventSecurityVisibleSecurityStateChanged:
- v = new(security.EventVisibleSecurityStateChanged)
-
- case EventSecuritySecurityStateChanged:
- v = new(security.EventSecurityStateChanged)
-
- case CommandServiceWorkerDeliverPushMessage:
- return emptyVal, nil
-
- case CommandServiceWorkerDisable:
- return emptyVal, nil
-
- case CommandServiceWorkerDispatchSyncEvent:
- return emptyVal, nil
-
- case CommandServiceWorkerDispatchPeriodicSyncEvent:
- return emptyVal, nil
-
- case CommandServiceWorkerEnable:
- return emptyVal, nil
-
- case CommandServiceWorkerInspectWorker:
- return emptyVal, nil
-
- case CommandServiceWorkerSetForceUpdateOnPageLoad:
- return emptyVal, nil
-
- case CommandServiceWorkerSkipWaiting:
- return emptyVal, nil
-
- case CommandServiceWorkerStartWorker:
- return emptyVal, nil
-
- case CommandServiceWorkerStopAllWorkers:
- return emptyVal, nil
-
- case CommandServiceWorkerStopWorker:
- return emptyVal, nil
-
- case CommandServiceWorkerUnregister:
- return emptyVal, nil
-
- case CommandServiceWorkerUpdateRegistration:
- return emptyVal, nil
-
- case EventServiceWorkerWorkerErrorReported:
- v = new(serviceworker.EventWorkerErrorReported)
-
- case EventServiceWorkerWorkerRegistrationUpdated:
- v = new(serviceworker.EventWorkerRegistrationUpdated)
-
- case EventServiceWorkerWorkerVersionUpdated:
- v = new(serviceworker.EventWorkerVersionUpdated)
-
- case CommandStorageClearDataForOrigin:
- return emptyVal, nil
-
- case CommandStorageGetCookies:
- v = new(storage.GetCookiesReturns)
-
- case CommandStorageSetCookies:
- return emptyVal, nil
-
- case CommandStorageClearCookies:
- return emptyVal, nil
-
- case CommandStorageGetUsageAndQuota:
- v = new(storage.GetUsageAndQuotaReturns)
-
- case CommandStorageOverrideQuotaForOrigin:
- return emptyVal, nil
-
- case CommandStorageTrackCacheStorageForOrigin:
- return emptyVal, nil
-
- case CommandStorageTrackIndexedDBForOrigin:
- return emptyVal, nil
-
- case CommandStorageUntrackCacheStorageForOrigin:
- return emptyVal, nil
-
- case CommandStorageUntrackIndexedDBForOrigin:
- return emptyVal, nil
-
- case CommandStorageGetTrustTokens:
- v = new(storage.GetTrustTokensReturns)
-
- case CommandStorageClearTrustTokens:
- v = new(storage.ClearTrustTokensReturns)
-
- case EventStorageCacheStorageContentUpdated:
- v = new(storage.EventCacheStorageContentUpdated)
-
- case EventStorageCacheStorageListUpdated:
- v = new(storage.EventCacheStorageListUpdated)
-
- case EventStorageIndexedDBContentUpdated:
- v = new(storage.EventIndexedDBContentUpdated)
-
- case EventStorageIndexedDBListUpdated:
- v = new(storage.EventIndexedDBListUpdated)
-
- case CommandSystemInfoGetInfo:
- v = new(systeminfo.GetInfoReturns)
-
- case CommandSystemInfoGetProcessInfo:
- v = new(systeminfo.GetProcessInfoReturns)
-
- case CommandTargetActivateTarget:
- return emptyVal, nil
-
- case CommandTargetAttachToTarget:
- v = new(target.AttachToTargetReturns)
-
- case CommandTargetAttachToBrowserTarget:
- v = new(target.AttachToBrowserTargetReturns)
-
- case CommandTargetCloseTarget:
- return emptyVal, nil
-
- case CommandTargetExposeDevToolsProtocol:
- return emptyVal, nil
-
- case CommandTargetCreateBrowserContext:
- v = new(target.CreateBrowserContextReturns)
-
- case CommandTargetGetBrowserContexts:
- v = new(target.GetBrowserContextsReturns)
-
- case CommandTargetCreateTarget:
- v = new(target.CreateTargetReturns)
-
- case CommandTargetDetachFromTarget:
- return emptyVal, nil
-
- case CommandTargetDisposeBrowserContext:
- return emptyVal, nil
-
- case CommandTargetGetTargetInfo:
- v = new(target.GetTargetInfoReturns)
-
- case CommandTargetGetTargets:
- v = new(target.GetTargetsReturns)
-
- case CommandTargetSetAutoAttach:
- return emptyVal, nil
-
- case CommandTargetSetDiscoverTargets:
- return emptyVal, nil
-
- case CommandTargetSetRemoteLocations:
- return emptyVal, nil
-
- case EventTargetAttachedToTarget:
- v = new(target.EventAttachedToTarget)
-
- case EventTargetDetachedFromTarget:
- v = new(target.EventDetachedFromTarget)
-
- case EventTargetReceivedMessageFromTarget:
- v = new(target.EventReceivedMessageFromTarget)
-
- case EventTargetTargetCreated:
- v = new(target.EventTargetCreated)
-
- case EventTargetTargetDestroyed:
- v = new(target.EventTargetDestroyed)
-
- case EventTargetTargetCrashed:
- v = new(target.EventTargetCrashed)
-
- case EventTargetTargetInfoChanged:
- v = new(target.EventTargetInfoChanged)
-
- case CommandTetheringBind:
- return emptyVal, nil
-
- case CommandTetheringUnbind:
- return emptyVal, nil
-
- case EventTetheringAccepted:
- v = new(tethering.EventAccepted)
-
- case CommandTracingEnd:
- return emptyVal, nil
-
- case CommandTracingGetCategories:
- v = new(tracing.GetCategoriesReturns)
-
- case CommandTracingRecordClockSyncMarker:
- return emptyVal, nil
-
- case CommandTracingRequestMemoryDump:
- v = new(tracing.RequestMemoryDumpReturns)
-
- case CommandTracingStart:
- return emptyVal, nil
-
- case EventTracingBufferUsage:
- v = new(tracing.EventBufferUsage)
-
- case EventTracingDataCollected:
- v = new(tracing.EventDataCollected)
-
- case EventTracingTracingComplete:
- v = new(tracing.EventTracingComplete)
-
- case CommandWebAudioEnable:
- return emptyVal, nil
-
- case CommandWebAudioDisable:
- return emptyVal, nil
-
- case CommandWebAudioGetRealtimeData:
- v = new(webaudio.GetRealtimeDataReturns)
-
- case EventWebAudioContextCreated:
- v = new(webaudio.EventContextCreated)
-
- case EventWebAudioContextWillBeDestroyed:
- v = new(webaudio.EventContextWillBeDestroyed)
-
- case EventWebAudioContextChanged:
- v = new(webaudio.EventContextChanged)
-
- case EventWebAudioAudioListenerCreated:
- v = new(webaudio.EventAudioListenerCreated)
-
- case EventWebAudioAudioListenerWillBeDestroyed:
- v = new(webaudio.EventAudioListenerWillBeDestroyed)
-
- case EventWebAudioAudioNodeCreated:
- v = new(webaudio.EventAudioNodeCreated)
-
- case EventWebAudioAudioNodeWillBeDestroyed:
- v = new(webaudio.EventAudioNodeWillBeDestroyed)
-
- case EventWebAudioAudioParamCreated:
- v = new(webaudio.EventAudioParamCreated)
-
- case EventWebAudioAudioParamWillBeDestroyed:
- v = new(webaudio.EventAudioParamWillBeDestroyed)
-
- case EventWebAudioNodesConnected:
- v = new(webaudio.EventNodesConnected)
-
- case EventWebAudioNodesDisconnected:
- v = new(webaudio.EventNodesDisconnected)
-
- case EventWebAudioNodeParamConnected:
- v = new(webaudio.EventNodeParamConnected)
-
- case EventWebAudioNodeParamDisconnected:
- v = new(webaudio.EventNodeParamDisconnected)
-
- case CommandWebAuthnEnable:
- return emptyVal, nil
-
- case CommandWebAuthnDisable:
- return emptyVal, nil
-
- case CommandWebAuthnAddVirtualAuthenticator:
- v = new(webauthn.AddVirtualAuthenticatorReturns)
-
- case CommandWebAuthnRemoveVirtualAuthenticator:
- return emptyVal, nil
-
- case CommandWebAuthnAddCredential:
- return emptyVal, nil
-
- case CommandWebAuthnGetCredential:
- v = new(webauthn.GetCredentialReturns)
-
- case CommandWebAuthnGetCredentials:
- v = new(webauthn.GetCredentialsReturns)
-
- case CommandWebAuthnRemoveCredential:
- return emptyVal, nil
-
- case CommandWebAuthnClearCredentials:
- return emptyVal, nil
-
- case CommandWebAuthnSetUserVerified:
- return emptyVal, nil
-
- case CommandWebAuthnSetAutomaticPresenceSimulation:
- return emptyVal, nil
-
- default:
- return nil, cdp.ErrUnknownCommandOrEvent(msg.Method)
- }
-
- var buf easyjson.RawMessage
- switch {
- case msg.Params != nil:
- buf = msg.Params
-
- case msg.Result != nil:
- buf = msg.Result
-
- default:
- return nil, cdp.ErrMsgMissingParamsOrResult
- }
-
- err := easyjson.Unmarshal(buf, v)
- if err != nil {
- return nil, err
- }
-
- return v, nil
-}
diff --git a/vendor/github.com/chromedp/cdproto/css/css.go b/vendor/github.com/chromedp/cdproto/css/css.go
deleted file mode 100644
index fc5d5293301..00000000000
--- a/vendor/github.com/chromedp/cdproto/css/css.go
+++ /dev/null
@@ -1,969 +0,0 @@
-// Package css provides the Chrome DevTools Protocol
-// commands, types, and events for the CSS domain.
-//
-// This domain exposes CSS read/write operations. All CSS objects
-// (stylesheets, rules, and styles) have an associated id used in subsequent
-// operations on the related object. Each object type has a specific id
-// structure, and those are not interchangeable between objects of different
-// kinds. CSS objects can be loaded using the get*ForNode() calls (which accept
-// a DOM node id). A client can also keep track of stylesheets via the
-// styleSheetAdded/styleSheetRemoved events and subsequently load the required
-// stylesheet contents using the getStyleSheet[Text]() methods.
-//
-// Generated by the cdproto-gen command.
-package css
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// AddRuleParams inserts a new rule with the given ruleText in a stylesheet
-// with given styleSheetId, at the position specified by location.
-type AddRuleParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier where a new rule should be inserted.
- RuleText string `json:"ruleText"` // The text of a new rule.
- Location *SourceRange `json:"location"` // Text position of a new rule in the target style sheet.
-}
-
-// AddRule inserts a new rule with the given ruleText in a stylesheet with
-// given styleSheetId, at the position specified by location.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-addRule
-//
-// parameters:
-// styleSheetID - The css style sheet identifier where a new rule should be inserted.
-// ruleText - The text of a new rule.
-// location - Text position of a new rule in the target style sheet.
-func AddRule(styleSheetID StyleSheetID, ruleText string, location *SourceRange) *AddRuleParams {
- return &AddRuleParams{
- StyleSheetID: styleSheetID,
- RuleText: ruleText,
- Location: location,
- }
-}
-
-// AddRuleReturns return values.
-type AddRuleReturns struct {
- Rule *Rule `json:"rule,omitempty"` // The newly created rule.
-}
-
-// Do executes CSS.addRule against the provided context.
-//
-// returns:
-// rule - The newly created rule.
-func (p *AddRuleParams) Do(ctx context.Context) (rule *Rule, err error) {
- // execute
- var res AddRuleReturns
- err = cdp.Execute(ctx, CommandAddRule, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Rule, nil
-}
-
-// CollectClassNamesParams returns all class names from specified stylesheet.
-type CollectClassNamesParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
-}
-
-// CollectClassNames returns all class names from specified stylesheet.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-collectClassNames
-//
-// parameters:
-// styleSheetID
-func CollectClassNames(styleSheetID StyleSheetID) *CollectClassNamesParams {
- return &CollectClassNamesParams{
- StyleSheetID: styleSheetID,
- }
-}
-
-// CollectClassNamesReturns return values.
-type CollectClassNamesReturns struct {
- ClassNames []string `json:"classNames,omitempty"` // Class name list.
-}
-
-// Do executes CSS.collectClassNames against the provided context.
-//
-// returns:
-// classNames - Class name list.
-func (p *CollectClassNamesParams) Do(ctx context.Context) (classNames []string, err error) {
- // execute
- var res CollectClassNamesReturns
- err = cdp.Execute(ctx, CommandCollectClassNames, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ClassNames, nil
-}
-
-// CreateStyleSheetParams creates a new special "via-inspector" stylesheet in
-// the frame with given frameId.
-type CreateStyleSheetParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame where "via-inspector" stylesheet should be created.
-}
-
-// CreateStyleSheet creates a new special "via-inspector" stylesheet in the
-// frame with given frameId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-createStyleSheet
-//
-// parameters:
-// frameID - Identifier of the frame where "via-inspector" stylesheet should be created.
-func CreateStyleSheet(frameID cdp.FrameID) *CreateStyleSheetParams {
- return &CreateStyleSheetParams{
- FrameID: frameID,
- }
-}
-
-// CreateStyleSheetReturns return values.
-type CreateStyleSheetReturns struct {
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the created "via-inspector" stylesheet.
-}
-
-// Do executes CSS.createStyleSheet against the provided context.
-//
-// returns:
-// styleSheetID - Identifier of the created "via-inspector" stylesheet.
-func (p *CreateStyleSheetParams) Do(ctx context.Context) (styleSheetID StyleSheetID, err error) {
- // execute
- var res CreateStyleSheetReturns
- err = cdp.Execute(ctx, CommandCreateStyleSheet, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.StyleSheetID, nil
-}
-
-// DisableParams disables the CSS agent for the given page.
-type DisableParams struct{}
-
-// Disable disables the CSS agent for the given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes CSS.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables the CSS agent for the given page. Clients should not
-// assume that the CSS agent has been enabled until the result of this command
-// is received.
-type EnableParams struct{}
-
-// Enable enables the CSS agent for the given page. Clients should not assume
-// that the CSS agent has been enabled until the result of this command is
-// received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes CSS.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// ForcePseudoStateParams ensures that the given node will have specified
-// pseudo-classes whenever its style is computed by the browser.
-type ForcePseudoStateParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // The element id for which to force the pseudo state.
- ForcedPseudoClasses []string `json:"forcedPseudoClasses"` // Element pseudo classes to force when computing the element's style.
-}
-
-// ForcePseudoState ensures that the given node will have specified
-// pseudo-classes whenever its style is computed by the browser.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forcePseudoState
-//
-// parameters:
-// nodeID - The element id for which to force the pseudo state.
-// forcedPseudoClasses - Element pseudo classes to force when computing the element's style.
-func ForcePseudoState(nodeID cdp.NodeID, forcedPseudoClasses []string) *ForcePseudoStateParams {
- return &ForcePseudoStateParams{
- NodeID: nodeID,
- ForcedPseudoClasses: forcedPseudoClasses,
- }
-}
-
-// Do executes CSS.forcePseudoState against the provided context.
-func (p *ForcePseudoStateParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandForcePseudoState, p, nil)
-}
-
-// GetBackgroundColorsParams [no description].
-type GetBackgroundColorsParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get background colors for.
-}
-
-// GetBackgroundColors [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getBackgroundColors
-//
-// parameters:
-// nodeID - Id of the node to get background colors for.
-func GetBackgroundColors(nodeID cdp.NodeID) *GetBackgroundColorsParams {
- return &GetBackgroundColorsParams{
- NodeID: nodeID,
- }
-}
-
-// GetBackgroundColorsReturns return values.
-type GetBackgroundColorsReturns struct {
- BackgroundColors []string `json:"backgroundColors,omitempty"` // The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
- ComputedFontSize string `json:"computedFontSize,omitempty"` // The computed font size for this node, as a CSS computed value string (e.g. '12px').
- ComputedFontWeight string `json:"computedFontWeight,omitempty"` // The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
-}
-
-// Do executes CSS.getBackgroundColors against the provided context.
-//
-// returns:
-// backgroundColors - The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
-// computedFontSize - The computed font size for this node, as a CSS computed value string (e.g. '12px').
-// computedFontWeight - The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
-func (p *GetBackgroundColorsParams) Do(ctx context.Context) (backgroundColors []string, computedFontSize string, computedFontWeight string, err error) {
- // execute
- var res GetBackgroundColorsReturns
- err = cdp.Execute(ctx, CommandGetBackgroundColors, p, &res)
- if err != nil {
- return nil, "", "", err
- }
-
- return res.BackgroundColors, res.ComputedFontSize, res.ComputedFontWeight, nil
-}
-
-// GetComputedStyleForNodeParams returns the computed style for a DOM node
-// identified by nodeId.
-type GetComputedStyleForNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"`
-}
-
-// GetComputedStyleForNode returns the computed style for a DOM node
-// identified by nodeId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getComputedStyleForNode
-//
-// parameters:
-// nodeID
-func GetComputedStyleForNode(nodeID cdp.NodeID) *GetComputedStyleForNodeParams {
- return &GetComputedStyleForNodeParams{
- NodeID: nodeID,
- }
-}
-
-// GetComputedStyleForNodeReturns return values.
-type GetComputedStyleForNodeReturns struct {
- ComputedStyle []*ComputedStyleProperty `json:"computedStyle,omitempty"` // Computed style for the specified DOM node.
-}
-
-// Do executes CSS.getComputedStyleForNode against the provided context.
-//
-// returns:
-// computedStyle - Computed style for the specified DOM node.
-func (p *GetComputedStyleForNodeParams) Do(ctx context.Context) (computedStyle []*ComputedStyleProperty, err error) {
- // execute
- var res GetComputedStyleForNodeReturns
- err = cdp.Execute(ctx, CommandGetComputedStyleForNode, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ComputedStyle, nil
-}
-
-// GetInlineStylesForNodeParams returns the styles defined inline (explicitly
-// in the "style" attribute and implicitly, using DOM attributes) for a DOM node
-// identified by nodeId.
-type GetInlineStylesForNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"`
-}
-
-// GetInlineStylesForNode returns the styles defined inline (explicitly in
-// the "style" attribute and implicitly, using DOM attributes) for a DOM node
-// identified by nodeId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getInlineStylesForNode
-//
-// parameters:
-// nodeID
-func GetInlineStylesForNode(nodeID cdp.NodeID) *GetInlineStylesForNodeParams {
- return &GetInlineStylesForNodeParams{
- NodeID: nodeID,
- }
-}
-
-// GetInlineStylesForNodeReturns return values.
-type GetInlineStylesForNodeReturns struct {
- InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
- AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
-}
-
-// Do executes CSS.getInlineStylesForNode against the provided context.
-//
-// returns:
-// inlineStyle - Inline style for the specified DOM node.
-// attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").
-func (p *GetInlineStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, err error) {
- // execute
- var res GetInlineStylesForNodeReturns
- err = cdp.Execute(ctx, CommandGetInlineStylesForNode, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.InlineStyle, res.AttributesStyle, nil
-}
-
-// GetMatchedStylesForNodeParams returns requested styles for a DOM node
-// identified by nodeId.
-type GetMatchedStylesForNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"`
-}
-
-// GetMatchedStylesForNode returns requested styles for a DOM node identified
-// by nodeId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMatchedStylesForNode
-//
-// parameters:
-// nodeID
-func GetMatchedStylesForNode(nodeID cdp.NodeID) *GetMatchedStylesForNodeParams {
- return &GetMatchedStylesForNodeParams{
- NodeID: nodeID,
- }
-}
-
-// GetMatchedStylesForNodeReturns return values.
-type GetMatchedStylesForNodeReturns struct {
- InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
- AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
- MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // CSS rules matching this node, from all applicable stylesheets.
- PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty"` // Pseudo style matches for this node.
- Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
- CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
-}
-
-// Do executes CSS.getMatchedStylesForNode against the provided context.
-//
-// returns:
-// inlineStyle - Inline style for the specified DOM node.
-// attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").
-// matchedCSSRules - CSS rules matching this node, from all applicable stylesheets.
-// pseudoElements - Pseudo style matches for this node.
-// inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root).
-// cssKeyframesRules - A list of CSS keyframed animations matching this node.
-func (p *GetMatchedStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, cssKeyframesRules []*KeyframesRule, err error) {
- // execute
- var res GetMatchedStylesForNodeReturns
- err = cdp.Execute(ctx, CommandGetMatchedStylesForNode, p, &res)
- if err != nil {
- return nil, nil, nil, nil, nil, nil, err
- }
-
- return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.CSSKeyframesRules, nil
-}
-
-// GetMediaQueriesParams returns all media queries parsed by the rendering
-// engine.
-type GetMediaQueriesParams struct{}
-
-// GetMediaQueries returns all media queries parsed by the rendering engine.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMediaQueries
-func GetMediaQueries() *GetMediaQueriesParams {
- return &GetMediaQueriesParams{}
-}
-
-// GetMediaQueriesReturns return values.
-type GetMediaQueriesReturns struct {
- Medias []*Media `json:"medias,omitempty"`
-}
-
-// Do executes CSS.getMediaQueries against the provided context.
-//
-// returns:
-// medias
-func (p *GetMediaQueriesParams) Do(ctx context.Context) (medias []*Media, err error) {
- // execute
- var res GetMediaQueriesReturns
- err = cdp.Execute(ctx, CommandGetMediaQueries, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Medias, nil
-}
-
-// GetPlatformFontsForNodeParams requests information about platform fonts
-// which we used to render child TextNodes in the given node.
-type GetPlatformFontsForNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"`
-}
-
-// GetPlatformFontsForNode requests information about platform fonts which we
-// used to render child TextNodes in the given node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getPlatformFontsForNode
-//
-// parameters:
-// nodeID
-func GetPlatformFontsForNode(nodeID cdp.NodeID) *GetPlatformFontsForNodeParams {
- return &GetPlatformFontsForNodeParams{
- NodeID: nodeID,
- }
-}
-
-// GetPlatformFontsForNodeReturns return values.
-type GetPlatformFontsForNodeReturns struct {
- Fonts []*PlatformFontUsage `json:"fonts,omitempty"` // Usage statistics for every employed platform font.
-}
-
-// Do executes CSS.getPlatformFontsForNode against the provided context.
-//
-// returns:
-// fonts - Usage statistics for every employed platform font.
-func (p *GetPlatformFontsForNodeParams) Do(ctx context.Context) (fonts []*PlatformFontUsage, err error) {
- // execute
- var res GetPlatformFontsForNodeReturns
- err = cdp.Execute(ctx, CommandGetPlatformFontsForNode, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Fonts, nil
-}
-
-// GetStyleSheetTextParams returns the current textual content for a
-// stylesheet.
-type GetStyleSheetTextParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
-}
-
-// GetStyleSheetText returns the current textual content for a stylesheet.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getStyleSheetText
-//
-// parameters:
-// styleSheetID
-func GetStyleSheetText(styleSheetID StyleSheetID) *GetStyleSheetTextParams {
- return &GetStyleSheetTextParams{
- StyleSheetID: styleSheetID,
- }
-}
-
-// GetStyleSheetTextReturns return values.
-type GetStyleSheetTextReturns struct {
- Text string `json:"text,omitempty"` // The stylesheet text.
-}
-
-// Do executes CSS.getStyleSheetText against the provided context.
-//
-// returns:
-// text - The stylesheet text.
-func (p *GetStyleSheetTextParams) Do(ctx context.Context) (text string, err error) {
- // execute
- var res GetStyleSheetTextReturns
- err = cdp.Execute(ctx, CommandGetStyleSheetText, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Text, nil
-}
-
-// TrackComputedStyleUpdatesParams starts tracking the given computed styles
-// for updates. The specified array of properties replaces the one previously
-// specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates
-// to retrieve the list of nodes that had properties modified. The changes to
-// computed style properties are only tracked for nodes pushed to the front-end
-// by the DOM agent. If no changes to the tracked properties occur after the
-// node has been pushed to the front-end, no updates will be issued for the
-// node.
-type TrackComputedStyleUpdatesParams struct {
- PropertiesToTrack []*ComputedStyleProperty `json:"propertiesToTrack"`
-}
-
-// TrackComputedStyleUpdates starts tracking the given computed styles for
-// updates. The specified array of properties replaces the one previously
-// specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates
-// to retrieve the list of nodes that had properties modified. The changes to
-// computed style properties are only tracked for nodes pushed to the front-end
-// by the DOM agent. If no changes to the tracked properties occur after the
-// node has been pushed to the front-end, no updates will be issued for the
-// node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-trackComputedStyleUpdates
-//
-// parameters:
-// propertiesToTrack
-func TrackComputedStyleUpdates(propertiesToTrack []*ComputedStyleProperty) *TrackComputedStyleUpdatesParams {
- return &TrackComputedStyleUpdatesParams{
- PropertiesToTrack: propertiesToTrack,
- }
-}
-
-// Do executes CSS.trackComputedStyleUpdates against the provided context.
-func (p *TrackComputedStyleUpdatesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandTrackComputedStyleUpdates, p, nil)
-}
-
-// TakeComputedStyleUpdatesParams polls the next batch of computed style
-// updates.
-type TakeComputedStyleUpdatesParams struct{}
-
-// TakeComputedStyleUpdates polls the next batch of computed style updates.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-takeComputedStyleUpdates
-func TakeComputedStyleUpdates() *TakeComputedStyleUpdatesParams {
- return &TakeComputedStyleUpdatesParams{}
-}
-
-// TakeComputedStyleUpdatesReturns return values.
-type TakeComputedStyleUpdatesReturns struct {
- NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated
-}
-
-// Do executes CSS.takeComputedStyleUpdates against the provided context.
-//
-// returns:
-// nodeIds - The list of node Ids that have their tracked computed styles updated
-func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
- // execute
- var res TakeComputedStyleUpdatesReturns
- err = cdp.Execute(ctx, CommandTakeComputedStyleUpdates, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.NodeIds, nil
-}
-
-// SetEffectivePropertyValueForNodeParams find a rule with the given active
-// property for the given node and set the new value for this property.
-type SetEffectivePropertyValueForNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // The element id for which to set property.
- PropertyName string `json:"propertyName"`
- Value string `json:"value"`
-}
-
-// SetEffectivePropertyValueForNode find a rule with the given active
-// property for the given node and set the new value for this property.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setEffectivePropertyValueForNode
-//
-// parameters:
-// nodeID - The element id for which to set property.
-// propertyName
-// value
-func SetEffectivePropertyValueForNode(nodeID cdp.NodeID, propertyName string, value string) *SetEffectivePropertyValueForNodeParams {
- return &SetEffectivePropertyValueForNodeParams{
- NodeID: nodeID,
- PropertyName: propertyName,
- Value: value,
- }
-}
-
-// Do executes CSS.setEffectivePropertyValueForNode against the provided context.
-func (p *SetEffectivePropertyValueForNodeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetEffectivePropertyValueForNode, p, nil)
-}
-
-// SetKeyframeKeyParams modifies the keyframe rule key text.
-type SetKeyframeKeyParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
- Range *SourceRange `json:"range"`
- KeyText string `json:"keyText"`
-}
-
-// SetKeyframeKey modifies the keyframe rule key text.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setKeyframeKey
-//
-// parameters:
-// styleSheetID
-// range
-// keyText
-func SetKeyframeKey(styleSheetID StyleSheetID, rangeVal *SourceRange, keyText string) *SetKeyframeKeyParams {
- return &SetKeyframeKeyParams{
- StyleSheetID: styleSheetID,
- Range: rangeVal,
- KeyText: keyText,
- }
-}
-
-// SetKeyframeKeyReturns return values.
-type SetKeyframeKeyReturns struct {
- KeyText *Value `json:"keyText,omitempty"` // The resulting key text after modification.
-}
-
-// Do executes CSS.setKeyframeKey against the provided context.
-//
-// returns:
-// keyText - The resulting key text after modification.
-func (p *SetKeyframeKeyParams) Do(ctx context.Context) (keyText *Value, err error) {
- // execute
- var res SetKeyframeKeyReturns
- err = cdp.Execute(ctx, CommandSetKeyframeKey, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.KeyText, nil
-}
-
-// SetMediaTextParams modifies the rule selector.
-type SetMediaTextParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
- Range *SourceRange `json:"range"`
- Text string `json:"text"`
-}
-
-// SetMediaText modifies the rule selector.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setMediaText
-//
-// parameters:
-// styleSheetID
-// range
-// text
-func SetMediaText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetMediaTextParams {
- return &SetMediaTextParams{
- StyleSheetID: styleSheetID,
- Range: rangeVal,
- Text: text,
- }
-}
-
-// SetMediaTextReturns return values.
-type SetMediaTextReturns struct {
- Media *Media `json:"media,omitempty"` // The resulting CSS media rule after modification.
-}
-
-// Do executes CSS.setMediaText against the provided context.
-//
-// returns:
-// media - The resulting CSS media rule after modification.
-func (p *SetMediaTextParams) Do(ctx context.Context) (media *Media, err error) {
- // execute
- var res SetMediaTextReturns
- err = cdp.Execute(ctx, CommandSetMediaText, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Media, nil
-}
-
-// SetContainerQueryTextParams modifies the expression of a container query.
-type SetContainerQueryTextParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
- Range *SourceRange `json:"range"`
- Text string `json:"text"`
-}
-
-// SetContainerQueryText modifies the expression of a container query.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setContainerQueryText
-//
-// parameters:
-// styleSheetID
-// range
-// text
-func SetContainerQueryText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetContainerQueryTextParams {
- return &SetContainerQueryTextParams{
- StyleSheetID: styleSheetID,
- Range: rangeVal,
- Text: text,
- }
-}
-
-// SetContainerQueryTextReturns return values.
-type SetContainerQueryTextReturns struct {
- ContainerQuery *ContainerQuery `json:"containerQuery,omitempty"` // The resulting CSS container query rule after modification.
-}
-
-// Do executes CSS.setContainerQueryText against the provided context.
-//
-// returns:
-// containerQuery - The resulting CSS container query rule after modification.
-func (p *SetContainerQueryTextParams) Do(ctx context.Context) (containerQuery *ContainerQuery, err error) {
- // execute
- var res SetContainerQueryTextReturns
- err = cdp.Execute(ctx, CommandSetContainerQueryText, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ContainerQuery, nil
-}
-
-// SetRuleSelectorParams modifies the rule selector.
-type SetRuleSelectorParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
- Range *SourceRange `json:"range"`
- Selector string `json:"selector"`
-}
-
-// SetRuleSelector modifies the rule selector.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setRuleSelector
-//
-// parameters:
-// styleSheetID
-// range
-// selector
-func SetRuleSelector(styleSheetID StyleSheetID, rangeVal *SourceRange, selector string) *SetRuleSelectorParams {
- return &SetRuleSelectorParams{
- StyleSheetID: styleSheetID,
- Range: rangeVal,
- Selector: selector,
- }
-}
-
-// SetRuleSelectorReturns return values.
-type SetRuleSelectorReturns struct {
- SelectorList *SelectorList `json:"selectorList,omitempty"` // The resulting selector list after modification.
-}
-
-// Do executes CSS.setRuleSelector against the provided context.
-//
-// returns:
-// selectorList - The resulting selector list after modification.
-func (p *SetRuleSelectorParams) Do(ctx context.Context) (selectorList *SelectorList, err error) {
- // execute
- var res SetRuleSelectorReturns
- err = cdp.Execute(ctx, CommandSetRuleSelector, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.SelectorList, nil
-}
-
-// SetStyleSheetTextParams sets the new stylesheet text.
-type SetStyleSheetTextParams struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
- Text string `json:"text"`
-}
-
-// SetStyleSheetText sets the new stylesheet text.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleSheetText
-//
-// parameters:
-// styleSheetID
-// text
-func SetStyleSheetText(styleSheetID StyleSheetID, text string) *SetStyleSheetTextParams {
- return &SetStyleSheetTextParams{
- StyleSheetID: styleSheetID,
- Text: text,
- }
-}
-
-// SetStyleSheetTextReturns return values.
-type SetStyleSheetTextReturns struct {
- SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
-}
-
-// Do executes CSS.setStyleSheetText against the provided context.
-//
-// returns:
-// sourceMapURL - URL of source map associated with script (if any).
-func (p *SetStyleSheetTextParams) Do(ctx context.Context) (sourceMapURL string, err error) {
- // execute
- var res SetStyleSheetTextReturns
- err = cdp.Execute(ctx, CommandSetStyleSheetText, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.SourceMapURL, nil
-}
-
-// SetStyleTextsParams applies specified style edits one after another in the
-// given order.
-type SetStyleTextsParams struct {
- Edits []*StyleDeclarationEdit `json:"edits"`
-}
-
-// SetStyleTexts applies specified style edits one after another in the given
-// order.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleTexts
-//
-// parameters:
-// edits
-func SetStyleTexts(edits []*StyleDeclarationEdit) *SetStyleTextsParams {
- return &SetStyleTextsParams{
- Edits: edits,
- }
-}
-
-// SetStyleTextsReturns return values.
-type SetStyleTextsReturns struct {
- Styles []*Style `json:"styles,omitempty"` // The resulting styles after modification.
-}
-
-// Do executes CSS.setStyleTexts against the provided context.
-//
-// returns:
-// styles - The resulting styles after modification.
-func (p *SetStyleTextsParams) Do(ctx context.Context) (styles []*Style, err error) {
- // execute
- var res SetStyleTextsReturns
- err = cdp.Execute(ctx, CommandSetStyleTexts, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Styles, nil
-}
-
-// StartRuleUsageTrackingParams enables the selector recording.
-type StartRuleUsageTrackingParams struct{}
-
-// StartRuleUsageTracking enables the selector recording.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-startRuleUsageTracking
-func StartRuleUsageTracking() *StartRuleUsageTrackingParams {
- return &StartRuleUsageTrackingParams{}
-}
-
-// Do executes CSS.startRuleUsageTracking against the provided context.
-func (p *StartRuleUsageTrackingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartRuleUsageTracking, nil, nil)
-}
-
-// StopRuleUsageTrackingParams stop tracking rule usage and return the list
-// of rules that were used since last call to takeCoverageDelta (or since start
-// of coverage instrumentation).
-type StopRuleUsageTrackingParams struct{}
-
-// StopRuleUsageTracking stop tracking rule usage and return the list of
-// rules that were used since last call to takeCoverageDelta (or since start of
-// coverage instrumentation).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-stopRuleUsageTracking
-func StopRuleUsageTracking() *StopRuleUsageTrackingParams {
- return &StopRuleUsageTrackingParams{}
-}
-
-// StopRuleUsageTrackingReturns return values.
-type StopRuleUsageTrackingReturns struct {
- RuleUsage []*RuleUsage `json:"ruleUsage,omitempty"`
-}
-
-// Do executes CSS.stopRuleUsageTracking against the provided context.
-//
-// returns:
-// ruleUsage
-func (p *StopRuleUsageTrackingParams) Do(ctx context.Context) (ruleUsage []*RuleUsage, err error) {
- // execute
- var res StopRuleUsageTrackingReturns
- err = cdp.Execute(ctx, CommandStopRuleUsageTracking, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.RuleUsage, nil
-}
-
-// TakeCoverageDeltaParams obtain list of rules that became used since last
-// call to this method (or since start of coverage instrumentation).
-type TakeCoverageDeltaParams struct{}
-
-// TakeCoverageDelta obtain list of rules that became used since last call to
-// this method (or since start of coverage instrumentation).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-takeCoverageDelta
-func TakeCoverageDelta() *TakeCoverageDeltaParams {
- return &TakeCoverageDeltaParams{}
-}
-
-// TakeCoverageDeltaReturns return values.
-type TakeCoverageDeltaReturns struct {
- Coverage []*RuleUsage `json:"coverage,omitempty"`
- Timestamp float64 `json:"timestamp,omitempty"` // Monotonically increasing time, in seconds.
-}
-
-// Do executes CSS.takeCoverageDelta against the provided context.
-//
-// returns:
-// coverage
-// timestamp - Monotonically increasing time, in seconds.
-func (p *TakeCoverageDeltaParams) Do(ctx context.Context) (coverage []*RuleUsage, timestamp float64, err error) {
- // execute
- var res TakeCoverageDeltaReturns
- err = cdp.Execute(ctx, CommandTakeCoverageDelta, nil, &res)
- if err != nil {
- return nil, 0, err
- }
-
- return res.Coverage, res.Timestamp, nil
-}
-
-// SetLocalFontsEnabledParams enables/disables rendering of local CSS fonts
-// (enabled by default).
-type SetLocalFontsEnabledParams struct {
- Enabled bool `json:"enabled"` // Whether rendering of local fonts is enabled.
-}
-
-// SetLocalFontsEnabled enables/disables rendering of local CSS fonts
-// (enabled by default).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setLocalFontsEnabled
-//
-// parameters:
-// enabled - Whether rendering of local fonts is enabled.
-func SetLocalFontsEnabled(enabled bool) *SetLocalFontsEnabledParams {
- return &SetLocalFontsEnabledParams{
- Enabled: enabled,
- }
-}
-
-// Do executes CSS.setLocalFontsEnabled against the provided context.
-func (p *SetLocalFontsEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetLocalFontsEnabled, p, nil)
-}
-
-// Command names.
-const (
- CommandAddRule = "CSS.addRule"
- CommandCollectClassNames = "CSS.collectClassNames"
- CommandCreateStyleSheet = "CSS.createStyleSheet"
- CommandDisable = "CSS.disable"
- CommandEnable = "CSS.enable"
- CommandForcePseudoState = "CSS.forcePseudoState"
- CommandGetBackgroundColors = "CSS.getBackgroundColors"
- CommandGetComputedStyleForNode = "CSS.getComputedStyleForNode"
- CommandGetInlineStylesForNode = "CSS.getInlineStylesForNode"
- CommandGetMatchedStylesForNode = "CSS.getMatchedStylesForNode"
- CommandGetMediaQueries = "CSS.getMediaQueries"
- CommandGetPlatformFontsForNode = "CSS.getPlatformFontsForNode"
- CommandGetStyleSheetText = "CSS.getStyleSheetText"
- CommandTrackComputedStyleUpdates = "CSS.trackComputedStyleUpdates"
- CommandTakeComputedStyleUpdates = "CSS.takeComputedStyleUpdates"
- CommandSetEffectivePropertyValueForNode = "CSS.setEffectivePropertyValueForNode"
- CommandSetKeyframeKey = "CSS.setKeyframeKey"
- CommandSetMediaText = "CSS.setMediaText"
- CommandSetContainerQueryText = "CSS.setContainerQueryText"
- CommandSetRuleSelector = "CSS.setRuleSelector"
- CommandSetStyleSheetText = "CSS.setStyleSheetText"
- CommandSetStyleTexts = "CSS.setStyleTexts"
- CommandStartRuleUsageTracking = "CSS.startRuleUsageTracking"
- CommandStopRuleUsageTracking = "CSS.stopRuleUsageTracking"
- CommandTakeCoverageDelta = "CSS.takeCoverageDelta"
- CommandSetLocalFontsEnabled = "CSS.setLocalFontsEnabled"
-)
diff --git a/vendor/github.com/chromedp/cdproto/css/easyjson.go b/vendor/github.com/chromedp/cdproto/css/easyjson.go
deleted file mode 100644
index ce918928585..00000000000
--- a/vendor/github.com/chromedp/cdproto/css/easyjson.go
+++ /dev/null
@@ -1,7008 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package css
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss(in *jlexer.Lexer, out *Value) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "text":
- out.Text = string(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss(out *jwriter.Writer, in Value) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix[1:])
- out.String(string(in.Text))
- }
- if in.Range != nil {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- (*in.Range).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Value) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Value) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Value) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Value) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss1(in *jlexer.Lexer, out *TrackComputedStyleUpdatesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "propertiesToTrack":
- if in.IsNull() {
- in.Skip()
- out.PropertiesToTrack = nil
- } else {
- in.Delim('[')
- if out.PropertiesToTrack == nil {
- if !in.IsDelim(']') {
- out.PropertiesToTrack = make([]*ComputedStyleProperty, 0, 8)
- } else {
- out.PropertiesToTrack = []*ComputedStyleProperty{}
- }
- } else {
- out.PropertiesToTrack = (out.PropertiesToTrack)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *ComputedStyleProperty
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(ComputedStyleProperty)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.PropertiesToTrack = append(out.PropertiesToTrack, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss1(out *jwriter.Writer, in TrackComputedStyleUpdatesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"propertiesToTrack\":"
- out.RawString(prefix[1:])
- if in.PropertiesToTrack == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.PropertiesToTrack {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrackComputedStyleUpdatesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrackComputedStyleUpdatesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrackComputedStyleUpdatesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrackComputedStyleUpdatesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss2(in *jlexer.Lexer, out *TakeCoverageDeltaReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "coverage":
- if in.IsNull() {
- in.Skip()
- out.Coverage = nil
- } else {
- in.Delim('[')
- if out.Coverage == nil {
- if !in.IsDelim(']') {
- out.Coverage = make([]*RuleUsage, 0, 8)
- } else {
- out.Coverage = []*RuleUsage{}
- }
- } else {
- out.Coverage = (out.Coverage)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *RuleUsage
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(RuleUsage)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Coverage = append(out.Coverage, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "timestamp":
- out.Timestamp = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss2(out *jwriter.Writer, in TakeCoverageDeltaReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Coverage) != 0 {
- const prefix string = ",\"coverage\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.Coverage {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Timestamp != 0 {
- const prefix string = ",\"timestamp\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Timestamp))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeCoverageDeltaReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeCoverageDeltaReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeCoverageDeltaReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeCoverageDeltaReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss3(in *jlexer.Lexer, out *TakeCoverageDeltaParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss3(out *jwriter.Writer, in TakeCoverageDeltaParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeCoverageDeltaParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeCoverageDeltaParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeCoverageDeltaParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeCoverageDeltaParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss4(in *jlexer.Lexer, out *TakeComputedStyleUpdatesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v7 cdp.NodeID
- (v7).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss4(out *jwriter.Writer, in TakeComputedStyleUpdatesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.NodeIds) != 0 {
- const prefix string = ",\"nodeIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.NodeIds {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeComputedStyleUpdatesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeComputedStyleUpdatesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeComputedStyleUpdatesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeComputedStyleUpdatesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss5(in *jlexer.Lexer, out *TakeComputedStyleUpdatesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss5(out *jwriter.Writer, in TakeComputedStyleUpdatesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeComputedStyleUpdatesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeComputedStyleUpdatesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeComputedStyleUpdatesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeComputedStyleUpdatesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss6(in *jlexer.Lexer, out *StyleSheetHeader) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "sourceURL":
- out.SourceURL = string(in.String())
- case "sourceMapURL":
- out.SourceMapURL = string(in.String())
- case "origin":
- (out.Origin).UnmarshalEasyJSON(in)
- case "title":
- out.Title = string(in.String())
- case "ownerNode":
- (out.OwnerNode).UnmarshalEasyJSON(in)
- case "disabled":
- out.Disabled = bool(in.Bool())
- case "hasSourceURL":
- out.HasSourceURL = bool(in.Bool())
- case "isInline":
- out.IsInline = bool(in.Bool())
- case "isMutable":
- out.IsMutable = bool(in.Bool())
- case "isConstructed":
- out.IsConstructed = bool(in.Bool())
- case "startLine":
- out.StartLine = float64(in.Float64())
- case "startColumn":
- out.StartColumn = float64(in.Float64())
- case "length":
- out.Length = float64(in.Float64())
- case "endLine":
- out.EndLine = float64(in.Float64())
- case "endColumn":
- out.EndColumn = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss6(out *jwriter.Writer, in StyleSheetHeader) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"sourceURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceURL))
- }
- if in.SourceMapURL != "" {
- const prefix string = ",\"sourceMapURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceMapURL))
- }
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- (in.Origin).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- if in.OwnerNode != 0 {
- const prefix string = ",\"ownerNode\":"
- out.RawString(prefix)
- out.Int64(int64(in.OwnerNode))
- }
- {
- const prefix string = ",\"disabled\":"
- out.RawString(prefix)
- out.Bool(bool(in.Disabled))
- }
- if in.HasSourceURL {
- const prefix string = ",\"hasSourceURL\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasSourceURL))
- }
- {
- const prefix string = ",\"isInline\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsInline))
- }
- {
- const prefix string = ",\"isMutable\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsMutable))
- }
- {
- const prefix string = ",\"isConstructed\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsConstructed))
- }
- {
- const prefix string = ",\"startLine\":"
- out.RawString(prefix)
- out.Float64(float64(in.StartLine))
- }
- {
- const prefix string = ",\"startColumn\":"
- out.RawString(prefix)
- out.Float64(float64(in.StartColumn))
- }
- {
- const prefix string = ",\"length\":"
- out.RawString(prefix)
- out.Float64(float64(in.Length))
- }
- {
- const prefix string = ",\"endLine\":"
- out.RawString(prefix)
- out.Float64(float64(in.EndLine))
- }
- {
- const prefix string = ",\"endColumn\":"
- out.RawString(prefix)
- out.Float64(float64(in.EndColumn))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StyleSheetHeader) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StyleSheetHeader) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StyleSheetHeader) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StyleSheetHeader) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss7(in *jlexer.Lexer, out *StyleDeclarationEdit) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss7(out *jwriter.Writer, in StyleDeclarationEdit) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- if in.Range == nil {
- out.RawString("null")
- } else {
- (*in.Range).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StyleDeclarationEdit) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StyleDeclarationEdit) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StyleDeclarationEdit) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StyleDeclarationEdit) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss8(in *jlexer.Lexer, out *Style) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "cssProperties":
- if in.IsNull() {
- in.Skip()
- out.CSSProperties = nil
- } else {
- in.Delim('[')
- if out.CSSProperties == nil {
- if !in.IsDelim(']') {
- out.CSSProperties = make([]*Property, 0, 8)
- } else {
- out.CSSProperties = []*Property{}
- }
- } else {
- out.CSSProperties = (out.CSSProperties)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *Property
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(Property)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.CSSProperties = append(out.CSSProperties, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "shorthandEntries":
- if in.IsNull() {
- in.Skip()
- out.ShorthandEntries = nil
- } else {
- in.Delim('[')
- if out.ShorthandEntries == nil {
- if !in.IsDelim(']') {
- out.ShorthandEntries = make([]*ShorthandEntry, 0, 8)
- } else {
- out.ShorthandEntries = []*ShorthandEntry{}
- }
- } else {
- out.ShorthandEntries = (out.ShorthandEntries)[:0]
- }
- for !in.IsDelim(']') {
- var v11 *ShorthandEntry
- if in.IsNull() {
- in.Skip()
- v11 = nil
- } else {
- if v11 == nil {
- v11 = new(ShorthandEntry)
- }
- (*v11).UnmarshalEasyJSON(in)
- }
- out.ShorthandEntries = append(out.ShorthandEntries, v11)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cssText":
- out.CSSText = string(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss8(out *jwriter.Writer, in Style) {
- out.RawByte('{')
- first := true
- _ = first
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"cssProperties\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.CSSProperties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.CSSProperties {
- if v12 > 0 {
- out.RawByte(',')
- }
- if v13 == nil {
- out.RawString("null")
- } else {
- (*v13).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"shorthandEntries\":"
- out.RawString(prefix)
- if in.ShorthandEntries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.ShorthandEntries {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.CSSText != "" {
- const prefix string = ",\"cssText\":"
- out.RawString(prefix)
- out.String(string(in.CSSText))
- }
- if in.Range != nil {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- (*in.Range).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Style) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Style) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Style) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Style) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss9(in *jlexer.Lexer, out *StopRuleUsageTrackingReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "ruleUsage":
- if in.IsNull() {
- in.Skip()
- out.RuleUsage = nil
- } else {
- in.Delim('[')
- if out.RuleUsage == nil {
- if !in.IsDelim(']') {
- out.RuleUsage = make([]*RuleUsage, 0, 8)
- } else {
- out.RuleUsage = []*RuleUsage{}
- }
- } else {
- out.RuleUsage = (out.RuleUsage)[:0]
- }
- for !in.IsDelim(']') {
- var v16 *RuleUsage
- if in.IsNull() {
- in.Skip()
- v16 = nil
- } else {
- if v16 == nil {
- v16 = new(RuleUsage)
- }
- (*v16).UnmarshalEasyJSON(in)
- }
- out.RuleUsage = append(out.RuleUsage, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss9(out *jwriter.Writer, in StopRuleUsageTrackingReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.RuleUsage) != 0 {
- const prefix string = ",\"ruleUsage\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v17, v18 := range in.RuleUsage {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopRuleUsageTrackingReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopRuleUsageTrackingReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopRuleUsageTrackingReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopRuleUsageTrackingReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss10(in *jlexer.Lexer, out *StopRuleUsageTrackingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss10(out *jwriter.Writer, in StopRuleUsageTrackingParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopRuleUsageTrackingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopRuleUsageTrackingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopRuleUsageTrackingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopRuleUsageTrackingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss11(in *jlexer.Lexer, out *StartRuleUsageTrackingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss11(out *jwriter.Writer, in StartRuleUsageTrackingParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartRuleUsageTrackingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartRuleUsageTrackingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartRuleUsageTrackingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartRuleUsageTrackingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss12(in *jlexer.Lexer, out *SourceRange) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "startLine":
- out.StartLine = int64(in.Int64())
- case "startColumn":
- out.StartColumn = int64(in.Int64())
- case "endLine":
- out.EndLine = int64(in.Int64())
- case "endColumn":
- out.EndColumn = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss12(out *jwriter.Writer, in SourceRange) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"startLine\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.StartLine))
- }
- {
- const prefix string = ",\"startColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartColumn))
- }
- {
- const prefix string = ",\"endLine\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndLine))
- }
- {
- const prefix string = ",\"endColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndColumn))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SourceRange) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SourceRange) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SourceRange) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SourceRange) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss13(in *jlexer.Lexer, out *ShorthandEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "important":
- out.Important = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss13(out *jwriter.Writer, in ShorthandEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.Important {
- const prefix string = ",\"important\":"
- out.RawString(prefix)
- out.Bool(bool(in.Important))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ShorthandEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ShorthandEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ShorthandEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ShorthandEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss14(in *jlexer.Lexer, out *SetStyleTextsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styles":
- if in.IsNull() {
- in.Skip()
- out.Styles = nil
- } else {
- in.Delim('[')
- if out.Styles == nil {
- if !in.IsDelim(']') {
- out.Styles = make([]*Style, 0, 8)
- } else {
- out.Styles = []*Style{}
- }
- } else {
- out.Styles = (out.Styles)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *Style
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(Style)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Styles = append(out.Styles, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss14(out *jwriter.Writer, in SetStyleTextsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Styles) != 0 {
- const prefix string = ",\"styles\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v20, v21 := range in.Styles {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetStyleTextsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetStyleTextsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetStyleTextsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetStyleTextsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss15(in *jlexer.Lexer, out *SetStyleTextsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "edits":
- if in.IsNull() {
- in.Skip()
- out.Edits = nil
- } else {
- in.Delim('[')
- if out.Edits == nil {
- if !in.IsDelim(']') {
- out.Edits = make([]*StyleDeclarationEdit, 0, 8)
- } else {
- out.Edits = []*StyleDeclarationEdit{}
- }
- } else {
- out.Edits = (out.Edits)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *StyleDeclarationEdit
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(StyleDeclarationEdit)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.Edits = append(out.Edits, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss15(out *jwriter.Writer, in SetStyleTextsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"edits\":"
- out.RawString(prefix[1:])
- if in.Edits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v23, v24 := range in.Edits {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetStyleTextsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetStyleTextsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetStyleTextsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetStyleTextsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss16(in *jlexer.Lexer, out *SetStyleSheetTextReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sourceMapURL":
- out.SourceMapURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss16(out *jwriter.Writer, in SetStyleSheetTextReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SourceMapURL != "" {
- const prefix string = ",\"sourceMapURL\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SourceMapURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetStyleSheetTextReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetStyleSheetTextReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss17(in *jlexer.Lexer, out *SetStyleSheetTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss17(out *jwriter.Writer, in SetStyleSheetTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetStyleSheetTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetStyleSheetTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss18(in *jlexer.Lexer, out *SetRuleSelectorReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "selectorList":
- if in.IsNull() {
- in.Skip()
- out.SelectorList = nil
- } else {
- if out.SelectorList == nil {
- out.SelectorList = new(SelectorList)
- }
- (*out.SelectorList).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss18(out *jwriter.Writer, in SetRuleSelectorReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SelectorList != nil {
- const prefix string = ",\"selectorList\":"
- first = false
- out.RawString(prefix[1:])
- (*in.SelectorList).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetRuleSelectorReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetRuleSelectorReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetRuleSelectorReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetRuleSelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss19(in *jlexer.Lexer, out *SetRuleSelectorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "selector":
- out.Selector = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss19(out *jwriter.Writer, in SetRuleSelectorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- if in.Range == nil {
- out.RawString("null")
- } else {
- (*in.Range).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"selector\":"
- out.RawString(prefix)
- out.String(string(in.Selector))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetRuleSelectorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetRuleSelectorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetRuleSelectorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetRuleSelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss20(in *jlexer.Lexer, out *SetMediaTextReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "media":
- if in.IsNull() {
- in.Skip()
- out.Media = nil
- } else {
- if out.Media == nil {
- out.Media = new(Media)
- }
- (*out.Media).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss20(out *jwriter.Writer, in SetMediaTextReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Media != nil {
- const prefix string = ",\"media\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Media).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetMediaTextReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetMediaTextReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetMediaTextReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetMediaTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss21(in *jlexer.Lexer, out *SetMediaTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss21(out *jwriter.Writer, in SetMediaTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- if in.Range == nil {
- out.RawString("null")
- } else {
- (*in.Range).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetMediaTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetMediaTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetMediaTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetMediaTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss22(in *jlexer.Lexer, out *SetLocalFontsEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss22(out *jwriter.Writer, in SetLocalFontsEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetLocalFontsEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetLocalFontsEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetLocalFontsEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetLocalFontsEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss23(in *jlexer.Lexer, out *SetKeyframeKeyReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "keyText":
- if in.IsNull() {
- in.Skip()
- out.KeyText = nil
- } else {
- if out.KeyText == nil {
- out.KeyText = new(Value)
- }
- (*out.KeyText).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss23(out *jwriter.Writer, in SetKeyframeKeyReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.KeyText != nil {
- const prefix string = ",\"keyText\":"
- first = false
- out.RawString(prefix[1:])
- (*in.KeyText).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetKeyframeKeyReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetKeyframeKeyReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetKeyframeKeyReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetKeyframeKeyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss24(in *jlexer.Lexer, out *SetKeyframeKeyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "keyText":
- out.KeyText = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss24(out *jwriter.Writer, in SetKeyframeKeyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- if in.Range == nil {
- out.RawString("null")
- } else {
- (*in.Range).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"keyText\":"
- out.RawString(prefix)
- out.String(string(in.KeyText))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetKeyframeKeyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetKeyframeKeyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetKeyframeKeyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetKeyframeKeyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss25(in *jlexer.Lexer, out *SetEffectivePropertyValueForNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "propertyName":
- out.PropertyName = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss25(out *jwriter.Writer, in SetEffectivePropertyValueForNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"propertyName\":"
- out.RawString(prefix)
- out.String(string(in.PropertyName))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetEffectivePropertyValueForNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetEffectivePropertyValueForNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetEffectivePropertyValueForNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetEffectivePropertyValueForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss26(in *jlexer.Lexer, out *SetContainerQueryTextReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "containerQuery":
- if in.IsNull() {
- in.Skip()
- out.ContainerQuery = nil
- } else {
- if out.ContainerQuery == nil {
- out.ContainerQuery = new(ContainerQuery)
- }
- (*out.ContainerQuery).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss26(out *jwriter.Writer, in SetContainerQueryTextReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ContainerQuery != nil {
- const prefix string = ",\"containerQuery\":"
- first = false
- out.RawString(prefix[1:])
- (*in.ContainerQuery).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetContainerQueryTextReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetContainerQueryTextReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetContainerQueryTextReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetContainerQueryTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss27(in *jlexer.Lexer, out *SetContainerQueryTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss27(out *jwriter.Writer, in SetContainerQueryTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- if in.Range == nil {
- out.RawString("null")
- } else {
- (*in.Range).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetContainerQueryTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetContainerQueryTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetContainerQueryTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetContainerQueryTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss28(in *jlexer.Lexer, out *SelectorList) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "selectors":
- if in.IsNull() {
- in.Skip()
- out.Selectors = nil
- } else {
- in.Delim('[')
- if out.Selectors == nil {
- if !in.IsDelim(']') {
- out.Selectors = make([]*Value, 0, 8)
- } else {
- out.Selectors = []*Value{}
- }
- } else {
- out.Selectors = (out.Selectors)[:0]
- }
- for !in.IsDelim(']') {
- var v25 *Value
- if in.IsNull() {
- in.Skip()
- v25 = nil
- } else {
- if v25 == nil {
- v25 = new(Value)
- }
- (*v25).UnmarshalEasyJSON(in)
- }
- out.Selectors = append(out.Selectors, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss28(out *jwriter.Writer, in SelectorList) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"selectors\":"
- out.RawString(prefix[1:])
- if in.Selectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v26, v27 := range in.Selectors {
- if v26 > 0 {
- out.RawByte(',')
- }
- if v27 == nil {
- out.RawString("null")
- } else {
- (*v27).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SelectorList) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SelectorList) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SelectorList) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SelectorList) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss29(in *jlexer.Lexer, out *RuleUsage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "startOffset":
- out.StartOffset = float64(in.Float64())
- case "endOffset":
- out.EndOffset = float64(in.Float64())
- case "used":
- out.Used = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss29(out *jwriter.Writer, in RuleUsage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"startOffset\":"
- out.RawString(prefix)
- out.Float64(float64(in.StartOffset))
- }
- {
- const prefix string = ",\"endOffset\":"
- out.RawString(prefix)
- out.Float64(float64(in.EndOffset))
- }
- {
- const prefix string = ",\"used\":"
- out.RawString(prefix)
- out.Bool(bool(in.Used))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RuleUsage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RuleUsage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RuleUsage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RuleUsage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss30(in *jlexer.Lexer, out *RuleMatch) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rule":
- if in.IsNull() {
- in.Skip()
- out.Rule = nil
- } else {
- if out.Rule == nil {
- out.Rule = new(Rule)
- }
- (*out.Rule).UnmarshalEasyJSON(in)
- }
- case "matchingSelectors":
- if in.IsNull() {
- in.Skip()
- out.MatchingSelectors = nil
- } else {
- in.Delim('[')
- if out.MatchingSelectors == nil {
- if !in.IsDelim(']') {
- out.MatchingSelectors = make([]int64, 0, 8)
- } else {
- out.MatchingSelectors = []int64{}
- }
- } else {
- out.MatchingSelectors = (out.MatchingSelectors)[:0]
- }
- for !in.IsDelim(']') {
- var v28 int64
- v28 = int64(in.Int64())
- out.MatchingSelectors = append(out.MatchingSelectors, v28)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss30(out *jwriter.Writer, in RuleMatch) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"rule\":"
- out.RawString(prefix[1:])
- if in.Rule == nil {
- out.RawString("null")
- } else {
- (*in.Rule).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"matchingSelectors\":"
- out.RawString(prefix)
- if in.MatchingSelectors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v29, v30 := range in.MatchingSelectors {
- if v29 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v30))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RuleMatch) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RuleMatch) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RuleMatch) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RuleMatch) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss31(in *jlexer.Lexer, out *Rule) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "selectorList":
- if in.IsNull() {
- in.Skip()
- out.SelectorList = nil
- } else {
- if out.SelectorList == nil {
- out.SelectorList = new(SelectorList)
- }
- (*out.SelectorList).UnmarshalEasyJSON(in)
- }
- case "origin":
- (out.Origin).UnmarshalEasyJSON(in)
- case "style":
- if in.IsNull() {
- in.Skip()
- out.Style = nil
- } else {
- if out.Style == nil {
- out.Style = new(Style)
- }
- (*out.Style).UnmarshalEasyJSON(in)
- }
- case "media":
- if in.IsNull() {
- in.Skip()
- out.Media = nil
- } else {
- in.Delim('[')
- if out.Media == nil {
- if !in.IsDelim(']') {
- out.Media = make([]*Media, 0, 8)
- } else {
- out.Media = []*Media{}
- }
- } else {
- out.Media = (out.Media)[:0]
- }
- for !in.IsDelim(']') {
- var v31 *Media
- if in.IsNull() {
- in.Skip()
- v31 = nil
- } else {
- if v31 == nil {
- v31 = new(Media)
- }
- (*v31).UnmarshalEasyJSON(in)
- }
- out.Media = append(out.Media, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "containerQueries":
- if in.IsNull() {
- in.Skip()
- out.ContainerQueries = nil
- } else {
- in.Delim('[')
- if out.ContainerQueries == nil {
- if !in.IsDelim(']') {
- out.ContainerQueries = make([]*ContainerQuery, 0, 8)
- } else {
- out.ContainerQueries = []*ContainerQuery{}
- }
- } else {
- out.ContainerQueries = (out.ContainerQueries)[:0]
- }
- for !in.IsDelim(']') {
- var v32 *ContainerQuery
- if in.IsNull() {
- in.Skip()
- v32 = nil
- } else {
- if v32 == nil {
- v32 = new(ContainerQuery)
- }
- (*v32).UnmarshalEasyJSON(in)
- }
- out.ContainerQueries = append(out.ContainerQueries, v32)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss31(out *jwriter.Writer, in Rule) {
- out.RawByte('{')
- first := true
- _ = first
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"selectorList\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.SelectorList == nil {
- out.RawString("null")
- } else {
- (*in.SelectorList).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- (in.Origin).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"style\":"
- out.RawString(prefix)
- if in.Style == nil {
- out.RawString("null")
- } else {
- (*in.Style).MarshalEasyJSON(out)
- }
- }
- if len(in.Media) != 0 {
- const prefix string = ",\"media\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v33, v34 := range in.Media {
- if v33 > 0 {
- out.RawByte(',')
- }
- if v34 == nil {
- out.RawString("null")
- } else {
- (*v34).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ContainerQueries) != 0 {
- const prefix string = ",\"containerQueries\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v35, v36 := range in.ContainerQueries {
- if v35 > 0 {
- out.RawByte(',')
- }
- if v36 == nil {
- out.RawString("null")
- } else {
- (*v36).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Rule) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Rule) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Rule) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Rule) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss32(in *jlexer.Lexer, out *PseudoElementMatches) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "pseudoType":
- (out.PseudoType).UnmarshalEasyJSON(in)
- case "matches":
- if in.IsNull() {
- in.Skip()
- out.Matches = nil
- } else {
- in.Delim('[')
- if out.Matches == nil {
- if !in.IsDelim(']') {
- out.Matches = make([]*RuleMatch, 0, 8)
- } else {
- out.Matches = []*RuleMatch{}
- }
- } else {
- out.Matches = (out.Matches)[:0]
- }
- for !in.IsDelim(']') {
- var v37 *RuleMatch
- if in.IsNull() {
- in.Skip()
- v37 = nil
- } else {
- if v37 == nil {
- v37 = new(RuleMatch)
- }
- (*v37).UnmarshalEasyJSON(in)
- }
- out.Matches = append(out.Matches, v37)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss32(out *jwriter.Writer, in PseudoElementMatches) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"pseudoType\":"
- out.RawString(prefix[1:])
- (in.PseudoType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"matches\":"
- out.RawString(prefix)
- if in.Matches == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v38, v39 := range in.Matches {
- if v38 > 0 {
- out.RawByte(',')
- }
- if v39 == nil {
- out.RawString("null")
- } else {
- (*v39).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PseudoElementMatches) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PseudoElementMatches) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PseudoElementMatches) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PseudoElementMatches) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss33(in *jlexer.Lexer, out *Property) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "important":
- out.Important = bool(in.Bool())
- case "implicit":
- out.Implicit = bool(in.Bool())
- case "text":
- out.Text = string(in.String())
- case "parsedOk":
- out.ParsedOk = bool(in.Bool())
- case "disabled":
- out.Disabled = bool(in.Bool())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss33(out *jwriter.Writer, in Property) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.Important {
- const prefix string = ",\"important\":"
- out.RawString(prefix)
- out.Bool(bool(in.Important))
- }
- if in.Implicit {
- const prefix string = ",\"implicit\":"
- out.RawString(prefix)
- out.Bool(bool(in.Implicit))
- }
- if in.Text != "" {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- if in.ParsedOk {
- const prefix string = ",\"parsedOk\":"
- out.RawString(prefix)
- out.Bool(bool(in.ParsedOk))
- }
- if in.Disabled {
- const prefix string = ",\"disabled\":"
- out.RawString(prefix)
- out.Bool(bool(in.Disabled))
- }
- if in.Range != nil {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- (*in.Range).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Property) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Property) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Property) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Property) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss34(in *jlexer.Lexer, out *PlatformFontUsage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "familyName":
- out.FamilyName = string(in.String())
- case "isCustomFont":
- out.IsCustomFont = bool(in.Bool())
- case "glyphCount":
- out.GlyphCount = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss34(out *jwriter.Writer, in PlatformFontUsage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"familyName\":"
- out.RawString(prefix[1:])
- out.String(string(in.FamilyName))
- }
- {
- const prefix string = ",\"isCustomFont\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsCustomFont))
- }
- {
- const prefix string = ",\"glyphCount\":"
- out.RawString(prefix)
- out.Float64(float64(in.GlyphCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PlatformFontUsage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PlatformFontUsage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PlatformFontUsage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PlatformFontUsage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss35(in *jlexer.Lexer, out *MediaQueryExpression) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- out.Value = float64(in.Float64())
- case "unit":
- out.Unit = string(in.String())
- case "feature":
- out.Feature = string(in.String())
- case "valueRange":
- if in.IsNull() {
- in.Skip()
- out.ValueRange = nil
- } else {
- if out.ValueRange == nil {
- out.ValueRange = new(SourceRange)
- }
- (*out.ValueRange).UnmarshalEasyJSON(in)
- }
- case "computedLength":
- out.ComputedLength = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss35(out *jwriter.Writer, in MediaQueryExpression) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Value))
- }
- {
- const prefix string = ",\"unit\":"
- out.RawString(prefix)
- out.String(string(in.Unit))
- }
- {
- const prefix string = ",\"feature\":"
- out.RawString(prefix)
- out.String(string(in.Feature))
- }
- if in.ValueRange != nil {
- const prefix string = ",\"valueRange\":"
- out.RawString(prefix)
- (*in.ValueRange).MarshalEasyJSON(out)
- }
- if in.ComputedLength != 0 {
- const prefix string = ",\"computedLength\":"
- out.RawString(prefix)
- out.Float64(float64(in.ComputedLength))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MediaQueryExpression) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MediaQueryExpression) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MediaQueryExpression) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MediaQueryExpression) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss36(in *jlexer.Lexer, out *MediaQuery) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "expressions":
- if in.IsNull() {
- in.Skip()
- out.Expressions = nil
- } else {
- in.Delim('[')
- if out.Expressions == nil {
- if !in.IsDelim(']') {
- out.Expressions = make([]*MediaQueryExpression, 0, 8)
- } else {
- out.Expressions = []*MediaQueryExpression{}
- }
- } else {
- out.Expressions = (out.Expressions)[:0]
- }
- for !in.IsDelim(']') {
- var v40 *MediaQueryExpression
- if in.IsNull() {
- in.Skip()
- v40 = nil
- } else {
- if v40 == nil {
- v40 = new(MediaQueryExpression)
- }
- (*v40).UnmarshalEasyJSON(in)
- }
- out.Expressions = append(out.Expressions, v40)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "active":
- out.Active = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss36(out *jwriter.Writer, in MediaQuery) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"expressions\":"
- out.RawString(prefix[1:])
- if in.Expressions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v41, v42 := range in.Expressions {
- if v41 > 0 {
- out.RawByte(',')
- }
- if v42 == nil {
- out.RawString("null")
- } else {
- (*v42).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"active\":"
- out.RawString(prefix)
- out.Bool(bool(in.Active))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MediaQuery) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MediaQuery) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MediaQuery) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MediaQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss37(in *jlexer.Lexer, out *Media) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "text":
- out.Text = string(in.String())
- case "source":
- (out.Source).UnmarshalEasyJSON(in)
- case "sourceURL":
- out.SourceURL = string(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "mediaList":
- if in.IsNull() {
- in.Skip()
- out.MediaList = nil
- } else {
- in.Delim('[')
- if out.MediaList == nil {
- if !in.IsDelim(']') {
- out.MediaList = make([]*MediaQuery, 0, 8)
- } else {
- out.MediaList = []*MediaQuery{}
- }
- } else {
- out.MediaList = (out.MediaList)[:0]
- }
- for !in.IsDelim(']') {
- var v43 *MediaQuery
- if in.IsNull() {
- in.Skip()
- v43 = nil
- } else {
- if v43 == nil {
- v43 = new(MediaQuery)
- }
- (*v43).UnmarshalEasyJSON(in)
- }
- out.MediaList = append(out.MediaList, v43)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss37(out *jwriter.Writer, in Media) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix[1:])
- out.String(string(in.Text))
- }
- {
- const prefix string = ",\"source\":"
- out.RawString(prefix)
- (in.Source).MarshalEasyJSON(out)
- }
- if in.SourceURL != "" {
- const prefix string = ",\"sourceURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceURL))
- }
- if in.Range != nil {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- (*in.Range).MarshalEasyJSON(out)
- }
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix)
- out.String(string(in.StyleSheetID))
- }
- if len(in.MediaList) != 0 {
- const prefix string = ",\"mediaList\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v44, v45 := range in.MediaList {
- if v44 > 0 {
- out.RawByte(',')
- }
- if v45 == nil {
- out.RawString("null")
- } else {
- (*v45).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Media) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Media) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Media) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Media) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss38(in *jlexer.Lexer, out *KeyframesRule) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "animationName":
- if in.IsNull() {
- in.Skip()
- out.AnimationName = nil
- } else {
- if out.AnimationName == nil {
- out.AnimationName = new(Value)
- }
- (*out.AnimationName).UnmarshalEasyJSON(in)
- }
- case "keyframes":
- if in.IsNull() {
- in.Skip()
- out.Keyframes = nil
- } else {
- in.Delim('[')
- if out.Keyframes == nil {
- if !in.IsDelim(']') {
- out.Keyframes = make([]*KeyframeRule, 0, 8)
- } else {
- out.Keyframes = []*KeyframeRule{}
- }
- } else {
- out.Keyframes = (out.Keyframes)[:0]
- }
- for !in.IsDelim(']') {
- var v46 *KeyframeRule
- if in.IsNull() {
- in.Skip()
- v46 = nil
- } else {
- if v46 == nil {
- v46 = new(KeyframeRule)
- }
- (*v46).UnmarshalEasyJSON(in)
- }
- out.Keyframes = append(out.Keyframes, v46)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss38(out *jwriter.Writer, in KeyframesRule) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"animationName\":"
- out.RawString(prefix[1:])
- if in.AnimationName == nil {
- out.RawString("null")
- } else {
- (*in.AnimationName).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"keyframes\":"
- out.RawString(prefix)
- if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v47, v48 := range in.Keyframes {
- if v47 > 0 {
- out.RawByte(',')
- }
- if v48 == nil {
- out.RawString("null")
- } else {
- (*v48).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyframesRule) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyframesRule) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyframesRule) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyframesRule) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss39(in *jlexer.Lexer, out *KeyframeRule) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "origin":
- (out.Origin).UnmarshalEasyJSON(in)
- case "keyText":
- if in.IsNull() {
- in.Skip()
- out.KeyText = nil
- } else {
- if out.KeyText == nil {
- out.KeyText = new(Value)
- }
- (*out.KeyText).UnmarshalEasyJSON(in)
- }
- case "style":
- if in.IsNull() {
- in.Skip()
- out.Style = nil
- } else {
- if out.Style == nil {
- out.Style = new(Style)
- }
- (*out.Style).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss39(out *jwriter.Writer, in KeyframeRule) {
- out.RawByte('{')
- first := true
- _ = first
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"origin\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.Origin).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"keyText\":"
- out.RawString(prefix)
- if in.KeyText == nil {
- out.RawString("null")
- } else {
- (*in.KeyText).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"style\":"
- out.RawString(prefix)
- if in.Style == nil {
- out.RawString("null")
- } else {
- (*in.Style).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyframeRule) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyframeRule) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyframeRule) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyframeRule) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss40(in *jlexer.Lexer, out *InheritedStyleEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "inlineStyle":
- if in.IsNull() {
- in.Skip()
- out.InlineStyle = nil
- } else {
- if out.InlineStyle == nil {
- out.InlineStyle = new(Style)
- }
- (*out.InlineStyle).UnmarshalEasyJSON(in)
- }
- case "matchedCSSRules":
- if in.IsNull() {
- in.Skip()
- out.MatchedCSSRules = nil
- } else {
- in.Delim('[')
- if out.MatchedCSSRules == nil {
- if !in.IsDelim(']') {
- out.MatchedCSSRules = make([]*RuleMatch, 0, 8)
- } else {
- out.MatchedCSSRules = []*RuleMatch{}
- }
- } else {
- out.MatchedCSSRules = (out.MatchedCSSRules)[:0]
- }
- for !in.IsDelim(']') {
- var v49 *RuleMatch
- if in.IsNull() {
- in.Skip()
- v49 = nil
- } else {
- if v49 == nil {
- v49 = new(RuleMatch)
- }
- (*v49).UnmarshalEasyJSON(in)
- }
- out.MatchedCSSRules = append(out.MatchedCSSRules, v49)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss40(out *jwriter.Writer, in InheritedStyleEntry) {
- out.RawByte('{')
- first := true
- _ = first
- if in.InlineStyle != nil {
- const prefix string = ",\"inlineStyle\":"
- first = false
- out.RawString(prefix[1:])
- (*in.InlineStyle).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"matchedCSSRules\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.MatchedCSSRules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v50, v51 := range in.MatchedCSSRules {
- if v50 > 0 {
- out.RawByte(',')
- }
- if v51 == nil {
- out.RawString("null")
- } else {
- (*v51).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InheritedStyleEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InheritedStyleEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InheritedStyleEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InheritedStyleEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss41(in *jlexer.Lexer, out *GetStyleSheetTextReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss41(out *jwriter.Writer, in GetStyleSheetTextReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Text != "" {
- const prefix string = ",\"text\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetStyleSheetTextReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetStyleSheetTextReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetStyleSheetTextReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetStyleSheetTextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss42(in *jlexer.Lexer, out *GetStyleSheetTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss42(out *jwriter.Writer, in GetStyleSheetTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetStyleSheetTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetStyleSheetTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetStyleSheetTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetStyleSheetTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss43(in *jlexer.Lexer, out *GetPlatformFontsForNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "fonts":
- if in.IsNull() {
- in.Skip()
- out.Fonts = nil
- } else {
- in.Delim('[')
- if out.Fonts == nil {
- if !in.IsDelim(']') {
- out.Fonts = make([]*PlatformFontUsage, 0, 8)
- } else {
- out.Fonts = []*PlatformFontUsage{}
- }
- } else {
- out.Fonts = (out.Fonts)[:0]
- }
- for !in.IsDelim(']') {
- var v52 *PlatformFontUsage
- if in.IsNull() {
- in.Skip()
- v52 = nil
- } else {
- if v52 == nil {
- v52 = new(PlatformFontUsage)
- }
- (*v52).UnmarshalEasyJSON(in)
- }
- out.Fonts = append(out.Fonts, v52)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss43(out *jwriter.Writer, in GetPlatformFontsForNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Fonts) != 0 {
- const prefix string = ",\"fonts\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v53, v54 := range in.Fonts {
- if v53 > 0 {
- out.RawByte(',')
- }
- if v54 == nil {
- out.RawString("null")
- } else {
- (*v54).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPlatformFontsForNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPlatformFontsForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPlatformFontsForNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPlatformFontsForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss44(in *jlexer.Lexer, out *GetPlatformFontsForNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss44(out *jwriter.Writer, in GetPlatformFontsForNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPlatformFontsForNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPlatformFontsForNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPlatformFontsForNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPlatformFontsForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss45(in *jlexer.Lexer, out *GetMediaQueriesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "medias":
- if in.IsNull() {
- in.Skip()
- out.Medias = nil
- } else {
- in.Delim('[')
- if out.Medias == nil {
- if !in.IsDelim(']') {
- out.Medias = make([]*Media, 0, 8)
- } else {
- out.Medias = []*Media{}
- }
- } else {
- out.Medias = (out.Medias)[:0]
- }
- for !in.IsDelim(']') {
- var v55 *Media
- if in.IsNull() {
- in.Skip()
- v55 = nil
- } else {
- if v55 == nil {
- v55 = new(Media)
- }
- (*v55).UnmarshalEasyJSON(in)
- }
- out.Medias = append(out.Medias, v55)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss45(out *jwriter.Writer, in GetMediaQueriesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Medias) != 0 {
- const prefix string = ",\"medias\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v56, v57 := range in.Medias {
- if v56 > 0 {
- out.RawByte(',')
- }
- if v57 == nil {
- out.RawString("null")
- } else {
- (*v57).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMediaQueriesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMediaQueriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMediaQueriesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMediaQueriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss46(in *jlexer.Lexer, out *GetMediaQueriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss46(out *jwriter.Writer, in GetMediaQueriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMediaQueriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMediaQueriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMediaQueriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMediaQueriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss47(in *jlexer.Lexer, out *GetMatchedStylesForNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "inlineStyle":
- if in.IsNull() {
- in.Skip()
- out.InlineStyle = nil
- } else {
- if out.InlineStyle == nil {
- out.InlineStyle = new(Style)
- }
- (*out.InlineStyle).UnmarshalEasyJSON(in)
- }
- case "attributesStyle":
- if in.IsNull() {
- in.Skip()
- out.AttributesStyle = nil
- } else {
- if out.AttributesStyle == nil {
- out.AttributesStyle = new(Style)
- }
- (*out.AttributesStyle).UnmarshalEasyJSON(in)
- }
- case "matchedCSSRules":
- if in.IsNull() {
- in.Skip()
- out.MatchedCSSRules = nil
- } else {
- in.Delim('[')
- if out.MatchedCSSRules == nil {
- if !in.IsDelim(']') {
- out.MatchedCSSRules = make([]*RuleMatch, 0, 8)
- } else {
- out.MatchedCSSRules = []*RuleMatch{}
- }
- } else {
- out.MatchedCSSRules = (out.MatchedCSSRules)[:0]
- }
- for !in.IsDelim(']') {
- var v58 *RuleMatch
- if in.IsNull() {
- in.Skip()
- v58 = nil
- } else {
- if v58 == nil {
- v58 = new(RuleMatch)
- }
- (*v58).UnmarshalEasyJSON(in)
- }
- out.MatchedCSSRules = append(out.MatchedCSSRules, v58)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "pseudoElements":
- if in.IsNull() {
- in.Skip()
- out.PseudoElements = nil
- } else {
- in.Delim('[')
- if out.PseudoElements == nil {
- if !in.IsDelim(']') {
- out.PseudoElements = make([]*PseudoElementMatches, 0, 8)
- } else {
- out.PseudoElements = []*PseudoElementMatches{}
- }
- } else {
- out.PseudoElements = (out.PseudoElements)[:0]
- }
- for !in.IsDelim(']') {
- var v59 *PseudoElementMatches
- if in.IsNull() {
- in.Skip()
- v59 = nil
- } else {
- if v59 == nil {
- v59 = new(PseudoElementMatches)
- }
- (*v59).UnmarshalEasyJSON(in)
- }
- out.PseudoElements = append(out.PseudoElements, v59)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "inherited":
- if in.IsNull() {
- in.Skip()
- out.Inherited = nil
- } else {
- in.Delim('[')
- if out.Inherited == nil {
- if !in.IsDelim(']') {
- out.Inherited = make([]*InheritedStyleEntry, 0, 8)
- } else {
- out.Inherited = []*InheritedStyleEntry{}
- }
- } else {
- out.Inherited = (out.Inherited)[:0]
- }
- for !in.IsDelim(']') {
- var v60 *InheritedStyleEntry
- if in.IsNull() {
- in.Skip()
- v60 = nil
- } else {
- if v60 == nil {
- v60 = new(InheritedStyleEntry)
- }
- (*v60).UnmarshalEasyJSON(in)
- }
- out.Inherited = append(out.Inherited, v60)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cssKeyframesRules":
- if in.IsNull() {
- in.Skip()
- out.CSSKeyframesRules = nil
- } else {
- in.Delim('[')
- if out.CSSKeyframesRules == nil {
- if !in.IsDelim(']') {
- out.CSSKeyframesRules = make([]*KeyframesRule, 0, 8)
- } else {
- out.CSSKeyframesRules = []*KeyframesRule{}
- }
- } else {
- out.CSSKeyframesRules = (out.CSSKeyframesRules)[:0]
- }
- for !in.IsDelim(']') {
- var v61 *KeyframesRule
- if in.IsNull() {
- in.Skip()
- v61 = nil
- } else {
- if v61 == nil {
- v61 = new(KeyframesRule)
- }
- (*v61).UnmarshalEasyJSON(in)
- }
- out.CSSKeyframesRules = append(out.CSSKeyframesRules, v61)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss47(out *jwriter.Writer, in GetMatchedStylesForNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.InlineStyle != nil {
- const prefix string = ",\"inlineStyle\":"
- first = false
- out.RawString(prefix[1:])
- (*in.InlineStyle).MarshalEasyJSON(out)
- }
- if in.AttributesStyle != nil {
- const prefix string = ",\"attributesStyle\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AttributesStyle).MarshalEasyJSON(out)
- }
- if len(in.MatchedCSSRules) != 0 {
- const prefix string = ",\"matchedCSSRules\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v62, v63 := range in.MatchedCSSRules {
- if v62 > 0 {
- out.RawByte(',')
- }
- if v63 == nil {
- out.RawString("null")
- } else {
- (*v63).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.PseudoElements) != 0 {
- const prefix string = ",\"pseudoElements\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v64, v65 := range in.PseudoElements {
- if v64 > 0 {
- out.RawByte(',')
- }
- if v65 == nil {
- out.RawString("null")
- } else {
- (*v65).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Inherited) != 0 {
- const prefix string = ",\"inherited\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v66, v67 := range in.Inherited {
- if v66 > 0 {
- out.RawByte(',')
- }
- if v67 == nil {
- out.RawString("null")
- } else {
- (*v67).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.CSSKeyframesRules) != 0 {
- const prefix string = ",\"cssKeyframesRules\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v68, v69 := range in.CSSKeyframesRules {
- if v68 > 0 {
- out.RawByte(',')
- }
- if v69 == nil {
- out.RawString("null")
- } else {
- (*v69).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMatchedStylesForNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMatchedStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMatchedStylesForNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMatchedStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss48(in *jlexer.Lexer, out *GetMatchedStylesForNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss48(out *jwriter.Writer, in GetMatchedStylesForNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMatchedStylesForNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMatchedStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMatchedStylesForNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMatchedStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss49(in *jlexer.Lexer, out *GetInlineStylesForNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "inlineStyle":
- if in.IsNull() {
- in.Skip()
- out.InlineStyle = nil
- } else {
- if out.InlineStyle == nil {
- out.InlineStyle = new(Style)
- }
- (*out.InlineStyle).UnmarshalEasyJSON(in)
- }
- case "attributesStyle":
- if in.IsNull() {
- in.Skip()
- out.AttributesStyle = nil
- } else {
- if out.AttributesStyle == nil {
- out.AttributesStyle = new(Style)
- }
- (*out.AttributesStyle).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss49(out *jwriter.Writer, in GetInlineStylesForNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.InlineStyle != nil {
- const prefix string = ",\"inlineStyle\":"
- first = false
- out.RawString(prefix[1:])
- (*in.InlineStyle).MarshalEasyJSON(out)
- }
- if in.AttributesStyle != nil {
- const prefix string = ",\"attributesStyle\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AttributesStyle).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInlineStylesForNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInlineStylesForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInlineStylesForNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInlineStylesForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss50(in *jlexer.Lexer, out *GetInlineStylesForNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss50(out *jwriter.Writer, in GetInlineStylesForNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInlineStylesForNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInlineStylesForNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInlineStylesForNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInlineStylesForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss50(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss51(in *jlexer.Lexer, out *GetComputedStyleForNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "computedStyle":
- if in.IsNull() {
- in.Skip()
- out.ComputedStyle = nil
- } else {
- in.Delim('[')
- if out.ComputedStyle == nil {
- if !in.IsDelim(']') {
- out.ComputedStyle = make([]*ComputedStyleProperty, 0, 8)
- } else {
- out.ComputedStyle = []*ComputedStyleProperty{}
- }
- } else {
- out.ComputedStyle = (out.ComputedStyle)[:0]
- }
- for !in.IsDelim(']') {
- var v70 *ComputedStyleProperty
- if in.IsNull() {
- in.Skip()
- v70 = nil
- } else {
- if v70 == nil {
- v70 = new(ComputedStyleProperty)
- }
- (*v70).UnmarshalEasyJSON(in)
- }
- out.ComputedStyle = append(out.ComputedStyle, v70)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss51(out *jwriter.Writer, in GetComputedStyleForNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ComputedStyle) != 0 {
- const prefix string = ",\"computedStyle\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v71, v72 := range in.ComputedStyle {
- if v71 > 0 {
- out.RawByte(',')
- }
- if v72 == nil {
- out.RawString("null")
- } else {
- (*v72).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetComputedStyleForNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss51(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetComputedStyleForNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss51(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetComputedStyleForNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss51(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetComputedStyleForNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss51(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss52(in *jlexer.Lexer, out *GetComputedStyleForNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss52(out *jwriter.Writer, in GetComputedStyleForNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetComputedStyleForNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss52(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetComputedStyleForNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss52(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetComputedStyleForNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss52(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetComputedStyleForNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss52(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss53(in *jlexer.Lexer, out *GetBackgroundColorsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backgroundColors":
- if in.IsNull() {
- in.Skip()
- out.BackgroundColors = nil
- } else {
- in.Delim('[')
- if out.BackgroundColors == nil {
- if !in.IsDelim(']') {
- out.BackgroundColors = make([]string, 0, 4)
- } else {
- out.BackgroundColors = []string{}
- }
- } else {
- out.BackgroundColors = (out.BackgroundColors)[:0]
- }
- for !in.IsDelim(']') {
- var v73 string
- v73 = string(in.String())
- out.BackgroundColors = append(out.BackgroundColors, v73)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "computedFontSize":
- out.ComputedFontSize = string(in.String())
- case "computedFontWeight":
- out.ComputedFontWeight = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss53(out *jwriter.Writer, in GetBackgroundColorsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.BackgroundColors) != 0 {
- const prefix string = ",\"backgroundColors\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v74, v75 := range in.BackgroundColors {
- if v74 > 0 {
- out.RawByte(',')
- }
- out.String(string(v75))
- }
- out.RawByte(']')
- }
- }
- if in.ComputedFontSize != "" {
- const prefix string = ",\"computedFontSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ComputedFontSize))
- }
- if in.ComputedFontWeight != "" {
- const prefix string = ",\"computedFontWeight\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ComputedFontWeight))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBackgroundColorsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss53(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBackgroundColorsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss53(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBackgroundColorsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss53(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBackgroundColorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss53(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss54(in *jlexer.Lexer, out *GetBackgroundColorsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss54(out *jwriter.Writer, in GetBackgroundColorsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBackgroundColorsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss54(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBackgroundColorsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss54(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBackgroundColorsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss54(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBackgroundColorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss54(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss55(in *jlexer.Lexer, out *ForcePseudoStateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "forcedPseudoClasses":
- if in.IsNull() {
- in.Skip()
- out.ForcedPseudoClasses = nil
- } else {
- in.Delim('[')
- if out.ForcedPseudoClasses == nil {
- if !in.IsDelim(']') {
- out.ForcedPseudoClasses = make([]string, 0, 4)
- } else {
- out.ForcedPseudoClasses = []string{}
- }
- } else {
- out.ForcedPseudoClasses = (out.ForcedPseudoClasses)[:0]
- }
- for !in.IsDelim(']') {
- var v76 string
- v76 = string(in.String())
- out.ForcedPseudoClasses = append(out.ForcedPseudoClasses, v76)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss55(out *jwriter.Writer, in ForcePseudoStateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"forcedPseudoClasses\":"
- out.RawString(prefix)
- if in.ForcedPseudoClasses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v77, v78 := range in.ForcedPseudoClasses {
- if v77 > 0 {
- out.RawByte(',')
- }
- out.String(string(v78))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ForcePseudoStateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss55(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ForcePseudoStateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss55(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ForcePseudoStateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss55(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ForcePseudoStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss55(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss56(in *jlexer.Lexer, out *FontVariationAxis) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "tag":
- out.Tag = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "minValue":
- out.MinValue = float64(in.Float64())
- case "maxValue":
- out.MaxValue = float64(in.Float64())
- case "defaultValue":
- out.DefaultValue = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss56(out *jwriter.Writer, in FontVariationAxis) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"tag\":"
- out.RawString(prefix[1:])
- out.String(string(in.Tag))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"minValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.MinValue))
- }
- {
- const prefix string = ",\"maxValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.MaxValue))
- }
- {
- const prefix string = ",\"defaultValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.DefaultValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FontVariationAxis) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss56(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FontVariationAxis) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss56(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FontVariationAxis) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss56(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FontVariationAxis) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss56(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss57(in *jlexer.Lexer, out *FontFace) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "fontFamily":
- out.FontFamily = string(in.String())
- case "fontStyle":
- out.FontStyle = string(in.String())
- case "fontVariant":
- out.FontVariant = string(in.String())
- case "fontWeight":
- out.FontWeight = string(in.String())
- case "fontStretch":
- out.FontStretch = string(in.String())
- case "unicodeRange":
- out.UnicodeRange = string(in.String())
- case "src":
- out.Src = string(in.String())
- case "platformFontFamily":
- out.PlatformFontFamily = string(in.String())
- case "fontVariationAxes":
- if in.IsNull() {
- in.Skip()
- out.FontVariationAxes = nil
- } else {
- in.Delim('[')
- if out.FontVariationAxes == nil {
- if !in.IsDelim(']') {
- out.FontVariationAxes = make([]*FontVariationAxis, 0, 8)
- } else {
- out.FontVariationAxes = []*FontVariationAxis{}
- }
- } else {
- out.FontVariationAxes = (out.FontVariationAxes)[:0]
- }
- for !in.IsDelim(']') {
- var v79 *FontVariationAxis
- if in.IsNull() {
- in.Skip()
- v79 = nil
- } else {
- if v79 == nil {
- v79 = new(FontVariationAxis)
- }
- (*v79).UnmarshalEasyJSON(in)
- }
- out.FontVariationAxes = append(out.FontVariationAxes, v79)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss57(out *jwriter.Writer, in FontFace) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"fontFamily\":"
- out.RawString(prefix[1:])
- out.String(string(in.FontFamily))
- }
- {
- const prefix string = ",\"fontStyle\":"
- out.RawString(prefix)
- out.String(string(in.FontStyle))
- }
- {
- const prefix string = ",\"fontVariant\":"
- out.RawString(prefix)
- out.String(string(in.FontVariant))
- }
- {
- const prefix string = ",\"fontWeight\":"
- out.RawString(prefix)
- out.String(string(in.FontWeight))
- }
- {
- const prefix string = ",\"fontStretch\":"
- out.RawString(prefix)
- out.String(string(in.FontStretch))
- }
- {
- const prefix string = ",\"unicodeRange\":"
- out.RawString(prefix)
- out.String(string(in.UnicodeRange))
- }
- {
- const prefix string = ",\"src\":"
- out.RawString(prefix)
- out.String(string(in.Src))
- }
- {
- const prefix string = ",\"platformFontFamily\":"
- out.RawString(prefix)
- out.String(string(in.PlatformFontFamily))
- }
- if len(in.FontVariationAxes) != 0 {
- const prefix string = ",\"fontVariationAxes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v80, v81 := range in.FontVariationAxes {
- if v80 > 0 {
- out.RawByte(',')
- }
- if v81 == nil {
- out.RawString("null")
- } else {
- (*v81).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FontFace) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss57(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FontFace) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss57(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FontFace) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss57(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FontFace) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss57(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss58(in *jlexer.Lexer, out *EventStyleSheetRemoved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss58(out *jwriter.Writer, in EventStyleSheetRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventStyleSheetRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss58(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventStyleSheetRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss58(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventStyleSheetRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss58(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventStyleSheetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss58(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss59(in *jlexer.Lexer, out *EventStyleSheetChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss59(out *jwriter.Writer, in EventStyleSheetChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventStyleSheetChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss59(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventStyleSheetChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss59(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventStyleSheetChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss59(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventStyleSheetChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss59(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss60(in *jlexer.Lexer, out *EventStyleSheetAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "header":
- if in.IsNull() {
- in.Skip()
- out.Header = nil
- } else {
- if out.Header == nil {
- out.Header = new(StyleSheetHeader)
- }
- (*out.Header).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss60(out *jwriter.Writer, in EventStyleSheetAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"header\":"
- out.RawString(prefix[1:])
- if in.Header == nil {
- out.RawString("null")
- } else {
- (*in.Header).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventStyleSheetAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss60(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventStyleSheetAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss60(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventStyleSheetAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss60(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventStyleSheetAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss60(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss61(in *jlexer.Lexer, out *EventMediaQueryResultChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss61(out *jwriter.Writer, in EventMediaQueryResultChanged) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventMediaQueryResultChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss61(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventMediaQueryResultChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss61(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventMediaQueryResultChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss61(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventMediaQueryResultChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss61(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss62(in *jlexer.Lexer, out *EventFontsUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "font":
- if in.IsNull() {
- in.Skip()
- out.Font = nil
- } else {
- if out.Font == nil {
- out.Font = new(FontFace)
- }
- (*out.Font).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss62(out *jwriter.Writer, in EventFontsUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Font != nil {
- const prefix string = ",\"font\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Font).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFontsUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss62(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFontsUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss62(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFontsUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss62(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFontsUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss62(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss63(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss63(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss63(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss63(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss63(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss63(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss64(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss64(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss64(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss64(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss64(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss64(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss65(in *jlexer.Lexer, out *CreateStyleSheetReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss65(out *jwriter.Writer, in CreateStyleSheetReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateStyleSheetReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss65(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateStyleSheetReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss65(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateStyleSheetReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss65(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateStyleSheetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss65(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss66(in *jlexer.Lexer, out *CreateStyleSheetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss66(out *jwriter.Writer, in CreateStyleSheetParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateStyleSheetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss66(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateStyleSheetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss66(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateStyleSheetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss66(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateStyleSheetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss66(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss67(in *jlexer.Lexer, out *ContainerQuery) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "text":
- out.Text = string(in.String())
- case "range":
- if in.IsNull() {
- in.Skip()
- out.Range = nil
- } else {
- if out.Range == nil {
- out.Range = new(SourceRange)
- }
- (*out.Range).UnmarshalEasyJSON(in)
- }
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss67(out *jwriter.Writer, in ContainerQuery) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix[1:])
- out.String(string(in.Text))
- }
- if in.Range != nil {
- const prefix string = ",\"range\":"
- out.RawString(prefix)
- (*in.Range).MarshalEasyJSON(out)
- }
- if in.StyleSheetID != "" {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix)
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContainerQuery) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss67(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContainerQuery) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss67(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContainerQuery) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss67(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContainerQuery) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss67(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss68(in *jlexer.Lexer, out *ComputedStyleProperty) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss68(out *jwriter.Writer, in ComputedStyleProperty) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ComputedStyleProperty) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss68(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ComputedStyleProperty) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss68(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ComputedStyleProperty) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss68(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ComputedStyleProperty) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss68(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss69(in *jlexer.Lexer, out *CollectClassNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "classNames":
- if in.IsNull() {
- in.Skip()
- out.ClassNames = nil
- } else {
- in.Delim('[')
- if out.ClassNames == nil {
- if !in.IsDelim(']') {
- out.ClassNames = make([]string, 0, 4)
- } else {
- out.ClassNames = []string{}
- }
- } else {
- out.ClassNames = (out.ClassNames)[:0]
- }
- for !in.IsDelim(']') {
- var v82 string
- v82 = string(in.String())
- out.ClassNames = append(out.ClassNames, v82)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss69(out *jwriter.Writer, in CollectClassNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ClassNames) != 0 {
- const prefix string = ",\"classNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v83, v84 := range in.ClassNames {
- if v83 > 0 {
- out.RawByte(',')
- }
- out.String(string(v84))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CollectClassNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss69(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CollectClassNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss69(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CollectClassNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss69(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CollectClassNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss69(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss70(in *jlexer.Lexer, out *CollectClassNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss70(out *jwriter.Writer, in CollectClassNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CollectClassNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss70(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CollectClassNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss70(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CollectClassNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss70(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CollectClassNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss70(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss71(in *jlexer.Lexer, out *AddRuleReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rule":
- if in.IsNull() {
- in.Skip()
- out.Rule = nil
- } else {
- if out.Rule == nil {
- out.Rule = new(Rule)
- }
- (*out.Rule).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss71(out *jwriter.Writer, in AddRuleReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Rule != nil {
- const prefix string = ",\"rule\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Rule).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddRuleReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss71(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddRuleReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss71(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddRuleReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss71(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddRuleReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss71(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss72(in *jlexer.Lexer, out *AddRuleParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "styleSheetId":
- out.StyleSheetID = StyleSheetID(in.String())
- case "ruleText":
- out.RuleText = string(in.String())
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(SourceRange)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss72(out *jwriter.Writer, in AddRuleParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"styleSheetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.StyleSheetID))
- }
- {
- const prefix string = ",\"ruleText\":"
- out.RawString(prefix)
- out.String(string(in.RuleText))
- }
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddRuleParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss72(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddRuleParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss72(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddRuleParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss72(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddRuleParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss72(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/css/events.go b/vendor/github.com/chromedp/cdproto/css/events.go
deleted file mode 100644
index 416f1181f58..00000000000
--- a/vendor/github.com/chromedp/cdproto/css/events.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package css
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventFontsUpdated fires whenever a web font is updated. A non-empty font
-// parameter indicates a successfully loaded web font.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-fontsUpdated
-type EventFontsUpdated struct {
- Font *FontFace `json:"font,omitempty"` // The web font that has loaded.
-}
-
-// EventMediaQueryResultChanged fires whenever a MediaQuery result changes
-// (for example, after a browser window has been resized.) The current
-// implementation considers only viewport-dependent media features.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-mediaQueryResultChanged
-type EventMediaQueryResultChanged struct{}
-
-// EventStyleSheetAdded fired whenever an active document stylesheet is
-// added.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetAdded
-type EventStyleSheetAdded struct {
- Header *StyleSheetHeader `json:"header"` // Added stylesheet metainfo.
-}
-
-// EventStyleSheetChanged fired whenever a stylesheet is changed as a result
-// of the client operation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetChanged
-type EventStyleSheetChanged struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"`
-}
-
-// EventStyleSheetRemoved fired whenever an active document stylesheet is
-// removed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetRemoved
-type EventStyleSheetRemoved struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"` // Identifier of the removed stylesheet.
-}
diff --git a/vendor/github.com/chromedp/cdproto/css/types.go b/vendor/github.com/chromedp/cdproto/css/types.go
deleted file mode 100644
index 2562f5bd105..00000000000
--- a/vendor/github.com/chromedp/cdproto/css/types.go
+++ /dev/null
@@ -1,374 +0,0 @@
-package css
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// StyleSheetID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-StyleSheetId
-type StyleSheetID string
-
-// String returns the StyleSheetID as string value.
-func (t StyleSheetID) String() string {
- return string(t)
-}
-
-// StyleSheetOrigin stylesheet type: "injected" for stylesheets injected via
-// extension, "user-agent" for user-agent stylesheets, "inspector" for
-// stylesheets created by the inspector (i.e. those holding the "via inspector"
-// rules), "regular" for regular stylesheets.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-StyleSheetOrigin
-type StyleSheetOrigin string
-
-// String returns the StyleSheetOrigin as string value.
-func (t StyleSheetOrigin) String() string {
- return string(t)
-}
-
-// StyleSheetOrigin values.
-const (
- StyleSheetOriginInjected StyleSheetOrigin = "injected"
- StyleSheetOriginUserAgent StyleSheetOrigin = "user-agent"
- StyleSheetOriginInspector StyleSheetOrigin = "inspector"
- StyleSheetOriginRegular StyleSheetOrigin = "regular"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t StyleSheetOrigin) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t StyleSheetOrigin) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *StyleSheetOrigin) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch StyleSheetOrigin(in.String()) {
- case StyleSheetOriginInjected:
- *t = StyleSheetOriginInjected
- case StyleSheetOriginUserAgent:
- *t = StyleSheetOriginUserAgent
- case StyleSheetOriginInspector:
- *t = StyleSheetOriginInspector
- case StyleSheetOriginRegular:
- *t = StyleSheetOriginRegular
-
- default:
- in.AddError(errors.New("unknown StyleSheetOrigin value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *StyleSheetOrigin) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PseudoElementMatches CSS rule collection for a single pseudo style.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-PseudoElementMatches
-type PseudoElementMatches struct {
- PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
- Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
-}
-
-// InheritedStyleEntry inherited CSS rule collection from ancestor node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-InheritedStyleEntry
-type InheritedStyleEntry struct {
- InlineStyle *Style `json:"inlineStyle,omitempty"` // The ancestor node's inline style, if any, in the style inheritance chain.
- MatchedCSSRules []*RuleMatch `json:"matchedCSSRules"` // Matches of CSS rules matching the ancestor node in the style inheritance chain.
-}
-
-// RuleMatch match data for a CSS rule.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-RuleMatch
-type RuleMatch struct {
- Rule *Rule `json:"rule"` // CSS rule in the match.
- MatchingSelectors []int64 `json:"matchingSelectors"` // Matching selector indices in the rule's selectorList selectors (0-based).
-}
-
-// Value data for a simple selector (these are delimited by commas in a
-// selector list).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-Value
-type Value struct {
- Text string `json:"text"` // Value text.
- Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
-}
-
-// SelectorList selector list data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-SelectorList
-type SelectorList struct {
- Selectors []*Value `json:"selectors"` // Selectors in the list.
- Text string `json:"text"` // Rule selector text.
-}
-
-// StyleSheetHeader CSS stylesheet metainformation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStyleSheetHeader
-type StyleSheetHeader struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
- FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
- SourceURL string `json:"sourceURL"` // Stylesheet resource URL.
- SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
- Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
- Title string `json:"title"` // Stylesheet title.
- OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty"` // The backend id for the owner node of the stylesheet.
- Disabled bool `json:"disabled"` // Denotes whether the stylesheet is disabled.
- HasSourceURL bool `json:"hasSourceURL,omitempty"` // Whether the sourceURL field value comes from the sourceURL comment.
- IsInline bool `json:"isInline"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
- IsMutable bool `json:"isMutable"` // Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
- IsConstructed bool `json:"isConstructed"` // Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()).
- StartLine float64 `json:"startLine"` // Line offset of the stylesheet within the resource (zero based).
- StartColumn float64 `json:"startColumn"` // Column offset of the stylesheet within the resource (zero based).
- Length float64 `json:"length"` // Size of the content (in characters).
- EndLine float64 `json:"endLine"` // Line offset of the end of the stylesheet within the resource (zero based).
- EndColumn float64 `json:"endColumn"` // Column offset of the end of the stylesheet within the resource (zero based).
-}
-
-// Rule CSS rule representation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSRule
-type Rule struct {
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
- SelectorList *SelectorList `json:"selectorList"` // Rule selector data.
- Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
- Style *Style `json:"style"` // Associated style declaration.
- Media []*Media `json:"media,omitempty"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
- ContainerQueries []*ContainerQuery `json:"containerQueries,omitempty"` // Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
-}
-
-// RuleUsage CSS coverage information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-RuleUsage
-type RuleUsage struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
- StartOffset float64 `json:"startOffset"` // Offset of the start of the rule (including selector) from the beginning of the stylesheet.
- EndOffset float64 `json:"endOffset"` // Offset of the end of the rule body from the beginning of the stylesheet.
- Used bool `json:"used"` // Indicates whether the rule was actually used by some element in the page.
-}
-
-// SourceRange text range within a resource. All numbers are zero-based.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-SourceRange
-type SourceRange struct {
- StartLine int64 `json:"startLine"` // Start line of range.
- StartColumn int64 `json:"startColumn"` // Start column of range (inclusive).
- EndLine int64 `json:"endLine"` // End line of range
- EndColumn int64 `json:"endColumn"` // End column of range (exclusive).
-}
-
-// ShorthandEntry [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-ShorthandEntry
-type ShorthandEntry struct {
- Name string `json:"name"` // Shorthand name.
- Value string `json:"value"` // Shorthand value.
- Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent).
-}
-
-// ComputedStyleProperty [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSComputedStyleProperty
-type ComputedStyleProperty struct {
- Name string `json:"name"` // Computed style property name.
- Value string `json:"value"` // Computed style property value.
-}
-
-// Style CSS style representation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStyle
-type Style struct {
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
- CSSProperties []*Property `json:"cssProperties"` // CSS properties in the style.
- ShorthandEntries []*ShorthandEntry `json:"shorthandEntries"` // Computed values for all shorthands found in the style.
- CSSText string `json:"cssText,omitempty"` // Style declaration text (if available).
- Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available).
-}
-
-// Property CSS property declaration data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSProperty
-type Property struct {
- Name string `json:"name"` // The property name.
- Value string `json:"value"` // The property value.
- Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent).
- Implicit bool `json:"implicit,omitempty"` // Whether the property is implicit (implies false if absent).
- Text string `json:"text,omitempty"` // The full property text as specified in the style.
- ParsedOk bool `json:"parsedOk,omitempty"` // Whether the property is understood by the browser (implies true if absent).
- Disabled bool `json:"disabled,omitempty"` // Whether the property is disabled by the user (present for source-based properties only).
- Range *SourceRange `json:"range,omitempty"` // The entire property range in the enclosing style declaration (if available).
-}
-
-// Media CSS media rule descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSMedia
-type Media struct {
- Text string `json:"text"` // Media query text.
- Source MediaSource `json:"source"` // Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
- SourceURL string `json:"sourceURL,omitempty"` // URL of the document containing the media query description.
- Range *SourceRange `json:"range,omitempty"` // The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
- MediaList []*MediaQuery `json:"mediaList,omitempty"` // Array of media queries.
-}
-
-// MediaQuery media query descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-MediaQuery
-type MediaQuery struct {
- Expressions []*MediaQueryExpression `json:"expressions"` // Array of media query expressions.
- Active bool `json:"active"` // Whether the media query condition is satisfied.
-}
-
-// MediaQueryExpression media query expression descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-MediaQueryExpression
-type MediaQueryExpression struct {
- Value float64 `json:"value"` // Media query expression value.
- Unit string `json:"unit"` // Media query expression units.
- Feature string `json:"feature"` // Media query expression feature.
- ValueRange *SourceRange `json:"valueRange,omitempty"` // The associated range of the value text in the enclosing stylesheet (if available).
- ComputedLength float64 `json:"computedLength,omitempty"` // Computed length of media query expression (if applicable).
-}
-
-// ContainerQuery CSS container query rule descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSContainerQuery
-type ContainerQuery struct {
- Text string `json:"text"` // Container query text.
- Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available).
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
-}
-
-// PlatformFontUsage information about amount of glyphs that were rendered
-// with given font.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-PlatformFontUsage
-type PlatformFontUsage struct {
- FamilyName string `json:"familyName"` // Font's family name reported by platform.
- IsCustomFont bool `json:"isCustomFont"` // Indicates if the font was downloaded or resolved locally.
- GlyphCount float64 `json:"glyphCount"` // Amount of glyphs that were rendered with this font.
-}
-
-// FontVariationAxis information about font variation axes for variable
-// fonts.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-FontVariationAxis
-type FontVariationAxis struct {
- Tag string `json:"tag"` // The font-variation-setting tag (a.k.a. "axis tag").
- Name string `json:"name"` // Human-readable variation name in the default language (normally, "en").
- MinValue float64 `json:"minValue"` // The minimum value (inclusive) the font supports for this tag.
- MaxValue float64 `json:"maxValue"` // The maximum value (inclusive) the font supports for this tag.
- DefaultValue float64 `json:"defaultValue"` // The default value.
-}
-
-// FontFace properties of a web font:
-// https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and
-// additional information such as platformFontFamily and fontVariationAxes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-FontFace
-type FontFace struct {
- FontFamily string `json:"fontFamily"` // The font-family.
- FontStyle string `json:"fontStyle"` // The font-style.
- FontVariant string `json:"fontVariant"` // The font-variant.
- FontWeight string `json:"fontWeight"` // The font-weight.
- FontStretch string `json:"fontStretch"` // The font-stretch.
- UnicodeRange string `json:"unicodeRange"` // The unicode-range.
- Src string `json:"src"` // The src.
- PlatformFontFamily string `json:"platformFontFamily"` // The resolved platform font family
- FontVariationAxes []*FontVariationAxis `json:"fontVariationAxes,omitempty"` // Available variation settings (a.k.a. "axes").
-}
-
-// KeyframesRule CSS keyframes rule representation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframesRule
-type KeyframesRule struct {
- AnimationName *Value `json:"animationName"` // Animation name.
- Keyframes []*KeyframeRule `json:"keyframes"` // List of keyframes.
-}
-
-// KeyframeRule CSS keyframe rule representation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframeRule
-type KeyframeRule struct {
- StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
- Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
- KeyText *Value `json:"keyText"` // Associated key text.
- Style *Style `json:"style"` // Associated style declaration.
-}
-
-// StyleDeclarationEdit a descriptor of operation to mutate style declaration
-// text.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-StyleDeclarationEdit
-type StyleDeclarationEdit struct {
- StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier.
- Range *SourceRange `json:"range"` // The range of the style text in the enclosing stylesheet.
- Text string `json:"text"` // New style text.
-}
-
-// MediaSource source of the media query: "mediaRule" if specified by a
-// @media rule, "importRule" if specified by an @import rule, "linkedSheet" if
-// specified by a "media" attribute in a linked stylesheet's LINK tag,
-// "inlineSheet" if specified by a "media" attribute in an inline stylesheet's
-// STYLE tag.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSMedia
-type MediaSource string
-
-// String returns the MediaSource as string value.
-func (t MediaSource) String() string {
- return string(t)
-}
-
-// MediaSource values.
-const (
- MediaSourceMediaRule MediaSource = "mediaRule"
- MediaSourceImportRule MediaSource = "importRule"
- MediaSourceLinkedSheet MediaSource = "linkedSheet"
- MediaSourceInlineSheet MediaSource = "inlineSheet"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MediaSource) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MediaSource) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MediaSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MediaSource(in.String()) {
- case MediaSourceMediaRule:
- *t = MediaSourceMediaRule
- case MediaSourceImportRule:
- *t = MediaSourceImportRule
- case MediaSourceLinkedSheet:
- *t = MediaSourceLinkedSheet
- case MediaSourceInlineSheet:
- *t = MediaSourceInlineSheet
-
- default:
- in.AddError(errors.New("unknown MediaSource value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MediaSource) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/database/database.go b/vendor/github.com/chromedp/cdproto/database/database.go
deleted file mode 100644
index 66e53f38a3f..00000000000
--- a/vendor/github.com/chromedp/cdproto/database/database.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Package database provides the Chrome DevTools Protocol
-// commands, types, and events for the Database domain.
-//
-// Generated by the cdproto-gen command.
-package database
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
-)
-
-// DisableParams disables database tracking, prevents database events from
-// being sent to the client.
-type DisableParams struct{}
-
-// Disable disables database tracking, prevents database events from being
-// sent to the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Database.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables database tracking, database events will now be
-// delivered to the client.
-type EnableParams struct{}
-
-// Enable enables database tracking, database events will now be delivered to
-// the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Database.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// ExecuteSQLParams [no description].
-type ExecuteSQLParams struct {
- DatabaseID ID `json:"databaseId"`
- Query string `json:"query"`
-}
-
-// ExecuteSQL [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-executeSQL
-//
-// parameters:
-// databaseID
-// query
-func ExecuteSQL(databaseID ID, query string) *ExecuteSQLParams {
- return &ExecuteSQLParams{
- DatabaseID: databaseID,
- Query: query,
- }
-}
-
-// ExecuteSQLReturns return values.
-type ExecuteSQLReturns struct {
- ColumnNames []string `json:"columnNames,omitempty"`
- Values []easyjson.RawMessage `json:"values,omitempty"`
- SQLError *Error `json:"sqlError,omitempty"`
-}
-
-// Do executes Database.executeSQL against the provided context.
-//
-// returns:
-// columnNames
-// values
-// sqlError
-func (p *ExecuteSQLParams) Do(ctx context.Context) (columnNames []string, values []easyjson.RawMessage, sqlError *Error, err error) {
- // execute
- var res ExecuteSQLReturns
- err = cdp.Execute(ctx, CommandExecuteSQL, p, &res)
- if err != nil {
- return nil, nil, nil, err
- }
-
- return res.ColumnNames, res.Values, res.SQLError, nil
-}
-
-// GetDatabaseTableNamesParams [no description].
-type GetDatabaseTableNamesParams struct {
- DatabaseID ID `json:"databaseId"`
-}
-
-// GetDatabaseTableNames [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-getDatabaseTableNames
-//
-// parameters:
-// databaseID
-func GetDatabaseTableNames(databaseID ID) *GetDatabaseTableNamesParams {
- return &GetDatabaseTableNamesParams{
- DatabaseID: databaseID,
- }
-}
-
-// GetDatabaseTableNamesReturns return values.
-type GetDatabaseTableNamesReturns struct {
- TableNames []string `json:"tableNames,omitempty"`
-}
-
-// Do executes Database.getDatabaseTableNames against the provided context.
-//
-// returns:
-// tableNames
-func (p *GetDatabaseTableNamesParams) Do(ctx context.Context) (tableNames []string, err error) {
- // execute
- var res GetDatabaseTableNamesReturns
- err = cdp.Execute(ctx, CommandGetDatabaseTableNames, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.TableNames, nil
-}
-
-// Command names.
-const (
- CommandDisable = "Database.disable"
- CommandEnable = "Database.enable"
- CommandExecuteSQL = "Database.executeSQL"
- CommandGetDatabaseTableNames = "Database.getDatabaseTableNames"
-)
diff --git a/vendor/github.com/chromedp/cdproto/database/easyjson.go b/vendor/github.com/chromedp/cdproto/database/easyjson.go
deleted file mode 100644
index cffadfabecb..00000000000
--- a/vendor/github.com/chromedp/cdproto/database/easyjson.go
+++ /dev/null
@@ -1,770 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package database
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(in *jlexer.Lexer, out *GetDatabaseTableNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "tableNames":
- if in.IsNull() {
- in.Skip()
- out.TableNames = nil
- } else {
- in.Delim('[')
- if out.TableNames == nil {
- if !in.IsDelim(']') {
- out.TableNames = make([]string, 0, 4)
- } else {
- out.TableNames = []string{}
- }
- } else {
- out.TableNames = (out.TableNames)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.TableNames = append(out.TableNames, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(out *jwriter.Writer, in GetDatabaseTableNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.TableNames) != 0 {
- const prefix string = ",\"tableNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.TableNames {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDatabaseTableNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDatabaseTableNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDatabaseTableNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDatabaseTableNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(in *jlexer.Lexer, out *GetDatabaseTableNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "databaseId":
- out.DatabaseID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(out *jwriter.Writer, in GetDatabaseTableNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"databaseId\":"
- out.RawString(prefix[1:])
- out.String(string(in.DatabaseID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDatabaseTableNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDatabaseTableNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDatabaseTableNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDatabaseTableNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(in *jlexer.Lexer, out *ExecuteSQLReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "columnNames":
- if in.IsNull() {
- in.Skip()
- out.ColumnNames = nil
- } else {
- in.Delim('[')
- if out.ColumnNames == nil {
- if !in.IsDelim(']') {
- out.ColumnNames = make([]string, 0, 4)
- } else {
- out.ColumnNames = []string{}
- }
- } else {
- out.ColumnNames = (out.ColumnNames)[:0]
- }
- for !in.IsDelim(']') {
- var v4 string
- v4 = string(in.String())
- out.ColumnNames = append(out.ColumnNames, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "values":
- if in.IsNull() {
- in.Skip()
- out.Values = nil
- } else {
- in.Delim('[')
- if out.Values == nil {
- if !in.IsDelim(']') {
- out.Values = make([]easyjson.RawMessage, 0, 2)
- } else {
- out.Values = []easyjson.RawMessage{}
- }
- } else {
- out.Values = (out.Values)[:0]
- }
- for !in.IsDelim(']') {
- var v5 easyjson.RawMessage
- (v5).UnmarshalEasyJSON(in)
- out.Values = append(out.Values, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "sqlError":
- if in.IsNull() {
- in.Skip()
- out.SQLError = nil
- } else {
- if out.SQLError == nil {
- out.SQLError = new(Error)
- }
- (*out.SQLError).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(out *jwriter.Writer, in ExecuteSQLReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ColumnNames) != 0 {
- const prefix string = ",\"columnNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v6, v7 := range in.ColumnNames {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.String(string(v7))
- }
- out.RawByte(']')
- }
- }
- if len(in.Values) != 0 {
- const prefix string = ",\"values\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v8, v9 := range in.Values {
- if v8 > 0 {
- out.RawByte(',')
- }
- (v9).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- if in.SQLError != nil {
- const prefix string = ",\"sqlError\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.SQLError).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExecuteSQLReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExecuteSQLReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExecuteSQLReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExecuteSQLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(in *jlexer.Lexer, out *ExecuteSQLParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "databaseId":
- out.DatabaseID = ID(in.String())
- case "query":
- out.Query = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(out *jwriter.Writer, in ExecuteSQLParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"databaseId\":"
- out.RawString(prefix[1:])
- out.String(string(in.DatabaseID))
- }
- {
- const prefix string = ",\"query\":"
- out.RawString(prefix)
- out.String(string(in.Query))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExecuteSQLParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExecuteSQLParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExecuteSQLParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExecuteSQLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(in *jlexer.Lexer, out *EventAddDatabase) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "database":
- if in.IsNull() {
- in.Skip()
- out.Database = nil
- } else {
- if out.Database == nil {
- out.Database = new(Database)
- }
- (*out.Database).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(out *jwriter.Writer, in EventAddDatabase) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"database\":"
- out.RawString(prefix[1:])
- if in.Database == nil {
- out.RawString("null")
- } else {
- (*in.Database).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAddDatabase) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAddDatabase) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAddDatabase) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAddDatabase) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(in *jlexer.Lexer, out *Error) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "message":
- out.Message = string(in.String())
- case "code":
- out.Code = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(out *jwriter.Writer, in Error) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix[1:])
- out.String(string(in.Message))
- }
- {
- const prefix string = ",\"code\":"
- out.RawString(prefix)
- out.Int64(int64(in.Code))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Error) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Error) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Error) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(in *jlexer.Lexer, out *Database) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = ID(in.String())
- case "domain":
- out.Domain = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "version":
- out.Version = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(out *jwriter.Writer, in Database) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"version\":"
- out.RawString(prefix)
- out.String(string(in.Version))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Database) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Database) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Database) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Database) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/database/events.go b/vendor/github.com/chromedp/cdproto/database/events.go
deleted file mode 100644
index 5a1deb58a43..00000000000
--- a/vendor/github.com/chromedp/cdproto/database/events.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package database
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventAddDatabase [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#event-addDatabase
-type EventAddDatabase struct {
- Database *Database `json:"database"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/database/types.go b/vendor/github.com/chromedp/cdproto/database/types.go
deleted file mode 100644
index 2f95317d4e1..00000000000
--- a/vendor/github.com/chromedp/cdproto/database/types.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package database
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// ID unique identifier of Database object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-DatabaseId
-type ID string
-
-// String returns the ID as string value.
-func (t ID) String() string {
- return string(t)
-}
-
-// Database database object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-Database
-type Database struct {
- ID ID `json:"id"` // Database ID.
- Domain string `json:"domain"` // Database domain.
- Name string `json:"name"` // Database name.
- Version string `json:"version"` // Database version.
-}
-
-// Error database error.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#type-Error
-type Error struct {
- Message string `json:"message"` // Error message.
- Code int64 `json:"code"` // Error code.
-}
diff --git a/vendor/github.com/chromedp/cdproto/debugger/debugger.go b/vendor/github.com/chromedp/cdproto/debugger/debugger.go
deleted file mode 100644
index c110811fdf8..00000000000
--- a/vendor/github.com/chromedp/cdproto/debugger/debugger.go
+++ /dev/null
@@ -1,1058 +0,0 @@
-// Package debugger provides the Chrome DevTools Protocol
-// commands, types, and events for the Debugger domain.
-//
-// Debugger domain exposes JavaScript debugging capabilities. It allows
-// setting and removing breakpoints, stepping through execution, exploring stack
-// traces, etc.
-//
-// Generated by the cdproto-gen command.
-package debugger
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// ContinueToLocationParams continues execution until specific location is
-// reached.
-type ContinueToLocationParams struct {
- Location *Location `json:"location"` // Location to continue to.
- TargetCallFrames ContinueToLocationTargetCallFrames `json:"targetCallFrames,omitempty"`
-}
-
-// ContinueToLocation continues execution until specific location is reached.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-continueToLocation
-//
-// parameters:
-// location - Location to continue to.
-func ContinueToLocation(location *Location) *ContinueToLocationParams {
- return &ContinueToLocationParams{
- Location: location,
- }
-}
-
-// WithTargetCallFrames [no description].
-func (p ContinueToLocationParams) WithTargetCallFrames(targetCallFrames ContinueToLocationTargetCallFrames) *ContinueToLocationParams {
- p.TargetCallFrames = targetCallFrames
- return &p
-}
-
-// Do executes Debugger.continueToLocation against the provided context.
-func (p *ContinueToLocationParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandContinueToLocation, p, nil)
-}
-
-// DisableParams disables debugger for given page.
-type DisableParams struct{}
-
-// Disable disables debugger for given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Debugger.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables debugger for the given page. Clients should not
-// assume that the debugging has been enabled until the result for this command
-// is received.
-type EnableParams struct {
- MaxScriptsCacheSize float64 `json:"maxScriptsCacheSize,omitempty"` // The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
-}
-
-// Enable enables debugger for the given page. Clients should not assume that
-// the debugging has been enabled until the result for this command is received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-enable
-//
-// parameters:
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// WithMaxScriptsCacheSize the maximum size in bytes of collected scripts
-// (not referenced by other heap objects) the debugger can hold. Puts no limit
-// if parameter is omitted.
-func (p EnableParams) WithMaxScriptsCacheSize(maxScriptsCacheSize float64) *EnableParams {
- p.MaxScriptsCacheSize = maxScriptsCacheSize
- return &p
-}
-
-// EnableReturns return values.
-type EnableReturns struct {
- DebuggerID runtime.UniqueDebuggerID `json:"debuggerId,omitempty"` // Unique identifier of the debugger.
-}
-
-// Do executes Debugger.enable against the provided context.
-//
-// returns:
-// debuggerID - Unique identifier of the debugger.
-func (p *EnableParams) Do(ctx context.Context) (debuggerID runtime.UniqueDebuggerID, err error) {
- // execute
- var res EnableReturns
- err = cdp.Execute(ctx, CommandEnable, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.DebuggerID, nil
-}
-
-// EvaluateOnCallFrameParams evaluates expression on a given call frame.
-type EvaluateOnCallFrameParams struct {
- CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier to evaluate on.
- Expression string `json:"expression"` // Expression to evaluate.
- ObjectGroup string `json:"objectGroup,omitempty"` // String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup).
- IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Specifies whether command line API should be available to the evaluated expression, defaults to false.
- Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
- ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation.
- Timeout runtime.TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
-}
-
-// EvaluateOnCallFrame evaluates expression on a given call frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-evaluateOnCallFrame
-//
-// parameters:
-// callFrameID - Call frame identifier to evaluate on.
-// expression - Expression to evaluate.
-func EvaluateOnCallFrame(callFrameID CallFrameID, expression string) *EvaluateOnCallFrameParams {
- return &EvaluateOnCallFrameParams{
- CallFrameID: callFrameID,
- Expression: expression,
- }
-}
-
-// WithObjectGroup string object group name to put result into (allows rapid
-// releasing resulting object handles using releaseObjectGroup).
-func (p EvaluateOnCallFrameParams) WithObjectGroup(objectGroup string) *EvaluateOnCallFrameParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// WithIncludeCommandLineAPI specifies whether command line API should be
-// available to the evaluated expression, defaults to false.
-func (p EvaluateOnCallFrameParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateOnCallFrameParams {
- p.IncludeCommandLineAPI = includeCommandLineAPI
- return &p
-}
-
-// WithSilent in silent mode exceptions thrown during evaluation are not
-// reported and do not pause execution. Overrides setPauseOnException state.
-func (p EvaluateOnCallFrameParams) WithSilent(silent bool) *EvaluateOnCallFrameParams {
- p.Silent = silent
- return &p
-}
-
-// WithReturnByValue whether the result is expected to be a JSON object that
-// should be sent by value.
-func (p EvaluateOnCallFrameParams) WithReturnByValue(returnByValue bool) *EvaluateOnCallFrameParams {
- p.ReturnByValue = returnByValue
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the result.
-func (p EvaluateOnCallFrameParams) WithGeneratePreview(generatePreview bool) *EvaluateOnCallFrameParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// WithThrowOnSideEffect whether to throw an exception if side effect cannot
-// be ruled out during evaluation.
-func (p EvaluateOnCallFrameParams) WithThrowOnSideEffect(throwOnSideEffect bool) *EvaluateOnCallFrameParams {
- p.ThrowOnSideEffect = throwOnSideEffect
- return &p
-}
-
-// WithTimeout terminate execution after timing out (number of milliseconds).
-func (p EvaluateOnCallFrameParams) WithTimeout(timeout runtime.TimeDelta) *EvaluateOnCallFrameParams {
- p.Timeout = timeout
- return &p
-}
-
-// EvaluateOnCallFrameReturns return values.
-type EvaluateOnCallFrameReturns struct {
- Result *runtime.RemoteObject `json:"result,omitempty"` // Object wrapper for the evaluation result.
- ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Debugger.evaluateOnCallFrame against the provided context.
-//
-// returns:
-// result - Object wrapper for the evaluation result.
-// exceptionDetails - Exception details.
-func (p *EvaluateOnCallFrameParams) Do(ctx context.Context) (result *runtime.RemoteObject, exceptionDetails *runtime.ExceptionDetails, err error) {
- // execute
- var res EvaluateOnCallFrameReturns
- err = cdp.Execute(ctx, CommandEvaluateOnCallFrame, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Result, res.ExceptionDetails, nil
-}
-
-// GetPossibleBreakpointsParams returns possible locations for breakpoint.
-// scriptId in start and end range locations should be the same.
-type GetPossibleBreakpointsParams struct {
- Start *Location `json:"start"` // Start of range to search possible breakpoint locations in.
- End *Location `json:"end,omitempty"` // End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
- RestrictToFunction bool `json:"restrictToFunction,omitempty"` // Only consider locations which are in the same (non-nested) function as start.
-}
-
-// GetPossibleBreakpoints returns possible locations for breakpoint. scriptId
-// in start and end range locations should be the same.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getPossibleBreakpoints
-//
-// parameters:
-// start - Start of range to search possible breakpoint locations in.
-func GetPossibleBreakpoints(start *Location) *GetPossibleBreakpointsParams {
- return &GetPossibleBreakpointsParams{
- Start: start,
- }
-}
-
-// WithEnd end of range to search possible breakpoint locations in
-// (excluding). When not specified, end of scripts is used as end of range.
-func (p GetPossibleBreakpointsParams) WithEnd(end *Location) *GetPossibleBreakpointsParams {
- p.End = end
- return &p
-}
-
-// WithRestrictToFunction only consider locations which are in the same
-// (non-nested) function as start.
-func (p GetPossibleBreakpointsParams) WithRestrictToFunction(restrictToFunction bool) *GetPossibleBreakpointsParams {
- p.RestrictToFunction = restrictToFunction
- return &p
-}
-
-// GetPossibleBreakpointsReturns return values.
-type GetPossibleBreakpointsReturns struct {
- Locations []*BreakLocation `json:"locations,omitempty"` // List of the possible breakpoint locations.
-}
-
-// Do executes Debugger.getPossibleBreakpoints against the provided context.
-//
-// returns:
-// locations - List of the possible breakpoint locations.
-func (p *GetPossibleBreakpointsParams) Do(ctx context.Context) (locations []*BreakLocation, err error) {
- // execute
- var res GetPossibleBreakpointsReturns
- err = cdp.Execute(ctx, CommandGetPossibleBreakpoints, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Locations, nil
-}
-
-// GetScriptSourceParams returns source for the script with given id.
-type GetScriptSourceParams struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to get source for.
-}
-
-// GetScriptSource returns source for the script with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getScriptSource
-//
-// parameters:
-// scriptID - Id of the script to get source for.
-func GetScriptSource(scriptID runtime.ScriptID) *GetScriptSourceParams {
- return &GetScriptSourceParams{
- ScriptID: scriptID,
- }
-}
-
-// GetScriptSourceReturns return values.
-type GetScriptSourceReturns struct {
- ScriptSource string `json:"scriptSource,omitempty"` // Script source (empty in case of Wasm bytecode).
- Bytecode string `json:"bytecode,omitempty"` // Wasm bytecode.
-}
-
-// Do executes Debugger.getScriptSource against the provided context.
-//
-// returns:
-// scriptSource - Script source (empty in case of Wasm bytecode).
-// bytecode - Wasm bytecode.
-func (p *GetScriptSourceParams) Do(ctx context.Context) (scriptSource string, bytecode []byte, err error) {
- // execute
- var res GetScriptSourceReturns
- err = cdp.Execute(ctx, CommandGetScriptSource, p, &res)
- if err != nil {
- return "", nil, err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.Bytecode)
- if err != nil {
- return "", nil, err
- }
- return res.ScriptSource, dec, nil
-}
-
-// GetStackTraceParams returns stack trace with given stackTraceId.
-type GetStackTraceParams struct {
- StackTraceID *runtime.StackTraceID `json:"stackTraceId"`
-}
-
-// GetStackTrace returns stack trace with given stackTraceId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getStackTrace
-//
-// parameters:
-// stackTraceID
-func GetStackTrace(stackTraceID *runtime.StackTraceID) *GetStackTraceParams {
- return &GetStackTraceParams{
- StackTraceID: stackTraceID,
- }
-}
-
-// GetStackTraceReturns return values.
-type GetStackTraceReturns struct {
- StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"`
-}
-
-// Do executes Debugger.getStackTrace against the provided context.
-//
-// returns:
-// stackTrace
-func (p *GetStackTraceParams) Do(ctx context.Context) (stackTrace *runtime.StackTrace, err error) {
- // execute
- var res GetStackTraceReturns
- err = cdp.Execute(ctx, CommandGetStackTrace, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.StackTrace, nil
-}
-
-// PauseParams stops on the next JavaScript statement.
-type PauseParams struct{}
-
-// Pause stops on the next JavaScript statement.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-pause
-func Pause() *PauseParams {
- return &PauseParams{}
-}
-
-// Do executes Debugger.pause against the provided context.
-func (p *PauseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandPause, nil, nil)
-}
-
-// RemoveBreakpointParams removes JavaScript breakpoint.
-type RemoveBreakpointParams struct {
- BreakpointID BreakpointID `json:"breakpointId"`
-}
-
-// RemoveBreakpoint removes JavaScript breakpoint.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-removeBreakpoint
-//
-// parameters:
-// breakpointID
-func RemoveBreakpoint(breakpointID BreakpointID) *RemoveBreakpointParams {
- return &RemoveBreakpointParams{
- BreakpointID: breakpointID,
- }
-}
-
-// Do executes Debugger.removeBreakpoint against the provided context.
-func (p *RemoveBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveBreakpoint, p, nil)
-}
-
-// ResumeParams resumes JavaScript execution.
-type ResumeParams struct {
- TerminateOnResume bool `json:"terminateOnResume,omitempty"` // Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
-}
-
-// Resume resumes JavaScript execution.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-resume
-//
-// parameters:
-func Resume() *ResumeParams {
- return &ResumeParams{}
-}
-
-// WithTerminateOnResume set to true to terminate execution upon resuming
-// execution. In contrast to Runtime.terminateExecution, this will allows to
-// execute further JavaScript (i.e. via evaluation) until execution of the
-// paused code is actually resumed, at which point termination is triggered. If
-// execution is currently not paused, this parameter has no effect.
-func (p ResumeParams) WithTerminateOnResume(terminateOnResume bool) *ResumeParams {
- p.TerminateOnResume = terminateOnResume
- return &p
-}
-
-// Do executes Debugger.resume against the provided context.
-func (p *ResumeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandResume, p, nil)
-}
-
-// SearchInContentParams searches for given string in script content.
-type SearchInContentParams struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to search in.
- Query string `json:"query"` // String to search for.
- CaseSensitive bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive.
- IsRegex bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex.
-}
-
-// SearchInContent searches for given string in script content.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-searchInContent
-//
-// parameters:
-// scriptID - Id of the script to search in.
-// query - String to search for.
-func SearchInContent(scriptID runtime.ScriptID, query string) *SearchInContentParams {
- return &SearchInContentParams{
- ScriptID: scriptID,
- Query: query,
- }
-}
-
-// WithCaseSensitive if true, search is case sensitive.
-func (p SearchInContentParams) WithCaseSensitive(caseSensitive bool) *SearchInContentParams {
- p.CaseSensitive = caseSensitive
- return &p
-}
-
-// WithIsRegex if true, treats string parameter as regex.
-func (p SearchInContentParams) WithIsRegex(isRegex bool) *SearchInContentParams {
- p.IsRegex = isRegex
- return &p
-}
-
-// SearchInContentReturns return values.
-type SearchInContentReturns struct {
- Result []*SearchMatch `json:"result,omitempty"` // List of search matches.
-}
-
-// Do executes Debugger.searchInContent against the provided context.
-//
-// returns:
-// result - List of search matches.
-func (p *SearchInContentParams) Do(ctx context.Context) (result []*SearchMatch, err error) {
- // execute
- var res SearchInContentReturns
- err = cdp.Execute(ctx, CommandSearchInContent, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// SetAsyncCallStackDepthParams enables or disables async call stacks
-// tracking.
-type SetAsyncCallStackDepthParams struct {
- MaxDepth int64 `json:"maxDepth"` // Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).
-}
-
-// SetAsyncCallStackDepth enables or disables async call stacks tracking.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setAsyncCallStackDepth
-//
-// parameters:
-// maxDepth - Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).
-func SetAsyncCallStackDepth(maxDepth int64) *SetAsyncCallStackDepthParams {
- return &SetAsyncCallStackDepthParams{
- MaxDepth: maxDepth,
- }
-}
-
-// Do executes Debugger.setAsyncCallStackDepth against the provided context.
-func (p *SetAsyncCallStackDepthParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAsyncCallStackDepth, p, nil)
-}
-
-// SetBlackboxPatternsParams replace previous blackbox patterns with passed
-// ones. Forces backend to skip stepping/pausing in scripts with url matching
-// one of the patterns. VM will try to leave blackboxed script by performing
-// 'step in' several times, finally resorting to 'step out' if unsuccessful.
-type SetBlackboxPatternsParams struct {
- Patterns []string `json:"patterns"` // Array of regexps that will be used to check script url for blackbox state.
-}
-
-// SetBlackboxPatterns replace previous blackbox patterns with passed ones.
-// Forces backend to skip stepping/pausing in scripts with url matching one of
-// the patterns. VM will try to leave blackboxed script by performing 'step in'
-// several times, finally resorting to 'step out' if unsuccessful.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxPatterns
-//
-// parameters:
-// patterns - Array of regexps that will be used to check script url for blackbox state.
-func SetBlackboxPatterns(patterns []string) *SetBlackboxPatternsParams {
- return &SetBlackboxPatternsParams{
- Patterns: patterns,
- }
-}
-
-// Do executes Debugger.setBlackboxPatterns against the provided context.
-func (p *SetBlackboxPatternsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBlackboxPatterns, p, nil)
-}
-
-// SetBlackboxedRangesParams makes backend skip steps in the script in
-// blackboxed ranges. VM will try leave blacklisted scripts by performing 'step
-// in' several times, finally resorting to 'step out' if unsuccessful. Positions
-// array contains positions where blackbox state is changed. First interval
-// isn't blackboxed. Array should be sorted.
-type SetBlackboxedRangesParams struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script.
- Positions []*ScriptPosition `json:"positions"`
-}
-
-// SetBlackboxedRanges makes backend skip steps in the script in blackboxed
-// ranges. VM will try leave blacklisted scripts by performing 'step in' several
-// times, finally resorting to 'step out' if unsuccessful. Positions array
-// contains positions where blackbox state is changed. First interval isn't
-// blackboxed. Array should be sorted.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxedRanges
-//
-// parameters:
-// scriptID - Id of the script.
-// positions
-func SetBlackboxedRanges(scriptID runtime.ScriptID, positions []*ScriptPosition) *SetBlackboxedRangesParams {
- return &SetBlackboxedRangesParams{
- ScriptID: scriptID,
- Positions: positions,
- }
-}
-
-// Do executes Debugger.setBlackboxedRanges against the provided context.
-func (p *SetBlackboxedRangesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBlackboxedRanges, p, nil)
-}
-
-// SetBreakpointParams sets JavaScript breakpoint at a given location.
-type SetBreakpointParams struct {
- Location *Location `json:"location"` // Location to set breakpoint in.
- Condition string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
-}
-
-// SetBreakpoint sets JavaScript breakpoint at a given location.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpoint
-//
-// parameters:
-// location - Location to set breakpoint in.
-func SetBreakpoint(location *Location) *SetBreakpointParams {
- return &SetBreakpointParams{
- Location: location,
- }
-}
-
-// WithCondition expression to use as a breakpoint condition. When specified,
-// debugger will only stop on the breakpoint if this expression evaluates to
-// true.
-func (p SetBreakpointParams) WithCondition(condition string) *SetBreakpointParams {
- p.Condition = condition
- return &p
-}
-
-// SetBreakpointReturns return values.
-type SetBreakpointReturns struct {
- BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Id of the created breakpoint for further reference.
- ActualLocation *Location `json:"actualLocation,omitempty"` // Location this breakpoint resolved into.
-}
-
-// Do executes Debugger.setBreakpoint against the provided context.
-//
-// returns:
-// breakpointID - Id of the created breakpoint for further reference.
-// actualLocation - Location this breakpoint resolved into.
-func (p *SetBreakpointParams) Do(ctx context.Context) (breakpointID BreakpointID, actualLocation *Location, err error) {
- // execute
- var res SetBreakpointReturns
- err = cdp.Execute(ctx, CommandSetBreakpoint, p, &res)
- if err != nil {
- return "", nil, err
- }
-
- return res.BreakpointID, res.ActualLocation, nil
-}
-
-// SetInstrumentationBreakpointParams sets instrumentation breakpoint.
-type SetInstrumentationBreakpointParams struct {
- Instrumentation SetInstrumentationBreakpointInstrumentation `json:"instrumentation"` // Instrumentation name.
-}
-
-// SetInstrumentationBreakpoint sets instrumentation breakpoint.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setInstrumentationBreakpoint
-//
-// parameters:
-// instrumentation - Instrumentation name.
-func SetInstrumentationBreakpoint(instrumentation SetInstrumentationBreakpointInstrumentation) *SetInstrumentationBreakpointParams {
- return &SetInstrumentationBreakpointParams{
- Instrumentation: instrumentation,
- }
-}
-
-// SetInstrumentationBreakpointReturns return values.
-type SetInstrumentationBreakpointReturns struct {
- BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Id of the created breakpoint for further reference.
-}
-
-// Do executes Debugger.setInstrumentationBreakpoint against the provided context.
-//
-// returns:
-// breakpointID - Id of the created breakpoint for further reference.
-func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (breakpointID BreakpointID, err error) {
- // execute
- var res SetInstrumentationBreakpointReturns
- err = cdp.Execute(ctx, CommandSetInstrumentationBreakpoint, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.BreakpointID, nil
-}
-
-// SetBreakpointByURLParams sets JavaScript breakpoint at given location
-// specified either by URL or URL regex. Once this command is issued, all
-// existing parsed scripts will have breakpoints resolved and returned in
-// locations property. Further matching script parsing will result in subsequent
-// breakpointResolved events issued. This logical breakpoint will survive page
-// reloads.
-type SetBreakpointByURLParams struct {
- LineNumber int64 `json:"lineNumber"` // Line number to set breakpoint at.
- URL string `json:"url,omitempty"` // URL of the resources to set breakpoint on.
- URLRegex string `json:"urlRegex,omitempty"` // Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified.
- ScriptHash string `json:"scriptHash,omitempty"` // Script hash of the resources to set breakpoint on.
- ColumnNumber int64 `json:"columnNumber,omitempty"` // Offset in the line to set breakpoint at.
- Condition string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
-}
-
-// SetBreakpointByURL sets JavaScript breakpoint at given location specified
-// either by URL or URL regex. Once this command is issued, all existing parsed
-// scripts will have breakpoints resolved and returned in locations property.
-// Further matching script parsing will result in subsequent breakpointResolved
-// events issued. This logical breakpoint will survive page reloads.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointByUrl
-//
-// parameters:
-// lineNumber - Line number to set breakpoint at.
-func SetBreakpointByURL(lineNumber int64) *SetBreakpointByURLParams {
- return &SetBreakpointByURLParams{
- LineNumber: lineNumber,
- }
-}
-
-// WithURL URL of the resources to set breakpoint on.
-func (p SetBreakpointByURLParams) WithURL(url string) *SetBreakpointByURLParams {
- p.URL = url
- return &p
-}
-
-// WithURLRegex regex pattern for the URLs of the resources to set
-// breakpoints on. Either url or urlRegex must be specified.
-func (p SetBreakpointByURLParams) WithURLRegex(urlRegex string) *SetBreakpointByURLParams {
- p.URLRegex = urlRegex
- return &p
-}
-
-// WithScriptHash script hash of the resources to set breakpoint on.
-func (p SetBreakpointByURLParams) WithScriptHash(scriptHash string) *SetBreakpointByURLParams {
- p.ScriptHash = scriptHash
- return &p
-}
-
-// WithColumnNumber offset in the line to set breakpoint at.
-func (p SetBreakpointByURLParams) WithColumnNumber(columnNumber int64) *SetBreakpointByURLParams {
- p.ColumnNumber = columnNumber
- return &p
-}
-
-// WithCondition expression to use as a breakpoint condition. When specified,
-// debugger will only stop on the breakpoint if this expression evaluates to
-// true.
-func (p SetBreakpointByURLParams) WithCondition(condition string) *SetBreakpointByURLParams {
- p.Condition = condition
- return &p
-}
-
-// SetBreakpointByURLReturns return values.
-type SetBreakpointByURLReturns struct {
- BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Id of the created breakpoint for further reference.
- Locations []*Location `json:"locations,omitempty"` // List of the locations this breakpoint resolved into upon addition.
-}
-
-// Do executes Debugger.setBreakpointByUrl against the provided context.
-//
-// returns:
-// breakpointID - Id of the created breakpoint for further reference.
-// locations - List of the locations this breakpoint resolved into upon addition.
-func (p *SetBreakpointByURLParams) Do(ctx context.Context) (breakpointID BreakpointID, locations []*Location, err error) {
- // execute
- var res SetBreakpointByURLReturns
- err = cdp.Execute(ctx, CommandSetBreakpointByURL, p, &res)
- if err != nil {
- return "", nil, err
- }
-
- return res.BreakpointID, res.Locations, nil
-}
-
-// SetBreakpointOnFunctionCallParams sets JavaScript breakpoint before each
-// call to the given function. If another function was created from the same
-// source as a given one, calling it will also trigger the breakpoint.
-type SetBreakpointOnFunctionCallParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // Function object id.
- Condition string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
-}
-
-// SetBreakpointOnFunctionCall sets JavaScript breakpoint before each call to
-// the given function. If another function was created from the same source as a
-// given one, calling it will also trigger the breakpoint.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointOnFunctionCall
-//
-// parameters:
-// objectID - Function object id.
-func SetBreakpointOnFunctionCall(objectID runtime.RemoteObjectID) *SetBreakpointOnFunctionCallParams {
- return &SetBreakpointOnFunctionCallParams{
- ObjectID: objectID,
- }
-}
-
-// WithCondition expression to use as a breakpoint condition. When specified,
-// debugger will stop on the breakpoint if this expression evaluates to true.
-func (p SetBreakpointOnFunctionCallParams) WithCondition(condition string) *SetBreakpointOnFunctionCallParams {
- p.Condition = condition
- return &p
-}
-
-// SetBreakpointOnFunctionCallReturns return values.
-type SetBreakpointOnFunctionCallReturns struct {
- BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Id of the created breakpoint for further reference.
-}
-
-// Do executes Debugger.setBreakpointOnFunctionCall against the provided context.
-//
-// returns:
-// breakpointID - Id of the created breakpoint for further reference.
-func (p *SetBreakpointOnFunctionCallParams) Do(ctx context.Context) (breakpointID BreakpointID, err error) {
- // execute
- var res SetBreakpointOnFunctionCallReturns
- err = cdp.Execute(ctx, CommandSetBreakpointOnFunctionCall, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.BreakpointID, nil
-}
-
-// SetBreakpointsActiveParams activates / deactivates all breakpoints on the
-// page.
-type SetBreakpointsActiveParams struct {
- Active bool `json:"active"` // New value for breakpoints active state.
-}
-
-// SetBreakpointsActive activates / deactivates all breakpoints on the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointsActive
-//
-// parameters:
-// active - New value for breakpoints active state.
-func SetBreakpointsActive(active bool) *SetBreakpointsActiveParams {
- return &SetBreakpointsActiveParams{
- Active: active,
- }
-}
-
-// Do executes Debugger.setBreakpointsActive against the provided context.
-func (p *SetBreakpointsActiveParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBreakpointsActive, p, nil)
-}
-
-// SetPauseOnExceptionsParams defines pause on exceptions state. Can be set
-// to stop on all exceptions, uncaught exceptions or no exceptions. Initial
-// pause on exceptions state is none.
-type SetPauseOnExceptionsParams struct {
- State ExceptionsState `json:"state"` // Pause on exceptions mode.
-}
-
-// SetPauseOnExceptions defines pause on exceptions state. Can be set to stop
-// on all exceptions, uncaught exceptions or no exceptions. Initial pause on
-// exceptions state is none.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setPauseOnExceptions
-//
-// parameters:
-// state - Pause on exceptions mode.
-func SetPauseOnExceptions(state ExceptionsState) *SetPauseOnExceptionsParams {
- return &SetPauseOnExceptionsParams{
- State: state,
- }
-}
-
-// Do executes Debugger.setPauseOnExceptions against the provided context.
-func (p *SetPauseOnExceptionsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPauseOnExceptions, p, nil)
-}
-
-// SetReturnValueParams changes return value in top frame. Available only at
-// return break position.
-type SetReturnValueParams struct {
- NewValue *runtime.CallArgument `json:"newValue"` // New return value.
-}
-
-// SetReturnValue changes return value in top frame. Available only at return
-// break position.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setReturnValue
-//
-// parameters:
-// newValue - New return value.
-func SetReturnValue(newValue *runtime.CallArgument) *SetReturnValueParams {
- return &SetReturnValueParams{
- NewValue: newValue,
- }
-}
-
-// Do executes Debugger.setReturnValue against the provided context.
-func (p *SetReturnValueParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetReturnValue, p, nil)
-}
-
-// SetScriptSourceParams edits JavaScript source live.
-type SetScriptSourceParams struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to edit.
- ScriptSource string `json:"scriptSource"` // New content of the script.
- DryRun bool `json:"dryRun,omitempty"` // If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
-}
-
-// SetScriptSource edits JavaScript source live.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setScriptSource
-//
-// parameters:
-// scriptID - Id of the script to edit.
-// scriptSource - New content of the script.
-func SetScriptSource(scriptID runtime.ScriptID, scriptSource string) *SetScriptSourceParams {
- return &SetScriptSourceParams{
- ScriptID: scriptID,
- ScriptSource: scriptSource,
- }
-}
-
-// WithDryRun if true the change will not actually be applied. Dry run may be
-// used to get result description without actually modifying the code.
-func (p SetScriptSourceParams) WithDryRun(dryRun bool) *SetScriptSourceParams {
- p.DryRun = dryRun
- return &p
-}
-
-// SetScriptSourceReturns return values.
-type SetScriptSourceReturns struct {
- CallFrames []*CallFrame `json:"callFrames,omitempty"` // New stack trace in case editing has happened while VM was stopped.
- StackChanged bool `json:"stackChanged,omitempty"` // Whether current call stack was modified after applying the changes.
- AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
- AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
- ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if any.
-}
-
-// Do executes Debugger.setScriptSource against the provided context.
-//
-// returns:
-// callFrames - New stack trace in case editing has happened while VM was stopped.
-// stackChanged - Whether current call stack was modified after applying the changes.
-// asyncStackTrace - Async stack trace, if any.
-// asyncStackTraceID - Async stack trace, if any.
-// exceptionDetails - Exception details if any.
-func (p *SetScriptSourceParams) Do(ctx context.Context) (callFrames []*CallFrame, stackChanged bool, asyncStackTrace *runtime.StackTrace, asyncStackTraceID *runtime.StackTraceID, exceptionDetails *runtime.ExceptionDetails, err error) {
- // execute
- var res SetScriptSourceReturns
- err = cdp.Execute(ctx, CommandSetScriptSource, p, &res)
- if err != nil {
- return nil, false, nil, nil, nil, err
- }
-
- return res.CallFrames, res.StackChanged, res.AsyncStackTrace, res.AsyncStackTraceID, res.ExceptionDetails, nil
-}
-
-// SetSkipAllPausesParams makes page not interrupt on any pauses (breakpoint,
-// exception, dom exception etc).
-type SetSkipAllPausesParams struct {
- Skip bool `json:"skip"` // New value for skip pauses state.
-}
-
-// SetSkipAllPauses makes page not interrupt on any pauses (breakpoint,
-// exception, dom exception etc).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setSkipAllPauses
-//
-// parameters:
-// skip - New value for skip pauses state.
-func SetSkipAllPauses(skip bool) *SetSkipAllPausesParams {
- return &SetSkipAllPausesParams{
- Skip: skip,
- }
-}
-
-// Do executes Debugger.setSkipAllPauses against the provided context.
-func (p *SetSkipAllPausesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetSkipAllPauses, p, nil)
-}
-
-// SetVariableValueParams changes value of variable in a callframe.
-// Object-based scopes are not supported and must be mutated manually.
-type SetVariableValueParams struct {
- ScopeNumber int64 `json:"scopeNumber"` // 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
- VariableName string `json:"variableName"` // Variable name.
- NewValue *runtime.CallArgument `json:"newValue"` // New variable value.
- CallFrameID CallFrameID `json:"callFrameId"` // Id of callframe that holds variable.
-}
-
-// SetVariableValue changes value of variable in a callframe. Object-based
-// scopes are not supported and must be mutated manually.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setVariableValue
-//
-// parameters:
-// scopeNumber - 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
-// variableName - Variable name.
-// newValue - New variable value.
-// callFrameID - Id of callframe that holds variable.
-func SetVariableValue(scopeNumber int64, variableName string, newValue *runtime.CallArgument, callFrameID CallFrameID) *SetVariableValueParams {
- return &SetVariableValueParams{
- ScopeNumber: scopeNumber,
- VariableName: variableName,
- NewValue: newValue,
- CallFrameID: callFrameID,
- }
-}
-
-// Do executes Debugger.setVariableValue against the provided context.
-func (p *SetVariableValueParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetVariableValue, p, nil)
-}
-
-// StepIntoParams steps into the function call.
-type StepIntoParams struct {
- BreakOnAsyncCall bool `json:"breakOnAsyncCall,omitempty"` // Debugger will pause on the execution of the first async task which was scheduled before next pause.
- SkipList []*LocationRange `json:"skipList,omitempty"` // The skipList specifies location ranges that should be skipped on step into.
-}
-
-// StepInto steps into the function call.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepInto
-//
-// parameters:
-func StepInto() *StepIntoParams {
- return &StepIntoParams{}
-}
-
-// WithBreakOnAsyncCall debugger will pause on the execution of the first
-// async task which was scheduled before next pause.
-func (p StepIntoParams) WithBreakOnAsyncCall(breakOnAsyncCall bool) *StepIntoParams {
- p.BreakOnAsyncCall = breakOnAsyncCall
- return &p
-}
-
-// WithSkipList the skipList specifies location ranges that should be skipped
-// on step into.
-func (p StepIntoParams) WithSkipList(skipList []*LocationRange) *StepIntoParams {
- p.SkipList = skipList
- return &p
-}
-
-// Do executes Debugger.stepInto against the provided context.
-func (p *StepIntoParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStepInto, p, nil)
-}
-
-// StepOutParams steps out of the function call.
-type StepOutParams struct{}
-
-// StepOut steps out of the function call.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepOut
-func StepOut() *StepOutParams {
- return &StepOutParams{}
-}
-
-// Do executes Debugger.stepOut against the provided context.
-func (p *StepOutParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStepOut, nil, nil)
-}
-
-// StepOverParams steps over the statement.
-type StepOverParams struct {
- SkipList []*LocationRange `json:"skipList,omitempty"` // The skipList specifies location ranges that should be skipped on step over.
-}
-
-// StepOver steps over the statement.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepOver
-//
-// parameters:
-func StepOver() *StepOverParams {
- return &StepOverParams{}
-}
-
-// WithSkipList the skipList specifies location ranges that should be skipped
-// on step over.
-func (p StepOverParams) WithSkipList(skipList []*LocationRange) *StepOverParams {
- p.SkipList = skipList
- return &p
-}
-
-// Do executes Debugger.stepOver against the provided context.
-func (p *StepOverParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStepOver, p, nil)
-}
-
-// Command names.
-const (
- CommandContinueToLocation = "Debugger.continueToLocation"
- CommandDisable = "Debugger.disable"
- CommandEnable = "Debugger.enable"
- CommandEvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"
- CommandGetPossibleBreakpoints = "Debugger.getPossibleBreakpoints"
- CommandGetScriptSource = "Debugger.getScriptSource"
- CommandGetStackTrace = "Debugger.getStackTrace"
- CommandPause = "Debugger.pause"
- CommandRemoveBreakpoint = "Debugger.removeBreakpoint"
- CommandResume = "Debugger.resume"
- CommandSearchInContent = "Debugger.searchInContent"
- CommandSetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"
- CommandSetBlackboxPatterns = "Debugger.setBlackboxPatterns"
- CommandSetBlackboxedRanges = "Debugger.setBlackboxedRanges"
- CommandSetBreakpoint = "Debugger.setBreakpoint"
- CommandSetInstrumentationBreakpoint = "Debugger.setInstrumentationBreakpoint"
- CommandSetBreakpointByURL = "Debugger.setBreakpointByUrl"
- CommandSetBreakpointOnFunctionCall = "Debugger.setBreakpointOnFunctionCall"
- CommandSetBreakpointsActive = "Debugger.setBreakpointsActive"
- CommandSetPauseOnExceptions = "Debugger.setPauseOnExceptions"
- CommandSetReturnValue = "Debugger.setReturnValue"
- CommandSetScriptSource = "Debugger.setScriptSource"
- CommandSetSkipAllPauses = "Debugger.setSkipAllPauses"
- CommandSetVariableValue = "Debugger.setVariableValue"
- CommandStepInto = "Debugger.stepInto"
- CommandStepOut = "Debugger.stepOut"
- CommandStepOver = "Debugger.stepOver"
-)
diff --git a/vendor/github.com/chromedp/cdproto/debugger/easyjson.go b/vendor/github.com/chromedp/cdproto/debugger/easyjson.go
deleted file mode 100644
index 625a987d1c3..00000000000
--- a/vendor/github.com/chromedp/cdproto/debugger/easyjson.go
+++ /dev/null
@@ -1,4823 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package debugger
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger(in *jlexer.Lexer, out *StepOverParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "skipList":
- if in.IsNull() {
- in.Skip()
- out.SkipList = nil
- } else {
- in.Delim('[')
- if out.SkipList == nil {
- if !in.IsDelim(']') {
- out.SkipList = make([]*LocationRange, 0, 8)
- } else {
- out.SkipList = []*LocationRange{}
- }
- } else {
- out.SkipList = (out.SkipList)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *LocationRange
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(LocationRange)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.SkipList = append(out.SkipList, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger(out *jwriter.Writer, in StepOverParams) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.SkipList) != 0 {
- const prefix string = ",\"skipList\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.SkipList {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StepOverParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StepOverParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StepOverParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StepOverParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger1(in *jlexer.Lexer, out *StepOutParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger1(out *jwriter.Writer, in StepOutParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StepOutParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StepOutParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StepOutParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StepOutParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger2(in *jlexer.Lexer, out *StepIntoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakOnAsyncCall":
- out.BreakOnAsyncCall = bool(in.Bool())
- case "skipList":
- if in.IsNull() {
- in.Skip()
- out.SkipList = nil
- } else {
- in.Delim('[')
- if out.SkipList == nil {
- if !in.IsDelim(']') {
- out.SkipList = make([]*LocationRange, 0, 8)
- } else {
- out.SkipList = []*LocationRange{}
- }
- } else {
- out.SkipList = (out.SkipList)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *LocationRange
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(LocationRange)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.SkipList = append(out.SkipList, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger2(out *jwriter.Writer, in StepIntoParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BreakOnAsyncCall {
- const prefix string = ",\"breakOnAsyncCall\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.BreakOnAsyncCall))
- }
- if len(in.SkipList) != 0 {
- const prefix string = ",\"skipList\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v5, v6 := range in.SkipList {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StepIntoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StepIntoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StepIntoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StepIntoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger3(in *jlexer.Lexer, out *SetVariableValueParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scopeNumber":
- out.ScopeNumber = int64(in.Int64())
- case "variableName":
- out.VariableName = string(in.String())
- case "newValue":
- if in.IsNull() {
- in.Skip()
- out.NewValue = nil
- } else {
- if out.NewValue == nil {
- out.NewValue = new(runtime.CallArgument)
- }
- (*out.NewValue).UnmarshalEasyJSON(in)
- }
- case "callFrameId":
- out.CallFrameID = CallFrameID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger3(out *jwriter.Writer, in SetVariableValueParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scopeNumber\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ScopeNumber))
- }
- {
- const prefix string = ",\"variableName\":"
- out.RawString(prefix)
- out.String(string(in.VariableName))
- }
- {
- const prefix string = ",\"newValue\":"
- out.RawString(prefix)
- if in.NewValue == nil {
- out.RawString("null")
- } else {
- (*in.NewValue).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"callFrameId\":"
- out.RawString(prefix)
- out.String(string(in.CallFrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetVariableValueParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetVariableValueParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetVariableValueParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetVariableValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger4(in *jlexer.Lexer, out *SetSkipAllPausesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "skip":
- out.Skip = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger4(out *jwriter.Writer, in SetSkipAllPausesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"skip\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Skip))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetSkipAllPausesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetSkipAllPausesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetSkipAllPausesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetSkipAllPausesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger5(in *jlexer.Lexer, out *SetScriptSourceReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callFrames":
- if in.IsNull() {
- in.Skip()
- out.CallFrames = nil
- } else {
- in.Delim('[')
- if out.CallFrames == nil {
- if !in.IsDelim(']') {
- out.CallFrames = make([]*CallFrame, 0, 8)
- } else {
- out.CallFrames = []*CallFrame{}
- }
- } else {
- out.CallFrames = (out.CallFrames)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *CallFrame
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(CallFrame)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.CallFrames = append(out.CallFrames, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "stackChanged":
- out.StackChanged = bool(in.Bool())
- case "asyncStackTrace":
- if in.IsNull() {
- in.Skip()
- out.AsyncStackTrace = nil
- } else {
- if out.AsyncStackTrace == nil {
- out.AsyncStackTrace = new(runtime.StackTrace)
- }
- (*out.AsyncStackTrace).UnmarshalEasyJSON(in)
- }
- case "asyncStackTraceId":
- if in.IsNull() {
- in.Skip()
- out.AsyncStackTraceID = nil
- } else {
- if out.AsyncStackTraceID == nil {
- out.AsyncStackTraceID = new(runtime.StackTraceID)
- }
- (*out.AsyncStackTraceID).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(runtime.ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger5(out *jwriter.Writer, in SetScriptSourceReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.CallFrames) != 0 {
- const prefix string = ",\"callFrames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.CallFrames {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.StackChanged {
- const prefix string = ",\"stackChanged\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.StackChanged))
- }
- if in.AsyncStackTrace != nil {
- const prefix string = ",\"asyncStackTrace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AsyncStackTrace).MarshalEasyJSON(out)
- }
- if in.AsyncStackTraceID != nil {
- const prefix string = ",\"asyncStackTraceId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AsyncStackTraceID).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetScriptSourceReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetScriptSourceReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger6(in *jlexer.Lexer, out *SetScriptSourceParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "scriptSource":
- out.ScriptSource = string(in.String())
- case "dryRun":
- out.DryRun = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger6(out *jwriter.Writer, in SetScriptSourceParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"scriptSource\":"
- out.RawString(prefix)
- out.String(string(in.ScriptSource))
- }
- if in.DryRun {
- const prefix string = ",\"dryRun\":"
- out.RawString(prefix)
- out.Bool(bool(in.DryRun))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetScriptSourceParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetScriptSourceParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger7(in *jlexer.Lexer, out *SetReturnValueParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "newValue":
- if in.IsNull() {
- in.Skip()
- out.NewValue = nil
- } else {
- if out.NewValue == nil {
- out.NewValue = new(runtime.CallArgument)
- }
- (*out.NewValue).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger7(out *jwriter.Writer, in SetReturnValueParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"newValue\":"
- out.RawString(prefix[1:])
- if in.NewValue == nil {
- out.RawString("null")
- } else {
- (*in.NewValue).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetReturnValueParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetReturnValueParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetReturnValueParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetReturnValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger8(in *jlexer.Lexer, out *SetPauseOnExceptionsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "state":
- (out.State).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger8(out *jwriter.Writer, in SetPauseOnExceptionsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"state\":"
- out.RawString(prefix[1:])
- (in.State).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPauseOnExceptionsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPauseOnExceptionsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPauseOnExceptionsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPauseOnExceptionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger9(in *jlexer.Lexer, out *SetInstrumentationBreakpointReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger9(out *jwriter.Writer, in SetInstrumentationBreakpointReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BreakpointID != "" {
- const prefix string = ",\"breakpointId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInstrumentationBreakpointReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInstrumentationBreakpointReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInstrumentationBreakpointReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInstrumentationBreakpointReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger10(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "instrumentation":
- (out.Instrumentation).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger10(out *jwriter.Writer, in SetInstrumentationBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"instrumentation\":"
- out.RawString(prefix[1:])
- (in.Instrumentation).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger11(in *jlexer.Lexer, out *SetBreakpointsActiveParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "active":
- out.Active = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger11(out *jwriter.Writer, in SetBreakpointsActiveParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"active\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Active))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointsActiveParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointsActiveParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointsActiveParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointsActiveParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger12(in *jlexer.Lexer, out *SetBreakpointReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- case "actualLocation":
- if in.IsNull() {
- in.Skip()
- out.ActualLocation = nil
- } else {
- if out.ActualLocation == nil {
- out.ActualLocation = new(Location)
- }
- (*out.ActualLocation).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger12(out *jwriter.Writer, in SetBreakpointReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BreakpointID != "" {
- const prefix string = ",\"breakpointId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- if in.ActualLocation != nil {
- const prefix string = ",\"actualLocation\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ActualLocation).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger13(in *jlexer.Lexer, out *SetBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "condition":
- out.Condition = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger13(out *jwriter.Writer, in SetBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix[1:])
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- if in.Condition != "" {
- const prefix string = ",\"condition\":"
- out.RawString(prefix)
- out.String(string(in.Condition))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger14(in *jlexer.Lexer, out *SetBreakpointOnFunctionCallReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger14(out *jwriter.Writer, in SetBreakpointOnFunctionCallReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BreakpointID != "" {
- const prefix string = ",\"breakpointId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointOnFunctionCallReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointOnFunctionCallReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointOnFunctionCallReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointOnFunctionCallReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger15(in *jlexer.Lexer, out *SetBreakpointOnFunctionCallParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "condition":
- out.Condition = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger15(out *jwriter.Writer, in SetBreakpointOnFunctionCallParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- if in.Condition != "" {
- const prefix string = ",\"condition\":"
- out.RawString(prefix)
- out.String(string(in.Condition))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointOnFunctionCallParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointOnFunctionCallParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointOnFunctionCallParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointOnFunctionCallParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger16(in *jlexer.Lexer, out *SetBreakpointByURLReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- case "locations":
- if in.IsNull() {
- in.Skip()
- out.Locations = nil
- } else {
- in.Delim('[')
- if out.Locations == nil {
- if !in.IsDelim(']') {
- out.Locations = make([]*Location, 0, 8)
- } else {
- out.Locations = []*Location{}
- }
- } else {
- out.Locations = (out.Locations)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *Location
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(Location)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Locations = append(out.Locations, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger16(out *jwriter.Writer, in SetBreakpointByURLReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BreakpointID != "" {
- const prefix string = ",\"breakpointId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- if len(in.Locations) != 0 {
- const prefix string = ",\"locations\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v11, v12 := range in.Locations {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointByURLReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointByURLReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointByURLReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointByURLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger17(in *jlexer.Lexer, out *SetBreakpointByURLParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "url":
- out.URL = string(in.String())
- case "urlRegex":
- out.URLRegex = string(in.String())
- case "scriptHash":
- out.ScriptHash = string(in.String())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- case "condition":
- out.Condition = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger17(out *jwriter.Writer, in SetBreakpointByURLParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.LineNumber))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.URLRegex != "" {
- const prefix string = ",\"urlRegex\":"
- out.RawString(prefix)
- out.String(string(in.URLRegex))
- }
- if in.ScriptHash != "" {
- const prefix string = ",\"scriptHash\":"
- out.RawString(prefix)
- out.String(string(in.ScriptHash))
- }
- if in.ColumnNumber != 0 {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- if in.Condition != "" {
- const prefix string = ",\"condition\":"
- out.RawString(prefix)
- out.String(string(in.Condition))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakpointByURLParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakpointByURLParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakpointByURLParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakpointByURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger18(in *jlexer.Lexer, out *SetBlackboxedRangesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "positions":
- if in.IsNull() {
- in.Skip()
- out.Positions = nil
- } else {
- in.Delim('[')
- if out.Positions == nil {
- if !in.IsDelim(']') {
- out.Positions = make([]*ScriptPosition, 0, 8)
- } else {
- out.Positions = []*ScriptPosition{}
- }
- } else {
- out.Positions = (out.Positions)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *ScriptPosition
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(ScriptPosition)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Positions = append(out.Positions, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger18(out *jwriter.Writer, in SetBlackboxedRangesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"positions\":"
- out.RawString(prefix)
- if in.Positions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Positions {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBlackboxedRangesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBlackboxedRangesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBlackboxedRangesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBlackboxedRangesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger19(in *jlexer.Lexer, out *SetBlackboxPatternsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "patterns":
- if in.IsNull() {
- in.Skip()
- out.Patterns = nil
- } else {
- in.Delim('[')
- if out.Patterns == nil {
- if !in.IsDelim(']') {
- out.Patterns = make([]string, 0, 4)
- } else {
- out.Patterns = []string{}
- }
- } else {
- out.Patterns = (out.Patterns)[:0]
- }
- for !in.IsDelim(']') {
- var v16 string
- v16 = string(in.String())
- out.Patterns = append(out.Patterns, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger19(out *jwriter.Writer, in SetBlackboxPatternsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"patterns\":"
- out.RawString(prefix[1:])
- if in.Patterns == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v17, v18 := range in.Patterns {
- if v17 > 0 {
- out.RawByte(',')
- }
- out.String(string(v18))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBlackboxPatternsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBlackboxPatternsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBlackboxPatternsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBlackboxPatternsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger20(in *jlexer.Lexer, out *SetAsyncCallStackDepthParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "maxDepth":
- out.MaxDepth = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger20(out *jwriter.Writer, in SetAsyncCallStackDepthParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"maxDepth\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.MaxDepth))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAsyncCallStackDepthParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAsyncCallStackDepthParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAsyncCallStackDepthParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAsyncCallStackDepthParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger21(in *jlexer.Lexer, out *SearchMatch) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "lineNumber":
- out.LineNumber = float64(in.Float64())
- case "lineContent":
- out.LineContent = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger21(out *jwriter.Writer, in SearchMatch) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.LineNumber))
- }
- {
- const prefix string = ",\"lineContent\":"
- out.RawString(prefix)
- out.String(string(in.LineContent))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchMatch) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchMatch) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchMatch) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchMatch) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger22(in *jlexer.Lexer, out *SearchInContentReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*SearchMatch, 0, 8)
- } else {
- out.Result = []*SearchMatch{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *SearchMatch
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(SearchMatch)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger22(out *jwriter.Writer, in SearchInContentReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v20, v21 := range in.Result {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInContentReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInContentReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInContentReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger23(in *jlexer.Lexer, out *SearchInContentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "query":
- out.Query = string(in.String())
- case "caseSensitive":
- out.CaseSensitive = bool(in.Bool())
- case "isRegex":
- out.IsRegex = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger23(out *jwriter.Writer, in SearchInContentParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"query\":"
- out.RawString(prefix)
- out.String(string(in.Query))
- }
- if in.CaseSensitive {
- const prefix string = ",\"caseSensitive\":"
- out.RawString(prefix)
- out.Bool(bool(in.CaseSensitive))
- }
- if in.IsRegex {
- const prefix string = ",\"isRegex\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsRegex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInContentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInContentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInContentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger24(in *jlexer.Lexer, out *ScriptPosition) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger24(out *jwriter.Writer, in ScriptPosition) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScriptPosition) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScriptPosition) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScriptPosition) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScriptPosition) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger25(in *jlexer.Lexer, out *Scope) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "object":
- if in.IsNull() {
- in.Skip()
- out.Object = nil
- } else {
- if out.Object == nil {
- out.Object = new(runtime.RemoteObject)
- }
- (*out.Object).UnmarshalEasyJSON(in)
- }
- case "name":
- out.Name = string(in.String())
- case "startLocation":
- if in.IsNull() {
- in.Skip()
- out.StartLocation = nil
- } else {
- if out.StartLocation == nil {
- out.StartLocation = new(Location)
- }
- (*out.StartLocation).UnmarshalEasyJSON(in)
- }
- case "endLocation":
- if in.IsNull() {
- in.Skip()
- out.EndLocation = nil
- } else {
- if out.EndLocation == nil {
- out.EndLocation = new(Location)
- }
- (*out.EndLocation).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger25(out *jwriter.Writer, in Scope) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"object\":"
- out.RawString(prefix)
- if in.Object == nil {
- out.RawString("null")
- } else {
- (*in.Object).MarshalEasyJSON(out)
- }
- }
- if in.Name != "" {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- if in.StartLocation != nil {
- const prefix string = ",\"startLocation\":"
- out.RawString(prefix)
- (*in.StartLocation).MarshalEasyJSON(out)
- }
- if in.EndLocation != nil {
- const prefix string = ",\"endLocation\":"
- out.RawString(prefix)
- (*in.EndLocation).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Scope) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Scope) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Scope) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Scope) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger26(in *jlexer.Lexer, out *ResumeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "terminateOnResume":
- out.TerminateOnResume = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger26(out *jwriter.Writer, in ResumeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TerminateOnResume {
- const prefix string = ",\"terminateOnResume\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.TerminateOnResume))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResumeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResumeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResumeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResumeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger27(in *jlexer.Lexer, out *RemoveBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger27(out *jwriter.Writer, in RemoveBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"breakpointId\":"
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger28(in *jlexer.Lexer, out *PauseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger28(out *jwriter.Writer, in PauseParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PauseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PauseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PauseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PauseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger29(in *jlexer.Lexer, out *LocationRange) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "start":
- if in.IsNull() {
- in.Skip()
- out.Start = nil
- } else {
- if out.Start == nil {
- out.Start = new(ScriptPosition)
- }
- (*out.Start).UnmarshalEasyJSON(in)
- }
- case "end":
- if in.IsNull() {
- in.Skip()
- out.End = nil
- } else {
- if out.End == nil {
- out.End = new(ScriptPosition)
- }
- (*out.End).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger29(out *jwriter.Writer, in LocationRange) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"start\":"
- out.RawString(prefix)
- if in.Start == nil {
- out.RawString("null")
- } else {
- (*in.Start).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"end\":"
- out.RawString(prefix)
- if in.End == nil {
- out.RawString("null")
- } else {
- (*in.End).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LocationRange) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LocationRange) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LocationRange) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LocationRange) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger30(in *jlexer.Lexer, out *Location) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger30(out *jwriter.Writer, in Location) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- if in.ColumnNumber != 0 {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Location) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Location) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Location) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Location) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger31(in *jlexer.Lexer, out *GetStackTraceReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(runtime.StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger31(out *jwriter.Writer, in GetStackTraceReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- first = false
- out.RawString(prefix[1:])
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetStackTraceReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetStackTraceReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetStackTraceReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetStackTraceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger32(in *jlexer.Lexer, out *GetStackTraceParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "stackTraceId":
- if in.IsNull() {
- in.Skip()
- out.StackTraceID = nil
- } else {
- if out.StackTraceID == nil {
- out.StackTraceID = new(runtime.StackTraceID)
- }
- (*out.StackTraceID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger32(out *jwriter.Writer, in GetStackTraceParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"stackTraceId\":"
- out.RawString(prefix[1:])
- if in.StackTraceID == nil {
- out.RawString("null")
- } else {
- (*in.StackTraceID).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetStackTraceParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetStackTraceParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetStackTraceParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetStackTraceParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger33(in *jlexer.Lexer, out *GetScriptSourceReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptSource":
- out.ScriptSource = string(in.String())
- case "bytecode":
- out.Bytecode = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger33(out *jwriter.Writer, in GetScriptSourceReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ScriptSource != "" {
- const prefix string = ",\"scriptSource\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ScriptSource))
- }
- if in.Bytecode != "" {
- const prefix string = ",\"bytecode\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Bytecode))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetScriptSourceReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetScriptSourceReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetScriptSourceReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetScriptSourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger34(in *jlexer.Lexer, out *GetScriptSourceParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger34(out *jwriter.Writer, in GetScriptSourceParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetScriptSourceParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetScriptSourceParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetScriptSourceParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetScriptSourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger35(in *jlexer.Lexer, out *GetPossibleBreakpointsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "locations":
- if in.IsNull() {
- in.Skip()
- out.Locations = nil
- } else {
- in.Delim('[')
- if out.Locations == nil {
- if !in.IsDelim(']') {
- out.Locations = make([]*BreakLocation, 0, 8)
- } else {
- out.Locations = []*BreakLocation{}
- }
- } else {
- out.Locations = (out.Locations)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *BreakLocation
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(BreakLocation)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.Locations = append(out.Locations, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger35(out *jwriter.Writer, in GetPossibleBreakpointsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Locations) != 0 {
- const prefix string = ",\"locations\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v23, v24 := range in.Locations {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPossibleBreakpointsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPossibleBreakpointsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPossibleBreakpointsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPossibleBreakpointsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger36(in *jlexer.Lexer, out *GetPossibleBreakpointsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "start":
- if in.IsNull() {
- in.Skip()
- out.Start = nil
- } else {
- if out.Start == nil {
- out.Start = new(Location)
- }
- (*out.Start).UnmarshalEasyJSON(in)
- }
- case "end":
- if in.IsNull() {
- in.Skip()
- out.End = nil
- } else {
- if out.End == nil {
- out.End = new(Location)
- }
- (*out.End).UnmarshalEasyJSON(in)
- }
- case "restrictToFunction":
- out.RestrictToFunction = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger36(out *jwriter.Writer, in GetPossibleBreakpointsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"start\":"
- out.RawString(prefix[1:])
- if in.Start == nil {
- out.RawString("null")
- } else {
- (*in.Start).MarshalEasyJSON(out)
- }
- }
- if in.End != nil {
- const prefix string = ",\"end\":"
- out.RawString(prefix)
- (*in.End).MarshalEasyJSON(out)
- }
- if in.RestrictToFunction {
- const prefix string = ",\"restrictToFunction\":"
- out.RawString(prefix)
- out.Bool(bool(in.RestrictToFunction))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPossibleBreakpointsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPossibleBreakpointsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPossibleBreakpointsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPossibleBreakpointsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger37(in *jlexer.Lexer, out *EventScriptParsed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "startLine":
- out.StartLine = int64(in.Int64())
- case "startColumn":
- out.StartColumn = int64(in.Int64())
- case "endLine":
- out.EndLine = int64(in.Int64())
- case "endColumn":
- out.EndColumn = int64(in.Int64())
- case "executionContextId":
- out.ExecutionContextID = runtime.ExecutionContextID(in.Int64())
- case "hash":
- out.Hash = string(in.String())
- case "executionContextAuxData":
- (out.ExecutionContextAuxData).UnmarshalEasyJSON(in)
- case "isLiveEdit":
- out.IsLiveEdit = bool(in.Bool())
- case "sourceMapURL":
- out.SourceMapURL = string(in.String())
- case "hasSourceURL":
- out.HasSourceURL = bool(in.Bool())
- case "isModule":
- out.IsModule = bool(in.Bool())
- case "length":
- out.Length = int64(in.Int64())
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(runtime.StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- case "codeOffset":
- out.CodeOffset = int64(in.Int64())
- case "scriptLanguage":
- (out.ScriptLanguage).UnmarshalEasyJSON(in)
- case "debugSymbols":
- if in.IsNull() {
- in.Skip()
- out.DebugSymbols = nil
- } else {
- if out.DebugSymbols == nil {
- out.DebugSymbols = new(DebugSymbols)
- }
- (*out.DebugSymbols).UnmarshalEasyJSON(in)
- }
- case "embedderName":
- out.EmbedderName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger37(out *jwriter.Writer, in EventScriptParsed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"startLine\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartLine))
- }
- {
- const prefix string = ",\"startColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartColumn))
- }
- {
- const prefix string = ",\"endLine\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndLine))
- }
- {
- const prefix string = ",\"endColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndColumn))
- }
- {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- {
- const prefix string = ",\"hash\":"
- out.RawString(prefix)
- out.String(string(in.Hash))
- }
- if (in.ExecutionContextAuxData).IsDefined() {
- const prefix string = ",\"executionContextAuxData\":"
- out.RawString(prefix)
- (in.ExecutionContextAuxData).MarshalEasyJSON(out)
- }
- if in.IsLiveEdit {
- const prefix string = ",\"isLiveEdit\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsLiveEdit))
- }
- if in.SourceMapURL != "" {
- const prefix string = ",\"sourceMapURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceMapURL))
- }
- if in.HasSourceURL {
- const prefix string = ",\"hasSourceURL\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasSourceURL))
- }
- if in.IsModule {
- const prefix string = ",\"isModule\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsModule))
- }
- if in.Length != 0 {
- const prefix string = ",\"length\":"
- out.RawString(prefix)
- out.Int64(int64(in.Length))
- }
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- out.RawString(prefix)
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- if in.CodeOffset != 0 {
- const prefix string = ",\"codeOffset\":"
- out.RawString(prefix)
- out.Int64(int64(in.CodeOffset))
- }
- if in.ScriptLanguage != "" {
- const prefix string = ",\"scriptLanguage\":"
- out.RawString(prefix)
- (in.ScriptLanguage).MarshalEasyJSON(out)
- }
- if in.DebugSymbols != nil {
- const prefix string = ",\"debugSymbols\":"
- out.RawString(prefix)
- (*in.DebugSymbols).MarshalEasyJSON(out)
- }
- if in.EmbedderName != "" {
- const prefix string = ",\"embedderName\":"
- out.RawString(prefix)
- out.String(string(in.EmbedderName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventScriptParsed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventScriptParsed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventScriptParsed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventScriptParsed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger38(in *jlexer.Lexer, out *EventScriptFailedToParse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "startLine":
- out.StartLine = int64(in.Int64())
- case "startColumn":
- out.StartColumn = int64(in.Int64())
- case "endLine":
- out.EndLine = int64(in.Int64())
- case "endColumn":
- out.EndColumn = int64(in.Int64())
- case "executionContextId":
- out.ExecutionContextID = runtime.ExecutionContextID(in.Int64())
- case "hash":
- out.Hash = string(in.String())
- case "executionContextAuxData":
- (out.ExecutionContextAuxData).UnmarshalEasyJSON(in)
- case "sourceMapURL":
- out.SourceMapURL = string(in.String())
- case "hasSourceURL":
- out.HasSourceURL = bool(in.Bool())
- case "isModule":
- out.IsModule = bool(in.Bool())
- case "length":
- out.Length = int64(in.Int64())
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(runtime.StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- case "codeOffset":
- out.CodeOffset = int64(in.Int64())
- case "scriptLanguage":
- (out.ScriptLanguage).UnmarshalEasyJSON(in)
- case "embedderName":
- out.EmbedderName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger38(out *jwriter.Writer, in EventScriptFailedToParse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"startLine\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartLine))
- }
- {
- const prefix string = ",\"startColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartColumn))
- }
- {
- const prefix string = ",\"endLine\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndLine))
- }
- {
- const prefix string = ",\"endColumn\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndColumn))
- }
- {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- {
- const prefix string = ",\"hash\":"
- out.RawString(prefix)
- out.String(string(in.Hash))
- }
- if (in.ExecutionContextAuxData).IsDefined() {
- const prefix string = ",\"executionContextAuxData\":"
- out.RawString(prefix)
- (in.ExecutionContextAuxData).MarshalEasyJSON(out)
- }
- if in.SourceMapURL != "" {
- const prefix string = ",\"sourceMapURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceMapURL))
- }
- if in.HasSourceURL {
- const prefix string = ",\"hasSourceURL\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasSourceURL))
- }
- if in.IsModule {
- const prefix string = ",\"isModule\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsModule))
- }
- if in.Length != 0 {
- const prefix string = ",\"length\":"
- out.RawString(prefix)
- out.Int64(int64(in.Length))
- }
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- out.RawString(prefix)
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- if in.CodeOffset != 0 {
- const prefix string = ",\"codeOffset\":"
- out.RawString(prefix)
- out.Int64(int64(in.CodeOffset))
- }
- if in.ScriptLanguage != "" {
- const prefix string = ",\"scriptLanguage\":"
- out.RawString(prefix)
- (in.ScriptLanguage).MarshalEasyJSON(out)
- }
- if in.EmbedderName != "" {
- const prefix string = ",\"embedderName\":"
- out.RawString(prefix)
- out.String(string(in.EmbedderName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventScriptFailedToParse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventScriptFailedToParse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventScriptFailedToParse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventScriptFailedToParse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger39(in *jlexer.Lexer, out *EventResumed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger39(out *jwriter.Writer, in EventResumed) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventResumed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventResumed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventResumed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventResumed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger40(in *jlexer.Lexer, out *EventPaused) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callFrames":
- if in.IsNull() {
- in.Skip()
- out.CallFrames = nil
- } else {
- in.Delim('[')
- if out.CallFrames == nil {
- if !in.IsDelim(']') {
- out.CallFrames = make([]*CallFrame, 0, 8)
- } else {
- out.CallFrames = []*CallFrame{}
- }
- } else {
- out.CallFrames = (out.CallFrames)[:0]
- }
- for !in.IsDelim(']') {
- var v25 *CallFrame
- if in.IsNull() {
- in.Skip()
- v25 = nil
- } else {
- if v25 == nil {
- v25 = new(CallFrame)
- }
- (*v25).UnmarshalEasyJSON(in)
- }
- out.CallFrames = append(out.CallFrames, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- case "data":
- (out.Data).UnmarshalEasyJSON(in)
- case "hitBreakpoints":
- if in.IsNull() {
- in.Skip()
- out.HitBreakpoints = nil
- } else {
- in.Delim('[')
- if out.HitBreakpoints == nil {
- if !in.IsDelim(']') {
- out.HitBreakpoints = make([]string, 0, 4)
- } else {
- out.HitBreakpoints = []string{}
- }
- } else {
- out.HitBreakpoints = (out.HitBreakpoints)[:0]
- }
- for !in.IsDelim(']') {
- var v26 string
- v26 = string(in.String())
- out.HitBreakpoints = append(out.HitBreakpoints, v26)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "asyncStackTrace":
- if in.IsNull() {
- in.Skip()
- out.AsyncStackTrace = nil
- } else {
- if out.AsyncStackTrace == nil {
- out.AsyncStackTrace = new(runtime.StackTrace)
- }
- (*out.AsyncStackTrace).UnmarshalEasyJSON(in)
- }
- case "asyncStackTraceId":
- if in.IsNull() {
- in.Skip()
- out.AsyncStackTraceID = nil
- } else {
- if out.AsyncStackTraceID == nil {
- out.AsyncStackTraceID = new(runtime.StackTraceID)
- }
- (*out.AsyncStackTraceID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger40(out *jwriter.Writer, in EventPaused) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"callFrames\":"
- out.RawString(prefix[1:])
- if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v27, v28 := range in.CallFrames {
- if v27 > 0 {
- out.RawByte(',')
- }
- if v28 == nil {
- out.RawString("null")
- } else {
- (*v28).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- if (in.Data).IsDefined() {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- (in.Data).MarshalEasyJSON(out)
- }
- if len(in.HitBreakpoints) != 0 {
- const prefix string = ",\"hitBreakpoints\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v29, v30 := range in.HitBreakpoints {
- if v29 > 0 {
- out.RawByte(',')
- }
- out.String(string(v30))
- }
- out.RawByte(']')
- }
- }
- if in.AsyncStackTrace != nil {
- const prefix string = ",\"asyncStackTrace\":"
- out.RawString(prefix)
- (*in.AsyncStackTrace).MarshalEasyJSON(out)
- }
- if in.AsyncStackTraceID != nil {
- const prefix string = ",\"asyncStackTraceId\":"
- out.RawString(prefix)
- (*in.AsyncStackTraceID).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPaused) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPaused) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPaused) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPaused) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger41(in *jlexer.Lexer, out *EventBreakpointResolved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "breakpointId":
- out.BreakpointID = BreakpointID(in.String())
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger41(out *jwriter.Writer, in EventBreakpointResolved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"breakpointId\":"
- out.RawString(prefix[1:])
- out.String(string(in.BreakpointID))
- }
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventBreakpointResolved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventBreakpointResolved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventBreakpointResolved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventBreakpointResolved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger42(in *jlexer.Lexer, out *EvaluateOnCallFrameReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(runtime.RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(runtime.ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger42(out *jwriter.Writer, in EvaluateOnCallFrameReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EvaluateOnCallFrameReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EvaluateOnCallFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EvaluateOnCallFrameReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EvaluateOnCallFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger43(in *jlexer.Lexer, out *EvaluateOnCallFrameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callFrameId":
- out.CallFrameID = CallFrameID(in.String())
- case "expression":
- out.Expression = string(in.String())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- case "includeCommandLineAPI":
- out.IncludeCommandLineAPI = bool(in.Bool())
- case "silent":
- out.Silent = bool(in.Bool())
- case "returnByValue":
- out.ReturnByValue = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- case "throwOnSideEffect":
- out.ThrowOnSideEffect = bool(in.Bool())
- case "timeout":
- out.Timeout = runtime.TimeDelta(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger43(out *jwriter.Writer, in EvaluateOnCallFrameParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"callFrameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CallFrameID))
- }
- {
- const prefix string = ",\"expression\":"
- out.RawString(prefix)
- out.String(string(in.Expression))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- if in.IncludeCommandLineAPI {
- const prefix string = ",\"includeCommandLineAPI\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeCommandLineAPI))
- }
- if in.Silent {
- const prefix string = ",\"silent\":"
- out.RawString(prefix)
- out.Bool(bool(in.Silent))
- }
- if in.ReturnByValue {
- const prefix string = ",\"returnByValue\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReturnByValue))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- if in.ThrowOnSideEffect {
- const prefix string = ",\"throwOnSideEffect\":"
- out.RawString(prefix)
- out.Bool(bool(in.ThrowOnSideEffect))
- }
- if in.Timeout != 0 {
- const prefix string = ",\"timeout\":"
- out.RawString(prefix)
- out.Float64(float64(in.Timeout))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EvaluateOnCallFrameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EvaluateOnCallFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EvaluateOnCallFrameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EvaluateOnCallFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger44(in *jlexer.Lexer, out *EnableReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "debuggerId":
- out.DebuggerID = runtime.UniqueDebuggerID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger44(out *jwriter.Writer, in EnableReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DebuggerID != "" {
- const prefix string = ",\"debuggerId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.DebuggerID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger45(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "maxScriptsCacheSize":
- out.MaxScriptsCacheSize = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger45(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.MaxScriptsCacheSize != 0 {
- const prefix string = ",\"maxScriptsCacheSize\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.MaxScriptsCacheSize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger46(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger46(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger47(in *jlexer.Lexer, out *DebugSymbols) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "externalURL":
- out.ExternalURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger47(out *jwriter.Writer, in DebugSymbols) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.ExternalURL != "" {
- const prefix string = ",\"externalURL\":"
- out.RawString(prefix)
- out.String(string(in.ExternalURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DebugSymbols) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DebugSymbols) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DebugSymbols) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DebugSymbols) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger48(in *jlexer.Lexer, out *ContinueToLocationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "targetCallFrames":
- (out.TargetCallFrames).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger48(out *jwriter.Writer, in ContinueToLocationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix[1:])
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- if in.TargetCallFrames != "" {
- const prefix string = ",\"targetCallFrames\":"
- out.RawString(prefix)
- (in.TargetCallFrames).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContinueToLocationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContinueToLocationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContinueToLocationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContinueToLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger49(in *jlexer.Lexer, out *CallFrame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callFrameId":
- out.CallFrameID = CallFrameID(in.String())
- case "functionName":
- out.FunctionName = string(in.String())
- case "functionLocation":
- if in.IsNull() {
- in.Skip()
- out.FunctionLocation = nil
- } else {
- if out.FunctionLocation == nil {
- out.FunctionLocation = new(Location)
- }
- (*out.FunctionLocation).UnmarshalEasyJSON(in)
- }
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "url":
- out.URL = string(in.String())
- case "scopeChain":
- if in.IsNull() {
- in.Skip()
- out.ScopeChain = nil
- } else {
- in.Delim('[')
- if out.ScopeChain == nil {
- if !in.IsDelim(']') {
- out.ScopeChain = make([]*Scope, 0, 8)
- } else {
- out.ScopeChain = []*Scope{}
- }
- } else {
- out.ScopeChain = (out.ScopeChain)[:0]
- }
- for !in.IsDelim(']') {
- var v31 *Scope
- if in.IsNull() {
- in.Skip()
- v31 = nil
- } else {
- if v31 == nil {
- v31 = new(Scope)
- }
- (*v31).UnmarshalEasyJSON(in)
- }
- out.ScopeChain = append(out.ScopeChain, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "this":
- if in.IsNull() {
- in.Skip()
- out.This = nil
- } else {
- if out.This == nil {
- out.This = new(runtime.RemoteObject)
- }
- (*out.This).UnmarshalEasyJSON(in)
- }
- case "returnValue":
- if in.IsNull() {
- in.Skip()
- out.ReturnValue = nil
- } else {
- if out.ReturnValue == nil {
- out.ReturnValue = new(runtime.RemoteObject)
- }
- (*out.ReturnValue).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger49(out *jwriter.Writer, in CallFrame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"callFrameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CallFrameID))
- }
- {
- const prefix string = ",\"functionName\":"
- out.RawString(prefix)
- out.String(string(in.FunctionName))
- }
- if in.FunctionLocation != nil {
- const prefix string = ",\"functionLocation\":"
- out.RawString(prefix)
- (*in.FunctionLocation).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"scopeChain\":"
- out.RawString(prefix)
- if in.ScopeChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v32, v33 := range in.ScopeChain {
- if v32 > 0 {
- out.RawByte(',')
- }
- if v33 == nil {
- out.RawString("null")
- } else {
- (*v33).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"this\":"
- out.RawString(prefix)
- if in.This == nil {
- out.RawString("null")
- } else {
- (*in.This).MarshalEasyJSON(out)
- }
- }
- if in.ReturnValue != nil {
- const prefix string = ",\"returnValue\":"
- out.RawString(prefix)
- (*in.ReturnValue).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CallFrame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CallFrame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger50(in *jlexer.Lexer, out *BreakLocation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger50(out *jwriter.Writer, in BreakLocation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- if in.ColumnNumber != 0 {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- if in.Type != "" {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BreakLocation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BreakLocation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDebugger50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BreakLocation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BreakLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDebugger50(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/debugger/events.go b/vendor/github.com/chromedp/cdproto/debugger/events.go
deleted file mode 100644
index 515519acfa2..00000000000
--- a/vendor/github.com/chromedp/cdproto/debugger/events.go
+++ /dev/null
@@ -1,85 +0,0 @@
-package debugger
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
-)
-
-// EventBreakpointResolved fired when breakpoint is resolved to an actual
-// script and location.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-breakpointResolved
-type EventBreakpointResolved struct {
- BreakpointID BreakpointID `json:"breakpointId"` // Breakpoint unique identifier.
- Location *Location `json:"location"` // Actual breakpoint location.
-}
-
-// EventPaused fired when the virtual machine stopped on breakpoint or
-// exception or any other stop criteria.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-paused
-type EventPaused struct {
- CallFrames []*CallFrame `json:"callFrames"` // Call stack the virtual machine stopped on.
- Reason PausedReason `json:"reason"` // Pause reason.
- Data easyjson.RawMessage `json:"data,omitempty"`
- HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs
- AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
- AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
-}
-
-// EventResumed fired when the virtual machine resumed execution.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-resumed
-type EventResumed struct{}
-
-// EventScriptFailedToParse fired when virtual machine fails to parse the
-// script.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-scriptFailedToParse
-type EventScriptFailedToParse struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
- URL string `json:"url"` // URL or name of the script parsed (if any).
- StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
- StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
- EndLine int64 `json:"endLine"` // Last line of the script.
- EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
- ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
- Hash string `json:"hash"` // Content hash of the script.
- ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
- SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
- HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL.
- IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module.
- Length int64 `json:"length,omitempty"` // This script length.
- StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript top stack frame of where the script parsed event was triggered if available.
- CodeOffset int64 `json:"codeOffset,omitempty"` // If the scriptLanguage is WebAssembly, the code section offset in the module.
- ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // The language of the script.
- EmbedderName string `json:"embedderName,omitempty"` // The name the embedder supplied for this script.
-}
-
-// EventScriptParsed fired when virtual machine parses script. This event is
-// also fired for all known and uncollected scripts upon enabling debugger.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-scriptParsed
-type EventScriptParsed struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
- URL string `json:"url"` // URL or name of the script parsed (if any).
- StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
- StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
- EndLine int64 `json:"endLine"` // Last line of the script.
- EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
- ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
- Hash string `json:"hash"` // Content hash of the script.
- ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
- IsLiveEdit bool `json:"isLiveEdit,omitempty"` // True, if this script is generated as a result of the live edit operation.
- SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
- HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL.
- IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module.
- Length int64 `json:"length,omitempty"` // This script length.
- StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript top stack frame of where the script parsed event was triggered if available.
- CodeOffset int64 `json:"codeOffset,omitempty"` // If the scriptLanguage is WebAssembly, the code section offset in the module.
- ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // The language of the script.
- DebugSymbols *DebugSymbols `json:"debugSymbols,omitempty"` // If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
- EmbedderName string `json:"embedderName,omitempty"` // The name the embedder supplied for this script.
-}
diff --git a/vendor/github.com/chromedp/cdproto/debugger/types.go b/vendor/github.com/chromedp/cdproto/debugger/types.go
deleted file mode 100644
index 4460402ec53..00000000000
--- a/vendor/github.com/chromedp/cdproto/debugger/types.go
+++ /dev/null
@@ -1,527 +0,0 @@
-package debugger
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// BreakpointID breakpoint identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-BreakpointId
-type BreakpointID string
-
-// String returns the BreakpointID as string value.
-func (t BreakpointID) String() string {
- return string(t)
-}
-
-// CallFrameID call frame identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-CallFrameId
-type CallFrameID string
-
-// String returns the CallFrameID as string value.
-func (t CallFrameID) String() string {
- return string(t)
-}
-
-// Location location in the source code.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-Location
-type Location struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
- LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
- ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
-}
-
-// ScriptPosition location in the source code.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-ScriptPosition
-type ScriptPosition struct {
- LineNumber int64 `json:"lineNumber"`
- ColumnNumber int64 `json:"columnNumber"`
-}
-
-// LocationRange location range within one script.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-LocationRange
-type LocationRange struct {
- ScriptID runtime.ScriptID `json:"scriptId"`
- Start *ScriptPosition `json:"start"`
- End *ScriptPosition `json:"end"`
-}
-
-// CallFrame JavaScript call frame. Array of call frames form the call stack.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-CallFrame
-type CallFrame struct {
- CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier. This identifier is only valid while the virtual machine is paused.
- FunctionName string `json:"functionName"` // Name of the JavaScript function called on this call frame.
- FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code.
- Location *Location `json:"location"` // Location in the source code.
- URL string `json:"url"` // JavaScript script name or url.
- ScopeChain []*Scope `json:"scopeChain"` // Scope chain for this call frame.
- This *runtime.RemoteObject `json:"this"` // this object for this call frame.
- ReturnValue *runtime.RemoteObject `json:"returnValue,omitempty"` // The value being returned, if the function is at return point.
-}
-
-// Scope scope description.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-Scope
-type Scope struct {
- Type ScopeType `json:"type"` // Scope type.
- Object *runtime.RemoteObject `json:"object"` // Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
- Name string `json:"name,omitempty"`
- StartLocation *Location `json:"startLocation,omitempty"` // Location in the source code where scope starts
- EndLocation *Location `json:"endLocation,omitempty"` // Location in the source code where scope ends
-}
-
-// SearchMatch search match for resource.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-SearchMatch
-type SearchMatch struct {
- LineNumber float64 `json:"lineNumber"` // Line number in resource content.
- LineContent string `json:"lineContent"` // Line with match content.
-}
-
-// BreakLocation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-BreakLocation
-type BreakLocation struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
- LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
- ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
- Type BreakLocationType `json:"type,omitempty"`
-}
-
-// ScriptLanguage enum of possible script languages.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-ScriptLanguage
-type ScriptLanguage string
-
-// String returns the ScriptLanguage as string value.
-func (t ScriptLanguage) String() string {
- return string(t)
-}
-
-// ScriptLanguage values.
-const (
- ScriptLanguageJavaScript ScriptLanguage = "JavaScript"
- ScriptLanguageWebAssembly ScriptLanguage = "WebAssembly"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ScriptLanguage) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ScriptLanguage) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ScriptLanguage) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ScriptLanguage(in.String()) {
- case ScriptLanguageJavaScript:
- *t = ScriptLanguageJavaScript
- case ScriptLanguageWebAssembly:
- *t = ScriptLanguageWebAssembly
-
- default:
- in.AddError(errors.New("unknown ScriptLanguage value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ScriptLanguage) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DebugSymbols debug symbols available for a wasm script.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-DebugSymbols
-type DebugSymbols struct {
- Type DebugSymbolsType `json:"type"` // Type of the debug symbols.
- ExternalURL string `json:"externalURL,omitempty"` // URL of the external symbol source.
-}
-
-// ScopeType scope type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-Scope
-type ScopeType string
-
-// String returns the ScopeType as string value.
-func (t ScopeType) String() string {
- return string(t)
-}
-
-// ScopeType values.
-const (
- ScopeTypeGlobal ScopeType = "global"
- ScopeTypeLocal ScopeType = "local"
- ScopeTypeWith ScopeType = "with"
- ScopeTypeClosure ScopeType = "closure"
- ScopeTypeCatch ScopeType = "catch"
- ScopeTypeBlock ScopeType = "block"
- ScopeTypeScript ScopeType = "script"
- ScopeTypeEval ScopeType = "eval"
- ScopeTypeModule ScopeType = "module"
- ScopeTypeWasmExpressionStack ScopeType = "wasm-expression-stack"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ScopeType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ScopeType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ScopeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ScopeType(in.String()) {
- case ScopeTypeGlobal:
- *t = ScopeTypeGlobal
- case ScopeTypeLocal:
- *t = ScopeTypeLocal
- case ScopeTypeWith:
- *t = ScopeTypeWith
- case ScopeTypeClosure:
- *t = ScopeTypeClosure
- case ScopeTypeCatch:
- *t = ScopeTypeCatch
- case ScopeTypeBlock:
- *t = ScopeTypeBlock
- case ScopeTypeScript:
- *t = ScopeTypeScript
- case ScopeTypeEval:
- *t = ScopeTypeEval
- case ScopeTypeModule:
- *t = ScopeTypeModule
- case ScopeTypeWasmExpressionStack:
- *t = ScopeTypeWasmExpressionStack
-
- default:
- in.AddError(errors.New("unknown ScopeType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ScopeType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BreakLocationType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-BreakLocation
-type BreakLocationType string
-
-// String returns the BreakLocationType as string value.
-func (t BreakLocationType) String() string {
- return string(t)
-}
-
-// BreakLocationType values.
-const (
- BreakLocationTypeDebuggerStatement BreakLocationType = "debuggerStatement"
- BreakLocationTypeCall BreakLocationType = "call"
- BreakLocationTypeReturn BreakLocationType = "return"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t BreakLocationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t BreakLocationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch BreakLocationType(in.String()) {
- case BreakLocationTypeDebuggerStatement:
- *t = BreakLocationTypeDebuggerStatement
- case BreakLocationTypeCall:
- *t = BreakLocationTypeCall
- case BreakLocationTypeReturn:
- *t = BreakLocationTypeReturn
-
- default:
- in.AddError(errors.New("unknown BreakLocationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BreakLocationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DebugSymbolsType type of the debug symbols.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-DebugSymbols
-type DebugSymbolsType string
-
-// String returns the DebugSymbolsType as string value.
-func (t DebugSymbolsType) String() string {
- return string(t)
-}
-
-// DebugSymbolsType values.
-const (
- DebugSymbolsTypeNone DebugSymbolsType = "None"
- DebugSymbolsTypeSourceMap DebugSymbolsType = "SourceMap"
- DebugSymbolsTypeEmbeddedDWARF DebugSymbolsType = "EmbeddedDWARF"
- DebugSymbolsTypeExternalDWARF DebugSymbolsType = "ExternalDWARF"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DebugSymbolsType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DebugSymbolsType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DebugSymbolsType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DebugSymbolsType(in.String()) {
- case DebugSymbolsTypeNone:
- *t = DebugSymbolsTypeNone
- case DebugSymbolsTypeSourceMap:
- *t = DebugSymbolsTypeSourceMap
- case DebugSymbolsTypeEmbeddedDWARF:
- *t = DebugSymbolsTypeEmbeddedDWARF
- case DebugSymbolsTypeExternalDWARF:
- *t = DebugSymbolsTypeExternalDWARF
-
- default:
- in.AddError(errors.New("unknown DebugSymbolsType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DebugSymbolsType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PausedReason pause reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-paused
-type PausedReason string
-
-// String returns the PausedReason as string value.
-func (t PausedReason) String() string {
- return string(t)
-}
-
-// PausedReason values.
-const (
- PausedReasonAmbiguous PausedReason = "ambiguous"
- PausedReasonAssert PausedReason = "assert"
- PausedReasonCSPViolation PausedReason = "CSPViolation"
- PausedReasonDebugCommand PausedReason = "debugCommand"
- PausedReasonDOM PausedReason = "DOM"
- PausedReasonEventListener PausedReason = "EventListener"
- PausedReasonException PausedReason = "exception"
- PausedReasonInstrumentation PausedReason = "instrumentation"
- PausedReasonOOM PausedReason = "OOM"
- PausedReasonOther PausedReason = "other"
- PausedReasonPromiseRejection PausedReason = "promiseRejection"
- PausedReasonXHR PausedReason = "XHR"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PausedReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PausedReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PausedReason(in.String()) {
- case PausedReasonAmbiguous:
- *t = PausedReasonAmbiguous
- case PausedReasonAssert:
- *t = PausedReasonAssert
- case PausedReasonCSPViolation:
- *t = PausedReasonCSPViolation
- case PausedReasonDebugCommand:
- *t = PausedReasonDebugCommand
- case PausedReasonDOM:
- *t = PausedReasonDOM
- case PausedReasonEventListener:
- *t = PausedReasonEventListener
- case PausedReasonException:
- *t = PausedReasonException
- case PausedReasonInstrumentation:
- *t = PausedReasonInstrumentation
- case PausedReasonOOM:
- *t = PausedReasonOOM
- case PausedReasonOther:
- *t = PausedReasonOther
- case PausedReasonPromiseRejection:
- *t = PausedReasonPromiseRejection
- case PausedReasonXHR:
- *t = PausedReasonXHR
-
- default:
- in.AddError(errors.New("unknown PausedReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PausedReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ContinueToLocationTargetCallFrames [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-continueToLocation
-type ContinueToLocationTargetCallFrames string
-
-// String returns the ContinueToLocationTargetCallFrames as string value.
-func (t ContinueToLocationTargetCallFrames) String() string {
- return string(t)
-}
-
-// ContinueToLocationTargetCallFrames values.
-const (
- ContinueToLocationTargetCallFramesAny ContinueToLocationTargetCallFrames = "any"
- ContinueToLocationTargetCallFramesCurrent ContinueToLocationTargetCallFrames = "current"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContinueToLocationTargetCallFrames) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContinueToLocationTargetCallFrames) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContinueToLocationTargetCallFrames) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContinueToLocationTargetCallFrames(in.String()) {
- case ContinueToLocationTargetCallFramesAny:
- *t = ContinueToLocationTargetCallFramesAny
- case ContinueToLocationTargetCallFramesCurrent:
- *t = ContinueToLocationTargetCallFramesCurrent
-
- default:
- in.AddError(errors.New("unknown ContinueToLocationTargetCallFrames value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContinueToLocationTargetCallFrames) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetInstrumentationBreakpointInstrumentation instrumentation name.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setInstrumentationBreakpoint
-type SetInstrumentationBreakpointInstrumentation string
-
-// String returns the SetInstrumentationBreakpointInstrumentation as string value.
-func (t SetInstrumentationBreakpointInstrumentation) String() string {
- return string(t)
-}
-
-// SetInstrumentationBreakpointInstrumentation values.
-const (
- SetInstrumentationBreakpointInstrumentationBeforeScriptExecution SetInstrumentationBreakpointInstrumentation = "beforeScriptExecution"
- SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution SetInstrumentationBreakpointInstrumentation = "beforeScriptWithSourceMapExecution"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetInstrumentationBreakpointInstrumentation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetInstrumentationBreakpointInstrumentation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetInstrumentationBreakpointInstrumentation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetInstrumentationBreakpointInstrumentation(in.String()) {
- case SetInstrumentationBreakpointInstrumentationBeforeScriptExecution:
- *t = SetInstrumentationBreakpointInstrumentationBeforeScriptExecution
- case SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution:
- *t = SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution
-
- default:
- in.AddError(errors.New("unknown SetInstrumentationBreakpointInstrumentation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetInstrumentationBreakpointInstrumentation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ExceptionsState pause on exceptions mode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setPauseOnExceptions
-type ExceptionsState string
-
-// String returns the ExceptionsState as string value.
-func (t ExceptionsState) String() string {
- return string(t)
-}
-
-// ExceptionsState values.
-const (
- ExceptionsStateNone ExceptionsState = "none"
- ExceptionsStateUncaught ExceptionsState = "uncaught"
- ExceptionsStateAll ExceptionsState = "all"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ExceptionsState) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ExceptionsState) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ExceptionsState) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ExceptionsState(in.String()) {
- case ExceptionsStateNone:
- *t = ExceptionsStateNone
- case ExceptionsStateUncaught:
- *t = ExceptionsStateUncaught
- case ExceptionsStateAll:
- *t = ExceptionsStateAll
-
- default:
- in.AddError(errors.New("unknown ExceptionsState value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ExceptionsState) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go b/vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go
deleted file mode 100644
index 3c0fcce667a..00000000000
--- a/vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Package deviceorientation provides the Chrome DevTools Protocol
-// commands, types, and events for the DeviceOrientation domain.
-//
-// Generated by the cdproto-gen command.
-package deviceorientation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ClearDeviceOrientationOverrideParams clears the overridden Device
-// Orientation.
-type ClearDeviceOrientationOverrideParams struct{}
-
-// ClearDeviceOrientationOverride clears the overridden Device Orientation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceOrientation#method-clearDeviceOrientationOverride
-func ClearDeviceOrientationOverride() *ClearDeviceOrientationOverrideParams {
- return &ClearDeviceOrientationOverrideParams{}
-}
-
-// Do executes DeviceOrientation.clearDeviceOrientationOverride against the provided context.
-func (p *ClearDeviceOrientationOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearDeviceOrientationOverride, nil, nil)
-}
-
-// SetDeviceOrientationOverrideParams overrides the Device Orientation.
-type SetDeviceOrientationOverrideParams struct {
- Alpha float64 `json:"alpha"` // Mock alpha
- Beta float64 `json:"beta"` // Mock beta
- Gamma float64 `json:"gamma"` // Mock gamma
-}
-
-// SetDeviceOrientationOverride overrides the Device Orientation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceOrientation#method-setDeviceOrientationOverride
-//
-// parameters:
-// alpha - Mock alpha
-// beta - Mock beta
-// gamma - Mock gamma
-func SetDeviceOrientationOverride(alpha float64, beta float64, gamma float64) *SetDeviceOrientationOverrideParams {
- return &SetDeviceOrientationOverrideParams{
- Alpha: alpha,
- Beta: beta,
- Gamma: gamma,
- }
-}
-
-// Do executes DeviceOrientation.setDeviceOrientationOverride against the provided context.
-func (p *SetDeviceOrientationOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDeviceOrientationOverride, p, nil)
-}
-
-// Command names.
-const (
- CommandClearDeviceOrientationOverride = "DeviceOrientation.clearDeviceOrientationOverride"
- CommandSetDeviceOrientationOverride = "DeviceOrientation.setDeviceOrientationOverride"
-)
diff --git a/vendor/github.com/chromedp/cdproto/deviceorientation/easyjson.go b/vendor/github.com/chromedp/cdproto/deviceorientation/easyjson.go
deleted file mode 100644
index 6f6e98c5727..00000000000
--- a/vendor/github.com/chromedp/cdproto/deviceorientation/easyjson.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package deviceorientation
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation(in *jlexer.Lexer, out *SetDeviceOrientationOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "alpha":
- out.Alpha = float64(in.Float64())
- case "beta":
- out.Beta = float64(in.Float64())
- case "gamma":
- out.Gamma = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation(out *jwriter.Writer, in SetDeviceOrientationOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"alpha\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Alpha))
- }
- {
- const prefix string = ",\"beta\":"
- out.RawString(prefix)
- out.Float64(float64(in.Beta))
- }
- {
- const prefix string = ",\"gamma\":"
- out.RawString(prefix)
- out.Float64(float64(in.Gamma))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDeviceOrientationOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation1(in *jlexer.Lexer, out *ClearDeviceOrientationOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation1(out *jwriter.Writer, in ClearDeviceOrientationOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearDeviceOrientationOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearDeviceOrientationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceorientation1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearDeviceOrientationOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceorientation1(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/dom/dom.go b/vendor/github.com/chromedp/cdproto/dom/dom.go
deleted file mode 100644
index aa328a2c0ee..00000000000
--- a/vendor/github.com/chromedp/cdproto/dom/dom.go
+++ /dev/null
@@ -1,1694 +0,0 @@
-// Package dom provides the Chrome DevTools Protocol
-// commands, types, and events for the DOM domain.
-//
-// This domain exposes DOM read/write operations. Each DOM Node is
-// represented with its mirror object that has an id. This id can be used to get
-// additional information on the Node, resolve it into the JavaScript object
-// wrapper, etc. It is important that client receives DOM events only for the
-// nodes that are known to the client. Backend keeps track of the nodes that
-// were sent to the client and never sends the same node twice. It is client's
-// responsibility to collect information about the nodes that were sent to the
-// client.
-//
-// Note that iframe owner elements will return corresponding document
-// elements as their child nodes.
-//
-// Generated by the cdproto-gen command.
-package dom
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// CollectClassNamesFromSubtreeParams collects class names for the node with
-// given id and all of it's child nodes.
-type CollectClassNamesFromSubtreeParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to collect class names.
-}
-
-// CollectClassNamesFromSubtree collects class names for the node with given
-// id and all of it's child nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-collectClassNamesFromSubtree
-//
-// parameters:
-// nodeID - Id of the node to collect class names.
-func CollectClassNamesFromSubtree(nodeID cdp.NodeID) *CollectClassNamesFromSubtreeParams {
- return &CollectClassNamesFromSubtreeParams{
- NodeID: nodeID,
- }
-}
-
-// CollectClassNamesFromSubtreeReturns return values.
-type CollectClassNamesFromSubtreeReturns struct {
- ClassNames []string `json:"classNames,omitempty"` // Class name list.
-}
-
-// Do executes DOM.collectClassNamesFromSubtree against the provided context.
-//
-// returns:
-// classNames - Class name list.
-func (p *CollectClassNamesFromSubtreeParams) Do(ctx context.Context) (classNames []string, err error) {
- // execute
- var res CollectClassNamesFromSubtreeReturns
- err = cdp.Execute(ctx, CommandCollectClassNamesFromSubtree, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ClassNames, nil
-}
-
-// CopyToParams creates a deep copy of the specified node and places it into
-// the target container before the given anchor.
-type CopyToParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to copy.
- TargetNodeID cdp.NodeID `json:"targetNodeId"` // Id of the element to drop the copy into.
- InsertBeforeNodeID cdp.NodeID `json:"insertBeforeNodeId,omitempty"` // Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId).
-}
-
-// CopyTo creates a deep copy of the specified node and places it into the
-// target container before the given anchor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-copyTo
-//
-// parameters:
-// nodeID - Id of the node to copy.
-// targetNodeID - Id of the element to drop the copy into.
-func CopyTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID) *CopyToParams {
- return &CopyToParams{
- NodeID: nodeID,
- TargetNodeID: targetNodeID,
- }
-}
-
-// WithInsertBeforeNodeID drop the copy before this node (if absent, the copy
-// becomes the last child of targetNodeId).
-func (p CopyToParams) WithInsertBeforeNodeID(insertBeforeNodeID cdp.NodeID) *CopyToParams {
- p.InsertBeforeNodeID = insertBeforeNodeID
- return &p
-}
-
-// CopyToReturns return values.
-type CopyToReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node clone.
-}
-
-// Do executes DOM.copyTo against the provided context.
-//
-// returns:
-// nodeID - Id of the node clone.
-func (p *CopyToParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res CopyToReturns
- err = cdp.Execute(ctx, CommandCopyTo, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// DescribeNodeParams describes node given its id, does not require domain to
-// be enabled. Does not start tracking any objects, can be used for automation.
-type DescribeNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
- Depth int64 `json:"depth,omitempty"` // The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
-}
-
-// DescribeNode describes node given its id, does not require domain to be
-// enabled. Does not start tracking any objects, can be used for automation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-describeNode
-//
-// parameters:
-func DescribeNode() *DescribeNodeParams {
- return &DescribeNodeParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p DescribeNodeParams) WithNodeID(nodeID cdp.NodeID) *DescribeNodeParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p DescribeNodeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *DescribeNodeParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p DescribeNodeParams) WithObjectID(objectID runtime.RemoteObjectID) *DescribeNodeParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithDepth the maximum depth at which children should be retrieved,
-// defaults to 1. Use -1 for the entire subtree or provide an integer larger
-// than 0.
-func (p DescribeNodeParams) WithDepth(depth int64) *DescribeNodeParams {
- p.Depth = depth
- return &p
-}
-
-// WithPierce whether or not iframes and shadow roots should be traversed
-// when returning the subtree (default is false).
-func (p DescribeNodeParams) WithPierce(pierce bool) *DescribeNodeParams {
- p.Pierce = pierce
- return &p
-}
-
-// DescribeNodeReturns return values.
-type DescribeNodeReturns struct {
- Node *cdp.Node `json:"node,omitempty"` // Node description.
-}
-
-// Do executes DOM.describeNode against the provided context.
-//
-// returns:
-// node - Node description.
-func (p *DescribeNodeParams) Do(ctx context.Context) (node *cdp.Node, err error) {
- // execute
- var res DescribeNodeReturns
- err = cdp.Execute(ctx, CommandDescribeNode, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Node, nil
-}
-
-// ScrollIntoViewIfNeededParams scrolls the specified rect of the given node
-// into view if not already visible. Note: exactly one between nodeId,
-// backendNodeId and objectId should be passed to identify the node.
-type ScrollIntoViewIfNeededParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
- Rect *Rect `json:"rect,omitempty"` // The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.
-}
-
-// ScrollIntoViewIfNeeded scrolls the specified rect of the given node into
-// view if not already visible. Note: exactly one between nodeId, backendNodeId
-// and objectId should be passed to identify the node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-scrollIntoViewIfNeeded
-//
-// parameters:
-func ScrollIntoViewIfNeeded() *ScrollIntoViewIfNeededParams {
- return &ScrollIntoViewIfNeededParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p ScrollIntoViewIfNeededParams) WithNodeID(nodeID cdp.NodeID) *ScrollIntoViewIfNeededParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p ScrollIntoViewIfNeededParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *ScrollIntoViewIfNeededParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p ScrollIntoViewIfNeededParams) WithObjectID(objectID runtime.RemoteObjectID) *ScrollIntoViewIfNeededParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithRect the rect to be scrolled into view, relative to the node's border
-// box, in CSS pixels. When omitted, center of the node will be used, similar to
-// Element.scrollIntoView.
-func (p ScrollIntoViewIfNeededParams) WithRect(rect *Rect) *ScrollIntoViewIfNeededParams {
- p.Rect = rect
- return &p
-}
-
-// Do executes DOM.scrollIntoViewIfNeeded against the provided context.
-func (p *ScrollIntoViewIfNeededParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandScrollIntoViewIfNeeded, p, nil)
-}
-
-// DisableParams disables DOM agent for the given page.
-type DisableParams struct{}
-
-// Disable disables DOM agent for the given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes DOM.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// DiscardSearchResultsParams discards search results from the session with
-// the given id. getSearchResults should no longer be called for that search.
-type DiscardSearchResultsParams struct {
- SearchID string `json:"searchId"` // Unique search session identifier.
-}
-
-// DiscardSearchResults discards search results from the session with the
-// given id. getSearchResults should no longer be called for that search.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-discardSearchResults
-//
-// parameters:
-// searchID - Unique search session identifier.
-func DiscardSearchResults(searchID string) *DiscardSearchResultsParams {
- return &DiscardSearchResultsParams{
- SearchID: searchID,
- }
-}
-
-// Do executes DOM.discardSearchResults against the provided context.
-func (p *DiscardSearchResultsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDiscardSearchResults, p, nil)
-}
-
-// EnableParams enables DOM agent for the given page.
-type EnableParams struct{}
-
-// Enable enables DOM agent for the given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes DOM.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// FocusParams focuses the given element.
-type FocusParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
-}
-
-// Focus focuses the given element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-focus
-//
-// parameters:
-func Focus() *FocusParams {
- return &FocusParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p FocusParams) WithNodeID(nodeID cdp.NodeID) *FocusParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p FocusParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *FocusParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p FocusParams) WithObjectID(objectID runtime.RemoteObjectID) *FocusParams {
- p.ObjectID = objectID
- return &p
-}
-
-// Do executes DOM.focus against the provided context.
-func (p *FocusParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandFocus, p, nil)
-}
-
-// GetAttributesParams returns attributes for the specified node.
-type GetAttributesParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to retrieve attibutes for.
-}
-
-// GetAttributes returns attributes for the specified node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAttributes
-//
-// parameters:
-// nodeID - Id of the node to retrieve attibutes for.
-func GetAttributes(nodeID cdp.NodeID) *GetAttributesParams {
- return &GetAttributesParams{
- NodeID: nodeID,
- }
-}
-
-// GetAttributesReturns return values.
-type GetAttributesReturns struct {
- Attributes []string `json:"attributes,omitempty"` // An interleaved array of node attribute names and values.
-}
-
-// Do executes DOM.getAttributes against the provided context.
-//
-// returns:
-// attributes - An interleaved array of node attribute names and values.
-func (p *GetAttributesParams) Do(ctx context.Context) (attributes []string, err error) {
- // execute
- var res GetAttributesReturns
- err = cdp.Execute(ctx, CommandGetAttributes, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Attributes, nil
-}
-
-// GetBoxModelParams returns boxes for the given node.
-type GetBoxModelParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
-}
-
-// GetBoxModel returns boxes for the given node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getBoxModel
-//
-// parameters:
-func GetBoxModel() *GetBoxModelParams {
- return &GetBoxModelParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p GetBoxModelParams) WithNodeID(nodeID cdp.NodeID) *GetBoxModelParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p GetBoxModelParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetBoxModelParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p GetBoxModelParams) WithObjectID(objectID runtime.RemoteObjectID) *GetBoxModelParams {
- p.ObjectID = objectID
- return &p
-}
-
-// GetBoxModelReturns return values.
-type GetBoxModelReturns struct {
- Model *BoxModel `json:"model,omitempty"` // Box model for the node.
-}
-
-// Do executes DOM.getBoxModel against the provided context.
-//
-// returns:
-// model - Box model for the node.
-func (p *GetBoxModelParams) Do(ctx context.Context) (model *BoxModel, err error) {
- // execute
- var res GetBoxModelReturns
- err = cdp.Execute(ctx, CommandGetBoxModel, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Model, nil
-}
-
-// GetContentQuadsParams returns quads that describe node position on the
-// page. This method might return multiple quads for inline nodes.
-type GetContentQuadsParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
-}
-
-// GetContentQuads returns quads that describe node position on the page.
-// This method might return multiple quads for inline nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContentQuads
-//
-// parameters:
-func GetContentQuads() *GetContentQuadsParams {
- return &GetContentQuadsParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p GetContentQuadsParams) WithNodeID(nodeID cdp.NodeID) *GetContentQuadsParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p GetContentQuadsParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetContentQuadsParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p GetContentQuadsParams) WithObjectID(objectID runtime.RemoteObjectID) *GetContentQuadsParams {
- p.ObjectID = objectID
- return &p
-}
-
-// GetContentQuadsReturns return values.
-type GetContentQuadsReturns struct {
- Quads []Quad `json:"quads,omitempty"` // Quads that describe node layout relative to viewport.
-}
-
-// Do executes DOM.getContentQuads against the provided context.
-//
-// returns:
-// quads - Quads that describe node layout relative to viewport.
-func (p *GetContentQuadsParams) Do(ctx context.Context) (quads []Quad, err error) {
- // execute
- var res GetContentQuadsReturns
- err = cdp.Execute(ctx, CommandGetContentQuads, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Quads, nil
-}
-
-// GetDocumentParams returns the root DOM node (and optionally the subtree)
-// to the caller.
-type GetDocumentParams struct {
- Depth int64 `json:"depth,omitempty"` // The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
-}
-
-// GetDocument returns the root DOM node (and optionally the subtree) to the
-// caller.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDocument
-//
-// parameters:
-func GetDocument() *GetDocumentParams {
- return &GetDocumentParams{}
-}
-
-// WithDepth the maximum depth at which children should be retrieved,
-// defaults to 1. Use -1 for the entire subtree or provide an integer larger
-// than 0.
-func (p GetDocumentParams) WithDepth(depth int64) *GetDocumentParams {
- p.Depth = depth
- return &p
-}
-
-// WithPierce whether or not iframes and shadow roots should be traversed
-// when returning the subtree (default is false).
-func (p GetDocumentParams) WithPierce(pierce bool) *GetDocumentParams {
- p.Pierce = pierce
- return &p
-}
-
-// GetDocumentReturns return values.
-type GetDocumentReturns struct {
- Root *cdp.Node `json:"root,omitempty"` // Resulting node.
-}
-
-// Do executes DOM.getDocument against the provided context.
-//
-// returns:
-// root - Resulting node.
-func (p *GetDocumentParams) Do(ctx context.Context) (root *cdp.Node, err error) {
- // execute
- var res GetDocumentReturns
- err = cdp.Execute(ctx, CommandGetDocument, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Root, nil
-}
-
-// GetNodesForSubtreeByStyleParams finds nodes with a given computed style in
-// a subtree.
-type GetNodesForSubtreeByStyleParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Node ID pointing to the root of a subtree.
- ComputedStyles []*CSSComputedStyleProperty `json:"computedStyles"` // The style to filter nodes by (includes nodes if any of properties matches).
- Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false).
-}
-
-// GetNodesForSubtreeByStyle finds nodes with a given computed style in a
-// subtree.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodesForSubtreeByStyle
-//
-// parameters:
-// nodeID - Node ID pointing to the root of a subtree.
-// computedStyles - The style to filter nodes by (includes nodes if any of properties matches).
-func GetNodesForSubtreeByStyle(nodeID cdp.NodeID, computedStyles []*CSSComputedStyleProperty) *GetNodesForSubtreeByStyleParams {
- return &GetNodesForSubtreeByStyleParams{
- NodeID: nodeID,
- ComputedStyles: computedStyles,
- }
-}
-
-// WithPierce whether or not iframes and shadow roots in the same target
-// should be traversed when returning the results (default is false).
-func (p GetNodesForSubtreeByStyleParams) WithPierce(pierce bool) *GetNodesForSubtreeByStyleParams {
- p.Pierce = pierce
- return &p
-}
-
-// GetNodesForSubtreeByStyleReturns return values.
-type GetNodesForSubtreeByStyleReturns struct {
- NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Resulting nodes.
-}
-
-// Do executes DOM.getNodesForSubtreeByStyle against the provided context.
-//
-// returns:
-// nodeIds - Resulting nodes.
-func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
- // execute
- var res GetNodesForSubtreeByStyleReturns
- err = cdp.Execute(ctx, CommandGetNodesForSubtreeByStyle, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.NodeIds, nil
-}
-
-// GetNodeForLocationParams returns node id at given location. Depending on
-// whether DOM domain is enabled, nodeId is either returned or not.
-type GetNodeForLocationParams struct {
- X int64 `json:"x"` // X coordinate.
- Y int64 `json:"y"` // Y coordinate.
- IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"` // False to skip to the nearest non-UA shadow root ancestor (default: false).
- IgnorePointerEventsNone bool `json:"ignorePointerEventsNone,omitempty"` // Whether to ignore pointer-events: none on elements and hit test them.
-}
-
-// GetNodeForLocation returns node id at given location. Depending on whether
-// DOM domain is enabled, nodeId is either returned or not.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeForLocation
-//
-// parameters:
-// x - X coordinate.
-// y - Y coordinate.
-func GetNodeForLocation(x int64, y int64) *GetNodeForLocationParams {
- return &GetNodeForLocationParams{
- X: x,
- Y: y,
- }
-}
-
-// WithIncludeUserAgentShadowDOM false to skip to the nearest non-UA shadow
-// root ancestor (default: false).
-func (p GetNodeForLocationParams) WithIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *GetNodeForLocationParams {
- p.IncludeUserAgentShadowDOM = includeUserAgentShadowDOM
- return &p
-}
-
-// WithIgnorePointerEventsNone whether to ignore pointer-events: none on
-// elements and hit test them.
-func (p GetNodeForLocationParams) WithIgnorePointerEventsNone(ignorePointerEventsNone bool) *GetNodeForLocationParams {
- p.IgnorePointerEventsNone = ignorePointerEventsNone
- return &p
-}
-
-// GetNodeForLocationReturns return values.
-type GetNodeForLocationReturns struct {
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Resulting node.
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame this node belongs to.
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node at given coordinates, only when enabled and requested document.
-}
-
-// Do executes DOM.getNodeForLocation against the provided context.
-//
-// returns:
-// backendNodeID - Resulting node.
-// frameID - Frame this node belongs to.
-// nodeID - Id of the node at given coordinates, only when enabled and requested document.
-func (p *GetNodeForLocationParams) Do(ctx context.Context) (backendNodeID cdp.BackendNodeID, frameID cdp.FrameID, nodeID cdp.NodeID, err error) {
- // execute
- var res GetNodeForLocationReturns
- err = cdp.Execute(ctx, CommandGetNodeForLocation, p, &res)
- if err != nil {
- return 0, "", 0, err
- }
-
- return res.BackendNodeID, res.FrameID, res.NodeID, nil
-}
-
-// GetOuterHTMLParams returns node's HTML markup.
-type GetOuterHTMLParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
-}
-
-// GetOuterHTML returns node's HTML markup.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getOuterHTML
-//
-// parameters:
-func GetOuterHTML() *GetOuterHTMLParams {
- return &GetOuterHTMLParams{}
-}
-
-// WithNodeID identifier of the node.
-func (p GetOuterHTMLParams) WithNodeID(nodeID cdp.NodeID) *GetOuterHTMLParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p GetOuterHTMLParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetOuterHTMLParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p GetOuterHTMLParams) WithObjectID(objectID runtime.RemoteObjectID) *GetOuterHTMLParams {
- p.ObjectID = objectID
- return &p
-}
-
-// GetOuterHTMLReturns return values.
-type GetOuterHTMLReturns struct {
- OuterHTML string `json:"outerHTML,omitempty"` // Outer HTML markup.
-}
-
-// Do executes DOM.getOuterHTML against the provided context.
-//
-// returns:
-// outerHTML - Outer HTML markup.
-func (p *GetOuterHTMLParams) Do(ctx context.Context) (outerHTML string, err error) {
- // execute
- var res GetOuterHTMLReturns
- err = cdp.Execute(ctx, CommandGetOuterHTML, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.OuterHTML, nil
-}
-
-// GetRelayoutBoundaryParams returns the id of the nearest ancestor that is a
-// relayout boundary.
-type GetRelayoutBoundaryParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node.
-}
-
-// GetRelayoutBoundary returns the id of the nearest ancestor that is a
-// relayout boundary.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getRelayoutBoundary
-//
-// parameters:
-// nodeID - Id of the node.
-func GetRelayoutBoundary(nodeID cdp.NodeID) *GetRelayoutBoundaryParams {
- return &GetRelayoutBoundaryParams{
- NodeID: nodeID,
- }
-}
-
-// GetRelayoutBoundaryReturns return values.
-type GetRelayoutBoundaryReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Relayout boundary node id for the given node.
-}
-
-// Do executes DOM.getRelayoutBoundary against the provided context.
-//
-// returns:
-// nodeID - Relayout boundary node id for the given node.
-func (p *GetRelayoutBoundaryParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res GetRelayoutBoundaryReturns
- err = cdp.Execute(ctx, CommandGetRelayoutBoundary, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// GetSearchResultsParams returns search results from given fromIndex to
-// given toIndex from the search with the given identifier.
-type GetSearchResultsParams struct {
- SearchID string `json:"searchId"` // Unique search session identifier.
- FromIndex int64 `json:"fromIndex"` // Start index of the search result to be returned.
- ToIndex int64 `json:"toIndex"` // End index of the search result to be returned.
-}
-
-// GetSearchResults returns search results from given fromIndex to given
-// toIndex from the search with the given identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getSearchResults
-//
-// parameters:
-// searchID - Unique search session identifier.
-// fromIndex - Start index of the search result to be returned.
-// toIndex - End index of the search result to be returned.
-func GetSearchResults(searchID string, fromIndex int64, toIndex int64) *GetSearchResultsParams {
- return &GetSearchResultsParams{
- SearchID: searchID,
- FromIndex: fromIndex,
- ToIndex: toIndex,
- }
-}
-
-// GetSearchResultsReturns return values.
-type GetSearchResultsReturns struct {
- NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the search result nodes.
-}
-
-// Do executes DOM.getSearchResults against the provided context.
-//
-// returns:
-// nodeIds - Ids of the search result nodes.
-func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
- // execute
- var res GetSearchResultsReturns
- err = cdp.Execute(ctx, CommandGetSearchResults, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.NodeIds, nil
-}
-
-// MarkUndoableStateParams marks last undoable state.
-type MarkUndoableStateParams struct{}
-
-// MarkUndoableState marks last undoable state.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-markUndoableState
-func MarkUndoableState() *MarkUndoableStateParams {
- return &MarkUndoableStateParams{}
-}
-
-// Do executes DOM.markUndoableState against the provided context.
-func (p *MarkUndoableStateParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandMarkUndoableState, nil, nil)
-}
-
-// MoveToParams moves node into the new container, places it before the given
-// anchor.
-type MoveToParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to move.
- TargetNodeID cdp.NodeID `json:"targetNodeId"` // Id of the element to drop the moved node into.
- InsertBeforeNodeID cdp.NodeID `json:"insertBeforeNodeId,omitempty"` // Drop node before this one (if absent, the moved node becomes the last child of targetNodeId).
-}
-
-// MoveTo moves node into the new container, places it before the given
-// anchor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-moveTo
-//
-// parameters:
-// nodeID - Id of the node to move.
-// targetNodeID - Id of the element to drop the moved node into.
-func MoveTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID) *MoveToParams {
- return &MoveToParams{
- NodeID: nodeID,
- TargetNodeID: targetNodeID,
- }
-}
-
-// WithInsertBeforeNodeID drop node before this one (if absent, the moved
-// node becomes the last child of targetNodeId).
-func (p MoveToParams) WithInsertBeforeNodeID(insertBeforeNodeID cdp.NodeID) *MoveToParams {
- p.InsertBeforeNodeID = insertBeforeNodeID
- return &p
-}
-
-// MoveToReturns return values.
-type MoveToReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // New id of the moved node.
-}
-
-// Do executes DOM.moveTo against the provided context.
-//
-// returns:
-// nodeID - New id of the moved node.
-func (p *MoveToParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res MoveToReturns
- err = cdp.Execute(ctx, CommandMoveTo, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// PerformSearchParams searches for a given string in the DOM tree. Use
-// getSearchResults to access search results or cancelSearch to end this search
-// session.
-type PerformSearchParams struct {
- Query string `json:"query"` // Plain text or query selector or XPath search query.
- IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"` // True to search in user agent shadow DOM.
-}
-
-// PerformSearch searches for a given string in the DOM tree. Use
-// getSearchResults to access search results or cancelSearch to end this search
-// session.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-performSearch
-//
-// parameters:
-// query - Plain text or query selector or XPath search query.
-func PerformSearch(query string) *PerformSearchParams {
- return &PerformSearchParams{
- Query: query,
- }
-}
-
-// WithIncludeUserAgentShadowDOM true to search in user agent shadow DOM.
-func (p PerformSearchParams) WithIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *PerformSearchParams {
- p.IncludeUserAgentShadowDOM = includeUserAgentShadowDOM
- return &p
-}
-
-// PerformSearchReturns return values.
-type PerformSearchReturns struct {
- SearchID string `json:"searchId,omitempty"` // Unique search session identifier.
- ResultCount int64 `json:"resultCount,omitempty"` // Number of search results.
-}
-
-// Do executes DOM.performSearch against the provided context.
-//
-// returns:
-// searchID - Unique search session identifier.
-// resultCount - Number of search results.
-func (p *PerformSearchParams) Do(ctx context.Context) (searchID string, resultCount int64, err error) {
- // execute
- var res PerformSearchReturns
- err = cdp.Execute(ctx, CommandPerformSearch, p, &res)
- if err != nil {
- return "", 0, err
- }
-
- return res.SearchID, res.ResultCount, nil
-}
-
-// PushNodeByPathToFrontendParams requests that the node is sent to the
-// caller given its path. // FIXME, use XPath.
-type PushNodeByPathToFrontendParams struct {
- Path string `json:"path"` // Path to node in the proprietary format.
-}
-
-// PushNodeByPathToFrontend requests that the node is sent to the caller
-// given its path. // FIXME, use XPath.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodeByPathToFrontend
-//
-// parameters:
-// path - Path to node in the proprietary format.
-func PushNodeByPathToFrontend(path string) *PushNodeByPathToFrontendParams {
- return &PushNodeByPathToFrontendParams{
- Path: path,
- }
-}
-
-// PushNodeByPathToFrontendReturns return values.
-type PushNodeByPathToFrontendReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node for given path.
-}
-
-// Do executes DOM.pushNodeByPathToFrontend against the provided context.
-//
-// returns:
-// nodeID - Id of the node for given path.
-func (p *PushNodeByPathToFrontendParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res PushNodeByPathToFrontendReturns
- err = cdp.Execute(ctx, CommandPushNodeByPathToFrontend, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// PushNodesByBackendIdsToFrontendParams requests that a batch of nodes is
-// sent to the caller given their backend node ids.
-type PushNodesByBackendIdsToFrontendParams struct {
- BackendNodeIds []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids.
-}
-
-// PushNodesByBackendIdsToFrontend requests that a batch of nodes is sent to
-// the caller given their backend node ids.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodesByBackendIdsToFrontend
-//
-// parameters:
-// backendNodeIds - The array of backend node ids.
-func PushNodesByBackendIdsToFrontend(backendNodeIds []cdp.BackendNodeID) *PushNodesByBackendIdsToFrontendParams {
- return &PushNodesByBackendIdsToFrontendParams{
- BackendNodeIds: backendNodeIds,
- }
-}
-
-// PushNodesByBackendIdsToFrontendReturns return values.
-type PushNodesByBackendIdsToFrontendReturns struct {
- NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
-}
-
-// Do executes DOM.pushNodesByBackendIdsToFrontend against the provided context.
-//
-// returns:
-// nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
-func (p *PushNodesByBackendIdsToFrontendParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
- // execute
- var res PushNodesByBackendIdsToFrontendReturns
- err = cdp.Execute(ctx, CommandPushNodesByBackendIdsToFrontend, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.NodeIds, nil
-}
-
-// QuerySelectorParams executes querySelector on a given node.
-type QuerySelectorParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to query upon.
- Selector string `json:"selector"` // Selector string.
-}
-
-// QuerySelector executes querySelector on a given node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelector
-//
-// parameters:
-// nodeID - Id of the node to query upon.
-// selector - Selector string.
-func QuerySelector(nodeID cdp.NodeID, selector string) *QuerySelectorParams {
- return &QuerySelectorParams{
- NodeID: nodeID,
- Selector: selector,
- }
-}
-
-// QuerySelectorReturns return values.
-type QuerySelectorReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Query selector result.
-}
-
-// Do executes DOM.querySelector against the provided context.
-//
-// returns:
-// nodeID - Query selector result.
-func (p *QuerySelectorParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res QuerySelectorReturns
- err = cdp.Execute(ctx, CommandQuerySelector, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// QuerySelectorAllParams executes querySelectorAll on a given node.
-type QuerySelectorAllParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to query upon.
- Selector string `json:"selector"` // Selector string.
-}
-
-// QuerySelectorAll executes querySelectorAll on a given node.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelectorAll
-//
-// parameters:
-// nodeID - Id of the node to query upon.
-// selector - Selector string.
-func QuerySelectorAll(nodeID cdp.NodeID, selector string) *QuerySelectorAllParams {
- return &QuerySelectorAllParams{
- NodeID: nodeID,
- Selector: selector,
- }
-}
-
-// QuerySelectorAllReturns return values.
-type QuerySelectorAllReturns struct {
- NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Query selector result.
-}
-
-// Do executes DOM.querySelectorAll against the provided context.
-//
-// returns:
-// nodeIds - Query selector result.
-func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
- // execute
- var res QuerySelectorAllReturns
- err = cdp.Execute(ctx, CommandQuerySelectorAll, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.NodeIds, nil
-}
-
-// RedoParams re-does the last undone action.
-type RedoParams struct{}
-
-// Redo re-does the last undone action.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-redo
-func Redo() *RedoParams {
- return &RedoParams{}
-}
-
-// Do executes DOM.redo against the provided context.
-func (p *RedoParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRedo, nil, nil)
-}
-
-// RemoveAttributeParams removes attribute with given name from an element
-// with given id.
-type RemoveAttributeParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the element to remove attribute from.
- Name string `json:"name"` // Name of the attribute to remove.
-}
-
-// RemoveAttribute removes attribute with given name from an element with
-// given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeAttribute
-//
-// parameters:
-// nodeID - Id of the element to remove attribute from.
-// name - Name of the attribute to remove.
-func RemoveAttribute(nodeID cdp.NodeID, name string) *RemoveAttributeParams {
- return &RemoveAttributeParams{
- NodeID: nodeID,
- Name: name,
- }
-}
-
-// Do executes DOM.removeAttribute against the provided context.
-func (p *RemoveAttributeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveAttribute, p, nil)
-}
-
-// RemoveNodeParams removes node with given id.
-type RemoveNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to remove.
-}
-
-// RemoveNode removes node with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeNode
-//
-// parameters:
-// nodeID - Id of the node to remove.
-func RemoveNode(nodeID cdp.NodeID) *RemoveNodeParams {
- return &RemoveNodeParams{
- NodeID: nodeID,
- }
-}
-
-// Do executes DOM.removeNode against the provided context.
-func (p *RemoveNodeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveNode, p, nil)
-}
-
-// RequestChildNodesParams requests that children of the node with given id
-// are returned to the caller in form of setChildNodes events where not only
-// immediate children are retrieved, but all children down to the specified
-// depth.
-type RequestChildNodesParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get children for.
- Depth int64 `json:"depth,omitempty"` // The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
-}
-
-// RequestChildNodes requests that children of the node with given id are
-// returned to the caller in form of setChildNodes events where not only
-// immediate children are retrieved, but all children down to the specified
-// depth.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestChildNodes
-//
-// parameters:
-// nodeID - Id of the node to get children for.
-func RequestChildNodes(nodeID cdp.NodeID) *RequestChildNodesParams {
- return &RequestChildNodesParams{
- NodeID: nodeID,
- }
-}
-
-// WithDepth the maximum depth at which children should be retrieved,
-// defaults to 1. Use -1 for the entire subtree or provide an integer larger
-// than 0.
-func (p RequestChildNodesParams) WithDepth(depth int64) *RequestChildNodesParams {
- p.Depth = depth
- return &p
-}
-
-// WithPierce whether or not iframes and shadow roots should be traversed
-// when returning the sub-tree (default is false).
-func (p RequestChildNodesParams) WithPierce(pierce bool) *RequestChildNodesParams {
- p.Pierce = pierce
- return &p
-}
-
-// Do executes DOM.requestChildNodes against the provided context.
-func (p *RequestChildNodesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRequestChildNodes, p, nil)
-}
-
-// RequestNodeParams requests that the node is sent to the caller given the
-// JavaScript node object reference. All nodes that form the path from the node
-// to the root are also sent to the client as a series of setChildNodes
-// notifications.
-type RequestNodeParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id to convert into node.
-}
-
-// RequestNode requests that the node is sent to the caller given the
-// JavaScript node object reference. All nodes that form the path from the node
-// to the root are also sent to the client as a series of setChildNodes
-// notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestNode
-//
-// parameters:
-// objectID - JavaScript object id to convert into node.
-func RequestNode(objectID runtime.RemoteObjectID) *RequestNodeParams {
- return &RequestNodeParams{
- ObjectID: objectID,
- }
-}
-
-// RequestNodeReturns return values.
-type RequestNodeReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Node id for given object.
-}
-
-// Do executes DOM.requestNode against the provided context.
-//
-// returns:
-// nodeID - Node id for given object.
-func (p *RequestNodeParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res RequestNodeReturns
- err = cdp.Execute(ctx, CommandRequestNode, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// ResolveNodeParams resolves the JavaScript node object for a given NodeId
-// or BackendNodeId.
-type ResolveNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node to resolve.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Backend identifier of the node to resolve.
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
- ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Execution context in which to resolve the node.
-}
-
-// ResolveNode resolves the JavaScript node object for a given NodeId or
-// BackendNodeId.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-resolveNode
-//
-// parameters:
-func ResolveNode() *ResolveNodeParams {
- return &ResolveNodeParams{}
-}
-
-// WithNodeID ID of the node to resolve.
-func (p ResolveNodeParams) WithNodeID(nodeID cdp.NodeID) *ResolveNodeParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID backend identifier of the node to resolve.
-func (p ResolveNodeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *ResolveNodeParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectGroup symbolic group name that can be used to release multiple
-// objects.
-func (p ResolveNodeParams) WithObjectGroup(objectGroup string) *ResolveNodeParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// WithExecutionContextID execution context in which to resolve the node.
-func (p ResolveNodeParams) WithExecutionContextID(executionContextID runtime.ExecutionContextID) *ResolveNodeParams {
- p.ExecutionContextID = executionContextID
- return &p
-}
-
-// ResolveNodeReturns return values.
-type ResolveNodeReturns struct {
- Object *runtime.RemoteObject `json:"object,omitempty"` // JavaScript object wrapper for given node.
-}
-
-// Do executes DOM.resolveNode against the provided context.
-//
-// returns:
-// object - JavaScript object wrapper for given node.
-func (p *ResolveNodeParams) Do(ctx context.Context) (object *runtime.RemoteObject, err error) {
- // execute
- var res ResolveNodeReturns
- err = cdp.Execute(ctx, CommandResolveNode, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Object, nil
-}
-
-// SetAttributeValueParams sets attribute for an element with given id.
-type SetAttributeValueParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the element to set attribute for.
- Name string `json:"name"` // Attribute name.
- Value string `json:"value"` // Attribute value.
-}
-
-// SetAttributeValue sets attribute for an element with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributeValue
-//
-// parameters:
-// nodeID - Id of the element to set attribute for.
-// name - Attribute name.
-// value - Attribute value.
-func SetAttributeValue(nodeID cdp.NodeID, name string, value string) *SetAttributeValueParams {
- return &SetAttributeValueParams{
- NodeID: nodeID,
- Name: name,
- Value: value,
- }
-}
-
-// Do executes DOM.setAttributeValue against the provided context.
-func (p *SetAttributeValueParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAttributeValue, p, nil)
-}
-
-// SetAttributesAsTextParams sets attributes on element with given id. This
-// method is useful when user edits some existing attribute value and types in
-// several attribute name/value pairs.
-type SetAttributesAsTextParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the element to set attributes for.
- Text string `json:"text"` // Text with a number of attributes. Will parse this text using HTML parser.
- Name string `json:"name,omitempty"` // Attribute name to replace with new attributes derived from text in case text parsed successfully.
-}
-
-// SetAttributesAsText sets attributes on element with given id. This method
-// is useful when user edits some existing attribute value and types in several
-// attribute name/value pairs.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributesAsText
-//
-// parameters:
-// nodeID - Id of the element to set attributes for.
-// text - Text with a number of attributes. Will parse this text using HTML parser.
-func SetAttributesAsText(nodeID cdp.NodeID, text string) *SetAttributesAsTextParams {
- return &SetAttributesAsTextParams{
- NodeID: nodeID,
- Text: text,
- }
-}
-
-// WithName attribute name to replace with new attributes derived from text
-// in case text parsed successfully.
-func (p SetAttributesAsTextParams) WithName(name string) *SetAttributesAsTextParams {
- p.Name = name
- return &p
-}
-
-// Do executes DOM.setAttributesAsText against the provided context.
-func (p *SetAttributesAsTextParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAttributesAsText, p, nil)
-}
-
-// SetFileInputFilesParams sets files for the given file input element.
-type SetFileInputFilesParams struct {
- Files []string `json:"files"` // Array of file paths to set.
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
-}
-
-// SetFileInputFiles sets files for the given file input element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setFileInputFiles
-//
-// parameters:
-// files - Array of file paths to set.
-func SetFileInputFiles(files []string) *SetFileInputFilesParams {
- return &SetFileInputFilesParams{
- Files: files,
- }
-}
-
-// WithNodeID identifier of the node.
-func (p SetFileInputFilesParams) WithNodeID(nodeID cdp.NodeID) *SetFileInputFilesParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node.
-func (p SetFileInputFilesParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *SetFileInputFilesParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node wrapper.
-func (p SetFileInputFilesParams) WithObjectID(objectID runtime.RemoteObjectID) *SetFileInputFilesParams {
- p.ObjectID = objectID
- return &p
-}
-
-// Do executes DOM.setFileInputFiles against the provided context.
-func (p *SetFileInputFilesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetFileInputFiles, p, nil)
-}
-
-// SetNodeStackTracesEnabledParams sets if stack traces should be captured
-// for Nodes. See Node.getNodeStackTraces. Default is disabled.
-type SetNodeStackTracesEnabledParams struct {
- Enable bool `json:"enable"` // Enable or disable.
-}
-
-// SetNodeStackTracesEnabled sets if stack traces should be captured for
-// Nodes. See Node.getNodeStackTraces. Default is disabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeStackTracesEnabled
-//
-// parameters:
-// enable - Enable or disable.
-func SetNodeStackTracesEnabled(enable bool) *SetNodeStackTracesEnabledParams {
- return &SetNodeStackTracesEnabledParams{
- Enable: enable,
- }
-}
-
-// Do executes DOM.setNodeStackTracesEnabled against the provided context.
-func (p *SetNodeStackTracesEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetNodeStackTracesEnabled, p, nil)
-}
-
-// GetNodeStackTracesParams gets stack traces associated with a Node. As of
-// now, only provides stack trace for Node creation.
-type GetNodeStackTracesParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get stack traces for.
-}
-
-// GetNodeStackTraces gets stack traces associated with a Node. As of now,
-// only provides stack trace for Node creation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeStackTraces
-//
-// parameters:
-// nodeID - Id of the node to get stack traces for.
-func GetNodeStackTraces(nodeID cdp.NodeID) *GetNodeStackTracesParams {
- return &GetNodeStackTracesParams{
- NodeID: nodeID,
- }
-}
-
-// GetNodeStackTracesReturns return values.
-type GetNodeStackTracesReturns struct {
- Creation *runtime.StackTrace `json:"creation,omitempty"` // Creation stack trace, if available.
-}
-
-// Do executes DOM.getNodeStackTraces against the provided context.
-//
-// returns:
-// creation - Creation stack trace, if available.
-func (p *GetNodeStackTracesParams) Do(ctx context.Context) (creation *runtime.StackTrace, err error) {
- // execute
- var res GetNodeStackTracesReturns
- err = cdp.Execute(ctx, CommandGetNodeStackTraces, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Creation, nil
-}
-
-// GetFileInfoParams returns file information for the given File wrapper.
-type GetFileInfoParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id of the node wrapper.
-}
-
-// GetFileInfo returns file information for the given File wrapper.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFileInfo
-//
-// parameters:
-// objectID - JavaScript object id of the node wrapper.
-func GetFileInfo(objectID runtime.RemoteObjectID) *GetFileInfoParams {
- return &GetFileInfoParams{
- ObjectID: objectID,
- }
-}
-
-// GetFileInfoReturns return values.
-type GetFileInfoReturns struct {
- Path string `json:"path,omitempty"`
-}
-
-// Do executes DOM.getFileInfo against the provided context.
-//
-// returns:
-// path
-func (p *GetFileInfoParams) Do(ctx context.Context) (path string, err error) {
- // execute
- var res GetFileInfoReturns
- err = cdp.Execute(ctx, CommandGetFileInfo, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Path, nil
-}
-
-// SetInspectedNodeParams enables console to refer to the node with given id
-// via $x (see Command Line API for more details $x functions).
-type SetInspectedNodeParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // DOM node id to be accessible by means of $x command line API.
-}
-
-// SetInspectedNode enables console to refer to the node with given id via $x
-// (see Command Line API for more details $x functions).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setInspectedNode
-//
-// parameters:
-// nodeID - DOM node id to be accessible by means of $x command line API.
-func SetInspectedNode(nodeID cdp.NodeID) *SetInspectedNodeParams {
- return &SetInspectedNodeParams{
- NodeID: nodeID,
- }
-}
-
-// Do executes DOM.setInspectedNode against the provided context.
-func (p *SetInspectedNodeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetInspectedNode, p, nil)
-}
-
-// SetNodeNameParams sets node name for a node with given id.
-type SetNodeNameParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to set name for.
- Name string `json:"name"` // New node's name.
-}
-
-// SetNodeName sets node name for a node with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeName
-//
-// parameters:
-// nodeID - Id of the node to set name for.
-// name - New node's name.
-func SetNodeName(nodeID cdp.NodeID, name string) *SetNodeNameParams {
- return &SetNodeNameParams{
- NodeID: nodeID,
- Name: name,
- }
-}
-
-// SetNodeNameReturns return values.
-type SetNodeNameReturns struct {
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // New node's id.
-}
-
-// Do executes DOM.setNodeName against the provided context.
-//
-// returns:
-// nodeID - New node's id.
-func (p *SetNodeNameParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
- // execute
- var res SetNodeNameReturns
- err = cdp.Execute(ctx, CommandSetNodeName, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.NodeID, nil
-}
-
-// SetNodeValueParams sets node value for a node with given id.
-type SetNodeValueParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to set value for.
- Value string `json:"value"` // New node's value.
-}
-
-// SetNodeValue sets node value for a node with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeValue
-//
-// parameters:
-// nodeID - Id of the node to set value for.
-// value - New node's value.
-func SetNodeValue(nodeID cdp.NodeID, value string) *SetNodeValueParams {
- return &SetNodeValueParams{
- NodeID: nodeID,
- Value: value,
- }
-}
-
-// Do executes DOM.setNodeValue against the provided context.
-func (p *SetNodeValueParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetNodeValue, p, nil)
-}
-
-// SetOuterHTMLParams sets node HTML markup, returns new node id.
-type SetOuterHTMLParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to set markup for.
- OuterHTML string `json:"outerHTML"` // Outer HTML markup to set.
-}
-
-// SetOuterHTML sets node HTML markup, returns new node id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setOuterHTML
-//
-// parameters:
-// nodeID - Id of the node to set markup for.
-// outerHTML - Outer HTML markup to set.
-func SetOuterHTML(nodeID cdp.NodeID, outerHTML string) *SetOuterHTMLParams {
- return &SetOuterHTMLParams{
- NodeID: nodeID,
- OuterHTML: outerHTML,
- }
-}
-
-// Do executes DOM.setOuterHTML against the provided context.
-func (p *SetOuterHTMLParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetOuterHTML, p, nil)
-}
-
-// UndoParams undoes the last performed action.
-type UndoParams struct{}
-
-// Undo undoes the last performed action.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-undo
-func Undo() *UndoParams {
- return &UndoParams{}
-}
-
-// Do executes DOM.undo against the provided context.
-func (p *UndoParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUndo, nil, nil)
-}
-
-// GetFrameOwnerParams returns iframe node that owns iframe with the given
-// domain.
-type GetFrameOwnerParams struct {
- FrameID cdp.FrameID `json:"frameId"`
-}
-
-// GetFrameOwner returns iframe node that owns iframe with the given domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFrameOwner
-//
-// parameters:
-// frameID
-func GetFrameOwner(frameID cdp.FrameID) *GetFrameOwnerParams {
- return &GetFrameOwnerParams{
- FrameID: frameID,
- }
-}
-
-// GetFrameOwnerReturns return values.
-type GetFrameOwnerReturns struct {
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Resulting node.
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node at given coordinates, only when enabled and requested document.
-}
-
-// Do executes DOM.getFrameOwner against the provided context.
-//
-// returns:
-// backendNodeID - Resulting node.
-// nodeID - Id of the node at given coordinates, only when enabled and requested document.
-func (p *GetFrameOwnerParams) Do(ctx context.Context) (backendNodeID cdp.BackendNodeID, nodeID cdp.NodeID, err error) {
- // execute
- var res GetFrameOwnerReturns
- err = cdp.Execute(ctx, CommandGetFrameOwner, p, &res)
- if err != nil {
- return 0, 0, err
- }
-
- return res.BackendNodeID, res.NodeID, nil
-}
-
-// Command names.
-const (
- CommandCollectClassNamesFromSubtree = "DOM.collectClassNamesFromSubtree"
- CommandCopyTo = "DOM.copyTo"
- CommandDescribeNode = "DOM.describeNode"
- CommandScrollIntoViewIfNeeded = "DOM.scrollIntoViewIfNeeded"
- CommandDisable = "DOM.disable"
- CommandDiscardSearchResults = "DOM.discardSearchResults"
- CommandEnable = "DOM.enable"
- CommandFocus = "DOM.focus"
- CommandGetAttributes = "DOM.getAttributes"
- CommandGetBoxModel = "DOM.getBoxModel"
- CommandGetContentQuads = "DOM.getContentQuads"
- CommandGetDocument = "DOM.getDocument"
- CommandGetNodesForSubtreeByStyle = "DOM.getNodesForSubtreeByStyle"
- CommandGetNodeForLocation = "DOM.getNodeForLocation"
- CommandGetOuterHTML = "DOM.getOuterHTML"
- CommandGetRelayoutBoundary = "DOM.getRelayoutBoundary"
- CommandGetSearchResults = "DOM.getSearchResults"
- CommandMarkUndoableState = "DOM.markUndoableState"
- CommandMoveTo = "DOM.moveTo"
- CommandPerformSearch = "DOM.performSearch"
- CommandPushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"
- CommandPushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"
- CommandQuerySelector = "DOM.querySelector"
- CommandQuerySelectorAll = "DOM.querySelectorAll"
- CommandRedo = "DOM.redo"
- CommandRemoveAttribute = "DOM.removeAttribute"
- CommandRemoveNode = "DOM.removeNode"
- CommandRequestChildNodes = "DOM.requestChildNodes"
- CommandRequestNode = "DOM.requestNode"
- CommandResolveNode = "DOM.resolveNode"
- CommandSetAttributeValue = "DOM.setAttributeValue"
- CommandSetAttributesAsText = "DOM.setAttributesAsText"
- CommandSetFileInputFiles = "DOM.setFileInputFiles"
- CommandSetNodeStackTracesEnabled = "DOM.setNodeStackTracesEnabled"
- CommandGetNodeStackTraces = "DOM.getNodeStackTraces"
- CommandGetFileInfo = "DOM.getFileInfo"
- CommandSetInspectedNode = "DOM.setInspectedNode"
- CommandSetNodeName = "DOM.setNodeName"
- CommandSetNodeValue = "DOM.setNodeValue"
- CommandSetOuterHTML = "DOM.setOuterHTML"
- CommandUndo = "DOM.undo"
- CommandGetFrameOwner = "DOM.getFrameOwner"
-)
diff --git a/vendor/github.com/chromedp/cdproto/dom/easyjson.go b/vendor/github.com/chromedp/cdproto/dom/easyjson.go
deleted file mode 100644
index c4d1fc24df3..00000000000
--- a/vendor/github.com/chromedp/cdproto/dom/easyjson.go
+++ /dev/null
@@ -1,6988 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package dom
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom(in *jlexer.Lexer, out *UndoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom(out *jwriter.Writer, in UndoParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UndoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UndoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UndoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UndoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom1(in *jlexer.Lexer, out *ShapeOutsideInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- in.Delim('[')
- if out.Bounds == nil {
- if !in.IsDelim(']') {
- out.Bounds = make(Quad, 0, 8)
- } else {
- out.Bounds = Quad{}
- }
- } else {
- out.Bounds = (out.Bounds)[:0]
- }
- for !in.IsDelim(']') {
- var v1 float64
- v1 = float64(in.Float64())
- out.Bounds = append(out.Bounds, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "shape":
- if in.IsNull() {
- in.Skip()
- out.Shape = nil
- } else {
- in.Delim('[')
- if out.Shape == nil {
- if !in.IsDelim(']') {
- out.Shape = make([]easyjson.RawMessage, 0, 2)
- } else {
- out.Shape = []easyjson.RawMessage{}
- }
- } else {
- out.Shape = (out.Shape)[:0]
- }
- for !in.IsDelim(']') {
- var v2 easyjson.RawMessage
- (v2).UnmarshalEasyJSON(in)
- out.Shape = append(out.Shape, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "marginShape":
- if in.IsNull() {
- in.Skip()
- out.MarginShape = nil
- } else {
- in.Delim('[')
- if out.MarginShape == nil {
- if !in.IsDelim(']') {
- out.MarginShape = make([]easyjson.RawMessage, 0, 2)
- } else {
- out.MarginShape = []easyjson.RawMessage{}
- }
- } else {
- out.MarginShape = (out.MarginShape)[:0]
- }
- for !in.IsDelim(']') {
- var v3 easyjson.RawMessage
- (v3).UnmarshalEasyJSON(in)
- out.MarginShape = append(out.MarginShape, v3)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom1(out *jwriter.Writer, in ShapeOutsideInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix[1:])
- if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v4, v5 := range in.Bounds {
- if v4 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v5))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"shape\":"
- out.RawString(prefix)
- if in.Shape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.Shape {
- if v6 > 0 {
- out.RawByte(',')
- }
- (v7).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"marginShape\":"
- out.RawString(prefix)
- if in.MarginShape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.MarginShape {
- if v8 > 0 {
- out.RawByte(',')
- }
- (v9).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ShapeOutsideInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ShapeOutsideInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ShapeOutsideInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ShapeOutsideInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom2(in *jlexer.Lexer, out *SetOuterHTMLParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "outerHTML":
- out.OuterHTML = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom2(out *jwriter.Writer, in SetOuterHTMLParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"outerHTML\":"
- out.RawString(prefix)
- out.String(string(in.OuterHTML))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetOuterHTMLParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetOuterHTMLParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom3(in *jlexer.Lexer, out *SetNodeValueParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom3(out *jwriter.Writer, in SetNodeValueParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetNodeValueParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetNodeValueParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetNodeValueParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetNodeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom4(in *jlexer.Lexer, out *SetNodeStackTracesEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enable":
- out.Enable = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom4(out *jwriter.Writer, in SetNodeStackTracesEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enable\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enable))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetNodeStackTracesEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetNodeStackTracesEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetNodeStackTracesEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetNodeStackTracesEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom5(in *jlexer.Lexer, out *SetNodeNameReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom5(out *jwriter.Writer, in SetNodeNameReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetNodeNameReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetNodeNameReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetNodeNameReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetNodeNameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom6(in *jlexer.Lexer, out *SetNodeNameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom6(out *jwriter.Writer, in SetNodeNameParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetNodeNameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetNodeNameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetNodeNameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetNodeNameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom7(in *jlexer.Lexer, out *SetInspectedNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom7(out *jwriter.Writer, in SetInspectedNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInspectedNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInspectedNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInspectedNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInspectedNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom8(in *jlexer.Lexer, out *SetFileInputFilesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "files":
- if in.IsNull() {
- in.Skip()
- out.Files = nil
- } else {
- in.Delim('[')
- if out.Files == nil {
- if !in.IsDelim(']') {
- out.Files = make([]string, 0, 4)
- } else {
- out.Files = []string{}
- }
- } else {
- out.Files = (out.Files)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Files = append(out.Files, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom8(out *jwriter.Writer, in SetFileInputFilesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"files\":"
- out.RawString(prefix[1:])
- if in.Files == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Files {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix)
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetFileInputFilesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetFileInputFilesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetFileInputFilesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetFileInputFilesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom9(in *jlexer.Lexer, out *SetAttributesAsTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "text":
- out.Text = string(in.String())
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom9(out *jwriter.Writer, in SetAttributesAsTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- if in.Name != "" {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAttributesAsTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAttributesAsTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAttributesAsTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAttributesAsTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom10(in *jlexer.Lexer, out *SetAttributeValueParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom10(out *jwriter.Writer, in SetAttributeValueParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAttributeValueParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAttributeValueParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAttributeValueParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAttributeValueParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom11(in *jlexer.Lexer, out *ScrollIntoViewIfNeededParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "rect":
- if in.IsNull() {
- in.Skip()
- out.Rect = nil
- } else {
- if out.Rect == nil {
- out.Rect = new(Rect)
- }
- (*out.Rect).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom11(out *jwriter.Writer, in ScrollIntoViewIfNeededParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- if in.Rect != nil {
- const prefix string = ",\"rect\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Rect).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScrollIntoViewIfNeededParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScrollIntoViewIfNeededParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScrollIntoViewIfNeededParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScrollIntoViewIfNeededParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom12(in *jlexer.Lexer, out *ResolveNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "object":
- if in.IsNull() {
- in.Skip()
- out.Object = nil
- } else {
- if out.Object == nil {
- out.Object = new(runtime.RemoteObject)
- }
- (*out.Object).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom12(out *jwriter.Writer, in ResolveNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Object != nil {
- const prefix string = ",\"object\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Object).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom13(in *jlexer.Lexer, out *ResolveNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- case "executionContextId":
- out.ExecutionContextID = runtime.ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom13(out *jwriter.Writer, in ResolveNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectGroup))
- }
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom14(in *jlexer.Lexer, out *RequestNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom14(out *jwriter.Writer, in RequestNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom15(in *jlexer.Lexer, out *RequestNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom15(out *jwriter.Writer, in RequestNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom16(in *jlexer.Lexer, out *RequestChildNodesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "depth":
- out.Depth = int64(in.Int64())
- case "pierce":
- out.Pierce = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom16(out *jwriter.Writer, in RequestChildNodesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.Depth != 0 {
- const prefix string = ",\"depth\":"
- out.RawString(prefix)
- out.Int64(int64(in.Depth))
- }
- if in.Pierce {
- const prefix string = ",\"pierce\":"
- out.RawString(prefix)
- out.Bool(bool(in.Pierce))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestChildNodesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestChildNodesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestChildNodesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestChildNodesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom17(in *jlexer.Lexer, out *RemoveNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom17(out *jwriter.Writer, in RemoveNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom18(in *jlexer.Lexer, out *RemoveAttributeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom18(out *jwriter.Writer, in RemoveAttributeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveAttributeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveAttributeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveAttributeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveAttributeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom19(in *jlexer.Lexer, out *RedoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom19(out *jwriter.Writer, in RedoParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RedoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RedoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RedoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RedoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom20(in *jlexer.Lexer, out *Rect) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "width":
- out.Width = float64(in.Float64())
- case "height":
- out.Height = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom20(out *jwriter.Writer, in Rect) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Float64(float64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Float64(float64(in.Height))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Rect) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Rect) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Rect) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Rect) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom21(in *jlexer.Lexer, out *QuerySelectorReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom21(out *jwriter.Writer, in QuerySelectorReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QuerySelectorReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QuerySelectorReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QuerySelectorReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QuerySelectorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom22(in *jlexer.Lexer, out *QuerySelectorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "selector":
- out.Selector = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom22(out *jwriter.Writer, in QuerySelectorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"selector\":"
- out.RawString(prefix)
- out.String(string(in.Selector))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QuerySelectorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QuerySelectorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QuerySelectorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QuerySelectorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom23(in *jlexer.Lexer, out *QuerySelectorAllReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v13 cdp.NodeID
- (v13).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom23(out *jwriter.Writer, in QuerySelectorAllReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.NodeIds) != 0 {
- const prefix string = ",\"nodeIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v14, v15 := range in.NodeIds {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v15))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QuerySelectorAllReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QuerySelectorAllReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QuerySelectorAllReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QuerySelectorAllReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom24(in *jlexer.Lexer, out *QuerySelectorAllParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "selector":
- out.Selector = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom24(out *jwriter.Writer, in QuerySelectorAllParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"selector\":"
- out.RawString(prefix)
- out.String(string(in.Selector))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QuerySelectorAllParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QuerySelectorAllParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QuerySelectorAllParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QuerySelectorAllParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v16 cdp.NodeID
- (v16).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.NodeIds) != 0 {
- const prefix string = ",\"nodeIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v17, v18 := range in.NodeIds {
- if v17 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v18))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PushNodesByBackendIdsToFrontendReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PushNodesByBackendIdsToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PushNodesByBackendIdsToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(in *jlexer.Lexer, out *PushNodesByBackendIdsToFrontendParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backendNodeIds":
- if in.IsNull() {
- in.Skip()
- out.BackendNodeIds = nil
- } else {
- in.Delim('[')
- if out.BackendNodeIds == nil {
- if !in.IsDelim(']') {
- out.BackendNodeIds = make([]cdp.BackendNodeID, 0, 8)
- } else {
- out.BackendNodeIds = []cdp.BackendNodeID{}
- }
- } else {
- out.BackendNodeIds = (out.BackendNodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v19 cdp.BackendNodeID
- (v19).UnmarshalEasyJSON(in)
- out.BackendNodeIds = append(out.BackendNodeIds, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(out *jwriter.Writer, in PushNodesByBackendIdsToFrontendParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"backendNodeIds\":"
- out.RawString(prefix[1:])
- if in.BackendNodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v20, v21 := range in.BackendNodeIds {
- if v20 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v21))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PushNodesByBackendIdsToFrontendParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PushNodesByBackendIdsToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PushNodesByBackendIdsToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom27(in *jlexer.Lexer, out *PushNodeByPathToFrontendReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom27(out *jwriter.Writer, in PushNodeByPathToFrontendReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PushNodeByPathToFrontendReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PushNodeByPathToFrontendReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PushNodeByPathToFrontendReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PushNodeByPathToFrontendReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom28(in *jlexer.Lexer, out *PushNodeByPathToFrontendParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "path":
- out.Path = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom28(out *jwriter.Writer, in PushNodeByPathToFrontendParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"path\":"
- out.RawString(prefix[1:])
- out.String(string(in.Path))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PushNodeByPathToFrontendParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PushNodeByPathToFrontendParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PushNodeByPathToFrontendParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PushNodeByPathToFrontendParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom29(in *jlexer.Lexer, out *PerformSearchReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "searchId":
- out.SearchID = string(in.String())
- case "resultCount":
- out.ResultCount = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom29(out *jwriter.Writer, in PerformSearchReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SearchID != "" {
- const prefix string = ",\"searchId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SearchID))
- }
- if in.ResultCount != 0 {
- const prefix string = ",\"resultCount\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.ResultCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PerformSearchReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PerformSearchReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PerformSearchReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PerformSearchReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom30(in *jlexer.Lexer, out *PerformSearchParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "query":
- out.Query = string(in.String())
- case "includeUserAgentShadowDOM":
- out.IncludeUserAgentShadowDOM = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom30(out *jwriter.Writer, in PerformSearchParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"query\":"
- out.RawString(prefix[1:])
- out.String(string(in.Query))
- }
- if in.IncludeUserAgentShadowDOM {
- const prefix string = ",\"includeUserAgentShadowDOM\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeUserAgentShadowDOM))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PerformSearchParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PerformSearchParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PerformSearchParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PerformSearchParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom31(in *jlexer.Lexer, out *MoveToReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom31(out *jwriter.Writer, in MoveToReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MoveToReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MoveToReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MoveToReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MoveToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom32(in *jlexer.Lexer, out *MoveToParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "targetNodeId":
- (out.TargetNodeID).UnmarshalEasyJSON(in)
- case "insertBeforeNodeId":
- (out.InsertBeforeNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom32(out *jwriter.Writer, in MoveToParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"targetNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.TargetNodeID))
- }
- if in.InsertBeforeNodeID != 0 {
- const prefix string = ",\"insertBeforeNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.InsertBeforeNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MoveToParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MoveToParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MoveToParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MoveToParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom33(in *jlexer.Lexer, out *MarkUndoableStateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom33(out *jwriter.Writer, in MarkUndoableStateParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MarkUndoableStateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MarkUndoableStateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MarkUndoableStateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MarkUndoableStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom34(in *jlexer.Lexer, out *GetSearchResultsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v22 cdp.NodeID
- (v22).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom34(out *jwriter.Writer, in GetSearchResultsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.NodeIds) != 0 {
- const prefix string = ",\"nodeIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v23, v24 := range in.NodeIds {
- if v23 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v24))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSearchResultsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSearchResultsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSearchResultsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSearchResultsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom35(in *jlexer.Lexer, out *GetSearchResultsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "searchId":
- out.SearchID = string(in.String())
- case "fromIndex":
- out.FromIndex = int64(in.Int64())
- case "toIndex":
- out.ToIndex = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom35(out *jwriter.Writer, in GetSearchResultsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"searchId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SearchID))
- }
- {
- const prefix string = ",\"fromIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.FromIndex))
- }
- {
- const prefix string = ",\"toIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.ToIndex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSearchResultsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSearchResultsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSearchResultsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSearchResultsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom36(in *jlexer.Lexer, out *GetRelayoutBoundaryReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom36(out *jwriter.Writer, in GetRelayoutBoundaryReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRelayoutBoundaryReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRelayoutBoundaryReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRelayoutBoundaryReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRelayoutBoundaryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom37(in *jlexer.Lexer, out *GetRelayoutBoundaryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom37(out *jwriter.Writer, in GetRelayoutBoundaryParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRelayoutBoundaryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRelayoutBoundaryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRelayoutBoundaryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRelayoutBoundaryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom38(in *jlexer.Lexer, out *GetOuterHTMLReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "outerHTML":
- out.OuterHTML = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom38(out *jwriter.Writer, in GetOuterHTMLReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.OuterHTML != "" {
- const prefix string = ",\"outerHTML\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.OuterHTML))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetOuterHTMLReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetOuterHTMLReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetOuterHTMLReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetOuterHTMLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom39(in *jlexer.Lexer, out *GetOuterHTMLParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom39(out *jwriter.Writer, in GetOuterHTMLParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetOuterHTMLParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetOuterHTMLParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetOuterHTMLParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetOuterHTMLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom40(in *jlexer.Lexer, out *GetNodesForSubtreeByStyleReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v25 cdp.NodeID
- (v25).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom40(out *jwriter.Writer, in GetNodesForSubtreeByStyleReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.NodeIds) != 0 {
- const prefix string = ",\"nodeIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v26, v27 := range in.NodeIds {
- if v26 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v27))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodesForSubtreeByStyleReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodesForSubtreeByStyleReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodesForSubtreeByStyleReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodesForSubtreeByStyleReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom41(in *jlexer.Lexer, out *GetNodesForSubtreeByStyleParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "computedStyles":
- if in.IsNull() {
- in.Skip()
- out.ComputedStyles = nil
- } else {
- in.Delim('[')
- if out.ComputedStyles == nil {
- if !in.IsDelim(']') {
- out.ComputedStyles = make([]*CSSComputedStyleProperty, 0, 8)
- } else {
- out.ComputedStyles = []*CSSComputedStyleProperty{}
- }
- } else {
- out.ComputedStyles = (out.ComputedStyles)[:0]
- }
- for !in.IsDelim(']') {
- var v28 *CSSComputedStyleProperty
- if in.IsNull() {
- in.Skip()
- v28 = nil
- } else {
- if v28 == nil {
- v28 = new(CSSComputedStyleProperty)
- }
- (*v28).UnmarshalEasyJSON(in)
- }
- out.ComputedStyles = append(out.ComputedStyles, v28)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "pierce":
- out.Pierce = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom41(out *jwriter.Writer, in GetNodesForSubtreeByStyleParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"computedStyles\":"
- out.RawString(prefix)
- if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v29, v30 := range in.ComputedStyles {
- if v29 > 0 {
- out.RawByte(',')
- }
- if v30 == nil {
- out.RawString("null")
- } else {
- (*v30).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Pierce {
- const prefix string = ",\"pierce\":"
- out.RawString(prefix)
- out.Bool(bool(in.Pierce))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodesForSubtreeByStyleParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodesForSubtreeByStyleParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodesForSubtreeByStyleParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodesForSubtreeByStyleParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom42(in *jlexer.Lexer, out *GetNodeStackTracesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "creation":
- if in.IsNull() {
- in.Skip()
- out.Creation = nil
- } else {
- if out.Creation == nil {
- out.Creation = new(runtime.StackTrace)
- }
- (*out.Creation).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom42(out *jwriter.Writer, in GetNodeStackTracesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Creation != nil {
- const prefix string = ",\"creation\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Creation).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodeStackTracesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodeStackTracesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodeStackTracesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodeStackTracesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom43(in *jlexer.Lexer, out *GetNodeStackTracesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom43(out *jwriter.Writer, in GetNodeStackTracesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodeStackTracesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodeStackTracesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodeStackTracesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodeStackTracesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom44(in *jlexer.Lexer, out *GetNodeForLocationReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom44(out *jwriter.Writer, in GetNodeForLocationReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.BackendNodeID))
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.FrameID))
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodeForLocationReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodeForLocationReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodeForLocationReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodeForLocationReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom45(in *jlexer.Lexer, out *GetNodeForLocationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = int64(in.Int64())
- case "y":
- out.Y = int64(in.Int64())
- case "includeUserAgentShadowDOM":
- out.IncludeUserAgentShadowDOM = bool(in.Bool())
- case "ignorePointerEventsNone":
- out.IgnorePointerEventsNone = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom45(out *jwriter.Writer, in GetNodeForLocationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Int64(int64(in.Y))
- }
- if in.IncludeUserAgentShadowDOM {
- const prefix string = ",\"includeUserAgentShadowDOM\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeUserAgentShadowDOM))
- }
- if in.IgnorePointerEventsNone {
- const prefix string = ",\"ignorePointerEventsNone\":"
- out.RawString(prefix)
- out.Bool(bool(in.IgnorePointerEventsNone))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNodeForLocationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNodeForLocationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNodeForLocationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNodeForLocationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom46(in *jlexer.Lexer, out *GetFrameOwnerReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom46(out *jwriter.Writer, in GetFrameOwnerReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.BackendNodeID))
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFrameOwnerReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFrameOwnerReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFrameOwnerReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFrameOwnerReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom47(in *jlexer.Lexer, out *GetFrameOwnerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom47(out *jwriter.Writer, in GetFrameOwnerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFrameOwnerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFrameOwnerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFrameOwnerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFrameOwnerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom48(in *jlexer.Lexer, out *GetFileInfoReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "path":
- out.Path = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom48(out *jwriter.Writer, in GetFileInfoReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Path != "" {
- const prefix string = ",\"path\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Path))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFileInfoReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFileInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFileInfoReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFileInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom49(in *jlexer.Lexer, out *GetFileInfoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom49(out *jwriter.Writer, in GetFileInfoParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFileInfoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFileInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFileInfoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFileInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom50(in *jlexer.Lexer, out *GetDocumentReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "root":
- if in.IsNull() {
- in.Skip()
- out.Root = nil
- } else {
- if out.Root == nil {
- out.Root = new(cdp.Node)
- }
- (*out.Root).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom50(out *jwriter.Writer, in GetDocumentReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Root != nil {
- const prefix string = ",\"root\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Root).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDocumentReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDocumentReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom50(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom51(in *jlexer.Lexer, out *GetDocumentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "depth":
- out.Depth = int64(in.Int64())
- case "pierce":
- out.Pierce = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom51(out *jwriter.Writer, in GetDocumentParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Depth != 0 {
- const prefix string = ",\"depth\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.Depth))
- }
- if in.Pierce {
- const prefix string = ",\"pierce\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Pierce))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDocumentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom51(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDocumentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom51(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDocumentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom51(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom51(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom52(in *jlexer.Lexer, out *GetContentQuadsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "quads":
- if in.IsNull() {
- in.Skip()
- out.Quads = nil
- } else {
- in.Delim('[')
- if out.Quads == nil {
- if !in.IsDelim(']') {
- out.Quads = make([]Quad, 0, 2)
- } else {
- out.Quads = []Quad{}
- }
- } else {
- out.Quads = (out.Quads)[:0]
- }
- for !in.IsDelim(']') {
- var v31 Quad
- if in.IsNull() {
- in.Skip()
- v31 = nil
- } else {
- in.Delim('[')
- if v31 == nil {
- if !in.IsDelim(']') {
- v31 = make(Quad, 0, 8)
- } else {
- v31 = Quad{}
- }
- } else {
- v31 = (v31)[:0]
- }
- for !in.IsDelim(']') {
- var v32 float64
- v32 = float64(in.Float64())
- v31 = append(v31, v32)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Quads = append(out.Quads, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom52(out *jwriter.Writer, in GetContentQuadsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Quads) != 0 {
- const prefix string = ",\"quads\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v33, v34 := range in.Quads {
- if v33 > 0 {
- out.RawByte(',')
- }
- if v34 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v35, v36 := range v34 {
- if v35 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v36))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetContentQuadsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom52(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetContentQuadsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom52(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetContentQuadsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom52(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetContentQuadsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom52(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom53(in *jlexer.Lexer, out *GetContentQuadsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom53(out *jwriter.Writer, in GetContentQuadsParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetContentQuadsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom53(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetContentQuadsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom53(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetContentQuadsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom53(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetContentQuadsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom53(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom54(in *jlexer.Lexer, out *GetBoxModelReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "model":
- if in.IsNull() {
- in.Skip()
- out.Model = nil
- } else {
- if out.Model == nil {
- out.Model = new(BoxModel)
- }
- (*out.Model).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom54(out *jwriter.Writer, in GetBoxModelReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Model != nil {
- const prefix string = ",\"model\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Model).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBoxModelReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom54(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBoxModelReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom54(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBoxModelReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom54(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBoxModelReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom54(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom55(in *jlexer.Lexer, out *GetBoxModelParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom55(out *jwriter.Writer, in GetBoxModelParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBoxModelParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom55(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBoxModelParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom55(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBoxModelParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom55(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBoxModelParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom55(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom56(in *jlexer.Lexer, out *GetAttributesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "attributes":
- if in.IsNull() {
- in.Skip()
- out.Attributes = nil
- } else {
- in.Delim('[')
- if out.Attributes == nil {
- if !in.IsDelim(']') {
- out.Attributes = make([]string, 0, 4)
- } else {
- out.Attributes = []string{}
- }
- } else {
- out.Attributes = (out.Attributes)[:0]
- }
- for !in.IsDelim(']') {
- var v37 string
- v37 = string(in.String())
- out.Attributes = append(out.Attributes, v37)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom56(out *jwriter.Writer, in GetAttributesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v38, v39 := range in.Attributes {
- if v38 > 0 {
- out.RawByte(',')
- }
- out.String(string(v39))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAttributesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom56(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAttributesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom56(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAttributesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom56(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAttributesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom56(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom57(in *jlexer.Lexer, out *GetAttributesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom57(out *jwriter.Writer, in GetAttributesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAttributesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom57(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAttributesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom57(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAttributesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom57(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAttributesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom57(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom58(in *jlexer.Lexer, out *FocusParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom58(out *jwriter.Writer, in FocusParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FocusParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom58(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FocusParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom58(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FocusParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom58(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FocusParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom58(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom59(in *jlexer.Lexer, out *EventShadowRootPushed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "hostId":
- (out.HostID).UnmarshalEasyJSON(in)
- case "root":
- if in.IsNull() {
- in.Skip()
- out.Root = nil
- } else {
- if out.Root == nil {
- out.Root = new(cdp.Node)
- }
- (*out.Root).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom59(out *jwriter.Writer, in EventShadowRootPushed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"hostId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.HostID))
- }
- {
- const prefix string = ",\"root\":"
- out.RawString(prefix)
- if in.Root == nil {
- out.RawString("null")
- } else {
- (*in.Root).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventShadowRootPushed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom59(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventShadowRootPushed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom59(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventShadowRootPushed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom59(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventShadowRootPushed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom59(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom60(in *jlexer.Lexer, out *EventShadowRootPopped) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "hostId":
- (out.HostID).UnmarshalEasyJSON(in)
- case "rootId":
- (out.RootID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom60(out *jwriter.Writer, in EventShadowRootPopped) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"hostId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.HostID))
- }
- {
- const prefix string = ",\"rootId\":"
- out.RawString(prefix)
- out.Int64(int64(in.RootID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventShadowRootPopped) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom60(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventShadowRootPopped) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom60(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventShadowRootPopped) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom60(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventShadowRootPopped) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom60(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom61(in *jlexer.Lexer, out *EventSetChildNodes) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentId":
- (out.ParentID).UnmarshalEasyJSON(in)
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*cdp.Node, 0, 8)
- } else {
- out.Nodes = []*cdp.Node{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v40 *cdp.Node
- if in.IsNull() {
- in.Skip()
- v40 = nil
- } else {
- if v40 == nil {
- v40 = new(cdp.Node)
- }
- (*v40).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v40)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom61(out *jwriter.Writer, in EventSetChildNodes) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ParentID))
- }
- {
- const prefix string = ",\"nodes\":"
- out.RawString(prefix)
- if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v41, v42 := range in.Nodes {
- if v41 > 0 {
- out.RawByte(',')
- }
- if v42 == nil {
- out.RawString("null")
- } else {
- (*v42).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSetChildNodes) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom61(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSetChildNodes) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom61(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSetChildNodes) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom61(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSetChildNodes) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom61(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom62(in *jlexer.Lexer, out *EventPseudoElementRemoved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentId":
- (out.ParentID).UnmarshalEasyJSON(in)
- case "pseudoElementId":
- (out.PseudoElementID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom62(out *jwriter.Writer, in EventPseudoElementRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ParentID))
- }
- {
- const prefix string = ",\"pseudoElementId\":"
- out.RawString(prefix)
- out.Int64(int64(in.PseudoElementID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPseudoElementRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom62(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPseudoElementRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom62(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPseudoElementRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom62(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPseudoElementRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom62(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom63(in *jlexer.Lexer, out *EventPseudoElementAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentId":
- (out.ParentID).UnmarshalEasyJSON(in)
- case "pseudoElement":
- if in.IsNull() {
- in.Skip()
- out.PseudoElement = nil
- } else {
- if out.PseudoElement == nil {
- out.PseudoElement = new(cdp.Node)
- }
- (*out.PseudoElement).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom63(out *jwriter.Writer, in EventPseudoElementAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ParentID))
- }
- {
- const prefix string = ",\"pseudoElement\":"
- out.RawString(prefix)
- if in.PseudoElement == nil {
- out.RawString("null")
- } else {
- (*in.PseudoElement).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPseudoElementAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom63(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPseudoElementAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom63(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPseudoElementAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom63(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPseudoElementAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom63(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom64(in *jlexer.Lexer, out *EventInlineStyleInvalidated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v43 cdp.NodeID
- (v43).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v43)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom64(out *jwriter.Writer, in EventInlineStyleInvalidated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeIds\":"
- out.RawString(prefix[1:])
- if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v44, v45 := range in.NodeIds {
- if v44 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v45))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInlineStyleInvalidated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom64(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInlineStyleInvalidated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom64(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInlineStyleInvalidated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom64(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInlineStyleInvalidated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom64(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom65(in *jlexer.Lexer, out *EventDocumentUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom65(out *jwriter.Writer, in EventDocumentUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDocumentUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom65(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDocumentUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom65(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDocumentUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom65(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDocumentUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom65(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom66(in *jlexer.Lexer, out *EventDistributedNodesUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "insertionPointId":
- (out.InsertionPointID).UnmarshalEasyJSON(in)
- case "distributedNodes":
- if in.IsNull() {
- in.Skip()
- out.DistributedNodes = nil
- } else {
- in.Delim('[')
- if out.DistributedNodes == nil {
- if !in.IsDelim(']') {
- out.DistributedNodes = make([]*cdp.BackendNode, 0, 8)
- } else {
- out.DistributedNodes = []*cdp.BackendNode{}
- }
- } else {
- out.DistributedNodes = (out.DistributedNodes)[:0]
- }
- for !in.IsDelim(']') {
- var v46 *cdp.BackendNode
- if in.IsNull() {
- in.Skip()
- v46 = nil
- } else {
- if v46 == nil {
- v46 = new(cdp.BackendNode)
- }
- (*v46).UnmarshalEasyJSON(in)
- }
- out.DistributedNodes = append(out.DistributedNodes, v46)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom66(out *jwriter.Writer, in EventDistributedNodesUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"insertionPointId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.InsertionPointID))
- }
- {
- const prefix string = ",\"distributedNodes\":"
- out.RawString(prefix)
- if in.DistributedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v47, v48 := range in.DistributedNodes {
- if v47 > 0 {
- out.RawByte(',')
- }
- if v48 == nil {
- out.RawString("null")
- } else {
- (*v48).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDistributedNodesUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom66(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDistributedNodesUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom66(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDistributedNodesUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom66(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDistributedNodesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom66(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom67(in *jlexer.Lexer, out *EventChildNodeRemoved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentNodeId":
- (out.ParentNodeID).UnmarshalEasyJSON(in)
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom67(out *jwriter.Writer, in EventChildNodeRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentNodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ParentNodeID))
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventChildNodeRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom67(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventChildNodeRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom67(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventChildNodeRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom67(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventChildNodeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom67(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom68(in *jlexer.Lexer, out *EventChildNodeInserted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentNodeId":
- (out.ParentNodeID).UnmarshalEasyJSON(in)
- case "previousNodeId":
- (out.PreviousNodeID).UnmarshalEasyJSON(in)
- case "node":
- if in.IsNull() {
- in.Skip()
- out.Node = nil
- } else {
- if out.Node == nil {
- out.Node = new(cdp.Node)
- }
- (*out.Node).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom68(out *jwriter.Writer, in EventChildNodeInserted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentNodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ParentNodeID))
- }
- {
- const prefix string = ",\"previousNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.PreviousNodeID))
- }
- {
- const prefix string = ",\"node\":"
- out.RawString(prefix)
- if in.Node == nil {
- out.RawString("null")
- } else {
- (*in.Node).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventChildNodeInserted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom68(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventChildNodeInserted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom68(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventChildNodeInserted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom68(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventChildNodeInserted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom68(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom69(in *jlexer.Lexer, out *EventChildNodeCountUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "childNodeCount":
- out.ChildNodeCount = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom69(out *jwriter.Writer, in EventChildNodeCountUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"childNodeCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.ChildNodeCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventChildNodeCountUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom69(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventChildNodeCountUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom69(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventChildNodeCountUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom69(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventChildNodeCountUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom69(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom70(in *jlexer.Lexer, out *EventCharacterDataModified) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "characterData":
- out.CharacterData = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom70(out *jwriter.Writer, in EventCharacterDataModified) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"characterData\":"
- out.RawString(prefix)
- out.String(string(in.CharacterData))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventCharacterDataModified) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom70(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventCharacterDataModified) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom70(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventCharacterDataModified) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom70(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventCharacterDataModified) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom70(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom71(in *jlexer.Lexer, out *EventAttributeRemoved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom71(out *jwriter.Writer, in EventAttributeRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAttributeRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom71(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAttributeRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom71(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAttributeRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom71(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAttributeRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom71(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom72(in *jlexer.Lexer, out *EventAttributeModified) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom72(out *jwriter.Writer, in EventAttributeModified) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAttributeModified) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom72(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAttributeModified) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom72(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAttributeModified) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom72(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAttributeModified) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom72(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom73(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom73(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom73(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom73(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom73(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom73(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom74(in *jlexer.Lexer, out *DiscardSearchResultsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "searchId":
- out.SearchID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom74(out *jwriter.Writer, in DiscardSearchResultsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"searchId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SearchID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DiscardSearchResultsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom74(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DiscardSearchResultsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom74(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DiscardSearchResultsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom74(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DiscardSearchResultsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom74(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom75(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom75(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom75(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom75(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom75(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom75(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom76(in *jlexer.Lexer, out *DescribeNodeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "node":
- if in.IsNull() {
- in.Skip()
- out.Node = nil
- } else {
- if out.Node == nil {
- out.Node = new(cdp.Node)
- }
- (*out.Node).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom76(out *jwriter.Writer, in DescribeNodeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Node != nil {
- const prefix string = ",\"node\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Node).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DescribeNodeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom76(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DescribeNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom76(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DescribeNodeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom76(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DescribeNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom76(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom77(in *jlexer.Lexer, out *DescribeNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "depth":
- out.Depth = int64(in.Int64())
- case "pierce":
- out.Pierce = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom77(out *jwriter.Writer, in DescribeNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- if in.Depth != 0 {
- const prefix string = ",\"depth\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Depth))
- }
- if in.Pierce {
- const prefix string = ",\"pierce\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Pierce))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DescribeNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom77(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DescribeNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom77(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DescribeNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom77(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DescribeNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom77(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom78(in *jlexer.Lexer, out *CopyToReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom78(out *jwriter.Writer, in CopyToReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CopyToReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom78(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CopyToReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom78(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CopyToReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom78(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CopyToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom78(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom79(in *jlexer.Lexer, out *CopyToParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "targetNodeId":
- (out.TargetNodeID).UnmarshalEasyJSON(in)
- case "insertBeforeNodeId":
- (out.InsertBeforeNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom79(out *jwriter.Writer, in CopyToParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"targetNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.TargetNodeID))
- }
- if in.InsertBeforeNodeID != 0 {
- const prefix string = ",\"insertBeforeNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.InsertBeforeNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CopyToParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom79(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CopyToParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom79(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CopyToParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom79(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CopyToParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom79(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom80(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "classNames":
- if in.IsNull() {
- in.Skip()
- out.ClassNames = nil
- } else {
- in.Delim('[')
- if out.ClassNames == nil {
- if !in.IsDelim(']') {
- out.ClassNames = make([]string, 0, 4)
- } else {
- out.ClassNames = []string{}
- }
- } else {
- out.ClassNames = (out.ClassNames)[:0]
- }
- for !in.IsDelim(']') {
- var v49 string
- v49 = string(in.String())
- out.ClassNames = append(out.ClassNames, v49)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom80(out *jwriter.Writer, in CollectClassNamesFromSubtreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ClassNames) != 0 {
- const prefix string = ",\"classNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v50, v51 := range in.ClassNames {
- if v50 > 0 {
- out.RawByte(',')
- }
- out.String(string(v51))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CollectClassNamesFromSubtreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom80(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CollectClassNamesFromSubtreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom80(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CollectClassNamesFromSubtreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom80(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CollectClassNamesFromSubtreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom80(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom81(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom81(out *jwriter.Writer, in CollectClassNamesFromSubtreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CollectClassNamesFromSubtreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom81(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CollectClassNamesFromSubtreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom81(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CollectClassNamesFromSubtreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom81(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CollectClassNamesFromSubtreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom81(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom82(in *jlexer.Lexer, out *CSSComputedStyleProperty) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom82(out *jwriter.Writer, in CSSComputedStyleProperty) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CSSComputedStyleProperty) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom82(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CSSComputedStyleProperty) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom82(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CSSComputedStyleProperty) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom82(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CSSComputedStyleProperty) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom82(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom83(in *jlexer.Lexer, out *BoxModel) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "content":
- if in.IsNull() {
- in.Skip()
- out.Content = nil
- } else {
- in.Delim('[')
- if out.Content == nil {
- if !in.IsDelim(']') {
- out.Content = make(Quad, 0, 8)
- } else {
- out.Content = Quad{}
- }
- } else {
- out.Content = (out.Content)[:0]
- }
- for !in.IsDelim(']') {
- var v52 float64
- v52 = float64(in.Float64())
- out.Content = append(out.Content, v52)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "padding":
- if in.IsNull() {
- in.Skip()
- out.Padding = nil
- } else {
- in.Delim('[')
- if out.Padding == nil {
- if !in.IsDelim(']') {
- out.Padding = make(Quad, 0, 8)
- } else {
- out.Padding = Quad{}
- }
- } else {
- out.Padding = (out.Padding)[:0]
- }
- for !in.IsDelim(']') {
- var v53 float64
- v53 = float64(in.Float64())
- out.Padding = append(out.Padding, v53)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "border":
- if in.IsNull() {
- in.Skip()
- out.Border = nil
- } else {
- in.Delim('[')
- if out.Border == nil {
- if !in.IsDelim(']') {
- out.Border = make(Quad, 0, 8)
- } else {
- out.Border = Quad{}
- }
- } else {
- out.Border = (out.Border)[:0]
- }
- for !in.IsDelim(']') {
- var v54 float64
- v54 = float64(in.Float64())
- out.Border = append(out.Border, v54)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "margin":
- if in.IsNull() {
- in.Skip()
- out.Margin = nil
- } else {
- in.Delim('[')
- if out.Margin == nil {
- if !in.IsDelim(']') {
- out.Margin = make(Quad, 0, 8)
- } else {
- out.Margin = Quad{}
- }
- } else {
- out.Margin = (out.Margin)[:0]
- }
- for !in.IsDelim(']') {
- var v55 float64
- v55 = float64(in.Float64())
- out.Margin = append(out.Margin, v55)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- case "shapeOutside":
- if in.IsNull() {
- in.Skip()
- out.ShapeOutside = nil
- } else {
- if out.ShapeOutside == nil {
- out.ShapeOutside = new(ShapeOutsideInfo)
- }
- (*out.ShapeOutside).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom83(out *jwriter.Writer, in BoxModel) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"content\":"
- out.RawString(prefix[1:])
- if in.Content == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v56, v57 := range in.Content {
- if v56 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v57))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"padding\":"
- out.RawString(prefix)
- if in.Padding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v58, v59 := range in.Padding {
- if v58 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v59))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"border\":"
- out.RawString(prefix)
- if in.Border == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v60, v61 := range in.Border {
- if v60 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v61))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"margin\":"
- out.RawString(prefix)
- if in.Margin == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v62, v63 := range in.Margin {
- if v62 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v63))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Int64(int64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Int64(int64(in.Height))
- }
- if in.ShapeOutside != nil {
- const prefix string = ",\"shapeOutside\":"
- out.RawString(prefix)
- (*in.ShapeOutside).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BoxModel) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom83(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BoxModel) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom83(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BoxModel) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom83(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BoxModel) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom83(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/dom/events.go b/vendor/github.com/chromedp/cdproto/dom/events.go
deleted file mode 100644
index b698032ba5c..00000000000
--- a/vendor/github.com/chromedp/cdproto/dom/events.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package dom
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EventAttributeModified fired when Element's attribute is modified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeModified
-type EventAttributeModified struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
- Name string `json:"name"` // Attribute name.
- Value string `json:"value"` // Attribute value.
-}
-
-// EventAttributeRemoved fired when Element's attribute is removed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeRemoved
-type EventAttributeRemoved struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
- Name string `json:"name"` // A ttribute name.
-}
-
-// EventCharacterDataModified mirrors DOMCharacterDataModified event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-characterDataModified
-type EventCharacterDataModified struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
- CharacterData string `json:"characterData"` // New text value.
-}
-
-// EventChildNodeCountUpdated fired when Container's child node count has
-// changed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeCountUpdated
-type EventChildNodeCountUpdated struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
- ChildNodeCount int64 `json:"childNodeCount"` // New node count.
-}
-
-// EventChildNodeInserted mirrors DOMNodeInserted event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted
-type EventChildNodeInserted struct {
- ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
- PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
- Node *cdp.Node `json:"node"` // Inserted node data.
-}
-
-// EventChildNodeRemoved mirrors DOMNodeRemoved event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeRemoved
-type EventChildNodeRemoved struct {
- ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has been removed.
-}
-
-// EventDistributedNodesUpdated called when distribution is changed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-distributedNodesUpdated
-type EventDistributedNodesUpdated struct {
- InsertionPointID cdp.NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
- DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
-}
-
-// EventDocumentUpdated fired when Document has been totally updated. Node
-// ids are no longer valid.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-documentUpdated
-type EventDocumentUpdated struct{}
-
-// EventInlineStyleInvalidated fired when Element's inline style is modified
-// via a CSS property modification.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated
-type EventInlineStyleInvalidated struct {
- NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
-}
-
-// EventPseudoElementAdded called when a pseudo element is added to an
-// element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementAdded
-type EventPseudoElementAdded struct {
- ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
- PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
-}
-
-// EventPseudoElementRemoved called when a pseudo element is removed from an
-// element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementRemoved
-type EventPseudoElementRemoved struct {
- ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
- PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
-}
-
-// EventSetChildNodes fired when backend wants to provide client with the
-// missing DOM structure. This happens upon most of the calls requesting node
-// ids.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-setChildNodes
-type EventSetChildNodes struct {
- ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
- Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
-}
-
-// EventShadowRootPopped called when shadow root is popped from the element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPopped
-type EventShadowRootPopped struct {
- HostID cdp.NodeID `json:"hostId"` // Host element id.
- RootID cdp.NodeID `json:"rootId"` // Shadow root id.
-}
-
-// EventShadowRootPushed called when shadow root is pushed into the element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPushed
-type EventShadowRootPushed struct {
- HostID cdp.NodeID `json:"hostId"` // Host element id.
- Root *cdp.Node `json:"root"` // Shadow root.
-}
diff --git a/vendor/github.com/chromedp/cdproto/dom/types.go b/vendor/github.com/chromedp/cdproto/dom/types.go
deleted file mode 100644
index e4ed3840904..00000000000
--- a/vendor/github.com/chromedp/cdproto/dom/types.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package dom
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/mailru/easyjson"
-)
-
-// Quad an array of quad vertices, x immediately followed by y for each
-// point, points clock-wise.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Quad
-type Quad []float64
-
-// BoxModel box model.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BoxModel
-type BoxModel struct {
- Content Quad `json:"content"` // Content box
- Padding Quad `json:"padding"` // Padding box
- Border Quad `json:"border"` // Border box
- Margin Quad `json:"margin"` // Margin box
- Width int64 `json:"width"` // Node width
- Height int64 `json:"height"` // Node height
- ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates
-}
-
-// ShapeOutsideInfo CSS Shape Outside details.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ShapeOutsideInfo
-type ShapeOutsideInfo struct {
- Bounds Quad `json:"bounds"` // Shape bounds
- Shape []easyjson.RawMessage `json:"shape"` // Shape coordinate details
- MarginShape []easyjson.RawMessage `json:"marginShape"` // Margin shape bounds
-}
-
-// Rect Rectangle.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Rect
-type Rect struct {
- X float64 `json:"x"` // X coordinate
- Y float64 `json:"y"` // Y coordinate
- Width float64 `json:"width"` // Rectangle width
- Height float64 `json:"height"` // Rectangle height
-}
-
-// CSSComputedStyleProperty [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-CSSComputedStyleProperty
-type CSSComputedStyleProperty struct {
- Name string `json:"name"` // Computed style property name.
- Value string `json:"value"` // Computed style property value.
-}
diff --git a/vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go b/vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go
deleted file mode 100644
index 5cd1a4ac487..00000000000
--- a/vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go
+++ /dev/null
@@ -1,312 +0,0 @@
-// Package domdebugger provides the Chrome DevTools Protocol
-// commands, types, and events for the DOMDebugger domain.
-//
-// DOM debugging allows setting breakpoints on particular DOM operations and
-// events. JavaScript execution will stop on these operations as if there was a
-// regular breakpoint set.
-//
-// Generated by the cdproto-gen command.
-package domdebugger
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// GetEventListenersParams returns event listeners of the given object.
-type GetEventListenersParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to return listeners for.
- Depth int64 `json:"depth,omitempty"` // The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
- Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
-}
-
-// GetEventListeners returns event listeners of the given object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-getEventListeners
-//
-// parameters:
-// objectID - Identifier of the object to return listeners for.
-func GetEventListeners(objectID runtime.RemoteObjectID) *GetEventListenersParams {
- return &GetEventListenersParams{
- ObjectID: objectID,
- }
-}
-
-// WithDepth the maximum depth at which Node children should be retrieved,
-// defaults to 1. Use -1 for the entire subtree or provide an integer larger
-// than 0.
-func (p GetEventListenersParams) WithDepth(depth int64) *GetEventListenersParams {
- p.Depth = depth
- return &p
-}
-
-// WithPierce whether or not iframes and shadow roots should be traversed
-// when returning the subtree (default is false). Reports listeners for all
-// contexts if pierce is enabled.
-func (p GetEventListenersParams) WithPierce(pierce bool) *GetEventListenersParams {
- p.Pierce = pierce
- return &p
-}
-
-// GetEventListenersReturns return values.
-type GetEventListenersReturns struct {
- Listeners []*EventListener `json:"listeners,omitempty"` // Array of relevant listeners.
-}
-
-// Do executes DOMDebugger.getEventListeners against the provided context.
-//
-// returns:
-// listeners - Array of relevant listeners.
-func (p *GetEventListenersParams) Do(ctx context.Context) (listeners []*EventListener, err error) {
- // execute
- var res GetEventListenersReturns
- err = cdp.Execute(ctx, CommandGetEventListeners, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Listeners, nil
-}
-
-// RemoveDOMBreakpointParams removes DOM breakpoint that was set using
-// setDOMBreakpoint.
-type RemoveDOMBreakpointParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to remove breakpoint from.
- Type DOMBreakpointType `json:"type"` // Type of the breakpoint to remove.
-}
-
-// RemoveDOMBreakpoint removes DOM breakpoint that was set using
-// setDOMBreakpoint.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeDOMBreakpoint
-//
-// parameters:
-// nodeID - Identifier of the node to remove breakpoint from.
-// type - Type of the breakpoint to remove.
-func RemoveDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *RemoveDOMBreakpointParams {
- return &RemoveDOMBreakpointParams{
- NodeID: nodeID,
- Type: typeVal,
- }
-}
-
-// Do executes DOMDebugger.removeDOMBreakpoint against the provided context.
-func (p *RemoveDOMBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveDOMBreakpoint, p, nil)
-}
-
-// RemoveEventListenerBreakpointParams removes breakpoint on particular DOM
-// event.
-type RemoveEventListenerBreakpointParams struct {
- EventName string `json:"eventName"` // Event name.
- TargetName string `json:"targetName,omitempty"` // EventTarget interface name.
-}
-
-// RemoveEventListenerBreakpoint removes breakpoint on particular DOM event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeEventListenerBreakpoint
-//
-// parameters:
-// eventName - Event name.
-func RemoveEventListenerBreakpoint(eventName string) *RemoveEventListenerBreakpointParams {
- return &RemoveEventListenerBreakpointParams{
- EventName: eventName,
- }
-}
-
-// WithTargetName eventTarget interface name.
-func (p RemoveEventListenerBreakpointParams) WithTargetName(targetName string) *RemoveEventListenerBreakpointParams {
- p.TargetName = targetName
- return &p
-}
-
-// Do executes DOMDebugger.removeEventListenerBreakpoint against the provided context.
-func (p *RemoveEventListenerBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveEventListenerBreakpoint, p, nil)
-}
-
-// RemoveInstrumentationBreakpointParams removes breakpoint on particular
-// native event.
-type RemoveInstrumentationBreakpointParams struct {
- EventName string `json:"eventName"` // Instrumentation name to stop on.
-}
-
-// RemoveInstrumentationBreakpoint removes breakpoint on particular native
-// event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeInstrumentationBreakpoint
-//
-// parameters:
-// eventName - Instrumentation name to stop on.
-func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBreakpointParams {
- return &RemoveInstrumentationBreakpointParams{
- EventName: eventName,
- }
-}
-
-// Do executes DOMDebugger.removeInstrumentationBreakpoint against the provided context.
-func (p *RemoveInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveInstrumentationBreakpoint, p, nil)
-}
-
-// RemoveXHRBreakpointParams removes breakpoint from XMLHttpRequest.
-type RemoveXHRBreakpointParams struct {
- URL string `json:"url"` // Resource URL substring.
-}
-
-// RemoveXHRBreakpoint removes breakpoint from XMLHttpRequest.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeXHRBreakpoint
-//
-// parameters:
-// url - Resource URL substring.
-func RemoveXHRBreakpoint(url string) *RemoveXHRBreakpointParams {
- return &RemoveXHRBreakpointParams{
- URL: url,
- }
-}
-
-// Do executes DOMDebugger.removeXHRBreakpoint against the provided context.
-func (p *RemoveXHRBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveXHRBreakpoint, p, nil)
-}
-
-// SetBreakOnCSPViolationParams sets breakpoint on particular CSP violations.
-type SetBreakOnCSPViolationParams struct {
- ViolationTypes []CSPViolationType `json:"violationTypes"` // CSP Violations to stop upon.
-}
-
-// SetBreakOnCSPViolation sets breakpoint on particular CSP violations.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setBreakOnCSPViolation
-//
-// parameters:
-// violationTypes - CSP Violations to stop upon.
-func SetBreakOnCSPViolation(violationTypes []CSPViolationType) *SetBreakOnCSPViolationParams {
- return &SetBreakOnCSPViolationParams{
- ViolationTypes: violationTypes,
- }
-}
-
-// Do executes DOMDebugger.setBreakOnCSPViolation against the provided context.
-func (p *SetBreakOnCSPViolationParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBreakOnCSPViolation, p, nil)
-}
-
-// SetDOMBreakpointParams sets breakpoint on particular operation with DOM.
-type SetDOMBreakpointParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to set breakpoint on.
- Type DOMBreakpointType `json:"type"` // Type of the operation to stop upon.
-}
-
-// SetDOMBreakpoint sets breakpoint on particular operation with DOM.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setDOMBreakpoint
-//
-// parameters:
-// nodeID - Identifier of the node to set breakpoint on.
-// type - Type of the operation to stop upon.
-func SetDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *SetDOMBreakpointParams {
- return &SetDOMBreakpointParams{
- NodeID: nodeID,
- Type: typeVal,
- }
-}
-
-// Do executes DOMDebugger.setDOMBreakpoint against the provided context.
-func (p *SetDOMBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDOMBreakpoint, p, nil)
-}
-
-// SetEventListenerBreakpointParams sets breakpoint on particular DOM event.
-type SetEventListenerBreakpointParams struct {
- EventName string `json:"eventName"` // DOM Event name to stop on (any DOM event will do).
- TargetName string `json:"targetName,omitempty"` // EventTarget interface name to stop on. If equal to "*" or not provided, will stop on any EventTarget.
-}
-
-// SetEventListenerBreakpoint sets breakpoint on particular DOM event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setEventListenerBreakpoint
-//
-// parameters:
-// eventName - DOM Event name to stop on (any DOM event will do).
-func SetEventListenerBreakpoint(eventName string) *SetEventListenerBreakpointParams {
- return &SetEventListenerBreakpointParams{
- EventName: eventName,
- }
-}
-
-// WithTargetName eventTarget interface name to stop on. If equal to "*" or
-// not provided, will stop on any EventTarget.
-func (p SetEventListenerBreakpointParams) WithTargetName(targetName string) *SetEventListenerBreakpointParams {
- p.TargetName = targetName
- return &p
-}
-
-// Do executes DOMDebugger.setEventListenerBreakpoint against the provided context.
-func (p *SetEventListenerBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetEventListenerBreakpoint, p, nil)
-}
-
-// SetInstrumentationBreakpointParams sets breakpoint on particular native
-// event.
-type SetInstrumentationBreakpointParams struct {
- EventName string `json:"eventName"` // Instrumentation name to stop on.
-}
-
-// SetInstrumentationBreakpoint sets breakpoint on particular native event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setInstrumentationBreakpoint
-//
-// parameters:
-// eventName - Instrumentation name to stop on.
-func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpointParams {
- return &SetInstrumentationBreakpointParams{
- EventName: eventName,
- }
-}
-
-// Do executes DOMDebugger.setInstrumentationBreakpoint against the provided context.
-func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetInstrumentationBreakpoint, p, nil)
-}
-
-// SetXHRBreakpointParams sets breakpoint on XMLHttpRequest.
-type SetXHRBreakpointParams struct {
- URL string `json:"url"` // Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
-}
-
-// SetXHRBreakpoint sets breakpoint on XMLHttpRequest.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setXHRBreakpoint
-//
-// parameters:
-// url - Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
-func SetXHRBreakpoint(url string) *SetXHRBreakpointParams {
- return &SetXHRBreakpointParams{
- URL: url,
- }
-}
-
-// Do executes DOMDebugger.setXHRBreakpoint against the provided context.
-func (p *SetXHRBreakpointParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetXHRBreakpoint, p, nil)
-}
-
-// Command names.
-const (
- CommandGetEventListeners = "DOMDebugger.getEventListeners"
- CommandRemoveDOMBreakpoint = "DOMDebugger.removeDOMBreakpoint"
- CommandRemoveEventListenerBreakpoint = "DOMDebugger.removeEventListenerBreakpoint"
- CommandRemoveInstrumentationBreakpoint = "DOMDebugger.removeInstrumentationBreakpoint"
- CommandRemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint"
- CommandSetBreakOnCSPViolation = "DOMDebugger.setBreakOnCSPViolation"
- CommandSetDOMBreakpoint = "DOMDebugger.setDOMBreakpoint"
- CommandSetEventListenerBreakpoint = "DOMDebugger.setEventListenerBreakpoint"
- CommandSetInstrumentationBreakpoint = "DOMDebugger.setInstrumentationBreakpoint"
- CommandSetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint"
-)
diff --git a/vendor/github.com/chromedp/cdproto/domdebugger/easyjson.go b/vendor/github.com/chromedp/cdproto/domdebugger/easyjson.go
deleted file mode 100644
index f33a454864c..00000000000
--- a/vendor/github.com/chromedp/cdproto/domdebugger/easyjson.go
+++ /dev/null
@@ -1,1008 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package domdebugger
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(in *jlexer.Lexer, out *SetXHRBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(out *jwriter.Writer, in SetXHRBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetXHRBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetXHRBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "eventName":
- out.EventName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(out *jwriter.Writer, in SetInstrumentationBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix[1:])
- out.String(string(in.EventName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "eventName":
- out.EventName = string(in.String())
- case "targetName":
- out.TargetName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(out *jwriter.Writer, in SetEventListenerBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix[1:])
- out.String(string(in.EventName))
- }
- if in.TargetName != "" {
- const prefix string = ",\"targetName\":"
- out.RawString(prefix)
- out.String(string(in.TargetName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(in *jlexer.Lexer, out *SetDOMBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(out *jwriter.Writer, in SetDOMBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDOMBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDOMBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(in *jlexer.Lexer, out *SetBreakOnCSPViolationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "violationTypes":
- if in.IsNull() {
- in.Skip()
- out.ViolationTypes = nil
- } else {
- in.Delim('[')
- if out.ViolationTypes == nil {
- if !in.IsDelim(']') {
- out.ViolationTypes = make([]CSPViolationType, 0, 4)
- } else {
- out.ViolationTypes = []CSPViolationType{}
- }
- } else {
- out.ViolationTypes = (out.ViolationTypes)[:0]
- }
- for !in.IsDelim(']') {
- var v1 CSPViolationType
- (v1).UnmarshalEasyJSON(in)
- out.ViolationTypes = append(out.ViolationTypes, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(out *jwriter.Writer, in SetBreakOnCSPViolationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"violationTypes\":"
- out.RawString(prefix[1:])
- if in.ViolationTypes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.ViolationTypes {
- if v2 > 0 {
- out.RawByte(',')
- }
- (v3).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBreakOnCSPViolationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBreakOnCSPViolationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBreakOnCSPViolationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBreakOnCSPViolationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(out *jwriter.Writer, in RemoveXHRBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveXHRBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveXHRBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "eventName":
- out.EventName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix[1:])
- out.String(string(in.EventName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "eventName":
- out.EventName = string(in.String())
- case "targetName":
- out.TargetName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix[1:])
- out.String(string(in.EventName))
- }
- if in.TargetName != "" {
- const prefix string = ",\"targetName\":"
- out.RawString(prefix)
- out.String(string(in.TargetName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(out *jwriter.Writer, in RemoveDOMBreakpointParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveDOMBreakpointParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveDOMBreakpointParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(in *jlexer.Lexer, out *GetEventListenersReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "listeners":
- if in.IsNull() {
- in.Skip()
- out.Listeners = nil
- } else {
- in.Delim('[')
- if out.Listeners == nil {
- if !in.IsDelim(']') {
- out.Listeners = make([]*EventListener, 0, 8)
- } else {
- out.Listeners = []*EventListener{}
- }
- } else {
- out.Listeners = (out.Listeners)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *EventListener
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(EventListener)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Listeners = append(out.Listeners, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(out *jwriter.Writer, in GetEventListenersReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Listeners) != 0 {
- const prefix string = ",\"listeners\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.Listeners {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetEventListenersReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetEventListenersReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetEventListenersReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetEventListenersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(in *jlexer.Lexer, out *GetEventListenersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "depth":
- out.Depth = int64(in.Int64())
- case "pierce":
- out.Pierce = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(out *jwriter.Writer, in GetEventListenersParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- if in.Depth != 0 {
- const prefix string = ",\"depth\":"
- out.RawString(prefix)
- out.Int64(int64(in.Depth))
- }
- if in.Pierce {
- const prefix string = ",\"pierce\":"
- out.RawString(prefix)
- out.Bool(bool(in.Pierce))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetEventListenersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetEventListenersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetEventListenersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetEventListenersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(in *jlexer.Lexer, out *EventListener) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- out.Type = string(in.String())
- case "useCapture":
- out.UseCapture = bool(in.Bool())
- case "passive":
- out.Passive = bool(in.Bool())
- case "once":
- out.Once = bool(in.Bool())
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- case "handler":
- if in.IsNull() {
- in.Skip()
- out.Handler = nil
- } else {
- if out.Handler == nil {
- out.Handler = new(runtime.RemoteObject)
- }
- (*out.Handler).UnmarshalEasyJSON(in)
- }
- case "originalHandler":
- if in.IsNull() {
- in.Skip()
- out.OriginalHandler = nil
- } else {
- if out.OriginalHandler == nil {
- out.OriginalHandler = new(runtime.RemoteObject)
- }
- (*out.OriginalHandler).UnmarshalEasyJSON(in)
- }
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(out *jwriter.Writer, in EventListener) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- out.String(string(in.Type))
- }
- {
- const prefix string = ",\"useCapture\":"
- out.RawString(prefix)
- out.Bool(bool(in.UseCapture))
- }
- {
- const prefix string = ",\"passive\":"
- out.RawString(prefix)
- out.Bool(bool(in.Passive))
- }
- {
- const prefix string = ",\"once\":"
- out.RawString(prefix)
- out.Bool(bool(in.Once))
- }
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix)
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- if in.Handler != nil {
- const prefix string = ",\"handler\":"
- out.RawString(prefix)
- (*in.Handler).MarshalEasyJSON(out)
- }
- if in.OriginalHandler != nil {
- const prefix string = ",\"originalHandler\":"
- out.RawString(prefix)
- (*in.OriginalHandler).MarshalEasyJSON(out)
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventListener) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventListener) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventListener) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventListener) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/domdebugger/types.go b/vendor/github.com/chromedp/cdproto/domdebugger/types.go
deleted file mode 100644
index 4973a5478ac..00000000000
--- a/vendor/github.com/chromedp/cdproto/domdebugger/types.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package domdebugger
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// DOMBreakpointType DOM breakpoint type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-DOMBreakpointType
-type DOMBreakpointType string
-
-// String returns the DOMBreakpointType as string value.
-func (t DOMBreakpointType) String() string {
- return string(t)
-}
-
-// DOMBreakpointType values.
-const (
- DOMBreakpointTypeSubtreeModified DOMBreakpointType = "subtree-modified"
- DOMBreakpointTypeAttributeModified DOMBreakpointType = "attribute-modified"
- DOMBreakpointTypeNodeRemoved DOMBreakpointType = "node-removed"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DOMBreakpointType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DOMBreakpointType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DOMBreakpointType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DOMBreakpointType(in.String()) {
- case DOMBreakpointTypeSubtreeModified:
- *t = DOMBreakpointTypeSubtreeModified
- case DOMBreakpointTypeAttributeModified:
- *t = DOMBreakpointTypeAttributeModified
- case DOMBreakpointTypeNodeRemoved:
- *t = DOMBreakpointTypeNodeRemoved
-
- default:
- in.AddError(errors.New("unknown DOMBreakpointType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DOMBreakpointType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CSPViolationType cSP Violation type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-CSPViolationType
-type CSPViolationType string
-
-// String returns the CSPViolationType as string value.
-func (t CSPViolationType) String() string {
- return string(t)
-}
-
-// CSPViolationType values.
-const (
- CSPViolationTypeTrustedtypeSinkViolation CSPViolationType = "trustedtype-sink-violation"
- CSPViolationTypeTrustedtypePolicyViolation CSPViolationType = "trustedtype-policy-violation"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CSPViolationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CSPViolationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CSPViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CSPViolationType(in.String()) {
- case CSPViolationTypeTrustedtypeSinkViolation:
- *t = CSPViolationTypeTrustedtypeSinkViolation
- case CSPViolationTypeTrustedtypePolicyViolation:
- *t = CSPViolationTypeTrustedtypePolicyViolation
-
- default:
- in.AddError(errors.New("unknown CSPViolationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CSPViolationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// EventListener object event listener.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#type-EventListener
-type EventListener struct {
- Type string `json:"type"` // EventListener's type.
- UseCapture bool `json:"useCapture"` // EventListener's useCapture.
- Passive bool `json:"passive"` // EventListener's passive flag.
- Once bool `json:"once"` // EventListener's once flag.
- ScriptID runtime.ScriptID `json:"scriptId"` // Script id of the handler code.
- LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
- ColumnNumber int64 `json:"columnNumber"` // Column number in the script (0-based).
- Handler *runtime.RemoteObject `json:"handler,omitempty"` // Event handler function value.
- OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty"` // Event original handler function value.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node the listener is added to (if any).
-}
diff --git a/vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go b/vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go
deleted file mode 100644
index 9d857c1d1d1..00000000000
--- a/vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Package domsnapshot provides the Chrome DevTools Protocol
-// commands, types, and events for the DOMSnapshot domain.
-//
-// This domain facilitates obtaining document snapshots with DOM, layout, and
-// style information.
-//
-// Generated by the cdproto-gen command.
-package domsnapshot
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DisableParams disables DOM snapshot agent for the given page.
-type DisableParams struct{}
-
-// Disable disables DOM snapshot agent for the given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes DOMSnapshot.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables DOM snapshot agent for the given page.
-type EnableParams struct{}
-
-// Enable enables DOM snapshot agent for the given page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes DOMSnapshot.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// CaptureSnapshotParams returns a document snapshot, including the full DOM
-// tree of the root node (including iframes, template contents, and imported
-// documents) in a flattened array, as well as layout and white-listed computed
-// style information for the nodes. Shadow DOM in the returned DOM tree is
-// flattened.
-type CaptureSnapshotParams struct {
- ComputedStyles []string `json:"computedStyles"` // Whitelist of computed styles to return.
- IncludePaintOrder bool `json:"includePaintOrder,omitempty"` // Whether to include layout object paint orders into the snapshot.
- IncludeDOMRects bool `json:"includeDOMRects,omitempty"` // Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
- IncludeBlendedBackgroundColors bool `json:"includeBlendedBackgroundColors,omitempty"` // Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
- IncludeTextColorOpacities bool `json:"includeTextColorOpacities,omitempty"` // Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
-}
-
-// CaptureSnapshot returns a document snapshot, including the full DOM tree
-// of the root node (including iframes, template contents, and imported
-// documents) in a flattened array, as well as layout and white-listed computed
-// style information for the nodes. Shadow DOM in the returned DOM tree is
-// flattened.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-captureSnapshot
-//
-// parameters:
-// computedStyles - Whitelist of computed styles to return.
-func CaptureSnapshot(computedStyles []string) *CaptureSnapshotParams {
- return &CaptureSnapshotParams{
- ComputedStyles: computedStyles,
- }
-}
-
-// WithIncludePaintOrder whether to include layout object paint orders into
-// the snapshot.
-func (p CaptureSnapshotParams) WithIncludePaintOrder(includePaintOrder bool) *CaptureSnapshotParams {
- p.IncludePaintOrder = includePaintOrder
- return &p
-}
-
-// WithIncludeDOMRects whether to include DOM rectangles (offsetRects,
-// clientRects, scrollRects) into the snapshot.
-func (p CaptureSnapshotParams) WithIncludeDOMRects(includeDOMRects bool) *CaptureSnapshotParams {
- p.IncludeDOMRects = includeDOMRects
- return &p
-}
-
-// WithIncludeBlendedBackgroundColors whether to include blended background
-// colors in the snapshot (default: false). Blended background color is achieved
-// by blending background colors of all elements that overlap with the current
-// element.
-func (p CaptureSnapshotParams) WithIncludeBlendedBackgroundColors(includeBlendedBackgroundColors bool) *CaptureSnapshotParams {
- p.IncludeBlendedBackgroundColors = includeBlendedBackgroundColors
- return &p
-}
-
-// WithIncludeTextColorOpacities whether to include text color opacity in the
-// snapshot (default: false). An element might have the opacity property set
-// that affects the text color of the element. The final text color opacity is
-// computed based on the opacity of all overlapping elements.
-func (p CaptureSnapshotParams) WithIncludeTextColorOpacities(includeTextColorOpacities bool) *CaptureSnapshotParams {
- p.IncludeTextColorOpacities = includeTextColorOpacities
- return &p
-}
-
-// CaptureSnapshotReturns return values.
-type CaptureSnapshotReturns struct {
- Documents []*DocumentSnapshot `json:"documents,omitempty"` // The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
- Strings []string `json:"strings,omitempty"` // Shared string table that all string properties refer to with indexes.
-}
-
-// Do executes DOMSnapshot.captureSnapshot against the provided context.
-//
-// returns:
-// documents - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
-// strings - Shared string table that all string properties refer to with indexes.
-func (p *CaptureSnapshotParams) Do(ctx context.Context) (documents []*DocumentSnapshot, strings []string, err error) {
- // execute
- var res CaptureSnapshotReturns
- err = cdp.Execute(ctx, CommandCaptureSnapshot, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Documents, res.Strings, nil
-}
-
-// Command names.
-const (
- CommandDisable = "DOMSnapshot.disable"
- CommandEnable = "DOMSnapshot.enable"
- CommandCaptureSnapshot = "DOMSnapshot.captureSnapshot"
-)
diff --git a/vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go b/vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go
deleted file mode 100644
index 73605985b90..00000000000
--- a/vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go
+++ /dev/null
@@ -1,3207 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package domsnapshot
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- dom "github.com/chromedp/cdproto/dom"
- domdebugger "github.com/chromedp/cdproto/domdebugger"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(in *jlexer.Lexer, out *TextBoxSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layoutIndex":
- if in.IsNull() {
- in.Skip()
- out.LayoutIndex = nil
- } else {
- in.Delim('[')
- if out.LayoutIndex == nil {
- if !in.IsDelim(']') {
- out.LayoutIndex = make([]int64, 0, 8)
- } else {
- out.LayoutIndex = []int64{}
- }
- } else {
- out.LayoutIndex = (out.LayoutIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v1 int64
- v1 = int64(in.Int64())
- out.LayoutIndex = append(out.LayoutIndex, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- in.Delim('[')
- if out.Bounds == nil {
- if !in.IsDelim(']') {
- out.Bounds = make([]Rectangle, 0, 2)
- } else {
- out.Bounds = []Rectangle{}
- }
- } else {
- out.Bounds = (out.Bounds)[:0]
- }
- for !in.IsDelim(']') {
- var v2 Rectangle
- if in.IsNull() {
- in.Skip()
- v2 = nil
- } else {
- in.Delim('[')
- if v2 == nil {
- if !in.IsDelim(']') {
- v2 = make(Rectangle, 0, 8)
- } else {
- v2 = Rectangle{}
- }
- } else {
- v2 = (v2)[:0]
- }
- for !in.IsDelim(']') {
- var v3 float64
- v3 = float64(in.Float64())
- v2 = append(v2, v3)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Bounds = append(out.Bounds, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "start":
- if in.IsNull() {
- in.Skip()
- out.Start = nil
- } else {
- in.Delim('[')
- if out.Start == nil {
- if !in.IsDelim(']') {
- out.Start = make([]int64, 0, 8)
- } else {
- out.Start = []int64{}
- }
- } else {
- out.Start = (out.Start)[:0]
- }
- for !in.IsDelim(']') {
- var v4 int64
- v4 = int64(in.Int64())
- out.Start = append(out.Start, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "length":
- if in.IsNull() {
- in.Skip()
- out.Length = nil
- } else {
- in.Delim('[')
- if out.Length == nil {
- if !in.IsDelim(']') {
- out.Length = make([]int64, 0, 8)
- } else {
- out.Length = []int64{}
- }
- } else {
- out.Length = (out.Length)[:0]
- }
- for !in.IsDelim(']') {
- var v5 int64
- v5 = int64(in.Int64())
- out.Length = append(out.Length, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(out *jwriter.Writer, in TextBoxSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layoutIndex\":"
- out.RawString(prefix[1:])
- if in.LayoutIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.LayoutIndex {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v7))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix)
- if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Bounds {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v10, v11 := range v9 {
- if v10 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v11))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"start\":"
- out.RawString(prefix)
- if in.Start == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.Start {
- if v12 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v13))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"length\":"
- out.RawString(prefix)
- if in.Length == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Length {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v15))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TextBoxSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TextBoxSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TextBoxSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TextBoxSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(in *jlexer.Lexer, out *RareStringData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v16 int64
- v16 = int64(in.Int64())
- out.Index = append(out.Index, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- in.Delim('[')
- if out.Value == nil {
- if !in.IsDelim(']') {
- out.Value = make([]StringIndex, 0, 8)
- } else {
- out.Value = []StringIndex{}
- }
- } else {
- out.Value = (out.Value)[:0]
- }
- for !in.IsDelim(']') {
- var v17 StringIndex
- v17 = StringIndex(in.Int64())
- out.Value = append(out.Value, v17)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(out *jwriter.Writer, in RareStringData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v18, v19 := range in.Index {
- if v18 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v19))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v20, v21 := range in.Value {
- if v20 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v21))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RareStringData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RareStringData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RareStringData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RareStringData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(in *jlexer.Lexer, out *RareIntegerData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v22 int64
- v22 = int64(in.Int64())
- out.Index = append(out.Index, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- in.Delim('[')
- if out.Value == nil {
- if !in.IsDelim(']') {
- out.Value = make([]int64, 0, 8)
- } else {
- out.Value = []int64{}
- }
- } else {
- out.Value = (out.Value)[:0]
- }
- for !in.IsDelim(']') {
- var v23 int64
- v23 = int64(in.Int64())
- out.Value = append(out.Value, v23)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(out *jwriter.Writer, in RareIntegerData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v24, v25 := range in.Index {
- if v24 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v25))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v26, v27 := range in.Value {
- if v26 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v27))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RareIntegerData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RareIntegerData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RareIntegerData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RareIntegerData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(in *jlexer.Lexer, out *RareBooleanData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "index":
- if in.IsNull() {
- in.Skip()
- out.Index = nil
- } else {
- in.Delim('[')
- if out.Index == nil {
- if !in.IsDelim(']') {
- out.Index = make([]int64, 0, 8)
- } else {
- out.Index = []int64{}
- }
- } else {
- out.Index = (out.Index)[:0]
- }
- for !in.IsDelim(']') {
- var v28 int64
- v28 = int64(in.Int64())
- out.Index = append(out.Index, v28)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(out *jwriter.Writer, in RareBooleanData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"index\":"
- out.RawString(prefix[1:])
- if in.Index == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v29, v30 := range in.Index {
- if v29 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v30))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RareBooleanData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RareBooleanData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RareBooleanData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RareBooleanData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(in *jlexer.Lexer, out *NodeTreeSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentIndex":
- if in.IsNull() {
- in.Skip()
- out.ParentIndex = nil
- } else {
- in.Delim('[')
- if out.ParentIndex == nil {
- if !in.IsDelim(']') {
- out.ParentIndex = make([]int64, 0, 8)
- } else {
- out.ParentIndex = []int64{}
- }
- } else {
- out.ParentIndex = (out.ParentIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v31 int64
- v31 = int64(in.Int64())
- out.ParentIndex = append(out.ParentIndex, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeType":
- if in.IsNull() {
- in.Skip()
- out.NodeType = nil
- } else {
- in.Delim('[')
- if out.NodeType == nil {
- if !in.IsDelim(']') {
- out.NodeType = make([]int64, 0, 8)
- } else {
- out.NodeType = []int64{}
- }
- } else {
- out.NodeType = (out.NodeType)[:0]
- }
- for !in.IsDelim(']') {
- var v32 int64
- v32 = int64(in.Int64())
- out.NodeType = append(out.NodeType, v32)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeName":
- if in.IsNull() {
- in.Skip()
- out.NodeName = nil
- } else {
- in.Delim('[')
- if out.NodeName == nil {
- if !in.IsDelim(']') {
- out.NodeName = make([]StringIndex, 0, 8)
- } else {
- out.NodeName = []StringIndex{}
- }
- } else {
- out.NodeName = (out.NodeName)[:0]
- }
- for !in.IsDelim(']') {
- var v33 StringIndex
- v33 = StringIndex(in.Int64())
- out.NodeName = append(out.NodeName, v33)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeValue":
- if in.IsNull() {
- in.Skip()
- out.NodeValue = nil
- } else {
- in.Delim('[')
- if out.NodeValue == nil {
- if !in.IsDelim(']') {
- out.NodeValue = make([]StringIndex, 0, 8)
- } else {
- out.NodeValue = []StringIndex{}
- }
- } else {
- out.NodeValue = (out.NodeValue)[:0]
- }
- for !in.IsDelim(']') {
- var v34 StringIndex
- v34 = StringIndex(in.Int64())
- out.NodeValue = append(out.NodeValue, v34)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "backendNodeId":
- if in.IsNull() {
- in.Skip()
- out.BackendNodeID = nil
- } else {
- in.Delim('[')
- if out.BackendNodeID == nil {
- if !in.IsDelim(']') {
- out.BackendNodeID = make([]cdp.BackendNodeID, 0, 8)
- } else {
- out.BackendNodeID = []cdp.BackendNodeID{}
- }
- } else {
- out.BackendNodeID = (out.BackendNodeID)[:0]
- }
- for !in.IsDelim(']') {
- var v35 cdp.BackendNodeID
- (v35).UnmarshalEasyJSON(in)
- out.BackendNodeID = append(out.BackendNodeID, v35)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "attributes":
- if in.IsNull() {
- in.Skip()
- out.Attributes = nil
- } else {
- in.Delim('[')
- if out.Attributes == nil {
- if !in.IsDelim(']') {
- out.Attributes = make([]ArrayOfStrings, 0, 2)
- } else {
- out.Attributes = []ArrayOfStrings{}
- }
- } else {
- out.Attributes = (out.Attributes)[:0]
- }
- for !in.IsDelim(']') {
- var v36 ArrayOfStrings
- if in.IsNull() {
- in.Skip()
- v36 = nil
- } else {
- in.Delim('[')
- if v36 == nil {
- if !in.IsDelim(']') {
- v36 = make(ArrayOfStrings, 0, 8)
- } else {
- v36 = ArrayOfStrings{}
- }
- } else {
- v36 = (v36)[:0]
- }
- for !in.IsDelim(']') {
- var v37 int64
- v37 = int64(in.Int64())
- v36 = append(v36, v37)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Attributes = append(out.Attributes, v36)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "textValue":
- if in.IsNull() {
- in.Skip()
- out.TextValue = nil
- } else {
- if out.TextValue == nil {
- out.TextValue = new(RareStringData)
- }
- (*out.TextValue).UnmarshalEasyJSON(in)
- }
- case "inputValue":
- if in.IsNull() {
- in.Skip()
- out.InputValue = nil
- } else {
- if out.InputValue == nil {
- out.InputValue = new(RareStringData)
- }
- (*out.InputValue).UnmarshalEasyJSON(in)
- }
- case "inputChecked":
- if in.IsNull() {
- in.Skip()
- out.InputChecked = nil
- } else {
- if out.InputChecked == nil {
- out.InputChecked = new(RareBooleanData)
- }
- (*out.InputChecked).UnmarshalEasyJSON(in)
- }
- case "optionSelected":
- if in.IsNull() {
- in.Skip()
- out.OptionSelected = nil
- } else {
- if out.OptionSelected == nil {
- out.OptionSelected = new(RareBooleanData)
- }
- (*out.OptionSelected).UnmarshalEasyJSON(in)
- }
- case "contentDocumentIndex":
- if in.IsNull() {
- in.Skip()
- out.ContentDocumentIndex = nil
- } else {
- if out.ContentDocumentIndex == nil {
- out.ContentDocumentIndex = new(RareIntegerData)
- }
- (*out.ContentDocumentIndex).UnmarshalEasyJSON(in)
- }
- case "pseudoType":
- if in.IsNull() {
- in.Skip()
- out.PseudoType = nil
- } else {
- if out.PseudoType == nil {
- out.PseudoType = new(RareStringData)
- }
- (*out.PseudoType).UnmarshalEasyJSON(in)
- }
- case "isClickable":
- if in.IsNull() {
- in.Skip()
- out.IsClickable = nil
- } else {
- if out.IsClickable == nil {
- out.IsClickable = new(RareBooleanData)
- }
- (*out.IsClickable).UnmarshalEasyJSON(in)
- }
- case "currentSourceURL":
- if in.IsNull() {
- in.Skip()
- out.CurrentSourceURL = nil
- } else {
- if out.CurrentSourceURL == nil {
- out.CurrentSourceURL = new(RareStringData)
- }
- (*out.CurrentSourceURL).UnmarshalEasyJSON(in)
- }
- case "originURL":
- if in.IsNull() {
- in.Skip()
- out.OriginURL = nil
- } else {
- if out.OriginURL == nil {
- out.OriginURL = new(RareStringData)
- }
- (*out.OriginURL).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(out *jwriter.Writer, in NodeTreeSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ParentIndex) != 0 {
- const prefix string = ",\"parentIndex\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v38, v39 := range in.ParentIndex {
- if v38 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v39))
- }
- out.RawByte(']')
- }
- }
- if len(in.NodeType) != 0 {
- const prefix string = ",\"nodeType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v40, v41 := range in.NodeType {
- if v40 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v41))
- }
- out.RawByte(']')
- }
- }
- if len(in.NodeName) != 0 {
- const prefix string = ",\"nodeName\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v42, v43 := range in.NodeName {
- if v42 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v43))
- }
- out.RawByte(']')
- }
- }
- if len(in.NodeValue) != 0 {
- const prefix string = ",\"nodeValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v44, v45 := range in.NodeValue {
- if v44 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v45))
- }
- out.RawByte(']')
- }
- }
- if len(in.BackendNodeID) != 0 {
- const prefix string = ",\"backendNodeId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v46, v47 := range in.BackendNodeID {
- if v46 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v47))
- }
- out.RawByte(']')
- }
- }
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v48, v49 := range in.Attributes {
- if v48 > 0 {
- out.RawByte(',')
- }
- if v49 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v50, v51 := range v49 {
- if v50 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v51))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if in.TextValue != nil {
- const prefix string = ",\"textValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.TextValue).MarshalEasyJSON(out)
- }
- if in.InputValue != nil {
- const prefix string = ",\"inputValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.InputValue).MarshalEasyJSON(out)
- }
- if in.InputChecked != nil {
- const prefix string = ",\"inputChecked\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.InputChecked).MarshalEasyJSON(out)
- }
- if in.OptionSelected != nil {
- const prefix string = ",\"optionSelected\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.OptionSelected).MarshalEasyJSON(out)
- }
- if in.ContentDocumentIndex != nil {
- const prefix string = ",\"contentDocumentIndex\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ContentDocumentIndex).MarshalEasyJSON(out)
- }
- if in.PseudoType != nil {
- const prefix string = ",\"pseudoType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.PseudoType).MarshalEasyJSON(out)
- }
- if in.IsClickable != nil {
- const prefix string = ",\"isClickable\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.IsClickable).MarshalEasyJSON(out)
- }
- if in.CurrentSourceURL != nil {
- const prefix string = ",\"currentSourceURL\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CurrentSourceURL).MarshalEasyJSON(out)
- }
- if in.OriginURL != nil {
- const prefix string = ",\"originURL\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.OriginURL).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NodeTreeSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NodeTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NodeTreeSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NodeTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(in *jlexer.Lexer, out *NameValue) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(out *jwriter.Writer, in NameValue) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NameValue) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NameValue) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NameValue) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NameValue) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(in *jlexer.Lexer, out *LayoutTreeSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIndex":
- if in.IsNull() {
- in.Skip()
- out.NodeIndex = nil
- } else {
- in.Delim('[')
- if out.NodeIndex == nil {
- if !in.IsDelim(']') {
- out.NodeIndex = make([]int64, 0, 8)
- } else {
- out.NodeIndex = []int64{}
- }
- } else {
- out.NodeIndex = (out.NodeIndex)[:0]
- }
- for !in.IsDelim(']') {
- var v52 int64
- v52 = int64(in.Int64())
- out.NodeIndex = append(out.NodeIndex, v52)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "styles":
- if in.IsNull() {
- in.Skip()
- out.Styles = nil
- } else {
- in.Delim('[')
- if out.Styles == nil {
- if !in.IsDelim(']') {
- out.Styles = make([]ArrayOfStrings, 0, 2)
- } else {
- out.Styles = []ArrayOfStrings{}
- }
- } else {
- out.Styles = (out.Styles)[:0]
- }
- for !in.IsDelim(']') {
- var v53 ArrayOfStrings
- if in.IsNull() {
- in.Skip()
- v53 = nil
- } else {
- in.Delim('[')
- if v53 == nil {
- if !in.IsDelim(']') {
- v53 = make(ArrayOfStrings, 0, 8)
- } else {
- v53 = ArrayOfStrings{}
- }
- } else {
- v53 = (v53)[:0]
- }
- for !in.IsDelim(']') {
- var v54 int64
- v54 = int64(in.Int64())
- v53 = append(v53, v54)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Styles = append(out.Styles, v53)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "bounds":
- if in.IsNull() {
- in.Skip()
- out.Bounds = nil
- } else {
- in.Delim('[')
- if out.Bounds == nil {
- if !in.IsDelim(']') {
- out.Bounds = make([]Rectangle, 0, 2)
- } else {
- out.Bounds = []Rectangle{}
- }
- } else {
- out.Bounds = (out.Bounds)[:0]
- }
- for !in.IsDelim(']') {
- var v55 Rectangle
- if in.IsNull() {
- in.Skip()
- v55 = nil
- } else {
- in.Delim('[')
- if v55 == nil {
- if !in.IsDelim(']') {
- v55 = make(Rectangle, 0, 8)
- } else {
- v55 = Rectangle{}
- }
- } else {
- v55 = (v55)[:0]
- }
- for !in.IsDelim(']') {
- var v56 float64
- v56 = float64(in.Float64())
- v55 = append(v55, v56)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Bounds = append(out.Bounds, v55)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "text":
- if in.IsNull() {
- in.Skip()
- out.Text = nil
- } else {
- in.Delim('[')
- if out.Text == nil {
- if !in.IsDelim(']') {
- out.Text = make([]StringIndex, 0, 8)
- } else {
- out.Text = []StringIndex{}
- }
- } else {
- out.Text = (out.Text)[:0]
- }
- for !in.IsDelim(']') {
- var v57 StringIndex
- v57 = StringIndex(in.Int64())
- out.Text = append(out.Text, v57)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "stackingContexts":
- if in.IsNull() {
- in.Skip()
- out.StackingContexts = nil
- } else {
- if out.StackingContexts == nil {
- out.StackingContexts = new(RareBooleanData)
- }
- (*out.StackingContexts).UnmarshalEasyJSON(in)
- }
- case "paintOrders":
- if in.IsNull() {
- in.Skip()
- out.PaintOrders = nil
- } else {
- in.Delim('[')
- if out.PaintOrders == nil {
- if !in.IsDelim(']') {
- out.PaintOrders = make([]int64, 0, 8)
- } else {
- out.PaintOrders = []int64{}
- }
- } else {
- out.PaintOrders = (out.PaintOrders)[:0]
- }
- for !in.IsDelim(']') {
- var v58 int64
- v58 = int64(in.Int64())
- out.PaintOrders = append(out.PaintOrders, v58)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "offsetRects":
- if in.IsNull() {
- in.Skip()
- out.OffsetRects = nil
- } else {
- in.Delim('[')
- if out.OffsetRects == nil {
- if !in.IsDelim(']') {
- out.OffsetRects = make([]Rectangle, 0, 2)
- } else {
- out.OffsetRects = []Rectangle{}
- }
- } else {
- out.OffsetRects = (out.OffsetRects)[:0]
- }
- for !in.IsDelim(']') {
- var v59 Rectangle
- if in.IsNull() {
- in.Skip()
- v59 = nil
- } else {
- in.Delim('[')
- if v59 == nil {
- if !in.IsDelim(']') {
- v59 = make(Rectangle, 0, 8)
- } else {
- v59 = Rectangle{}
- }
- } else {
- v59 = (v59)[:0]
- }
- for !in.IsDelim(']') {
- var v60 float64
- v60 = float64(in.Float64())
- v59 = append(v59, v60)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.OffsetRects = append(out.OffsetRects, v59)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "scrollRects":
- if in.IsNull() {
- in.Skip()
- out.ScrollRects = nil
- } else {
- in.Delim('[')
- if out.ScrollRects == nil {
- if !in.IsDelim(']') {
- out.ScrollRects = make([]Rectangle, 0, 2)
- } else {
- out.ScrollRects = []Rectangle{}
- }
- } else {
- out.ScrollRects = (out.ScrollRects)[:0]
- }
- for !in.IsDelim(']') {
- var v61 Rectangle
- if in.IsNull() {
- in.Skip()
- v61 = nil
- } else {
- in.Delim('[')
- if v61 == nil {
- if !in.IsDelim(']') {
- v61 = make(Rectangle, 0, 8)
- } else {
- v61 = Rectangle{}
- }
- } else {
- v61 = (v61)[:0]
- }
- for !in.IsDelim(']') {
- var v62 float64
- v62 = float64(in.Float64())
- v61 = append(v61, v62)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.ScrollRects = append(out.ScrollRects, v61)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "clientRects":
- if in.IsNull() {
- in.Skip()
- out.ClientRects = nil
- } else {
- in.Delim('[')
- if out.ClientRects == nil {
- if !in.IsDelim(']') {
- out.ClientRects = make([]Rectangle, 0, 2)
- } else {
- out.ClientRects = []Rectangle{}
- }
- } else {
- out.ClientRects = (out.ClientRects)[:0]
- }
- for !in.IsDelim(']') {
- var v63 Rectangle
- if in.IsNull() {
- in.Skip()
- v63 = nil
- } else {
- in.Delim('[')
- if v63 == nil {
- if !in.IsDelim(']') {
- v63 = make(Rectangle, 0, 8)
- } else {
- v63 = Rectangle{}
- }
- } else {
- v63 = (v63)[:0]
- }
- for !in.IsDelim(']') {
- var v64 float64
- v64 = float64(in.Float64())
- v63 = append(v63, v64)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.ClientRects = append(out.ClientRects, v63)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "blendedBackgroundColors":
- if in.IsNull() {
- in.Skip()
- out.BlendedBackgroundColors = nil
- } else {
- in.Delim('[')
- if out.BlendedBackgroundColors == nil {
- if !in.IsDelim(']') {
- out.BlendedBackgroundColors = make([]StringIndex, 0, 8)
- } else {
- out.BlendedBackgroundColors = []StringIndex{}
- }
- } else {
- out.BlendedBackgroundColors = (out.BlendedBackgroundColors)[:0]
- }
- for !in.IsDelim(']') {
- var v65 StringIndex
- v65 = StringIndex(in.Int64())
- out.BlendedBackgroundColors = append(out.BlendedBackgroundColors, v65)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "textColorOpacities":
- if in.IsNull() {
- in.Skip()
- out.TextColorOpacities = nil
- } else {
- in.Delim('[')
- if out.TextColorOpacities == nil {
- if !in.IsDelim(']') {
- out.TextColorOpacities = make([]float64, 0, 8)
- } else {
- out.TextColorOpacities = []float64{}
- }
- } else {
- out.TextColorOpacities = (out.TextColorOpacities)[:0]
- }
- for !in.IsDelim(']') {
- var v66 float64
- v66 = float64(in.Float64())
- out.TextColorOpacities = append(out.TextColorOpacities, v66)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(out *jwriter.Writer, in LayoutTreeSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeIndex\":"
- out.RawString(prefix[1:])
- if in.NodeIndex == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v67, v68 := range in.NodeIndex {
- if v67 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v68))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"styles\":"
- out.RawString(prefix)
- if in.Styles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v69, v70 := range in.Styles {
- if v69 > 0 {
- out.RawByte(',')
- }
- if v70 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v71, v72 := range v70 {
- if v71 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v72))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"bounds\":"
- out.RawString(prefix)
- if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v73, v74 := range in.Bounds {
- if v73 > 0 {
- out.RawByte(',')
- }
- if v74 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v75, v76 := range v74 {
- if v75 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v76))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- if in.Text == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v77, v78 := range in.Text {
- if v77 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v78))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"stackingContexts\":"
- out.RawString(prefix)
- if in.StackingContexts == nil {
- out.RawString("null")
- } else {
- (*in.StackingContexts).MarshalEasyJSON(out)
- }
- }
- if len(in.PaintOrders) != 0 {
- const prefix string = ",\"paintOrders\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v79, v80 := range in.PaintOrders {
- if v79 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v80))
- }
- out.RawByte(']')
- }
- }
- if len(in.OffsetRects) != 0 {
- const prefix string = ",\"offsetRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v81, v82 := range in.OffsetRects {
- if v81 > 0 {
- out.RawByte(',')
- }
- if v82 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v83, v84 := range v82 {
- if v83 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v84))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ScrollRects) != 0 {
- const prefix string = ",\"scrollRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v85, v86 := range in.ScrollRects {
- if v85 > 0 {
- out.RawByte(',')
- }
- if v86 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v87, v88 := range v86 {
- if v87 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v88))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.ClientRects) != 0 {
- const prefix string = ",\"clientRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v89, v90 := range in.ClientRects {
- if v89 > 0 {
- out.RawByte(',')
- }
- if v90 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v91, v92 := range v90 {
- if v91 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v92))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.BlendedBackgroundColors) != 0 {
- const prefix string = ",\"blendedBackgroundColors\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v93, v94 := range in.BlendedBackgroundColors {
- if v93 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v94))
- }
- out.RawByte(']')
- }
- }
- if len(in.TextColorOpacities) != 0 {
- const prefix string = ",\"textColorOpacities\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v95, v96 := range in.TextColorOpacities {
- if v95 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v96))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LayoutTreeSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LayoutTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LayoutTreeSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LayoutTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(in *jlexer.Lexer, out *LayoutTreeNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "domNodeIndex":
- out.DomNodeIndex = int64(in.Int64())
- case "boundingBox":
- if in.IsNull() {
- in.Skip()
- out.BoundingBox = nil
- } else {
- if out.BoundingBox == nil {
- out.BoundingBox = new(dom.Rect)
- }
- (*out.BoundingBox).UnmarshalEasyJSON(in)
- }
- case "layoutText":
- out.LayoutText = string(in.String())
- case "inlineTextNodes":
- if in.IsNull() {
- in.Skip()
- out.InlineTextNodes = nil
- } else {
- in.Delim('[')
- if out.InlineTextNodes == nil {
- if !in.IsDelim(']') {
- out.InlineTextNodes = make([]*InlineTextBox, 0, 8)
- } else {
- out.InlineTextNodes = []*InlineTextBox{}
- }
- } else {
- out.InlineTextNodes = (out.InlineTextNodes)[:0]
- }
- for !in.IsDelim(']') {
- var v97 *InlineTextBox
- if in.IsNull() {
- in.Skip()
- v97 = nil
- } else {
- if v97 == nil {
- v97 = new(InlineTextBox)
- }
- (*v97).UnmarshalEasyJSON(in)
- }
- out.InlineTextNodes = append(out.InlineTextNodes, v97)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "styleIndex":
- out.StyleIndex = int64(in.Int64())
- case "paintOrder":
- out.PaintOrder = int64(in.Int64())
- case "isStackingContext":
- out.IsStackingContext = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(out *jwriter.Writer, in LayoutTreeNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"domNodeIndex\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.DomNodeIndex))
- }
- {
- const prefix string = ",\"boundingBox\":"
- out.RawString(prefix)
- if in.BoundingBox == nil {
- out.RawString("null")
- } else {
- (*in.BoundingBox).MarshalEasyJSON(out)
- }
- }
- if in.LayoutText != "" {
- const prefix string = ",\"layoutText\":"
- out.RawString(prefix)
- out.String(string(in.LayoutText))
- }
- if len(in.InlineTextNodes) != 0 {
- const prefix string = ",\"inlineTextNodes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v98, v99 := range in.InlineTextNodes {
- if v98 > 0 {
- out.RawByte(',')
- }
- if v99 == nil {
- out.RawString("null")
- } else {
- (*v99).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.StyleIndex != 0 {
- const prefix string = ",\"styleIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.StyleIndex))
- }
- if in.PaintOrder != 0 {
- const prefix string = ",\"paintOrder\":"
- out.RawString(prefix)
- out.Int64(int64(in.PaintOrder))
- }
- if in.IsStackingContext {
- const prefix string = ",\"isStackingContext\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsStackingContext))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LayoutTreeNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(in *jlexer.Lexer, out *InlineTextBox) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "boundingBox":
- if in.IsNull() {
- in.Skip()
- out.BoundingBox = nil
- } else {
- if out.BoundingBox == nil {
- out.BoundingBox = new(dom.Rect)
- }
- (*out.BoundingBox).UnmarshalEasyJSON(in)
- }
- case "startCharacterIndex":
- out.StartCharacterIndex = int64(in.Int64())
- case "numCharacters":
- out.NumCharacters = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(out *jwriter.Writer, in InlineTextBox) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"boundingBox\":"
- out.RawString(prefix[1:])
- if in.BoundingBox == nil {
- out.RawString("null")
- } else {
- (*in.BoundingBox).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"startCharacterIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.StartCharacterIndex))
- }
- {
- const prefix string = ",\"numCharacters\":"
- out.RawString(prefix)
- out.Int64(int64(in.NumCharacters))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InlineTextBox) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InlineTextBox) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(in *jlexer.Lexer, out *DocumentSnapshot) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "documentURL":
- out.DocumentURL = StringIndex(in.Int64())
- case "title":
- out.Title = StringIndex(in.Int64())
- case "baseURL":
- out.BaseURL = StringIndex(in.Int64())
- case "contentLanguage":
- out.ContentLanguage = StringIndex(in.Int64())
- case "encodingName":
- out.EncodingName = StringIndex(in.Int64())
- case "publicId":
- out.PublicID = StringIndex(in.Int64())
- case "systemId":
- out.SystemID = StringIndex(in.Int64())
- case "frameId":
- out.FrameID = StringIndex(in.Int64())
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- if out.Nodes == nil {
- out.Nodes = new(NodeTreeSnapshot)
- }
- (*out.Nodes).UnmarshalEasyJSON(in)
- }
- case "layout":
- if in.IsNull() {
- in.Skip()
- out.Layout = nil
- } else {
- if out.Layout == nil {
- out.Layout = new(LayoutTreeSnapshot)
- }
- (*out.Layout).UnmarshalEasyJSON(in)
- }
- case "textBoxes":
- if in.IsNull() {
- in.Skip()
- out.TextBoxes = nil
- } else {
- if out.TextBoxes == nil {
- out.TextBoxes = new(TextBoxSnapshot)
- }
- (*out.TextBoxes).UnmarshalEasyJSON(in)
- }
- case "scrollOffsetX":
- out.ScrollOffsetX = float64(in.Float64())
- case "scrollOffsetY":
- out.ScrollOffsetY = float64(in.Float64())
- case "contentWidth":
- out.ContentWidth = float64(in.Float64())
- case "contentHeight":
- out.ContentHeight = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(out *jwriter.Writer, in DocumentSnapshot) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.DocumentURL))
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.Int64(int64(in.Title))
- }
- {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.Int64(int64(in.BaseURL))
- }
- {
- const prefix string = ",\"contentLanguage\":"
- out.RawString(prefix)
- out.Int64(int64(in.ContentLanguage))
- }
- {
- const prefix string = ",\"encodingName\":"
- out.RawString(prefix)
- out.Int64(int64(in.EncodingName))
- }
- {
- const prefix string = ",\"publicId\":"
- out.RawString(prefix)
- out.Int64(int64(in.PublicID))
- }
- {
- const prefix string = ",\"systemId\":"
- out.RawString(prefix)
- out.Int64(int64(in.SystemID))
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.Int64(int64(in.FrameID))
- }
- {
- const prefix string = ",\"nodes\":"
- out.RawString(prefix)
- if in.Nodes == nil {
- out.RawString("null")
- } else {
- (*in.Nodes).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"layout\":"
- out.RawString(prefix)
- if in.Layout == nil {
- out.RawString("null")
- } else {
- (*in.Layout).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"textBoxes\":"
- out.RawString(prefix)
- if in.TextBoxes == nil {
- out.RawString("null")
- } else {
- (*in.TextBoxes).MarshalEasyJSON(out)
- }
- }
- if in.ScrollOffsetX != 0 {
- const prefix string = ",\"scrollOffsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetX))
- }
- if in.ScrollOffsetY != 0 {
- const prefix string = ",\"scrollOffsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetY))
- }
- if in.ContentWidth != 0 {
- const prefix string = ",\"contentWidth\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContentWidth))
- }
- if in.ContentHeight != 0 {
- const prefix string = ",\"contentHeight\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContentHeight))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DocumentSnapshot) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DocumentSnapshot) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DocumentSnapshot) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DocumentSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(in *jlexer.Lexer, out *DOMNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeType":
- (out.NodeType).UnmarshalEasyJSON(in)
- case "nodeName":
- out.NodeName = string(in.String())
- case "nodeValue":
- out.NodeValue = string(in.String())
- case "textValue":
- out.TextValue = string(in.String())
- case "inputValue":
- out.InputValue = string(in.String())
- case "inputChecked":
- out.InputChecked = bool(in.Bool())
- case "optionSelected":
- out.OptionSelected = bool(in.Bool())
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "childNodeIndexes":
- if in.IsNull() {
- in.Skip()
- out.ChildNodeIndexes = nil
- } else {
- in.Delim('[')
- if out.ChildNodeIndexes == nil {
- if !in.IsDelim(']') {
- out.ChildNodeIndexes = make([]int64, 0, 8)
- } else {
- out.ChildNodeIndexes = []int64{}
- }
- } else {
- out.ChildNodeIndexes = (out.ChildNodeIndexes)[:0]
- }
- for !in.IsDelim(']') {
- var v100 int64
- v100 = int64(in.Int64())
- out.ChildNodeIndexes = append(out.ChildNodeIndexes, v100)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "attributes":
- if in.IsNull() {
- in.Skip()
- out.Attributes = nil
- } else {
- in.Delim('[')
- if out.Attributes == nil {
- if !in.IsDelim(']') {
- out.Attributes = make([]*NameValue, 0, 8)
- } else {
- out.Attributes = []*NameValue{}
- }
- } else {
- out.Attributes = (out.Attributes)[:0]
- }
- for !in.IsDelim(']') {
- var v101 *NameValue
- if in.IsNull() {
- in.Skip()
- v101 = nil
- } else {
- if v101 == nil {
- v101 = new(NameValue)
- }
- (*v101).UnmarshalEasyJSON(in)
- }
- out.Attributes = append(out.Attributes, v101)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "pseudoElementIndexes":
- if in.IsNull() {
- in.Skip()
- out.PseudoElementIndexes = nil
- } else {
- in.Delim('[')
- if out.PseudoElementIndexes == nil {
- if !in.IsDelim(']') {
- out.PseudoElementIndexes = make([]int64, 0, 8)
- } else {
- out.PseudoElementIndexes = []int64{}
- }
- } else {
- out.PseudoElementIndexes = (out.PseudoElementIndexes)[:0]
- }
- for !in.IsDelim(']') {
- var v102 int64
- v102 = int64(in.Int64())
- out.PseudoElementIndexes = append(out.PseudoElementIndexes, v102)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "layoutNodeIndex":
- out.LayoutNodeIndex = int64(in.Int64())
- case "documentURL":
- out.DocumentURL = string(in.String())
- case "baseURL":
- out.BaseURL = string(in.String())
- case "contentLanguage":
- out.ContentLanguage = string(in.String())
- case "documentEncoding":
- out.DocumentEncoding = string(in.String())
- case "publicId":
- out.PublicID = string(in.String())
- case "systemId":
- out.SystemID = string(in.String())
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "contentDocumentIndex":
- out.ContentDocumentIndex = int64(in.Int64())
- case "pseudoType":
- (out.PseudoType).UnmarshalEasyJSON(in)
- case "shadowRootType":
- (out.ShadowRootType).UnmarshalEasyJSON(in)
- case "isClickable":
- out.IsClickable = bool(in.Bool())
- case "eventListeners":
- if in.IsNull() {
- in.Skip()
- out.EventListeners = nil
- } else {
- in.Delim('[')
- if out.EventListeners == nil {
- if !in.IsDelim(']') {
- out.EventListeners = make([]*domdebugger.EventListener, 0, 8)
- } else {
- out.EventListeners = []*domdebugger.EventListener{}
- }
- } else {
- out.EventListeners = (out.EventListeners)[:0]
- }
- for !in.IsDelim(']') {
- var v103 *domdebugger.EventListener
- if in.IsNull() {
- in.Skip()
- v103 = nil
- } else {
- if v103 == nil {
- v103 = new(domdebugger.EventListener)
- }
- (*v103).UnmarshalEasyJSON(in)
- }
- out.EventListeners = append(out.EventListeners, v103)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "currentSourceURL":
- out.CurrentSourceURL = string(in.String())
- case "originURL":
- out.OriginURL = string(in.String())
- case "scrollOffsetX":
- out.ScrollOffsetX = float64(in.Float64())
- case "scrollOffsetY":
- out.ScrollOffsetY = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(out *jwriter.Writer, in DOMNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeType\":"
- out.RawString(prefix[1:])
- (in.NodeType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"nodeName\":"
- out.RawString(prefix)
- out.String(string(in.NodeName))
- }
- {
- const prefix string = ",\"nodeValue\":"
- out.RawString(prefix)
- out.String(string(in.NodeValue))
- }
- if in.TextValue != "" {
- const prefix string = ",\"textValue\":"
- out.RawString(prefix)
- out.String(string(in.TextValue))
- }
- if in.InputValue != "" {
- const prefix string = ",\"inputValue\":"
- out.RawString(prefix)
- out.String(string(in.InputValue))
- }
- if in.InputChecked {
- const prefix string = ",\"inputChecked\":"
- out.RawString(prefix)
- out.Bool(bool(in.InputChecked))
- }
- if in.OptionSelected {
- const prefix string = ",\"optionSelected\":"
- out.RawString(prefix)
- out.Bool(bool(in.OptionSelected))
- }
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if len(in.ChildNodeIndexes) != 0 {
- const prefix string = ",\"childNodeIndexes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v104, v105 := range in.ChildNodeIndexes {
- if v104 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v105))
- }
- out.RawByte(']')
- }
- }
- if len(in.Attributes) != 0 {
- const prefix string = ",\"attributes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v106, v107 := range in.Attributes {
- if v106 > 0 {
- out.RawByte(',')
- }
- if v107 == nil {
- out.RawString("null")
- } else {
- (*v107).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.PseudoElementIndexes) != 0 {
- const prefix string = ",\"pseudoElementIndexes\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v108, v109 := range in.PseudoElementIndexes {
- if v108 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v109))
- }
- out.RawByte(']')
- }
- }
- if in.LayoutNodeIndex != 0 {
- const prefix string = ",\"layoutNodeIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.LayoutNodeIndex))
- }
- if in.DocumentURL != "" {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix)
- out.String(string(in.DocumentURL))
- }
- if in.BaseURL != "" {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.String(string(in.BaseURL))
- }
- if in.ContentLanguage != "" {
- const prefix string = ",\"contentLanguage\":"
- out.RawString(prefix)
- out.String(string(in.ContentLanguage))
- }
- if in.DocumentEncoding != "" {
- const prefix string = ",\"documentEncoding\":"
- out.RawString(prefix)
- out.String(string(in.DocumentEncoding))
- }
- if in.PublicID != "" {
- const prefix string = ",\"publicId\":"
- out.RawString(prefix)
- out.String(string(in.PublicID))
- }
- if in.SystemID != "" {
- const prefix string = ",\"systemId\":"
- out.RawString(prefix)
- out.String(string(in.SystemID))
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- if in.ContentDocumentIndex != 0 {
- const prefix string = ",\"contentDocumentIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.ContentDocumentIndex))
- }
- if in.PseudoType != "" {
- const prefix string = ",\"pseudoType\":"
- out.RawString(prefix)
- (in.PseudoType).MarshalEasyJSON(out)
- }
- if in.ShadowRootType != "" {
- const prefix string = ",\"shadowRootType\":"
- out.RawString(prefix)
- (in.ShadowRootType).MarshalEasyJSON(out)
- }
- if in.IsClickable {
- const prefix string = ",\"isClickable\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsClickable))
- }
- if len(in.EventListeners) != 0 {
- const prefix string = ",\"eventListeners\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v110, v111 := range in.EventListeners {
- if v110 > 0 {
- out.RawByte(',')
- }
- if v111 == nil {
- out.RawString("null")
- } else {
- (*v111).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.CurrentSourceURL != "" {
- const prefix string = ",\"currentSourceURL\":"
- out.RawString(prefix)
- out.String(string(in.CurrentSourceURL))
- }
- if in.OriginURL != "" {
- const prefix string = ",\"originURL\":"
- out.RawString(prefix)
- out.String(string(in.OriginURL))
- }
- if in.ScrollOffsetX != 0 {
- const prefix string = ",\"scrollOffsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetX))
- }
- if in.ScrollOffsetY != 0 {
- const prefix string = ",\"scrollOffsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetY))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DOMNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DOMNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(in *jlexer.Lexer, out *ComputedStyle) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "properties":
- if in.IsNull() {
- in.Skip()
- out.Properties = nil
- } else {
- in.Delim('[')
- if out.Properties == nil {
- if !in.IsDelim(']') {
- out.Properties = make([]*NameValue, 0, 8)
- } else {
- out.Properties = []*NameValue{}
- }
- } else {
- out.Properties = (out.Properties)[:0]
- }
- for !in.IsDelim(']') {
- var v112 *NameValue
- if in.IsNull() {
- in.Skip()
- v112 = nil
- } else {
- if v112 == nil {
- v112 = new(NameValue)
- }
- (*v112).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v112)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(out *jwriter.Writer, in ComputedStyle) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"properties\":"
- out.RawString(prefix[1:])
- if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v113, v114 := range in.Properties {
- if v113 > 0 {
- out.RawByte(',')
- }
- if v114 == nil {
- out.RawString("null")
- } else {
- (*v114).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ComputedStyle) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ComputedStyle) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(in *jlexer.Lexer, out *CaptureSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "documents":
- if in.IsNull() {
- in.Skip()
- out.Documents = nil
- } else {
- in.Delim('[')
- if out.Documents == nil {
- if !in.IsDelim(']') {
- out.Documents = make([]*DocumentSnapshot, 0, 8)
- } else {
- out.Documents = []*DocumentSnapshot{}
- }
- } else {
- out.Documents = (out.Documents)[:0]
- }
- for !in.IsDelim(']') {
- var v115 *DocumentSnapshot
- if in.IsNull() {
- in.Skip()
- v115 = nil
- } else {
- if v115 == nil {
- v115 = new(DocumentSnapshot)
- }
- (*v115).UnmarshalEasyJSON(in)
- }
- out.Documents = append(out.Documents, v115)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "strings":
- if in.IsNull() {
- in.Skip()
- out.Strings = nil
- } else {
- in.Delim('[')
- if out.Strings == nil {
- if !in.IsDelim(']') {
- out.Strings = make([]string, 0, 4)
- } else {
- out.Strings = []string{}
- }
- } else {
- out.Strings = (out.Strings)[:0]
- }
- for !in.IsDelim(']') {
- var v116 string
- v116 = string(in.String())
- out.Strings = append(out.Strings, v116)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(out *jwriter.Writer, in CaptureSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Documents) != 0 {
- const prefix string = ",\"documents\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v117, v118 := range in.Documents {
- if v117 > 0 {
- out.RawByte(',')
- }
- if v118 == nil {
- out.RawString("null")
- } else {
- (*v118).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Strings) != 0 {
- const prefix string = ",\"strings\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v119, v120 := range in.Strings {
- if v119 > 0 {
- out.RawByte(',')
- }
- out.String(string(v120))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(in *jlexer.Lexer, out *CaptureSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "computedStyles":
- if in.IsNull() {
- in.Skip()
- out.ComputedStyles = nil
- } else {
- in.Delim('[')
- if out.ComputedStyles == nil {
- if !in.IsDelim(']') {
- out.ComputedStyles = make([]string, 0, 4)
- } else {
- out.ComputedStyles = []string{}
- }
- } else {
- out.ComputedStyles = (out.ComputedStyles)[:0]
- }
- for !in.IsDelim(']') {
- var v121 string
- v121 = string(in.String())
- out.ComputedStyles = append(out.ComputedStyles, v121)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "includePaintOrder":
- out.IncludePaintOrder = bool(in.Bool())
- case "includeDOMRects":
- out.IncludeDOMRects = bool(in.Bool())
- case "includeBlendedBackgroundColors":
- out.IncludeBlendedBackgroundColors = bool(in.Bool())
- case "includeTextColorOpacities":
- out.IncludeTextColorOpacities = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(out *jwriter.Writer, in CaptureSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"computedStyles\":"
- out.RawString(prefix[1:])
- if in.ComputedStyles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v122, v123 := range in.ComputedStyles {
- if v122 > 0 {
- out.RawByte(',')
- }
- out.String(string(v123))
- }
- out.RawByte(']')
- }
- }
- if in.IncludePaintOrder {
- const prefix string = ",\"includePaintOrder\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludePaintOrder))
- }
- if in.IncludeDOMRects {
- const prefix string = ",\"includeDOMRects\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeDOMRects))
- }
- if in.IncludeBlendedBackgroundColors {
- const prefix string = ",\"includeBlendedBackgroundColors\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeBlendedBackgroundColors))
- }
- if in.IncludeTextColorOpacities {
- const prefix string = ",\"includeTextColorOpacities\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeTextColorOpacities))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot15(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/domsnapshot/types.go b/vendor/github.com/chromedp/cdproto/domsnapshot/types.go
deleted file mode 100644
index 503aad5853f..00000000000
--- a/vendor/github.com/chromedp/cdproto/domsnapshot/types.go
+++ /dev/null
@@ -1,197 +0,0 @@
-package domsnapshot
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/domdebugger"
-)
-
-// DOMNode a Node in the DOM tree.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-DOMNode
-type DOMNode struct {
- NodeType cdp.NodeType `json:"nodeType"` // Node's nodeType.
- NodeName string `json:"nodeName"` // Node's nodeName.
- NodeValue string `json:"nodeValue"` // Node's nodeValue.
- TextValue string `json:"textValue,omitempty"` // Only set for textarea elements, contains the text value.
- InputValue string `json:"inputValue,omitempty"` // Only set for input elements, contains the input's associated text value.
- InputChecked bool `json:"inputChecked,omitempty"` // Only set for radio and checkbox input elements, indicates if the element has been checked
- OptionSelected bool `json:"optionSelected,omitempty"` // Only set for option elements, indicates if the element has been selected
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Node's id, corresponds to DOM.Node.backendNodeId.
- ChildNodeIndexes []int64 `json:"childNodeIndexes,omitempty"` // The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any.
- Attributes []*NameValue `json:"attributes,omitempty"` // Attributes of an Element node.
- PseudoElementIndexes []int64 `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any.
- LayoutNodeIndex int64 `json:"layoutNodeIndex,omitempty"` // The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any.
- DocumentURL string `json:"documentURL,omitempty"` // Document URL that Document or FrameOwner node points to.
- BaseURL string `json:"baseURL,omitempty"` // Base URL that Document or FrameOwner node uses for URL completion.
- ContentLanguage string `json:"contentLanguage,omitempty"` // Only set for documents, contains the document's content language.
- DocumentEncoding string `json:"documentEncoding,omitempty"` // Only set for documents, contains the document's character set encoding.
- PublicID string `json:"publicId,omitempty"` // DocumentType node's publicId.
- SystemID string `json:"systemId,omitempty"` // DocumentType node's systemId.
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements and also for the document node.
- ContentDocumentIndex int64 `json:"contentDocumentIndex,omitempty"` // The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any.
- PseudoType cdp.PseudoType `json:"pseudoType,omitempty"` // Type of a pseudo element node.
- ShadowRootType cdp.ShadowRootType `json:"shadowRootType,omitempty"` // Shadow root type.
- IsClickable bool `json:"isClickable,omitempty"` // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
- EventListeners []*domdebugger.EventListener `json:"eventListeners,omitempty"` // Details of the node's event listeners, if any.
- CurrentSourceURL string `json:"currentSourceURL,omitempty"` // The selected url for nodes with a srcset attribute.
- OriginURL string `json:"originURL,omitempty"` // The url of the script (if any) that generates this node.
- ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"` // Scroll offsets, set when this node is a Document.
- ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"`
-}
-
-// InlineTextBox details of post layout rendered text positions. The exact
-// layout should not be regarded as stable and may change between versions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-InlineTextBox
-type InlineTextBox struct {
- BoundingBox *dom.Rect `json:"boundingBox"` // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
- StartCharacterIndex int64 `json:"startCharacterIndex"` // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
- NumCharacters int64 `json:"numCharacters"` // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
-}
-
-// LayoutTreeNode details of an element in the DOM tree with a LayoutObject.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-LayoutTreeNode
-type LayoutTreeNode struct {
- DomNodeIndex int64 `json:"domNodeIndex"` // The index of the related DOM node in the domNodes array returned by getSnapshot.
- BoundingBox *dom.Rect `json:"boundingBox"` // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
- LayoutText string `json:"layoutText,omitempty"` // Contents of the LayoutText, if any.
- InlineTextNodes []*InlineTextBox `json:"inlineTextNodes,omitempty"` // The post-layout inline text nodes, if any.
- StyleIndex int64 `json:"styleIndex,omitempty"` // Index into the computedStyles array returned by getSnapshot.
- PaintOrder int64 `json:"paintOrder,omitempty"` // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in getSnapshot was true.
- IsStackingContext bool `json:"isStackingContext,omitempty"` // Set to true to indicate the element begins a new stacking context.
-}
-
-// ComputedStyle a subset of the full ComputedStyle as defined by the request
-// whitelist.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-ComputedStyle
-type ComputedStyle struct {
- Properties []*NameValue `json:"properties"` // Name/value pairs of computed style properties.
-}
-
-// NameValue a name/value pair.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-NameValue
-type NameValue struct {
- Name string `json:"name"` // Attribute/property name.
- Value string `json:"value"` // Attribute/property value.
-}
-
-// StringIndex index of the string in the strings table.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-StringIndex
-type StringIndex int64
-
-// Int64 returns the StringIndex as int64 value.
-func (t StringIndex) Int64() int64 {
- return int64(t)
-}
-
-// ArrayOfStrings index of the string in the strings table.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-ArrayOfStrings
-type ArrayOfStrings []int64
-
-// RareStringData data that is only present on rare nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareStringData
-type RareStringData struct {
- Index []int64 `json:"index"`
- Value []StringIndex `json:"value"`
-}
-
-// RareBooleanData [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareBooleanData
-type RareBooleanData struct {
- Index []int64 `json:"index"`
-}
-
-// RareIntegerData [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareIntegerData
-type RareIntegerData struct {
- Index []int64 `json:"index"`
- Value []int64 `json:"value"`
-}
-
-// Rectangle [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-Rectangle
-type Rectangle []float64
-
-// DocumentSnapshot document snapshot.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-DocumentSnapshot
-type DocumentSnapshot struct {
- DocumentURL StringIndex `json:"documentURL"` // Document URL that Document or FrameOwner node points to.
- Title StringIndex `json:"title"` // Document title.
- BaseURL StringIndex `json:"baseURL"` // Base URL that Document or FrameOwner node uses for URL completion.
- ContentLanguage StringIndex `json:"contentLanguage"` // Contains the document's content language.
- EncodingName StringIndex `json:"encodingName"` // Contains the document's character set encoding.
- PublicID StringIndex `json:"publicId"` // DocumentType node's publicId.
- SystemID StringIndex `json:"systemId"` // DocumentType node's systemId.
- FrameID StringIndex `json:"frameId"` // Frame ID for frame owner elements and also for the document node.
- Nodes *NodeTreeSnapshot `json:"nodes"` // A table with dom nodes.
- Layout *LayoutTreeSnapshot `json:"layout"` // The nodes in the layout tree.
- TextBoxes *TextBoxSnapshot `json:"textBoxes"` // The post-layout inline text nodes.
- ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"` // Horizontal scroll offset.
- ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"` // Vertical scroll offset.
- ContentWidth float64 `json:"contentWidth,omitempty"` // Document content width.
- ContentHeight float64 `json:"contentHeight,omitempty"` // Document content height.
-}
-
-// NodeTreeSnapshot table containing nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-NodeTreeSnapshot
-type NodeTreeSnapshot struct {
- ParentIndex []int64 `json:"parentIndex,omitempty"` // Parent node index.
- NodeType []int64 `json:"nodeType,omitempty"` // Node's nodeType.
- NodeName []StringIndex `json:"nodeName,omitempty"` // Node's nodeName.
- NodeValue []StringIndex `json:"nodeValue,omitempty"` // Node's nodeValue.
- BackendNodeID []cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node's id, corresponds to DOM.Node.backendNodeId.
- Attributes []ArrayOfStrings `json:"attributes,omitempty"` // Attributes of an Element node. Flatten name, value pairs.
- TextValue *RareStringData `json:"textValue,omitempty"` // Only set for textarea elements, contains the text value.
- InputValue *RareStringData `json:"inputValue,omitempty"` // Only set for input elements, contains the input's associated text value.
- InputChecked *RareBooleanData `json:"inputChecked,omitempty"` // Only set for radio and checkbox input elements, indicates if the element has been checked
- OptionSelected *RareBooleanData `json:"optionSelected,omitempty"` // Only set for option elements, indicates if the element has been selected
- ContentDocumentIndex *RareIntegerData `json:"contentDocumentIndex,omitempty"` // The index of the document in the list of the snapshot documents.
- PseudoType *RareStringData `json:"pseudoType,omitempty"` // Type of a pseudo element node.
- IsClickable *RareBooleanData `json:"isClickable,omitempty"` // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
- CurrentSourceURL *RareStringData `json:"currentSourceURL,omitempty"` // The selected url for nodes with a srcset attribute.
- OriginURL *RareStringData `json:"originURL,omitempty"` // The url of the script (if any) that generates this node.
-}
-
-// LayoutTreeSnapshot table of details of an element in the DOM tree with a
-// LayoutObject.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-LayoutTreeSnapshot
-type LayoutTreeSnapshot struct {
- NodeIndex []int64 `json:"nodeIndex"` // Index of the corresponding node in the NodeTreeSnapshot array returned by captureSnapshot.
- Styles []ArrayOfStrings `json:"styles"` // Array of indexes specifying computed style strings, filtered according to the computedStyles parameter passed to captureSnapshot.
- Bounds []Rectangle `json:"bounds"` // The absolute position bounding box.
- Text []StringIndex `json:"text"` // Contents of the LayoutText, if any.
- StackingContexts *RareBooleanData `json:"stackingContexts"` // Stacking context information.
- PaintOrders []int64 `json:"paintOrders,omitempty"` // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.
- OffsetRects []Rectangle `json:"offsetRects,omitempty"` // The offset rect of nodes. Only available when includeDOMRects is set to true
- ScrollRects []Rectangle `json:"scrollRects,omitempty"` // The scroll rect of nodes. Only available when includeDOMRects is set to true
- ClientRects []Rectangle `json:"clientRects,omitempty"` // The client rect of nodes. Only available when includeDOMRects is set to true
- BlendedBackgroundColors []StringIndex `json:"blendedBackgroundColors,omitempty"` // The list of background colors that are blended with colors of overlapping elements.
- TextColorOpacities []float64 `json:"textColorOpacities,omitempty"` // The list of computed text opacities.
-}
-
-// TextBoxSnapshot table of details of the post layout rendered text
-// positions. The exact layout should not be regarded as stable and may change
-// between versions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-TextBoxSnapshot
-type TextBoxSnapshot struct {
- LayoutIndex []int64 `json:"layoutIndex"` // Index of the layout tree node that owns this box collection.
- Bounds []Rectangle `json:"bounds"` // The absolute position bounding box.
- Start []int64 `json:"start"` // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
- Length []int64 `json:"length"` // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
-}
diff --git a/vendor/github.com/chromedp/cdproto/domstorage/domstorage.go b/vendor/github.com/chromedp/cdproto/domstorage/domstorage.go
deleted file mode 100644
index 6021099395c..00000000000
--- a/vendor/github.com/chromedp/cdproto/domstorage/domstorage.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// Package domstorage provides the Chrome DevTools Protocol
-// commands, types, and events for the DOMStorage domain.
-//
-// Query and modify DOM storage.
-//
-// Generated by the cdproto-gen command.
-package domstorage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ClearParams [no description].
-type ClearParams struct {
- StorageID *StorageID `json:"storageId"`
-}
-
-// Clear [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-clear
-//
-// parameters:
-// storageID
-func Clear(storageID *StorageID) *ClearParams {
- return &ClearParams{
- StorageID: storageID,
- }
-}
-
-// Do executes DOMStorage.clear against the provided context.
-func (p *ClearParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClear, p, nil)
-}
-
-// DisableParams disables storage tracking, prevents storage events from
-// being sent to the client.
-type DisableParams struct{}
-
-// Disable disables storage tracking, prevents storage events from being sent
-// to the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes DOMStorage.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables storage tracking, storage events will now be
-// delivered to the client.
-type EnableParams struct{}
-
-// Enable enables storage tracking, storage events will now be delivered to
-// the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes DOMStorage.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetDOMStorageItemsParams [no description].
-type GetDOMStorageItemsParams struct {
- StorageID *StorageID `json:"storageId"`
-}
-
-// GetDOMStorageItems [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-getDOMStorageItems
-//
-// parameters:
-// storageID
-func GetDOMStorageItems(storageID *StorageID) *GetDOMStorageItemsParams {
- return &GetDOMStorageItemsParams{
- StorageID: storageID,
- }
-}
-
-// GetDOMStorageItemsReturns return values.
-type GetDOMStorageItemsReturns struct {
- Entries []Item `json:"entries,omitempty"`
-}
-
-// Do executes DOMStorage.getDOMStorageItems against the provided context.
-//
-// returns:
-// entries
-func (p *GetDOMStorageItemsParams) Do(ctx context.Context) (entries []Item, err error) {
- // execute
- var res GetDOMStorageItemsReturns
- err = cdp.Execute(ctx, CommandGetDOMStorageItems, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Entries, nil
-}
-
-// RemoveDOMStorageItemParams [no description].
-type RemoveDOMStorageItemParams struct {
- StorageID *StorageID `json:"storageId"`
- Key string `json:"key"`
-}
-
-// RemoveDOMStorageItem [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-removeDOMStorageItem
-//
-// parameters:
-// storageID
-// key
-func RemoveDOMStorageItem(storageID *StorageID, key string) *RemoveDOMStorageItemParams {
- return &RemoveDOMStorageItemParams{
- StorageID: storageID,
- Key: key,
- }
-}
-
-// Do executes DOMStorage.removeDOMStorageItem against the provided context.
-func (p *RemoveDOMStorageItemParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveDOMStorageItem, p, nil)
-}
-
-// SetDOMStorageItemParams [no description].
-type SetDOMStorageItemParams struct {
- StorageID *StorageID `json:"storageId"`
- Key string `json:"key"`
- Value string `json:"value"`
-}
-
-// SetDOMStorageItem [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-setDOMStorageItem
-//
-// parameters:
-// storageID
-// key
-// value
-func SetDOMStorageItem(storageID *StorageID, key string, value string) *SetDOMStorageItemParams {
- return &SetDOMStorageItemParams{
- StorageID: storageID,
- Key: key,
- Value: value,
- }
-}
-
-// Do executes DOMStorage.setDOMStorageItem against the provided context.
-func (p *SetDOMStorageItemParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDOMStorageItem, p, nil)
-}
-
-// Command names.
-const (
- CommandClear = "DOMStorage.clear"
- CommandDisable = "DOMStorage.disable"
- CommandEnable = "DOMStorage.enable"
- CommandGetDOMStorageItems = "DOMStorage.getDOMStorageItems"
- CommandRemoveDOMStorageItem = "DOMStorage.removeDOMStorageItem"
- CommandSetDOMStorageItem = "DOMStorage.setDOMStorageItem"
-)
diff --git a/vendor/github.com/chromedp/cdproto/domstorage/easyjson.go b/vendor/github.com/chromedp/cdproto/domstorage/easyjson.go
deleted file mode 100644
index c197b34ec5c..00000000000
--- a/vendor/github.com/chromedp/cdproto/domstorage/easyjson.go
+++ /dev/null
@@ -1,1026 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package domstorage
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(in *jlexer.Lexer, out *StorageID) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "isLocalStorage":
- out.IsLocalStorage = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(out *jwriter.Writer, in StorageID) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"isLocalStorage\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsLocalStorage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StorageID) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StorageID) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StorageID) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StorageID) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(in *jlexer.Lexer, out *SetDOMStorageItemParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- case "key":
- out.Key = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(out *jwriter.Writer, in SetDOMStorageItemParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDOMStorageItemParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDOMStorageItemParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(in *jlexer.Lexer, out *RemoveDOMStorageItemParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- case "key":
- out.Key = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(out *jwriter.Writer, in RemoveDOMStorageItemParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveDOMStorageItemParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveDOMStorageItemParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(in *jlexer.Lexer, out *GetDOMStorageItemsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "entries":
- if in.IsNull() {
- in.Skip()
- out.Entries = nil
- } else {
- in.Delim('[')
- if out.Entries == nil {
- if !in.IsDelim(']') {
- out.Entries = make([]Item, 0, 2)
- } else {
- out.Entries = []Item{}
- }
- } else {
- out.Entries = (out.Entries)[:0]
- }
- for !in.IsDelim(']') {
- var v1 Item
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- in.Delim('[')
- if v1 == nil {
- if !in.IsDelim(']') {
- v1 = make(Item, 0, 4)
- } else {
- v1 = Item{}
- }
- } else {
- v1 = (v1)[:0]
- }
- for !in.IsDelim(']') {
- var v2 string
- v2 = string(in.String())
- v1 = append(v1, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Entries = append(out.Entries, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(out *jwriter.Writer, in GetDOMStorageItemsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Entries) != 0 {
- const prefix string = ",\"entries\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v3, v4 := range in.Entries {
- if v3 > 0 {
- out.RawByte(',')
- }
- if v4 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range v4 {
- if v5 > 0 {
- out.RawByte(',')
- }
- out.String(string(v6))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDOMStorageItemsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDOMStorageItemsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDOMStorageItemsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDOMStorageItemsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(in *jlexer.Lexer, out *GetDOMStorageItemsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(out *jwriter.Writer, in GetDOMStorageItemsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDOMStorageItemsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDOMStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDOMStorageItemsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDOMStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(in *jlexer.Lexer, out *EventDomStorageItemsCleared) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(out *jwriter.Writer, in EventDomStorageItemsCleared) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDomStorageItemsCleared) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDomStorageItemsCleared) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDomStorageItemsCleared) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDomStorageItemsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(in *jlexer.Lexer, out *EventDomStorageItemUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- case "key":
- out.Key = string(in.String())
- case "oldValue":
- out.OldValue = string(in.String())
- case "newValue":
- out.NewValue = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(out *jwriter.Writer, in EventDomStorageItemUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- {
- const prefix string = ",\"oldValue\":"
- out.RawString(prefix)
- out.String(string(in.OldValue))
- }
- {
- const prefix string = ",\"newValue\":"
- out.RawString(prefix)
- out.String(string(in.NewValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDomStorageItemUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDomStorageItemUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDomStorageItemUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDomStorageItemUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(in *jlexer.Lexer, out *EventDomStorageItemRemoved) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- case "key":
- out.Key = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(out *jwriter.Writer, in EventDomStorageItemRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDomStorageItemRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDomStorageItemRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDomStorageItemRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDomStorageItemRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(in *jlexer.Lexer, out *EventDomStorageItemAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- case "key":
- out.Key = string(in.String())
- case "newValue":
- out.NewValue = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(out *jwriter.Writer, in EventDomStorageItemAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- {
- const prefix string = ",\"newValue\":"
- out.RawString(prefix)
- out.String(string(in.NewValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDomStorageItemAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDomStorageItemAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDomStorageItemAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDomStorageItemAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(in *jlexer.Lexer, out *ClearParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageId":
- if in.IsNull() {
- in.Skip()
- out.StorageID = nil
- } else {
- if out.StorageID == nil {
- out.StorageID = new(StorageID)
- }
- (*out.StorageID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(out *jwriter.Writer, in ClearParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageId\":"
- out.RawString(prefix[1:])
- if in.StorageID == nil {
- out.RawString("null")
- } else {
- (*in.StorageID).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/domstorage/events.go b/vendor/github.com/chromedp/cdproto/domstorage/events.go
deleted file mode 100644
index bde61f852ea..00000000000
--- a/vendor/github.com/chromedp/cdproto/domstorage/events.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package domstorage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventDomStorageItemAdded [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#event-domStorageItemAdded
-type EventDomStorageItemAdded struct {
- StorageID *StorageID `json:"storageId"`
- Key string `json:"key"`
- NewValue string `json:"newValue"`
-}
-
-// EventDomStorageItemRemoved [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#event-domStorageItemRemoved
-type EventDomStorageItemRemoved struct {
- StorageID *StorageID `json:"storageId"`
- Key string `json:"key"`
-}
-
-// EventDomStorageItemUpdated [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#event-domStorageItemUpdated
-type EventDomStorageItemUpdated struct {
- StorageID *StorageID `json:"storageId"`
- Key string `json:"key"`
- OldValue string `json:"oldValue"`
- NewValue string `json:"newValue"`
-}
-
-// EventDomStorageItemsCleared [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#event-domStorageItemsCleared
-type EventDomStorageItemsCleared struct {
- StorageID *StorageID `json:"storageId"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/domstorage/types.go b/vendor/github.com/chromedp/cdproto/domstorage/types.go
deleted file mode 100644
index c4bde498b96..00000000000
--- a/vendor/github.com/chromedp/cdproto/domstorage/types.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package domstorage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// StorageID DOM Storage identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#type-StorageId
-type StorageID struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin for the storage.
- IsLocalStorage bool `json:"isLocalStorage"` // Whether the storage is local storage (not session storage).
-}
-
-// Item DOM Storage item.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#type-Item
-type Item []string
diff --git a/vendor/github.com/chromedp/cdproto/easyjson.go b/vendor/github.com/chromedp/cdproto/easyjson.go
deleted file mode 100644
index eb2fe0c4938..00000000000
--- a/vendor/github.com/chromedp/cdproto/easyjson.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package cdproto
-
-import (
- json "encoding/json"
- target "github.com/chromedp/cdproto/target"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdproto(in *jlexer.Lexer, out *empty) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdproto(out *jwriter.Writer, in empty) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v empty) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdproto(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v empty) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdproto(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *empty) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdproto(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *empty) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdproto(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdproto1(in *jlexer.Lexer, out *Message) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = int64(in.Int64())
- case "sessionId":
- out.SessionID = target.SessionID(in.String())
- case "method":
- out.Method = MethodType(in.String())
- case "params":
- (out.Params).UnmarshalEasyJSON(in)
- case "result":
- (out.Result).UnmarshalEasyJSON(in)
- case "error":
- if in.IsNull() {
- in.Skip()
- out.Error = nil
- } else {
- if out.Error == nil {
- out.Error = new(Error)
- }
- (*out.Error).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdproto1(out *jwriter.Writer, in Message) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ID != 0 {
- const prefix string = ",\"id\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.ID))
- }
- if in.SessionID != "" {
- const prefix string = ",\"sessionId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.SessionID))
- }
- if in.Method != "" {
- const prefix string = ",\"method\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Method))
- }
- if (in.Params).IsDefined() {
- const prefix string = ",\"params\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.Params).MarshalEasyJSON(out)
- }
- if (in.Result).IsDefined() {
- const prefix string = ",\"result\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.Result).MarshalEasyJSON(out)
- }
- if in.Error != nil {
- const prefix string = ",\"error\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Error).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Message) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdproto1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Message) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdproto1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Message) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdproto1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdproto1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdproto2(in *jlexer.Lexer, out *Error) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "code":
- out.Code = int64(in.Int64())
- case "message":
- out.Message = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdproto2(out *jwriter.Writer, in Error) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"code\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Code))
- }
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix)
- out.String(string(in.Message))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Error) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdproto2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Error) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdproto2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Error) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdproto2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdproto2(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/emulation/easyjson.go b/vendor/github.com/chromedp/cdproto/emulation/easyjson.go
deleted file mode 100644
index 57b6d1b8fca..00000000000
--- a/vendor/github.com/chromedp/cdproto/emulation/easyjson.go
+++ /dev/null
@@ -1,2539 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package emulation
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- page "github.com/chromedp/cdproto/page"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation(in *jlexer.Lexer, out *UserAgentMetadata) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "brands":
- if in.IsNull() {
- in.Skip()
- out.Brands = nil
- } else {
- in.Delim('[')
- if out.Brands == nil {
- if !in.IsDelim(']') {
- out.Brands = make([]*UserAgentBrandVersion, 0, 8)
- } else {
- out.Brands = []*UserAgentBrandVersion{}
- }
- } else {
- out.Brands = (out.Brands)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *UserAgentBrandVersion
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(UserAgentBrandVersion)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Brands = append(out.Brands, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "fullVersion":
- out.FullVersion = string(in.String())
- case "platform":
- out.Platform = string(in.String())
- case "platformVersion":
- out.PlatformVersion = string(in.String())
- case "architecture":
- out.Architecture = string(in.String())
- case "model":
- out.Model = string(in.String())
- case "mobile":
- out.Mobile = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation(out *jwriter.Writer, in UserAgentMetadata) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Brands) != 0 {
- const prefix string = ",\"brands\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.Brands {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.FullVersion != "" {
- const prefix string = ",\"fullVersion\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.FullVersion))
- }
- {
- const prefix string = ",\"platform\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Platform))
- }
- {
- const prefix string = ",\"platformVersion\":"
- out.RawString(prefix)
- out.String(string(in.PlatformVersion))
- }
- {
- const prefix string = ",\"architecture\":"
- out.RawString(prefix)
- out.String(string(in.Architecture))
- }
- {
- const prefix string = ",\"model\":"
- out.RawString(prefix)
- out.String(string(in.Model))
- }
- {
- const prefix string = ",\"mobile\":"
- out.RawString(prefix)
- out.Bool(bool(in.Mobile))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UserAgentMetadata) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UserAgentMetadata) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UserAgentMetadata) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UserAgentMetadata) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation1(in *jlexer.Lexer, out *UserAgentBrandVersion) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "brand":
- out.Brand = string(in.String())
- case "version":
- out.Version = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation1(out *jwriter.Writer, in UserAgentBrandVersion) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"brand\":"
- out.RawString(prefix[1:])
- out.String(string(in.Brand))
- }
- {
- const prefix string = ",\"version\":"
- out.RawString(prefix)
- out.String(string(in.Version))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UserAgentBrandVersion) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UserAgentBrandVersion) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UserAgentBrandVersion) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UserAgentBrandVersion) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation2(in *jlexer.Lexer, out *SetVirtualTimePolicyReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "virtualTimeTicksBase":
- out.VirtualTimeTicksBase = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation2(out *jwriter.Writer, in SetVirtualTimePolicyReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.VirtualTimeTicksBase != 0 {
- const prefix string = ",\"virtualTimeTicksBase\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.VirtualTimeTicksBase))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetVirtualTimePolicyReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetVirtualTimePolicyReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetVirtualTimePolicyReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetVirtualTimePolicyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation3(in *jlexer.Lexer, out *SetVirtualTimePolicyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "policy":
- (out.Policy).UnmarshalEasyJSON(in)
- case "budget":
- out.Budget = float64(in.Float64())
- case "maxVirtualTimeTaskStarvationCount":
- out.MaxVirtualTimeTaskStarvationCount = int64(in.Int64())
- case "waitForNavigation":
- out.WaitForNavigation = bool(in.Bool())
- case "initialVirtualTime":
- if in.IsNull() {
- in.Skip()
- out.InitialVirtualTime = nil
- } else {
- if out.InitialVirtualTime == nil {
- out.InitialVirtualTime = new(cdp.TimeSinceEpoch)
- }
- (*out.InitialVirtualTime).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation3(out *jwriter.Writer, in SetVirtualTimePolicyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"policy\":"
- out.RawString(prefix[1:])
- (in.Policy).MarshalEasyJSON(out)
- }
- if in.Budget != 0 {
- const prefix string = ",\"budget\":"
- out.RawString(prefix)
- out.Float64(float64(in.Budget))
- }
- if in.MaxVirtualTimeTaskStarvationCount != 0 {
- const prefix string = ",\"maxVirtualTimeTaskStarvationCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.MaxVirtualTimeTaskStarvationCount))
- }
- if in.WaitForNavigation {
- const prefix string = ",\"waitForNavigation\":"
- out.RawString(prefix)
- out.Bool(bool(in.WaitForNavigation))
- }
- if in.InitialVirtualTime != nil {
- const prefix string = ",\"initialVirtualTime\":"
- out.RawString(prefix)
- (*in.InitialVirtualTime).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetVirtualTimePolicyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetVirtualTimePolicyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetVirtualTimePolicyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetVirtualTimePolicyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation4(in *jlexer.Lexer, out *SetUserAgentOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "userAgent":
- out.UserAgent = string(in.String())
- case "acceptLanguage":
- out.AcceptLanguage = string(in.String())
- case "platform":
- out.Platform = string(in.String())
- case "userAgentMetadata":
- if in.IsNull() {
- in.Skip()
- out.UserAgentMetadata = nil
- } else {
- if out.UserAgentMetadata == nil {
- out.UserAgentMetadata = new(UserAgentMetadata)
- }
- (*out.UserAgentMetadata).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation4(out *jwriter.Writer, in SetUserAgentOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"userAgent\":"
- out.RawString(prefix[1:])
- out.String(string(in.UserAgent))
- }
- if in.AcceptLanguage != "" {
- const prefix string = ",\"acceptLanguage\":"
- out.RawString(prefix)
- out.String(string(in.AcceptLanguage))
- }
- if in.Platform != "" {
- const prefix string = ",\"platform\":"
- out.RawString(prefix)
- out.String(string(in.Platform))
- }
- if in.UserAgentMetadata != nil {
- const prefix string = ",\"userAgentMetadata\":"
- out.RawString(prefix)
- (*in.UserAgentMetadata).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetUserAgentOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetUserAgentOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetUserAgentOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetUserAgentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation5(in *jlexer.Lexer, out *SetTouchEmulationEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- case "maxTouchPoints":
- out.MaxTouchPoints = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation5(out *jwriter.Writer, in SetTouchEmulationEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- if in.MaxTouchPoints != 0 {
- const prefix string = ",\"maxTouchPoints\":"
- out.RawString(prefix)
- out.Int64(int64(in.MaxTouchPoints))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetTouchEmulationEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetTouchEmulationEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetTouchEmulationEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetTouchEmulationEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation6(in *jlexer.Lexer, out *SetTimezoneOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timezoneId":
- out.TimezoneID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation6(out *jwriter.Writer, in SetTimezoneOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timezoneId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TimezoneID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetTimezoneOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetTimezoneOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetTimezoneOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetTimezoneOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation7(in *jlexer.Lexer, out *SetScrollbarsHiddenParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "hidden":
- out.Hidden = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation7(out *jwriter.Writer, in SetScrollbarsHiddenParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"hidden\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Hidden))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetScrollbarsHiddenParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetScrollbarsHiddenParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetScrollbarsHiddenParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetScrollbarsHiddenParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation8(in *jlexer.Lexer, out *SetScriptExecutionDisabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- out.Value = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation8(out *jwriter.Writer, in SetScriptExecutionDisabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetScriptExecutionDisabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetScriptExecutionDisabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetScriptExecutionDisabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetScriptExecutionDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation9(in *jlexer.Lexer, out *SetPageScaleFactorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "pageScaleFactor":
- out.PageScaleFactor = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation9(out *jwriter.Writer, in SetPageScaleFactorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"pageScaleFactor\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.PageScaleFactor))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPageScaleFactorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPageScaleFactorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation10(in *jlexer.Lexer, out *SetLocaleOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "locale":
- out.Locale = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation10(out *jwriter.Writer, in SetLocaleOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Locale != "" {
- const prefix string = ",\"locale\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Locale))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetLocaleOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetLocaleOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetLocaleOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetLocaleOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation11(in *jlexer.Lexer, out *SetIdleOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "isUserActive":
- out.IsUserActive = bool(in.Bool())
- case "isScreenUnlocked":
- out.IsScreenUnlocked = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation11(out *jwriter.Writer, in SetIdleOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"isUserActive\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.IsUserActive))
- }
- {
- const prefix string = ",\"isScreenUnlocked\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsScreenUnlocked))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetIdleOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetIdleOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetIdleOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetIdleOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation12(in *jlexer.Lexer, out *SetGeolocationOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "latitude":
- out.Latitude = float64(in.Float64())
- case "longitude":
- out.Longitude = float64(in.Float64())
- case "accuracy":
- out.Accuracy = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation12(out *jwriter.Writer, in SetGeolocationOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Latitude != 0 {
- const prefix string = ",\"latitude\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.Latitude))
- }
- if in.Longitude != 0 {
- const prefix string = ",\"longitude\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Longitude))
- }
- if in.Accuracy != 0 {
- const prefix string = ",\"accuracy\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Accuracy))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetGeolocationOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetGeolocationOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation13(in *jlexer.Lexer, out *SetFocusEmulationEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation13(out *jwriter.Writer, in SetFocusEmulationEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetFocusEmulationEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetFocusEmulationEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetFocusEmulationEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetFocusEmulationEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation14(in *jlexer.Lexer, out *SetEmulatedVisionDeficiencyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation14(out *jwriter.Writer, in SetEmulatedVisionDeficiencyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetEmulatedVisionDeficiencyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetEmulatedVisionDeficiencyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetEmulatedVisionDeficiencyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetEmulatedVisionDeficiencyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation15(in *jlexer.Lexer, out *SetEmulatedMediaParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "media":
- out.Media = string(in.String())
- case "features":
- if in.IsNull() {
- in.Skip()
- out.Features = nil
- } else {
- in.Delim('[')
- if out.Features == nil {
- if !in.IsDelim(']') {
- out.Features = make([]*MediaFeature, 0, 8)
- } else {
- out.Features = []*MediaFeature{}
- }
- } else {
- out.Features = (out.Features)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *MediaFeature
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(MediaFeature)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Features = append(out.Features, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation15(out *jwriter.Writer, in SetEmulatedMediaParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Media != "" {
- const prefix string = ",\"media\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Media))
- }
- if len(in.Features) != 0 {
- const prefix string = ",\"features\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v5, v6 := range in.Features {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetEmulatedMediaParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetEmulatedMediaParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetEmulatedMediaParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetEmulatedMediaParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation16(in *jlexer.Lexer, out *SetEmitTouchEventsForMouseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- case "configuration":
- (out.Configuration).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation16(out *jwriter.Writer, in SetEmitTouchEventsForMouseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- if in.Configuration != "" {
- const prefix string = ",\"configuration\":"
- out.RawString(prefix)
- (in.Configuration).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetEmitTouchEventsForMouseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetEmitTouchEventsForMouseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetEmitTouchEventsForMouseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetEmitTouchEventsForMouseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation17(in *jlexer.Lexer, out *SetDocumentCookieDisabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "disabled":
- out.Disabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation17(out *jwriter.Writer, in SetDocumentCookieDisabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"disabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Disabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDocumentCookieDisabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDocumentCookieDisabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDocumentCookieDisabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDocumentCookieDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation18(in *jlexer.Lexer, out *SetDisabledImageTypesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "imageTypes":
- if in.IsNull() {
- in.Skip()
- out.ImageTypes = nil
- } else {
- in.Delim('[')
- if out.ImageTypes == nil {
- if !in.IsDelim(']') {
- out.ImageTypes = make([]DisabledImageType, 0, 4)
- } else {
- out.ImageTypes = []DisabledImageType{}
- }
- } else {
- out.ImageTypes = (out.ImageTypes)[:0]
- }
- for !in.IsDelim(']') {
- var v7 DisabledImageType
- (v7).UnmarshalEasyJSON(in)
- out.ImageTypes = append(out.ImageTypes, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation18(out *jwriter.Writer, in SetDisabledImageTypesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"imageTypes\":"
- out.RawString(prefix[1:])
- if in.ImageTypes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.ImageTypes {
- if v8 > 0 {
- out.RawByte(',')
- }
- (v9).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDisabledImageTypesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDisabledImageTypesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDisabledImageTypesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDisabledImageTypesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation19(in *jlexer.Lexer, out *SetDeviceMetricsOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- case "deviceScaleFactor":
- out.DeviceScaleFactor = float64(in.Float64())
- case "mobile":
- out.Mobile = bool(in.Bool())
- case "scale":
- out.Scale = float64(in.Float64())
- case "screenWidth":
- out.ScreenWidth = int64(in.Int64())
- case "screenHeight":
- out.ScreenHeight = int64(in.Int64())
- case "positionX":
- out.PositionX = int64(in.Int64())
- case "positionY":
- out.PositionY = int64(in.Int64())
- case "dontSetVisibleSize":
- out.DontSetVisibleSize = bool(in.Bool())
- case "screenOrientation":
- if in.IsNull() {
- in.Skip()
- out.ScreenOrientation = nil
- } else {
- if out.ScreenOrientation == nil {
- out.ScreenOrientation = new(ScreenOrientation)
- }
- (*out.ScreenOrientation).UnmarshalEasyJSON(in)
- }
- case "viewport":
- if in.IsNull() {
- in.Skip()
- out.Viewport = nil
- } else {
- if out.Viewport == nil {
- out.Viewport = new(page.Viewport)
- }
- (*out.Viewport).UnmarshalEasyJSON(in)
- }
- case "displayFeature":
- if in.IsNull() {
- in.Skip()
- out.DisplayFeature = nil
- } else {
- if out.DisplayFeature == nil {
- out.DisplayFeature = new(DisplayFeature)
- }
- (*out.DisplayFeature).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation19(out *jwriter.Writer, in SetDeviceMetricsOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Int64(int64(in.Height))
- }
- {
- const prefix string = ",\"deviceScaleFactor\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeviceScaleFactor))
- }
- {
- const prefix string = ",\"mobile\":"
- out.RawString(prefix)
- out.Bool(bool(in.Mobile))
- }
- if in.Scale != 0 {
- const prefix string = ",\"scale\":"
- out.RawString(prefix)
- out.Float64(float64(in.Scale))
- }
- if in.ScreenWidth != 0 {
- const prefix string = ",\"screenWidth\":"
- out.RawString(prefix)
- out.Int64(int64(in.ScreenWidth))
- }
- if in.ScreenHeight != 0 {
- const prefix string = ",\"screenHeight\":"
- out.RawString(prefix)
- out.Int64(int64(in.ScreenHeight))
- }
- if in.PositionX != 0 {
- const prefix string = ",\"positionX\":"
- out.RawString(prefix)
- out.Int64(int64(in.PositionX))
- }
- if in.PositionY != 0 {
- const prefix string = ",\"positionY\":"
- out.RawString(prefix)
- out.Int64(int64(in.PositionY))
- }
- if in.DontSetVisibleSize {
- const prefix string = ",\"dontSetVisibleSize\":"
- out.RawString(prefix)
- out.Bool(bool(in.DontSetVisibleSize))
- }
- if in.ScreenOrientation != nil {
- const prefix string = ",\"screenOrientation\":"
- out.RawString(prefix)
- (*in.ScreenOrientation).MarshalEasyJSON(out)
- }
- if in.Viewport != nil {
- const prefix string = ",\"viewport\":"
- out.RawString(prefix)
- (*in.Viewport).MarshalEasyJSON(out)
- }
- if in.DisplayFeature != nil {
- const prefix string = ",\"displayFeature\":"
- out.RawString(prefix)
- (*in.DisplayFeature).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation20(in *jlexer.Lexer, out *SetDefaultBackgroundColorOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "color":
- if in.IsNull() {
- in.Skip()
- out.Color = nil
- } else {
- if out.Color == nil {
- out.Color = new(cdp.RGBA)
- }
- (*out.Color).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation20(out *jwriter.Writer, in SetDefaultBackgroundColorOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Color != nil {
- const prefix string = ",\"color\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Color).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDefaultBackgroundColorOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDefaultBackgroundColorOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation21(in *jlexer.Lexer, out *SetCPUThrottlingRateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rate":
- out.Rate = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation21(out *jwriter.Writer, in SetCPUThrottlingRateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"rate\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Rate))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCPUThrottlingRateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCPUThrottlingRateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCPUThrottlingRateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCPUThrottlingRateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation22(in *jlexer.Lexer, out *ScreenOrientation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "angle":
- out.Angle = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation22(out *jwriter.Writer, in ScreenOrientation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"angle\":"
- out.RawString(prefix)
- out.Int64(int64(in.Angle))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScreenOrientation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScreenOrientation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScreenOrientation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScreenOrientation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation23(in *jlexer.Lexer, out *ResetPageScaleFactorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation23(out *jwriter.Writer, in ResetPageScaleFactorParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResetPageScaleFactorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResetPageScaleFactorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation24(in *jlexer.Lexer, out *MediaFeature) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation24(out *jwriter.Writer, in MediaFeature) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MediaFeature) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MediaFeature) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MediaFeature) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MediaFeature) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation25(in *jlexer.Lexer, out *EventVirtualTimeBudgetExpired) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation25(out *jwriter.Writer, in EventVirtualTimeBudgetExpired) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventVirtualTimeBudgetExpired) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventVirtualTimeBudgetExpired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventVirtualTimeBudgetExpired) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventVirtualTimeBudgetExpired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation26(in *jlexer.Lexer, out *DisplayFeature) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "orientation":
- (out.Orientation).UnmarshalEasyJSON(in)
- case "offset":
- out.Offset = int64(in.Int64())
- case "maskLength":
- out.MaskLength = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation26(out *jwriter.Writer, in DisplayFeature) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"orientation\":"
- out.RawString(prefix[1:])
- (in.Orientation).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"offset\":"
- out.RawString(prefix)
- out.Int64(int64(in.Offset))
- }
- {
- const prefix string = ",\"maskLength\":"
- out.RawString(prefix)
- out.Int64(int64(in.MaskLength))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisplayFeature) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisplayFeature) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisplayFeature) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisplayFeature) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation27(in *jlexer.Lexer, out *ClearIdleOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation27(out *jwriter.Writer, in ClearIdleOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearIdleOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearIdleOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearIdleOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearIdleOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation28(in *jlexer.Lexer, out *ClearGeolocationOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation28(out *jwriter.Writer, in ClearGeolocationOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearGeolocationOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearGeolocationOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation29(in *jlexer.Lexer, out *ClearDeviceMetricsOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation29(out *jwriter.Writer, in ClearDeviceMetricsOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation30(in *jlexer.Lexer, out *CanEmulateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- out.Result = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation30(out *jwriter.Writer, in CanEmulateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.Result))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CanEmulateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CanEmulateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CanEmulateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CanEmulateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation31(in *jlexer.Lexer, out *CanEmulateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation31(out *jwriter.Writer, in CanEmulateParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CanEmulateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CanEmulateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoEmulation31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CanEmulateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CanEmulateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoEmulation31(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/emulation/emulation.go b/vendor/github.com/chromedp/cdproto/emulation/emulation.go
deleted file mode 100644
index 07125692780..00000000000
--- a/vendor/github.com/chromedp/cdproto/emulation/emulation.go
+++ /dev/null
@@ -1,787 +0,0 @@
-// Package emulation provides the Chrome DevTools Protocol
-// commands, types, and events for the Emulation domain.
-//
-// This domain emulates different environments for the page.
-//
-// Generated by the cdproto-gen command.
-package emulation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/page"
-)
-
-// CanEmulateParams tells whether emulation is supported.
-type CanEmulateParams struct{}
-
-// CanEmulate tells whether emulation is supported.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-canEmulate
-func CanEmulate() *CanEmulateParams {
- return &CanEmulateParams{}
-}
-
-// CanEmulateReturns return values.
-type CanEmulateReturns struct {
- Result bool `json:"result,omitempty"` // True if emulation is supported.
-}
-
-// Do executes Emulation.canEmulate against the provided context.
-//
-// returns:
-// result - True if emulation is supported.
-func (p *CanEmulateParams) Do(ctx context.Context) (result bool, err error) {
- // execute
- var res CanEmulateReturns
- err = cdp.Execute(ctx, CommandCanEmulate, nil, &res)
- if err != nil {
- return false, err
- }
-
- return res.Result, nil
-}
-
-// ClearDeviceMetricsOverrideParams clears the overridden device metrics.
-type ClearDeviceMetricsOverrideParams struct{}
-
-// ClearDeviceMetricsOverride clears the overridden device metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearDeviceMetricsOverride
-func ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideParams {
- return &ClearDeviceMetricsOverrideParams{}
-}
-
-// Do executes Emulation.clearDeviceMetricsOverride against the provided context.
-func (p *ClearDeviceMetricsOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearDeviceMetricsOverride, nil, nil)
-}
-
-// ClearGeolocationOverrideParams clears the overridden Geolocation Position
-// and Error.
-type ClearGeolocationOverrideParams struct{}
-
-// ClearGeolocationOverride clears the overridden Geolocation Position and
-// Error.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearGeolocationOverride
-func ClearGeolocationOverride() *ClearGeolocationOverrideParams {
- return &ClearGeolocationOverrideParams{}
-}
-
-// Do executes Emulation.clearGeolocationOverride against the provided context.
-func (p *ClearGeolocationOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearGeolocationOverride, nil, nil)
-}
-
-// ResetPageScaleFactorParams requests that page scale factor is reset to
-// initial values.
-type ResetPageScaleFactorParams struct{}
-
-// ResetPageScaleFactor requests that page scale factor is reset to initial
-// values.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-resetPageScaleFactor
-func ResetPageScaleFactor() *ResetPageScaleFactorParams {
- return &ResetPageScaleFactorParams{}
-}
-
-// Do executes Emulation.resetPageScaleFactor against the provided context.
-func (p *ResetPageScaleFactorParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandResetPageScaleFactor, nil, nil)
-}
-
-// SetFocusEmulationEnabledParams enables or disables simulating a focused
-// and active page.
-type SetFocusEmulationEnabledParams struct {
- Enabled bool `json:"enabled"` // Whether to enable to disable focus emulation.
-}
-
-// SetFocusEmulationEnabled enables or disables simulating a focused and
-// active page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setFocusEmulationEnabled
-//
-// parameters:
-// enabled - Whether to enable to disable focus emulation.
-func SetFocusEmulationEnabled(enabled bool) *SetFocusEmulationEnabledParams {
- return &SetFocusEmulationEnabledParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Emulation.setFocusEmulationEnabled against the provided context.
-func (p *SetFocusEmulationEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetFocusEmulationEnabled, p, nil)
-}
-
-// SetCPUThrottlingRateParams enables CPU throttling to emulate slow CPUs.
-type SetCPUThrottlingRateParams struct {
- Rate float64 `json:"rate"` // Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
-}
-
-// SetCPUThrottlingRate enables CPU throttling to emulate slow CPUs.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setCPUThrottlingRate
-//
-// parameters:
-// rate - Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
-func SetCPUThrottlingRate(rate float64) *SetCPUThrottlingRateParams {
- return &SetCPUThrottlingRateParams{
- Rate: rate,
- }
-}
-
-// Do executes Emulation.setCPUThrottlingRate against the provided context.
-func (p *SetCPUThrottlingRateParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCPUThrottlingRate, p, nil)
-}
-
-// SetDefaultBackgroundColorOverrideParams sets or clears an override of the
-// default background color of the frame. This override is used if the content
-// does not specify one.
-type SetDefaultBackgroundColorOverrideParams struct {
- Color *cdp.RGBA `json:"color,omitempty"` // RGBA of the default background color. If not specified, any existing override will be cleared.
-}
-
-// SetDefaultBackgroundColorOverride sets or clears an override of the
-// default background color of the frame. This override is used if the content
-// does not specify one.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDefaultBackgroundColorOverride
-//
-// parameters:
-func SetDefaultBackgroundColorOverride() *SetDefaultBackgroundColorOverrideParams {
- return &SetDefaultBackgroundColorOverrideParams{}
-}
-
-// WithColor rGBA of the default background color. If not specified, any
-// existing override will be cleared.
-func (p SetDefaultBackgroundColorOverrideParams) WithColor(color *cdp.RGBA) *SetDefaultBackgroundColorOverrideParams {
- p.Color = color
- return &p
-}
-
-// Do executes Emulation.setDefaultBackgroundColorOverride against the provided context.
-func (p *SetDefaultBackgroundColorOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDefaultBackgroundColorOverride, p, nil)
-}
-
-// SetDeviceMetricsOverrideParams overrides the values of device screen
-// dimensions (window.screen.width, window.screen.height, window.innerWidth,
-// window.innerHeight, and "device-width"/"device-height"-related CSS media
-// query results).
-type SetDeviceMetricsOverrideParams struct {
- Width int64 `json:"width"` // Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
- Height int64 `json:"height"` // Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
- DeviceScaleFactor float64 `json:"deviceScaleFactor"` // Overriding device scale factor value. 0 disables the override.
- Mobile bool `json:"mobile"` // Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
- Scale float64 `json:"scale,omitempty"` // Scale to apply to resulting view image.
- ScreenWidth int64 `json:"screenWidth,omitempty"` // Overriding screen width value in pixels (minimum 0, maximum 10000000).
- ScreenHeight int64 `json:"screenHeight,omitempty"` // Overriding screen height value in pixels (minimum 0, maximum 10000000).
- PositionX int64 `json:"positionX,omitempty"` // Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
- PositionY int64 `json:"positionY,omitempty"` // Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
- DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"` // Do not set visible view size, rely upon explicit setVisibleSize call.
- ScreenOrientation *ScreenOrientation `json:"screenOrientation,omitempty"` // Screen orientation override.
- Viewport *page.Viewport `json:"viewport,omitempty"` // If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
- DisplayFeature *DisplayFeature `json:"displayFeature,omitempty"` // If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.
-}
-
-// SetDeviceMetricsOverride overrides the values of device screen dimensions
-// (window.screen.width, window.screen.height, window.innerWidth,
-// window.innerHeight, and "device-width"/"device-height"-related CSS media
-// query results).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride
-//
-// parameters:
-// width - Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
-// height - Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
-// deviceScaleFactor - Overriding device scale factor value. 0 disables the override.
-// mobile - Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
-func SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool) *SetDeviceMetricsOverrideParams {
- return &SetDeviceMetricsOverrideParams{
- Width: width,
- Height: height,
- DeviceScaleFactor: deviceScaleFactor,
- Mobile: mobile,
- }
-}
-
-// WithScale scale to apply to resulting view image.
-func (p SetDeviceMetricsOverrideParams) WithScale(scale float64) *SetDeviceMetricsOverrideParams {
- p.Scale = scale
- return &p
-}
-
-// WithScreenWidth overriding screen width value in pixels (minimum 0,
-// maximum 10000000).
-func (p SetDeviceMetricsOverrideParams) WithScreenWidth(screenWidth int64) *SetDeviceMetricsOverrideParams {
- p.ScreenWidth = screenWidth
- return &p
-}
-
-// WithScreenHeight overriding screen height value in pixels (minimum 0,
-// maximum 10000000).
-func (p SetDeviceMetricsOverrideParams) WithScreenHeight(screenHeight int64) *SetDeviceMetricsOverrideParams {
- p.ScreenHeight = screenHeight
- return &p
-}
-
-// WithPositionX overriding view X position on screen in pixels (minimum 0,
-// maximum 10000000).
-func (p SetDeviceMetricsOverrideParams) WithPositionX(positionX int64) *SetDeviceMetricsOverrideParams {
- p.PositionX = positionX
- return &p
-}
-
-// WithPositionY overriding view Y position on screen in pixels (minimum 0,
-// maximum 10000000).
-func (p SetDeviceMetricsOverrideParams) WithPositionY(positionY int64) *SetDeviceMetricsOverrideParams {
- p.PositionY = positionY
- return &p
-}
-
-// WithDontSetVisibleSize do not set visible view size, rely upon explicit
-// setVisibleSize call.
-func (p SetDeviceMetricsOverrideParams) WithDontSetVisibleSize(dontSetVisibleSize bool) *SetDeviceMetricsOverrideParams {
- p.DontSetVisibleSize = dontSetVisibleSize
- return &p
-}
-
-// WithScreenOrientation screen orientation override.
-func (p SetDeviceMetricsOverrideParams) WithScreenOrientation(screenOrientation *ScreenOrientation) *SetDeviceMetricsOverrideParams {
- p.ScreenOrientation = screenOrientation
- return &p
-}
-
-// WithViewport if set, the visible area of the page will be overridden to
-// this viewport. This viewport change is not observed by the page, e.g.
-// viewport-relative elements do not change positions.
-func (p SetDeviceMetricsOverrideParams) WithViewport(viewport *page.Viewport) *SetDeviceMetricsOverrideParams {
- p.Viewport = viewport
- return &p
-}
-
-// WithDisplayFeature if set, the display feature of a multi-segment screen.
-// If not set, multi-segment support is turned-off.
-func (p SetDeviceMetricsOverrideParams) WithDisplayFeature(displayFeature *DisplayFeature) *SetDeviceMetricsOverrideParams {
- p.DisplayFeature = displayFeature
- return &p
-}
-
-// Do executes Emulation.setDeviceMetricsOverride against the provided context.
-func (p *SetDeviceMetricsOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDeviceMetricsOverride, p, nil)
-}
-
-// SetScrollbarsHiddenParams [no description].
-type SetScrollbarsHiddenParams struct {
- Hidden bool `json:"hidden"` // Whether scrollbars should be always hidden.
-}
-
-// SetScrollbarsHidden [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScrollbarsHidden
-//
-// parameters:
-// hidden - Whether scrollbars should be always hidden.
-func SetScrollbarsHidden(hidden bool) *SetScrollbarsHiddenParams {
- return &SetScrollbarsHiddenParams{
- Hidden: hidden,
- }
-}
-
-// Do executes Emulation.setScrollbarsHidden against the provided context.
-func (p *SetScrollbarsHiddenParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetScrollbarsHidden, p, nil)
-}
-
-// SetDocumentCookieDisabledParams [no description].
-type SetDocumentCookieDisabledParams struct {
- Disabled bool `json:"disabled"` // Whether document.coookie API should be disabled.
-}
-
-// SetDocumentCookieDisabled [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDocumentCookieDisabled
-//
-// parameters:
-// disabled - Whether document.coookie API should be disabled.
-func SetDocumentCookieDisabled(disabled bool) *SetDocumentCookieDisabledParams {
- return &SetDocumentCookieDisabledParams{
- Disabled: disabled,
- }
-}
-
-// Do executes Emulation.setDocumentCookieDisabled against the provided context.
-func (p *SetDocumentCookieDisabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDocumentCookieDisabled, p, nil)
-}
-
-// SetEmitTouchEventsForMouseParams [no description].
-type SetEmitTouchEventsForMouseParams struct {
- Enabled bool `json:"enabled"` // Whether touch emulation based on mouse input should be enabled.
- Configuration SetEmitTouchEventsForMouseConfiguration `json:"configuration,omitempty"` // Touch/gesture events configuration. Default: current platform.
-}
-
-// SetEmitTouchEventsForMouse [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse
-//
-// parameters:
-// enabled - Whether touch emulation based on mouse input should be enabled.
-func SetEmitTouchEventsForMouse(enabled bool) *SetEmitTouchEventsForMouseParams {
- return &SetEmitTouchEventsForMouseParams{
- Enabled: enabled,
- }
-}
-
-// WithConfiguration touch/gesture events configuration. Default: current
-// platform.
-func (p SetEmitTouchEventsForMouseParams) WithConfiguration(configuration SetEmitTouchEventsForMouseConfiguration) *SetEmitTouchEventsForMouseParams {
- p.Configuration = configuration
- return &p
-}
-
-// Do executes Emulation.setEmitTouchEventsForMouse against the provided context.
-func (p *SetEmitTouchEventsForMouseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetEmitTouchEventsForMouse, p, nil)
-}
-
-// SetEmulatedMediaParams emulates the given media type or media feature for
-// CSS media queries.
-type SetEmulatedMediaParams struct {
- Media string `json:"media,omitempty"` // Media type to emulate. Empty string disables the override.
- Features []*MediaFeature `json:"features,omitempty"` // Media features to emulate.
-}
-
-// SetEmulatedMedia emulates the given media type or media feature for CSS
-// media queries.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedMedia
-//
-// parameters:
-func SetEmulatedMedia() *SetEmulatedMediaParams {
- return &SetEmulatedMediaParams{}
-}
-
-// WithMedia media type to emulate. Empty string disables the override.
-func (p SetEmulatedMediaParams) WithMedia(media string) *SetEmulatedMediaParams {
- p.Media = media
- return &p
-}
-
-// WithFeatures media features to emulate.
-func (p SetEmulatedMediaParams) WithFeatures(features []*MediaFeature) *SetEmulatedMediaParams {
- p.Features = features
- return &p
-}
-
-// Do executes Emulation.setEmulatedMedia against the provided context.
-func (p *SetEmulatedMediaParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetEmulatedMedia, p, nil)
-}
-
-// SetEmulatedVisionDeficiencyParams emulates the given vision deficiency.
-type SetEmulatedVisionDeficiencyParams struct {
- Type SetEmulatedVisionDeficiencyType `json:"type"` // Vision deficiency to emulate.
-}
-
-// SetEmulatedVisionDeficiency emulates the given vision deficiency.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency
-//
-// parameters:
-// type - Vision deficiency to emulate.
-func SetEmulatedVisionDeficiency(typeVal SetEmulatedVisionDeficiencyType) *SetEmulatedVisionDeficiencyParams {
- return &SetEmulatedVisionDeficiencyParams{
- Type: typeVal,
- }
-}
-
-// Do executes Emulation.setEmulatedVisionDeficiency against the provided context.
-func (p *SetEmulatedVisionDeficiencyParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetEmulatedVisionDeficiency, p, nil)
-}
-
-// SetGeolocationOverrideParams overrides the Geolocation Position or Error.
-// Omitting any of the parameters emulates position unavailable.
-type SetGeolocationOverrideParams struct {
- Latitude float64 `json:"latitude,omitempty"` // Mock latitude
- Longitude float64 `json:"longitude,omitempty"` // Mock longitude
- Accuracy float64 `json:"accuracy,omitempty"` // Mock accuracy
-}
-
-// SetGeolocationOverride overrides the Geolocation Position or Error.
-// Omitting any of the parameters emulates position unavailable.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setGeolocationOverride
-//
-// parameters:
-func SetGeolocationOverride() *SetGeolocationOverrideParams {
- return &SetGeolocationOverrideParams{}
-}
-
-// WithLatitude mock latitude.
-func (p SetGeolocationOverrideParams) WithLatitude(latitude float64) *SetGeolocationOverrideParams {
- p.Latitude = latitude
- return &p
-}
-
-// WithLongitude mock longitude.
-func (p SetGeolocationOverrideParams) WithLongitude(longitude float64) *SetGeolocationOverrideParams {
- p.Longitude = longitude
- return &p
-}
-
-// WithAccuracy mock accuracy.
-func (p SetGeolocationOverrideParams) WithAccuracy(accuracy float64) *SetGeolocationOverrideParams {
- p.Accuracy = accuracy
- return &p
-}
-
-// Do executes Emulation.setGeolocationOverride against the provided context.
-func (p *SetGeolocationOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetGeolocationOverride, p, nil)
-}
-
-// SetIdleOverrideParams overrides the Idle state.
-type SetIdleOverrideParams struct {
- IsUserActive bool `json:"isUserActive"` // Mock isUserActive
- IsScreenUnlocked bool `json:"isScreenUnlocked"` // Mock isScreenUnlocked
-}
-
-// SetIdleOverride overrides the Idle state.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setIdleOverride
-//
-// parameters:
-// isUserActive - Mock isUserActive
-// isScreenUnlocked - Mock isScreenUnlocked
-func SetIdleOverride(isUserActive bool, isScreenUnlocked bool) *SetIdleOverrideParams {
- return &SetIdleOverrideParams{
- IsUserActive: isUserActive,
- IsScreenUnlocked: isScreenUnlocked,
- }
-}
-
-// Do executes Emulation.setIdleOverride against the provided context.
-func (p *SetIdleOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetIdleOverride, p, nil)
-}
-
-// ClearIdleOverrideParams clears Idle state overrides.
-type ClearIdleOverrideParams struct{}
-
-// ClearIdleOverride clears Idle state overrides.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearIdleOverride
-func ClearIdleOverride() *ClearIdleOverrideParams {
- return &ClearIdleOverrideParams{}
-}
-
-// Do executes Emulation.clearIdleOverride against the provided context.
-func (p *ClearIdleOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearIdleOverride, nil, nil)
-}
-
-// SetPageScaleFactorParams sets a specified page scale factor.
-type SetPageScaleFactorParams struct {
- PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor.
-}
-
-// SetPageScaleFactor sets a specified page scale factor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setPageScaleFactor
-//
-// parameters:
-// pageScaleFactor - Page scale factor.
-func SetPageScaleFactor(pageScaleFactor float64) *SetPageScaleFactorParams {
- return &SetPageScaleFactorParams{
- PageScaleFactor: pageScaleFactor,
- }
-}
-
-// Do executes Emulation.setPageScaleFactor against the provided context.
-func (p *SetPageScaleFactorParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPageScaleFactor, p, nil)
-}
-
-// SetScriptExecutionDisabledParams switches script execution in the page.
-type SetScriptExecutionDisabledParams struct {
- Value bool `json:"value"` // Whether script execution should be disabled in the page.
-}
-
-// SetScriptExecutionDisabled switches script execution in the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScriptExecutionDisabled
-//
-// parameters:
-// value - Whether script execution should be disabled in the page.
-func SetScriptExecutionDisabled(value bool) *SetScriptExecutionDisabledParams {
- return &SetScriptExecutionDisabledParams{
- Value: value,
- }
-}
-
-// Do executes Emulation.setScriptExecutionDisabled against the provided context.
-func (p *SetScriptExecutionDisabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetScriptExecutionDisabled, p, nil)
-}
-
-// SetTouchEmulationEnabledParams enables touch on platforms which do not
-// support them.
-type SetTouchEmulationEnabledParams struct {
- Enabled bool `json:"enabled"` // Whether the touch event emulation should be enabled.
- MaxTouchPoints int64 `json:"maxTouchPoints,omitempty"` // Maximum touch points supported. Defaults to one.
-}
-
-// SetTouchEmulationEnabled enables touch on platforms which do not support
-// them.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTouchEmulationEnabled
-//
-// parameters:
-// enabled - Whether the touch event emulation should be enabled.
-func SetTouchEmulationEnabled(enabled bool) *SetTouchEmulationEnabledParams {
- return &SetTouchEmulationEnabledParams{
- Enabled: enabled,
- }
-}
-
-// WithMaxTouchPoints maximum touch points supported. Defaults to one.
-func (p SetTouchEmulationEnabledParams) WithMaxTouchPoints(maxTouchPoints int64) *SetTouchEmulationEnabledParams {
- p.MaxTouchPoints = maxTouchPoints
- return &p
-}
-
-// Do executes Emulation.setTouchEmulationEnabled against the provided context.
-func (p *SetTouchEmulationEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetTouchEmulationEnabled, p, nil)
-}
-
-// SetVirtualTimePolicyParams turns on virtual time for all frames (replacing
-// real-time with a synthetic time source) and sets the current virtual time
-// policy. Note this supersedes any previous time budget.
-type SetVirtualTimePolicyParams struct {
- Policy VirtualTimePolicy `json:"policy"`
- Budget float64 `json:"budget,omitempty"` // If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
- MaxVirtualTimeTaskStarvationCount int64 `json:"maxVirtualTimeTaskStarvationCount,omitempty"` // If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
- WaitForNavigation bool `json:"waitForNavigation,omitempty"` // If set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.
- InitialVirtualTime *cdp.TimeSinceEpoch `json:"initialVirtualTime,omitempty"` // If set, base::Time::Now will be overridden to initially return this value.
-}
-
-// SetVirtualTimePolicy turns on virtual time for all frames (replacing
-// real-time with a synthetic time source) and sets the current virtual time
-// policy. Note this supersedes any previous time budget.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setVirtualTimePolicy
-//
-// parameters:
-// policy
-func SetVirtualTimePolicy(policy VirtualTimePolicy) *SetVirtualTimePolicyParams {
- return &SetVirtualTimePolicyParams{
- Policy: policy,
- }
-}
-
-// WithBudget if set, after this many virtual milliseconds have elapsed
-// virtual time will be paused and a virtualTimeBudgetExpired event is sent.
-func (p SetVirtualTimePolicyParams) WithBudget(budget float64) *SetVirtualTimePolicyParams {
- p.Budget = budget
- return &p
-}
-
-// WithMaxVirtualTimeTaskStarvationCount if set this specifies the maximum
-// number of tasks that can be run before virtual is forced forwards to prevent
-// deadlock.
-func (p SetVirtualTimePolicyParams) WithMaxVirtualTimeTaskStarvationCount(maxVirtualTimeTaskStarvationCount int64) *SetVirtualTimePolicyParams {
- p.MaxVirtualTimeTaskStarvationCount = maxVirtualTimeTaskStarvationCount
- return &p
-}
-
-// WithWaitForNavigation if set the virtual time policy change should be
-// deferred until any frame starts navigating. Note any previous deferred policy
-// change is superseded.
-func (p SetVirtualTimePolicyParams) WithWaitForNavigation(waitForNavigation bool) *SetVirtualTimePolicyParams {
- p.WaitForNavigation = waitForNavigation
- return &p
-}
-
-// WithInitialVirtualTime if set, base::Time::Now will be overridden to
-// initially return this value.
-func (p SetVirtualTimePolicyParams) WithInitialVirtualTime(initialVirtualTime *cdp.TimeSinceEpoch) *SetVirtualTimePolicyParams {
- p.InitialVirtualTime = initialVirtualTime
- return &p
-}
-
-// SetVirtualTimePolicyReturns return values.
-type SetVirtualTimePolicyReturns struct {
- VirtualTimeTicksBase float64 `json:"virtualTimeTicksBase,omitempty"` // Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
-}
-
-// Do executes Emulation.setVirtualTimePolicy against the provided context.
-//
-// returns:
-// virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
-func (p *SetVirtualTimePolicyParams) Do(ctx context.Context) (virtualTimeTicksBase float64, err error) {
- // execute
- var res SetVirtualTimePolicyReturns
- err = cdp.Execute(ctx, CommandSetVirtualTimePolicy, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.VirtualTimeTicksBase, nil
-}
-
-// SetLocaleOverrideParams overrides default host system locale with the
-// specified one.
-type SetLocaleOverrideParams struct {
- Locale string `json:"locale,omitempty"` // ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.
-}
-
-// SetLocaleOverride overrides default host system locale with the specified
-// one.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setLocaleOverride
-//
-// parameters:
-func SetLocaleOverride() *SetLocaleOverrideParams {
- return &SetLocaleOverrideParams{}
-}
-
-// WithLocale iCU style C locale (e.g. "en_US"). If not specified or empty,
-// disables the override and restores default host system locale.
-func (p SetLocaleOverrideParams) WithLocale(locale string) *SetLocaleOverrideParams {
- p.Locale = locale
- return &p
-}
-
-// Do executes Emulation.setLocaleOverride against the provided context.
-func (p *SetLocaleOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetLocaleOverride, p, nil)
-}
-
-// SetTimezoneOverrideParams overrides default host system timezone with the
-// specified one.
-type SetTimezoneOverrideParams struct {
- TimezoneID string `json:"timezoneId"` // The timezone identifier. If empty, disables the override and restores default host system timezone.
-}
-
-// SetTimezoneOverride overrides default host system timezone with the
-// specified one.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTimezoneOverride
-//
-// parameters:
-// timezoneID - The timezone identifier. If empty, disables the override and restores default host system timezone.
-func SetTimezoneOverride(timezoneID string) *SetTimezoneOverrideParams {
- return &SetTimezoneOverrideParams{
- TimezoneID: timezoneID,
- }
-}
-
-// Do executes Emulation.setTimezoneOverride against the provided context.
-func (p *SetTimezoneOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetTimezoneOverride, p, nil)
-}
-
-// SetDisabledImageTypesParams [no description].
-type SetDisabledImageTypesParams struct {
- ImageTypes []DisabledImageType `json:"imageTypes"` // Image types to disable.
-}
-
-// SetDisabledImageTypes [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDisabledImageTypes
-//
-// parameters:
-// imageTypes - Image types to disable.
-func SetDisabledImageTypes(imageTypes []DisabledImageType) *SetDisabledImageTypesParams {
- return &SetDisabledImageTypesParams{
- ImageTypes: imageTypes,
- }
-}
-
-// Do executes Emulation.setDisabledImageTypes against the provided context.
-func (p *SetDisabledImageTypesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDisabledImageTypes, p, nil)
-}
-
-// SetUserAgentOverrideParams allows overriding user agent with the given
-// string.
-type SetUserAgentOverrideParams struct {
- UserAgent string `json:"userAgent"` // User agent to use.
- AcceptLanguage string `json:"acceptLanguage,omitempty"` // Browser langugage to emulate.
- Platform string `json:"platform,omitempty"` // The platform navigator.platform should return.
- UserAgentMetadata *UserAgentMetadata `json:"userAgentMetadata,omitempty"` // To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
-}
-
-// SetUserAgentOverride allows overriding user agent with the given string.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setUserAgentOverride
-//
-// parameters:
-// userAgent - User agent to use.
-func SetUserAgentOverride(userAgent string) *SetUserAgentOverrideParams {
- return &SetUserAgentOverrideParams{
- UserAgent: userAgent,
- }
-}
-
-// WithAcceptLanguage browser langugage to emulate.
-func (p SetUserAgentOverrideParams) WithAcceptLanguage(acceptLanguage string) *SetUserAgentOverrideParams {
- p.AcceptLanguage = acceptLanguage
- return &p
-}
-
-// WithPlatform the platform navigator.platform should return.
-func (p SetUserAgentOverrideParams) WithPlatform(platform string) *SetUserAgentOverrideParams {
- p.Platform = platform
- return &p
-}
-
-// WithUserAgentMetadata to be sent in Sec-CH-UA-* headers and returned in
-// navigator.userAgentData.
-func (p SetUserAgentOverrideParams) WithUserAgentMetadata(userAgentMetadata *UserAgentMetadata) *SetUserAgentOverrideParams {
- p.UserAgentMetadata = userAgentMetadata
- return &p
-}
-
-// Do executes Emulation.setUserAgentOverride against the provided context.
-func (p *SetUserAgentOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetUserAgentOverride, p, nil)
-}
-
-// Command names.
-const (
- CommandCanEmulate = "Emulation.canEmulate"
- CommandClearDeviceMetricsOverride = "Emulation.clearDeviceMetricsOverride"
- CommandClearGeolocationOverride = "Emulation.clearGeolocationOverride"
- CommandResetPageScaleFactor = "Emulation.resetPageScaleFactor"
- CommandSetFocusEmulationEnabled = "Emulation.setFocusEmulationEnabled"
- CommandSetCPUThrottlingRate = "Emulation.setCPUThrottlingRate"
- CommandSetDefaultBackgroundColorOverride = "Emulation.setDefaultBackgroundColorOverride"
- CommandSetDeviceMetricsOverride = "Emulation.setDeviceMetricsOverride"
- CommandSetScrollbarsHidden = "Emulation.setScrollbarsHidden"
- CommandSetDocumentCookieDisabled = "Emulation.setDocumentCookieDisabled"
- CommandSetEmitTouchEventsForMouse = "Emulation.setEmitTouchEventsForMouse"
- CommandSetEmulatedMedia = "Emulation.setEmulatedMedia"
- CommandSetEmulatedVisionDeficiency = "Emulation.setEmulatedVisionDeficiency"
- CommandSetGeolocationOverride = "Emulation.setGeolocationOverride"
- CommandSetIdleOverride = "Emulation.setIdleOverride"
- CommandClearIdleOverride = "Emulation.clearIdleOverride"
- CommandSetPageScaleFactor = "Emulation.setPageScaleFactor"
- CommandSetScriptExecutionDisabled = "Emulation.setScriptExecutionDisabled"
- CommandSetTouchEmulationEnabled = "Emulation.setTouchEmulationEnabled"
- CommandSetVirtualTimePolicy = "Emulation.setVirtualTimePolicy"
- CommandSetLocaleOverride = "Emulation.setLocaleOverride"
- CommandSetTimezoneOverride = "Emulation.setTimezoneOverride"
- CommandSetDisabledImageTypes = "Emulation.setDisabledImageTypes"
- CommandSetUserAgentOverride = "Emulation.setUserAgentOverride"
-)
diff --git a/vendor/github.com/chromedp/cdproto/emulation/events.go b/vendor/github.com/chromedp/cdproto/emulation/events.go
deleted file mode 100644
index c8b0419e26c..00000000000
--- a/vendor/github.com/chromedp/cdproto/emulation/events.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package emulation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventVirtualTimeBudgetExpired notification sent after the virtual time
-// budget for the current VirtualTimePolicy has run out.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#event-virtualTimeBudgetExpired
-type EventVirtualTimeBudgetExpired struct{}
diff --git a/vendor/github.com/chromedp/cdproto/emulation/types.go b/vendor/github.com/chromedp/cdproto/emulation/types.go
deleted file mode 100644
index 172a6ada94b..00000000000
--- a/vendor/github.com/chromedp/cdproto/emulation/types.go
+++ /dev/null
@@ -1,354 +0,0 @@
-package emulation
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// ScreenOrientation screen orientation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-ScreenOrientation
-type ScreenOrientation struct {
- Type OrientationType `json:"type"` // Orientation type.
- Angle int64 `json:"angle"` // Orientation angle.
-}
-
-// DisplayFeature [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-DisplayFeature
-type DisplayFeature struct {
- Orientation DisplayFeatureOrientation `json:"orientation"` // Orientation of a display feature in relation to screen
- Offset int64 `json:"offset"` // The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.
- MaskLength int64 `json:"maskLength"` // A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.
-}
-
-// MediaFeature [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-MediaFeature
-type MediaFeature struct {
- Name string `json:"name"`
- Value string `json:"value"`
-}
-
-// VirtualTimePolicy advance: If the scheduler runs out of immediate work,
-// the virtual time base may fast forward to allow the next delayed task (if
-// any) to run; pause: The virtual time base may not advance;
-// pauseIfNetworkFetchesPending: The virtual time base may not advance if there
-// are any pending resource fetches.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-VirtualTimePolicy
-type VirtualTimePolicy string
-
-// String returns the VirtualTimePolicy as string value.
-func (t VirtualTimePolicy) String() string {
- return string(t)
-}
-
-// VirtualTimePolicy values.
-const (
- VirtualTimePolicyAdvance VirtualTimePolicy = "advance"
- VirtualTimePolicyPause VirtualTimePolicy = "pause"
- VirtualTimePolicyPauseIfNetworkFetchesPending VirtualTimePolicy = "pauseIfNetworkFetchesPending"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t VirtualTimePolicy) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t VirtualTimePolicy) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch VirtualTimePolicy(in.String()) {
- case VirtualTimePolicyAdvance:
- *t = VirtualTimePolicyAdvance
- case VirtualTimePolicyPause:
- *t = VirtualTimePolicyPause
- case VirtualTimePolicyPauseIfNetworkFetchesPending:
- *t = VirtualTimePolicyPauseIfNetworkFetchesPending
-
- default:
- in.AddError(errors.New("unknown VirtualTimePolicy value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *VirtualTimePolicy) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// UserAgentBrandVersion used to specify User Agent Cient Hints to emulate.
-// See https://wicg.github.io/ua-client-hints.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentBrandVersion
-type UserAgentBrandVersion struct {
- Brand string `json:"brand"`
- Version string `json:"version"`
-}
-
-// UserAgentMetadata used to specify User Agent Cient Hints to emulate. See
-// https://wicg.github.io/ua-client-hints Missing optional values will be filled
-// in by the target with what it would normally use.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentMetadata
-type UserAgentMetadata struct {
- Brands []*UserAgentBrandVersion `json:"brands,omitempty"`
- FullVersion string `json:"fullVersion,omitempty"`
- Platform string `json:"platform"`
- PlatformVersion string `json:"platformVersion"`
- Architecture string `json:"architecture"`
- Model string `json:"model"`
- Mobile bool `json:"mobile"`
-}
-
-// DisabledImageType enum of image types that can be disabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-DisabledImageType
-type DisabledImageType string
-
-// String returns the DisabledImageType as string value.
-func (t DisabledImageType) String() string {
- return string(t)
-}
-
-// DisabledImageType values.
-const (
- DisabledImageTypeAvif DisabledImageType = "avif"
- DisabledImageTypeJxl DisabledImageType = "jxl"
- DisabledImageTypeWebp DisabledImageType = "webp"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DisabledImageType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DisabledImageType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DisabledImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DisabledImageType(in.String()) {
- case DisabledImageTypeAvif:
- *t = DisabledImageTypeAvif
- case DisabledImageTypeJxl:
- *t = DisabledImageTypeJxl
- case DisabledImageTypeWebp:
- *t = DisabledImageTypeWebp
-
- default:
- in.AddError(errors.New("unknown DisabledImageType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DisabledImageType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// OrientationType orientation type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-ScreenOrientation
-type OrientationType string
-
-// String returns the OrientationType as string value.
-func (t OrientationType) String() string {
- return string(t)
-}
-
-// OrientationType values.
-const (
- OrientationTypePortraitPrimary OrientationType = "portraitPrimary"
- OrientationTypePortraitSecondary OrientationType = "portraitSecondary"
- OrientationTypeLandscapePrimary OrientationType = "landscapePrimary"
- OrientationTypeLandscapeSecondary OrientationType = "landscapeSecondary"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t OrientationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t OrientationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch OrientationType(in.String()) {
- case OrientationTypePortraitPrimary:
- *t = OrientationTypePortraitPrimary
- case OrientationTypePortraitSecondary:
- *t = OrientationTypePortraitSecondary
- case OrientationTypeLandscapePrimary:
- *t = OrientationTypeLandscapePrimary
- case OrientationTypeLandscapeSecondary:
- *t = OrientationTypeLandscapeSecondary
-
- default:
- in.AddError(errors.New("unknown OrientationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *OrientationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DisplayFeatureOrientation orientation of a display feature in relation to
-// screen.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-DisplayFeature
-type DisplayFeatureOrientation string
-
-// String returns the DisplayFeatureOrientation as string value.
-func (t DisplayFeatureOrientation) String() string {
- return string(t)
-}
-
-// DisplayFeatureOrientation values.
-const (
- DisplayFeatureOrientationVertical DisplayFeatureOrientation = "vertical"
- DisplayFeatureOrientationHorizontal DisplayFeatureOrientation = "horizontal"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DisplayFeatureOrientation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DisplayFeatureOrientation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DisplayFeatureOrientation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DisplayFeatureOrientation(in.String()) {
- case DisplayFeatureOrientationVertical:
- *t = DisplayFeatureOrientationVertical
- case DisplayFeatureOrientationHorizontal:
- *t = DisplayFeatureOrientationHorizontal
-
- default:
- in.AddError(errors.New("unknown DisplayFeatureOrientation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DisplayFeatureOrientation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetEmitTouchEventsForMouseConfiguration touch/gesture events
-// configuration. Default: current platform.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse
-type SetEmitTouchEventsForMouseConfiguration string
-
-// String returns the SetEmitTouchEventsForMouseConfiguration as string value.
-func (t SetEmitTouchEventsForMouseConfiguration) String() string {
- return string(t)
-}
-
-// SetEmitTouchEventsForMouseConfiguration values.
-const (
- SetEmitTouchEventsForMouseConfigurationMobile SetEmitTouchEventsForMouseConfiguration = "mobile"
- SetEmitTouchEventsForMouseConfigurationDesktop SetEmitTouchEventsForMouseConfiguration = "desktop"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetEmitTouchEventsForMouseConfiguration) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetEmitTouchEventsForMouseConfiguration) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetEmitTouchEventsForMouseConfiguration(in.String()) {
- case SetEmitTouchEventsForMouseConfigurationMobile:
- *t = SetEmitTouchEventsForMouseConfigurationMobile
- case SetEmitTouchEventsForMouseConfigurationDesktop:
- *t = SetEmitTouchEventsForMouseConfigurationDesktop
-
- default:
- in.AddError(errors.New("unknown SetEmitTouchEventsForMouseConfiguration value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetEmulatedVisionDeficiencyType vision deficiency to emulate.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency
-type SetEmulatedVisionDeficiencyType string
-
-// String returns the SetEmulatedVisionDeficiencyType as string value.
-func (t SetEmulatedVisionDeficiencyType) String() string {
- return string(t)
-}
-
-// SetEmulatedVisionDeficiencyType values.
-const (
- SetEmulatedVisionDeficiencyTypeNone SetEmulatedVisionDeficiencyType = "none"
- SetEmulatedVisionDeficiencyTypeAchromatopsia SetEmulatedVisionDeficiencyType = "achromatopsia"
- SetEmulatedVisionDeficiencyTypeBlurredVision SetEmulatedVisionDeficiencyType = "blurredVision"
- SetEmulatedVisionDeficiencyTypeDeuteranopia SetEmulatedVisionDeficiencyType = "deuteranopia"
- SetEmulatedVisionDeficiencyTypeProtanopia SetEmulatedVisionDeficiencyType = "protanopia"
- SetEmulatedVisionDeficiencyTypeTritanopia SetEmulatedVisionDeficiencyType = "tritanopia"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetEmulatedVisionDeficiencyType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetEmulatedVisionDeficiencyType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetEmulatedVisionDeficiencyType(in.String()) {
- case SetEmulatedVisionDeficiencyTypeNone:
- *t = SetEmulatedVisionDeficiencyTypeNone
- case SetEmulatedVisionDeficiencyTypeAchromatopsia:
- *t = SetEmulatedVisionDeficiencyTypeAchromatopsia
- case SetEmulatedVisionDeficiencyTypeBlurredVision:
- *t = SetEmulatedVisionDeficiencyTypeBlurredVision
- case SetEmulatedVisionDeficiencyTypeDeuteranopia:
- *t = SetEmulatedVisionDeficiencyTypeDeuteranopia
- case SetEmulatedVisionDeficiencyTypeProtanopia:
- *t = SetEmulatedVisionDeficiencyTypeProtanopia
- case SetEmulatedVisionDeficiencyTypeTritanopia:
- *t = SetEmulatedVisionDeficiencyTypeTritanopia
-
- default:
- in.AddError(errors.New("unknown SetEmulatedVisionDeficiencyType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetEmulatedVisionDeficiencyType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/fetch/easyjson.go b/vendor/github.com/chromedp/cdproto/fetch/easyjson.go
deleted file mode 100644
index 83bc5be47e7..00000000000
--- a/vendor/github.com/chromedp/cdproto/fetch/easyjson.go
+++ /dev/null
@@ -1,1540 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package fetch
-
-import (
- json "encoding/json"
- io "github.com/chromedp/cdproto/io"
- network "github.com/chromedp/cdproto/network"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(in *jlexer.Lexer, out *TakeResponseBodyAsStreamReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "stream":
- out.Stream = io.StreamHandle(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(out *jwriter.Writer, in TakeResponseBodyAsStreamReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Stream != "" {
- const prefix string = ",\"stream\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Stream))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeResponseBodyAsStreamReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeResponseBodyAsStreamReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeResponseBodyAsStreamReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeResponseBodyAsStreamReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(in *jlexer.Lexer, out *TakeResponseBodyAsStreamParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(out *jwriter.Writer, in TakeResponseBodyAsStreamParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeResponseBodyAsStreamParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeResponseBodyAsStreamParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeResponseBodyAsStreamParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeResponseBodyAsStreamParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(in *jlexer.Lexer, out *RequestPattern) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "urlPattern":
- out.URLPattern = string(in.String())
- case "resourceType":
- (out.ResourceType).UnmarshalEasyJSON(in)
- case "requestStage":
- (out.RequestStage).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(out *jwriter.Writer, in RequestPattern) {
- out.RawByte('{')
- first := true
- _ = first
- if in.URLPattern != "" {
- const prefix string = ",\"urlPattern\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.URLPattern))
- }
- if in.ResourceType != "" {
- const prefix string = ",\"resourceType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.ResourceType).MarshalEasyJSON(out)
- }
- if in.RequestStage != "" {
- const prefix string = ",\"requestStage\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.RequestStage).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestPattern) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestPattern) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestPattern) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestPattern) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(in *jlexer.Lexer, out *HeaderEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(out *jwriter.Writer, in HeaderEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HeaderEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HeaderEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HeaderEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HeaderEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(in *jlexer.Lexer, out *GetResponseBodyReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- case "base64Encoded":
- out.Base64encoded = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(out *jwriter.Writer, in GetResponseBodyReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Body != "" {
- const prefix string = ",\"body\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- if in.Base64encoded {
- const prefix string = ",\"base64Encoded\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Base64encoded))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(in *jlexer.Lexer, out *GetResponseBodyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(out *jwriter.Writer, in GetResponseBodyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(in *jlexer.Lexer, out *FulfillRequestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "responseCode":
- out.ResponseCode = int64(in.Int64())
- case "responseHeaders":
- if in.IsNull() {
- in.Skip()
- out.ResponseHeaders = nil
- } else {
- in.Delim('[')
- if out.ResponseHeaders == nil {
- if !in.IsDelim(']') {
- out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
- } else {
- out.ResponseHeaders = []*HeaderEntry{}
- }
- } else {
- out.ResponseHeaders = (out.ResponseHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *HeaderEntry
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(HeaderEntry)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.ResponseHeaders = append(out.ResponseHeaders, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "binaryResponseHeaders":
- out.BinaryResponseHeaders = string(in.String())
- case "body":
- out.Body = string(in.String())
- case "responsePhrase":
- out.ResponsePhrase = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(out *jwriter.Writer, in FulfillRequestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"responseCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.ResponseCode))
- }
- if len(in.ResponseHeaders) != 0 {
- const prefix string = ",\"responseHeaders\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v2, v3 := range in.ResponseHeaders {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.BinaryResponseHeaders != "" {
- const prefix string = ",\"binaryResponseHeaders\":"
- out.RawString(prefix)
- out.String(string(in.BinaryResponseHeaders))
- }
- if in.Body != "" {
- const prefix string = ",\"body\":"
- out.RawString(prefix)
- out.String(string(in.Body))
- }
- if in.ResponsePhrase != "" {
- const prefix string = ",\"responsePhrase\":"
- out.RawString(prefix)
- out.String(string(in.ResponsePhrase))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FulfillRequestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FulfillRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FulfillRequestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FulfillRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(in *jlexer.Lexer, out *FailRequestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "errorReason":
- (out.ErrorReason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(out *jwriter.Writer, in FailRequestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"errorReason\":"
- out.RawString(prefix)
- (in.ErrorReason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FailRequestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FailRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FailRequestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FailRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(in *jlexer.Lexer, out *EventRequestPaused) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(network.Request)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "resourceType":
- (out.ResourceType).UnmarshalEasyJSON(in)
- case "responseErrorReason":
- (out.ResponseErrorReason).UnmarshalEasyJSON(in)
- case "responseStatusCode":
- out.ResponseStatusCode = int64(in.Int64())
- case "responseHeaders":
- if in.IsNull() {
- in.Skip()
- out.ResponseHeaders = nil
- } else {
- in.Delim('[')
- if out.ResponseHeaders == nil {
- if !in.IsDelim(']') {
- out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
- } else {
- out.ResponseHeaders = []*HeaderEntry{}
- }
- } else {
- out.ResponseHeaders = (out.ResponseHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *HeaderEntry
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(HeaderEntry)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.ResponseHeaders = append(out.ResponseHeaders, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "networkId":
- out.NetworkID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(out *jwriter.Writer, in EventRequestPaused) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"resourceType\":"
- out.RawString(prefix)
- (in.ResourceType).MarshalEasyJSON(out)
- }
- if in.ResponseErrorReason != "" {
- const prefix string = ",\"responseErrorReason\":"
- out.RawString(prefix)
- (in.ResponseErrorReason).MarshalEasyJSON(out)
- }
- if in.ResponseStatusCode != 0 {
- const prefix string = ",\"responseStatusCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.ResponseStatusCode))
- }
- if len(in.ResponseHeaders) != 0 {
- const prefix string = ",\"responseHeaders\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v5, v6 := range in.ResponseHeaders {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.NetworkID != "" {
- const prefix string = ",\"networkId\":"
- out.RawString(prefix)
- out.String(string(in.NetworkID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventRequestPaused) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventRequestPaused) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventRequestPaused) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventRequestPaused) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(in *jlexer.Lexer, out *EventAuthRequired) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(network.Request)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "resourceType":
- (out.ResourceType).UnmarshalEasyJSON(in)
- case "authChallenge":
- if in.IsNull() {
- in.Skip()
- out.AuthChallenge = nil
- } else {
- if out.AuthChallenge == nil {
- out.AuthChallenge = new(AuthChallenge)
- }
- (*out.AuthChallenge).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(out *jwriter.Writer, in EventAuthRequired) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"resourceType\":"
- out.RawString(prefix)
- (in.ResourceType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"authChallenge\":"
- out.RawString(prefix)
- if in.AuthChallenge == nil {
- out.RawString("null")
- } else {
- (*in.AuthChallenge).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAuthRequired) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAuthRequired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAuthRequired) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAuthRequired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "patterns":
- if in.IsNull() {
- in.Skip()
- out.Patterns = nil
- } else {
- in.Delim('[')
- if out.Patterns == nil {
- if !in.IsDelim(']') {
- out.Patterns = make([]*RequestPattern, 0, 8)
- } else {
- out.Patterns = []*RequestPattern{}
- }
- } else {
- out.Patterns = (out.Patterns)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *RequestPattern
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(RequestPattern)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Patterns = append(out.Patterns, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "handleAuthRequests":
- out.HandleAuthRequests = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Patterns) != 0 {
- const prefix string = ",\"patterns\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Patterns {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.HandleAuthRequests {
- const prefix string = ",\"handleAuthRequests\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.HandleAuthRequests))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(in *jlexer.Lexer, out *ContinueWithAuthParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "authChallengeResponse":
- if in.IsNull() {
- in.Skip()
- out.AuthChallengeResponse = nil
- } else {
- if out.AuthChallengeResponse == nil {
- out.AuthChallengeResponse = new(AuthChallengeResponse)
- }
- (*out.AuthChallengeResponse).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(out *jwriter.Writer, in ContinueWithAuthParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"authChallengeResponse\":"
- out.RawString(prefix)
- if in.AuthChallengeResponse == nil {
- out.RawString("null")
- } else {
- (*in.AuthChallengeResponse).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContinueWithAuthParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContinueWithAuthParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContinueWithAuthParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContinueWithAuthParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out *ContinueRequestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "url":
- out.URL = string(in.String())
- case "method":
- out.Method = string(in.String())
- case "postData":
- out.PostData = string(in.String())
- case "headers":
- if in.IsNull() {
- in.Skip()
- out.Headers = nil
- } else {
- in.Delim('[')
- if out.Headers == nil {
- if !in.IsDelim(']') {
- out.Headers = make([]*HeaderEntry, 0, 8)
- } else {
- out.Headers = []*HeaderEntry{}
- }
- } else {
- out.Headers = (out.Headers)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *HeaderEntry
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(HeaderEntry)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Headers = append(out.Headers, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(out *jwriter.Writer, in ContinueRequestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.Method != "" {
- const prefix string = ",\"method\":"
- out.RawString(prefix)
- out.String(string(in.Method))
- }
- if in.PostData != "" {
- const prefix string = ",\"postData\":"
- out.RawString(prefix)
- out.String(string(in.PostData))
- }
- if len(in.Headers) != 0 {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v11, v12 := range in.Headers {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContinueRequestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContinueRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContinueRequestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContinueRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(in *jlexer.Lexer, out *AuthChallengeResponse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "response":
- (out.Response).UnmarshalEasyJSON(in)
- case "username":
- out.Username = string(in.String())
- case "password":
- out.Password = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(out *jwriter.Writer, in AuthChallengeResponse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix[1:])
- (in.Response).MarshalEasyJSON(out)
- }
- if in.Username != "" {
- const prefix string = ",\"username\":"
- out.RawString(prefix)
- out.String(string(in.Username))
- }
- if in.Password != "" {
- const prefix string = ",\"password\":"
- out.RawString(prefix)
- out.String(string(in.Password))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(in *jlexer.Lexer, out *AuthChallenge) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "source":
- (out.Source).UnmarshalEasyJSON(in)
- case "origin":
- out.Origin = string(in.String())
- case "scheme":
- out.Scheme = string(in.String())
- case "realm":
- out.Realm = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(out *jwriter.Writer, in AuthChallenge) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Source != "" {
- const prefix string = ",\"source\":"
- first = false
- out.RawString(prefix[1:])
- (in.Source).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"origin\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"scheme\":"
- out.RawString(prefix)
- out.String(string(in.Scheme))
- }
- {
- const prefix string = ",\"realm\":"
- out.RawString(prefix)
- out.String(string(in.Realm))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AuthChallenge) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AuthChallenge) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/fetch/events.go b/vendor/github.com/chromedp/cdproto/fetch/events.go
deleted file mode 100644
index e49a99b3b69..00000000000
--- a/vendor/github.com/chromedp/cdproto/fetch/events.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package fetch
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/network"
-)
-
-// EventRequestPaused issued when the domain is enabled and the request URL
-// matches the specified filter. The request is paused until the client responds
-// with one of continueRequest, failRequest or fulfillRequest. The stage of the
-// request can be determined by presence of responseErrorReason and
-// responseStatusCode -- the request is at the response stage if either of these
-// fields is present and in the request stage otherwise.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#event-requestPaused
-type EventRequestPaused struct {
- RequestID RequestID `json:"requestId"` // Each request the page makes will have a unique id.
- Request *network.Request `json:"request"` // The details of the request.
- FrameID cdp.FrameID `json:"frameId"` // The id of the frame that initiated the request.
- ResourceType network.ResourceType `json:"resourceType"` // How the requested resource will be used.
- ResponseErrorReason network.ErrorReason `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage.
- ResponseStatusCode int64 `json:"responseStatusCode,omitempty"` // Response code if intercepted at response stage.
- ResponseHeaders []*HeaderEntry `json:"responseHeaders,omitempty"` // Response headers if intercepted at the response stage.
- NetworkID RequestID `json:"networkId,omitempty"` // If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, then this networkId will be the same as the requestId present in the requestWillBeSent event.
-}
-
-// EventAuthRequired issued when the domain is enabled with
-// handleAuthRequests set to true. The request is paused until client responds
-// with continueWithAuth.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#event-authRequired
-type EventAuthRequired struct {
- RequestID RequestID `json:"requestId"` // Each request the page makes will have a unique id.
- Request *network.Request `json:"request"` // The details of the request.
- FrameID cdp.FrameID `json:"frameId"` // The id of the frame that initiated the request.
- ResourceType network.ResourceType `json:"resourceType"` // How the requested resource will be used.
- AuthChallenge *AuthChallenge `json:"authChallenge"` // Details of the Authorization Challenge encountered. If this is set, client should respond with continueRequest that contains AuthChallengeResponse.
-}
diff --git a/vendor/github.com/chromedp/cdproto/fetch/fetch.go b/vendor/github.com/chromedp/cdproto/fetch/fetch.go
deleted file mode 100644
index 8404c4b0011..00000000000
--- a/vendor/github.com/chromedp/cdproto/fetch/fetch.go
+++ /dev/null
@@ -1,356 +0,0 @@
-// Package fetch provides the Chrome DevTools Protocol
-// commands, types, and events for the Fetch domain.
-//
-// A domain for letting clients substitute browser's network layer with
-// client code.
-//
-// Generated by the cdproto-gen command.
-package fetch
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/io"
- "github.com/chromedp/cdproto/network"
-)
-
-// DisableParams disables the fetch domain.
-type DisableParams struct{}
-
-// Disable disables the fetch domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Fetch.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables issuing of requestPaused events. A request will be
-// paused until client calls one of failRequest, fulfillRequest or
-// continueRequest/continueWithAuth.
-type EnableParams struct {
- Patterns []*RequestPattern `json:"patterns,omitempty"` // If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected.
- HandleAuthRequests bool `json:"handleAuthRequests,omitempty"` // If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.
-}
-
-// Enable enables issuing of requestPaused events. A request will be paused
-// until client calls one of failRequest, fulfillRequest or
-// continueRequest/continueWithAuth.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-enable
-//
-// parameters:
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// WithPatterns if specified, only requests matching any of these patterns
-// will produce fetchRequested event and will be paused until clients response.
-// If not set, all requests will be affected.
-func (p EnableParams) WithPatterns(patterns []*RequestPattern) *EnableParams {
- p.Patterns = patterns
- return &p
-}
-
-// WithHandleAuthRequests if true, authRequired events will be issued and
-// requests will be paused expecting a call to continueWithAuth.
-func (p EnableParams) WithHandleAuthRequests(handleAuthRequests bool) *EnableParams {
- p.HandleAuthRequests = handleAuthRequests
- return &p
-}
-
-// Do executes Fetch.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, p, nil)
-}
-
-// FailRequestParams causes the request to fail with specified reason.
-type FailRequestParams struct {
- RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
- ErrorReason network.ErrorReason `json:"errorReason"` // Causes the request to fail with the given reason.
-}
-
-// FailRequest causes the request to fail with specified reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-failRequest
-//
-// parameters:
-// requestID - An id the client received in requestPaused event.
-// errorReason - Causes the request to fail with the given reason.
-func FailRequest(requestID RequestID, errorReason network.ErrorReason) *FailRequestParams {
- return &FailRequestParams{
- RequestID: requestID,
- ErrorReason: errorReason,
- }
-}
-
-// Do executes Fetch.failRequest against the provided context.
-func (p *FailRequestParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandFailRequest, p, nil)
-}
-
-// FulfillRequestParams provides response to the request.
-type FulfillRequestParams struct {
- RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
- ResponseCode int64 `json:"responseCode"` // An HTTP response code.
- ResponseHeaders []*HeaderEntry `json:"responseHeaders,omitempty"` // Response headers.
- BinaryResponseHeaders string `json:"binaryResponseHeaders,omitempty"` // Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.
- Body string `json:"body,omitempty"` // A response body.
- ResponsePhrase string `json:"responsePhrase,omitempty"` // A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
-}
-
-// FulfillRequest provides response to the request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-fulfillRequest
-//
-// parameters:
-// requestID - An id the client received in requestPaused event.
-// responseCode - An HTTP response code.
-func FulfillRequest(requestID RequestID, responseCode int64) *FulfillRequestParams {
- return &FulfillRequestParams{
- RequestID: requestID,
- ResponseCode: responseCode,
- }
-}
-
-// WithResponseHeaders response headers.
-func (p FulfillRequestParams) WithResponseHeaders(responseHeaders []*HeaderEntry) *FulfillRequestParams {
- p.ResponseHeaders = responseHeaders
- return &p
-}
-
-// WithBinaryResponseHeaders alternative way of specifying response headers
-// as a \0-separated series of name: value pairs. Prefer the above method unless
-// you need to represent some non-UTF8 values that can't be transmitted over the
-// protocol as text.
-func (p FulfillRequestParams) WithBinaryResponseHeaders(binaryResponseHeaders string) *FulfillRequestParams {
- p.BinaryResponseHeaders = binaryResponseHeaders
- return &p
-}
-
-// WithBody a response body.
-func (p FulfillRequestParams) WithBody(body string) *FulfillRequestParams {
- p.Body = body
- return &p
-}
-
-// WithResponsePhrase a textual representation of responseCode. If absent, a
-// standard phrase matching responseCode is used.
-func (p FulfillRequestParams) WithResponsePhrase(responsePhrase string) *FulfillRequestParams {
- p.ResponsePhrase = responsePhrase
- return &p
-}
-
-// Do executes Fetch.fulfillRequest against the provided context.
-func (p *FulfillRequestParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandFulfillRequest, p, nil)
-}
-
-// ContinueRequestParams continues the request, optionally modifying some of
-// its parameters.
-type ContinueRequestParams struct {
- RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
- URL string `json:"url,omitempty"` // If set, the request url will be modified in a way that's not observable by page.
- Method string `json:"method,omitempty"` // If set, the request method is overridden.
- PostData string `json:"postData,omitempty"` // If set, overrides the post data in the request.
- Headers []*HeaderEntry `json:"headers,omitempty"` // If set, overrides the request headers.
-}
-
-// ContinueRequest continues the request, optionally modifying some of its
-// parameters.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueRequest
-//
-// parameters:
-// requestID - An id the client received in requestPaused event.
-func ContinueRequest(requestID RequestID) *ContinueRequestParams {
- return &ContinueRequestParams{
- RequestID: requestID,
- }
-}
-
-// WithURL if set, the request url will be modified in a way that's not
-// observable by page.
-func (p ContinueRequestParams) WithURL(url string) *ContinueRequestParams {
- p.URL = url
- return &p
-}
-
-// WithMethod if set, the request method is overridden.
-func (p ContinueRequestParams) WithMethod(method string) *ContinueRequestParams {
- p.Method = method
- return &p
-}
-
-// WithPostData if set, overrides the post data in the request.
-func (p ContinueRequestParams) WithPostData(postData string) *ContinueRequestParams {
- p.PostData = postData
- return &p
-}
-
-// WithHeaders if set, overrides the request headers.
-func (p ContinueRequestParams) WithHeaders(headers []*HeaderEntry) *ContinueRequestParams {
- p.Headers = headers
- return &p
-}
-
-// Do executes Fetch.continueRequest against the provided context.
-func (p *ContinueRequestParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandContinueRequest, p, nil)
-}
-
-// ContinueWithAuthParams continues a request supplying authChallengeResponse
-// following authRequired event.
-type ContinueWithAuthParams struct {
- RequestID RequestID `json:"requestId"` // An id the client received in authRequired event.
- AuthChallengeResponse *AuthChallengeResponse `json:"authChallengeResponse"` // Response to with an authChallenge.
-}
-
-// ContinueWithAuth continues a request supplying authChallengeResponse
-// following authRequired event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueWithAuth
-//
-// parameters:
-// requestID - An id the client received in authRequired event.
-// authChallengeResponse - Response to with an authChallenge.
-func ContinueWithAuth(requestID RequestID, authChallengeResponse *AuthChallengeResponse) *ContinueWithAuthParams {
- return &ContinueWithAuthParams{
- RequestID: requestID,
- AuthChallengeResponse: authChallengeResponse,
- }
-}
-
-// Do executes Fetch.continueWithAuth against the provided context.
-func (p *ContinueWithAuthParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandContinueWithAuth, p, nil)
-}
-
-// GetResponseBodyParams causes the body of the response to be received from
-// the server and returned as a single string. May only be issued for a request
-// that is paused in the Response stage and is mutually exclusive with
-// takeResponseBodyForInterceptionAsStream. Calling other methods that affect
-// the request or disabling fetch domain before body is received results in an
-// undefined behavior.
-type GetResponseBodyParams struct {
- RequestID RequestID `json:"requestId"` // Identifier for the intercepted request to get body for.
-}
-
-// GetResponseBody causes the body of the response to be received from the
-// server and returned as a single string. May only be issued for a request that
-// is paused in the Response stage and is mutually exclusive with
-// takeResponseBodyForInterceptionAsStream. Calling other methods that affect
-// the request or disabling fetch domain before body is received results in an
-// undefined behavior.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-getResponseBody
-//
-// parameters:
-// requestID - Identifier for the intercepted request to get body for.
-func GetResponseBody(requestID RequestID) *GetResponseBodyParams {
- return &GetResponseBodyParams{
- RequestID: requestID,
- }
-}
-
-// GetResponseBodyReturns return values.
-type GetResponseBodyReturns struct {
- Body string `json:"body,omitempty"` // Response body.
- Base64encoded bool `json:"base64Encoded,omitempty"` // True, if content was sent as base64.
-}
-
-// Do executes Fetch.getResponseBody against the provided context.
-//
-// returns:
-// body - Response body.
-func (p *GetResponseBodyParams) Do(ctx context.Context) (body []byte, err error) {
- // execute
- var res GetResponseBodyReturns
- err = cdp.Execute(ctx, CommandGetResponseBody, p, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- if res.Base64encoded {
- dec, err = base64.StdEncoding.DecodeString(res.Body)
- if err != nil {
- return nil, err
- }
- } else {
- dec = []byte(res.Body)
- }
- return dec, nil
-}
-
-// TakeResponseBodyAsStreamParams returns a handle to the stream representing
-// the response body. The request must be paused in the HeadersReceived stage.
-// Note that after this command the request can't be continued as is -- client
-// either needs to cancel it or to provide the response body. The stream only
-// supports sequential read, IO.read will fail if the position is specified.
-// This method is mutually exclusive with getResponseBody. Calling other methods
-// that affect the request or disabling fetch domain before body is received
-// results in an undefined behavior.
-type TakeResponseBodyAsStreamParams struct {
- RequestID RequestID `json:"requestId"`
-}
-
-// TakeResponseBodyAsStream returns a handle to the stream representing the
-// response body. The request must be paused in the HeadersReceived stage. Note
-// that after this command the request can't be continued as is -- client either
-// needs to cancel it or to provide the response body. The stream only supports
-// sequential read, IO.read will fail if the position is specified. This method
-// is mutually exclusive with getResponseBody. Calling other methods that affect
-// the request or disabling fetch domain before body is received results in an
-// undefined behavior.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-takeResponseBodyAsStream
-//
-// parameters:
-// requestID
-func TakeResponseBodyAsStream(requestID RequestID) *TakeResponseBodyAsStreamParams {
- return &TakeResponseBodyAsStreamParams{
- RequestID: requestID,
- }
-}
-
-// TakeResponseBodyAsStreamReturns return values.
-type TakeResponseBodyAsStreamReturns struct {
- Stream io.StreamHandle `json:"stream,omitempty"`
-}
-
-// Do executes Fetch.takeResponseBodyAsStream against the provided context.
-//
-// returns:
-// stream
-func (p *TakeResponseBodyAsStreamParams) Do(ctx context.Context) (stream io.StreamHandle, err error) {
- // execute
- var res TakeResponseBodyAsStreamReturns
- err = cdp.Execute(ctx, CommandTakeResponseBodyAsStream, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Stream, nil
-}
-
-// Command names.
-const (
- CommandDisable = "Fetch.disable"
- CommandEnable = "Fetch.enable"
- CommandFailRequest = "Fetch.failRequest"
- CommandFulfillRequest = "Fetch.fulfillRequest"
- CommandContinueRequest = "Fetch.continueRequest"
- CommandContinueWithAuth = "Fetch.continueWithAuth"
- CommandGetResponseBody = "Fetch.getResponseBody"
- CommandTakeResponseBodyAsStream = "Fetch.takeResponseBodyAsStream"
-)
diff --git a/vendor/github.com/chromedp/cdproto/fetch/types.go b/vendor/github.com/chromedp/cdproto/fetch/types.go
deleted file mode 100644
index f938dbdfd4f..00000000000
--- a/vendor/github.com/chromedp/cdproto/fetch/types.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package fetch
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/network"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// RequestID unique request identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-RequestId
-type RequestID string
-
-// String returns the RequestID as string value.
-func (t RequestID) String() string {
- return string(t)
-}
-
-// RequestStage stages of the request to handle. Request will intercept
-// before the request is sent. Response will intercept after the response is
-// received (but before response body is received).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-RequestStage
-type RequestStage string
-
-// String returns the RequestStage as string value.
-func (t RequestStage) String() string {
- return string(t)
-}
-
-// RequestStage values.
-const (
- RequestStageRequest RequestStage = "Request"
- RequestStageResponse RequestStage = "Response"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t RequestStage) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t RequestStage) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *RequestStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch RequestStage(in.String()) {
- case RequestStageRequest:
- *t = RequestStageRequest
- case RequestStageResponse:
- *t = RequestStageResponse
-
- default:
- in.AddError(errors.New("unknown RequestStage value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *RequestStage) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// RequestPattern [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-RequestPattern
-type RequestPattern struct {
- URLPattern string `json:"urlPattern,omitempty"` // Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*".
- ResourceType network.ResourceType `json:"resourceType,omitempty"` // If set, only requests for matching resource types will be intercepted.
- RequestStage RequestStage `json:"requestStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request.
-}
-
-// HeaderEntry response HTTP header entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-HeaderEntry
-type HeaderEntry struct {
- Name string `json:"name"`
- Value string `json:"value"`
-}
-
-// AuthChallenge authorization challenge for HTTP status code 401 or 407.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-AuthChallenge
-type AuthChallenge struct {
- Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge.
- Origin string `json:"origin"` // Origin of the challenger.
- Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest
- Realm string `json:"realm"` // The realm of the challenge. May be empty.
-}
-
-// AuthChallengeResponse response to an AuthChallenge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-AuthChallengeResponse
-type AuthChallengeResponse struct {
- Response AuthChallengeResponseResponse `json:"response"` // The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
- Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
- Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
-}
-
-// AuthChallengeSource source of the authentication challenge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-AuthChallenge
-type AuthChallengeSource string
-
-// String returns the AuthChallengeSource as string value.
-func (t AuthChallengeSource) String() string {
- return string(t)
-}
-
-// AuthChallengeSource values.
-const (
- AuthChallengeSourceServer AuthChallengeSource = "Server"
- AuthChallengeSourceProxy AuthChallengeSource = "Proxy"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthChallengeSource) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthChallengeSource(in.String()) {
- case AuthChallengeSourceServer:
- *t = AuthChallengeSourceServer
- case AuthChallengeSourceProxy:
- *t = AuthChallengeSourceProxy
-
- default:
- in.AddError(errors.New("unknown AuthChallengeSource value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthChallengeSource) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AuthChallengeResponseResponse the decision on what to do in response to
-// the authorization challenge. Default means deferring to the default behavior
-// of the net stack, which will likely either the Cancel authentication or
-// display a popup dialog box.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#type-AuthChallengeResponse
-type AuthChallengeResponseResponse string
-
-// String returns the AuthChallengeResponseResponse as string value.
-func (t AuthChallengeResponseResponse) String() string {
- return string(t)
-}
-
-// AuthChallengeResponseResponse values.
-const (
- AuthChallengeResponseResponseDefault AuthChallengeResponseResponse = "Default"
- AuthChallengeResponseResponseCancelAuth AuthChallengeResponseResponse = "CancelAuth"
- AuthChallengeResponseResponseProvideCredentials AuthChallengeResponseResponse = "ProvideCredentials"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthChallengeResponseResponse) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthChallengeResponseResponse(in.String()) {
- case AuthChallengeResponseResponseDefault:
- *t = AuthChallengeResponseResponseDefault
- case AuthChallengeResponseResponseCancelAuth:
- *t = AuthChallengeResponseResponseCancelAuth
- case AuthChallengeResponseResponseProvideCredentials:
- *t = AuthChallengeResponseResponseProvideCredentials
-
- default:
- in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthChallengeResponseResponse) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go b/vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go
deleted file mode 100644
index 2cd5b50ead9..00000000000
--- a/vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package headlessexperimental
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental(in *jlexer.Lexer, out *ScreenshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "format":
- (out.Format).UnmarshalEasyJSON(in)
- case "quality":
- out.Quality = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental(out *jwriter.Writer, in ScreenshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Format != "" {
- const prefix string = ",\"format\":"
- first = false
- out.RawString(prefix[1:])
- (in.Format).MarshalEasyJSON(out)
- }
- if in.Quality != 0 {
- const prefix string = ",\"quality\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Quality))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScreenshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScreenshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(in *jlexer.Lexer, out *BeginFrameReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "hasDamage":
- out.HasDamage = bool(in.Bool())
- case "screenshotData":
- out.ScreenshotData = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(out *jwriter.Writer, in BeginFrameReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.HasDamage {
- const prefix string = ",\"hasDamage\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.HasDamage))
- }
- if in.ScreenshotData != "" {
- const prefix string = ",\"screenshotData\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ScreenshotData))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BeginFrameReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BeginFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BeginFrameReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BeginFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(in *jlexer.Lexer, out *BeginFrameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameTimeTicks":
- out.FrameTimeTicks = float64(in.Float64())
- case "interval":
- out.Interval = float64(in.Float64())
- case "noDisplayUpdates":
- out.NoDisplayUpdates = bool(in.Bool())
- case "screenshot":
- if in.IsNull() {
- in.Skip()
- out.Screenshot = nil
- } else {
- if out.Screenshot == nil {
- out.Screenshot = new(ScreenshotParams)
- }
- (*out.Screenshot).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(out *jwriter.Writer, in BeginFrameParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FrameTimeTicks != 0 {
- const prefix string = ",\"frameTimeTicks\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.FrameTimeTicks))
- }
- if in.Interval != 0 {
- const prefix string = ",\"interval\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Interval))
- }
- if in.NoDisplayUpdates {
- const prefix string = ",\"noDisplayUpdates\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.NoDisplayUpdates))
- }
- if in.Screenshot != nil {
- const prefix string = ",\"screenshot\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Screenshot).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BeginFrameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BeginFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BeginFrameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BeginFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go b/vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go
deleted file mode 100644
index 774abcfeb42..00000000000
--- a/vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Package headlessexperimental provides the Chrome DevTools Protocol
-// commands, types, and events for the HeadlessExperimental domain.
-//
-// This domain provides experimental commands only supported in headless
-// mode.
-//
-// Generated by the cdproto-gen command.
-package headlessexperimental
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// BeginFrameParams sends a BeginFrame to the target and returns when the
-// frame was completed. Optionally captures a screenshot from the resulting
-// frame. Requires that the target was created with enabled BeginFrameControl.
-// Designed for use with --run-all-compositor-stages-before-draw, see also
-// https://goo.gl/3zHXhB for more background.
-type BeginFrameParams struct {
- FrameTimeTicks float64 `json:"frameTimeTicks,omitempty"` // Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
- Interval float64 `json:"interval,omitempty"` // The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
- NoDisplayUpdates bool `json:"noDisplayUpdates,omitempty"` // Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
- Screenshot *ScreenshotParams `json:"screenshot,omitempty"` // If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
-}
-
-// BeginFrame sends a BeginFrame to the target and returns when the frame was
-// completed. Optionally captures a screenshot from the resulting frame.
-// Requires that the target was created with enabled BeginFrameControl. Designed
-// for use with --run-all-compositor-stages-before-draw, see also
-// https://goo.gl/3zHXhB for more background.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-beginFrame
-//
-// parameters:
-func BeginFrame() *BeginFrameParams {
- return &BeginFrameParams{}
-}
-
-// WithFrameTimeTicks timestamp of this BeginFrame in Renderer TimeTicks
-// (milliseconds of uptime). If not set, the current time will be used.
-func (p BeginFrameParams) WithFrameTimeTicks(frameTimeTicks float64) *BeginFrameParams {
- p.FrameTimeTicks = frameTimeTicks
- return &p
-}
-
-// WithInterval the interval between BeginFrames that is reported to the
-// compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e.
-// about 16.666 milliseconds.
-func (p BeginFrameParams) WithInterval(interval float64) *BeginFrameParams {
- p.Interval = interval
- return &p
-}
-
-// WithNoDisplayUpdates whether updates should not be committed and drawn
-// onto the display. False by default. If true, only side effects of the
-// BeginFrame will be run, such as layout and animations, but any visual updates
-// may not be visible on the display or in screenshots.
-func (p BeginFrameParams) WithNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameParams {
- p.NoDisplayUpdates = noDisplayUpdates
- return &p
-}
-
-// WithScreenshot if set, a screenshot of the frame will be captured and
-// returned in the response. Otherwise, no screenshot will be captured. Note
-// that capturing a screenshot can fail, for example, during renderer
-// initialization. In such a case, no screenshot data will be returned.
-func (p BeginFrameParams) WithScreenshot(screenshot *ScreenshotParams) *BeginFrameParams {
- p.Screenshot = screenshot
- return &p
-}
-
-// BeginFrameReturns return values.
-type BeginFrameReturns struct {
- HasDamage bool `json:"hasDamage,omitempty"` // Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
- ScreenshotData string `json:"screenshotData,omitempty"` // Base64-encoded image data of the screenshot, if one was requested and successfully taken.
-}
-
-// Do executes HeadlessExperimental.beginFrame against the provided context.
-//
-// returns:
-// hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
-// screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken.
-func (p *BeginFrameParams) Do(ctx context.Context) (hasDamage bool, screenshotData []byte, err error) {
- // execute
- var res BeginFrameReturns
- err = cdp.Execute(ctx, CommandBeginFrame, p, &res)
- if err != nil {
- return false, nil, err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.ScreenshotData)
- if err != nil {
- return false, nil, err
- }
- return res.HasDamage, dec, nil
-}
-
-// DisableParams disables headless events for the target.
-type DisableParams struct{}
-
-// Disable disables headless events for the target.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes HeadlessExperimental.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables headless events for the target.
-type EnableParams struct{}
-
-// Enable enables headless events for the target.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes HeadlessExperimental.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// Command names.
-const (
- CommandBeginFrame = "HeadlessExperimental.beginFrame"
- CommandDisable = "HeadlessExperimental.disable"
- CommandEnable = "HeadlessExperimental.enable"
-)
diff --git a/vendor/github.com/chromedp/cdproto/headlessexperimental/types.go b/vendor/github.com/chromedp/cdproto/headlessexperimental/types.go
deleted file mode 100644
index 46fb1feb0d2..00000000000
--- a/vendor/github.com/chromedp/cdproto/headlessexperimental/types.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package headlessexperimental
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// ScreenshotParams encoding options for a screenshot.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#type-ScreenshotParams
-type ScreenshotParams struct {
- Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).
- Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
-}
-
-// ScreenshotParamsFormat image compression format (defaults to png).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#type-ScreenshotParams
-type ScreenshotParamsFormat string
-
-// String returns the ScreenshotParamsFormat as string value.
-func (t ScreenshotParamsFormat) String() string {
- return string(t)
-}
-
-// ScreenshotParamsFormat values.
-const (
- ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"
- ScreenshotParamsFormatPng ScreenshotParamsFormat = "png"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ScreenshotParamsFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ScreenshotParamsFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ScreenshotParamsFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ScreenshotParamsFormat(in.String()) {
- case ScreenshotParamsFormatJpeg:
- *t = ScreenshotParamsFormatJpeg
- case ScreenshotParamsFormatPng:
- *t = ScreenshotParamsFormatPng
-
- default:
- in.AddError(errors.New("unknown ScreenshotParamsFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ScreenshotParamsFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go b/vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go
deleted file mode 100644
index f943caa9b96..00000000000
--- a/vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go
+++ /dev/null
@@ -1,1856 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package heapprofiler
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler(in *jlexer.Lexer, out *TakeHeapSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "reportProgress":
- out.ReportProgress = bool(in.Bool())
- case "treatGlobalObjectsAsRoots":
- out.TreatGlobalObjectsAsRoots = bool(in.Bool())
- case "captureNumericValue":
- out.CaptureNumericValue = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler(out *jwriter.Writer, in TakeHeapSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ReportProgress {
- const prefix string = ",\"reportProgress\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.ReportProgress))
- }
- if in.TreatGlobalObjectsAsRoots {
- const prefix string = ",\"treatGlobalObjectsAsRoots\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.TreatGlobalObjectsAsRoots))
- }
- if in.CaptureNumericValue {
- const prefix string = ",\"captureNumericValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.CaptureNumericValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeHeapSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeHeapSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeHeapSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeHeapSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler1(in *jlexer.Lexer, out *StopTrackingHeapObjectsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "reportProgress":
- out.ReportProgress = bool(in.Bool())
- case "treatGlobalObjectsAsRoots":
- out.TreatGlobalObjectsAsRoots = bool(in.Bool())
- case "captureNumericValue":
- out.CaptureNumericValue = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1(out *jwriter.Writer, in StopTrackingHeapObjectsParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ReportProgress {
- const prefix string = ",\"reportProgress\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.ReportProgress))
- }
- if in.TreatGlobalObjectsAsRoots {
- const prefix string = ",\"treatGlobalObjectsAsRoots\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.TreatGlobalObjectsAsRoots))
- }
- if in.CaptureNumericValue {
- const prefix string = ",\"captureNumericValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.CaptureNumericValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler2(in *jlexer.Lexer, out *StopSamplingReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(SamplingHeapProfile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler2(out *jwriter.Writer, in StopSamplingReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopSamplingReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopSamplingReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopSamplingReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopSamplingReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler3(in *jlexer.Lexer, out *StopSamplingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler3(out *jwriter.Writer, in StopSamplingParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopSamplingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopSamplingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopSamplingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler4(in *jlexer.Lexer, out *StartTrackingHeapObjectsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "trackAllocations":
- out.TrackAllocations = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler4(out *jwriter.Writer, in StartTrackingHeapObjectsParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TrackAllocations {
- const prefix string = ",\"trackAllocations\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.TrackAllocations))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartTrackingHeapObjectsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartTrackingHeapObjectsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartTrackingHeapObjectsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartTrackingHeapObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler5(in *jlexer.Lexer, out *StartSamplingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "samplingInterval":
- out.SamplingInterval = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler5(out *jwriter.Writer, in StartSamplingParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SamplingInterval != 0 {
- const prefix string = ",\"samplingInterval\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.SamplingInterval))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartSamplingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartSamplingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartSamplingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler6(in *jlexer.Lexer, out *SamplingHeapProfileSample) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "size":
- out.Size = float64(in.Float64())
- case "nodeId":
- out.NodeID = int64(in.Int64())
- case "ordinal":
- out.Ordinal = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler6(out *jwriter.Writer, in SamplingHeapProfileSample) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Size))
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- {
- const prefix string = ",\"ordinal\":"
- out.RawString(prefix)
- out.Float64(float64(in.Ordinal))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SamplingHeapProfileSample) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SamplingHeapProfileSample) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SamplingHeapProfileSample) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SamplingHeapProfileSample) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler7(in *jlexer.Lexer, out *SamplingHeapProfileNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callFrame":
- if in.IsNull() {
- in.Skip()
- out.CallFrame = nil
- } else {
- if out.CallFrame == nil {
- out.CallFrame = new(runtime.CallFrame)
- }
- (*out.CallFrame).UnmarshalEasyJSON(in)
- }
- case "selfSize":
- out.SelfSize = float64(in.Float64())
- case "id":
- out.ID = int64(in.Int64())
- case "children":
- if in.IsNull() {
- in.Skip()
- out.Children = nil
- } else {
- in.Delim('[')
- if out.Children == nil {
- if !in.IsDelim(']') {
- out.Children = make([]*SamplingHeapProfileNode, 0, 8)
- } else {
- out.Children = []*SamplingHeapProfileNode{}
- }
- } else {
- out.Children = (out.Children)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *SamplingHeapProfileNode
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(SamplingHeapProfileNode)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Children = append(out.Children, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler7(out *jwriter.Writer, in SamplingHeapProfileNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"callFrame\":"
- out.RawString(prefix[1:])
- if in.CallFrame == nil {
- out.RawString("null")
- } else {
- (*in.CallFrame).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"selfSize\":"
- out.RawString(prefix)
- out.Float64(float64(in.SelfSize))
- }
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix)
- out.Int64(int64(in.ID))
- }
- {
- const prefix string = ",\"children\":"
- out.RawString(prefix)
- if in.Children == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Children {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SamplingHeapProfileNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SamplingHeapProfileNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SamplingHeapProfileNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SamplingHeapProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler8(in *jlexer.Lexer, out *SamplingHeapProfile) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "head":
- if in.IsNull() {
- in.Skip()
- out.Head = nil
- } else {
- if out.Head == nil {
- out.Head = new(SamplingHeapProfileNode)
- }
- (*out.Head).UnmarshalEasyJSON(in)
- }
- case "samples":
- if in.IsNull() {
- in.Skip()
- out.Samples = nil
- } else {
- in.Delim('[')
- if out.Samples == nil {
- if !in.IsDelim(']') {
- out.Samples = make([]*SamplingHeapProfileSample, 0, 8)
- } else {
- out.Samples = []*SamplingHeapProfileSample{}
- }
- } else {
- out.Samples = (out.Samples)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *SamplingHeapProfileSample
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(SamplingHeapProfileSample)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Samples = append(out.Samples, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler8(out *jwriter.Writer, in SamplingHeapProfile) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"head\":"
- out.RawString(prefix[1:])
- if in.Head == nil {
- out.RawString("null")
- } else {
- (*in.Head).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"samples\":"
- out.RawString(prefix)
- if in.Samples == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Samples {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SamplingHeapProfile) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SamplingHeapProfile) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SamplingHeapProfile) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SamplingHeapProfile) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler9(in *jlexer.Lexer, out *GetSamplingProfileReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(SamplingHeapProfile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler9(out *jwriter.Writer, in GetSamplingProfileReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSamplingProfileReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSamplingProfileReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSamplingProfileReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSamplingProfileReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler10(in *jlexer.Lexer, out *GetSamplingProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler10(out *jwriter.Writer, in GetSamplingProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSamplingProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSamplingProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSamplingProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSamplingProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler11(in *jlexer.Lexer, out *GetObjectByHeapObjectIDReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(runtime.RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler11(out *jwriter.Writer, in GetObjectByHeapObjectIDReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetObjectByHeapObjectIDReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetObjectByHeapObjectIDReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetObjectByHeapObjectIDReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetObjectByHeapObjectIDReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler12(in *jlexer.Lexer, out *GetObjectByHeapObjectIDParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = HeapSnapshotObjectID(in.String())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler12(out *jwriter.Writer, in GetObjectByHeapObjectIDParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetObjectByHeapObjectIDParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetObjectByHeapObjectIDParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetObjectByHeapObjectIDParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetObjectByHeapObjectIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler13(in *jlexer.Lexer, out *GetHeapObjectIDReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "heapSnapshotObjectId":
- out.HeapSnapshotObjectID = HeapSnapshotObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler13(out *jwriter.Writer, in GetHeapObjectIDReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.HeapSnapshotObjectID != "" {
- const prefix string = ",\"heapSnapshotObjectId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.HeapSnapshotObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHeapObjectIDReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHeapObjectIDReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHeapObjectIDReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHeapObjectIDReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler14(in *jlexer.Lexer, out *GetHeapObjectIDParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler14(out *jwriter.Writer, in GetHeapObjectIDParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHeapObjectIDParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHeapObjectIDParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHeapObjectIDParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHeapObjectIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler15(in *jlexer.Lexer, out *EventResetProfiles) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler15(out *jwriter.Writer, in EventResetProfiles) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventResetProfiles) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventResetProfiles) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventResetProfiles) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventResetProfiles) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler16(in *jlexer.Lexer, out *EventReportHeapSnapshotProgress) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "done":
- out.Done = int64(in.Int64())
- case "total":
- out.Total = int64(in.Int64())
- case "finished":
- out.Finished = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler16(out *jwriter.Writer, in EventReportHeapSnapshotProgress) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"done\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Done))
- }
- {
- const prefix string = ",\"total\":"
- out.RawString(prefix)
- out.Int64(int64(in.Total))
- }
- if in.Finished {
- const prefix string = ",\"finished\":"
- out.RawString(prefix)
- out.Bool(bool(in.Finished))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventReportHeapSnapshotProgress) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventReportHeapSnapshotProgress) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventReportHeapSnapshotProgress) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventReportHeapSnapshotProgress) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler17(in *jlexer.Lexer, out *EventLastSeenObjectID) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "lastSeenObjectId":
- out.LastSeenObjectID = int64(in.Int64())
- case "timestamp":
- out.Timestamp = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler17(out *jwriter.Writer, in EventLastSeenObjectID) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"lastSeenObjectId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.LastSeenObjectID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- out.Float64(float64(in.Timestamp))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLastSeenObjectID) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLastSeenObjectID) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLastSeenObjectID) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLastSeenObjectID) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler18(in *jlexer.Lexer, out *EventHeapStatsUpdate) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "statsUpdate":
- if in.IsNull() {
- in.Skip()
- out.StatsUpdate = nil
- } else {
- in.Delim('[')
- if out.StatsUpdate == nil {
- if !in.IsDelim(']') {
- out.StatsUpdate = make([]int64, 0, 8)
- } else {
- out.StatsUpdate = []int64{}
- }
- } else {
- out.StatsUpdate = (out.StatsUpdate)[:0]
- }
- for !in.IsDelim(']') {
- var v7 int64
- v7 = int64(in.Int64())
- out.StatsUpdate = append(out.StatsUpdate, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler18(out *jwriter.Writer, in EventHeapStatsUpdate) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"statsUpdate\":"
- out.RawString(prefix[1:])
- if in.StatsUpdate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.StatsUpdate {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventHeapStatsUpdate) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventHeapStatsUpdate) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventHeapStatsUpdate) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventHeapStatsUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler19(in *jlexer.Lexer, out *EventAddHeapSnapshotChunk) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "chunk":
- out.Chunk = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler19(out *jwriter.Writer, in EventAddHeapSnapshotChunk) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"chunk\":"
- out.RawString(prefix[1:])
- out.String(string(in.Chunk))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAddHeapSnapshotChunk) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAddHeapSnapshotChunk) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAddHeapSnapshotChunk) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAddHeapSnapshotChunk) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler20(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler20(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler21(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler21(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler22(in *jlexer.Lexer, out *CollectGarbageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler22(out *jwriter.Writer, in CollectGarbageParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CollectGarbageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CollectGarbageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CollectGarbageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CollectGarbageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler23(in *jlexer.Lexer, out *AddInspectedHeapObjectParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "heapObjectId":
- out.HeapObjectID = HeapSnapshotObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler23(out *jwriter.Writer, in AddInspectedHeapObjectParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"heapObjectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.HeapObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddInspectedHeapObjectParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddInspectedHeapObjectParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddInspectedHeapObjectParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddInspectedHeapObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler23(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/heapprofiler/events.go b/vendor/github.com/chromedp/cdproto/heapprofiler/events.go
deleted file mode 100644
index 172fbb83999..00000000000
--- a/vendor/github.com/chromedp/cdproto/heapprofiler/events.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package heapprofiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventAddHeapSnapshotChunk [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-addHeapSnapshotChunk
-type EventAddHeapSnapshotChunk struct {
- Chunk string `json:"chunk"`
-}
-
-// EventHeapStatsUpdate if heap objects tracking has been started then
-// backend may send update for one or more fragments.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-heapStatsUpdate
-type EventHeapStatsUpdate struct {
- StatsUpdate []int64 `json:"statsUpdate"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
-}
-
-// EventLastSeenObjectID if heap objects tracking has been started then
-// backend regularly sends a current value for last seen object id and
-// corresponding timestamp. If the were changes in the heap since last event
-// then one or more heapStatsUpdate events will be sent before a new
-// lastSeenObjectId event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-lastSeenObjectId
-type EventLastSeenObjectID struct {
- LastSeenObjectID int64 `json:"lastSeenObjectId"`
- Timestamp float64 `json:"timestamp"`
-}
-
-// EventReportHeapSnapshotProgress [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-reportHeapSnapshotProgress
-type EventReportHeapSnapshotProgress struct {
- Done int64 `json:"done"`
- Total int64 `json:"total"`
- Finished bool `json:"finished,omitempty"`
-}
-
-// EventResetProfiles [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-resetProfiles
-type EventResetProfiles struct{}
diff --git a/vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go b/vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go
deleted file mode 100644
index ebe23b3cd75..00000000000
--- a/vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go
+++ /dev/null
@@ -1,375 +0,0 @@
-// Package heapprofiler provides the Chrome DevTools Protocol
-// commands, types, and events for the HeapProfiler domain.
-//
-// Generated by the cdproto-gen command.
-package heapprofiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// AddInspectedHeapObjectParams enables console to refer to the node with
-// given id via $x (see Command Line API for more details $x functions).
-type AddInspectedHeapObjectParams struct {
- HeapObjectID HeapSnapshotObjectID `json:"heapObjectId"` // Heap snapshot object id to be accessible by means of $x command line API.
-}
-
-// AddInspectedHeapObject enables console to refer to the node with given id
-// via $x (see Command Line API for more details $x functions).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-addInspectedHeapObject
-//
-// parameters:
-// heapObjectID - Heap snapshot object id to be accessible by means of $x command line API.
-func AddInspectedHeapObject(heapObjectID HeapSnapshotObjectID) *AddInspectedHeapObjectParams {
- return &AddInspectedHeapObjectParams{
- HeapObjectID: heapObjectID,
- }
-}
-
-// Do executes HeapProfiler.addInspectedHeapObject against the provided context.
-func (p *AddInspectedHeapObjectParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandAddInspectedHeapObject, p, nil)
-}
-
-// CollectGarbageParams [no description].
-type CollectGarbageParams struct{}
-
-// CollectGarbage [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-collectGarbage
-func CollectGarbage() *CollectGarbageParams {
- return &CollectGarbageParams{}
-}
-
-// Do executes HeapProfiler.collectGarbage against the provided context.
-func (p *CollectGarbageParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCollectGarbage, nil, nil)
-}
-
-// DisableParams [no description].
-type DisableParams struct{}
-
-// Disable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes HeapProfiler.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams [no description].
-type EnableParams struct{}
-
-// Enable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes HeapProfiler.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetHeapObjectIDParams [no description].
-type GetHeapObjectIDParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to get heap object id for.
-}
-
-// GetHeapObjectID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getHeapObjectId
-//
-// parameters:
-// objectID - Identifier of the object to get heap object id for.
-func GetHeapObjectID(objectID runtime.RemoteObjectID) *GetHeapObjectIDParams {
- return &GetHeapObjectIDParams{
- ObjectID: objectID,
- }
-}
-
-// GetHeapObjectIDReturns return values.
-type GetHeapObjectIDReturns struct {
- HeapSnapshotObjectID HeapSnapshotObjectID `json:"heapSnapshotObjectId,omitempty"` // Id of the heap snapshot object corresponding to the passed remote object id.
-}
-
-// Do executes HeapProfiler.getHeapObjectId against the provided context.
-//
-// returns:
-// heapSnapshotObjectID - Id of the heap snapshot object corresponding to the passed remote object id.
-func (p *GetHeapObjectIDParams) Do(ctx context.Context) (heapSnapshotObjectID HeapSnapshotObjectID, err error) {
- // execute
- var res GetHeapObjectIDReturns
- err = cdp.Execute(ctx, CommandGetHeapObjectID, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.HeapSnapshotObjectID, nil
-}
-
-// GetObjectByHeapObjectIDParams [no description].
-type GetObjectByHeapObjectIDParams struct {
- ObjectID HeapSnapshotObjectID `json:"objectId"`
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
-}
-
-// GetObjectByHeapObjectID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getObjectByHeapObjectId
-//
-// parameters:
-// objectID
-func GetObjectByHeapObjectID(objectID HeapSnapshotObjectID) *GetObjectByHeapObjectIDParams {
- return &GetObjectByHeapObjectIDParams{
- ObjectID: objectID,
- }
-}
-
-// WithObjectGroup symbolic group name that can be used to release multiple
-// objects.
-func (p GetObjectByHeapObjectIDParams) WithObjectGroup(objectGroup string) *GetObjectByHeapObjectIDParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// GetObjectByHeapObjectIDReturns return values.
-type GetObjectByHeapObjectIDReturns struct {
- Result *runtime.RemoteObject `json:"result,omitempty"` // Evaluation result.
-}
-
-// Do executes HeapProfiler.getObjectByHeapObjectId against the provided context.
-//
-// returns:
-// result - Evaluation result.
-func (p *GetObjectByHeapObjectIDParams) Do(ctx context.Context) (result *runtime.RemoteObject, err error) {
- // execute
- var res GetObjectByHeapObjectIDReturns
- err = cdp.Execute(ctx, CommandGetObjectByHeapObjectID, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// GetSamplingProfileParams [no description].
-type GetSamplingProfileParams struct{}
-
-// GetSamplingProfile [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getSamplingProfile
-func GetSamplingProfile() *GetSamplingProfileParams {
- return &GetSamplingProfileParams{}
-}
-
-// GetSamplingProfileReturns return values.
-type GetSamplingProfileReturns struct {
- Profile *SamplingHeapProfile `json:"profile,omitempty"` // Return the sampling profile being collected.
-}
-
-// Do executes HeapProfiler.getSamplingProfile against the provided context.
-//
-// returns:
-// profile - Return the sampling profile being collected.
-func (p *GetSamplingProfileParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
- // execute
- var res GetSamplingProfileReturns
- err = cdp.Execute(ctx, CommandGetSamplingProfile, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// StartSamplingParams [no description].
-type StartSamplingParams struct {
- SamplingInterval float64 `json:"samplingInterval,omitempty"` // Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
-}
-
-// StartSampling [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startSampling
-//
-// parameters:
-func StartSampling() *StartSamplingParams {
- return &StartSamplingParams{}
-}
-
-// WithSamplingInterval average sample interval in bytes. Poisson
-// distribution is used for the intervals. The default value is 32768 bytes.
-func (p StartSamplingParams) WithSamplingInterval(samplingInterval float64) *StartSamplingParams {
- p.SamplingInterval = samplingInterval
- return &p
-}
-
-// Do executes HeapProfiler.startSampling against the provided context.
-func (p *StartSamplingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartSampling, p, nil)
-}
-
-// StartTrackingHeapObjectsParams [no description].
-type StartTrackingHeapObjectsParams struct {
- TrackAllocations bool `json:"trackAllocations,omitempty"`
-}
-
-// StartTrackingHeapObjects [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startTrackingHeapObjects
-//
-// parameters:
-func StartTrackingHeapObjects() *StartTrackingHeapObjectsParams {
- return &StartTrackingHeapObjectsParams{}
-}
-
-// WithTrackAllocations [no description].
-func (p StartTrackingHeapObjectsParams) WithTrackAllocations(trackAllocations bool) *StartTrackingHeapObjectsParams {
- p.TrackAllocations = trackAllocations
- return &p
-}
-
-// Do executes HeapProfiler.startTrackingHeapObjects against the provided context.
-func (p *StartTrackingHeapObjectsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartTrackingHeapObjects, p, nil)
-}
-
-// StopSamplingParams [no description].
-type StopSamplingParams struct{}
-
-// StopSampling [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopSampling
-func StopSampling() *StopSamplingParams {
- return &StopSamplingParams{}
-}
-
-// StopSamplingReturns return values.
-type StopSamplingReturns struct {
- Profile *SamplingHeapProfile `json:"profile,omitempty"` // Recorded sampling heap profile.
-}
-
-// Do executes HeapProfiler.stopSampling against the provided context.
-//
-// returns:
-// profile - Recorded sampling heap profile.
-func (p *StopSamplingParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
- // execute
- var res StopSamplingReturns
- err = cdp.Execute(ctx, CommandStopSampling, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// StopTrackingHeapObjectsParams [no description].
-type StopTrackingHeapObjectsParams struct {
- ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
- TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
- CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
-}
-
-// StopTrackingHeapObjects [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopTrackingHeapObjects
-//
-// parameters:
-func StopTrackingHeapObjects() *StopTrackingHeapObjectsParams {
- return &StopTrackingHeapObjectsParams{}
-}
-
-// WithReportProgress if true 'reportHeapSnapshotProgress' events will be
-// generated while snapshot is being taken when the tracking is stopped.
-func (p StopTrackingHeapObjectsParams) WithReportProgress(reportProgress bool) *StopTrackingHeapObjectsParams {
- p.ReportProgress = reportProgress
- return &p
-}
-
-// WithTreatGlobalObjectsAsRoots [no description].
-func (p StopTrackingHeapObjectsParams) WithTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *StopTrackingHeapObjectsParams {
- p.TreatGlobalObjectsAsRoots = treatGlobalObjectsAsRoots
- return &p
-}
-
-// WithCaptureNumericValue if true, numerical values are included in the
-// snapshot.
-func (p StopTrackingHeapObjectsParams) WithCaptureNumericValue(captureNumericValue bool) *StopTrackingHeapObjectsParams {
- p.CaptureNumericValue = captureNumericValue
- return &p
-}
-
-// Do executes HeapProfiler.stopTrackingHeapObjects against the provided context.
-func (p *StopTrackingHeapObjectsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopTrackingHeapObjects, p, nil)
-}
-
-// TakeHeapSnapshotParams [no description].
-type TakeHeapSnapshotParams struct {
- ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
- TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"` // If true, a raw snapshot without artificial roots will be generated
- CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
-}
-
-// TakeHeapSnapshot [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-takeHeapSnapshot
-//
-// parameters:
-func TakeHeapSnapshot() *TakeHeapSnapshotParams {
- return &TakeHeapSnapshotParams{}
-}
-
-// WithReportProgress if true 'reportHeapSnapshotProgress' events will be
-// generated while snapshot is being taken.
-func (p TakeHeapSnapshotParams) WithReportProgress(reportProgress bool) *TakeHeapSnapshotParams {
- p.ReportProgress = reportProgress
- return &p
-}
-
-// WithTreatGlobalObjectsAsRoots if true, a raw snapshot without artificial
-// roots will be generated.
-func (p TakeHeapSnapshotParams) WithTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *TakeHeapSnapshotParams {
- p.TreatGlobalObjectsAsRoots = treatGlobalObjectsAsRoots
- return &p
-}
-
-// WithCaptureNumericValue if true, numerical values are included in the
-// snapshot.
-func (p TakeHeapSnapshotParams) WithCaptureNumericValue(captureNumericValue bool) *TakeHeapSnapshotParams {
- p.CaptureNumericValue = captureNumericValue
- return &p
-}
-
-// Do executes HeapProfiler.takeHeapSnapshot against the provided context.
-func (p *TakeHeapSnapshotParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandTakeHeapSnapshot, p, nil)
-}
-
-// Command names.
-const (
- CommandAddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject"
- CommandCollectGarbage = "HeapProfiler.collectGarbage"
- CommandDisable = "HeapProfiler.disable"
- CommandEnable = "HeapProfiler.enable"
- CommandGetHeapObjectID = "HeapProfiler.getHeapObjectId"
- CommandGetObjectByHeapObjectID = "HeapProfiler.getObjectByHeapObjectId"
- CommandGetSamplingProfile = "HeapProfiler.getSamplingProfile"
- CommandStartSampling = "HeapProfiler.startSampling"
- CommandStartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"
- CommandStopSampling = "HeapProfiler.stopSampling"
- CommandStopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects"
- CommandTakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot"
-)
diff --git a/vendor/github.com/chromedp/cdproto/heapprofiler/types.go b/vendor/github.com/chromedp/cdproto/heapprofiler/types.go
deleted file mode 100644
index c4616395209..00000000000
--- a/vendor/github.com/chromedp/cdproto/heapprofiler/types.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package heapprofiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/runtime"
-)
-
-// HeapSnapshotObjectID heap snapshot object id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-HeapSnapshotObjectId
-type HeapSnapshotObjectID string
-
-// String returns the HeapSnapshotObjectID as string value.
-func (t HeapSnapshotObjectID) String() string {
- return string(t)
-}
-
-// SamplingHeapProfileNode sampling Heap Profile node. Holds callsite
-// information, allocation statistics and child nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfileNode
-type SamplingHeapProfileNode struct {
- CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
- SelfSize float64 `json:"selfSize"` // Allocations size in bytes for the node excluding children.
- ID int64 `json:"id"` // Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
- Children []*SamplingHeapProfileNode `json:"children"` // Child nodes.
-}
-
-// SamplingHeapProfileSample a single sample from a sampling profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfileSample
-type SamplingHeapProfileSample struct {
- Size float64 `json:"size"` // Allocation size in bytes attributed to the sample.
- NodeID int64 `json:"nodeId"` // Id of the corresponding profile tree node.
- Ordinal float64 `json:"ordinal"` // Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
-}
-
-// SamplingHeapProfile sampling profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfile
-type SamplingHeapProfile struct {
- Head *SamplingHeapProfileNode `json:"head"`
- Samples []*SamplingHeapProfileSample `json:"samples"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go b/vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go
deleted file mode 100644
index ed443fbca79..00000000000
--- a/vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go
+++ /dev/null
@@ -1,1939 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package indexeddb
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(in *jlexer.Lexer, out *RequestDatabaseReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "databaseWithObjectStores":
- if in.IsNull() {
- in.Skip()
- out.DatabaseWithObjectStores = nil
- } else {
- if out.DatabaseWithObjectStores == nil {
- out.DatabaseWithObjectStores = new(DatabaseWithObjectStores)
- }
- (*out.DatabaseWithObjectStores).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(out *jwriter.Writer, in RequestDatabaseReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DatabaseWithObjectStores != nil {
- const prefix string = ",\"databaseWithObjectStores\":"
- first = false
- out.RawString(prefix[1:])
- (*in.DatabaseWithObjectStores).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(in *jlexer.Lexer, out *RequestDatabaseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(out *jwriter.Writer, in RequestDatabaseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDatabaseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(in *jlexer.Lexer, out *RequestDatabaseNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "databaseNames":
- if in.IsNull() {
- in.Skip()
- out.DatabaseNames = nil
- } else {
- in.Delim('[')
- if out.DatabaseNames == nil {
- if !in.IsDelim(']') {
- out.DatabaseNames = make([]string, 0, 4)
- } else {
- out.DatabaseNames = []string{}
- }
- } else {
- out.DatabaseNames = (out.DatabaseNames)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.DatabaseNames = append(out.DatabaseNames, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(out *jwriter.Writer, in RequestDatabaseNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.DatabaseNames) != 0 {
- const prefix string = ",\"databaseNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.DatabaseNames {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(in *jlexer.Lexer, out *RequestDatabaseNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(out *jwriter.Writer, in RequestDatabaseNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(in *jlexer.Lexer, out *RequestDataReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectStoreDataEntries":
- if in.IsNull() {
- in.Skip()
- out.ObjectStoreDataEntries = nil
- } else {
- in.Delim('[')
- if out.ObjectStoreDataEntries == nil {
- if !in.IsDelim(']') {
- out.ObjectStoreDataEntries = make([]*DataEntry, 0, 8)
- } else {
- out.ObjectStoreDataEntries = []*DataEntry{}
- }
- } else {
- out.ObjectStoreDataEntries = (out.ObjectStoreDataEntries)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *DataEntry
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(DataEntry)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.ObjectStoreDataEntries = append(out.ObjectStoreDataEntries, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "hasMore":
- out.HasMore = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(out *jwriter.Writer, in RequestDataReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ObjectStoreDataEntries) != 0 {
- const prefix string = ",\"objectStoreDataEntries\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.ObjectStoreDataEntries {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.HasMore {
- const prefix string = ",\"hasMore\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.HasMore))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDataReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDataReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(in *jlexer.Lexer, out *RequestDataParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- case "objectStoreName":
- out.ObjectStoreName = string(in.String())
- case "indexName":
- out.IndexName = string(in.String())
- case "skipCount":
- out.SkipCount = int64(in.Int64())
- case "pageSize":
- out.PageSize = int64(in.Int64())
- case "keyRange":
- if in.IsNull() {
- in.Skip()
- out.KeyRange = nil
- } else {
- if out.KeyRange == nil {
- out.KeyRange = new(KeyRange)
- }
- (*out.KeyRange).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(out *jwriter.Writer, in RequestDataParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- {
- const prefix string = ",\"objectStoreName\":"
- out.RawString(prefix)
- out.String(string(in.ObjectStoreName))
- }
- {
- const prefix string = ",\"indexName\":"
- out.RawString(prefix)
- out.String(string(in.IndexName))
- }
- {
- const prefix string = ",\"skipCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.SkipCount))
- }
- {
- const prefix string = ",\"pageSize\":"
- out.RawString(prefix)
- out.Int64(int64(in.PageSize))
- }
- if in.KeyRange != nil {
- const prefix string = ",\"keyRange\":"
- out.RawString(prefix)
- (*in.KeyRange).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestDataParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestDataParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(in *jlexer.Lexer, out *ObjectStoreIndex) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "keyPath":
- if in.IsNull() {
- in.Skip()
- out.KeyPath = nil
- } else {
- if out.KeyPath == nil {
- out.KeyPath = new(KeyPath)
- }
- (*out.KeyPath).UnmarshalEasyJSON(in)
- }
- case "unique":
- out.Unique = bool(in.Bool())
- case "multiEntry":
- out.MultiEntry = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(out *jwriter.Writer, in ObjectStoreIndex) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"keyPath\":"
- out.RawString(prefix)
- if in.KeyPath == nil {
- out.RawString("null")
- } else {
- (*in.KeyPath).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"unique\":"
- out.RawString(prefix)
- out.Bool(bool(in.Unique))
- }
- {
- const prefix string = ",\"multiEntry\":"
- out.RawString(prefix)
- out.Bool(bool(in.MultiEntry))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ObjectStoreIndex) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ObjectStoreIndex) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ObjectStoreIndex) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ObjectStoreIndex) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(in *jlexer.Lexer, out *ObjectStore) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "keyPath":
- if in.IsNull() {
- in.Skip()
- out.KeyPath = nil
- } else {
- if out.KeyPath == nil {
- out.KeyPath = new(KeyPath)
- }
- (*out.KeyPath).UnmarshalEasyJSON(in)
- }
- case "autoIncrement":
- out.AutoIncrement = bool(in.Bool())
- case "indexes":
- if in.IsNull() {
- in.Skip()
- out.Indexes = nil
- } else {
- in.Delim('[')
- if out.Indexes == nil {
- if !in.IsDelim(']') {
- out.Indexes = make([]*ObjectStoreIndex, 0, 8)
- } else {
- out.Indexes = []*ObjectStoreIndex{}
- }
- } else {
- out.Indexes = (out.Indexes)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *ObjectStoreIndex
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(ObjectStoreIndex)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Indexes = append(out.Indexes, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(out *jwriter.Writer, in ObjectStore) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"keyPath\":"
- out.RawString(prefix)
- if in.KeyPath == nil {
- out.RawString("null")
- } else {
- (*in.KeyPath).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"autoIncrement\":"
- out.RawString(prefix)
- out.Bool(bool(in.AutoIncrement))
- }
- {
- const prefix string = ",\"indexes\":"
- out.RawString(prefix)
- if in.Indexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Indexes {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ObjectStore) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ObjectStore) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ObjectStore) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ObjectStore) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(in *jlexer.Lexer, out *KeyRange) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "lower":
- if in.IsNull() {
- in.Skip()
- out.Lower = nil
- } else {
- if out.Lower == nil {
- out.Lower = new(Key)
- }
- (*out.Lower).UnmarshalEasyJSON(in)
- }
- case "upper":
- if in.IsNull() {
- in.Skip()
- out.Upper = nil
- } else {
- if out.Upper == nil {
- out.Upper = new(Key)
- }
- (*out.Upper).UnmarshalEasyJSON(in)
- }
- case "lowerOpen":
- out.LowerOpen = bool(in.Bool())
- case "upperOpen":
- out.UpperOpen = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(out *jwriter.Writer, in KeyRange) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Lower != nil {
- const prefix string = ",\"lower\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Lower).MarshalEasyJSON(out)
- }
- if in.Upper != nil {
- const prefix string = ",\"upper\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Upper).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"lowerOpen\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.LowerOpen))
- }
- {
- const prefix string = ",\"upperOpen\":"
- out.RawString(prefix)
- out.Bool(bool(in.UpperOpen))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyRange) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyRange) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyRange) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyRange) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(in *jlexer.Lexer, out *KeyPath) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "string":
- out.String = string(in.String())
- case "array":
- if in.IsNull() {
- in.Skip()
- out.Array = nil
- } else {
- in.Delim('[')
- if out.Array == nil {
- if !in.IsDelim(']') {
- out.Array = make([]string, 0, 4)
- } else {
- out.Array = []string{}
- }
- } else {
- out.Array = (out.Array)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Array = append(out.Array, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(out *jwriter.Writer, in KeyPath) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.String != "" {
- const prefix string = ",\"string\":"
- out.RawString(prefix)
- out.String(string(in.String))
- }
- if len(in.Array) != 0 {
- const prefix string = ",\"array\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v11, v12 := range in.Array {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v KeyPath) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v KeyPath) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *KeyPath) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *KeyPath) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(in *jlexer.Lexer, out *Key) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "number":
- out.Number = float64(in.Float64())
- case "string":
- out.String = string(in.String())
- case "date":
- out.Date = float64(in.Float64())
- case "array":
- if in.IsNull() {
- in.Skip()
- out.Array = nil
- } else {
- in.Delim('[')
- if out.Array == nil {
- if !in.IsDelim(']') {
- out.Array = make([]*Key, 0, 8)
- } else {
- out.Array = []*Key{}
- }
- } else {
- out.Array = (out.Array)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *Key
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(Key)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Array = append(out.Array, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(out *jwriter.Writer, in Key) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Number != 0 {
- const prefix string = ",\"number\":"
- out.RawString(prefix)
- out.Float64(float64(in.Number))
- }
- if in.String != "" {
- const prefix string = ",\"string\":"
- out.RawString(prefix)
- out.String(string(in.String))
- }
- if in.Date != 0 {
- const prefix string = ",\"date\":"
- out.RawString(prefix)
- out.Float64(float64(in.Date))
- }
- if len(in.Array) != 0 {
- const prefix string = ",\"array\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v14, v15 := range in.Array {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Key) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Key) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Key) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(in *jlexer.Lexer, out *GetMetadataReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "entriesCount":
- out.EntriesCount = float64(in.Float64())
- case "keyGeneratorValue":
- out.KeyGeneratorValue = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(out *jwriter.Writer, in GetMetadataReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.EntriesCount != 0 {
- const prefix string = ",\"entriesCount\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.EntriesCount))
- }
- if in.KeyGeneratorValue != 0 {
- const prefix string = ",\"keyGeneratorValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.KeyGeneratorValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMetadataReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMetadataReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMetadataReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMetadataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(in *jlexer.Lexer, out *GetMetadataParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- case "objectStoreName":
- out.ObjectStoreName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(out *jwriter.Writer, in GetMetadataParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- {
- const prefix string = ",\"objectStoreName\":"
- out.RawString(prefix)
- out.String(string(in.ObjectStoreName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMetadataParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMetadataParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMetadataParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMetadataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(in *jlexer.Lexer, out *DeleteObjectStoreEntriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- case "objectStoreName":
- out.ObjectStoreName = string(in.String())
- case "keyRange":
- if in.IsNull() {
- in.Skip()
- out.KeyRange = nil
- } else {
- if out.KeyRange == nil {
- out.KeyRange = new(KeyRange)
- }
- (*out.KeyRange).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(out *jwriter.Writer, in DeleteObjectStoreEntriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- {
- const prefix string = ",\"objectStoreName\":"
- out.RawString(prefix)
- out.String(string(in.ObjectStoreName))
- }
- {
- const prefix string = ",\"keyRange\":"
- out.RawString(prefix)
- if in.KeyRange == nil {
- out.RawString("null")
- } else {
- (*in.KeyRange).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeleteObjectStoreEntriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeleteObjectStoreEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeleteObjectStoreEntriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeleteObjectStoreEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(in *jlexer.Lexer, out *DeleteDatabaseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(out *jwriter.Writer, in DeleteDatabaseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(in *jlexer.Lexer, out *DatabaseWithObjectStores) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "version":
- out.Version = float64(in.Float64())
- case "objectStores":
- if in.IsNull() {
- in.Skip()
- out.ObjectStores = nil
- } else {
- in.Delim('[')
- if out.ObjectStores == nil {
- if !in.IsDelim(']') {
- out.ObjectStores = make([]*ObjectStore, 0, 8)
- } else {
- out.ObjectStores = []*ObjectStore{}
- }
- } else {
- out.ObjectStores = (out.ObjectStores)[:0]
- }
- for !in.IsDelim(']') {
- var v16 *ObjectStore
- if in.IsNull() {
- in.Skip()
- v16 = nil
- } else {
- if v16 == nil {
- v16 = new(ObjectStore)
- }
- (*v16).UnmarshalEasyJSON(in)
- }
- out.ObjectStores = append(out.ObjectStores, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(out *jwriter.Writer, in DatabaseWithObjectStores) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"version\":"
- out.RawString(prefix)
- out.Float64(float64(in.Version))
- }
- {
- const prefix string = ",\"objectStores\":"
- out.RawString(prefix)
- if in.ObjectStores == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v17, v18 := range in.ObjectStores {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DatabaseWithObjectStores) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DatabaseWithObjectStores) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DatabaseWithObjectStores) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DatabaseWithObjectStores) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(in *jlexer.Lexer, out *DataEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "key":
- if in.IsNull() {
- in.Skip()
- out.Key = nil
- } else {
- if out.Key == nil {
- out.Key = new(runtime.RemoteObject)
- }
- (*out.Key).UnmarshalEasyJSON(in)
- }
- case "primaryKey":
- if in.IsNull() {
- in.Skip()
- out.PrimaryKey = nil
- } else {
- if out.PrimaryKey == nil {
- out.PrimaryKey = new(runtime.RemoteObject)
- }
- (*out.PrimaryKey).UnmarshalEasyJSON(in)
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(runtime.RemoteObject)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(out *jwriter.Writer, in DataEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix[1:])
- if in.Key == nil {
- out.RawString("null")
- } else {
- (*in.Key).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"primaryKey\":"
- out.RawString(prefix)
- if in.PrimaryKey == nil {
- out.RawString("null")
- } else {
- (*in.PrimaryKey).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- if in.Value == nil {
- out.RawString("null")
- } else {
- (*in.Value).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DataEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DataEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(in *jlexer.Lexer, out *ClearObjectStoreParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityOrigin":
- out.SecurityOrigin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- case "objectStoreName":
- out.ObjectStoreName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(out *jwriter.Writer, in ClearObjectStoreParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.SecurityOrigin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- {
- const prefix string = ",\"objectStoreName\":"
- out.RawString(prefix)
- out.String(string(in.ObjectStoreName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearObjectStoreParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearObjectStoreParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearObjectStoreParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go b/vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go
deleted file mode 100644
index 7f7e989168e..00000000000
--- a/vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go
+++ /dev/null
@@ -1,325 +0,0 @@
-// Package indexeddb provides the Chrome DevTools Protocol
-// commands, types, and events for the IndexedDB domain.
-//
-// Generated by the cdproto-gen command.
-package indexeddb
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ClearObjectStoreParams clears all entries from an object store.
-type ClearObjectStoreParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
- DatabaseName string `json:"databaseName"` // Database name.
- ObjectStoreName string `json:"objectStoreName"` // Object store name.
-}
-
-// ClearObjectStore clears all entries from an object store.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-clearObjectStore
-//
-// parameters:
-// securityOrigin - Security origin.
-// databaseName - Database name.
-// objectStoreName - Object store name.
-func ClearObjectStore(securityOrigin string, databaseName string, objectStoreName string) *ClearObjectStoreParams {
- return &ClearObjectStoreParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- ObjectStoreName: objectStoreName,
- }
-}
-
-// Do executes IndexedDB.clearObjectStore against the provided context.
-func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearObjectStore, p, nil)
-}
-
-// DeleteDatabaseParams deletes a database.
-type DeleteDatabaseParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
- DatabaseName string `json:"databaseName"` // Database name.
-}
-
-// DeleteDatabase deletes a database.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteDatabase
-//
-// parameters:
-// securityOrigin - Security origin.
-// databaseName - Database name.
-func DeleteDatabase(securityOrigin string, databaseName string) *DeleteDatabaseParams {
- return &DeleteDatabaseParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- }
-}
-
-// Do executes IndexedDB.deleteDatabase against the provided context.
-func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeleteDatabase, p, nil)
-}
-
-// DeleteObjectStoreEntriesParams delete a range of entries from an object
-// store.
-type DeleteObjectStoreEntriesParams struct {
- SecurityOrigin string `json:"securityOrigin"`
- DatabaseName string `json:"databaseName"`
- ObjectStoreName string `json:"objectStoreName"`
- KeyRange *KeyRange `json:"keyRange"` // Range of entry keys to delete
-}
-
-// DeleteObjectStoreEntries delete a range of entries from an object store.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteObjectStoreEntries
-//
-// parameters:
-// securityOrigin
-// databaseName
-// objectStoreName
-// keyRange - Range of entry keys to delete
-func DeleteObjectStoreEntries(securityOrigin string, databaseName string, objectStoreName string, keyRange *KeyRange) *DeleteObjectStoreEntriesParams {
- return &DeleteObjectStoreEntriesParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- ObjectStoreName: objectStoreName,
- KeyRange: keyRange,
- }
-}
-
-// Do executes IndexedDB.deleteObjectStoreEntries against the provided context.
-func (p *DeleteObjectStoreEntriesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeleteObjectStoreEntries, p, nil)
-}
-
-// DisableParams disables events from backend.
-type DisableParams struct{}
-
-// Disable disables events from backend.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes IndexedDB.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables events from backend.
-type EnableParams struct{}
-
-// Enable enables events from backend.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes IndexedDB.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// RequestDataParams requests data from object store or index.
-type RequestDataParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
- DatabaseName string `json:"databaseName"` // Database name.
- ObjectStoreName string `json:"objectStoreName"` // Object store name.
- IndexName string `json:"indexName"` // Index name, empty string for object store data requests.
- SkipCount int64 `json:"skipCount"` // Number of records to skip.
- PageSize int64 `json:"pageSize"` // Number of records to fetch.
- KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range.
-}
-
-// RequestData requests data from object store or index.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestData
-//
-// parameters:
-// securityOrigin - Security origin.
-// databaseName - Database name.
-// objectStoreName - Object store name.
-// indexName - Index name, empty string for object store data requests.
-// skipCount - Number of records to skip.
-// pageSize - Number of records to fetch.
-func RequestData(securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int64, pageSize int64) *RequestDataParams {
- return &RequestDataParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- ObjectStoreName: objectStoreName,
- IndexName: indexName,
- SkipCount: skipCount,
- PageSize: pageSize,
- }
-}
-
-// WithKeyRange key range.
-func (p RequestDataParams) WithKeyRange(keyRange *KeyRange) *RequestDataParams {
- p.KeyRange = keyRange
- return &p
-}
-
-// RequestDataReturns return values.
-type RequestDataReturns struct {
- ObjectStoreDataEntries []*DataEntry `json:"objectStoreDataEntries,omitempty"` // Array of object store data entries.
- HasMore bool `json:"hasMore,omitempty"` // If true, there are more entries to fetch in the given range.
-}
-
-// Do executes IndexedDB.requestData against the provided context.
-//
-// returns:
-// objectStoreDataEntries - Array of object store data entries.
-// hasMore - If true, there are more entries to fetch in the given range.
-func (p *RequestDataParams) Do(ctx context.Context) (objectStoreDataEntries []*DataEntry, hasMore bool, err error) {
- // execute
- var res RequestDataReturns
- err = cdp.Execute(ctx, CommandRequestData, p, &res)
- if err != nil {
- return nil, false, err
- }
-
- return res.ObjectStoreDataEntries, res.HasMore, nil
-}
-
-// GetMetadataParams gets metadata of an object store.
-type GetMetadataParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
- DatabaseName string `json:"databaseName"` // Database name.
- ObjectStoreName string `json:"objectStoreName"` // Object store name.
-}
-
-// GetMetadata gets metadata of an object store.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-getMetadata
-//
-// parameters:
-// securityOrigin - Security origin.
-// databaseName - Database name.
-// objectStoreName - Object store name.
-func GetMetadata(securityOrigin string, databaseName string, objectStoreName string) *GetMetadataParams {
- return &GetMetadataParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- ObjectStoreName: objectStoreName,
- }
-}
-
-// GetMetadataReturns return values.
-type GetMetadataReturns struct {
- EntriesCount float64 `json:"entriesCount,omitempty"` // the entries count
- KeyGeneratorValue float64 `json:"keyGeneratorValue,omitempty"` // the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
-}
-
-// Do executes IndexedDB.getMetadata against the provided context.
-//
-// returns:
-// entriesCount - the entries count
-// keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
-func (p *GetMetadataParams) Do(ctx context.Context) (entriesCount float64, keyGeneratorValue float64, err error) {
- // execute
- var res GetMetadataReturns
- err = cdp.Execute(ctx, CommandGetMetadata, p, &res)
- if err != nil {
- return 0, 0, err
- }
-
- return res.EntriesCount, res.KeyGeneratorValue, nil
-}
-
-// RequestDatabaseParams requests database with given name in given frame.
-type RequestDatabaseParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
- DatabaseName string `json:"databaseName"` // Database name.
-}
-
-// RequestDatabase requests database with given name in given frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabase
-//
-// parameters:
-// securityOrigin - Security origin.
-// databaseName - Database name.
-func RequestDatabase(securityOrigin string, databaseName string) *RequestDatabaseParams {
- return &RequestDatabaseParams{
- SecurityOrigin: securityOrigin,
- DatabaseName: databaseName,
- }
-}
-
-// RequestDatabaseReturns return values.
-type RequestDatabaseReturns struct {
- DatabaseWithObjectStores *DatabaseWithObjectStores `json:"databaseWithObjectStores,omitempty"` // Database with an array of object stores.
-}
-
-// Do executes IndexedDB.requestDatabase against the provided context.
-//
-// returns:
-// databaseWithObjectStores - Database with an array of object stores.
-func (p *RequestDatabaseParams) Do(ctx context.Context) (databaseWithObjectStores *DatabaseWithObjectStores, err error) {
- // execute
- var res RequestDatabaseReturns
- err = cdp.Execute(ctx, CommandRequestDatabase, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.DatabaseWithObjectStores, nil
-}
-
-// RequestDatabaseNamesParams requests database names for given security
-// origin.
-type RequestDatabaseNamesParams struct {
- SecurityOrigin string `json:"securityOrigin"` // Security origin.
-}
-
-// RequestDatabaseNames requests database names for given security origin.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabaseNames
-//
-// parameters:
-// securityOrigin - Security origin.
-func RequestDatabaseNames(securityOrigin string) *RequestDatabaseNamesParams {
- return &RequestDatabaseNamesParams{
- SecurityOrigin: securityOrigin,
- }
-}
-
-// RequestDatabaseNamesReturns return values.
-type RequestDatabaseNamesReturns struct {
- DatabaseNames []string `json:"databaseNames,omitempty"` // Database names for origin.
-}
-
-// Do executes IndexedDB.requestDatabaseNames against the provided context.
-//
-// returns:
-// databaseNames - Database names for origin.
-func (p *RequestDatabaseNamesParams) Do(ctx context.Context) (databaseNames []string, err error) {
- // execute
- var res RequestDatabaseNamesReturns
- err = cdp.Execute(ctx, CommandRequestDatabaseNames, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.DatabaseNames, nil
-}
-
-// Command names.
-const (
- CommandClearObjectStore = "IndexedDB.clearObjectStore"
- CommandDeleteDatabase = "IndexedDB.deleteDatabase"
- CommandDeleteObjectStoreEntries = "IndexedDB.deleteObjectStoreEntries"
- CommandDisable = "IndexedDB.disable"
- CommandEnable = "IndexedDB.enable"
- CommandRequestData = "IndexedDB.requestData"
- CommandGetMetadata = "IndexedDB.getMetadata"
- CommandRequestDatabase = "IndexedDB.requestDatabase"
- CommandRequestDatabaseNames = "IndexedDB.requestDatabaseNames"
-)
diff --git a/vendor/github.com/chromedp/cdproto/indexeddb/types.go b/vendor/github.com/chromedp/cdproto/indexeddb/types.go
deleted file mode 100644
index 31b34800d16..00000000000
--- a/vendor/github.com/chromedp/cdproto/indexeddb/types.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package indexeddb
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// DatabaseWithObjectStores database with an array of object stores.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-DatabaseWithObjectStores
-type DatabaseWithObjectStores struct {
- Name string `json:"name"` // Database name.
- Version float64 `json:"version"` // Database version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')
- ObjectStores []*ObjectStore `json:"objectStores"` // Object stores in this database.
-}
-
-// ObjectStore object store.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-ObjectStore
-type ObjectStore struct {
- Name string `json:"name"` // Object store name.
- KeyPath *KeyPath `json:"keyPath"` // Object store key path.
- AutoIncrement bool `json:"autoIncrement"` // If true, object store has auto increment flag set.
- Indexes []*ObjectStoreIndex `json:"indexes"` // Indexes in this object store.
-}
-
-// ObjectStoreIndex object store index.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-ObjectStoreIndex
-type ObjectStoreIndex struct {
- Name string `json:"name"` // Index name.
- KeyPath *KeyPath `json:"keyPath"` // Index key path.
- Unique bool `json:"unique"` // If true, index is unique.
- MultiEntry bool `json:"multiEntry"` // If true, index allows multiple entries for a key.
-}
-
-// Key Key.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-Key
-type Key struct {
- Type KeyType `json:"type"` // Key type.
- Number float64 `json:"number,omitempty"` // Number value.
- String string `json:"string,omitempty"` // String value.
- Date float64 `json:"date,omitempty"` // Date value.
- Array []*Key `json:"array,omitempty"` // Array value.
-}
-
-// KeyRange key range.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyRange
-type KeyRange struct {
- Lower *Key `json:"lower,omitempty"` // Lower bound.
- Upper *Key `json:"upper,omitempty"` // Upper bound.
- LowerOpen bool `json:"lowerOpen"` // If true lower bound is open.
- UpperOpen bool `json:"upperOpen"` // If true upper bound is open.
-}
-
-// DataEntry data entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-DataEntry
-type DataEntry struct {
- Key *runtime.RemoteObject `json:"key"` // Key object.
- PrimaryKey *runtime.RemoteObject `json:"primaryKey"` // Primary key object.
- Value *runtime.RemoteObject `json:"value"` // Value object.
-}
-
-// KeyPath key path.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyPath
-type KeyPath struct {
- Type KeyPathType `json:"type"` // Key path type.
- String string `json:"string,omitempty"` // String value.
- Array []string `json:"array,omitempty"` // Array value.
-}
-
-// KeyType key type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-Key
-type KeyType string
-
-// String returns the KeyType as string value.
-func (t KeyType) String() string {
- return string(t)
-}
-
-// KeyType values.
-const (
- KeyTypeNumber KeyType = "number"
- KeyTypeString KeyType = "string"
- KeyTypeDate KeyType = "date"
- KeyTypeArray KeyType = "array"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t KeyType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t KeyType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch KeyType(in.String()) {
- case KeyTypeNumber:
- *t = KeyTypeNumber
- case KeyTypeString:
- *t = KeyTypeString
- case KeyTypeDate:
- *t = KeyTypeDate
- case KeyTypeArray:
- *t = KeyTypeArray
-
- default:
- in.AddError(errors.New("unknown KeyType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *KeyType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// KeyPathType key path type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyPath
-type KeyPathType string
-
-// String returns the KeyPathType as string value.
-func (t KeyPathType) String() string {
- return string(t)
-}
-
-// KeyPathType values.
-const (
- KeyPathTypeNull KeyPathType = "null"
- KeyPathTypeString KeyPathType = "string"
- KeyPathTypeArray KeyPathType = "array"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t KeyPathType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t KeyPathType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch KeyPathType(in.String()) {
- case KeyPathTypeNull:
- *t = KeyPathTypeNull
- case KeyPathTypeString:
- *t = KeyPathTypeString
- case KeyPathTypeArray:
- *t = KeyPathTypeArray
-
- default:
- in.AddError(errors.New("unknown KeyPathType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *KeyPathType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/input/easyjson.go b/vendor/github.com/chromedp/cdproto/input/easyjson.go
deleted file mode 100644
index e20bb7c411c..00000000000
--- a/vendor/github.com/chromedp/cdproto/input/easyjson.go
+++ /dev/null
@@ -1,1722 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package input
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput(in *jlexer.Lexer, out *TouchPoint) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "radiusX":
- out.RadiusX = float64(in.Float64())
- case "radiusY":
- out.RadiusY = float64(in.Float64())
- case "rotationAngle":
- out.RotationAngle = float64(in.Float64())
- case "force":
- out.Force = float64(in.Float64())
- case "tangentialPressure":
- out.TangentialPressure = float64(in.Float64())
- case "tiltX":
- out.TiltX = int64(in.Int64())
- case "tiltY":
- out.TiltY = int64(in.Int64())
- case "twist":
- out.Twist = int64(in.Int64())
- case "id":
- out.ID = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput(out *jwriter.Writer, in TouchPoint) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- if in.RadiusX != 0 {
- const prefix string = ",\"radiusX\":"
- out.RawString(prefix)
- out.Float64(float64(in.RadiusX))
- }
- if in.RadiusY != 0 {
- const prefix string = ",\"radiusY\":"
- out.RawString(prefix)
- out.Float64(float64(in.RadiusY))
- }
- if in.RotationAngle != 0 {
- const prefix string = ",\"rotationAngle\":"
- out.RawString(prefix)
- out.Float64(float64(in.RotationAngle))
- }
- if in.Force != 0 {
- const prefix string = ",\"force\":"
- out.RawString(prefix)
- out.Float64(float64(in.Force))
- }
- if in.TangentialPressure != 0 {
- const prefix string = ",\"tangentialPressure\":"
- out.RawString(prefix)
- out.Float64(float64(in.TangentialPressure))
- }
- if in.TiltX != 0 {
- const prefix string = ",\"tiltX\":"
- out.RawString(prefix)
- out.Int64(int64(in.TiltX))
- }
- if in.TiltY != 0 {
- const prefix string = ",\"tiltY\":"
- out.RawString(prefix)
- out.Int64(int64(in.TiltY))
- }
- if in.Twist != 0 {
- const prefix string = ",\"twist\":"
- out.RawString(prefix)
- out.Int64(int64(in.Twist))
- }
- if in.ID != 0 {
- const prefix string = ",\"id\":"
- out.RawString(prefix)
- out.Float64(float64(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TouchPoint) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TouchPoint) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TouchPoint) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TouchPoint) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput1(in *jlexer.Lexer, out *SynthesizeTapGestureParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "duration":
- out.Duration = int64(in.Int64())
- case "tapCount":
- out.TapCount = int64(in.Int64())
- case "gestureSourceType":
- (out.GestureSourceType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput1(out *jwriter.Writer, in SynthesizeTapGestureParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- if in.Duration != 0 {
- const prefix string = ",\"duration\":"
- out.RawString(prefix)
- out.Int64(int64(in.Duration))
- }
- if in.TapCount != 0 {
- const prefix string = ",\"tapCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.TapCount))
- }
- if in.GestureSourceType != "" {
- const prefix string = ",\"gestureSourceType\":"
- out.RawString(prefix)
- (in.GestureSourceType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SynthesizeTapGestureParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SynthesizeTapGestureParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SynthesizeTapGestureParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SynthesizeTapGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput2(in *jlexer.Lexer, out *SynthesizeScrollGestureParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "xDistance":
- out.XDistance = float64(in.Float64())
- case "yDistance":
- out.YDistance = float64(in.Float64())
- case "xOverscroll":
- out.XOverscroll = float64(in.Float64())
- case "yOverscroll":
- out.YOverscroll = float64(in.Float64())
- case "preventFling":
- out.PreventFling = bool(in.Bool())
- case "speed":
- out.Speed = int64(in.Int64())
- case "gestureSourceType":
- (out.GestureSourceType).UnmarshalEasyJSON(in)
- case "repeatCount":
- out.RepeatCount = int64(in.Int64())
- case "repeatDelayMs":
- out.RepeatDelayMs = int64(in.Int64())
- case "interactionMarkerName":
- out.InteractionMarkerName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput2(out *jwriter.Writer, in SynthesizeScrollGestureParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- if in.XDistance != 0 {
- const prefix string = ",\"xDistance\":"
- out.RawString(prefix)
- out.Float64(float64(in.XDistance))
- }
- if in.YDistance != 0 {
- const prefix string = ",\"yDistance\":"
- out.RawString(prefix)
- out.Float64(float64(in.YDistance))
- }
- if in.XOverscroll != 0 {
- const prefix string = ",\"xOverscroll\":"
- out.RawString(prefix)
- out.Float64(float64(in.XOverscroll))
- }
- if in.YOverscroll != 0 {
- const prefix string = ",\"yOverscroll\":"
- out.RawString(prefix)
- out.Float64(float64(in.YOverscroll))
- }
- if in.PreventFling {
- const prefix string = ",\"preventFling\":"
- out.RawString(prefix)
- out.Bool(bool(in.PreventFling))
- }
- if in.Speed != 0 {
- const prefix string = ",\"speed\":"
- out.RawString(prefix)
- out.Int64(int64(in.Speed))
- }
- if in.GestureSourceType != "" {
- const prefix string = ",\"gestureSourceType\":"
- out.RawString(prefix)
- (in.GestureSourceType).MarshalEasyJSON(out)
- }
- if in.RepeatCount != 0 {
- const prefix string = ",\"repeatCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.RepeatCount))
- }
- if in.RepeatDelayMs != 0 {
- const prefix string = ",\"repeatDelayMs\":"
- out.RawString(prefix)
- out.Int64(int64(in.RepeatDelayMs))
- }
- if in.InteractionMarkerName != "" {
- const prefix string = ",\"interactionMarkerName\":"
- out.RawString(prefix)
- out.String(string(in.InteractionMarkerName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SynthesizeScrollGestureParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SynthesizeScrollGestureParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SynthesizeScrollGestureParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SynthesizeScrollGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput3(in *jlexer.Lexer, out *SynthesizePinchGestureParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "scaleFactor":
- out.ScaleFactor = float64(in.Float64())
- case "relativeSpeed":
- out.RelativeSpeed = int64(in.Int64())
- case "gestureSourceType":
- (out.GestureSourceType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput3(out *jwriter.Writer, in SynthesizePinchGestureParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"scaleFactor\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScaleFactor))
- }
- if in.RelativeSpeed != 0 {
- const prefix string = ",\"relativeSpeed\":"
- out.RawString(prefix)
- out.Int64(int64(in.RelativeSpeed))
- }
- if in.GestureSourceType != "" {
- const prefix string = ",\"gestureSourceType\":"
- out.RawString(prefix)
- (in.GestureSourceType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SynthesizePinchGestureParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SynthesizePinchGestureParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SynthesizePinchGestureParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SynthesizePinchGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput4(in *jlexer.Lexer, out *SetInterceptDragsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput4(out *jwriter.Writer, in SetInterceptDragsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInterceptDragsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInterceptDragsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInterceptDragsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInterceptDragsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput5(in *jlexer.Lexer, out *SetIgnoreInputEventsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "ignore":
- out.Ignore = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput5(out *jwriter.Writer, in SetIgnoreInputEventsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"ignore\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Ignore))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetIgnoreInputEventsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetIgnoreInputEventsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetIgnoreInputEventsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetIgnoreInputEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput6(in *jlexer.Lexer, out *InsertTextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "text":
- out.Text = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput6(out *jwriter.Writer, in InsertTextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix[1:])
- out.String(string(in.Text))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InsertTextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InsertTextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InsertTextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InsertTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(in *jlexer.Lexer, out *EventDragIntercepted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "data":
- if in.IsNull() {
- in.Skip()
- out.Data = nil
- } else {
- if out.Data == nil {
- out.Data = new(DragData)
- }
- (*out.Data).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(out *jwriter.Writer, in EventDragIntercepted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix[1:])
- if in.Data == nil {
- out.RawString("null")
- } else {
- (*in.Data).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDragIntercepted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDragIntercepted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDragIntercepted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDragIntercepted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(in *jlexer.Lexer, out *EmulateTouchFromMouseEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "x":
- out.X = int64(in.Int64())
- case "y":
- out.Y = int64(in.Int64())
- case "button":
- (out.Button).UnmarshalEasyJSON(in)
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "deltaX":
- out.DeltaX = float64(in.Float64())
- case "deltaY":
- out.DeltaY = float64(in.Float64())
- case "modifiers":
- (out.Modifiers).UnmarshalEasyJSON(in)
- case "clickCount":
- out.ClickCount = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(out *jwriter.Writer, in EmulateTouchFromMouseEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix)
- out.Int64(int64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Int64(int64(in.Y))
- }
- {
- const prefix string = ",\"button\":"
- out.RawString(prefix)
- (in.Button).MarshalEasyJSON(out)
- }
- if in.Timestamp != nil {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- if in.DeltaX != 0 {
- const prefix string = ",\"deltaX\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeltaX))
- }
- if in.DeltaY != 0 {
- const prefix string = ",\"deltaY\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeltaY))
- }
- {
- const prefix string = ",\"modifiers\":"
- out.RawString(prefix)
- (in.Modifiers).MarshalEasyJSON(out)
- }
- if in.ClickCount != 0 {
- const prefix string = ",\"clickCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.ClickCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(in *jlexer.Lexer, out *DragDataItem) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "mimeType":
- out.MimeType = string(in.String())
- case "data":
- out.Data = string(in.String())
- case "title":
- out.Title = string(in.String())
- case "baseURL":
- out.BaseURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(out *jwriter.Writer, in DragDataItem) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"mimeType\":"
- out.RawString(prefix[1:])
- out.String(string(in.MimeType))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- out.String(string(in.Data))
- }
- if in.Title != "" {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- if in.BaseURL != "" {
- const prefix string = ",\"baseURL\":"
- out.RawString(prefix)
- out.String(string(in.BaseURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DragDataItem) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DragDataItem) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DragDataItem) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DragDataItem) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(in *jlexer.Lexer, out *DragData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "items":
- if in.IsNull() {
- in.Skip()
- out.Items = nil
- } else {
- in.Delim('[')
- if out.Items == nil {
- if !in.IsDelim(']') {
- out.Items = make([]*DragDataItem, 0, 8)
- } else {
- out.Items = []*DragDataItem{}
- }
- } else {
- out.Items = (out.Items)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *DragDataItem
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(DragDataItem)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Items = append(out.Items, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "dragOperationsMask":
- out.DragOperationsMask = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(out *jwriter.Writer, in DragData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"items\":"
- out.RawString(prefix[1:])
- if in.Items == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Items {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"dragOperationsMask\":"
- out.RawString(prefix)
- out.Int64(int64(in.DragOperationsMask))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DragData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DragData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DragData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DragData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(in *jlexer.Lexer, out *DispatchTouchEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "touchPoints":
- if in.IsNull() {
- in.Skip()
- out.TouchPoints = nil
- } else {
- in.Delim('[')
- if out.TouchPoints == nil {
- if !in.IsDelim(']') {
- out.TouchPoints = make([]*TouchPoint, 0, 8)
- } else {
- out.TouchPoints = []*TouchPoint{}
- }
- } else {
- out.TouchPoints = (out.TouchPoints)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *TouchPoint
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(TouchPoint)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.TouchPoints = append(out.TouchPoints, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "modifiers":
- (out.Modifiers).UnmarshalEasyJSON(in)
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(out *jwriter.Writer, in DispatchTouchEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"touchPoints\":"
- out.RawString(prefix)
- if in.TouchPoints == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.TouchPoints {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"modifiers\":"
- out.RawString(prefix)
- (in.Modifiers).MarshalEasyJSON(out)
- }
- if in.Timestamp != nil {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(in *jlexer.Lexer, out *DispatchMouseEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "modifiers":
- (out.Modifiers).UnmarshalEasyJSON(in)
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "button":
- (out.Button).UnmarshalEasyJSON(in)
- case "buttons":
- out.Buttons = int64(in.Int64())
- case "clickCount":
- out.ClickCount = int64(in.Int64())
- case "force":
- out.Force = float64(in.Float64())
- case "tangentialPressure":
- out.TangentialPressure = float64(in.Float64())
- case "tiltX":
- out.TiltX = int64(in.Int64())
- case "tiltY":
- out.TiltY = int64(in.Int64())
- case "twist":
- out.Twist = int64(in.Int64())
- case "deltaX":
- out.DeltaX = float64(in.Float64())
- case "deltaY":
- out.DeltaY = float64(in.Float64())
- case "pointerType":
- (out.PointerType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(out *jwriter.Writer, in DispatchMouseEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix)
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"modifiers\":"
- out.RawString(prefix)
- (in.Modifiers).MarshalEasyJSON(out)
- }
- if in.Timestamp != nil {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- if in.Button != "" {
- const prefix string = ",\"button\":"
- out.RawString(prefix)
- (in.Button).MarshalEasyJSON(out)
- }
- if in.Buttons != 0 {
- const prefix string = ",\"buttons\":"
- out.RawString(prefix)
- out.Int64(int64(in.Buttons))
- }
- if in.ClickCount != 0 {
- const prefix string = ",\"clickCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.ClickCount))
- }
- if in.Force != 0 {
- const prefix string = ",\"force\":"
- out.RawString(prefix)
- out.Float64(float64(in.Force))
- }
- if in.TangentialPressure != 0 {
- const prefix string = ",\"tangentialPressure\":"
- out.RawString(prefix)
- out.Float64(float64(in.TangentialPressure))
- }
- if in.TiltX != 0 {
- const prefix string = ",\"tiltX\":"
- out.RawString(prefix)
- out.Int64(int64(in.TiltX))
- }
- if in.TiltY != 0 {
- const prefix string = ",\"tiltY\":"
- out.RawString(prefix)
- out.Int64(int64(in.TiltY))
- }
- if in.Twist != 0 {
- const prefix string = ",\"twist\":"
- out.RawString(prefix)
- out.Int64(int64(in.Twist))
- }
- {
- const prefix string = ",\"deltaX\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeltaX))
- }
- {
- const prefix string = ",\"deltaY\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeltaY))
- }
- if in.PointerType != "" {
- const prefix string = ",\"pointerType\":"
- out.RawString(prefix)
- (in.PointerType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out *DispatchKeyEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "modifiers":
- (out.Modifiers).UnmarshalEasyJSON(in)
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "text":
- out.Text = string(in.String())
- case "unmodifiedText":
- out.UnmodifiedText = string(in.String())
- case "keyIdentifier":
- out.KeyIdentifier = string(in.String())
- case "code":
- out.Code = string(in.String())
- case "key":
- out.Key = string(in.String())
- case "windowsVirtualKeyCode":
- out.WindowsVirtualKeyCode = int64(in.Int64())
- case "nativeVirtualKeyCode":
- out.NativeVirtualKeyCode = int64(in.Int64())
- case "autoRepeat":
- out.AutoRepeat = bool(in.Bool())
- case "isKeypad":
- out.IsKeypad = bool(in.Bool())
- case "isSystemKey":
- out.IsSystemKey = bool(in.Bool())
- case "location":
- out.Location = int64(in.Int64())
- case "commands":
- if in.IsNull() {
- in.Skip()
- out.Commands = nil
- } else {
- in.Delim('[')
- if out.Commands == nil {
- if !in.IsDelim(']') {
- out.Commands = make([]string, 0, 4)
- } else {
- out.Commands = []string{}
- }
- } else {
- out.Commands = (out.Commands)[:0]
- }
- for !in.IsDelim(']') {
- var v7 string
- v7 = string(in.String())
- out.Commands = append(out.Commands, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer, in DispatchKeyEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"modifiers\":"
- out.RawString(prefix)
- (in.Modifiers).MarshalEasyJSON(out)
- }
- if in.Timestamp != nil {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- if in.Text != "" {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- if in.UnmodifiedText != "" {
- const prefix string = ",\"unmodifiedText\":"
- out.RawString(prefix)
- out.String(string(in.UnmodifiedText))
- }
- if in.KeyIdentifier != "" {
- const prefix string = ",\"keyIdentifier\":"
- out.RawString(prefix)
- out.String(string(in.KeyIdentifier))
- }
- if in.Code != "" {
- const prefix string = ",\"code\":"
- out.RawString(prefix)
- out.String(string(in.Code))
- }
- if in.Key != "" {
- const prefix string = ",\"key\":"
- out.RawString(prefix)
- out.String(string(in.Key))
- }
- if in.WindowsVirtualKeyCode != 0 {
- const prefix string = ",\"windowsVirtualKeyCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.WindowsVirtualKeyCode))
- }
- if in.NativeVirtualKeyCode != 0 {
- const prefix string = ",\"nativeVirtualKeyCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.NativeVirtualKeyCode))
- }
- {
- const prefix string = ",\"autoRepeat\":"
- out.RawString(prefix)
- out.Bool(bool(in.AutoRepeat))
- }
- {
- const prefix string = ",\"isKeypad\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsKeypad))
- }
- {
- const prefix string = ",\"isSystemKey\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsSystemKey))
- }
- if in.Location != 0 {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- out.Int64(int64(in.Location))
- }
- if len(in.Commands) != 0 {
- const prefix string = ",\"commands\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.Commands {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(in *jlexer.Lexer, out *DispatchDragEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "data":
- if in.IsNull() {
- in.Skip()
- out.Data = nil
- } else {
- if out.Data == nil {
- out.Data = new(DragData)
- }
- (*out.Data).UnmarshalEasyJSON(in)
- }
- case "modifiers":
- (out.Modifiers).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(out *jwriter.Writer, in DispatchDragEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix)
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- if in.Data == nil {
- out.RawString("null")
- } else {
- (*in.Data).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"modifiers\":"
- out.RawString(prefix)
- (in.Modifiers).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchDragEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchDragEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchDragEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchDragEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/input/events.go b/vendor/github.com/chromedp/cdproto/input/events.go
deleted file mode 100644
index e53e770aa05..00000000000
--- a/vendor/github.com/chromedp/cdproto/input/events.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package input
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventDragIntercepted emitted only when Input.setInterceptDrags is enabled.
-// Use this data with Input.dispatchDragEvent to restore normal drag and drop
-// behavior.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#event-dragIntercepted
-type EventDragIntercepted struct {
- Data *DragData `json:"data"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/input/input.go b/vendor/github.com/chromedp/cdproto/input/input.go
deleted file mode 100644
index 947c4deda63..00000000000
--- a/vendor/github.com/chromedp/cdproto/input/input.go
+++ /dev/null
@@ -1,714 +0,0 @@
-// Package input provides the Chrome DevTools Protocol
-// commands, types, and events for the Input domain.
-//
-// Generated by the cdproto-gen command.
-package input
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DispatchDragEventParams dispatches a drag event into the page.
-type DispatchDragEventParams struct {
- Type DispatchDragEventType `json:"type"` // Type of the drag event.
- X float64 `json:"x"` // X coordinate of the event relative to the main frame's viewport in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
- Data *DragData `json:"data"`
- Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
-}
-
-// DispatchDragEvent dispatches a drag event into the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent
-//
-// parameters:
-// type - Type of the drag event.
-// x - X coordinate of the event relative to the main frame's viewport in CSS pixels.
-// y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
-// data
-func DispatchDragEvent(typeVal DispatchDragEventType, x float64, y float64, data *DragData) *DispatchDragEventParams {
- return &DispatchDragEventParams{
- Type: typeVal,
- X: x,
- Y: y,
- Data: data,
- }
-}
-
-// WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2,
-// Meta/Command=4, Shift=8 (default: 0).
-func (p DispatchDragEventParams) WithModifiers(modifiers Modifier) *DispatchDragEventParams {
- p.Modifiers = modifiers
- return &p
-}
-
-// Do executes Input.dispatchDragEvent against the provided context.
-func (p *DispatchDragEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchDragEvent, p, nil)
-}
-
-// DispatchKeyEventParams dispatches a key event to the page.
-type DispatchKeyEventParams struct {
- Type KeyType `json:"type"` // Type of the key event.
- Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred.
- Text string `json:"text,omitempty"` // Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "")
- UnmodifiedText string `json:"unmodifiedText,omitempty"` // Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
- KeyIdentifier string `json:"keyIdentifier,omitempty"` // Unique key identifier (e.g., 'U+0041') (default: "").
- Code string `json:"code,omitempty"` // Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
- Key string `json:"key,omitempty"` // Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
- WindowsVirtualKeyCode int64 `json:"windowsVirtualKeyCode,omitempty"` // Windows virtual key code (default: 0).
- NativeVirtualKeyCode int64 `json:"nativeVirtualKeyCode,omitempty"` // Native virtual key code (default: 0).
- AutoRepeat bool `json:"autoRepeat"` // Whether the event was generated from auto repeat (default: false).
- IsKeypad bool `json:"isKeypad"` // Whether the event was generated from the keypad (default: false).
- IsSystemKey bool `json:"isSystemKey"` // Whether the event was a system key event (default: false).
- Location int64 `json:"location,omitempty"` // Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
- Commands []string `json:"commands,omitempty"` // Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in document.execCommand and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
-}
-
-// DispatchKeyEvent dispatches a key event to the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
-//
-// parameters:
-// type - Type of the key event.
-func DispatchKeyEvent(typeVal KeyType) *DispatchKeyEventParams {
- return &DispatchKeyEventParams{
- Type: typeVal,
- }
-}
-
-// WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2,
-// Meta/Command=4, Shift=8 (default: 0).
-func (p DispatchKeyEventParams) WithModifiers(modifiers Modifier) *DispatchKeyEventParams {
- p.Modifiers = modifiers
- return &p
-}
-
-// WithTimestamp time at which the event occurred.
-func (p DispatchKeyEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchKeyEventParams {
- p.Timestamp = timestamp
- return &p
-}
-
-// WithText text as generated by processing a virtual key code with a
-// keyboard layout. Not needed for for keyUp and rawKeyDown events (default:
-// "").
-func (p DispatchKeyEventParams) WithText(text string) *DispatchKeyEventParams {
- p.Text = text
- return &p
-}
-
-// WithUnmodifiedText text that would have been generated by the keyboard if
-// no modifiers were pressed (except for shift). Useful for shortcut
-// (accelerator) key handling (default: "").
-func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams {
- p.UnmodifiedText = unmodifiedText
- return &p
-}
-
-// WithKeyIdentifier unique key identifier (e.g., 'U+0041') (default: "").
-func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams {
- p.KeyIdentifier = keyIdentifier
- return &p
-}
-
-// WithCode unique DOM defined string value for each physical key (e.g.,
-// 'KeyA') (default: "").
-func (p DispatchKeyEventParams) WithCode(code string) *DispatchKeyEventParams {
- p.Code = code
- return &p
-}
-
-// WithKey unique DOM defined string value describing the meaning of the key
-// in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr')
-// (default: "").
-func (p DispatchKeyEventParams) WithKey(key string) *DispatchKeyEventParams {
- p.Key = key
- return &p
-}
-
-// WithWindowsVirtualKeyCode windows virtual key code (default: 0).
-func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams {
- p.WindowsVirtualKeyCode = windowsVirtualKeyCode
- return &p
-}
-
-// WithNativeVirtualKeyCode native virtual key code (default: 0).
-func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams {
- p.NativeVirtualKeyCode = nativeVirtualKeyCode
- return &p
-}
-
-// WithAutoRepeat whether the event was generated from auto repeat (default:
-// false).
-func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams {
- p.AutoRepeat = autoRepeat
- return &p
-}
-
-// WithIsKeypad whether the event was generated from the keypad (default:
-// false).
-func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams {
- p.IsKeypad = isKeypad
- return &p
-}
-
-// WithIsSystemKey whether the event was a system key event (default: false).
-func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams {
- p.IsSystemKey = isSystemKey
- return &p
-}
-
-// WithLocation whether the event was from the left or right side of the
-// keyboard. 1=Left, 2=Right (default: 0).
-func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventParams {
- p.Location = location
- return &p
-}
-
-// WithCommands editing commands to send with the key event (e.g.,
-// 'selectAll') (default: []). These are related to but not equal the command
-// names used in document.execCommand and NSStandardKeyBindingResponding. See
-// https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h
-// for valid command names.
-func (p DispatchKeyEventParams) WithCommands(commands []string) *DispatchKeyEventParams {
- p.Commands = commands
- return &p
-}
-
-// Do executes Input.dispatchKeyEvent against the provided context.
-func (p *DispatchKeyEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchKeyEvent, p, nil)
-}
-
-// InsertTextParams this method emulates inserting text that doesn't come
-// from a key press, for example an emoji keyboard or an IME.
-type InsertTextParams struct {
- Text string `json:"text"` // The text to insert.
-}
-
-// InsertText this method emulates inserting text that doesn't come from a
-// key press, for example an emoji keyboard or an IME.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-insertText
-//
-// parameters:
-// text - The text to insert.
-func InsertText(text string) *InsertTextParams {
- return &InsertTextParams{
- Text: text,
- }
-}
-
-// Do executes Input.insertText against the provided context.
-func (p *InsertTextParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandInsertText, p, nil)
-}
-
-// DispatchMouseEventParams dispatches a mouse event to the page.
-type DispatchMouseEventParams struct {
- Type MouseType `json:"type"` // Type of the mouse event.
- X float64 `json:"x"` // X coordinate of the event relative to the main frame's viewport in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
- Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred.
- Button MouseButton `json:"button,omitempty"` // Mouse button (default: "none").
- Buttons int64 `json:"buttons,omitempty"` // A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
- ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
- Force float64 `json:"force,omitempty"` // The normalized pressure, which has a range of [0,1] (default: 0).
- TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
- TiltX int64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
- TiltY int64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
- Twist int64 `json:"twist,omitempty"` // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
- DeltaX float64 `json:"deltaX"` // X delta in CSS pixels for mouse wheel event (default: 0).
- DeltaY float64 `json:"deltaY"` // Y delta in CSS pixels for mouse wheel event (default: 0).
- PointerType DispatchMouseEventPointerType `json:"pointerType,omitempty"` // Pointer type (default: "mouse").
-}
-
-// DispatchMouseEvent dispatches a mouse event to the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
-//
-// parameters:
-// type - Type of the mouse event.
-// x - X coordinate of the event relative to the main frame's viewport in CSS pixels.
-// y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
-func DispatchMouseEvent(typeVal MouseType, x float64, y float64) *DispatchMouseEventParams {
- return &DispatchMouseEventParams{
- Type: typeVal,
- X: x,
- Y: y,
- }
-}
-
-// WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2,
-// Meta/Command=4, Shift=8 (default: 0).
-func (p DispatchMouseEventParams) WithModifiers(modifiers Modifier) *DispatchMouseEventParams {
- p.Modifiers = modifiers
- return &p
-}
-
-// WithTimestamp time at which the event occurred.
-func (p DispatchMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchMouseEventParams {
- p.Timestamp = timestamp
- return &p
-}
-
-// WithButton mouse button (default: "none").
-func (p DispatchMouseEventParams) WithButton(button MouseButton) *DispatchMouseEventParams {
- p.Button = button
- return &p
-}
-
-// WithButtons a number indicating which buttons are pressed on the mouse
-// when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8,
-// Forward=16, None=0.
-func (p DispatchMouseEventParams) WithButtons(buttons int64) *DispatchMouseEventParams {
- p.Buttons = buttons
- return &p
-}
-
-// WithClickCount number of times the mouse button was clicked (default: 0).
-func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams {
- p.ClickCount = clickCount
- return &p
-}
-
-// WithForce the normalized pressure, which has a range of [0,1] (default:
-// 0).
-func (p DispatchMouseEventParams) WithForce(force float64) *DispatchMouseEventParams {
- p.Force = force
- return &p
-}
-
-// WithTangentialPressure the normalized tangential pressure, which has a
-// range of [-1,1] (default: 0).
-func (p DispatchMouseEventParams) WithTangentialPressure(tangentialPressure float64) *DispatchMouseEventParams {
- p.TangentialPressure = tangentialPressure
- return &p
-}
-
-// WithTiltX the plane angle between the Y-Z plane and the plane containing
-// both the stylus axis and the Y axis, in degrees of the range [-90,90], a
-// positive tiltX is to the right (default: 0).
-func (p DispatchMouseEventParams) WithTiltX(tiltX int64) *DispatchMouseEventParams {
- p.TiltX = tiltX
- return &p
-}
-
-// WithTiltY the plane angle between the X-Z plane and the plane containing
-// both the stylus axis and the X axis, in degrees of the range [-90,90], a
-// positive tiltY is towards the user (default: 0).
-func (p DispatchMouseEventParams) WithTiltY(tiltY int64) *DispatchMouseEventParams {
- p.TiltY = tiltY
- return &p
-}
-
-// WithTwist the clockwise rotation of a pen stylus around its own major
-// axis, in degrees in the range [0,359] (default: 0).
-func (p DispatchMouseEventParams) WithTwist(twist int64) *DispatchMouseEventParams {
- p.Twist = twist
- return &p
-}
-
-// WithDeltaX X delta in CSS pixels for mouse wheel event (default: 0).
-func (p DispatchMouseEventParams) WithDeltaX(deltaX float64) *DispatchMouseEventParams {
- p.DeltaX = deltaX
- return &p
-}
-
-// WithDeltaY Y delta in CSS pixels for mouse wheel event (default: 0).
-func (p DispatchMouseEventParams) WithDeltaY(deltaY float64) *DispatchMouseEventParams {
- p.DeltaY = deltaY
- return &p
-}
-
-// WithPointerType pointer type (default: "mouse").
-func (p DispatchMouseEventParams) WithPointerType(pointerType DispatchMouseEventPointerType) *DispatchMouseEventParams {
- p.PointerType = pointerType
- return &p
-}
-
-// Do executes Input.dispatchMouseEvent against the provided context.
-func (p *DispatchMouseEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchMouseEvent, p, nil)
-}
-
-// DispatchTouchEventParams dispatches a touch event to the page.
-type DispatchTouchEventParams struct {
- Type TouchType `json:"type"` // Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
- TouchPoints []*TouchPoint `json:"touchPoints"` // Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
- Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred.
-}
-
-// DispatchTouchEvent dispatches a touch event to the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
-//
-// parameters:
-// type - Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
-// touchPoints - Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
-func DispatchTouchEvent(typeVal TouchType, touchPoints []*TouchPoint) *DispatchTouchEventParams {
- return &DispatchTouchEventParams{
- Type: typeVal,
- TouchPoints: touchPoints,
- }
-}
-
-// WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2,
-// Meta/Command=4, Shift=8 (default: 0).
-func (p DispatchTouchEventParams) WithModifiers(modifiers Modifier) *DispatchTouchEventParams {
- p.Modifiers = modifiers
- return &p
-}
-
-// WithTimestamp time at which the event occurred.
-func (p DispatchTouchEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchTouchEventParams {
- p.Timestamp = timestamp
- return &p
-}
-
-// Do executes Input.dispatchTouchEvent against the provided context.
-func (p *DispatchTouchEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchTouchEvent, p, nil)
-}
-
-// EmulateTouchFromMouseEventParams emulates touch event from the mouse event
-// parameters.
-type EmulateTouchFromMouseEventParams struct {
- Type MouseType `json:"type"` // Type of the mouse event.
- X int64 `json:"x"` // X coordinate of the mouse pointer in DIP.
- Y int64 `json:"y"` // Y coordinate of the mouse pointer in DIP.
- Button MouseButton `json:"button"` // Mouse button. Only "none", "left", "right" are supported.
- Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred (default: current time).
- DeltaX float64 `json:"deltaX,omitempty"` // X delta in DIP for mouse wheel event (default: 0).
- DeltaY float64 `json:"deltaY,omitempty"` // Y delta in DIP for mouse wheel event (default: 0).
- Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
- ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
-}
-
-// EmulateTouchFromMouseEvent emulates touch event from the mouse event
-// parameters.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent
-//
-// parameters:
-// type - Type of the mouse event.
-// x - X coordinate of the mouse pointer in DIP.
-// y - Y coordinate of the mouse pointer in DIP.
-// button - Mouse button. Only "none", "left", "right" are supported.
-func EmulateTouchFromMouseEvent(typeVal MouseType, x int64, y int64, button MouseButton) *EmulateTouchFromMouseEventParams {
- return &EmulateTouchFromMouseEventParams{
- Type: typeVal,
- X: x,
- Y: y,
- Button: button,
- }
-}
-
-// WithTimestamp time at which the event occurred (default: current time).
-func (p EmulateTouchFromMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *EmulateTouchFromMouseEventParams {
- p.Timestamp = timestamp
- return &p
-}
-
-// WithDeltaX X delta in DIP for mouse wheel event (default: 0).
-func (p EmulateTouchFromMouseEventParams) WithDeltaX(deltaX float64) *EmulateTouchFromMouseEventParams {
- p.DeltaX = deltaX
- return &p
-}
-
-// WithDeltaY Y delta in DIP for mouse wheel event (default: 0).
-func (p EmulateTouchFromMouseEventParams) WithDeltaY(deltaY float64) *EmulateTouchFromMouseEventParams {
- p.DeltaY = deltaY
- return &p
-}
-
-// WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2,
-// Meta/Command=4, Shift=8 (default: 0).
-func (p EmulateTouchFromMouseEventParams) WithModifiers(modifiers Modifier) *EmulateTouchFromMouseEventParams {
- p.Modifiers = modifiers
- return &p
-}
-
-// WithClickCount number of times the mouse button was clicked (default: 0).
-func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *EmulateTouchFromMouseEventParams {
- p.ClickCount = clickCount
- return &p
-}
-
-// Do executes Input.emulateTouchFromMouseEvent against the provided context.
-func (p *EmulateTouchFromMouseEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEmulateTouchFromMouseEvent, p, nil)
-}
-
-// SetIgnoreInputEventsParams ignores input events (useful while auditing
-// page).
-type SetIgnoreInputEventsParams struct {
- Ignore bool `json:"ignore"` // Ignores input events processing when set to true.
-}
-
-// SetIgnoreInputEvents ignores input events (useful while auditing page).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setIgnoreInputEvents
-//
-// parameters:
-// ignore - Ignores input events processing when set to true.
-func SetIgnoreInputEvents(ignore bool) *SetIgnoreInputEventsParams {
- return &SetIgnoreInputEventsParams{
- Ignore: ignore,
- }
-}
-
-// Do executes Input.setIgnoreInputEvents against the provided context.
-func (p *SetIgnoreInputEventsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetIgnoreInputEvents, p, nil)
-}
-
-// SetInterceptDragsParams prevents default drag and drop behavior and
-// instead emits Input.dragIntercepted events. Drag and drop behavior can be
-// directly controlled via Input.dispatchDragEvent.
-type SetInterceptDragsParams struct {
- Enabled bool `json:"enabled"`
-}
-
-// SetInterceptDrags prevents default drag and drop behavior and instead
-// emits Input.dragIntercepted events. Drag and drop behavior can be directly
-// controlled via Input.dispatchDragEvent.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setInterceptDrags
-//
-// parameters:
-// enabled
-func SetInterceptDrags(enabled bool) *SetInterceptDragsParams {
- return &SetInterceptDragsParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Input.setInterceptDrags against the provided context.
-func (p *SetInterceptDragsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetInterceptDrags, p, nil)
-}
-
-// SynthesizePinchGestureParams synthesizes a pinch gesture over a time
-// period by issuing appropriate touch events.
-type SynthesizePinchGestureParams struct {
- X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels.
- ScaleFactor float64 `json:"scaleFactor"` // Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
- RelativeSpeed int64 `json:"relativeSpeed,omitempty"` // Relative pointer speed in pixels per second (default: 800).
- GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
-}
-
-// SynthesizePinchGesture synthesizes a pinch gesture over a time period by
-// issuing appropriate touch events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizePinchGesture
-//
-// parameters:
-// x - X coordinate of the start of the gesture in CSS pixels.
-// y - Y coordinate of the start of the gesture in CSS pixels.
-// scaleFactor - Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
-func SynthesizePinchGesture(x float64, y float64, scaleFactor float64) *SynthesizePinchGestureParams {
- return &SynthesizePinchGestureParams{
- X: x,
- Y: y,
- ScaleFactor: scaleFactor,
- }
-}
-
-// WithRelativeSpeed relative pointer speed in pixels per second (default:
-// 800).
-func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams {
- p.RelativeSpeed = relativeSpeed
- return &p
-}
-
-// WithGestureSourceType which type of input events to be generated (default:
-// 'default', which queries the platform for the preferred input type).
-func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizePinchGestureParams {
- p.GestureSourceType = gestureSourceType
- return &p
-}
-
-// Do executes Input.synthesizePinchGesture against the provided context.
-func (p *SynthesizePinchGestureParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSynthesizePinchGesture, p, nil)
-}
-
-// SynthesizeScrollGestureParams synthesizes a scroll gesture over a time
-// period by issuing appropriate touch events.
-type SynthesizeScrollGestureParams struct {
- X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels.
- XDistance float64 `json:"xDistance,omitempty"` // The distance to scroll along the X axis (positive to scroll left).
- YDistance float64 `json:"yDistance,omitempty"` // The distance to scroll along the Y axis (positive to scroll up).
- XOverscroll float64 `json:"xOverscroll,omitempty"` // The number of additional pixels to scroll back along the X axis, in addition to the given distance.
- YOverscroll float64 `json:"yOverscroll,omitempty"` // The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
- PreventFling bool `json:"preventFling,omitempty"` // Prevent fling (default: true).
- Speed int64 `json:"speed,omitempty"` // Swipe speed in pixels per second (default: 800).
- GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
- RepeatCount int64 `json:"repeatCount,omitempty"` // The number of times to repeat the gesture (default: 0).
- RepeatDelayMs int64 `json:"repeatDelayMs,omitempty"` // The number of milliseconds delay between each repeat. (default: 250).
- InteractionMarkerName string `json:"interactionMarkerName,omitempty"` // The name of the interaction markers to generate, if not empty (default: "").
-}
-
-// SynthesizeScrollGesture synthesizes a scroll gesture over a time period by
-// issuing appropriate touch events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeScrollGesture
-//
-// parameters:
-// x - X coordinate of the start of the gesture in CSS pixels.
-// y - Y coordinate of the start of the gesture in CSS pixels.
-func SynthesizeScrollGesture(x float64, y float64) *SynthesizeScrollGestureParams {
- return &SynthesizeScrollGestureParams{
- X: x,
- Y: y,
- }
-}
-
-// WithXDistance the distance to scroll along the X axis (positive to scroll
-// left).
-func (p SynthesizeScrollGestureParams) WithXDistance(xDistance float64) *SynthesizeScrollGestureParams {
- p.XDistance = xDistance
- return &p
-}
-
-// WithYDistance the distance to scroll along the Y axis (positive to scroll
-// up).
-func (p SynthesizeScrollGestureParams) WithYDistance(yDistance float64) *SynthesizeScrollGestureParams {
- p.YDistance = yDistance
- return &p
-}
-
-// WithXOverscroll the number of additional pixels to scroll back along the X
-// axis, in addition to the given distance.
-func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll float64) *SynthesizeScrollGestureParams {
- p.XOverscroll = xOverscroll
- return &p
-}
-
-// WithYOverscroll the number of additional pixels to scroll back along the Y
-// axis, in addition to the given distance.
-func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll float64) *SynthesizeScrollGestureParams {
- p.YOverscroll = yOverscroll
- return &p
-}
-
-// WithPreventFling prevent fling (default: true).
-func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams {
- p.PreventFling = preventFling
- return &p
-}
-
-// WithSpeed swipe speed in pixels per second (default: 800).
-func (p SynthesizeScrollGestureParams) WithSpeed(speed int64) *SynthesizeScrollGestureParams {
- p.Speed = speed
- return &p
-}
-
-// WithGestureSourceType which type of input events to be generated (default:
-// 'default', which queries the platform for the preferred input type).
-func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeScrollGestureParams {
- p.GestureSourceType = gestureSourceType
- return &p
-}
-
-// WithRepeatCount the number of times to repeat the gesture (default: 0).
-func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams {
- p.RepeatCount = repeatCount
- return &p
-}
-
-// WithRepeatDelayMs the number of milliseconds delay between each repeat.
-// (default: 250).
-func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams {
- p.RepeatDelayMs = repeatDelayMs
- return &p
-}
-
-// WithInteractionMarkerName the name of the interaction markers to generate,
-// if not empty (default: "").
-func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams {
- p.InteractionMarkerName = interactionMarkerName
- return &p
-}
-
-// Do executes Input.synthesizeScrollGesture against the provided context.
-func (p *SynthesizeScrollGestureParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSynthesizeScrollGesture, p, nil)
-}
-
-// SynthesizeTapGestureParams synthesizes a tap gesture over a time period by
-// issuing appropriate touch events.
-type SynthesizeTapGestureParams struct {
- X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels.
- Duration int64 `json:"duration,omitempty"` // Duration between touchdown and touchup events in ms (default: 50).
- TapCount int64 `json:"tapCount,omitempty"` // Number of times to perform the tap (e.g. 2 for double tap, default: 1).
- GestureSourceType GestureSourceType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
-}
-
-// SynthesizeTapGesture synthesizes a tap gesture over a time period by
-// issuing appropriate touch events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeTapGesture
-//
-// parameters:
-// x - X coordinate of the start of the gesture in CSS pixels.
-// y - Y coordinate of the start of the gesture in CSS pixels.
-func SynthesizeTapGesture(x float64, y float64) *SynthesizeTapGestureParams {
- return &SynthesizeTapGestureParams{
- X: x,
- Y: y,
- }
-}
-
-// WithDuration duration between touchdown and touchup events in ms (default:
-// 50).
-func (p SynthesizeTapGestureParams) WithDuration(duration int64) *SynthesizeTapGestureParams {
- p.Duration = duration
- return &p
-}
-
-// WithTapCount number of times to perform the tap (e.g. 2 for double tap,
-// default: 1).
-func (p SynthesizeTapGestureParams) WithTapCount(tapCount int64) *SynthesizeTapGestureParams {
- p.TapCount = tapCount
- return &p
-}
-
-// WithGestureSourceType which type of input events to be generated (default:
-// 'default', which queries the platform for the preferred input type).
-func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureSourceType) *SynthesizeTapGestureParams {
- p.GestureSourceType = gestureSourceType
- return &p
-}
-
-// Do executes Input.synthesizeTapGesture against the provided context.
-func (p *SynthesizeTapGestureParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSynthesizeTapGesture, p, nil)
-}
-
-// Command names.
-const (
- CommandDispatchDragEvent = "Input.dispatchDragEvent"
- CommandDispatchKeyEvent = "Input.dispatchKeyEvent"
- CommandInsertText = "Input.insertText"
- CommandDispatchMouseEvent = "Input.dispatchMouseEvent"
- CommandDispatchTouchEvent = "Input.dispatchTouchEvent"
- CommandEmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent"
- CommandSetIgnoreInputEvents = "Input.setIgnoreInputEvents"
- CommandSetInterceptDrags = "Input.setInterceptDrags"
- CommandSynthesizePinchGesture = "Input.synthesizePinchGesture"
- CommandSynthesizeScrollGesture = "Input.synthesizeScrollGesture"
- CommandSynthesizeTapGesture = "Input.synthesizeTapGesture"
-)
diff --git a/vendor/github.com/chromedp/cdproto/input/types.go b/vendor/github.com/chromedp/cdproto/input/types.go
deleted file mode 100644
index f0830587af7..00000000000
--- a/vendor/github.com/chromedp/cdproto/input/types.go
+++ /dev/null
@@ -1,505 +0,0 @@
-package input
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
- "fmt"
- "strconv"
- "time"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// TouchPoint [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TouchPoint
-type TouchPoint struct {
- X float64 `json:"x"` // X coordinate of the event relative to the main frame's viewport in CSS pixels.
- Y float64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
- RadiusX float64 `json:"radiusX,omitempty"` // X radius of the touch area (default: 1.0).
- RadiusY float64 `json:"radiusY,omitempty"` // Y radius of the touch area (default: 1.0).
- RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0).
- Force float64 `json:"force,omitempty"` // Force (default: 1.0).
- TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
- TiltX int64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
- TiltY int64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
- Twist int64 `json:"twist,omitempty"` // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
- ID float64 `json:"id,omitempty"` // Identifier used to track touch sources between events, must be unique within an event.
-}
-
-// GestureSourceType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-GestureSourceType
-type GestureSourceType string
-
-// String returns the GestureSourceType as string value.
-func (t GestureSourceType) String() string {
- return string(t)
-}
-
-// GestureSourceType values.
-const (
- GestureDefault GestureSourceType = "default"
- GestureTouch GestureSourceType = "touch"
- GestureMouse GestureSourceType = "mouse"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t GestureSourceType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t GestureSourceType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch GestureSourceType(in.String()) {
- case GestureDefault:
- *t = GestureDefault
- case GestureTouch:
- *t = GestureTouch
- case GestureMouse:
- *t = GestureMouse
-
- default:
- in.AddError(errors.New("unknown GestureSourceType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *GestureSourceType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MouseButton [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-MouseButton
-type MouseButton string
-
-// String returns the MouseButton as string value.
-func (t MouseButton) String() string {
- return string(t)
-}
-
-// MouseButton values.
-const (
- None MouseButton = "none"
- Left MouseButton = "left"
- Middle MouseButton = "middle"
- Right MouseButton = "right"
- Back MouseButton = "back"
- Forward MouseButton = "forward"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MouseButton) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MouseButton) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MouseButton(in.String()) {
- case None:
- *t = None
- case Left:
- *t = Left
- case Middle:
- *t = Middle
- case Right:
- *t = Right
- case Back:
- *t = Back
- case Forward:
- *t = Forward
-
- default:
- in.AddError(errors.New("unknown MouseButton value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MouseButton) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TimeSinceEpoch
-type TimeSinceEpoch time.Time
-
-// Time returns the TimeSinceEpoch as time.Time value.
-func (t TimeSinceEpoch) Time() time.Time {
- return time.Time(t)
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TimeSinceEpoch) MarshalEasyJSON(out *jwriter.Writer) {
- v := float64(time.Time(t).UnixNano() / int64(time.Second))
-
- out.Buffer.EnsureSpace(20)
- out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64)
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TimeSinceEpoch) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TimeSinceEpoch) UnmarshalEasyJSON(in *jlexer.Lexer) {
- *t = TimeSinceEpoch(time.Unix(0, int64(in.Float64()*float64(time.Second))))
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DragDataItem [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragDataItem
-type DragDataItem struct {
- MimeType string `json:"mimeType"` // Mime type of the dragged data.
- Data string `json:"data"` // Depending of the value of mimeType, it contains the dragged link, text, HTML markup or any other data.
- Title string `json:"title,omitempty"` // Title associated with a link. Only valid when mimeType == "text/uri-list".
- BaseURL string `json:"baseURL,omitempty"` // Stores the base URL for the contained markup. Only valid when mimeType == "text/html".
-}
-
-// DragData [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragData
-type DragData struct {
- Items []*DragDataItem `json:"items"`
- DragOperationsMask int64 `json:"dragOperationsMask"` // Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
-}
-
-// Modifier input key modifier type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
-type Modifier int64
-
-// Int64 returns the Modifier as int64 value.
-func (t Modifier) Int64() int64 {
- return int64(t)
-}
-
-// Modifier values.
-const (
- ModifierNone Modifier = 0
- ModifierAlt Modifier = 1
- ModifierCtrl Modifier = 2
- ModifierMeta Modifier = 4
- ModifierShift Modifier = 8
-)
-
-// String returns the Modifier as string value.
-func (t Modifier) String() string {
- switch t {
- case ModifierNone:
- return "None"
- case ModifierAlt:
- return "Alt"
- case ModifierCtrl:
- return "Ctrl"
- case ModifierMeta:
- return "Meta"
- case ModifierShift:
- return "Shift"
- }
-
- return fmt.Sprintf("Modifier(%d)", t)
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Modifier) MarshalEasyJSON(out *jwriter.Writer) {
- out.Int64(int64(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Modifier) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Modifier(in.Int64()) {
- case ModifierNone:
- *t = ModifierNone
- case ModifierAlt:
- *t = ModifierAlt
- case ModifierCtrl:
- *t = ModifierCtrl
- case ModifierMeta:
- *t = ModifierMeta
- case ModifierShift:
- *t = ModifierShift
-
- default:
- in.AddError(errors.New("unknown Modifier value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Modifier) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ModifierCommand is an alias for ModifierMeta.
-const ModifierCommand Modifier = ModifierMeta
-
-// DispatchDragEventType type of the drag event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent
-type DispatchDragEventType string
-
-// String returns the DispatchDragEventType as string value.
-func (t DispatchDragEventType) String() string {
- return string(t)
-}
-
-// DispatchDragEventType values.
-const (
- DragEnter DispatchDragEventType = "dragEnter"
- DragOver DispatchDragEventType = "dragOver"
- Drop DispatchDragEventType = "drop"
- DragCancel DispatchDragEventType = "dragCancel"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DispatchDragEventType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DispatchDragEventType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DispatchDragEventType(in.String()) {
- case DragEnter:
- *t = DragEnter
- case DragOver:
- *t = DragOver
- case Drop:
- *t = Drop
- case DragCancel:
- *t = DragCancel
-
- default:
- in.AddError(errors.New("unknown DispatchDragEventType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DispatchDragEventType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// KeyType type of the key event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
-type KeyType string
-
-// String returns the KeyType as string value.
-func (t KeyType) String() string {
- return string(t)
-}
-
-// KeyType values.
-const (
- KeyDown KeyType = "keyDown"
- KeyUp KeyType = "keyUp"
- KeyRawDown KeyType = "rawKeyDown"
- KeyChar KeyType = "char"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t KeyType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t KeyType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch KeyType(in.String()) {
- case KeyDown:
- *t = KeyDown
- case KeyUp:
- *t = KeyUp
- case KeyRawDown:
- *t = KeyRawDown
- case KeyChar:
- *t = KeyChar
-
- default:
- in.AddError(errors.New("unknown KeyType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *KeyType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MouseType type of the mouse event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
-type MouseType string
-
-// String returns the MouseType as string value.
-func (t MouseType) String() string {
- return string(t)
-}
-
-// MouseType values.
-const (
- MousePressed MouseType = "mousePressed"
- MouseReleased MouseType = "mouseReleased"
- MouseMoved MouseType = "mouseMoved"
- MouseWheel MouseType = "mouseWheel"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MouseType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MouseType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MouseType(in.String()) {
- case MousePressed:
- *t = MousePressed
- case MouseReleased:
- *t = MouseReleased
- case MouseMoved:
- *t = MouseMoved
- case MouseWheel:
- *t = MouseWheel
-
- default:
- in.AddError(errors.New("unknown MouseType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MouseType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// DispatchMouseEventPointerType pointer type (default: "mouse").
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
-type DispatchMouseEventPointerType string
-
-// String returns the DispatchMouseEventPointerType as string value.
-func (t DispatchMouseEventPointerType) String() string {
- return string(t)
-}
-
-// DispatchMouseEventPointerType values.
-const (
- Mouse DispatchMouseEventPointerType = "mouse"
- Pen DispatchMouseEventPointerType = "pen"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DispatchMouseEventPointerType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DispatchMouseEventPointerType(in.String()) {
- case Mouse:
- *t = Mouse
- case Pen:
- *t = Pen
-
- default:
- in.AddError(errors.New("unknown DispatchMouseEventPointerType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DispatchMouseEventPointerType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TouchType type of the touch event. TouchEnd and TouchCancel must not
-// contain any touch points, while TouchStart and TouchMove must contains at
-// least one.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
-type TouchType string
-
-// String returns the TouchType as string value.
-func (t TouchType) String() string {
- return string(t)
-}
-
-// TouchType values.
-const (
- TouchStart TouchType = "touchStart"
- TouchEnd TouchType = "touchEnd"
- TouchMove TouchType = "touchMove"
- TouchCancel TouchType = "touchCancel"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TouchType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TouchType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TouchType(in.String()) {
- case TouchStart:
- *t = TouchStart
- case TouchEnd:
- *t = TouchEnd
- case TouchMove:
- *t = TouchMove
- case TouchCancel:
- *t = TouchCancel
-
- default:
- in.AddError(errors.New("unknown TouchType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TouchType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/inspector/easyjson.go b/vendor/github.com/chromedp/cdproto/inspector/easyjson.go
deleted file mode 100644
index 558730c582f..00000000000
--- a/vendor/github.com/chromedp/cdproto/inspector/easyjson.go
+++ /dev/null
@@ -1,321 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package inspector
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector(in *jlexer.Lexer, out *EventTargetReloadedAfterCrash) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector(out *jwriter.Writer, in EventTargetReloadedAfterCrash) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetReloadedAfterCrash) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetReloadedAfterCrash) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetReloadedAfterCrash) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetReloadedAfterCrash) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector1(in *jlexer.Lexer, out *EventTargetCrashed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector1(out *jwriter.Writer, in EventTargetCrashed) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetCrashed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetCrashed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetCrashed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetCrashed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector2(in *jlexer.Lexer, out *EventDetached) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector2(out *jwriter.Writer, in EventDetached) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix[1:])
- (in.Reason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDetached) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDetached) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDetached) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDetached) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector3(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector3(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector4(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector4(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoInspector4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoInspector4(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/inspector/events.go b/vendor/github.com/chromedp/cdproto/inspector/events.go
deleted file mode 100644
index a4c660b9837..00000000000
--- a/vendor/github.com/chromedp/cdproto/inspector/events.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package inspector
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventDetached fired when remote debugging connection is about to be
-// terminated. Contains detach reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#event-detached
-type EventDetached struct {
- Reason DetachReason `json:"reason"` // The reason why connection has been terminated.
-}
-
-// EventTargetCrashed fired when debugging target has crashed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#event-targetCrashed
-type EventTargetCrashed struct{}
-
-// EventTargetReloadedAfterCrash fired when debugging target has reloaded
-// after crash.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#event-targetReloadedAfterCrash
-type EventTargetReloadedAfterCrash struct{}
diff --git a/vendor/github.com/chromedp/cdproto/inspector/inspector.go b/vendor/github.com/chromedp/cdproto/inspector/inspector.go
deleted file mode 100644
index 4461dd69f27..00000000000
--- a/vendor/github.com/chromedp/cdproto/inspector/inspector.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Package inspector provides the Chrome DevTools Protocol
-// commands, types, and events for the Inspector domain.
-//
-// Generated by the cdproto-gen command.
-package inspector
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DisableParams disables inspector domain notifications.
-type DisableParams struct{}
-
-// Disable disables inspector domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Inspector.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables inspector domain notifications.
-type EnableParams struct{}
-
-// Enable enables inspector domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Inspector#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Inspector.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// Command names.
-const (
- CommandDisable = "Inspector.disable"
- CommandEnable = "Inspector.enable"
-)
diff --git a/vendor/github.com/chromedp/cdproto/inspector/types.go b/vendor/github.com/chromedp/cdproto/inspector/types.go
deleted file mode 100644
index b8d426f6c39..00000000000
--- a/vendor/github.com/chromedp/cdproto/inspector/types.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package inspector
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// DetachReason detach reason.
-//
-// See: ( -- none -- )
-type DetachReason string
-
-// String returns the DetachReason as string value.
-func (t DetachReason) String() string {
- return string(t)
-}
-
-// DetachReason values.
-const (
- DetachReasonTargetClosed DetachReason = "target_closed"
- DetachReasonCanceledByUser DetachReason = "canceled_by_user"
- DetachReasonReplacedWithDevtools DetachReason = "replaced_with_devtools"
- DetachReasonRenderProcessGone DetachReason = "Render process gone."
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DetachReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DetachReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DetachReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DetachReason(in.String()) {
- case DetachReasonTargetClosed:
- *t = DetachReasonTargetClosed
- case DetachReasonCanceledByUser:
- *t = DetachReasonCanceledByUser
- case DetachReasonReplacedWithDevtools:
- *t = DetachReasonReplacedWithDevtools
- case DetachReasonRenderProcessGone:
- *t = DetachReasonRenderProcessGone
-
- default:
- in.AddError(errors.New("unknown DetachReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DetachReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/io/easyjson.go b/vendor/github.com/chromedp/cdproto/io/easyjson.go
deleted file mode 100644
index 2481c07562f..00000000000
--- a/vendor/github.com/chromedp/cdproto/io/easyjson.go
+++ /dev/null
@@ -1,390 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package io
-
-import (
- json "encoding/json"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo(in *jlexer.Lexer, out *ResolveBlobReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "uuid":
- out.UUID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo(out *jwriter.Writer, in ResolveBlobReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.UUID != "" {
- const prefix string = ",\"uuid\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.UUID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveBlobReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveBlobReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveBlobReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveBlobReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo1(in *jlexer.Lexer, out *ResolveBlobParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo1(out *jwriter.Writer, in ResolveBlobParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResolveBlobParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResolveBlobParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResolveBlobParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResolveBlobParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo2(in *jlexer.Lexer, out *ReadReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "base64Encoded":
- out.Base64encoded = bool(in.Bool())
- case "data":
- out.Data = string(in.String())
- case "eof":
- out.EOF = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo2(out *jwriter.Writer, in ReadReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Base64encoded {
- const prefix string = ",\"base64Encoded\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.Base64encoded))
- }
- if in.Data != "" {
- const prefix string = ",\"data\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Data))
- }
- if in.EOF {
- const prefix string = ",\"eof\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.EOF))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReadReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReadReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReadReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReadReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo3(in *jlexer.Lexer, out *ReadParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "handle":
- out.Handle = StreamHandle(in.String())
- case "offset":
- out.Offset = int64(in.Int64())
- case "size":
- out.Size = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo3(out *jwriter.Writer, in ReadParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"handle\":"
- out.RawString(prefix[1:])
- out.String(string(in.Handle))
- }
- if in.Offset != 0 {
- const prefix string = ",\"offset\":"
- out.RawString(prefix)
- out.Int64(int64(in.Offset))
- }
- if in.Size != 0 {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Int64(int64(in.Size))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReadParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReadParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReadParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo4(in *jlexer.Lexer, out *CloseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "handle":
- out.Handle = StreamHandle(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo4(out *jwriter.Writer, in CloseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"handle\":"
- out.RawString(prefix[1:])
- out.String(string(in.Handle))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CloseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoIo4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CloseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoIo4(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/io/io.go b/vendor/github.com/chromedp/cdproto/io/io.go
deleted file mode 100644
index f7f42d3ef37..00000000000
--- a/vendor/github.com/chromedp/cdproto/io/io.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Package io provides the Chrome DevTools Protocol
-// commands, types, and events for the IO domain.
-//
-// Input/Output operations for streams produced by DevTools.
-//
-// Generated by the cdproto-gen command.
-package io
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// CloseParams close the stream, discard any temporary backing storage.
-type CloseParams struct {
- Handle StreamHandle `json:"handle"` // Handle of the stream to close.
-}
-
-// Close close the stream, discard any temporary backing storage.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-close
-//
-// parameters:
-// handle - Handle of the stream to close.
-func Close(handle StreamHandle) *CloseParams {
- return &CloseParams{
- Handle: handle,
- }
-}
-
-// Do executes IO.close against the provided context.
-func (p *CloseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClose, p, nil)
-}
-
-// ReadParams read a chunk of the stream.
-type ReadParams struct {
- Handle StreamHandle `json:"handle"` // Handle of the stream to read.
- Offset int64 `json:"offset,omitempty"` // Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads.
- Size int64 `json:"size,omitempty"` // Maximum number of bytes to read (left upon the agent discretion if not specified).
-}
-
-// Read read a chunk of the stream.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-read
-//
-// parameters:
-// handle - Handle of the stream to read.
-func Read(handle StreamHandle) *ReadParams {
- return &ReadParams{
- Handle: handle,
- }
-}
-
-// WithOffset seek to the specified offset before reading (if not specificed,
-// proceed with offset following the last read). Some types of streams may only
-// support sequential reads.
-func (p ReadParams) WithOffset(offset int64) *ReadParams {
- p.Offset = offset
- return &p
-}
-
-// WithSize maximum number of bytes to read (left upon the agent discretion
-// if not specified).
-func (p ReadParams) WithSize(size int64) *ReadParams {
- p.Size = size
- return &p
-}
-
-// ReadReturns return values.
-type ReadReturns struct {
- Base64encoded bool `json:"base64Encoded,omitempty"` // Set if the data is base64-encoded
- Data string `json:"data,omitempty"` // Data that were read.
- EOF bool `json:"eof,omitempty"` // Set if the end-of-file condition occurred while reading.
-}
-
-// Do executes IO.read against the provided context.
-//
-// returns:
-// data - Data that were read.
-// eof - Set if the end-of-file condition occurred while reading.
-func (p *ReadParams) Do(ctx context.Context) (data string, eof bool, err error) {
- // execute
- var res ReadReturns
- err = cdp.Execute(ctx, CommandRead, p, &res)
- if err != nil {
- return "", false, err
- }
-
- return res.Data, res.EOF, nil
-}
-
-// ResolveBlobParams return UUID of Blob object specified by a remote object
-// id.
-type ResolveBlobParams struct {
- ObjectID runtime.RemoteObjectID `json:"objectId"` // Object id of a Blob object wrapper.
-}
-
-// ResolveBlob return UUID of Blob object specified by a remote object id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-resolveBlob
-//
-// parameters:
-// objectID - Object id of a Blob object wrapper.
-func ResolveBlob(objectID runtime.RemoteObjectID) *ResolveBlobParams {
- return &ResolveBlobParams{
- ObjectID: objectID,
- }
-}
-
-// ResolveBlobReturns return values.
-type ResolveBlobReturns struct {
- UUID string `json:"uuid,omitempty"` // UUID of the specified Blob.
-}
-
-// Do executes IO.resolveBlob against the provided context.
-//
-// returns:
-// uuid - UUID of the specified Blob.
-func (p *ResolveBlobParams) Do(ctx context.Context) (uuid string, err error) {
- // execute
- var res ResolveBlobReturns
- err = cdp.Execute(ctx, CommandResolveBlob, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.UUID, nil
-}
-
-// Command names.
-const (
- CommandClose = "IO.close"
- CommandRead = "IO.read"
- CommandResolveBlob = "IO.resolveBlob"
-)
diff --git a/vendor/github.com/chromedp/cdproto/io/types.go b/vendor/github.com/chromedp/cdproto/io/types.go
deleted file mode 100644
index 5f45a6c71fb..00000000000
--- a/vendor/github.com/chromedp/cdproto/io/types.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package io
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// StreamHandle this is either obtained from another method or specified as
-// blob: where is an UUID of a Blob.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#type-StreamHandle
-type StreamHandle string
-
-// String returns the StreamHandle as string value.
-func (t StreamHandle) String() string {
- return string(t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/layertree/easyjson.go b/vendor/github.com/chromedp/cdproto/layertree/easyjson.go
deleted file mode 100644
index 88578357e38..00000000000
--- a/vendor/github.com/chromedp/cdproto/layertree/easyjson.go
+++ /dev/null
@@ -1,1939 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package layertree
-
-import (
- json "encoding/json"
- dom "github.com/chromedp/cdproto/dom"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(in *jlexer.Lexer, out *StickyPositionConstraint) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "stickyBoxRect":
- if in.IsNull() {
- in.Skip()
- out.StickyBoxRect = nil
- } else {
- if out.StickyBoxRect == nil {
- out.StickyBoxRect = new(dom.Rect)
- }
- (*out.StickyBoxRect).UnmarshalEasyJSON(in)
- }
- case "containingBlockRect":
- if in.IsNull() {
- in.Skip()
- out.ContainingBlockRect = nil
- } else {
- if out.ContainingBlockRect == nil {
- out.ContainingBlockRect = new(dom.Rect)
- }
- (*out.ContainingBlockRect).UnmarshalEasyJSON(in)
- }
- case "nearestLayerShiftingStickyBox":
- out.NearestLayerShiftingStickyBox = LayerID(in.String())
- case "nearestLayerShiftingContainingBlock":
- out.NearestLayerShiftingContainingBlock = LayerID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(out *jwriter.Writer, in StickyPositionConstraint) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"stickyBoxRect\":"
- out.RawString(prefix[1:])
- if in.StickyBoxRect == nil {
- out.RawString("null")
- } else {
- (*in.StickyBoxRect).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"containingBlockRect\":"
- out.RawString(prefix)
- if in.ContainingBlockRect == nil {
- out.RawString("null")
- } else {
- (*in.ContainingBlockRect).MarshalEasyJSON(out)
- }
- }
- if in.NearestLayerShiftingStickyBox != "" {
- const prefix string = ",\"nearestLayerShiftingStickyBox\":"
- out.RawString(prefix)
- out.String(string(in.NearestLayerShiftingStickyBox))
- }
- if in.NearestLayerShiftingContainingBlock != "" {
- const prefix string = ",\"nearestLayerShiftingContainingBlock\":"
- out.RawString(prefix)
- out.String(string(in.NearestLayerShiftingContainingBlock))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StickyPositionConstraint) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StickyPositionConstraint) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StickyPositionConstraint) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StickyPositionConstraint) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(in *jlexer.Lexer, out *SnapshotCommandLogReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "commandLog":
- if in.IsNull() {
- in.Skip()
- out.CommandLog = nil
- } else {
- in.Delim('[')
- if out.CommandLog == nil {
- if !in.IsDelim(']') {
- out.CommandLog = make([]easyjson.RawMessage, 0, 2)
- } else {
- out.CommandLog = []easyjson.RawMessage{}
- }
- } else {
- out.CommandLog = (out.CommandLog)[:0]
- }
- for !in.IsDelim(']') {
- var v1 easyjson.RawMessage
- (v1).UnmarshalEasyJSON(in)
- out.CommandLog = append(out.CommandLog, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(out *jwriter.Writer, in SnapshotCommandLogReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.CommandLog) != 0 {
- const prefix string = ",\"commandLog\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.CommandLog {
- if v2 > 0 {
- out.RawByte(',')
- }
- (v3).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SnapshotCommandLogReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SnapshotCommandLogReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SnapshotCommandLogReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SnapshotCommandLogReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(in *jlexer.Lexer, out *SnapshotCommandLogParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(out *jwriter.Writer, in SnapshotCommandLogParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"snapshotId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SnapshotCommandLogParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SnapshotCommandLogParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SnapshotCommandLogParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SnapshotCommandLogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(in *jlexer.Lexer, out *ScrollRect) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rect":
- if in.IsNull() {
- in.Skip()
- out.Rect = nil
- } else {
- if out.Rect == nil {
- out.Rect = new(dom.Rect)
- }
- (*out.Rect).UnmarshalEasyJSON(in)
- }
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(out *jwriter.Writer, in ScrollRect) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"rect\":"
- out.RawString(prefix[1:])
- if in.Rect == nil {
- out.RawString("null")
- } else {
- (*in.Rect).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScrollRect) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScrollRect) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScrollRect) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScrollRect) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(in *jlexer.Lexer, out *ReplaySnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "dataURL":
- out.DataURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(out *jwriter.Writer, in ReplaySnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DataURL != "" {
- const prefix string = ",\"dataURL\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.DataURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReplaySnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReplaySnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReplaySnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReplaySnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(in *jlexer.Lexer, out *ReplaySnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- case "fromStep":
- out.FromStep = int64(in.Int64())
- case "toStep":
- out.ToStep = int64(in.Int64())
- case "scale":
- out.Scale = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(out *jwriter.Writer, in ReplaySnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"snapshotId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- if in.FromStep != 0 {
- const prefix string = ",\"fromStep\":"
- out.RawString(prefix)
- out.Int64(int64(in.FromStep))
- }
- if in.ToStep != 0 {
- const prefix string = ",\"toStep\":"
- out.RawString(prefix)
- out.Int64(int64(in.ToStep))
- }
- if in.Scale != 0 {
- const prefix string = ",\"scale\":"
- out.RawString(prefix)
- out.Float64(float64(in.Scale))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReplaySnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReplaySnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReplaySnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReplaySnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(in *jlexer.Lexer, out *ReleaseSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(out *jwriter.Writer, in ReleaseSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"snapshotId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReleaseSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReleaseSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReleaseSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReleaseSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(in *jlexer.Lexer, out *ProfileSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timings":
- if in.IsNull() {
- in.Skip()
- out.Timings = nil
- } else {
- in.Delim('[')
- if out.Timings == nil {
- if !in.IsDelim(']') {
- out.Timings = make([]PaintProfile, 0, 2)
- } else {
- out.Timings = []PaintProfile{}
- }
- } else {
- out.Timings = (out.Timings)[:0]
- }
- for !in.IsDelim(']') {
- var v4 PaintProfile
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- in.Delim('[')
- if v4 == nil {
- if !in.IsDelim(']') {
- v4 = make(PaintProfile, 0, 8)
- } else {
- v4 = PaintProfile{}
- }
- } else {
- v4 = (v4)[:0]
- }
- for !in.IsDelim(']') {
- var v5 float64
- v5 = float64(in.Float64())
- v4 = append(v4, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- out.Timings = append(out.Timings, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(out *jwriter.Writer, in ProfileSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Timings) != 0 {
- const prefix string = ",\"timings\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v6, v7 := range in.Timings {
- if v6 > 0 {
- out.RawByte(',')
- }
- if v7 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range v7 {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ProfileSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ProfileSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ProfileSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ProfileSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(in *jlexer.Lexer, out *ProfileSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- case "minRepeatCount":
- out.MinRepeatCount = int64(in.Int64())
- case "minDuration":
- out.MinDuration = float64(in.Float64())
- case "clipRect":
- if in.IsNull() {
- in.Skip()
- out.ClipRect = nil
- } else {
- if out.ClipRect == nil {
- out.ClipRect = new(dom.Rect)
- }
- (*out.ClipRect).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(out *jwriter.Writer, in ProfileSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"snapshotId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- if in.MinRepeatCount != 0 {
- const prefix string = ",\"minRepeatCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.MinRepeatCount))
- }
- if in.MinDuration != 0 {
- const prefix string = ",\"minDuration\":"
- out.RawString(prefix)
- out.Float64(float64(in.MinDuration))
- }
- if in.ClipRect != nil {
- const prefix string = ",\"clipRect\":"
- out.RawString(prefix)
- (*in.ClipRect).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ProfileSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ProfileSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ProfileSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ProfileSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(in *jlexer.Lexer, out *PictureTile) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "picture":
- out.Picture = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(out *jwriter.Writer, in PictureTile) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"picture\":"
- out.RawString(prefix)
- out.String(string(in.Picture))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PictureTile) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PictureTile) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PictureTile) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PictureTile) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(in *jlexer.Lexer, out *MakeSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(out *jwriter.Writer, in MakeSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SnapshotID != "" {
- const prefix string = ",\"snapshotId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MakeSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MakeSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MakeSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MakeSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(in *jlexer.Lexer, out *MakeSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layerId":
- out.LayerID = LayerID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(out *jwriter.Writer, in MakeSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LayerID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MakeSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MakeSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MakeSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MakeSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(in *jlexer.Lexer, out *LoadSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapshotId":
- out.SnapshotID = SnapshotID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(out *jwriter.Writer, in LoadSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SnapshotID != "" {
- const prefix string = ",\"snapshotId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SnapshotID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(in *jlexer.Lexer, out *LoadSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "tiles":
- if in.IsNull() {
- in.Skip()
- out.Tiles = nil
- } else {
- in.Delim('[')
- if out.Tiles == nil {
- if !in.IsDelim(']') {
- out.Tiles = make([]*PictureTile, 0, 8)
- } else {
- out.Tiles = []*PictureTile{}
- }
- } else {
- out.Tiles = (out.Tiles)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *PictureTile
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(PictureTile)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Tiles = append(out.Tiles, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(out *jwriter.Writer, in LoadSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"tiles\":"
- out.RawString(prefix[1:])
- if in.Tiles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Tiles {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(in *jlexer.Lexer, out *Layer) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layerId":
- out.LayerID = LayerID(in.String())
- case "parentLayerId":
- out.ParentLayerID = LayerID(in.String())
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "offsetX":
- out.OffsetX = float64(in.Float64())
- case "offsetY":
- out.OffsetY = float64(in.Float64())
- case "width":
- out.Width = float64(in.Float64())
- case "height":
- out.Height = float64(in.Float64())
- case "transform":
- if in.IsNull() {
- in.Skip()
- out.Transform = nil
- } else {
- in.Delim('[')
- if out.Transform == nil {
- if !in.IsDelim(']') {
- out.Transform = make([]float64, 0, 8)
- } else {
- out.Transform = []float64{}
- }
- } else {
- out.Transform = (out.Transform)[:0]
- }
- for !in.IsDelim(']') {
- var v13 float64
- v13 = float64(in.Float64())
- out.Transform = append(out.Transform, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "anchorX":
- out.AnchorX = float64(in.Float64())
- case "anchorY":
- out.AnchorY = float64(in.Float64())
- case "anchorZ":
- out.AnchorZ = float64(in.Float64())
- case "paintCount":
- out.PaintCount = int64(in.Int64())
- case "drawsContent":
- out.DrawsContent = bool(in.Bool())
- case "invisible":
- out.Invisible = bool(in.Bool())
- case "scrollRects":
- if in.IsNull() {
- in.Skip()
- out.ScrollRects = nil
- } else {
- in.Delim('[')
- if out.ScrollRects == nil {
- if !in.IsDelim(']') {
- out.ScrollRects = make([]*ScrollRect, 0, 8)
- } else {
- out.ScrollRects = []*ScrollRect{}
- }
- } else {
- out.ScrollRects = (out.ScrollRects)[:0]
- }
- for !in.IsDelim(']') {
- var v14 *ScrollRect
- if in.IsNull() {
- in.Skip()
- v14 = nil
- } else {
- if v14 == nil {
- v14 = new(ScrollRect)
- }
- (*v14).UnmarshalEasyJSON(in)
- }
- out.ScrollRects = append(out.ScrollRects, v14)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "stickyPositionConstraint":
- if in.IsNull() {
- in.Skip()
- out.StickyPositionConstraint = nil
- } else {
- if out.StickyPositionConstraint == nil {
- out.StickyPositionConstraint = new(StickyPositionConstraint)
- }
- (*out.StickyPositionConstraint).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(out *jwriter.Writer, in Layer) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LayerID))
- }
- if in.ParentLayerID != "" {
- const prefix string = ",\"parentLayerId\":"
- out.RawString(prefix)
- out.String(string(in.ParentLayerID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- {
- const prefix string = ",\"offsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.OffsetX))
- }
- {
- const prefix string = ",\"offsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.OffsetY))
- }
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Float64(float64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Float64(float64(in.Height))
- }
- if len(in.Transform) != 0 {
- const prefix string = ",\"transform\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v15, v16 := range in.Transform {
- if v15 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v16))
- }
- out.RawByte(']')
- }
- }
- if in.AnchorX != 0 {
- const prefix string = ",\"anchorX\":"
- out.RawString(prefix)
- out.Float64(float64(in.AnchorX))
- }
- if in.AnchorY != 0 {
- const prefix string = ",\"anchorY\":"
- out.RawString(prefix)
- out.Float64(float64(in.AnchorY))
- }
- if in.AnchorZ != 0 {
- const prefix string = ",\"anchorZ\":"
- out.RawString(prefix)
- out.Float64(float64(in.AnchorZ))
- }
- {
- const prefix string = ",\"paintCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.PaintCount))
- }
- {
- const prefix string = ",\"drawsContent\":"
- out.RawString(prefix)
- out.Bool(bool(in.DrawsContent))
- }
- if in.Invisible {
- const prefix string = ",\"invisible\":"
- out.RawString(prefix)
- out.Bool(bool(in.Invisible))
- }
- if len(in.ScrollRects) != 0 {
- const prefix string = ",\"scrollRects\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v17, v18 := range in.ScrollRects {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.StickyPositionConstraint != nil {
- const prefix string = ",\"stickyPositionConstraint\":"
- out.RawString(prefix)
- (*in.StickyPositionConstraint).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Layer) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Layer) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Layer) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Layer) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(in *jlexer.Lexer, out *EventLayerTreeDidChange) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layers":
- if in.IsNull() {
- in.Skip()
- out.Layers = nil
- } else {
- in.Delim('[')
- if out.Layers == nil {
- if !in.IsDelim(']') {
- out.Layers = make([]*Layer, 0, 8)
- } else {
- out.Layers = []*Layer{}
- }
- } else {
- out.Layers = (out.Layers)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *Layer
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(Layer)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Layers = append(out.Layers, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(out *jwriter.Writer, in EventLayerTreeDidChange) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Layers) != 0 {
- const prefix string = ",\"layers\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v20, v21 := range in.Layers {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLayerTreeDidChange) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLayerTreeDidChange) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLayerTreeDidChange) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLayerTreeDidChange) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(in *jlexer.Lexer, out *EventLayerPainted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layerId":
- out.LayerID = LayerID(in.String())
- case "clip":
- if in.IsNull() {
- in.Skip()
- out.Clip = nil
- } else {
- if out.Clip == nil {
- out.Clip = new(dom.Rect)
- }
- (*out.Clip).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(out *jwriter.Writer, in EventLayerPainted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LayerID))
- }
- {
- const prefix string = ",\"clip\":"
- out.RawString(prefix)
- if in.Clip == nil {
- out.RawString("null")
- } else {
- (*in.Clip).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLayerPainted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLayerPainted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLayerPainted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLayerPainted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer, out *CompositingReasonsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "compositingReasonIds":
- if in.IsNull() {
- in.Skip()
- out.CompositingReasonIds = nil
- } else {
- in.Delim('[')
- if out.CompositingReasonIds == nil {
- if !in.IsDelim(']') {
- out.CompositingReasonIds = make([]string, 0, 4)
- } else {
- out.CompositingReasonIds = []string{}
- }
- } else {
- out.CompositingReasonIds = (out.CompositingReasonIds)[:0]
- }
- for !in.IsDelim(']') {
- var v22 string
- v22 = string(in.String())
- out.CompositingReasonIds = append(out.CompositingReasonIds, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(out *jwriter.Writer, in CompositingReasonsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.CompositingReasonIds) != 0 {
- const prefix string = ",\"compositingReasonIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v23, v24 := range in.CompositingReasonIds {
- if v23 > 0 {
- out.RawByte(',')
- }
- out.String(string(v24))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CompositingReasonsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CompositingReasonsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CompositingReasonsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CompositingReasonsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(in *jlexer.Lexer, out *CompositingReasonsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layerId":
- out.LayerID = LayerID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(out *jwriter.Writer, in CompositingReasonsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LayerID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CompositingReasonsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CompositingReasonsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CompositingReasonsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CompositingReasonsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/layertree/events.go b/vendor/github.com/chromedp/cdproto/layertree/events.go
deleted file mode 100644
index e635f13c1ac..00000000000
--- a/vendor/github.com/chromedp/cdproto/layertree/events.go
+++ /dev/null
@@ -1,22 +0,0 @@
-package layertree
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/dom"
-)
-
-// EventLayerPainted [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#event-layerPainted
-type EventLayerPainted struct {
- LayerID LayerID `json:"layerId"` // The id of the painted layer.
- Clip *dom.Rect `json:"clip"` // Clip rectangle.
-}
-
-// EventLayerTreeDidChange [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#event-layerTreeDidChange
-type EventLayerTreeDidChange struct {
- Layers []*Layer `json:"layers,omitempty"` // Layer tree, absent if not in the comspositing mode.
-}
diff --git a/vendor/github.com/chromedp/cdproto/layertree/layertree.go b/vendor/github.com/chromedp/cdproto/layertree/layertree.go
deleted file mode 100644
index 8848bf5c6e5..00000000000
--- a/vendor/github.com/chromedp/cdproto/layertree/layertree.go
+++ /dev/null
@@ -1,352 +0,0 @@
-// Package layertree provides the Chrome DevTools Protocol
-// commands, types, and events for the LayerTree domain.
-//
-// Generated by the cdproto-gen command.
-package layertree
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/mailru/easyjson"
-)
-
-// CompositingReasonsParams provides the reasons why the given layer was
-// composited.
-type CompositingReasonsParams struct {
- LayerID LayerID `json:"layerId"` // The id of the layer for which we want to get the reasons it was composited.
-}
-
-// CompositingReasons provides the reasons why the given layer was
-// composited.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-compositingReasons
-//
-// parameters:
-// layerID - The id of the layer for which we want to get the reasons it was composited.
-func CompositingReasons(layerID LayerID) *CompositingReasonsParams {
- return &CompositingReasonsParams{
- LayerID: layerID,
- }
-}
-
-// CompositingReasonsReturns return values.
-type CompositingReasonsReturns struct {
- CompositingReasonIds []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited.
-}
-
-// Do executes LayerTree.compositingReasons against the provided context.
-//
-// returns:
-// compositingReasonIds - A list of strings specifying reason IDs for the given layer to become composited.
-func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIds []string, err error) {
- // execute
- var res CompositingReasonsReturns
- err = cdp.Execute(ctx, CommandCompositingReasons, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.CompositingReasonIds, nil
-}
-
-// DisableParams disables compositing tree inspection.
-type DisableParams struct{}
-
-// Disable disables compositing tree inspection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes LayerTree.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables compositing tree inspection.
-type EnableParams struct{}
-
-// Enable enables compositing tree inspection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes LayerTree.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// LoadSnapshotParams returns the snapshot identifier.
-type LoadSnapshotParams struct {
- Tiles []*PictureTile `json:"tiles"` // An array of tiles composing the snapshot.
-}
-
-// LoadSnapshot returns the snapshot identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-loadSnapshot
-//
-// parameters:
-// tiles - An array of tiles composing the snapshot.
-func LoadSnapshot(tiles []*PictureTile) *LoadSnapshotParams {
- return &LoadSnapshotParams{
- Tiles: tiles,
- }
-}
-
-// LoadSnapshotReturns return values.
-type LoadSnapshotReturns struct {
- SnapshotID SnapshotID `json:"snapshotId,omitempty"` // The id of the snapshot.
-}
-
-// Do executes LayerTree.loadSnapshot against the provided context.
-//
-// returns:
-// snapshotID - The id of the snapshot.
-func (p *LoadSnapshotParams) Do(ctx context.Context) (snapshotID SnapshotID, err error) {
- // execute
- var res LoadSnapshotReturns
- err = cdp.Execute(ctx, CommandLoadSnapshot, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.SnapshotID, nil
-}
-
-// MakeSnapshotParams returns the layer snapshot identifier.
-type MakeSnapshotParams struct {
- LayerID LayerID `json:"layerId"` // The id of the layer.
-}
-
-// MakeSnapshot returns the layer snapshot identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-makeSnapshot
-//
-// parameters:
-// layerID - The id of the layer.
-func MakeSnapshot(layerID LayerID) *MakeSnapshotParams {
- return &MakeSnapshotParams{
- LayerID: layerID,
- }
-}
-
-// MakeSnapshotReturns return values.
-type MakeSnapshotReturns struct {
- SnapshotID SnapshotID `json:"snapshotId,omitempty"` // The id of the layer snapshot.
-}
-
-// Do executes LayerTree.makeSnapshot against the provided context.
-//
-// returns:
-// snapshotID - The id of the layer snapshot.
-func (p *MakeSnapshotParams) Do(ctx context.Context) (snapshotID SnapshotID, err error) {
- // execute
- var res MakeSnapshotReturns
- err = cdp.Execute(ctx, CommandMakeSnapshot, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.SnapshotID, nil
-}
-
-// ProfileSnapshotParams [no description].
-type ProfileSnapshotParams struct {
- SnapshotID SnapshotID `json:"snapshotId"` // The id of the layer snapshot.
- MinRepeatCount int64 `json:"minRepeatCount,omitempty"` // The maximum number of times to replay the snapshot (1, if not specified).
- MinDuration float64 `json:"minDuration,omitempty"` // The minimum duration (in seconds) to replay the snapshot.
- ClipRect *dom.Rect `json:"clipRect,omitempty"` // The clip rectangle to apply when replaying the snapshot.
-}
-
-// ProfileSnapshot [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-profileSnapshot
-//
-// parameters:
-// snapshotID - The id of the layer snapshot.
-func ProfileSnapshot(snapshotID SnapshotID) *ProfileSnapshotParams {
- return &ProfileSnapshotParams{
- SnapshotID: snapshotID,
- }
-}
-
-// WithMinRepeatCount the maximum number of times to replay the snapshot (1,
-// if not specified).
-func (p ProfileSnapshotParams) WithMinRepeatCount(minRepeatCount int64) *ProfileSnapshotParams {
- p.MinRepeatCount = minRepeatCount
- return &p
-}
-
-// WithMinDuration the minimum duration (in seconds) to replay the snapshot.
-func (p ProfileSnapshotParams) WithMinDuration(minDuration float64) *ProfileSnapshotParams {
- p.MinDuration = minDuration
- return &p
-}
-
-// WithClipRect the clip rectangle to apply when replaying the snapshot.
-func (p ProfileSnapshotParams) WithClipRect(clipRect *dom.Rect) *ProfileSnapshotParams {
- p.ClipRect = clipRect
- return &p
-}
-
-// ProfileSnapshotReturns return values.
-type ProfileSnapshotReturns struct {
- Timings []PaintProfile `json:"timings,omitempty"` // The array of paint profiles, one per run.
-}
-
-// Do executes LayerTree.profileSnapshot against the provided context.
-//
-// returns:
-// timings - The array of paint profiles, one per run.
-func (p *ProfileSnapshotParams) Do(ctx context.Context) (timings []PaintProfile, err error) {
- // execute
- var res ProfileSnapshotReturns
- err = cdp.Execute(ctx, CommandProfileSnapshot, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Timings, nil
-}
-
-// ReleaseSnapshotParams releases layer snapshot captured by the back-end.
-type ReleaseSnapshotParams struct {
- SnapshotID SnapshotID `json:"snapshotId"` // The id of the layer snapshot.
-}
-
-// ReleaseSnapshot releases layer snapshot captured by the back-end.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-releaseSnapshot
-//
-// parameters:
-// snapshotID - The id of the layer snapshot.
-func ReleaseSnapshot(snapshotID SnapshotID) *ReleaseSnapshotParams {
- return &ReleaseSnapshotParams{
- SnapshotID: snapshotID,
- }
-}
-
-// Do executes LayerTree.releaseSnapshot against the provided context.
-func (p *ReleaseSnapshotParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReleaseSnapshot, p, nil)
-}
-
-// ReplaySnapshotParams replays the layer snapshot and returns the resulting
-// bitmap.
-type ReplaySnapshotParams struct {
- SnapshotID SnapshotID `json:"snapshotId"` // The id of the layer snapshot.
- FromStep int64 `json:"fromStep,omitempty"` // The first step to replay from (replay from the very start if not specified).
- ToStep int64 `json:"toStep,omitempty"` // The last step to replay to (replay till the end if not specified).
- Scale float64 `json:"scale,omitempty"` // The scale to apply while replaying (defaults to 1).
-}
-
-// ReplaySnapshot replays the layer snapshot and returns the resulting
-// bitmap.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-replaySnapshot
-//
-// parameters:
-// snapshotID - The id of the layer snapshot.
-func ReplaySnapshot(snapshotID SnapshotID) *ReplaySnapshotParams {
- return &ReplaySnapshotParams{
- SnapshotID: snapshotID,
- }
-}
-
-// WithFromStep the first step to replay from (replay from the very start if
-// not specified).
-func (p ReplaySnapshotParams) WithFromStep(fromStep int64) *ReplaySnapshotParams {
- p.FromStep = fromStep
- return &p
-}
-
-// WithToStep the last step to replay to (replay till the end if not
-// specified).
-func (p ReplaySnapshotParams) WithToStep(toStep int64) *ReplaySnapshotParams {
- p.ToStep = toStep
- return &p
-}
-
-// WithScale the scale to apply while replaying (defaults to 1).
-func (p ReplaySnapshotParams) WithScale(scale float64) *ReplaySnapshotParams {
- p.Scale = scale
- return &p
-}
-
-// ReplaySnapshotReturns return values.
-type ReplaySnapshotReturns struct {
- DataURL string `json:"dataURL,omitempty"` // A data: URL for resulting image.
-}
-
-// Do executes LayerTree.replaySnapshot against the provided context.
-//
-// returns:
-// dataURL - A data: URL for resulting image.
-func (p *ReplaySnapshotParams) Do(ctx context.Context) (dataURL string, err error) {
- // execute
- var res ReplaySnapshotReturns
- err = cdp.Execute(ctx, CommandReplaySnapshot, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.DataURL, nil
-}
-
-// SnapshotCommandLogParams replays the layer snapshot and returns canvas
-// log.
-type SnapshotCommandLogParams struct {
- SnapshotID SnapshotID `json:"snapshotId"` // The id of the layer snapshot.
-}
-
-// SnapshotCommandLog replays the layer snapshot and returns canvas log.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-snapshotCommandLog
-//
-// parameters:
-// snapshotID - The id of the layer snapshot.
-func SnapshotCommandLog(snapshotID SnapshotID) *SnapshotCommandLogParams {
- return &SnapshotCommandLogParams{
- SnapshotID: snapshotID,
- }
-}
-
-// SnapshotCommandLogReturns return values.
-type SnapshotCommandLogReturns struct {
- CommandLog []easyjson.RawMessage `json:"commandLog,omitempty"` // The array of canvas function calls.
-}
-
-// Do executes LayerTree.snapshotCommandLog against the provided context.
-//
-// returns:
-// commandLog - The array of canvas function calls.
-func (p *SnapshotCommandLogParams) Do(ctx context.Context) (commandLog []easyjson.RawMessage, err error) {
- // execute
- var res SnapshotCommandLogReturns
- err = cdp.Execute(ctx, CommandSnapshotCommandLog, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.CommandLog, nil
-}
-
-// Command names.
-const (
- CommandCompositingReasons = "LayerTree.compositingReasons"
- CommandDisable = "LayerTree.disable"
- CommandEnable = "LayerTree.enable"
- CommandLoadSnapshot = "LayerTree.loadSnapshot"
- CommandMakeSnapshot = "LayerTree.makeSnapshot"
- CommandProfileSnapshot = "LayerTree.profileSnapshot"
- CommandReleaseSnapshot = "LayerTree.releaseSnapshot"
- CommandReplaySnapshot = "LayerTree.replaySnapshot"
- CommandSnapshotCommandLog = "LayerTree.snapshotCommandLog"
-)
diff --git a/vendor/github.com/chromedp/cdproto/layertree/types.go b/vendor/github.com/chromedp/cdproto/layertree/types.go
deleted file mode 100644
index 5776c59af2d..00000000000
--- a/vendor/github.com/chromedp/cdproto/layertree/types.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package layertree
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// LayerID unique Layer identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-LayerId
-type LayerID string
-
-// String returns the LayerID as string value.
-func (t LayerID) String() string {
- return string(t)
-}
-
-// SnapshotID unique snapshot identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-SnapshotId
-type SnapshotID string
-
-// String returns the SnapshotID as string value.
-func (t SnapshotID) String() string {
- return string(t)
-}
-
-// ScrollRect rectangle where scrolling happens on the main thread.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-ScrollRect
-type ScrollRect struct {
- Rect *dom.Rect `json:"rect"` // Rectangle itself.
- Type ScrollRectType `json:"type"` // Reason for rectangle to force scrolling on the main thread
-}
-
-// StickyPositionConstraint sticky position constraints.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-StickyPositionConstraint
-type StickyPositionConstraint struct {
- StickyBoxRect *dom.Rect `json:"stickyBoxRect"` // Layout rectangle of the sticky element before being shifted
- ContainingBlockRect *dom.Rect `json:"containingBlockRect"` // Layout rectangle of the containing block of the sticky element
- NearestLayerShiftingStickyBox LayerID `json:"nearestLayerShiftingStickyBox,omitempty"` // The nearest sticky layer that shifts the sticky box
- NearestLayerShiftingContainingBlock LayerID `json:"nearestLayerShiftingContainingBlock,omitempty"` // The nearest sticky layer that shifts the containing block
-}
-
-// PictureTile serialized fragment of layer picture along with its offset
-// within the layer.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-PictureTile
-type PictureTile struct {
- X float64 `json:"x"` // Offset from owning layer left boundary
- Y float64 `json:"y"` // Offset from owning layer top boundary
- Picture string `json:"picture"` // Base64-encoded snapshot data.
-}
-
-// Layer information about a compositing layer.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-Layer
-type Layer struct {
- LayerID LayerID `json:"layerId"` // The unique id for this layer.
- ParentLayerID LayerID `json:"parentLayerId,omitempty"` // The id of parent (not present for root).
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // The backend id for the node associated with this layer.
- OffsetX float64 `json:"offsetX"` // Offset from parent layer, X coordinate.
- OffsetY float64 `json:"offsetY"` // Offset from parent layer, Y coordinate.
- Width float64 `json:"width"` // Layer width.
- Height float64 `json:"height"` // Layer height.
- Transform []float64 `json:"transform,omitempty"` // Transformation matrix for layer, default is identity matrix
- AnchorX float64 `json:"anchorX,omitempty"` // Transform anchor point X, absent if no transform specified
- AnchorY float64 `json:"anchorY,omitempty"` // Transform anchor point Y, absent if no transform specified
- AnchorZ float64 `json:"anchorZ,omitempty"` // Transform anchor point Z, absent if no transform specified
- PaintCount int64 `json:"paintCount"` // Indicates how many time this layer has painted.
- DrawsContent bool `json:"drawsContent"` // Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
- Invisible bool `json:"invisible,omitempty"` // Set if layer is not visible.
- ScrollRects []*ScrollRect `json:"scrollRects,omitempty"` // Rectangles scrolling on main thread only.
- StickyPositionConstraint *StickyPositionConstraint `json:"stickyPositionConstraint,omitempty"` // Sticky position constraint information
-}
-
-// PaintProfile array of timings, one per paint step.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-PaintProfile
-type PaintProfile []float64
-
-// ScrollRectType reason for rectangle to force scrolling on the main thread.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#type-ScrollRect
-type ScrollRectType string
-
-// String returns the ScrollRectType as string value.
-func (t ScrollRectType) String() string {
- return string(t)
-}
-
-// ScrollRectType values.
-const (
- ScrollRectTypeRepaintsOnScroll ScrollRectType = "RepaintsOnScroll"
- ScrollRectTypeTouchEventHandler ScrollRectType = "TouchEventHandler"
- ScrollRectTypeWheelEventHandler ScrollRectType = "WheelEventHandler"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ScrollRectType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ScrollRectType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ScrollRectType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ScrollRectType(in.String()) {
- case ScrollRectTypeRepaintsOnScroll:
- *t = ScrollRectTypeRepaintsOnScroll
- case ScrollRectTypeTouchEventHandler:
- *t = ScrollRectTypeTouchEventHandler
- case ScrollRectTypeWheelEventHandler:
- *t = ScrollRectTypeWheelEventHandler
-
- default:
- in.AddError(errors.New("unknown ScrollRectType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ScrollRectType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/log/easyjson.go b/vendor/github.com/chromedp/cdproto/log/easyjson.go
deleted file mode 100644
index da8c87cf711..00000000000
--- a/vendor/github.com/chromedp/cdproto/log/easyjson.go
+++ /dev/null
@@ -1,709 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package log
-
-import (
- json "encoding/json"
- network "github.com/chromedp/cdproto/network"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog(in *jlexer.Lexer, out *ViolationSetting) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- (out.Name).UnmarshalEasyJSON(in)
- case "threshold":
- out.Threshold = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog(out *jwriter.Writer, in ViolationSetting) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- (in.Name).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"threshold\":"
- out.RawString(prefix)
- out.Float64(float64(in.Threshold))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ViolationSetting) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ViolationSetting) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ViolationSetting) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ViolationSetting) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog1(in *jlexer.Lexer, out *StopViolationsReportParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog1(out *jwriter.Writer, in StopViolationsReportParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopViolationsReportParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopViolationsReportParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog2(in *jlexer.Lexer, out *StartViolationsReportParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "config":
- if in.IsNull() {
- in.Skip()
- out.Config = nil
- } else {
- in.Delim('[')
- if out.Config == nil {
- if !in.IsDelim(']') {
- out.Config = make([]*ViolationSetting, 0, 8)
- } else {
- out.Config = []*ViolationSetting{}
- }
- } else {
- out.Config = (out.Config)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *ViolationSetting
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(ViolationSetting)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Config = append(out.Config, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog2(out *jwriter.Writer, in StartViolationsReportParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"config\":"
- out.RawString(prefix[1:])
- if in.Config == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Config {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartViolationsReportParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartViolationsReportParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartViolationsReportParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartViolationsReportParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog3(in *jlexer.Lexer, out *EventEntryAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "entry":
- if in.IsNull() {
- in.Skip()
- out.Entry = nil
- } else {
- if out.Entry == nil {
- out.Entry = new(Entry)
- }
- (*out.Entry).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog3(out *jwriter.Writer, in EventEntryAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"entry\":"
- out.RawString(prefix[1:])
- if in.Entry == nil {
- out.RawString("null")
- } else {
- (*in.Entry).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventEntryAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventEntryAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventEntryAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventEntryAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog4(in *jlexer.Lexer, out *Entry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "source":
- (out.Source).UnmarshalEasyJSON(in)
- case "level":
- (out.Level).UnmarshalEasyJSON(in)
- case "text":
- out.Text = string(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(runtime.Timestamp)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "url":
- out.URL = string(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(runtime.StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- case "networkRequestId":
- out.NetworkRequestID = network.RequestID(in.String())
- case "workerId":
- out.WorkerID = string(in.String())
- case "args":
- if in.IsNull() {
- in.Skip()
- out.Args = nil
- } else {
- in.Delim('[')
- if out.Args == nil {
- if !in.IsDelim(']') {
- out.Args = make([]*runtime.RemoteObject, 0, 8)
- } else {
- out.Args = []*runtime.RemoteObject{}
- }
- } else {
- out.Args = (out.Args)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *runtime.RemoteObject
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(runtime.RemoteObject)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Args = append(out.Args, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog4(out *jwriter.Writer, in Entry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"source\":"
- out.RawString(prefix[1:])
- (in.Source).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"level\":"
- out.RawString(prefix)
- (in.Level).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.LineNumber != 0 {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- out.RawString(prefix)
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- if in.NetworkRequestID != "" {
- const prefix string = ",\"networkRequestId\":"
- out.RawString(prefix)
- out.String(string(in.NetworkRequestID))
- }
- if in.WorkerID != "" {
- const prefix string = ",\"workerId\":"
- out.RawString(prefix)
- out.String(string(in.WorkerID))
- }
- if len(in.Args) != 0 {
- const prefix string = ",\"args\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v5, v6 := range in.Args {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Entry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Entry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Entry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Entry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog5(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog5(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog6(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog6(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog7(in *jlexer.Lexer, out *ClearParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog7(out *jwriter.Writer, in ClearParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog7(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/log/events.go b/vendor/github.com/chromedp/cdproto/log/events.go
deleted file mode 100644
index 8f9b4a9e08c..00000000000
--- a/vendor/github.com/chromedp/cdproto/log/events.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package log
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventEntryAdded issued when new message was logged.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#event-entryAdded
-type EventEntryAdded struct {
- Entry *Entry `json:"entry"` // The entry.
-}
diff --git a/vendor/github.com/chromedp/cdproto/log/log.go b/vendor/github.com/chromedp/cdproto/log/log.go
deleted file mode 100644
index c3d538135c2..00000000000
--- a/vendor/github.com/chromedp/cdproto/log/log.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Package log provides the Chrome DevTools Protocol
-// commands, types, and events for the Log domain.
-//
-// Provides access to log entries.
-//
-// Generated by the cdproto-gen command.
-package log
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ClearParams clears the log.
-type ClearParams struct{}
-
-// Clear clears the log.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-clear
-func Clear() *ClearParams {
- return &ClearParams{}
-}
-
-// Do executes Log.clear against the provided context.
-func (p *ClearParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClear, nil, nil)
-}
-
-// DisableParams disables log domain, prevents further log entries from being
-// reported to the client.
-type DisableParams struct{}
-
-// Disable disables log domain, prevents further log entries from being
-// reported to the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Log.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables log domain, sends the entries collected so far to the
-// client by means of the entryAdded notification.
-type EnableParams struct{}
-
-// Enable enables log domain, sends the entries collected so far to the
-// client by means of the entryAdded notification.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Log.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// StartViolationsReportParams start violation reporting.
-type StartViolationsReportParams struct {
- Config []*ViolationSetting `json:"config"` // Configuration for violations.
-}
-
-// StartViolationsReport start violation reporting.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-startViolationsReport
-//
-// parameters:
-// config - Configuration for violations.
-func StartViolationsReport(config []*ViolationSetting) *StartViolationsReportParams {
- return &StartViolationsReportParams{
- Config: config,
- }
-}
-
-// Do executes Log.startViolationsReport against the provided context.
-func (p *StartViolationsReportParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartViolationsReport, p, nil)
-}
-
-// StopViolationsReportParams stop violation reporting.
-type StopViolationsReportParams struct{}
-
-// StopViolationsReport stop violation reporting.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-stopViolationsReport
-func StopViolationsReport() *StopViolationsReportParams {
- return &StopViolationsReportParams{}
-}
-
-// Do executes Log.stopViolationsReport against the provided context.
-func (p *StopViolationsReportParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopViolationsReport, nil, nil)
-}
-
-// Command names.
-const (
- CommandClear = "Log.clear"
- CommandDisable = "Log.disable"
- CommandEnable = "Log.enable"
- CommandStartViolationsReport = "Log.startViolationsReport"
- CommandStopViolationsReport = "Log.stopViolationsReport"
-)
diff --git a/vendor/github.com/chromedp/cdproto/log/types.go b/vendor/github.com/chromedp/cdproto/log/types.go
deleted file mode 100644
index 41d037020e6..00000000000
--- a/vendor/github.com/chromedp/cdproto/log/types.go
+++ /dev/null
@@ -1,223 +0,0 @@
-package log
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/network"
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// Entry log entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
-type Entry struct {
- Source Source `json:"source"` // Log entry source.
- Level Level `json:"level"` // Log entry severity.
- Text string `json:"text"` // Logged text.
- Timestamp *runtime.Timestamp `json:"timestamp"` // Timestamp when this entry was added.
- URL string `json:"url,omitempty"` // URL of the resource if known.
- LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource.
- StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace.
- NetworkRequestID network.RequestID `json:"networkRequestId,omitempty"` // Identifier of the network request associated with this entry.
- WorkerID string `json:"workerId,omitempty"` // Identifier of the worker associated with this entry.
- Args []*runtime.RemoteObject `json:"args,omitempty"` // Call arguments.
-}
-
-// ViolationSetting violation configuration setting.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting
-type ViolationSetting struct {
- Name Violation `json:"name"` // Violation type.
- Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
-}
-
-// Source log entry source.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
-type Source string
-
-// String returns the Source as string value.
-func (t Source) String() string {
- return string(t)
-}
-
-// Source values.
-const (
- SourceXML Source = "xml"
- SourceJavascript Source = "javascript"
- SourceNetwork Source = "network"
- SourceStorage Source = "storage"
- SourceAppcache Source = "appcache"
- SourceRendering Source = "rendering"
- SourceSecurity Source = "security"
- SourceDeprecation Source = "deprecation"
- SourceWorker Source = "worker"
- SourceViolation Source = "violation"
- SourceIntervention Source = "intervention"
- SourceRecommendation Source = "recommendation"
- SourceOther Source = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Source) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Source) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Source) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Source(in.String()) {
- case SourceXML:
- *t = SourceXML
- case SourceJavascript:
- *t = SourceJavascript
- case SourceNetwork:
- *t = SourceNetwork
- case SourceStorage:
- *t = SourceStorage
- case SourceAppcache:
- *t = SourceAppcache
- case SourceRendering:
- *t = SourceRendering
- case SourceSecurity:
- *t = SourceSecurity
- case SourceDeprecation:
- *t = SourceDeprecation
- case SourceWorker:
- *t = SourceWorker
- case SourceViolation:
- *t = SourceViolation
- case SourceIntervention:
- *t = SourceIntervention
- case SourceRecommendation:
- *t = SourceRecommendation
- case SourceOther:
- *t = SourceOther
-
- default:
- in.AddError(errors.New("unknown Source value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Source) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Level log entry severity.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
-type Level string
-
-// String returns the Level as string value.
-func (t Level) String() string {
- return string(t)
-}
-
-// Level values.
-const (
- LevelVerbose Level = "verbose"
- LevelInfo Level = "info"
- LevelWarning Level = "warning"
- LevelError Level = "error"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Level) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Level) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Level) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Level(in.String()) {
- case LevelVerbose:
- *t = LevelVerbose
- case LevelInfo:
- *t = LevelInfo
- case LevelWarning:
- *t = LevelWarning
- case LevelError:
- *t = LevelError
-
- default:
- in.AddError(errors.New("unknown Level value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Level) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Violation violation type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting
-type Violation string
-
-// String returns the Violation as string value.
-func (t Violation) String() string {
- return string(t)
-}
-
-// Violation values.
-const (
- ViolationLongTask Violation = "longTask"
- ViolationLongLayout Violation = "longLayout"
- ViolationBlockedEvent Violation = "blockedEvent"
- ViolationBlockedParser Violation = "blockedParser"
- ViolationDiscouragedAPIUse Violation = "discouragedAPIUse"
- ViolationHandler Violation = "handler"
- ViolationRecurringHandler Violation = "recurringHandler"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Violation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Violation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Violation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Violation(in.String()) {
- case ViolationLongTask:
- *t = ViolationLongTask
- case ViolationLongLayout:
- *t = ViolationLongLayout
- case ViolationBlockedEvent:
- *t = ViolationBlockedEvent
- case ViolationBlockedParser:
- *t = ViolationBlockedParser
- case ViolationDiscouragedAPIUse:
- *t = ViolationDiscouragedAPIUse
- case ViolationHandler:
- *t = ViolationHandler
- case ViolationRecurringHandler:
- *t = ViolationRecurringHandler
-
- default:
- in.AddError(errors.New("unknown Violation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Violation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/media/easyjson.go b/vendor/github.com/chromedp/cdproto/media/easyjson.go
deleted file mode 100644
index 4b70387c431..00000000000
--- a/vendor/github.com/chromedp/cdproto/media/easyjson.go
+++ /dev/null
@@ -1,995 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package media
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(in *jlexer.Lexer, out *PlayerProperty) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(out *jwriter.Writer, in PlayerProperty) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PlayerProperty) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PlayerProperty) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PlayerProperty) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PlayerProperty) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(in *jlexer.Lexer, out *PlayerMessage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "level":
- (out.Level).UnmarshalEasyJSON(in)
- case "message":
- out.Message = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(out *jwriter.Writer, in PlayerMessage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"level\":"
- out.RawString(prefix[1:])
- (in.Level).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix)
- out.String(string(in.Message))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PlayerMessage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PlayerMessage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PlayerMessage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PlayerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(in *jlexer.Lexer, out *PlayerEvent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- out.Timestamp = Timestamp(in.Float64())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(out *jwriter.Writer, in PlayerEvent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Timestamp))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PlayerEvent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PlayerEvent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PlayerEvent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PlayerEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out *PlayerError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "errorCode":
- out.ErrorCode = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, in PlayerError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"errorCode\":"
- out.RawString(prefix)
- out.String(string(in.ErrorCode))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PlayerError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PlayerError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PlayerError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PlayerError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out *EventPlayersCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "players":
- if in.IsNull() {
- in.Skip()
- out.Players = nil
- } else {
- in.Delim('[')
- if out.Players == nil {
- if !in.IsDelim(']') {
- out.Players = make([]PlayerID, 0, 4)
- } else {
- out.Players = []PlayerID{}
- }
- } else {
- out.Players = (out.Players)[:0]
- }
- for !in.IsDelim(']') {
- var v1 PlayerID
- v1 = PlayerID(in.String())
- out.Players = append(out.Players, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, in EventPlayersCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"players\":"
- out.RawString(prefix[1:])
- if in.Players == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Players {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPlayersCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPlayersCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPlayersCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPlayersCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out *EventPlayerPropertiesChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "properties":
- if in.IsNull() {
- in.Skip()
- out.Properties = nil
- } else {
- in.Delim('[')
- if out.Properties == nil {
- if !in.IsDelim(']') {
- out.Properties = make([]*PlayerProperty, 0, 8)
- } else {
- out.Properties = []*PlayerProperty{}
- }
- } else {
- out.Properties = (out.Properties)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *PlayerProperty
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(PlayerProperty)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, in EventPlayerPropertiesChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"properties\":"
- out.RawString(prefix)
- if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Properties {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPlayerPropertiesChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPlayerPropertiesChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPlayerPropertiesChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPlayerPropertiesChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out *EventPlayerMessagesLogged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "messages":
- if in.IsNull() {
- in.Skip()
- out.Messages = nil
- } else {
- in.Delim('[')
- if out.Messages == nil {
- if !in.IsDelim(']') {
- out.Messages = make([]*PlayerMessage, 0, 8)
- } else {
- out.Messages = []*PlayerMessage{}
- }
- } else {
- out.Messages = (out.Messages)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *PlayerMessage
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(PlayerMessage)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Messages = append(out.Messages, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, in EventPlayerMessagesLogged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"messages\":"
- out.RawString(prefix)
- if in.Messages == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Messages {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPlayerMessagesLogged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPlayerMessagesLogged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPlayerMessagesLogged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPlayerMessagesLogged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out *EventPlayerEventsAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "events":
- if in.IsNull() {
- in.Skip()
- out.Events = nil
- } else {
- in.Delim('[')
- if out.Events == nil {
- if !in.IsDelim(']') {
- out.Events = make([]*PlayerEvent, 0, 8)
- } else {
- out.Events = []*PlayerEvent{}
- }
- } else {
- out.Events = (out.Events)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *PlayerEvent
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(PlayerEvent)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Events = append(out.Events, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, in EventPlayerEventsAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"events\":"
- out.RawString(prefix)
- if in.Events == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Events {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPlayerEventsAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPlayerEventsAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPlayerEventsAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out *EventPlayerErrorsRaised) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "playerId":
- out.PlayerID = PlayerID(in.String())
- case "errors":
- if in.IsNull() {
- in.Skip()
- out.Errors = nil
- } else {
- in.Delim('[')
- if out.Errors == nil {
- if !in.IsDelim(']') {
- out.Errors = make([]*PlayerError, 0, 8)
- } else {
- out.Errors = []*PlayerError{}
- }
- } else {
- out.Errors = (out.Errors)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *PlayerError
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(PlayerError)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Errors = append(out.Errors, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, in EventPlayerErrorsRaised) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"playerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PlayerID))
- }
- {
- const prefix string = ",\"errors\":"
- out.RawString(prefix)
- if in.Errors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Errors {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPlayerErrorsRaised) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPlayerErrorsRaised) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPlayerErrorsRaised) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPlayerErrorsRaised) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/media/events.go b/vendor/github.com/chromedp/cdproto/media/events.go
deleted file mode 100644
index 639f9fa1fe5..00000000000
--- a/vendor/github.com/chromedp/cdproto/media/events.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package media
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventPlayerPropertiesChanged this can be called multiple times, and can be
-// used to set / override / remove player properties. A null propValue indicates
-// removal.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerPropertiesChanged
-type EventPlayerPropertiesChanged struct {
- PlayerID PlayerID `json:"playerId"`
- Properties []*PlayerProperty `json:"properties"`
-}
-
-// EventPlayerEventsAdded send events as a list, allowing them to be batched
-// on the browser for less congestion. If batched, events must ALWAYS be in
-// chronological order.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerEventsAdded
-type EventPlayerEventsAdded struct {
- PlayerID PlayerID `json:"playerId"`
- Events []*PlayerEvent `json:"events"`
-}
-
-// EventPlayerMessagesLogged send a list of any messages that need to be
-// delivered.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerMessagesLogged
-type EventPlayerMessagesLogged struct {
- PlayerID PlayerID `json:"playerId"`
- Messages []*PlayerMessage `json:"messages"`
-}
-
-// EventPlayerErrorsRaised send a list of any errors that need to be
-// delivered.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playerErrorsRaised
-type EventPlayerErrorsRaised struct {
- PlayerID PlayerID `json:"playerId"`
- Errors []*PlayerError `json:"errors"`
-}
-
-// EventPlayersCreated called whenever a player is created, or when a new
-// agent joins and receives a list of active players. If an agent is restored,
-// it will receive the full list of player ids and all events again.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#event-playersCreated
-type EventPlayersCreated struct {
- Players []PlayerID `json:"players"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/media/media.go b/vendor/github.com/chromedp/cdproto/media/media.go
deleted file mode 100644
index cd4b4ae5f1f..00000000000
--- a/vendor/github.com/chromedp/cdproto/media/media.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Package media provides the Chrome DevTools Protocol
-// commands, types, and events for the Media domain.
-//
-// This domain allows detailed inspection of media elements.
-//
-// Generated by the cdproto-gen command.
-package media
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams enables the Media domain.
-type EnableParams struct{}
-
-// Enable enables the Media domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Media.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// DisableParams disables the Media domain.
-type DisableParams struct{}
-
-// Disable disables the Media domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Media.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// Command names.
-const (
- CommandEnable = "Media.enable"
- CommandDisable = "Media.disable"
-)
diff --git a/vendor/github.com/chromedp/cdproto/media/types.go b/vendor/github.com/chromedp/cdproto/media/types.go
deleted file mode 100644
index 8a31420dce2..00000000000
--- a/vendor/github.com/chromedp/cdproto/media/types.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package media
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// PlayerID players will get an ID that is unique within the agent context.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerId
-type PlayerID string
-
-// String returns the PlayerID as string value.
-func (t PlayerID) String() string {
- return string(t)
-}
-
-// Timestamp [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-Timestamp
-type Timestamp float64
-
-// Float64 returns the Timestamp as float64 value.
-func (t Timestamp) Float64() float64 {
- return float64(t)
-}
-
-// PlayerMessage have one type per entry in MediaLogRecord::Type Corresponds
-// to kMessage.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerMessage
-type PlayerMessage struct {
- Level PlayerMessageLevel `json:"level"` // Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.
- Message string `json:"message"`
-}
-
-// PlayerProperty corresponds to kMediaPropertyChange.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerProperty
-type PlayerProperty struct {
- Name string `json:"name"`
- Value string `json:"value"`
-}
-
-// PlayerEvent corresponds to kMediaEventTriggered.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerEvent
-type PlayerEvent struct {
- Timestamp Timestamp `json:"timestamp"`
- Value string `json:"value"`
-}
-
-// PlayerError corresponds to kMediaError.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError
-type PlayerError struct {
- Type PlayerErrorType `json:"type"`
- ErrorCode string `json:"errorCode"` // When this switches to using media::Status instead of PipelineStatus we can remove "errorCode" and replace it with the fields from a Status instance. This also seems like a duplicate of the error level enum - there is a todo bug to have that level removed and use this instead. (crbug.com/1068454)
-}
-
-// PlayerMessageLevel keep in sync with MediaLogMessageLevel We are currently
-// keeping the message level 'error' separate from the PlayerError type because
-// right now they represent different things, this one being a DVLOG(ERROR)
-// style log message that gets printed based on what log level is selected in
-// the UI, and the other is a representation of a media::PipelineStatus object.
-// Soon however we're going to be moving away from using PipelineStatus for
-// errors and introducing a new error type which should hopefully let us
-// integrate the error log level into the PlayerError type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerMessage
-type PlayerMessageLevel string
-
-// String returns the PlayerMessageLevel as string value.
-func (t PlayerMessageLevel) String() string {
- return string(t)
-}
-
-// PlayerMessageLevel values.
-const (
- PlayerMessageLevelError PlayerMessageLevel = "error"
- PlayerMessageLevelWarning PlayerMessageLevel = "warning"
- PlayerMessageLevelInfo PlayerMessageLevel = "info"
- PlayerMessageLevelDebug PlayerMessageLevel = "debug"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PlayerMessageLevel) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PlayerMessageLevel) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PlayerMessageLevel(in.String()) {
- case PlayerMessageLevelError:
- *t = PlayerMessageLevelError
- case PlayerMessageLevelWarning:
- *t = PlayerMessageLevelWarning
- case PlayerMessageLevelInfo:
- *t = PlayerMessageLevelInfo
- case PlayerMessageLevelDebug:
- *t = PlayerMessageLevelDebug
-
- default:
- in.AddError(errors.New("unknown PlayerMessageLevel value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PlayerMessageLevel) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PlayerErrorType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError
-type PlayerErrorType string
-
-// String returns the PlayerErrorType as string value.
-func (t PlayerErrorType) String() string {
- return string(t)
-}
-
-// PlayerErrorType values.
-const (
- PlayerErrorTypePipelineError PlayerErrorType = "pipeline_error"
- PlayerErrorTypeMediaError PlayerErrorType = "media_error"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PlayerErrorType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PlayerErrorType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PlayerErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PlayerErrorType(in.String()) {
- case PlayerErrorTypePipelineError:
- *t = PlayerErrorTypePipelineError
- case PlayerErrorTypeMediaError:
- *t = PlayerErrorTypeMediaError
-
- default:
- in.AddError(errors.New("unknown PlayerErrorType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PlayerErrorType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/memory/easyjson.go b/vendor/github.com/chromedp/cdproto/memory/easyjson.go
deleted file mode 100644
index a2511c56443..00000000000
--- a/vendor/github.com/chromedp/cdproto/memory/easyjson.go
+++ /dev/null
@@ -1,1319 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package memory
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory(in *jlexer.Lexer, out *StopSamplingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory(out *jwriter.Writer, in StopSamplingParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopSamplingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopSamplingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopSamplingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory1(in *jlexer.Lexer, out *StartSamplingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "samplingInterval":
- out.SamplingInterval = int64(in.Int64())
- case "suppressRandomness":
- out.SuppressRandomness = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory1(out *jwriter.Writer, in StartSamplingParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SamplingInterval != 0 {
- const prefix string = ",\"samplingInterval\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.SamplingInterval))
- }
- if in.SuppressRandomness {
- const prefix string = ",\"suppressRandomness\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.SuppressRandomness))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartSamplingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartSamplingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartSamplingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartSamplingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory2(in *jlexer.Lexer, out *SimulatePressureNotificationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "level":
- (out.Level).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory2(out *jwriter.Writer, in SimulatePressureNotificationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"level\":"
- out.RawString(prefix[1:])
- (in.Level).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SimulatePressureNotificationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SimulatePressureNotificationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SimulatePressureNotificationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SimulatePressureNotificationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory3(in *jlexer.Lexer, out *SetPressureNotificationsSuppressedParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "suppressed":
- out.Suppressed = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory3(out *jwriter.Writer, in SetPressureNotificationsSuppressedParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"suppressed\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Suppressed))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPressureNotificationsSuppressedParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPressureNotificationsSuppressedParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPressureNotificationsSuppressedParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPressureNotificationsSuppressedParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory4(in *jlexer.Lexer, out *SamplingProfileNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "size":
- out.Size = float64(in.Float64())
- case "total":
- out.Total = float64(in.Float64())
- case "stack":
- if in.IsNull() {
- in.Skip()
- out.Stack = nil
- } else {
- in.Delim('[')
- if out.Stack == nil {
- if !in.IsDelim(']') {
- out.Stack = make([]string, 0, 4)
- } else {
- out.Stack = []string{}
- }
- } else {
- out.Stack = (out.Stack)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.Stack = append(out.Stack, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory4(out *jwriter.Writer, in SamplingProfileNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Size))
- }
- {
- const prefix string = ",\"total\":"
- out.RawString(prefix)
- out.Float64(float64(in.Total))
- }
- {
- const prefix string = ",\"stack\":"
- out.RawString(prefix)
- if in.Stack == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Stack {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SamplingProfileNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SamplingProfileNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SamplingProfileNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SamplingProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory5(in *jlexer.Lexer, out *SamplingProfile) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "samples":
- if in.IsNull() {
- in.Skip()
- out.Samples = nil
- } else {
- in.Delim('[')
- if out.Samples == nil {
- if !in.IsDelim(']') {
- out.Samples = make([]*SamplingProfileNode, 0, 8)
- } else {
- out.Samples = []*SamplingProfileNode{}
- }
- } else {
- out.Samples = (out.Samples)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *SamplingProfileNode
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(SamplingProfileNode)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Samples = append(out.Samples, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "modules":
- if in.IsNull() {
- in.Skip()
- out.Modules = nil
- } else {
- in.Delim('[')
- if out.Modules == nil {
- if !in.IsDelim(']') {
- out.Modules = make([]*Module, 0, 8)
- } else {
- out.Modules = []*Module{}
- }
- } else {
- out.Modules = (out.Modules)[:0]
- }
- for !in.IsDelim(']') {
- var v5 *Module
- if in.IsNull() {
- in.Skip()
- v5 = nil
- } else {
- if v5 == nil {
- v5 = new(Module)
- }
- (*v5).UnmarshalEasyJSON(in)
- }
- out.Modules = append(out.Modules, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory5(out *jwriter.Writer, in SamplingProfile) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"samples\":"
- out.RawString(prefix[1:])
- if in.Samples == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.Samples {
- if v6 > 0 {
- out.RawByte(',')
- }
- if v7 == nil {
- out.RawString("null")
- } else {
- (*v7).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"modules\":"
- out.RawString(prefix)
- if in.Modules == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Modules {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SamplingProfile) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SamplingProfile) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SamplingProfile) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SamplingProfile) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory6(in *jlexer.Lexer, out *PrepareForLeakDetectionParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory6(out *jwriter.Writer, in PrepareForLeakDetectionParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PrepareForLeakDetectionParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PrepareForLeakDetectionParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PrepareForLeakDetectionParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PrepareForLeakDetectionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory7(in *jlexer.Lexer, out *Module) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "uuid":
- out.UUID = string(in.String())
- case "baseAddress":
- out.BaseAddress = string(in.String())
- case "size":
- out.Size = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory7(out *jwriter.Writer, in Module) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"uuid\":"
- out.RawString(prefix)
- out.String(string(in.UUID))
- }
- {
- const prefix string = ",\"baseAddress\":"
- out.RawString(prefix)
- out.String(string(in.BaseAddress))
- }
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Float64(float64(in.Size))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Module) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Module) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Module) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Module) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory8(in *jlexer.Lexer, out *GetSamplingProfileReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(SamplingProfile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory8(out *jwriter.Writer, in GetSamplingProfileReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSamplingProfileReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSamplingProfileReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSamplingProfileReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSamplingProfileReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory9(in *jlexer.Lexer, out *GetSamplingProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory9(out *jwriter.Writer, in GetSamplingProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSamplingProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSamplingProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSamplingProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSamplingProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory10(in *jlexer.Lexer, out *GetDOMCountersReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "documents":
- out.Documents = int64(in.Int64())
- case "nodes":
- out.Nodes = int64(in.Int64())
- case "jsEventListeners":
- out.JsEventListeners = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory10(out *jwriter.Writer, in GetDOMCountersReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Documents != 0 {
- const prefix string = ",\"documents\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.Documents))
- }
- if in.Nodes != 0 {
- const prefix string = ",\"nodes\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Nodes))
- }
- if in.JsEventListeners != 0 {
- const prefix string = ",\"jsEventListeners\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.JsEventListeners))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDOMCountersReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDOMCountersReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDOMCountersReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDOMCountersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory11(in *jlexer.Lexer, out *GetDOMCountersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory11(out *jwriter.Writer, in GetDOMCountersParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetDOMCountersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetDOMCountersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetDOMCountersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetDOMCountersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory12(in *jlexer.Lexer, out *GetBrowserSamplingProfileReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(SamplingProfile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory12(out *jwriter.Writer, in GetBrowserSamplingProfileReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserSamplingProfileReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserSamplingProfileReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserSamplingProfileReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserSamplingProfileReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory13(in *jlexer.Lexer, out *GetBrowserSamplingProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory13(out *jwriter.Writer, in GetBrowserSamplingProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserSamplingProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserSamplingProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserSamplingProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserSamplingProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory14(in *jlexer.Lexer, out *GetAllTimeSamplingProfileReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(SamplingProfile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory14(out *jwriter.Writer, in GetAllTimeSamplingProfileReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAllTimeSamplingProfileReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAllTimeSamplingProfileReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAllTimeSamplingProfileReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAllTimeSamplingProfileReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory15(in *jlexer.Lexer, out *GetAllTimeSamplingProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory15(out *jwriter.Writer, in GetAllTimeSamplingProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAllTimeSamplingProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAllTimeSamplingProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAllTimeSamplingProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAllTimeSamplingProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory16(in *jlexer.Lexer, out *ForciblyPurgeJavaScriptMemoryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory16(out *jwriter.Writer, in ForciblyPurgeJavaScriptMemoryParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ForciblyPurgeJavaScriptMemoryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ForciblyPurgeJavaScriptMemoryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoMemory16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ForciblyPurgeJavaScriptMemoryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ForciblyPurgeJavaScriptMemoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoMemory16(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/memory/memory.go b/vendor/github.com/chromedp/cdproto/memory/memory.go
deleted file mode 100644
index e3b6c54afe0..00000000000
--- a/vendor/github.com/chromedp/cdproto/memory/memory.go
+++ /dev/null
@@ -1,284 +0,0 @@
-// Package memory provides the Chrome DevTools Protocol
-// commands, types, and events for the Memory domain.
-//
-// Generated by the cdproto-gen command.
-package memory
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// GetDOMCountersParams [no description].
-type GetDOMCountersParams struct{}
-
-// GetDOMCounters [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getDOMCounters
-func GetDOMCounters() *GetDOMCountersParams {
- return &GetDOMCountersParams{}
-}
-
-// GetDOMCountersReturns return values.
-type GetDOMCountersReturns struct {
- Documents int64 `json:"documents,omitempty"`
- Nodes int64 `json:"nodes,omitempty"`
- JsEventListeners int64 `json:"jsEventListeners,omitempty"`
-}
-
-// Do executes Memory.getDOMCounters against the provided context.
-//
-// returns:
-// documents
-// nodes
-// jsEventListeners
-func (p *GetDOMCountersParams) Do(ctx context.Context) (documents int64, nodes int64, jsEventListeners int64, err error) {
- // execute
- var res GetDOMCountersReturns
- err = cdp.Execute(ctx, CommandGetDOMCounters, nil, &res)
- if err != nil {
- return 0, 0, 0, err
- }
-
- return res.Documents, res.Nodes, res.JsEventListeners, nil
-}
-
-// PrepareForLeakDetectionParams [no description].
-type PrepareForLeakDetectionParams struct{}
-
-// PrepareForLeakDetection [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-prepareForLeakDetection
-func PrepareForLeakDetection() *PrepareForLeakDetectionParams {
- return &PrepareForLeakDetectionParams{}
-}
-
-// Do executes Memory.prepareForLeakDetection against the provided context.
-func (p *PrepareForLeakDetectionParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandPrepareForLeakDetection, nil, nil)
-}
-
-// ForciblyPurgeJavaScriptMemoryParams simulate OomIntervention by purging V8
-// memory.
-type ForciblyPurgeJavaScriptMemoryParams struct{}
-
-// ForciblyPurgeJavaScriptMemory simulate OomIntervention by purging V8
-// memory.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-forciblyPurgeJavaScriptMemory
-func ForciblyPurgeJavaScriptMemory() *ForciblyPurgeJavaScriptMemoryParams {
- return &ForciblyPurgeJavaScriptMemoryParams{}
-}
-
-// Do executes Memory.forciblyPurgeJavaScriptMemory against the provided context.
-func (p *ForciblyPurgeJavaScriptMemoryParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandForciblyPurgeJavaScriptMemory, nil, nil)
-}
-
-// SetPressureNotificationsSuppressedParams enable/disable suppressing memory
-// pressure notifications in all processes.
-type SetPressureNotificationsSuppressedParams struct {
- Suppressed bool `json:"suppressed"` // If true, memory pressure notifications will be suppressed.
-}
-
-// SetPressureNotificationsSuppressed enable/disable suppressing memory
-// pressure notifications in all processes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-setPressureNotificationsSuppressed
-//
-// parameters:
-// suppressed - If true, memory pressure notifications will be suppressed.
-func SetPressureNotificationsSuppressed(suppressed bool) *SetPressureNotificationsSuppressedParams {
- return &SetPressureNotificationsSuppressedParams{
- Suppressed: suppressed,
- }
-}
-
-// Do executes Memory.setPressureNotificationsSuppressed against the provided context.
-func (p *SetPressureNotificationsSuppressedParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPressureNotificationsSuppressed, p, nil)
-}
-
-// SimulatePressureNotificationParams simulate a memory pressure notification
-// in all processes.
-type SimulatePressureNotificationParams struct {
- Level PressureLevel `json:"level"` // Memory pressure level of the notification.
-}
-
-// SimulatePressureNotification simulate a memory pressure notification in
-// all processes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-simulatePressureNotification
-//
-// parameters:
-// level - Memory pressure level of the notification.
-func SimulatePressureNotification(level PressureLevel) *SimulatePressureNotificationParams {
- return &SimulatePressureNotificationParams{
- Level: level,
- }
-}
-
-// Do executes Memory.simulatePressureNotification against the provided context.
-func (p *SimulatePressureNotificationParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSimulatePressureNotification, p, nil)
-}
-
-// StartSamplingParams start collecting native memory profile.
-type StartSamplingParams struct {
- SamplingInterval int64 `json:"samplingInterval,omitempty"` // Average number of bytes between samples.
- SuppressRandomness bool `json:"suppressRandomness,omitempty"` // Do not randomize intervals between samples.
-}
-
-// StartSampling start collecting native memory profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-startSampling
-//
-// parameters:
-func StartSampling() *StartSamplingParams {
- return &StartSamplingParams{}
-}
-
-// WithSamplingInterval average number of bytes between samples.
-func (p StartSamplingParams) WithSamplingInterval(samplingInterval int64) *StartSamplingParams {
- p.SamplingInterval = samplingInterval
- return &p
-}
-
-// WithSuppressRandomness do not randomize intervals between samples.
-func (p StartSamplingParams) WithSuppressRandomness(suppressRandomness bool) *StartSamplingParams {
- p.SuppressRandomness = suppressRandomness
- return &p
-}
-
-// Do executes Memory.startSampling against the provided context.
-func (p *StartSamplingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartSampling, p, nil)
-}
-
-// StopSamplingParams stop collecting native memory profile.
-type StopSamplingParams struct{}
-
-// StopSampling stop collecting native memory profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-stopSampling
-func StopSampling() *StopSamplingParams {
- return &StopSamplingParams{}
-}
-
-// Do executes Memory.stopSampling against the provided context.
-func (p *StopSamplingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopSampling, nil, nil)
-}
-
-// GetAllTimeSamplingProfileParams retrieve native memory allocations profile
-// collected since renderer process startup.
-type GetAllTimeSamplingProfileParams struct{}
-
-// GetAllTimeSamplingProfile retrieve native memory allocations profile
-// collected since renderer process startup.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getAllTimeSamplingProfile
-func GetAllTimeSamplingProfile() *GetAllTimeSamplingProfileParams {
- return &GetAllTimeSamplingProfileParams{}
-}
-
-// GetAllTimeSamplingProfileReturns return values.
-type GetAllTimeSamplingProfileReturns struct {
- Profile *SamplingProfile `json:"profile,omitempty"`
-}
-
-// Do executes Memory.getAllTimeSamplingProfile against the provided context.
-//
-// returns:
-// profile
-func (p *GetAllTimeSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
- // execute
- var res GetAllTimeSamplingProfileReturns
- err = cdp.Execute(ctx, CommandGetAllTimeSamplingProfile, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// GetBrowserSamplingProfileParams retrieve native memory allocations profile
-// collected since browser process startup.
-type GetBrowserSamplingProfileParams struct{}
-
-// GetBrowserSamplingProfile retrieve native memory allocations profile
-// collected since browser process startup.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getBrowserSamplingProfile
-func GetBrowserSamplingProfile() *GetBrowserSamplingProfileParams {
- return &GetBrowserSamplingProfileParams{}
-}
-
-// GetBrowserSamplingProfileReturns return values.
-type GetBrowserSamplingProfileReturns struct {
- Profile *SamplingProfile `json:"profile,omitempty"`
-}
-
-// Do executes Memory.getBrowserSamplingProfile against the provided context.
-//
-// returns:
-// profile
-func (p *GetBrowserSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
- // execute
- var res GetBrowserSamplingProfileReturns
- err = cdp.Execute(ctx, CommandGetBrowserSamplingProfile, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// GetSamplingProfileParams retrieve native memory allocations profile
-// collected since last startSampling call.
-type GetSamplingProfileParams struct{}
-
-// GetSamplingProfile retrieve native memory allocations profile collected
-// since last startSampling call.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getSamplingProfile
-func GetSamplingProfile() *GetSamplingProfileParams {
- return &GetSamplingProfileParams{}
-}
-
-// GetSamplingProfileReturns return values.
-type GetSamplingProfileReturns struct {
- Profile *SamplingProfile `json:"profile,omitempty"`
-}
-
-// Do executes Memory.getSamplingProfile against the provided context.
-//
-// returns:
-// profile
-func (p *GetSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
- // execute
- var res GetSamplingProfileReturns
- err = cdp.Execute(ctx, CommandGetSamplingProfile, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// Command names.
-const (
- CommandGetDOMCounters = "Memory.getDOMCounters"
- CommandPrepareForLeakDetection = "Memory.prepareForLeakDetection"
- CommandForciblyPurgeJavaScriptMemory = "Memory.forciblyPurgeJavaScriptMemory"
- CommandSetPressureNotificationsSuppressed = "Memory.setPressureNotificationsSuppressed"
- CommandSimulatePressureNotification = "Memory.simulatePressureNotification"
- CommandStartSampling = "Memory.startSampling"
- CommandStopSampling = "Memory.stopSampling"
- CommandGetAllTimeSamplingProfile = "Memory.getAllTimeSamplingProfile"
- CommandGetBrowserSamplingProfile = "Memory.getBrowserSamplingProfile"
- CommandGetSamplingProfile = "Memory.getSamplingProfile"
-)
diff --git a/vendor/github.com/chromedp/cdproto/memory/types.go b/vendor/github.com/chromedp/cdproto/memory/types.go
deleted file mode 100644
index 59878c5d55b..00000000000
--- a/vendor/github.com/chromedp/cdproto/memory/types.go
+++ /dev/null
@@ -1,82 +0,0 @@
-package memory
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// PressureLevel memory pressure level.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-PressureLevel
-type PressureLevel string
-
-// String returns the PressureLevel as string value.
-func (t PressureLevel) String() string {
- return string(t)
-}
-
-// PressureLevel values.
-const (
- PressureLevelModerate PressureLevel = "moderate"
- PressureLevelCritical PressureLevel = "critical"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PressureLevel) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PressureLevel) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PressureLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PressureLevel(in.String()) {
- case PressureLevelModerate:
- *t = PressureLevelModerate
- case PressureLevelCritical:
- *t = PressureLevelCritical
-
- default:
- in.AddError(errors.New("unknown PressureLevel value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PressureLevel) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SamplingProfileNode heap profile sample.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-SamplingProfileNode
-type SamplingProfileNode struct {
- Size float64 `json:"size"` // Size of the sampled allocation.
- Total float64 `json:"total"` // Total bytes attributed to this sample.
- Stack []string `json:"stack"` // Execution stack at the point of allocation.
-}
-
-// SamplingProfile array of heap profile samples.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-SamplingProfile
-type SamplingProfile struct {
- Samples []*SamplingProfileNode `json:"samples"`
- Modules []*Module `json:"modules"`
-}
-
-// Module executable module information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-Module
-type Module struct {
- Name string `json:"name"` // Name of the module.
- UUID string `json:"uuid"` // UUID of the module.
- BaseAddress string `json:"baseAddress"` // Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string.
- Size float64 `json:"size"` // Size of the module in bytes.
-}
diff --git a/vendor/github.com/chromedp/cdproto/network/easyjson.go b/vendor/github.com/chromedp/cdproto/network/easyjson.go
deleted file mode 100644
index e8adc5af073..00000000000
--- a/vendor/github.com/chromedp/cdproto/network/easyjson.go
+++ /dev/null
@@ -1,9650 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package network
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- debugger "github.com/chromedp/cdproto/debugger"
- io "github.com/chromedp/cdproto/io"
- runtime "github.com/chromedp/cdproto/runtime"
- security "github.com/chromedp/cdproto/security"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork(in *jlexer.Lexer, out *WebSocketResponse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "status":
- out.Status = int64(in.Int64())
- case "statusText":
- out.StatusText = string(in.String())
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v1 interface{}
- if m, ok := v1.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v1.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v1 = in.Interface()
- }
- (out.Headers)[key] = v1
- in.WantComma()
- }
- in.Delim('}')
- }
- case "headersText":
- out.HeadersText = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- out.RequestHeaders = make(Headers)
- } else {
- out.RequestHeaders = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v2 interface{}
- if m, ok := v2.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v2.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v2 = in.Interface()
- }
- (out.RequestHeaders)[key] = v2
- in.WantComma()
- }
- in.Delim('}')
- }
- case "requestHeadersText":
- out.RequestHeadersText = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork(out *jwriter.Writer, in WebSocketResponse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Status))
- }
- {
- const prefix string = ",\"statusText\":"
- out.RawString(prefix)
- out.String(string(in.StatusText))
- }
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v3First := true
- for v3Name, v3Value := range in.Headers {
- if v3First {
- v3First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v3Name))
- out.RawByte(':')
- if m, ok := v3Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v3Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v3Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.HeadersText != "" {
- const prefix string = ",\"headersText\":"
- out.RawString(prefix)
- out.String(string(in.HeadersText))
- }
- if len(in.RequestHeaders) != 0 {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- {
- out.RawByte('{')
- v4First := true
- for v4Name, v4Value := range in.RequestHeaders {
- if v4First {
- v4First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v4Name))
- out.RawByte(':')
- if m, ok := v4Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v4Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v4Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.RequestHeadersText != "" {
- const prefix string = ",\"requestHeadersText\":"
- out.RawString(prefix)
- out.String(string(in.RequestHeadersText))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v WebSocketResponse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v WebSocketResponse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *WebSocketResponse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *WebSocketResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork1(in *jlexer.Lexer, out *WebSocketRequest) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v5 interface{}
- if m, ok := v5.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v5.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v5 = in.Interface()
- }
- (out.Headers)[key] = v5
- in.WantComma()
- }
- in.Delim('}')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork1(out *jwriter.Writer, in WebSocketRequest) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix[1:])
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v6First := true
- for v6Name, v6Value := range in.Headers {
- if v6First {
- v6First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v6Name))
- out.RawByte(':')
- if m, ok := v6Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v6Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v6Value))
- }
- }
- out.RawByte('}')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v WebSocketRequest) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v WebSocketRequest) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *WebSocketRequest) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *WebSocketRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork2(in *jlexer.Lexer, out *WebSocketFrame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "opcode":
- out.Opcode = float64(in.Float64())
- case "mask":
- out.Mask = bool(in.Bool())
- case "payloadData":
- out.PayloadData = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork2(out *jwriter.Writer, in WebSocketFrame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"opcode\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Opcode))
- }
- {
- const prefix string = ",\"mask\":"
- out.RawString(prefix)
- out.Bool(bool(in.Mask))
- }
- {
- const prefix string = ",\"payloadData\":"
- out.RawString(prefix)
- out.String(string(in.PayloadData))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v WebSocketFrame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v WebSocketFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *WebSocketFrame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *WebSocketFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork3(in *jlexer.Lexer, out *TrustTokenParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "refreshPolicy":
- (out.RefreshPolicy).UnmarshalEasyJSON(in)
- case "issuers":
- if in.IsNull() {
- in.Skip()
- out.Issuers = nil
- } else {
- in.Delim('[')
- if out.Issuers == nil {
- if !in.IsDelim(']') {
- out.Issuers = make([]string, 0, 4)
- } else {
- out.Issuers = []string{}
- }
- } else {
- out.Issuers = (out.Issuers)[:0]
- }
- for !in.IsDelim(']') {
- var v7 string
- v7 = string(in.String())
- out.Issuers = append(out.Issuers, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork3(out *jwriter.Writer, in TrustTokenParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"refreshPolicy\":"
- out.RawString(prefix)
- (in.RefreshPolicy).MarshalEasyJSON(out)
- }
- if len(in.Issuers) != 0 {
- const prefix string = ",\"issuers\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.Issuers {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrustTokenParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrustTokenParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrustTokenParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrustTokenParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork4(in *jlexer.Lexer, out *TakeResponseBodyForInterceptionAsStreamReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "stream":
- out.Stream = io.StreamHandle(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork4(out *jwriter.Writer, in TakeResponseBodyForInterceptionAsStreamReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Stream != "" {
- const prefix string = ",\"stream\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Stream))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeResponseBodyForInterceptionAsStreamReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeResponseBodyForInterceptionAsStreamReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeResponseBodyForInterceptionAsStreamReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeResponseBodyForInterceptionAsStreamReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork5(in *jlexer.Lexer, out *TakeResponseBodyForInterceptionAsStreamParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "interceptionId":
- out.InterceptionID = InterceptionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork5(out *jwriter.Writer, in TakeResponseBodyForInterceptionAsStreamParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"interceptionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.InterceptionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeResponseBodyForInterceptionAsStreamParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeResponseBodyForInterceptionAsStreamParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeResponseBodyForInterceptionAsStreamParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeResponseBodyForInterceptionAsStreamParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork6(in *jlexer.Lexer, out *SignedExchangeSignature) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "label":
- out.Label = string(in.String())
- case "signature":
- out.Signature = string(in.String())
- case "integrity":
- out.Integrity = string(in.String())
- case "certUrl":
- out.CertURL = string(in.String())
- case "certSha256":
- out.CertSha256 = string(in.String())
- case "validityUrl":
- out.ValidityURL = string(in.String())
- case "date":
- out.Date = int64(in.Int64())
- case "expires":
- out.Expires = int64(in.Int64())
- case "certificates":
- if in.IsNull() {
- in.Skip()
- out.Certificates = nil
- } else {
- in.Delim('[')
- if out.Certificates == nil {
- if !in.IsDelim(']') {
- out.Certificates = make([]string, 0, 4)
- } else {
- out.Certificates = []string{}
- }
- } else {
- out.Certificates = (out.Certificates)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Certificates = append(out.Certificates, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork6(out *jwriter.Writer, in SignedExchangeSignature) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"label\":"
- out.RawString(prefix[1:])
- out.String(string(in.Label))
- }
- {
- const prefix string = ",\"signature\":"
- out.RawString(prefix)
- out.String(string(in.Signature))
- }
- {
- const prefix string = ",\"integrity\":"
- out.RawString(prefix)
- out.String(string(in.Integrity))
- }
- if in.CertURL != "" {
- const prefix string = ",\"certUrl\":"
- out.RawString(prefix)
- out.String(string(in.CertURL))
- }
- if in.CertSha256 != "" {
- const prefix string = ",\"certSha256\":"
- out.RawString(prefix)
- out.String(string(in.CertSha256))
- }
- {
- const prefix string = ",\"validityUrl\":"
- out.RawString(prefix)
- out.String(string(in.ValidityURL))
- }
- {
- const prefix string = ",\"date\":"
- out.RawString(prefix)
- out.Int64(int64(in.Date))
- }
- {
- const prefix string = ",\"expires\":"
- out.RawString(prefix)
- out.Int64(int64(in.Expires))
- }
- if len(in.Certificates) != 0 {
- const prefix string = ",\"certificates\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v11, v12 := range in.Certificates {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SignedExchangeSignature) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SignedExchangeSignature) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SignedExchangeSignature) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SignedExchangeSignature) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork7(in *jlexer.Lexer, out *SignedExchangeInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "outerResponse":
- if in.IsNull() {
- in.Skip()
- out.OuterResponse = nil
- } else {
- if out.OuterResponse == nil {
- out.OuterResponse = new(Response)
- }
- (*out.OuterResponse).UnmarshalEasyJSON(in)
- }
- case "header":
- if in.IsNull() {
- in.Skip()
- out.Header = nil
- } else {
- if out.Header == nil {
- out.Header = new(SignedExchangeHeader)
- }
- (*out.Header).UnmarshalEasyJSON(in)
- }
- case "securityDetails":
- if in.IsNull() {
- in.Skip()
- out.SecurityDetails = nil
- } else {
- if out.SecurityDetails == nil {
- out.SecurityDetails = new(SecurityDetails)
- }
- (*out.SecurityDetails).UnmarshalEasyJSON(in)
- }
- case "errors":
- if in.IsNull() {
- in.Skip()
- out.Errors = nil
- } else {
- in.Delim('[')
- if out.Errors == nil {
- if !in.IsDelim(']') {
- out.Errors = make([]*SignedExchangeError, 0, 8)
- } else {
- out.Errors = []*SignedExchangeError{}
- }
- } else {
- out.Errors = (out.Errors)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *SignedExchangeError
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(SignedExchangeError)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Errors = append(out.Errors, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork7(out *jwriter.Writer, in SignedExchangeInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"outerResponse\":"
- out.RawString(prefix[1:])
- if in.OuterResponse == nil {
- out.RawString("null")
- } else {
- (*in.OuterResponse).MarshalEasyJSON(out)
- }
- }
- if in.Header != nil {
- const prefix string = ",\"header\":"
- out.RawString(prefix)
- (*in.Header).MarshalEasyJSON(out)
- }
- if in.SecurityDetails != nil {
- const prefix string = ",\"securityDetails\":"
- out.RawString(prefix)
- (*in.SecurityDetails).MarshalEasyJSON(out)
- }
- if len(in.Errors) != 0 {
- const prefix string = ",\"errors\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v14, v15 := range in.Errors {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SignedExchangeInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SignedExchangeInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SignedExchangeInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SignedExchangeInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork8(in *jlexer.Lexer, out *SignedExchangeHeader) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestUrl":
- out.RequestURL = string(in.String())
- case "responseCode":
- out.ResponseCode = int64(in.Int64())
- case "responseHeaders":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.ResponseHeaders = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v16 interface{}
- if m, ok := v16.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v16.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v16 = in.Interface()
- }
- (out.ResponseHeaders)[key] = v16
- in.WantComma()
- }
- in.Delim('}')
- }
- case "signatures":
- if in.IsNull() {
- in.Skip()
- out.Signatures = nil
- } else {
- in.Delim('[')
- if out.Signatures == nil {
- if !in.IsDelim(']') {
- out.Signatures = make([]*SignedExchangeSignature, 0, 8)
- } else {
- out.Signatures = []*SignedExchangeSignature{}
- }
- } else {
- out.Signatures = (out.Signatures)[:0]
- }
- for !in.IsDelim(']') {
- var v17 *SignedExchangeSignature
- if in.IsNull() {
- in.Skip()
- v17 = nil
- } else {
- if v17 == nil {
- v17 = new(SignedExchangeSignature)
- }
- (*v17).UnmarshalEasyJSON(in)
- }
- out.Signatures = append(out.Signatures, v17)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "headerIntegrity":
- out.HeaderIntegrity = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork8(out *jwriter.Writer, in SignedExchangeHeader) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestUrl\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestURL))
- }
- {
- const prefix string = ",\"responseCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.ResponseCode))
- }
- {
- const prefix string = ",\"responseHeaders\":"
- out.RawString(prefix)
- if in.ResponseHeaders == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v18First := true
- for v18Name, v18Value := range in.ResponseHeaders {
- if v18First {
- v18First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v18Name))
- out.RawByte(':')
- if m, ok := v18Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v18Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v18Value))
- }
- }
- out.RawByte('}')
- }
- }
- {
- const prefix string = ",\"signatures\":"
- out.RawString(prefix)
- if in.Signatures == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v19, v20 := range in.Signatures {
- if v19 > 0 {
- out.RawByte(',')
- }
- if v20 == nil {
- out.RawString("null")
- } else {
- (*v20).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"headerIntegrity\":"
- out.RawString(prefix)
- out.String(string(in.HeaderIntegrity))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SignedExchangeHeader) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SignedExchangeHeader) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SignedExchangeHeader) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SignedExchangeHeader) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork9(in *jlexer.Lexer, out *SignedExchangeError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "message":
- out.Message = string(in.String())
- case "signatureIndex":
- out.SignatureIndex = int64(in.Int64())
- case "errorField":
- (out.ErrorField).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork9(out *jwriter.Writer, in SignedExchangeError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix[1:])
- out.String(string(in.Message))
- }
- if in.SignatureIndex != 0 {
- const prefix string = ",\"signatureIndex\":"
- out.RawString(prefix)
- out.Int64(int64(in.SignatureIndex))
- }
- if in.ErrorField != "" {
- const prefix string = ",\"errorField\":"
- out.RawString(prefix)
- (in.ErrorField).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SignedExchangeError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SignedExchangeError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SignedExchangeError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SignedExchangeError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork10(in *jlexer.Lexer, out *SignedCertificateTimestamp) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "status":
- out.Status = string(in.String())
- case "origin":
- out.Origin = string(in.String())
- case "logDescription":
- out.LogDescription = string(in.String())
- case "logId":
- out.LogID = string(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "hashAlgorithm":
- out.HashAlgorithm = string(in.String())
- case "signatureAlgorithm":
- out.SignatureAlgorithm = string(in.String())
- case "signatureData":
- out.SignatureData = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork10(out *jwriter.Writer, in SignedCertificateTimestamp) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix[1:])
- out.String(string(in.Status))
- }
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"logDescription\":"
- out.RawString(prefix)
- out.String(string(in.LogDescription))
- }
- {
- const prefix string = ",\"logId\":"
- out.RawString(prefix)
- out.String(string(in.LogID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"hashAlgorithm\":"
- out.RawString(prefix)
- out.String(string(in.HashAlgorithm))
- }
- {
- const prefix string = ",\"signatureAlgorithm\":"
- out.RawString(prefix)
- out.String(string(in.SignatureAlgorithm))
- }
- {
- const prefix string = ",\"signatureData\":"
- out.RawString(prefix)
- out.String(string(in.SignatureData))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SignedCertificateTimestamp) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SignedCertificateTimestamp) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SignedCertificateTimestamp) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SignedCertificateTimestamp) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork11(in *jlexer.Lexer, out *SetExtraHTTPHeadersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v21 interface{}
- if m, ok := v21.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v21.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v21 = in.Interface()
- }
- (out.Headers)[key] = v21
- in.WantComma()
- }
- in.Delim('}')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork11(out *jwriter.Writer, in SetExtraHTTPHeadersParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix[1:])
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v22First := true
- for v22Name, v22Value := range in.Headers {
- if v22First {
- v22First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v22Name))
- out.RawByte(':')
- if m, ok := v22Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v22Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v22Value))
- }
- }
- out.RawByte('}')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetExtraHTTPHeadersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetExtraHTTPHeadersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetExtraHTTPHeadersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetExtraHTTPHeadersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork12(in *jlexer.Lexer, out *SetCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookies":
- if in.IsNull() {
- in.Skip()
- out.Cookies = nil
- } else {
- in.Delim('[')
- if out.Cookies == nil {
- if !in.IsDelim(']') {
- out.Cookies = make([]*CookieParam, 0, 8)
- } else {
- out.Cookies = []*CookieParam{}
- }
- } else {
- out.Cookies = (out.Cookies)[:0]
- }
- for !in.IsDelim(']') {
- var v23 *CookieParam
- if in.IsNull() {
- in.Skip()
- v23 = nil
- } else {
- if v23 == nil {
- v23 = new(CookieParam)
- }
- (*v23).UnmarshalEasyJSON(in)
- }
- out.Cookies = append(out.Cookies, v23)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork12(out *jwriter.Writer, in SetCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cookies\":"
- out.RawString(prefix[1:])
- if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v24, v25 := range in.Cookies {
- if v24 > 0 {
- out.RawByte(',')
- }
- if v25 == nil {
- out.RawString("null")
- } else {
- (*v25).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork13(in *jlexer.Lexer, out *SetCookieParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "domain":
- out.Domain = string(in.String())
- case "path":
- out.Path = string(in.String())
- case "secure":
- out.Secure = bool(in.Bool())
- case "httpOnly":
- out.HTTPOnly = bool(in.Bool())
- case "sameSite":
- (out.SameSite).UnmarshalEasyJSON(in)
- case "expires":
- if in.IsNull() {
- in.Skip()
- out.Expires = nil
- } else {
- if out.Expires == nil {
- out.Expires = new(cdp.TimeSinceEpoch)
- }
- (*out.Expires).UnmarshalEasyJSON(in)
- }
- case "priority":
- (out.Priority).UnmarshalEasyJSON(in)
- case "sameParty":
- out.SameParty = bool(in.Bool())
- case "sourceScheme":
- (out.SourceScheme).UnmarshalEasyJSON(in)
- case "sourcePort":
- out.SourcePort = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork13(out *jwriter.Writer, in SetCookieParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.Domain != "" {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- if in.Path != "" {
- const prefix string = ",\"path\":"
- out.RawString(prefix)
- out.String(string(in.Path))
- }
- if in.Secure {
- const prefix string = ",\"secure\":"
- out.RawString(prefix)
- out.Bool(bool(in.Secure))
- }
- if in.HTTPOnly {
- const prefix string = ",\"httpOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.HTTPOnly))
- }
- if in.SameSite != "" {
- const prefix string = ",\"sameSite\":"
- out.RawString(prefix)
- (in.SameSite).MarshalEasyJSON(out)
- }
- if in.Expires != nil {
- const prefix string = ",\"expires\":"
- out.RawString(prefix)
- (*in.Expires).MarshalEasyJSON(out)
- }
- if in.Priority != "" {
- const prefix string = ",\"priority\":"
- out.RawString(prefix)
- (in.Priority).MarshalEasyJSON(out)
- }
- if in.SameParty {
- const prefix string = ",\"sameParty\":"
- out.RawString(prefix)
- out.Bool(bool(in.SameParty))
- }
- if in.SourceScheme != "" {
- const prefix string = ",\"sourceScheme\":"
- out.RawString(prefix)
- (in.SourceScheme).MarshalEasyJSON(out)
- }
- if in.SourcePort != 0 {
- const prefix string = ",\"sourcePort\":"
- out.RawString(prefix)
- out.Int64(int64(in.SourcePort))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCookieParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCookieParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCookieParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCookieParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork14(in *jlexer.Lexer, out *SetCacheDisabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cacheDisabled":
- out.CacheDisabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork14(out *jwriter.Writer, in SetCacheDisabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cacheDisabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.CacheDisabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCacheDisabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCacheDisabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCacheDisabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCacheDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork15(in *jlexer.Lexer, out *SetBypassServiceWorkerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "bypass":
- out.Bypass = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork15(out *jwriter.Writer, in SetBypassServiceWorkerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"bypass\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Bypass))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBypassServiceWorkerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBypassServiceWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBypassServiceWorkerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBypassServiceWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork16(in *jlexer.Lexer, out *SetBlockedURLSParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "urls":
- if in.IsNull() {
- in.Skip()
- out.Urls = nil
- } else {
- in.Delim('[')
- if out.Urls == nil {
- if !in.IsDelim(']') {
- out.Urls = make([]string, 0, 4)
- } else {
- out.Urls = []string{}
- }
- } else {
- out.Urls = (out.Urls)[:0]
- }
- for !in.IsDelim(']') {
- var v26 string
- v26 = string(in.String())
- out.Urls = append(out.Urls, v26)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork16(out *jwriter.Writer, in SetBlockedURLSParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"urls\":"
- out.RawString(prefix[1:])
- if in.Urls == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v27, v28 := range in.Urls {
- if v27 > 0 {
- out.RawByte(',')
- }
- out.String(string(v28))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBlockedURLSParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBlockedURLSParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBlockedURLSParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBlockedURLSParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork17(in *jlexer.Lexer, out *SetAttachDebugStackParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork17(out *jwriter.Writer, in SetAttachDebugStackParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAttachDebugStackParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAttachDebugStackParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAttachDebugStackParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAttachDebugStackParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork18(in *jlexer.Lexer, out *SetAcceptedEncodingsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "encodings":
- if in.IsNull() {
- in.Skip()
- out.Encodings = nil
- } else {
- in.Delim('[')
- if out.Encodings == nil {
- if !in.IsDelim(']') {
- out.Encodings = make([]ContentEncoding, 0, 4)
- } else {
- out.Encodings = []ContentEncoding{}
- }
- } else {
- out.Encodings = (out.Encodings)[:0]
- }
- for !in.IsDelim(']') {
- var v29 ContentEncoding
- (v29).UnmarshalEasyJSON(in)
- out.Encodings = append(out.Encodings, v29)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork18(out *jwriter.Writer, in SetAcceptedEncodingsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"encodings\":"
- out.RawString(prefix[1:])
- if in.Encodings == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v30, v31 := range in.Encodings {
- if v30 > 0 {
- out.RawByte(',')
- }
- (v31).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAcceptedEncodingsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAcceptedEncodingsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAcceptedEncodingsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAcceptedEncodingsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork19(in *jlexer.Lexer, out *SecurityIsolationStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "coop":
- if in.IsNull() {
- in.Skip()
- out.Coop = nil
- } else {
- if out.Coop == nil {
- out.Coop = new(CrossOriginOpenerPolicyStatus)
- }
- (*out.Coop).UnmarshalEasyJSON(in)
- }
- case "coep":
- if in.IsNull() {
- in.Skip()
- out.Coep = nil
- } else {
- if out.Coep == nil {
- out.Coep = new(CrossOriginEmbedderPolicyStatus)
- }
- (*out.Coep).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork19(out *jwriter.Writer, in SecurityIsolationStatus) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Coop != nil {
- const prefix string = ",\"coop\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Coop).MarshalEasyJSON(out)
- }
- if in.Coep != nil {
- const prefix string = ",\"coep\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Coep).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SecurityIsolationStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SecurityIsolationStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SecurityIsolationStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SecurityIsolationStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork20(in *jlexer.Lexer, out *SecurityDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "protocol":
- out.Protocol = string(in.String())
- case "keyExchange":
- out.KeyExchange = string(in.String())
- case "keyExchangeGroup":
- out.KeyExchangeGroup = string(in.String())
- case "cipher":
- out.Cipher = string(in.String())
- case "mac":
- out.Mac = string(in.String())
- case "certificateId":
- out.CertificateID = security.CertificateID(in.Int64())
- case "subjectName":
- out.SubjectName = string(in.String())
- case "sanList":
- if in.IsNull() {
- in.Skip()
- out.SanList = nil
- } else {
- in.Delim('[')
- if out.SanList == nil {
- if !in.IsDelim(']') {
- out.SanList = make([]string, 0, 4)
- } else {
- out.SanList = []string{}
- }
- } else {
- out.SanList = (out.SanList)[:0]
- }
- for !in.IsDelim(']') {
- var v32 string
- v32 = string(in.String())
- out.SanList = append(out.SanList, v32)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "issuer":
- out.Issuer = string(in.String())
- case "validFrom":
- if in.IsNull() {
- in.Skip()
- out.ValidFrom = nil
- } else {
- if out.ValidFrom == nil {
- out.ValidFrom = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidFrom).UnmarshalEasyJSON(in)
- }
- case "validTo":
- if in.IsNull() {
- in.Skip()
- out.ValidTo = nil
- } else {
- if out.ValidTo == nil {
- out.ValidTo = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidTo).UnmarshalEasyJSON(in)
- }
- case "signedCertificateTimestampList":
- if in.IsNull() {
- in.Skip()
- out.SignedCertificateTimestampList = nil
- } else {
- in.Delim('[')
- if out.SignedCertificateTimestampList == nil {
- if !in.IsDelim(']') {
- out.SignedCertificateTimestampList = make([]*SignedCertificateTimestamp, 0, 8)
- } else {
- out.SignedCertificateTimestampList = []*SignedCertificateTimestamp{}
- }
- } else {
- out.SignedCertificateTimestampList = (out.SignedCertificateTimestampList)[:0]
- }
- for !in.IsDelim(']') {
- var v33 *SignedCertificateTimestamp
- if in.IsNull() {
- in.Skip()
- v33 = nil
- } else {
- if v33 == nil {
- v33 = new(SignedCertificateTimestamp)
- }
- (*v33).UnmarshalEasyJSON(in)
- }
- out.SignedCertificateTimestampList = append(out.SignedCertificateTimestampList, v33)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "certificateTransparencyCompliance":
- (out.CertificateTransparencyCompliance).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork20(out *jwriter.Writer, in SecurityDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"protocol\":"
- out.RawString(prefix[1:])
- out.String(string(in.Protocol))
- }
- {
- const prefix string = ",\"keyExchange\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchange))
- }
- if in.KeyExchangeGroup != "" {
- const prefix string = ",\"keyExchangeGroup\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchangeGroup))
- }
- {
- const prefix string = ",\"cipher\":"
- out.RawString(prefix)
- out.String(string(in.Cipher))
- }
- if in.Mac != "" {
- const prefix string = ",\"mac\":"
- out.RawString(prefix)
- out.String(string(in.Mac))
- }
- {
- const prefix string = ",\"certificateId\":"
- out.RawString(prefix)
- out.Int64(int64(in.CertificateID))
- }
- {
- const prefix string = ",\"subjectName\":"
- out.RawString(prefix)
- out.String(string(in.SubjectName))
- }
- {
- const prefix string = ",\"sanList\":"
- out.RawString(prefix)
- if in.SanList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v34, v35 := range in.SanList {
- if v34 > 0 {
- out.RawByte(',')
- }
- out.String(string(v35))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"issuer\":"
- out.RawString(prefix)
- out.String(string(in.Issuer))
- }
- {
- const prefix string = ",\"validFrom\":"
- out.RawString(prefix)
- if in.ValidFrom == nil {
- out.RawString("null")
- } else {
- (*in.ValidFrom).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"validTo\":"
- out.RawString(prefix)
- if in.ValidTo == nil {
- out.RawString("null")
- } else {
- (*in.ValidTo).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"signedCertificateTimestampList\":"
- out.RawString(prefix)
- if in.SignedCertificateTimestampList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v36, v37 := range in.SignedCertificateTimestampList {
- if v36 > 0 {
- out.RawByte(',')
- }
- if v37 == nil {
- out.RawString("null")
- } else {
- (*v37).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"certificateTransparencyCompliance\":"
- out.RawString(prefix)
- (in.CertificateTransparencyCompliance).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SecurityDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SecurityDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SecurityDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SecurityDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork21(in *jlexer.Lexer, out *SearchInResponseBodyReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*debugger.SearchMatch, 0, 8)
- } else {
- out.Result = []*debugger.SearchMatch{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v38 *debugger.SearchMatch
- if in.IsNull() {
- in.Skip()
- v38 = nil
- } else {
- if v38 == nil {
- v38 = new(debugger.SearchMatch)
- }
- (*v38).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v38)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork21(out *jwriter.Writer, in SearchInResponseBodyReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v39, v40 := range in.Result {
- if v39 > 0 {
- out.RawByte(',')
- }
- if v40 == nil {
- out.RawString("null")
- } else {
- (*v40).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInResponseBodyReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInResponseBodyReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork22(in *jlexer.Lexer, out *SearchInResponseBodyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "query":
- out.Query = string(in.String())
- case "caseSensitive":
- out.CaseSensitive = bool(in.Bool())
- case "isRegex":
- out.IsRegex = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork22(out *jwriter.Writer, in SearchInResponseBodyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"query\":"
- out.RawString(prefix)
- out.String(string(in.Query))
- }
- if in.CaseSensitive {
- const prefix string = ",\"caseSensitive\":"
- out.RawString(prefix)
- out.Bool(bool(in.CaseSensitive))
- }
- if in.IsRegex {
- const prefix string = ",\"isRegex\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsRegex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInResponseBodyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInResponseBodyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork23(in *jlexer.Lexer, out *Response) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "status":
- out.Status = int64(in.Int64())
- case "statusText":
- out.StatusText = string(in.String())
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v41 interface{}
- if m, ok := v41.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v41.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v41 = in.Interface()
- }
- (out.Headers)[key] = v41
- in.WantComma()
- }
- in.Delim('}')
- }
- case "headersText":
- out.HeadersText = string(in.String())
- case "mimeType":
- out.MimeType = string(in.String())
- case "requestHeaders":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- out.RequestHeaders = make(Headers)
- } else {
- out.RequestHeaders = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v42 interface{}
- if m, ok := v42.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v42.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v42 = in.Interface()
- }
- (out.RequestHeaders)[key] = v42
- in.WantComma()
- }
- in.Delim('}')
- }
- case "requestHeadersText":
- out.RequestHeadersText = string(in.String())
- case "connectionReused":
- out.ConnectionReused = bool(in.Bool())
- case "connectionId":
- out.ConnectionID = float64(in.Float64())
- case "remoteIPAddress":
- out.RemoteIPAddress = string(in.String())
- case "remotePort":
- out.RemotePort = int64(in.Int64())
- case "fromDiskCache":
- out.FromDiskCache = bool(in.Bool())
- case "fromServiceWorker":
- out.FromServiceWorker = bool(in.Bool())
- case "fromPrefetchCache":
- out.FromPrefetchCache = bool(in.Bool())
- case "encodedDataLength":
- out.EncodedDataLength = float64(in.Float64())
- case "timing":
- if in.IsNull() {
- in.Skip()
- out.Timing = nil
- } else {
- if out.Timing == nil {
- out.Timing = new(ResourceTiming)
- }
- (*out.Timing).UnmarshalEasyJSON(in)
- }
- case "serviceWorkerResponseSource":
- (out.ServiceWorkerResponseSource).UnmarshalEasyJSON(in)
- case "responseTime":
- if in.IsNull() {
- in.Skip()
- out.ResponseTime = nil
- } else {
- if out.ResponseTime == nil {
- out.ResponseTime = new(cdp.TimeSinceEpoch)
- }
- (*out.ResponseTime).UnmarshalEasyJSON(in)
- }
- case "cacheStorageCacheName":
- out.CacheStorageCacheName = string(in.String())
- case "protocol":
- out.Protocol = string(in.String())
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "securityDetails":
- if in.IsNull() {
- in.Skip()
- out.SecurityDetails = nil
- } else {
- if out.SecurityDetails == nil {
- out.SecurityDetails = new(SecurityDetails)
- }
- (*out.SecurityDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork23(out *jwriter.Writer, in Response) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- out.Int64(int64(in.Status))
- }
- {
- const prefix string = ",\"statusText\":"
- out.RawString(prefix)
- out.String(string(in.StatusText))
- }
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v43First := true
- for v43Name, v43Value := range in.Headers {
- if v43First {
- v43First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v43Name))
- out.RawByte(':')
- if m, ok := v43Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v43Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v43Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.HeadersText != "" {
- const prefix string = ",\"headersText\":"
- out.RawString(prefix)
- out.String(string(in.HeadersText))
- }
- {
- const prefix string = ",\"mimeType\":"
- out.RawString(prefix)
- out.String(string(in.MimeType))
- }
- if len(in.RequestHeaders) != 0 {
- const prefix string = ",\"requestHeaders\":"
- out.RawString(prefix)
- {
- out.RawByte('{')
- v44First := true
- for v44Name, v44Value := range in.RequestHeaders {
- if v44First {
- v44First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v44Name))
- out.RawByte(':')
- if m, ok := v44Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v44Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v44Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.RequestHeadersText != "" {
- const prefix string = ",\"requestHeadersText\":"
- out.RawString(prefix)
- out.String(string(in.RequestHeadersText))
- }
- {
- const prefix string = ",\"connectionReused\":"
- out.RawString(prefix)
- out.Bool(bool(in.ConnectionReused))
- }
- {
- const prefix string = ",\"connectionId\":"
- out.RawString(prefix)
- out.Float64(float64(in.ConnectionID))
- }
- if in.RemoteIPAddress != "" {
- const prefix string = ",\"remoteIPAddress\":"
- out.RawString(prefix)
- out.String(string(in.RemoteIPAddress))
- }
- if in.RemotePort != 0 {
- const prefix string = ",\"remotePort\":"
- out.RawString(prefix)
- out.Int64(int64(in.RemotePort))
- }
- if in.FromDiskCache {
- const prefix string = ",\"fromDiskCache\":"
- out.RawString(prefix)
- out.Bool(bool(in.FromDiskCache))
- }
- if in.FromServiceWorker {
- const prefix string = ",\"fromServiceWorker\":"
- out.RawString(prefix)
- out.Bool(bool(in.FromServiceWorker))
- }
- if in.FromPrefetchCache {
- const prefix string = ",\"fromPrefetchCache\":"
- out.RawString(prefix)
- out.Bool(bool(in.FromPrefetchCache))
- }
- {
- const prefix string = ",\"encodedDataLength\":"
- out.RawString(prefix)
- out.Float64(float64(in.EncodedDataLength))
- }
- if in.Timing != nil {
- const prefix string = ",\"timing\":"
- out.RawString(prefix)
- (*in.Timing).MarshalEasyJSON(out)
- }
- if in.ServiceWorkerResponseSource != "" {
- const prefix string = ",\"serviceWorkerResponseSource\":"
- out.RawString(prefix)
- (in.ServiceWorkerResponseSource).MarshalEasyJSON(out)
- }
- if in.ResponseTime != nil {
- const prefix string = ",\"responseTime\":"
- out.RawString(prefix)
- (*in.ResponseTime).MarshalEasyJSON(out)
- }
- if in.CacheStorageCacheName != "" {
- const prefix string = ",\"cacheStorageCacheName\":"
- out.RawString(prefix)
- out.String(string(in.CacheStorageCacheName))
- }
- if in.Protocol != "" {
- const prefix string = ",\"protocol\":"
- out.RawString(prefix)
- out.String(string(in.Protocol))
- }
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix)
- (in.SecurityState).MarshalEasyJSON(out)
- }
- if in.SecurityDetails != nil {
- const prefix string = ",\"securityDetails\":"
- out.RawString(prefix)
- (*in.SecurityDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Response) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Response) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Response) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork24(in *jlexer.Lexer, out *ResourceTiming) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestTime":
- out.RequestTime = float64(in.Float64())
- case "proxyStart":
- out.ProxyStart = float64(in.Float64())
- case "proxyEnd":
- out.ProxyEnd = float64(in.Float64())
- case "dnsStart":
- out.DNSStart = float64(in.Float64())
- case "dnsEnd":
- out.DNSEnd = float64(in.Float64())
- case "connectStart":
- out.ConnectStart = float64(in.Float64())
- case "connectEnd":
- out.ConnectEnd = float64(in.Float64())
- case "sslStart":
- out.SslStart = float64(in.Float64())
- case "sslEnd":
- out.SslEnd = float64(in.Float64())
- case "workerStart":
- out.WorkerStart = float64(in.Float64())
- case "workerReady":
- out.WorkerReady = float64(in.Float64())
- case "workerFetchStart":
- out.WorkerFetchStart = float64(in.Float64())
- case "workerRespondWithSettled":
- out.WorkerRespondWithSettled = float64(in.Float64())
- case "sendStart":
- out.SendStart = float64(in.Float64())
- case "sendEnd":
- out.SendEnd = float64(in.Float64())
- case "pushStart":
- out.PushStart = float64(in.Float64())
- case "pushEnd":
- out.PushEnd = float64(in.Float64())
- case "receiveHeadersEnd":
- out.ReceiveHeadersEnd = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork24(out *jwriter.Writer, in ResourceTiming) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestTime\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.RequestTime))
- }
- {
- const prefix string = ",\"proxyStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.ProxyStart))
- }
- {
- const prefix string = ",\"proxyEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.ProxyEnd))
- }
- {
- const prefix string = ",\"dnsStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.DNSStart))
- }
- {
- const prefix string = ",\"dnsEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.DNSEnd))
- }
- {
- const prefix string = ",\"connectStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.ConnectStart))
- }
- {
- const prefix string = ",\"connectEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.ConnectEnd))
- }
- {
- const prefix string = ",\"sslStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.SslStart))
- }
- {
- const prefix string = ",\"sslEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.SslEnd))
- }
- {
- const prefix string = ",\"workerStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.WorkerStart))
- }
- {
- const prefix string = ",\"workerReady\":"
- out.RawString(prefix)
- out.Float64(float64(in.WorkerReady))
- }
- {
- const prefix string = ",\"workerFetchStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.WorkerFetchStart))
- }
- {
- const prefix string = ",\"workerRespondWithSettled\":"
- out.RawString(prefix)
- out.Float64(float64(in.WorkerRespondWithSettled))
- }
- {
- const prefix string = ",\"sendStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.SendStart))
- }
- {
- const prefix string = ",\"sendEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.SendEnd))
- }
- {
- const prefix string = ",\"pushStart\":"
- out.RawString(prefix)
- out.Float64(float64(in.PushStart))
- }
- {
- const prefix string = ",\"pushEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.PushEnd))
- }
- {
- const prefix string = ",\"receiveHeadersEnd\":"
- out.RawString(prefix)
- out.Float64(float64(in.ReceiveHeadersEnd))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResourceTiming) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResourceTiming) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResourceTiming) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResourceTiming) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork25(in *jlexer.Lexer, out *RequestPattern) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "urlPattern":
- out.URLPattern = string(in.String())
- case "resourceType":
- (out.ResourceType).UnmarshalEasyJSON(in)
- case "interceptionStage":
- (out.InterceptionStage).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork25(out *jwriter.Writer, in RequestPattern) {
- out.RawByte('{')
- first := true
- _ = first
- if in.URLPattern != "" {
- const prefix string = ",\"urlPattern\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.URLPattern))
- }
- if in.ResourceType != "" {
- const prefix string = ",\"resourceType\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.ResourceType).MarshalEasyJSON(out)
- }
- if in.InterceptionStage != "" {
- const prefix string = ",\"interceptionStage\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.InterceptionStage).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestPattern) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestPattern) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestPattern) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestPattern) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork26(in *jlexer.Lexer, out *Request) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "urlFragment":
- out.URLFragment = string(in.String())
- case "method":
- out.Method = string(in.String())
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v45 interface{}
- if m, ok := v45.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v45.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v45 = in.Interface()
- }
- (out.Headers)[key] = v45
- in.WantComma()
- }
- in.Delim('}')
- }
- case "postData":
- out.PostData = string(in.String())
- case "hasPostData":
- out.HasPostData = bool(in.Bool())
- case "postDataEntries":
- if in.IsNull() {
- in.Skip()
- out.PostDataEntries = nil
- } else {
- in.Delim('[')
- if out.PostDataEntries == nil {
- if !in.IsDelim(']') {
- out.PostDataEntries = make([]*PostDataEntry, 0, 8)
- } else {
- out.PostDataEntries = []*PostDataEntry{}
- }
- } else {
- out.PostDataEntries = (out.PostDataEntries)[:0]
- }
- for !in.IsDelim(']') {
- var v46 *PostDataEntry
- if in.IsNull() {
- in.Skip()
- v46 = nil
- } else {
- if v46 == nil {
- v46 = new(PostDataEntry)
- }
- (*v46).UnmarshalEasyJSON(in)
- }
- out.PostDataEntries = append(out.PostDataEntries, v46)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "mixedContentType":
- (out.MixedContentType).UnmarshalEasyJSON(in)
- case "initialPriority":
- (out.InitialPriority).UnmarshalEasyJSON(in)
- case "referrerPolicy":
- (out.ReferrerPolicy).UnmarshalEasyJSON(in)
- case "isLinkPreload":
- out.IsLinkPreload = bool(in.Bool())
- case "trustTokenParams":
- if in.IsNull() {
- in.Skip()
- out.TrustTokenParams = nil
- } else {
- if out.TrustTokenParams == nil {
- out.TrustTokenParams = new(TrustTokenParams)
- }
- (*out.TrustTokenParams).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork26(out *jwriter.Writer, in Request) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if in.URLFragment != "" {
- const prefix string = ",\"urlFragment\":"
- out.RawString(prefix)
- out.String(string(in.URLFragment))
- }
- {
- const prefix string = ",\"method\":"
- out.RawString(prefix)
- out.String(string(in.Method))
- }
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v47First := true
- for v47Name, v47Value := range in.Headers {
- if v47First {
- v47First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v47Name))
- out.RawByte(':')
- if m, ok := v47Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v47Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v47Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.PostData != "" {
- const prefix string = ",\"postData\":"
- out.RawString(prefix)
- out.String(string(in.PostData))
- }
- if in.HasPostData {
- const prefix string = ",\"hasPostData\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasPostData))
- }
- if len(in.PostDataEntries) != 0 {
- const prefix string = ",\"postDataEntries\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v48, v49 := range in.PostDataEntries {
- if v48 > 0 {
- out.RawByte(',')
- }
- if v49 == nil {
- out.RawString("null")
- } else {
- (*v49).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.MixedContentType != "" {
- const prefix string = ",\"mixedContentType\":"
- out.RawString(prefix)
- (in.MixedContentType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"initialPriority\":"
- out.RawString(prefix)
- (in.InitialPriority).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"referrerPolicy\":"
- out.RawString(prefix)
- (in.ReferrerPolicy).MarshalEasyJSON(out)
- }
- if in.IsLinkPreload {
- const prefix string = ",\"isLinkPreload\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsLinkPreload))
- }
- if in.TrustTokenParams != nil {
- const prefix string = ",\"trustTokenParams\":"
- out.RawString(prefix)
- (*in.TrustTokenParams).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Request) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Request) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Request) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork27(in *jlexer.Lexer, out *ReplayXHRParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork27(out *jwriter.Writer, in ReplayXHRParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReplayXHRParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReplayXHRParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReplayXHRParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReplayXHRParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork28(in *jlexer.Lexer, out *PostDataEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "bytes":
- out.Bytes = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork28(out *jwriter.Writer, in PostDataEntry) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Bytes != "" {
- const prefix string = ",\"bytes\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Bytes))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PostDataEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PostDataEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PostDataEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PostDataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork29(in *jlexer.Lexer, out *LoadNetworkResourceReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "resource":
- if in.IsNull() {
- in.Skip()
- out.Resource = nil
- } else {
- if out.Resource == nil {
- out.Resource = new(LoadNetworkResourcePageResult)
- }
- (*out.Resource).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork29(out *jwriter.Writer, in LoadNetworkResourceReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Resource != nil {
- const prefix string = ",\"resource\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Resource).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadNetworkResourceReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadNetworkResourceReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadNetworkResourceReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadNetworkResourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork30(in *jlexer.Lexer, out *LoadNetworkResourceParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "options":
- if in.IsNull() {
- in.Skip()
- out.Options = nil
- } else {
- if out.Options == nil {
- out.Options = new(LoadNetworkResourceOptions)
- }
- (*out.Options).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork30(out *jwriter.Writer, in LoadNetworkResourceParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"options\":"
- out.RawString(prefix)
- if in.Options == nil {
- out.RawString("null")
- } else {
- (*in.Options).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadNetworkResourceParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadNetworkResourceParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadNetworkResourceParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadNetworkResourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork31(in *jlexer.Lexer, out *LoadNetworkResourcePageResult) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "success":
- out.Success = bool(in.Bool())
- case "netError":
- out.NetError = float64(in.Float64())
- case "netErrorName":
- out.NetErrorName = string(in.String())
- case "httpStatusCode":
- out.HTTPStatusCode = float64(in.Float64())
- case "stream":
- out.Stream = io.StreamHandle(in.String())
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- if !in.IsDelim('}') {
- out.Headers = make(Headers)
- } else {
- out.Headers = nil
- }
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v50 interface{}
- if m, ok := v50.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v50.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v50 = in.Interface()
- }
- (out.Headers)[key] = v50
- in.WantComma()
- }
- in.Delim('}')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork31(out *jwriter.Writer, in LoadNetworkResourcePageResult) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"success\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Success))
- }
- if in.NetError != 0 {
- const prefix string = ",\"netError\":"
- out.RawString(prefix)
- out.Float64(float64(in.NetError))
- }
- if in.NetErrorName != "" {
- const prefix string = ",\"netErrorName\":"
- out.RawString(prefix)
- out.String(string(in.NetErrorName))
- }
- if in.HTTPStatusCode != 0 {
- const prefix string = ",\"httpStatusCode\":"
- out.RawString(prefix)
- out.Float64(float64(in.HTTPStatusCode))
- }
- if in.Stream != "" {
- const prefix string = ",\"stream\":"
- out.RawString(prefix)
- out.String(string(in.Stream))
- }
- if len(in.Headers) != 0 {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- {
- out.RawByte('{')
- v51First := true
- for v51Name, v51Value := range in.Headers {
- if v51First {
- v51First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v51Name))
- out.RawByte(':')
- if m, ok := v51Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v51Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v51Value))
- }
- }
- out.RawByte('}')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadNetworkResourcePageResult) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadNetworkResourcePageResult) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadNetworkResourcePageResult) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadNetworkResourcePageResult) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork32(in *jlexer.Lexer, out *LoadNetworkResourceOptions) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "disableCache":
- out.DisableCache = bool(in.Bool())
- case "includeCredentials":
- out.IncludeCredentials = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork32(out *jwriter.Writer, in LoadNetworkResourceOptions) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"disableCache\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.DisableCache))
- }
- {
- const prefix string = ",\"includeCredentials\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeCredentials))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LoadNetworkResourceOptions) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LoadNetworkResourceOptions) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LoadNetworkResourceOptions) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LoadNetworkResourceOptions) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork33(in *jlexer.Lexer, out *Initiator) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "stack":
- if in.IsNull() {
- in.Skip()
- out.Stack = nil
- } else {
- if out.Stack == nil {
- out.Stack = new(runtime.StackTrace)
- }
- (*out.Stack).UnmarshalEasyJSON(in)
- }
- case "url":
- out.URL = string(in.String())
- case "lineNumber":
- out.LineNumber = float64(in.Float64())
- case "columnNumber":
- out.ColumnNumber = float64(in.Float64())
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork33(out *jwriter.Writer, in Initiator) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Stack != nil {
- const prefix string = ",\"stack\":"
- out.RawString(prefix)
- (*in.Stack).MarshalEasyJSON(out)
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.LineNumber != 0 {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Float64(float64(in.LineNumber))
- }
- if in.ColumnNumber != 0 {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Float64(float64(in.ColumnNumber))
- }
- if in.RequestID != "" {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix)
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Initiator) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Initiator) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Initiator) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Initiator) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork34(in *jlexer.Lexer, out *GetSecurityIsolationStatusReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "status":
- if in.IsNull() {
- in.Skip()
- out.Status = nil
- } else {
- if out.Status == nil {
- out.Status = new(SecurityIsolationStatus)
- }
- (*out.Status).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork34(out *jwriter.Writer, in GetSecurityIsolationStatusReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Status != nil {
- const prefix string = ",\"status\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Status).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSecurityIsolationStatusReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSecurityIsolationStatusReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSecurityIsolationStatusReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSecurityIsolationStatusReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork35(in *jlexer.Lexer, out *GetSecurityIsolationStatusParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork35(out *jwriter.Writer, in GetSecurityIsolationStatusParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSecurityIsolationStatusParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSecurityIsolationStatusParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSecurityIsolationStatusParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSecurityIsolationStatusParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork36(in *jlexer.Lexer, out *GetResponseBodyReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- case "base64Encoded":
- out.Base64encoded = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork36(out *jwriter.Writer, in GetResponseBodyReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Body != "" {
- const prefix string = ",\"body\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- if in.Base64encoded {
- const prefix string = ",\"base64Encoded\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Base64encoded))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork37(in *jlexer.Lexer, out *GetResponseBodyParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork37(out *jwriter.Writer, in GetResponseBodyParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork38(in *jlexer.Lexer, out *GetResponseBodyForInterceptionReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "body":
- out.Body = string(in.String())
- case "base64Encoded":
- out.Base64encoded = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork38(out *jwriter.Writer, in GetResponseBodyForInterceptionReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Body != "" {
- const prefix string = ",\"body\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Body))
- }
- if in.Base64encoded {
- const prefix string = ",\"base64Encoded\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Base64encoded))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyForInterceptionReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyForInterceptionReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyForInterceptionReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyForInterceptionReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork39(in *jlexer.Lexer, out *GetResponseBodyForInterceptionParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "interceptionId":
- out.InterceptionID = InterceptionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork39(out *jwriter.Writer, in GetResponseBodyForInterceptionParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"interceptionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.InterceptionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResponseBodyForInterceptionParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResponseBodyForInterceptionParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResponseBodyForInterceptionParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResponseBodyForInterceptionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork40(in *jlexer.Lexer, out *GetRequestPostDataReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "postData":
- out.PostData = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork40(out *jwriter.Writer, in GetRequestPostDataReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.PostData != "" {
- const prefix string = ",\"postData\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.PostData))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRequestPostDataReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRequestPostDataReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRequestPostDataReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRequestPostDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork41(in *jlexer.Lexer, out *GetRequestPostDataParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork41(out *jwriter.Writer, in GetRequestPostDataParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRequestPostDataParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRequestPostDataParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRequestPostDataParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRequestPostDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork42(in *jlexer.Lexer, out *GetCookiesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookies":
- if in.IsNull() {
- in.Skip()
- out.Cookies = nil
- } else {
- in.Delim('[')
- if out.Cookies == nil {
- if !in.IsDelim(']') {
- out.Cookies = make([]*Cookie, 0, 8)
- } else {
- out.Cookies = []*Cookie{}
- }
- } else {
- out.Cookies = (out.Cookies)[:0]
- }
- for !in.IsDelim(']') {
- var v52 *Cookie
- if in.IsNull() {
- in.Skip()
- v52 = nil
- } else {
- if v52 == nil {
- v52 = new(Cookie)
- }
- (*v52).UnmarshalEasyJSON(in)
- }
- out.Cookies = append(out.Cookies, v52)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork42(out *jwriter.Writer, in GetCookiesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Cookies) != 0 {
- const prefix string = ",\"cookies\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v53, v54 := range in.Cookies {
- if v53 > 0 {
- out.RawByte(',')
- }
- if v54 == nil {
- out.RawString("null")
- } else {
- (*v54).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCookiesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCookiesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork43(in *jlexer.Lexer, out *GetCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "urls":
- if in.IsNull() {
- in.Skip()
- out.Urls = nil
- } else {
- in.Delim('[')
- if out.Urls == nil {
- if !in.IsDelim(']') {
- out.Urls = make([]string, 0, 4)
- } else {
- out.Urls = []string{}
- }
- } else {
- out.Urls = (out.Urls)[:0]
- }
- for !in.IsDelim(']') {
- var v55 string
- v55 = string(in.String())
- out.Urls = append(out.Urls, v55)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork43(out *jwriter.Writer, in GetCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Urls) != 0 {
- const prefix string = ",\"urls\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v56, v57 := range in.Urls {
- if v56 > 0 {
- out.RawByte(',')
- }
- out.String(string(v57))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork44(in *jlexer.Lexer, out *GetCertificateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "tableNames":
- if in.IsNull() {
- in.Skip()
- out.TableNames = nil
- } else {
- in.Delim('[')
- if out.TableNames == nil {
- if !in.IsDelim(']') {
- out.TableNames = make([]string, 0, 4)
- } else {
- out.TableNames = []string{}
- }
- } else {
- out.TableNames = (out.TableNames)[:0]
- }
- for !in.IsDelim(']') {
- var v58 string
- v58 = string(in.String())
- out.TableNames = append(out.TableNames, v58)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork44(out *jwriter.Writer, in GetCertificateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.TableNames) != 0 {
- const prefix string = ",\"tableNames\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v59, v60 := range in.TableNames {
- if v59 > 0 {
- out.RawByte(',')
- }
- out.String(string(v60))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCertificateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCertificateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCertificateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCertificateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork45(in *jlexer.Lexer, out *GetCertificateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork45(out *jwriter.Writer, in GetCertificateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCertificateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCertificateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCertificateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCertificateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork46(in *jlexer.Lexer, out *GetAllCookiesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookies":
- if in.IsNull() {
- in.Skip()
- out.Cookies = nil
- } else {
- in.Delim('[')
- if out.Cookies == nil {
- if !in.IsDelim(']') {
- out.Cookies = make([]*Cookie, 0, 8)
- } else {
- out.Cookies = []*Cookie{}
- }
- } else {
- out.Cookies = (out.Cookies)[:0]
- }
- for !in.IsDelim(']') {
- var v61 *Cookie
- if in.IsNull() {
- in.Skip()
- v61 = nil
- } else {
- if v61 == nil {
- v61 = new(Cookie)
- }
- (*v61).UnmarshalEasyJSON(in)
- }
- out.Cookies = append(out.Cookies, v61)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork46(out *jwriter.Writer, in GetAllCookiesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Cookies) != 0 {
- const prefix string = ",\"cookies\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v62, v63 := range in.Cookies {
- if v62 > 0 {
- out.RawByte(',')
- }
- if v63 == nil {
- out.RawString("null")
- } else {
- (*v63).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAllCookiesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAllCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAllCookiesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAllCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork47(in *jlexer.Lexer, out *GetAllCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork47(out *jwriter.Writer, in GetAllCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAllCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAllCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAllCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAllCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork48(in *jlexer.Lexer, out *EventWebTransportCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "transportId":
- out.TransportID = RequestID(in.String())
- case "url":
- out.URL = string(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "initiator":
- if in.IsNull() {
- in.Skip()
- out.Initiator = nil
- } else {
- if out.Initiator == nil {
- out.Initiator = new(Initiator)
- }
- (*out.Initiator).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork48(out *jwriter.Writer, in EventWebTransportCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"transportId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TransportID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- if in.Initiator != nil {
- const prefix string = ",\"initiator\":"
- out.RawString(prefix)
- (*in.Initiator).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebTransportCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebTransportCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebTransportCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebTransportCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork49(in *jlexer.Lexer, out *EventWebTransportConnectionEstablished) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "transportId":
- out.TransportID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork49(out *jwriter.Writer, in EventWebTransportConnectionEstablished) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"transportId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TransportID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebTransportConnectionEstablished) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebTransportConnectionEstablished) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebTransportConnectionEstablished) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebTransportConnectionEstablished) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork50(in *jlexer.Lexer, out *EventWebTransportClosed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "transportId":
- out.TransportID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork50(out *jwriter.Writer, in EventWebTransportClosed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"transportId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TransportID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebTransportClosed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebTransportClosed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebTransportClosed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebTransportClosed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork50(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork51(in *jlexer.Lexer, out *EventWebSocketWillSendHandshakeRequest) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "wallTime":
- if in.IsNull() {
- in.Skip()
- out.WallTime = nil
- } else {
- if out.WallTime == nil {
- out.WallTime = new(cdp.TimeSinceEpoch)
- }
- (*out.WallTime).UnmarshalEasyJSON(in)
- }
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(WebSocketRequest)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork51(out *jwriter.Writer, in EventWebSocketWillSendHandshakeRequest) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"wallTime\":"
- out.RawString(prefix)
- if in.WallTime == nil {
- out.RawString("null")
- } else {
- (*in.WallTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketWillSendHandshakeRequest) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork51(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketWillSendHandshakeRequest) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork51(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork51(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketWillSendHandshakeRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork51(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork52(in *jlexer.Lexer, out *EventWebSocketHandshakeResponseReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(WebSocketResponse)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork52(out *jwriter.Writer, in EventWebSocketHandshakeResponseReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix)
- if in.Response == nil {
- out.RawString("null")
- } else {
- (*in.Response).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketHandshakeResponseReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork52(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketHandshakeResponseReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork52(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketHandshakeResponseReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork52(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketHandshakeResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork52(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork53(in *jlexer.Lexer, out *EventWebSocketFrameSent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(WebSocketFrame)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork53(out *jwriter.Writer, in EventWebSocketFrameSent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix)
- if in.Response == nil {
- out.RawString("null")
- } else {
- (*in.Response).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketFrameSent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork53(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketFrameSent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork53(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketFrameSent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork53(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketFrameSent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork53(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork54(in *jlexer.Lexer, out *EventWebSocketFrameReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(WebSocketFrame)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork54(out *jwriter.Writer, in EventWebSocketFrameReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix)
- if in.Response == nil {
- out.RawString("null")
- } else {
- (*in.Response).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketFrameReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork54(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketFrameReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork54(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketFrameReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork54(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketFrameReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork54(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork55(in *jlexer.Lexer, out *EventWebSocketFrameError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "errorMessage":
- out.ErrorMessage = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork55(out *jwriter.Writer, in EventWebSocketFrameError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"errorMessage\":"
- out.RawString(prefix)
- out.String(string(in.ErrorMessage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketFrameError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork55(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketFrameError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork55(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketFrameError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork55(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketFrameError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork55(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork56(in *jlexer.Lexer, out *EventWebSocketCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "url":
- out.URL = string(in.String())
- case "initiator":
- if in.IsNull() {
- in.Skip()
- out.Initiator = nil
- } else {
- if out.Initiator == nil {
- out.Initiator = new(Initiator)
- }
- (*out.Initiator).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork56(out *jwriter.Writer, in EventWebSocketCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.Initiator != nil {
- const prefix string = ",\"initiator\":"
- out.RawString(prefix)
- (*in.Initiator).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork56(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork56(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork56(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork56(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork57(in *jlexer.Lexer, out *EventWebSocketClosed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork57(out *jwriter.Writer, in EventWebSocketClosed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWebSocketClosed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork57(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWebSocketClosed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork57(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWebSocketClosed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork57(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWebSocketClosed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork57(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork58(in *jlexer.Lexer, out *EventTrustTokenOperationDone) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "topLevelOrigin":
- out.TopLevelOrigin = string(in.String())
- case "issuerOrigin":
- out.IssuerOrigin = string(in.String())
- case "issuedTokenCount":
- out.IssuedTokenCount = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork58(out *jwriter.Writer, in EventTrustTokenOperationDone) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix[1:])
- (in.Status).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix)
- out.String(string(in.RequestID))
- }
- if in.TopLevelOrigin != "" {
- const prefix string = ",\"topLevelOrigin\":"
- out.RawString(prefix)
- out.String(string(in.TopLevelOrigin))
- }
- if in.IssuerOrigin != "" {
- const prefix string = ",\"issuerOrigin\":"
- out.RawString(prefix)
- out.String(string(in.IssuerOrigin))
- }
- if in.IssuedTokenCount != 0 {
- const prefix string = ",\"issuedTokenCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.IssuedTokenCount))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTrustTokenOperationDone) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork58(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTrustTokenOperationDone) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork58(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTrustTokenOperationDone) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork58(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTrustTokenOperationDone) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork58(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork59(in *jlexer.Lexer, out *EventSubresourceWebBundleMetadataReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "urls":
- if in.IsNull() {
- in.Skip()
- out.Urls = nil
- } else {
- in.Delim('[')
- if out.Urls == nil {
- if !in.IsDelim(']') {
- out.Urls = make([]string, 0, 4)
- } else {
- out.Urls = []string{}
- }
- } else {
- out.Urls = (out.Urls)[:0]
- }
- for !in.IsDelim(']') {
- var v64 string
- v64 = string(in.String())
- out.Urls = append(out.Urls, v64)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork59(out *jwriter.Writer, in EventSubresourceWebBundleMetadataReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"urls\":"
- out.RawString(prefix)
- if in.Urls == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v65, v66 := range in.Urls {
- if v65 > 0 {
- out.RawByte(',')
- }
- out.String(string(v66))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSubresourceWebBundleMetadataReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork59(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSubresourceWebBundleMetadataReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork59(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSubresourceWebBundleMetadataReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork59(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSubresourceWebBundleMetadataReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork59(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork60(in *jlexer.Lexer, out *EventSubresourceWebBundleMetadataError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "errorMessage":
- out.ErrorMessage = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork60(out *jwriter.Writer, in EventSubresourceWebBundleMetadataError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"errorMessage\":"
- out.RawString(prefix)
- out.String(string(in.ErrorMessage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSubresourceWebBundleMetadataError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork60(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSubresourceWebBundleMetadataError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork60(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSubresourceWebBundleMetadataError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork60(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSubresourceWebBundleMetadataError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork60(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork61(in *jlexer.Lexer, out *EventSubresourceWebBundleInnerResponseParsed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "innerRequestId":
- out.InnerRequestID = RequestID(in.String())
- case "innerRequestURL":
- out.InnerRequestURL = string(in.String())
- case "bundleRequestId":
- out.BundleRequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork61(out *jwriter.Writer, in EventSubresourceWebBundleInnerResponseParsed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"innerRequestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.InnerRequestID))
- }
- {
- const prefix string = ",\"innerRequestURL\":"
- out.RawString(prefix)
- out.String(string(in.InnerRequestURL))
- }
- if in.BundleRequestID != "" {
- const prefix string = ",\"bundleRequestId\":"
- out.RawString(prefix)
- out.String(string(in.BundleRequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSubresourceWebBundleInnerResponseParsed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork61(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSubresourceWebBundleInnerResponseParsed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork61(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSubresourceWebBundleInnerResponseParsed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork61(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSubresourceWebBundleInnerResponseParsed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork61(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork62(in *jlexer.Lexer, out *EventSubresourceWebBundleInnerResponseError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "innerRequestId":
- out.InnerRequestID = RequestID(in.String())
- case "innerRequestURL":
- out.InnerRequestURL = string(in.String())
- case "errorMessage":
- out.ErrorMessage = string(in.String())
- case "bundleRequestId":
- out.BundleRequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork62(out *jwriter.Writer, in EventSubresourceWebBundleInnerResponseError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"innerRequestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.InnerRequestID))
- }
- {
- const prefix string = ",\"innerRequestURL\":"
- out.RawString(prefix)
- out.String(string(in.InnerRequestURL))
- }
- {
- const prefix string = ",\"errorMessage\":"
- out.RawString(prefix)
- out.String(string(in.ErrorMessage))
- }
- if in.BundleRequestID != "" {
- const prefix string = ",\"bundleRequestId\":"
- out.RawString(prefix)
- out.String(string(in.BundleRequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSubresourceWebBundleInnerResponseError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork62(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSubresourceWebBundleInnerResponseError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork62(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSubresourceWebBundleInnerResponseError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork62(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSubresourceWebBundleInnerResponseError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork62(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork63(in *jlexer.Lexer, out *EventSignedExchangeReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "info":
- if in.IsNull() {
- in.Skip()
- out.Info = nil
- } else {
- if out.Info == nil {
- out.Info = new(SignedExchangeInfo)
- }
- (*out.Info).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork63(out *jwriter.Writer, in EventSignedExchangeReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"info\":"
- out.RawString(prefix)
- if in.Info == nil {
- out.RawString("null")
- } else {
- (*in.Info).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSignedExchangeReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork63(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSignedExchangeReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork63(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSignedExchangeReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork63(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSignedExchangeReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork63(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork64(in *jlexer.Lexer, out *EventResponseReceivedExtraInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "blockedCookies":
- if in.IsNull() {
- in.Skip()
- out.BlockedCookies = nil
- } else {
- in.Delim('[')
- if out.BlockedCookies == nil {
- if !in.IsDelim(']') {
- out.BlockedCookies = make([]*BlockedSetCookieWithReason, 0, 8)
- } else {
- out.BlockedCookies = []*BlockedSetCookieWithReason{}
- }
- } else {
- out.BlockedCookies = (out.BlockedCookies)[:0]
- }
- for !in.IsDelim(']') {
- var v67 *BlockedSetCookieWithReason
- if in.IsNull() {
- in.Skip()
- v67 = nil
- } else {
- if v67 == nil {
- v67 = new(BlockedSetCookieWithReason)
- }
- (*v67).UnmarshalEasyJSON(in)
- }
- out.BlockedCookies = append(out.BlockedCookies, v67)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v68 interface{}
- if m, ok := v68.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v68.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v68 = in.Interface()
- }
- (out.Headers)[key] = v68
- in.WantComma()
- }
- in.Delim('}')
- }
- case "resourceIPAddressSpace":
- (out.ResourceIPAddressSpace).UnmarshalEasyJSON(in)
- case "headersText":
- out.HeadersText = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork64(out *jwriter.Writer, in EventResponseReceivedExtraInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"blockedCookies\":"
- out.RawString(prefix)
- if in.BlockedCookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v69, v70 := range in.BlockedCookies {
- if v69 > 0 {
- out.RawByte(',')
- }
- if v70 == nil {
- out.RawString("null")
- } else {
- (*v70).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v71First := true
- for v71Name, v71Value := range in.Headers {
- if v71First {
- v71First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v71Name))
- out.RawByte(':')
- if m, ok := v71Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v71Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v71Value))
- }
- }
- out.RawByte('}')
- }
- }
- {
- const prefix string = ",\"resourceIPAddressSpace\":"
- out.RawString(prefix)
- (in.ResourceIPAddressSpace).MarshalEasyJSON(out)
- }
- if in.HeadersText != "" {
- const prefix string = ",\"headersText\":"
- out.RawString(prefix)
- out.String(string(in.HeadersText))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventResponseReceivedExtraInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork64(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventResponseReceivedExtraInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork64(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventResponseReceivedExtraInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork64(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventResponseReceivedExtraInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork64(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork65(in *jlexer.Lexer, out *EventResponseReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(Response)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork65(out *jwriter.Writer, in EventResponseReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix)
- if in.Response == nil {
- out.RawString("null")
- } else {
- (*in.Response).MarshalEasyJSON(out)
- }
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventResponseReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork65(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventResponseReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork65(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventResponseReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork65(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventResponseReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork65(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork66(in *jlexer.Lexer, out *EventResourceChangedPriority) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "newPriority":
- (out.NewPriority).UnmarshalEasyJSON(in)
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork66(out *jwriter.Writer, in EventResourceChangedPriority) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"newPriority\":"
- out.RawString(prefix)
- (in.NewPriority).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventResourceChangedPriority) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork66(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventResourceChangedPriority) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork66(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventResourceChangedPriority) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork66(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventResourceChangedPriority) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork66(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork67(in *jlexer.Lexer, out *EventRequestWillBeSentExtraInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "associatedCookies":
- if in.IsNull() {
- in.Skip()
- out.AssociatedCookies = nil
- } else {
- in.Delim('[')
- if out.AssociatedCookies == nil {
- if !in.IsDelim(']') {
- out.AssociatedCookies = make([]*BlockedCookieWithReason, 0, 8)
- } else {
- out.AssociatedCookies = []*BlockedCookieWithReason{}
- }
- } else {
- out.AssociatedCookies = (out.AssociatedCookies)[:0]
- }
- for !in.IsDelim(']') {
- var v72 *BlockedCookieWithReason
- if in.IsNull() {
- in.Skip()
- v72 = nil
- } else {
- if v72 == nil {
- v72 = new(BlockedCookieWithReason)
- }
- (*v72).UnmarshalEasyJSON(in)
- }
- out.AssociatedCookies = append(out.AssociatedCookies, v72)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "headers":
- if in.IsNull() {
- in.Skip()
- } else {
- in.Delim('{')
- out.Headers = make(Headers)
- for !in.IsDelim('}') {
- key := string(in.String())
- in.WantColon()
- var v73 interface{}
- if m, ok := v73.(easyjson.Unmarshaler); ok {
- m.UnmarshalEasyJSON(in)
- } else if m, ok := v73.(json.Unmarshaler); ok {
- _ = m.UnmarshalJSON(in.Raw())
- } else {
- v73 = in.Interface()
- }
- (out.Headers)[key] = v73
- in.WantComma()
- }
- in.Delim('}')
- }
- case "clientSecurityState":
- if in.IsNull() {
- in.Skip()
- out.ClientSecurityState = nil
- } else {
- if out.ClientSecurityState == nil {
- out.ClientSecurityState = new(ClientSecurityState)
- }
- (*out.ClientSecurityState).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork67(out *jwriter.Writer, in EventRequestWillBeSentExtraInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"associatedCookies\":"
- out.RawString(prefix)
- if in.AssociatedCookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v74, v75 := range in.AssociatedCookies {
- if v74 > 0 {
- out.RawByte(',')
- }
- if v75 == nil {
- out.RawString("null")
- } else {
- (*v75).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"headers\":"
- out.RawString(prefix)
- if in.Headers == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
- out.RawString(`null`)
- } else {
- out.RawByte('{')
- v76First := true
- for v76Name, v76Value := range in.Headers {
- if v76First {
- v76First = false
- } else {
- out.RawByte(',')
- }
- out.String(string(v76Name))
- out.RawByte(':')
- if m, ok := v76Value.(easyjson.Marshaler); ok {
- m.MarshalEasyJSON(out)
- } else if m, ok := v76Value.(json.Marshaler); ok {
- out.Raw(m.MarshalJSON())
- } else {
- out.Raw(json.Marshal(v76Value))
- }
- }
- out.RawByte('}')
- }
- }
- if in.ClientSecurityState != nil {
- const prefix string = ",\"clientSecurityState\":"
- out.RawString(prefix)
- (*in.ClientSecurityState).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventRequestWillBeSentExtraInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork67(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventRequestWillBeSentExtraInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork67(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventRequestWillBeSentExtraInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork67(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventRequestWillBeSentExtraInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork67(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork68(in *jlexer.Lexer, out *EventRequestWillBeSent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "documentURL":
- out.DocumentURL = string(in.String())
- case "request":
- if in.IsNull() {
- in.Skip()
- out.Request = nil
- } else {
- if out.Request == nil {
- out.Request = new(Request)
- }
- (*out.Request).UnmarshalEasyJSON(in)
- }
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "wallTime":
- if in.IsNull() {
- in.Skip()
- out.WallTime = nil
- } else {
- if out.WallTime == nil {
- out.WallTime = new(cdp.TimeSinceEpoch)
- }
- (*out.WallTime).UnmarshalEasyJSON(in)
- }
- case "initiator":
- if in.IsNull() {
- in.Skip()
- out.Initiator = nil
- } else {
- if out.Initiator == nil {
- out.Initiator = new(Initiator)
- }
- (*out.Initiator).UnmarshalEasyJSON(in)
- }
- case "redirectResponse":
- if in.IsNull() {
- in.Skip()
- out.RedirectResponse = nil
- } else {
- if out.RedirectResponse == nil {
- out.RedirectResponse = new(Response)
- }
- (*out.RedirectResponse).UnmarshalEasyJSON(in)
- }
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "hasUserGesture":
- out.HasUserGesture = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork68(out *jwriter.Writer, in EventRequestWillBeSent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"documentURL\":"
- out.RawString(prefix)
- out.String(string(in.DocumentURL))
- }
- {
- const prefix string = ",\"request\":"
- out.RawString(prefix)
- if in.Request == nil {
- out.RawString("null")
- } else {
- (*in.Request).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"wallTime\":"
- out.RawString(prefix)
- if in.WallTime == nil {
- out.RawString("null")
- } else {
- (*in.WallTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"initiator\":"
- out.RawString(prefix)
- if in.Initiator == nil {
- out.RawString("null")
- } else {
- (*in.Initiator).MarshalEasyJSON(out)
- }
- }
- if in.RedirectResponse != nil {
- const prefix string = ",\"redirectResponse\":"
- out.RawString(prefix)
- (*in.RedirectResponse).MarshalEasyJSON(out)
- }
- if in.Type != "" {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- if in.HasUserGesture {
- const prefix string = ",\"hasUserGesture\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasUserGesture))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventRequestWillBeSent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork68(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventRequestWillBeSent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork68(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventRequestWillBeSent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork68(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventRequestWillBeSent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork68(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork69(in *jlexer.Lexer, out *EventRequestServedFromCache) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork69(out *jwriter.Writer, in EventRequestServedFromCache) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventRequestServedFromCache) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork69(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventRequestServedFromCache) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork69(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventRequestServedFromCache) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork69(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventRequestServedFromCache) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork69(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork70(in *jlexer.Lexer, out *EventLoadingFinished) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "encodedDataLength":
- out.EncodedDataLength = float64(in.Float64())
- case "shouldReportCorbBlocking":
- out.ShouldReportCorbBlocking = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork70(out *jwriter.Writer, in EventLoadingFinished) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"encodedDataLength\":"
- out.RawString(prefix)
- out.Float64(float64(in.EncodedDataLength))
- }
- if in.ShouldReportCorbBlocking {
- const prefix string = ",\"shouldReportCorbBlocking\":"
- out.RawString(prefix)
- out.Bool(bool(in.ShouldReportCorbBlocking))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLoadingFinished) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork70(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLoadingFinished) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork70(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLoadingFinished) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork70(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLoadingFinished) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork70(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork71(in *jlexer.Lexer, out *EventLoadingFailed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "errorText":
- out.ErrorText = string(in.String())
- case "canceled":
- out.Canceled = bool(in.Bool())
- case "blockedReason":
- (out.BlockedReason).UnmarshalEasyJSON(in)
- case "corsErrorStatus":
- if in.IsNull() {
- in.Skip()
- out.CorsErrorStatus = nil
- } else {
- if out.CorsErrorStatus == nil {
- out.CorsErrorStatus = new(CorsErrorStatus)
- }
- (*out.CorsErrorStatus).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork71(out *jwriter.Writer, in EventLoadingFailed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"errorText\":"
- out.RawString(prefix)
- out.String(string(in.ErrorText))
- }
- if in.Canceled {
- const prefix string = ",\"canceled\":"
- out.RawString(prefix)
- out.Bool(bool(in.Canceled))
- }
- if in.BlockedReason != "" {
- const prefix string = ",\"blockedReason\":"
- out.RawString(prefix)
- (in.BlockedReason).MarshalEasyJSON(out)
- }
- if in.CorsErrorStatus != nil {
- const prefix string = ",\"corsErrorStatus\":"
- out.RawString(prefix)
- (*in.CorsErrorStatus).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLoadingFailed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork71(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLoadingFailed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork71(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLoadingFailed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork71(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLoadingFailed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork71(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork72(in *jlexer.Lexer, out *EventEventSourceMessageReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "eventName":
- out.EventName = string(in.String())
- case "eventId":
- out.EventID = string(in.String())
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork72(out *jwriter.Writer, in EventEventSourceMessageReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"eventName\":"
- out.RawString(prefix)
- out.String(string(in.EventName))
- }
- {
- const prefix string = ",\"eventId\":"
- out.RawString(prefix)
- out.String(string(in.EventID))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventEventSourceMessageReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork72(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventEventSourceMessageReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork72(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventEventSourceMessageReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork72(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventEventSourceMessageReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork72(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork73(in *jlexer.Lexer, out *EventDataReceived) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "requestId":
- out.RequestID = RequestID(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "dataLength":
- out.DataLength = int64(in.Int64())
- case "encodedDataLength":
- out.EncodedDataLength = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork73(out *jwriter.Writer, in EventDataReceived) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RequestID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"dataLength\":"
- out.RawString(prefix)
- out.Int64(int64(in.DataLength))
- }
- {
- const prefix string = ",\"encodedDataLength\":"
- out.RawString(prefix)
- out.Int64(int64(in.EncodedDataLength))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDataReceived) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork73(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDataReceived) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork73(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDataReceived) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork73(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDataReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork73(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork74(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "maxTotalBufferSize":
- out.MaxTotalBufferSize = int64(in.Int64())
- case "maxResourceBufferSize":
- out.MaxResourceBufferSize = int64(in.Int64())
- case "maxPostDataSize":
- out.MaxPostDataSize = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork74(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.MaxTotalBufferSize != 0 {
- const prefix string = ",\"maxTotalBufferSize\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.MaxTotalBufferSize))
- }
- if in.MaxResourceBufferSize != 0 {
- const prefix string = ",\"maxResourceBufferSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.MaxResourceBufferSize))
- }
- if in.MaxPostDataSize != 0 {
- const prefix string = ",\"maxPostDataSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.MaxPostDataSize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork74(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork74(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork74(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork74(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork75(in *jlexer.Lexer, out *EmulateNetworkConditionsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "offline":
- out.Offline = bool(in.Bool())
- case "latency":
- out.Latency = float64(in.Float64())
- case "downloadThroughput":
- out.DownloadThroughput = float64(in.Float64())
- case "uploadThroughput":
- out.UploadThroughput = float64(in.Float64())
- case "connectionType":
- (out.ConnectionType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork75(out *jwriter.Writer, in EmulateNetworkConditionsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"offline\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Offline))
- }
- {
- const prefix string = ",\"latency\":"
- out.RawString(prefix)
- out.Float64(float64(in.Latency))
- }
- {
- const prefix string = ",\"downloadThroughput\":"
- out.RawString(prefix)
- out.Float64(float64(in.DownloadThroughput))
- }
- {
- const prefix string = ",\"uploadThroughput\":"
- out.RawString(prefix)
- out.Float64(float64(in.UploadThroughput))
- }
- if in.ConnectionType != "" {
- const prefix string = ",\"connectionType\":"
- out.RawString(prefix)
- (in.ConnectionType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork75(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork75(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork75(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork75(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork76(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork76(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork76(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork76(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork76(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork76(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork77(in *jlexer.Lexer, out *DeleteCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "domain":
- out.Domain = string(in.String())
- case "path":
- out.Path = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork77(out *jwriter.Writer, in DeleteCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.Domain != "" {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- if in.Path != "" {
- const prefix string = ",\"path\":"
- out.RawString(prefix)
- out.String(string(in.Path))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeleteCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork77(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeleteCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork77(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeleteCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork77(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeleteCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork77(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork78(in *jlexer.Lexer, out *CrossOriginOpenerPolicyStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- (out.Value).UnmarshalEasyJSON(in)
- case "reportOnlyValue":
- (out.ReportOnlyValue).UnmarshalEasyJSON(in)
- case "reportingEndpoint":
- out.ReportingEndpoint = string(in.String())
- case "reportOnlyReportingEndpoint":
- out.ReportOnlyReportingEndpoint = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork78(out *jwriter.Writer, in CrossOriginOpenerPolicyStatus) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- (in.Value).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"reportOnlyValue\":"
- out.RawString(prefix)
- (in.ReportOnlyValue).MarshalEasyJSON(out)
- }
- if in.ReportingEndpoint != "" {
- const prefix string = ",\"reportingEndpoint\":"
- out.RawString(prefix)
- out.String(string(in.ReportingEndpoint))
- }
- if in.ReportOnlyReportingEndpoint != "" {
- const prefix string = ",\"reportOnlyReportingEndpoint\":"
- out.RawString(prefix)
- out.String(string(in.ReportOnlyReportingEndpoint))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CrossOriginOpenerPolicyStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork78(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CrossOriginOpenerPolicyStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork78(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CrossOriginOpenerPolicyStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork78(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CrossOriginOpenerPolicyStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork78(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork79(in *jlexer.Lexer, out *CrossOriginEmbedderPolicyStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- (out.Value).UnmarshalEasyJSON(in)
- case "reportOnlyValue":
- (out.ReportOnlyValue).UnmarshalEasyJSON(in)
- case "reportingEndpoint":
- out.ReportingEndpoint = string(in.String())
- case "reportOnlyReportingEndpoint":
- out.ReportOnlyReportingEndpoint = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork79(out *jwriter.Writer, in CrossOriginEmbedderPolicyStatus) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- (in.Value).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"reportOnlyValue\":"
- out.RawString(prefix)
- (in.ReportOnlyValue).MarshalEasyJSON(out)
- }
- if in.ReportingEndpoint != "" {
- const prefix string = ",\"reportingEndpoint\":"
- out.RawString(prefix)
- out.String(string(in.ReportingEndpoint))
- }
- if in.ReportOnlyReportingEndpoint != "" {
- const prefix string = ",\"reportOnlyReportingEndpoint\":"
- out.RawString(prefix)
- out.String(string(in.ReportOnlyReportingEndpoint))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CrossOriginEmbedderPolicyStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork79(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CrossOriginEmbedderPolicyStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork79(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CrossOriginEmbedderPolicyStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork79(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CrossOriginEmbedderPolicyStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork79(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork80(in *jlexer.Lexer, out *CorsErrorStatus) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "corsError":
- (out.CorsError).UnmarshalEasyJSON(in)
- case "failedParameter":
- out.FailedParameter = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork80(out *jwriter.Writer, in CorsErrorStatus) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"corsError\":"
- out.RawString(prefix[1:])
- (in.CorsError).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"failedParameter\":"
- out.RawString(prefix)
- out.String(string(in.FailedParameter))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CorsErrorStatus) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork80(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CorsErrorStatus) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork80(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CorsErrorStatus) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork80(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CorsErrorStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork80(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork81(in *jlexer.Lexer, out *CookieParam) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "domain":
- out.Domain = string(in.String())
- case "path":
- out.Path = string(in.String())
- case "secure":
- out.Secure = bool(in.Bool())
- case "httpOnly":
- out.HTTPOnly = bool(in.Bool())
- case "sameSite":
- (out.SameSite).UnmarshalEasyJSON(in)
- case "expires":
- if in.IsNull() {
- in.Skip()
- out.Expires = nil
- } else {
- if out.Expires == nil {
- out.Expires = new(cdp.TimeSinceEpoch)
- }
- (*out.Expires).UnmarshalEasyJSON(in)
- }
- case "priority":
- (out.Priority).UnmarshalEasyJSON(in)
- case "sameParty":
- out.SameParty = bool(in.Bool())
- case "sourceScheme":
- (out.SourceScheme).UnmarshalEasyJSON(in)
- case "sourcePort":
- out.SourcePort = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork81(out *jwriter.Writer, in CookieParam) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.Domain != "" {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- if in.Path != "" {
- const prefix string = ",\"path\":"
- out.RawString(prefix)
- out.String(string(in.Path))
- }
- if in.Secure {
- const prefix string = ",\"secure\":"
- out.RawString(prefix)
- out.Bool(bool(in.Secure))
- }
- if in.HTTPOnly {
- const prefix string = ",\"httpOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.HTTPOnly))
- }
- if in.SameSite != "" {
- const prefix string = ",\"sameSite\":"
- out.RawString(prefix)
- (in.SameSite).MarshalEasyJSON(out)
- }
- if in.Expires != nil {
- const prefix string = ",\"expires\":"
- out.RawString(prefix)
- (*in.Expires).MarshalEasyJSON(out)
- }
- if in.Priority != "" {
- const prefix string = ",\"priority\":"
- out.RawString(prefix)
- (in.Priority).MarshalEasyJSON(out)
- }
- if in.SameParty {
- const prefix string = ",\"sameParty\":"
- out.RawString(prefix)
- out.Bool(bool(in.SameParty))
- }
- if in.SourceScheme != "" {
- const prefix string = ",\"sourceScheme\":"
- out.RawString(prefix)
- (in.SourceScheme).MarshalEasyJSON(out)
- }
- if in.SourcePort != 0 {
- const prefix string = ",\"sourcePort\":"
- out.RawString(prefix)
- out.Int64(int64(in.SourcePort))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CookieParam) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork81(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CookieParam) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork81(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CookieParam) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork81(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CookieParam) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork81(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork82(in *jlexer.Lexer, out *Cookie) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- case "domain":
- out.Domain = string(in.String())
- case "path":
- out.Path = string(in.String())
- case "expires":
- out.Expires = float64(in.Float64())
- case "size":
- out.Size = int64(in.Int64())
- case "httpOnly":
- out.HTTPOnly = bool(in.Bool())
- case "secure":
- out.Secure = bool(in.Bool())
- case "session":
- out.Session = bool(in.Bool())
- case "sameSite":
- (out.SameSite).UnmarshalEasyJSON(in)
- case "priority":
- (out.Priority).UnmarshalEasyJSON(in)
- case "sameParty":
- out.SameParty = bool(in.Bool())
- case "sourceScheme":
- (out.SourceScheme).UnmarshalEasyJSON(in)
- case "sourcePort":
- out.SourcePort = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork82(out *jwriter.Writer, in Cookie) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- {
- const prefix string = ",\"domain\":"
- out.RawString(prefix)
- out.String(string(in.Domain))
- }
- {
- const prefix string = ",\"path\":"
- out.RawString(prefix)
- out.String(string(in.Path))
- }
- {
- const prefix string = ",\"expires\":"
- out.RawString(prefix)
- out.Float64(float64(in.Expires))
- }
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Int64(int64(in.Size))
- }
- {
- const prefix string = ",\"httpOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.HTTPOnly))
- }
- {
- const prefix string = ",\"secure\":"
- out.RawString(prefix)
- out.Bool(bool(in.Secure))
- }
- {
- const prefix string = ",\"session\":"
- out.RawString(prefix)
- out.Bool(bool(in.Session))
- }
- if in.SameSite != "" {
- const prefix string = ",\"sameSite\":"
- out.RawString(prefix)
- (in.SameSite).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"priority\":"
- out.RawString(prefix)
- (in.Priority).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"sameParty\":"
- out.RawString(prefix)
- out.Bool(bool(in.SameParty))
- }
- {
- const prefix string = ",\"sourceScheme\":"
- out.RawString(prefix)
- (in.SourceScheme).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"sourcePort\":"
- out.RawString(prefix)
- out.Int64(int64(in.SourcePort))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Cookie) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork82(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork82(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Cookie) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork82(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork82(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork83(in *jlexer.Lexer, out *ClientSecurityState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "initiatorIsSecureContext":
- out.InitiatorIsSecureContext = bool(in.Bool())
- case "initiatorIPAddressSpace":
- (out.InitiatorIPAddressSpace).UnmarshalEasyJSON(in)
- case "privateNetworkRequestPolicy":
- (out.PrivateNetworkRequestPolicy).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork83(out *jwriter.Writer, in ClientSecurityState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"initiatorIsSecureContext\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.InitiatorIsSecureContext))
- }
- {
- const prefix string = ",\"initiatorIPAddressSpace\":"
- out.RawString(prefix)
- (in.InitiatorIPAddressSpace).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"privateNetworkRequestPolicy\":"
- out.RawString(prefix)
- (in.PrivateNetworkRequestPolicy).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClientSecurityState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork83(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClientSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork83(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClientSecurityState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork83(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClientSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork83(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork84(in *jlexer.Lexer, out *ClearBrowserCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork84(out *jwriter.Writer, in ClearBrowserCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearBrowserCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork84(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork84(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearBrowserCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork84(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork84(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork85(in *jlexer.Lexer, out *ClearBrowserCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork85(out *jwriter.Writer, in ClearBrowserCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearBrowserCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork85(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork85(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearBrowserCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork85(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork85(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork86(in *jlexer.Lexer, out *ClearAcceptedEncodingsOverrideParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork86(out *jwriter.Writer, in ClearAcceptedEncodingsOverrideParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearAcceptedEncodingsOverrideParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork86(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearAcceptedEncodingsOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork86(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearAcceptedEncodingsOverrideParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork86(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearAcceptedEncodingsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork86(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork87(in *jlexer.Lexer, out *CachedResource) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "response":
- if in.IsNull() {
- in.Skip()
- out.Response = nil
- } else {
- if out.Response == nil {
- out.Response = new(Response)
- }
- (*out.Response).UnmarshalEasyJSON(in)
- }
- case "bodySize":
- out.BodySize = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork87(out *jwriter.Writer, in CachedResource) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Response != nil {
- const prefix string = ",\"response\":"
- out.RawString(prefix)
- (*in.Response).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"bodySize\":"
- out.RawString(prefix)
- out.Float64(float64(in.BodySize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CachedResource) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork87(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CachedResource) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork87(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CachedResource) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork87(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork87(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork88(in *jlexer.Lexer, out *BlockedSetCookieWithReason) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "blockedReasons":
- if in.IsNull() {
- in.Skip()
- out.BlockedReasons = nil
- } else {
- in.Delim('[')
- if out.BlockedReasons == nil {
- if !in.IsDelim(']') {
- out.BlockedReasons = make([]SetCookieBlockedReason, 0, 4)
- } else {
- out.BlockedReasons = []SetCookieBlockedReason{}
- }
- } else {
- out.BlockedReasons = (out.BlockedReasons)[:0]
- }
- for !in.IsDelim(']') {
- var v77 SetCookieBlockedReason
- (v77).UnmarshalEasyJSON(in)
- out.BlockedReasons = append(out.BlockedReasons, v77)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cookieLine":
- out.CookieLine = string(in.String())
- case "cookie":
- if in.IsNull() {
- in.Skip()
- out.Cookie = nil
- } else {
- if out.Cookie == nil {
- out.Cookie = new(Cookie)
- }
- (*out.Cookie).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork88(out *jwriter.Writer, in BlockedSetCookieWithReason) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"blockedReasons\":"
- out.RawString(prefix[1:])
- if in.BlockedReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v78, v79 := range in.BlockedReasons {
- if v78 > 0 {
- out.RawByte(',')
- }
- (v79).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"cookieLine\":"
- out.RawString(prefix)
- out.String(string(in.CookieLine))
- }
- if in.Cookie != nil {
- const prefix string = ",\"cookie\":"
- out.RawString(prefix)
- (*in.Cookie).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BlockedSetCookieWithReason) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork88(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BlockedSetCookieWithReason) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork88(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BlockedSetCookieWithReason) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork88(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BlockedSetCookieWithReason) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork88(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork89(in *jlexer.Lexer, out *BlockedCookieWithReason) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "blockedReasons":
- if in.IsNull() {
- in.Skip()
- out.BlockedReasons = nil
- } else {
- in.Delim('[')
- if out.BlockedReasons == nil {
- if !in.IsDelim(']') {
- out.BlockedReasons = make([]CookieBlockedReason, 0, 4)
- } else {
- out.BlockedReasons = []CookieBlockedReason{}
- }
- } else {
- out.BlockedReasons = (out.BlockedReasons)[:0]
- }
- for !in.IsDelim(']') {
- var v80 CookieBlockedReason
- (v80).UnmarshalEasyJSON(in)
- out.BlockedReasons = append(out.BlockedReasons, v80)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "cookie":
- if in.IsNull() {
- in.Skip()
- out.Cookie = nil
- } else {
- if out.Cookie == nil {
- out.Cookie = new(Cookie)
- }
- (*out.Cookie).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork89(out *jwriter.Writer, in BlockedCookieWithReason) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"blockedReasons\":"
- out.RawString(prefix[1:])
- if in.BlockedReasons == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v81, v82 := range in.BlockedReasons {
- if v81 > 0 {
- out.RawByte(',')
- }
- (v82).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"cookie\":"
- out.RawString(prefix)
- if in.Cookie == nil {
- out.RawString("null")
- } else {
- (*in.Cookie).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BlockedCookieWithReason) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork89(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BlockedCookieWithReason) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork89(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BlockedCookieWithReason) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork89(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BlockedCookieWithReason) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork89(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(in *jlexer.Lexer, out *AuthChallengeResponse) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "response":
- (out.Response).UnmarshalEasyJSON(in)
- case "username":
- out.Username = string(in.String())
- case "password":
- out.Password = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(out *jwriter.Writer, in AuthChallengeResponse) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"response\":"
- out.RawString(prefix[1:])
- (in.Response).MarshalEasyJSON(out)
- }
- if in.Username != "" {
- const prefix string = ",\"username\":"
- out.RawString(prefix)
- out.String(string(in.Username))
- }
- if in.Password != "" {
- const prefix string = ",\"password\":"
- out.RawString(prefix)
- out.String(string(in.Password))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork90(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork90(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(in *jlexer.Lexer, out *AuthChallenge) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "source":
- (out.Source).UnmarshalEasyJSON(in)
- case "origin":
- out.Origin = string(in.String())
- case "scheme":
- out.Scheme = string(in.String())
- case "realm":
- out.Realm = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(out *jwriter.Writer, in AuthChallenge) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Source != "" {
- const prefix string = ",\"source\":"
- first = false
- out.RawString(prefix[1:])
- (in.Source).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"origin\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"scheme\":"
- out.RawString(prefix)
- out.String(string(in.Scheme))
- }
- {
- const prefix string = ",\"realm\":"
- out.RawString(prefix)
- out.String(string(in.Realm))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AuthChallenge) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork91(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AuthChallenge) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork91(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/network/events.go b/vendor/github.com/chromedp/cdproto/network/events.go
deleted file mode 100644
index ee6442c68a5..00000000000
--- a/vendor/github.com/chromedp/cdproto/network/events.go
+++ /dev/null
@@ -1,284 +0,0 @@
-package network
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EventDataReceived fired when data chunk was received over the network.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-dataReceived
-type EventDataReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- DataLength int64 `json:"dataLength"` // Data chunk length.
- EncodedDataLength int64 `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings).
-}
-
-// EventEventSourceMessageReceived fired when EventSource message is
-// received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-eventSourceMessageReceived
-type EventEventSourceMessageReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- EventName string `json:"eventName"` // Message type.
- EventID string `json:"eventId"` // Message identifier.
- Data string `json:"data"` // Message content.
-}
-
-// EventLoadingFailed fired when HTTP request has failed to load.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-loadingFailed
-type EventLoadingFailed struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Type ResourceType `json:"type"` // Resource type.
- ErrorText string `json:"errorText"` // User friendly error message.
- Canceled bool `json:"canceled,omitempty"` // True if loading was canceled.
- BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any.
- CorsErrorStatus *CorsErrorStatus `json:"corsErrorStatus,omitempty"` // The reason why loading was blocked by CORS, if any.
-}
-
-// EventLoadingFinished fired when HTTP request has finished loading.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-loadingFinished
-type EventLoadingFinished struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request.
- ShouldReportCorbBlocking bool `json:"shouldReportCorbBlocking,omitempty"` // Set when 1) response was blocked by Cross-Origin Read Blocking and also 2) this needs to be reported to the DevTools console.
-}
-
-// EventRequestServedFromCache fired if request ended up loading from cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-requestServedFromCache
-type EventRequestServedFromCache struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
-}
-
-// EventRequestWillBeSent fired when page is about to send HTTP request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-requestWillBeSent
-type EventRequestWillBeSent struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker.
- DocumentURL string `json:"documentURL"` // URL of the document this request is loaded for.
- Request *Request `json:"request"` // Request data.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- WallTime *cdp.TimeSinceEpoch `json:"wallTime"` // Timestamp.
- Initiator *Initiator `json:"initiator"` // Request initiator.
- RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data.
- Type ResourceType `json:"type,omitempty"` // Type of this resource.
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
- HasUserGesture bool `json:"hasUserGesture,omitempty"` // Whether the request is initiated by a user gesture. Defaults to false.
-}
-
-// EventResourceChangedPriority fired when resource loading priority is
-// changed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-resourceChangedPriority
-type EventResourceChangedPriority struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- NewPriority ResourcePriority `json:"newPriority"` // New priority
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
-}
-
-// EventSignedExchangeReceived fired when a signed exchange was received over
-// the network.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-signedExchangeReceived
-type EventSignedExchangeReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Info *SignedExchangeInfo `json:"info"` // Information about the signed exchange response.
-}
-
-// EventResponseReceived fired when HTTP response is available.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-responseReceived
-type EventResponseReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Type ResourceType `json:"type"` // Resource type.
- Response *Response `json:"response"` // Response data.
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
-}
-
-// EventWebSocketClosed fired when WebSocket is closed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketClosed
-type EventWebSocketClosed struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
-}
-
-// EventWebSocketCreated fired upon WebSocket creation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketCreated
-type EventWebSocketCreated struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- URL string `json:"url"` // WebSocket request URL.
- Initiator *Initiator `json:"initiator,omitempty"` // Request initiator.
-}
-
-// EventWebSocketFrameError fired when WebSocket message error occurs.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketFrameError
-type EventWebSocketFrameError struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- ErrorMessage string `json:"errorMessage"` // WebSocket error message.
-}
-
-// EventWebSocketFrameReceived fired when WebSocket message is received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketFrameReceived
-type EventWebSocketFrameReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Response *WebSocketFrame `json:"response"` // WebSocket response data.
-}
-
-// EventWebSocketFrameSent fired when WebSocket message is sent.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketFrameSent
-type EventWebSocketFrameSent struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Response *WebSocketFrame `json:"response"` // WebSocket response data.
-}
-
-// EventWebSocketHandshakeResponseReceived fired when WebSocket handshake
-// response becomes available.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketHandshakeResponseReceived
-type EventWebSocketHandshakeResponseReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Response *WebSocketResponse `json:"response"` // WebSocket response data.
-}
-
-// EventWebSocketWillSendHandshakeRequest fired when WebSocket is about to
-// initiate handshake.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webSocketWillSendHandshakeRequest
-type EventWebSocketWillSendHandshakeRequest struct {
- RequestID RequestID `json:"requestId"` // Request identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- WallTime *cdp.TimeSinceEpoch `json:"wallTime"` // UTC Timestamp.
- Request *WebSocketRequest `json:"request"` // WebSocket request data.
-}
-
-// EventWebTransportCreated fired upon WebTransport creation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webTransportCreated
-type EventWebTransportCreated struct {
- TransportID RequestID `json:"transportId"` // WebTransport identifier.
- URL string `json:"url"` // WebTransport request URL.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
- Initiator *Initiator `json:"initiator,omitempty"` // Request initiator.
-}
-
-// EventWebTransportConnectionEstablished fired when WebTransport handshake
-// is finished.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webTransportConnectionEstablished
-type EventWebTransportConnectionEstablished struct {
- TransportID RequestID `json:"transportId"` // WebTransport identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
-}
-
-// EventWebTransportClosed fired when WebTransport is disposed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-webTransportClosed
-type EventWebTransportClosed struct {
- TransportID RequestID `json:"transportId"` // WebTransport identifier.
- Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
-}
-
-// EventRequestWillBeSentExtraInfo fired when additional information about a
-// requestWillBeSent event is available from the network stack. Not every
-// requestWillBeSent event will have an additional requestWillBeSentExtraInfo
-// fired for it, and there is no guarantee whether requestWillBeSent or
-// requestWillBeSentExtraInfo will be fired first for the same request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-requestWillBeSentExtraInfo
-type EventRequestWillBeSentExtraInfo struct {
- RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to an existing requestWillBeSent event.
- AssociatedCookies []*BlockedCookieWithReason `json:"associatedCookies"` // A list of cookies potentially associated to the requested URL. This includes both cookies sent with the request and the ones not sent; the latter are distinguished by having blockedReason field set.
- Headers Headers `json:"headers"` // Raw request headers as they will be sent over the wire.
- ClientSecurityState *ClientSecurityState `json:"clientSecurityState,omitempty"` // The client security state set for the request.
-}
-
-// EventResponseReceivedExtraInfo fired when additional information about a
-// responseReceived event is available from the network stack. Not every
-// responseReceived event will have an additional responseReceivedExtraInfo for
-// it, and responseReceivedExtraInfo may be fired before or after
-// responseReceived.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-responseReceivedExtraInfo
-type EventResponseReceivedExtraInfo struct {
- RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another responseReceived event.
- BlockedCookies []*BlockedSetCookieWithReason `json:"blockedCookies"` // A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
- Headers Headers `json:"headers"` // Raw response headers as they were received over the wire.
- ResourceIPAddressSpace IPAddressSpace `json:"resourceIPAddressSpace"` // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.
- HeadersText string `json:"headersText,omitempty"` // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
-}
-
-// EventTrustTokenOperationDone fired exactly once for each Trust Token
-// operation. Depending on the type of the operation and whether the operation
-// succeeded or failed, the event is fired before the corresponding request was
-// sent or after the response was received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-trustTokenOperationDone
-type EventTrustTokenOperationDone struct {
- Status TrustTokenOperationDoneStatus `json:"status"` // Detailed success or error status of the operation. 'AlreadyExists' also signifies a successful operation, as the result of the operation already exists und thus, the operation was abort preemptively (e.g. a cache hit).
- Type TrustTokenOperationType `json:"type"`
- RequestID RequestID `json:"requestId"`
- TopLevelOrigin string `json:"topLevelOrigin,omitempty"` // Top level origin. The context in which the operation was attempted.
- IssuerOrigin string `json:"issuerOrigin,omitempty"` // Origin of the issuer in case of a "Issuance" or "Redemption" operation.
- IssuedTokenCount int64 `json:"issuedTokenCount,omitempty"` // The number of obtained Trust Tokens on a successful "Issuance" operation.
-}
-
-// EventSubresourceWebBundleMetadataReceived fired once when parsing the .wbn
-// file has succeeded. The event contains the information about the web bundle
-// contents.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-subresourceWebBundleMetadataReceived
-type EventSubresourceWebBundleMetadataReceived struct {
- RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another event.
- Urls []string `json:"urls"` // A list of URLs of resources in the subresource Web Bundle.
-}
-
-// EventSubresourceWebBundleMetadataError fired once when parsing the .wbn
-// file has failed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-subresourceWebBundleMetadataError
-type EventSubresourceWebBundleMetadataError struct {
- RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another event.
- ErrorMessage string `json:"errorMessage"` // Error message
-}
-
-// EventSubresourceWebBundleInnerResponseParsed fired when handling requests
-// for resources within a .wbn file. Note: this will only be fired for resources
-// that are requested by the webpage.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-subresourceWebBundleInnerResponseParsed
-type EventSubresourceWebBundleInnerResponseParsed struct {
- InnerRequestID RequestID `json:"innerRequestId"` // Request identifier of the subresource request
- InnerRequestURL string `json:"innerRequestURL"` // URL of the subresource resource.
- BundleRequestID RequestID `json:"bundleRequestId,omitempty"` // Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.
-}
-
-// EventSubresourceWebBundleInnerResponseError fired when request for
-// resources within a .wbn file failed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-subresourceWebBundleInnerResponseError
-type EventSubresourceWebBundleInnerResponseError struct {
- InnerRequestID RequestID `json:"innerRequestId"` // Request identifier of the subresource request
- InnerRequestURL string `json:"innerRequestURL"` // URL of the subresource resource.
- ErrorMessage string `json:"errorMessage"` // Error message
- BundleRequestID RequestID `json:"bundleRequestId,omitempty"` // Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.
-}
diff --git a/vendor/github.com/chromedp/cdproto/network/network.go b/vendor/github.com/chromedp/cdproto/network/network.go
deleted file mode 100644
index 0618e1530c3..00000000000
--- a/vendor/github.com/chromedp/cdproto/network/network.go
+++ /dev/null
@@ -1,980 +0,0 @@
-// Package network provides the Chrome DevTools Protocol
-// commands, types, and events for the Network domain.
-//
-// Network domain allows tracking network activities of the page. It exposes
-// information about http, file, data and other requests and responses, their
-// headers, bodies, timing, etc.
-//
-// Generated by the cdproto-gen command.
-package network
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/debugger"
- "github.com/chromedp/cdproto/io"
-)
-
-// SetAcceptedEncodingsParams sets a list of content encodings that will be
-// accepted. Empty list means no encoding is accepted.
-type SetAcceptedEncodingsParams struct {
- Encodings []ContentEncoding `json:"encodings"` // List of accepted content encodings.
-}
-
-// SetAcceptedEncodings sets a list of content encodings that will be
-// accepted. Empty list means no encoding is accepted.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setAcceptedEncodings
-//
-// parameters:
-// encodings - List of accepted content encodings.
-func SetAcceptedEncodings(encodings []ContentEncoding) *SetAcceptedEncodingsParams {
- return &SetAcceptedEncodingsParams{
- Encodings: encodings,
- }
-}
-
-// Do executes Network.setAcceptedEncodings against the provided context.
-func (p *SetAcceptedEncodingsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAcceptedEncodings, p, nil)
-}
-
-// ClearAcceptedEncodingsOverrideParams clears accepted encodings set by
-// setAcceptedEncodings.
-type ClearAcceptedEncodingsOverrideParams struct{}
-
-// ClearAcceptedEncodingsOverride clears accepted encodings set by
-// setAcceptedEncodings.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-clearAcceptedEncodingsOverride
-func ClearAcceptedEncodingsOverride() *ClearAcceptedEncodingsOverrideParams {
- return &ClearAcceptedEncodingsOverrideParams{}
-}
-
-// Do executes Network.clearAcceptedEncodingsOverride against the provided context.
-func (p *ClearAcceptedEncodingsOverrideParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearAcceptedEncodingsOverride, nil, nil)
-}
-
-// ClearBrowserCacheParams clears browser cache.
-type ClearBrowserCacheParams struct{}
-
-// ClearBrowserCache clears browser cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-clearBrowserCache
-func ClearBrowserCache() *ClearBrowserCacheParams {
- return &ClearBrowserCacheParams{}
-}
-
-// Do executes Network.clearBrowserCache against the provided context.
-func (p *ClearBrowserCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearBrowserCache, nil, nil)
-}
-
-// ClearBrowserCookiesParams clears browser cookies.
-type ClearBrowserCookiesParams struct{}
-
-// ClearBrowserCookies clears browser cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-clearBrowserCookies
-func ClearBrowserCookies() *ClearBrowserCookiesParams {
- return &ClearBrowserCookiesParams{}
-}
-
-// Do executes Network.clearBrowserCookies against the provided context.
-func (p *ClearBrowserCookiesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearBrowserCookies, nil, nil)
-}
-
-// DeleteCookiesParams deletes browser cookies with matching name and url or
-// domain/path pair.
-type DeleteCookiesParams struct {
- Name string `json:"name"` // Name of the cookies to remove.
- URL string `json:"url,omitempty"` // If specified, deletes all the cookies with the given name where domain and path match provided URL.
- Domain string `json:"domain,omitempty"` // If specified, deletes only cookies with the exact domain.
- Path string `json:"path,omitempty"` // If specified, deletes only cookies with the exact path.
-}
-
-// DeleteCookies deletes browser cookies with matching name and url or
-// domain/path pair.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-deleteCookies
-//
-// parameters:
-// name - Name of the cookies to remove.
-func DeleteCookies(name string) *DeleteCookiesParams {
- return &DeleteCookiesParams{
- Name: name,
- }
-}
-
-// WithURL if specified, deletes all the cookies with the given name where
-// domain and path match provided URL.
-func (p DeleteCookiesParams) WithURL(url string) *DeleteCookiesParams {
- p.URL = url
- return &p
-}
-
-// WithDomain if specified, deletes only cookies with the exact domain.
-func (p DeleteCookiesParams) WithDomain(domain string) *DeleteCookiesParams {
- p.Domain = domain
- return &p
-}
-
-// WithPath if specified, deletes only cookies with the exact path.
-func (p DeleteCookiesParams) WithPath(path string) *DeleteCookiesParams {
- p.Path = path
- return &p
-}
-
-// Do executes Network.deleteCookies against the provided context.
-func (p *DeleteCookiesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeleteCookies, p, nil)
-}
-
-// DisableParams disables network tracking, prevents network events from
-// being sent to the client.
-type DisableParams struct{}
-
-// Disable disables network tracking, prevents network events from being sent
-// to the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Network.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EmulateNetworkConditionsParams activates emulation of network conditions.
-type EmulateNetworkConditionsParams struct {
- Offline bool `json:"offline"` // True to emulate internet disconnection.
- Latency float64 `json:"latency"` // Minimum latency from request sent to response headers received (ms).
- DownloadThroughput float64 `json:"downloadThroughput"` // Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
- UploadThroughput float64 `json:"uploadThroughput"` // Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
- ConnectionType ConnectionType `json:"connectionType,omitempty"` // Connection type if known.
-}
-
-// EmulateNetworkConditions activates emulation of network conditions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-emulateNetworkConditions
-//
-// parameters:
-// offline - True to emulate internet disconnection.
-// latency - Minimum latency from request sent to response headers received (ms).
-// downloadThroughput - Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
-// uploadThroughput - Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
-func EmulateNetworkConditions(offline bool, latency float64, downloadThroughput float64, uploadThroughput float64) *EmulateNetworkConditionsParams {
- return &EmulateNetworkConditionsParams{
- Offline: offline,
- Latency: latency,
- DownloadThroughput: downloadThroughput,
- UploadThroughput: uploadThroughput,
- }
-}
-
-// WithConnectionType connection type if known.
-func (p EmulateNetworkConditionsParams) WithConnectionType(connectionType ConnectionType) *EmulateNetworkConditionsParams {
- p.ConnectionType = connectionType
- return &p
-}
-
-// Do executes Network.emulateNetworkConditions against the provided context.
-func (p *EmulateNetworkConditionsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEmulateNetworkConditions, p, nil)
-}
-
-// EnableParams enables network tracking, network events will now be
-// delivered to the client.
-type EnableParams struct {
- MaxTotalBufferSize int64 `json:"maxTotalBufferSize,omitempty"` // Buffer size in bytes to use when preserving network payloads (XHRs, etc).
- MaxResourceBufferSize int64 `json:"maxResourceBufferSize,omitempty"` // Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
- MaxPostDataSize int64 `json:"maxPostDataSize,omitempty"` // Longest post body size (in bytes) that would be included in requestWillBeSent notification
-}
-
-// Enable enables network tracking, network events will now be delivered to
-// the client.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-enable
-//
-// parameters:
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// WithMaxTotalBufferSize buffer size in bytes to use when preserving network
-// payloads (XHRs, etc).
-func (p EnableParams) WithMaxTotalBufferSize(maxTotalBufferSize int64) *EnableParams {
- p.MaxTotalBufferSize = maxTotalBufferSize
- return &p
-}
-
-// WithMaxResourceBufferSize per-resource buffer size in bytes to use when
-// preserving network payloads (XHRs, etc).
-func (p EnableParams) WithMaxResourceBufferSize(maxResourceBufferSize int64) *EnableParams {
- p.MaxResourceBufferSize = maxResourceBufferSize
- return &p
-}
-
-// WithMaxPostDataSize longest post body size (in bytes) that would be
-// included in requestWillBeSent notification.
-func (p EnableParams) WithMaxPostDataSize(maxPostDataSize int64) *EnableParams {
- p.MaxPostDataSize = maxPostDataSize
- return &p
-}
-
-// Do executes Network.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, p, nil)
-}
-
-// GetAllCookiesParams returns all browser cookies. Depending on the backend
-// support, will return detailed cookie information in the cookies field.
-type GetAllCookiesParams struct{}
-
-// GetAllCookies returns all browser cookies. Depending on the backend
-// support, will return detailed cookie information in the cookies field.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getAllCookies
-func GetAllCookies() *GetAllCookiesParams {
- return &GetAllCookiesParams{}
-}
-
-// GetAllCookiesReturns return values.
-type GetAllCookiesReturns struct {
- Cookies []*Cookie `json:"cookies,omitempty"` // Array of cookie objects.
-}
-
-// Do executes Network.getAllCookies against the provided context.
-//
-// returns:
-// cookies - Array of cookie objects.
-func (p *GetAllCookiesParams) Do(ctx context.Context) (cookies []*Cookie, err error) {
- // execute
- var res GetAllCookiesReturns
- err = cdp.Execute(ctx, CommandGetAllCookies, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Cookies, nil
-}
-
-// GetCertificateParams returns the DER-encoded certificate.
-type GetCertificateParams struct {
- Origin string `json:"origin"` // Origin to get certificate for.
-}
-
-// GetCertificate returns the DER-encoded certificate.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getCertificate
-//
-// parameters:
-// origin - Origin to get certificate for.
-func GetCertificate(origin string) *GetCertificateParams {
- return &GetCertificateParams{
- Origin: origin,
- }
-}
-
-// GetCertificateReturns return values.
-type GetCertificateReturns struct {
- TableNames []string `json:"tableNames,omitempty"`
-}
-
-// Do executes Network.getCertificate against the provided context.
-//
-// returns:
-// tableNames
-func (p *GetCertificateParams) Do(ctx context.Context) (tableNames []string, err error) {
- // execute
- var res GetCertificateReturns
- err = cdp.Execute(ctx, CommandGetCertificate, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.TableNames, nil
-}
-
-// GetCookiesParams returns all browser cookies for the current URL.
-// Depending on the backend support, will return detailed cookie information in
-// the cookies field.
-type GetCookiesParams struct {
- Urls []string `json:"urls,omitempty"` // The list of URLs for which applicable cookies will be fetched. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.
-}
-
-// GetCookies returns all browser cookies for the current URL. Depending on
-// the backend support, will return detailed cookie information in the cookies
-// field.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getCookies
-//
-// parameters:
-func GetCookies() *GetCookiesParams {
- return &GetCookiesParams{}
-}
-
-// WithUrls the list of URLs for which applicable cookies will be fetched. If
-// not specified, it's assumed to be set to the list containing the URLs of the
-// page and all of its subframes.
-func (p GetCookiesParams) WithUrls(urls []string) *GetCookiesParams {
- p.Urls = urls
- return &p
-}
-
-// GetCookiesReturns return values.
-type GetCookiesReturns struct {
- Cookies []*Cookie `json:"cookies,omitempty"` // Array of cookie objects.
-}
-
-// Do executes Network.getCookies against the provided context.
-//
-// returns:
-// cookies - Array of cookie objects.
-func (p *GetCookiesParams) Do(ctx context.Context) (cookies []*Cookie, err error) {
- // execute
- var res GetCookiesReturns
- err = cdp.Execute(ctx, CommandGetCookies, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Cookies, nil
-}
-
-// GetResponseBodyParams returns content served for the given request.
-type GetResponseBodyParams struct {
- RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
-}
-
-// GetResponseBody returns content served for the given request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBody
-//
-// parameters:
-// requestID - Identifier of the network request to get content for.
-func GetResponseBody(requestID RequestID) *GetResponseBodyParams {
- return &GetResponseBodyParams{
- RequestID: requestID,
- }
-}
-
-// GetResponseBodyReturns return values.
-type GetResponseBodyReturns struct {
- Body string `json:"body,omitempty"` // Response body.
- Base64encoded bool `json:"base64Encoded,omitempty"` // True, if content was sent as base64.
-}
-
-// Do executes Network.getResponseBody against the provided context.
-//
-// returns:
-// body - Response body.
-func (p *GetResponseBodyParams) Do(ctx context.Context) (body []byte, err error) {
- // execute
- var res GetResponseBodyReturns
- err = cdp.Execute(ctx, CommandGetResponseBody, p, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- if res.Base64encoded {
- dec, err = base64.StdEncoding.DecodeString(res.Body)
- if err != nil {
- return nil, err
- }
- } else {
- dec = []byte(res.Body)
- }
- return dec, nil
-}
-
-// GetRequestPostDataParams returns post data sent with the request. Returns
-// an error when no data was sent with the request.
-type GetRequestPostDataParams struct {
- RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
-}
-
-// GetRequestPostData returns post data sent with the request. Returns an
-// error when no data was sent with the request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getRequestPostData
-//
-// parameters:
-// requestID - Identifier of the network request to get content for.
-func GetRequestPostData(requestID RequestID) *GetRequestPostDataParams {
- return &GetRequestPostDataParams{
- RequestID: requestID,
- }
-}
-
-// GetRequestPostDataReturns return values.
-type GetRequestPostDataReturns struct {
- PostData string `json:"postData,omitempty"` // Request body string, omitting files from multipart requests
-}
-
-// Do executes Network.getRequestPostData against the provided context.
-//
-// returns:
-// postData - Request body string, omitting files from multipart requests
-func (p *GetRequestPostDataParams) Do(ctx context.Context) (postData string, err error) {
- // execute
- var res GetRequestPostDataReturns
- err = cdp.Execute(ctx, CommandGetRequestPostData, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.PostData, nil
-}
-
-// GetResponseBodyForInterceptionParams returns content served for the given
-// currently intercepted request.
-type GetResponseBodyForInterceptionParams struct {
- InterceptionID InterceptionID `json:"interceptionId"` // Identifier for the intercepted request to get body for.
-}
-
-// GetResponseBodyForInterception returns content served for the given
-// currently intercepted request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBodyForInterception
-//
-// parameters:
-// interceptionID - Identifier for the intercepted request to get body for.
-func GetResponseBodyForInterception(interceptionID InterceptionID) *GetResponseBodyForInterceptionParams {
- return &GetResponseBodyForInterceptionParams{
- InterceptionID: interceptionID,
- }
-}
-
-// GetResponseBodyForInterceptionReturns return values.
-type GetResponseBodyForInterceptionReturns struct {
- Body string `json:"body,omitempty"` // Response body.
- Base64encoded bool `json:"base64Encoded,omitempty"` // True, if content was sent as base64.
-}
-
-// Do executes Network.getResponseBodyForInterception against the provided context.
-//
-// returns:
-// body - Response body.
-func (p *GetResponseBodyForInterceptionParams) Do(ctx context.Context) (body []byte, err error) {
- // execute
- var res GetResponseBodyForInterceptionReturns
- err = cdp.Execute(ctx, CommandGetResponseBodyForInterception, p, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- if res.Base64encoded {
- dec, err = base64.StdEncoding.DecodeString(res.Body)
- if err != nil {
- return nil, err
- }
- } else {
- dec = []byte(res.Body)
- }
- return dec, nil
-}
-
-// TakeResponseBodyForInterceptionAsStreamParams returns a handle to the
-// stream representing the response body. Note that after this command, the
-// intercepted request can't be continued as is -- you either need to cancel it
-// or to provide the response body. The stream only supports sequential read,
-// IO.read will fail if the position is specified.
-type TakeResponseBodyForInterceptionAsStreamParams struct {
- InterceptionID InterceptionID `json:"interceptionId"`
-}
-
-// TakeResponseBodyForInterceptionAsStream returns a handle to the stream
-// representing the response body. Note that after this command, the intercepted
-// request can't be continued as is -- you either need to cancel it or to
-// provide the response body. The stream only supports sequential read, IO.read
-// will fail if the position is specified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-takeResponseBodyForInterceptionAsStream
-//
-// parameters:
-// interceptionID
-func TakeResponseBodyForInterceptionAsStream(interceptionID InterceptionID) *TakeResponseBodyForInterceptionAsStreamParams {
- return &TakeResponseBodyForInterceptionAsStreamParams{
- InterceptionID: interceptionID,
- }
-}
-
-// TakeResponseBodyForInterceptionAsStreamReturns return values.
-type TakeResponseBodyForInterceptionAsStreamReturns struct {
- Stream io.StreamHandle `json:"stream,omitempty"`
-}
-
-// Do executes Network.takeResponseBodyForInterceptionAsStream against the provided context.
-//
-// returns:
-// stream
-func (p *TakeResponseBodyForInterceptionAsStreamParams) Do(ctx context.Context) (stream io.StreamHandle, err error) {
- // execute
- var res TakeResponseBodyForInterceptionAsStreamReturns
- err = cdp.Execute(ctx, CommandTakeResponseBodyForInterceptionAsStream, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Stream, nil
-}
-
-// ReplayXHRParams this method sends a new XMLHttpRequest which is identical
-// to the original one. The following parameters should be identical: method,
-// url, async, request body, extra headers, withCredentials attribute, user,
-// password.
-type ReplayXHRParams struct {
- RequestID RequestID `json:"requestId"` // Identifier of XHR to replay.
-}
-
-// ReplayXHR this method sends a new XMLHttpRequest which is identical to the
-// original one. The following parameters should be identical: method, url,
-// async, request body, extra headers, withCredentials attribute, user,
-// password.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-replayXHR
-//
-// parameters:
-// requestID - Identifier of XHR to replay.
-func ReplayXHR(requestID RequestID) *ReplayXHRParams {
- return &ReplayXHRParams{
- RequestID: requestID,
- }
-}
-
-// Do executes Network.replayXHR against the provided context.
-func (p *ReplayXHRParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReplayXHR, p, nil)
-}
-
-// SearchInResponseBodyParams searches for given string in response content.
-type SearchInResponseBodyParams struct {
- RequestID RequestID `json:"requestId"` // Identifier of the network response to search.
- Query string `json:"query"` // String to search for.
- CaseSensitive bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive.
- IsRegex bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex.
-}
-
-// SearchInResponseBody searches for given string in response content.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-searchInResponseBody
-//
-// parameters:
-// requestID - Identifier of the network response to search.
-// query - String to search for.
-func SearchInResponseBody(requestID RequestID, query string) *SearchInResponseBodyParams {
- return &SearchInResponseBodyParams{
- RequestID: requestID,
- Query: query,
- }
-}
-
-// WithCaseSensitive if true, search is case sensitive.
-func (p SearchInResponseBodyParams) WithCaseSensitive(caseSensitive bool) *SearchInResponseBodyParams {
- p.CaseSensitive = caseSensitive
- return &p
-}
-
-// WithIsRegex if true, treats string parameter as regex.
-func (p SearchInResponseBodyParams) WithIsRegex(isRegex bool) *SearchInResponseBodyParams {
- p.IsRegex = isRegex
- return &p
-}
-
-// SearchInResponseBodyReturns return values.
-type SearchInResponseBodyReturns struct {
- Result []*debugger.SearchMatch `json:"result,omitempty"` // List of search matches.
-}
-
-// Do executes Network.searchInResponseBody against the provided context.
-//
-// returns:
-// result - List of search matches.
-func (p *SearchInResponseBodyParams) Do(ctx context.Context) (result []*debugger.SearchMatch, err error) {
- // execute
- var res SearchInResponseBodyReturns
- err = cdp.Execute(ctx, CommandSearchInResponseBody, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// SetBlockedURLSParams blocks URLs from loading.
-type SetBlockedURLSParams struct {
- Urls []string `json:"urls"` // URL patterns to block. Wildcards ('*') are allowed.
-}
-
-// SetBlockedURLS blocks URLs from loading.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBlockedURLs
-//
-// parameters:
-// urls - URL patterns to block. Wildcards ('*') are allowed.
-func SetBlockedURLS(urls []string) *SetBlockedURLSParams {
- return &SetBlockedURLSParams{
- Urls: urls,
- }
-}
-
-// Do executes Network.setBlockedURLs against the provided context.
-func (p *SetBlockedURLSParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBlockedURLS, p, nil)
-}
-
-// SetBypassServiceWorkerParams toggles ignoring of service worker for each
-// request.
-type SetBypassServiceWorkerParams struct {
- Bypass bool `json:"bypass"` // Bypass service worker and load from network.
-}
-
-// SetBypassServiceWorker toggles ignoring of service worker for each
-// request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBypassServiceWorker
-//
-// parameters:
-// bypass - Bypass service worker and load from network.
-func SetBypassServiceWorker(bypass bool) *SetBypassServiceWorkerParams {
- return &SetBypassServiceWorkerParams{
- Bypass: bypass,
- }
-}
-
-// Do executes Network.setBypassServiceWorker against the provided context.
-func (p *SetBypassServiceWorkerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBypassServiceWorker, p, nil)
-}
-
-// SetCacheDisabledParams toggles ignoring cache for each request. If true,
-// cache will not be used.
-type SetCacheDisabledParams struct {
- CacheDisabled bool `json:"cacheDisabled"` // Cache disabled state.
-}
-
-// SetCacheDisabled toggles ignoring cache for each request. If true, cache
-// will not be used.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCacheDisabled
-//
-// parameters:
-// cacheDisabled - Cache disabled state.
-func SetCacheDisabled(cacheDisabled bool) *SetCacheDisabledParams {
- return &SetCacheDisabledParams{
- CacheDisabled: cacheDisabled,
- }
-}
-
-// Do executes Network.setCacheDisabled against the provided context.
-func (p *SetCacheDisabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCacheDisabled, p, nil)
-}
-
-// SetCookieParams sets a cookie with the given cookie data; may overwrite
-// equivalent cookies if they exist.
-type SetCookieParams struct {
- Name string `json:"name"` // Cookie name.
- Value string `json:"value"` // Cookie value.
- URL string `json:"url,omitempty"` // The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
- Domain string `json:"domain,omitempty"` // Cookie domain.
- Path string `json:"path,omitempty"` // Cookie path.
- Secure bool `json:"secure,omitempty"` // True if cookie is secure.
- HTTPOnly bool `json:"httpOnly,omitempty"` // True if cookie is http-only.
- SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
- Expires *cdp.TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set
- Priority CookiePriority `json:"priority,omitempty"` // Cookie Priority type.
- SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty.
- SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type.
- SourcePort int64 `json:"sourcePort,omitempty"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
-}
-
-// SetCookie sets a cookie with the given cookie data; may overwrite
-// equivalent cookies if they exist.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookie
-//
-// parameters:
-// name - Cookie name.
-// value - Cookie value.
-func SetCookie(name string, value string) *SetCookieParams {
- return &SetCookieParams{
- Name: name,
- Value: value,
- }
-}
-
-// WithURL the request-URI to associate with the setting of the cookie. This
-// value can affect the default domain, path, source port, and source scheme
-// values of the created cookie.
-func (p SetCookieParams) WithURL(url string) *SetCookieParams {
- p.URL = url
- return &p
-}
-
-// WithDomain cookie domain.
-func (p SetCookieParams) WithDomain(domain string) *SetCookieParams {
- p.Domain = domain
- return &p
-}
-
-// WithPath cookie path.
-func (p SetCookieParams) WithPath(path string) *SetCookieParams {
- p.Path = path
- return &p
-}
-
-// WithSecure true if cookie is secure.
-func (p SetCookieParams) WithSecure(secure bool) *SetCookieParams {
- p.Secure = secure
- return &p
-}
-
-// WithHTTPOnly true if cookie is http-only.
-func (p SetCookieParams) WithHTTPOnly(httpOnly bool) *SetCookieParams {
- p.HTTPOnly = httpOnly
- return &p
-}
-
-// WithSameSite cookie SameSite type.
-func (p SetCookieParams) WithSameSite(sameSite CookieSameSite) *SetCookieParams {
- p.SameSite = sameSite
- return &p
-}
-
-// WithExpires cookie expiration date, session cookie if not set.
-func (p SetCookieParams) WithExpires(expires *cdp.TimeSinceEpoch) *SetCookieParams {
- p.Expires = expires
- return &p
-}
-
-// WithPriority cookie Priority type.
-func (p SetCookieParams) WithPriority(priority CookiePriority) *SetCookieParams {
- p.Priority = priority
- return &p
-}
-
-// WithSameParty true if cookie is SameParty.
-func (p SetCookieParams) WithSameParty(sameParty bool) *SetCookieParams {
- p.SameParty = sameParty
- return &p
-}
-
-// WithSourceScheme cookie source scheme type.
-func (p SetCookieParams) WithSourceScheme(sourceScheme CookieSourceScheme) *SetCookieParams {
- p.SourceScheme = sourceScheme
- return &p
-}
-
-// WithSourcePort cookie source port. Valid values are {-1, [1, 65535]}, -1
-// indicates an unspecified port. An unspecified port value allows protocol
-// clients to emulate legacy cookie scope for the port. This is a temporary
-// ability and it will be removed in the future.
-func (p SetCookieParams) WithSourcePort(sourcePort int64) *SetCookieParams {
- p.SourcePort = sourcePort
- return &p
-}
-
-// Do executes Network.setCookie against the provided context.
-func (p *SetCookieParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCookie, p, nil)
-}
-
-// SetCookiesParams sets given cookies.
-type SetCookiesParams struct {
- Cookies []*CookieParam `json:"cookies"` // Cookies to be set.
-}
-
-// SetCookies sets given cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookies
-//
-// parameters:
-// cookies - Cookies to be set.
-func SetCookies(cookies []*CookieParam) *SetCookiesParams {
- return &SetCookiesParams{
- Cookies: cookies,
- }
-}
-
-// Do executes Network.setCookies against the provided context.
-func (p *SetCookiesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCookies, p, nil)
-}
-
-// SetExtraHTTPHeadersParams specifies whether to always send extra HTTP
-// headers with the requests from this page.
-type SetExtraHTTPHeadersParams struct {
- Headers Headers `json:"headers"` // Map with extra HTTP headers.
-}
-
-// SetExtraHTTPHeaders specifies whether to always send extra HTTP headers
-// with the requests from this page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setExtraHTTPHeaders
-//
-// parameters:
-// headers - Map with extra HTTP headers.
-func SetExtraHTTPHeaders(headers Headers) *SetExtraHTTPHeadersParams {
- return &SetExtraHTTPHeadersParams{
- Headers: headers,
- }
-}
-
-// Do executes Network.setExtraHTTPHeaders against the provided context.
-func (p *SetExtraHTTPHeadersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetExtraHTTPHeaders, p, nil)
-}
-
-// SetAttachDebugStackParams specifies whether to attach a page script stack
-// id in requests.
-type SetAttachDebugStackParams struct {
- Enabled bool `json:"enabled"` // Whether to attach a page script stack for debugging purpose.
-}
-
-// SetAttachDebugStack specifies whether to attach a page script stack id in
-// requests.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setAttachDebugStack
-//
-// parameters:
-// enabled - Whether to attach a page script stack for debugging purpose.
-func SetAttachDebugStack(enabled bool) *SetAttachDebugStackParams {
- return &SetAttachDebugStackParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Network.setAttachDebugStack against the provided context.
-func (p *SetAttachDebugStackParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAttachDebugStack, p, nil)
-}
-
-// GetSecurityIsolationStatusParams returns information about the COEP/COOP
-// isolation status.
-type GetSecurityIsolationStatusParams struct {
- FrameID cdp.FrameID `json:"frameId,omitempty"` // If no frameId is provided, the status of the target is provided.
-}
-
-// GetSecurityIsolationStatus returns information about the COEP/COOP
-// isolation status.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getSecurityIsolationStatus
-//
-// parameters:
-func GetSecurityIsolationStatus() *GetSecurityIsolationStatusParams {
- return &GetSecurityIsolationStatusParams{}
-}
-
-// WithFrameID if no frameId is provided, the status of the target is
-// provided.
-func (p GetSecurityIsolationStatusParams) WithFrameID(frameID cdp.FrameID) *GetSecurityIsolationStatusParams {
- p.FrameID = frameID
- return &p
-}
-
-// GetSecurityIsolationStatusReturns return values.
-type GetSecurityIsolationStatusReturns struct {
- Status *SecurityIsolationStatus `json:"status,omitempty"`
-}
-
-// Do executes Network.getSecurityIsolationStatus against the provided context.
-//
-// returns:
-// status
-func (p *GetSecurityIsolationStatusParams) Do(ctx context.Context) (status *SecurityIsolationStatus, err error) {
- // execute
- var res GetSecurityIsolationStatusReturns
- err = cdp.Execute(ctx, CommandGetSecurityIsolationStatus, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Status, nil
-}
-
-// LoadNetworkResourceParams fetches the resource and returns the content.
-type LoadNetworkResourceParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Frame id to get the resource for.
- URL string `json:"url"` // URL of the resource to get content for.
- Options *LoadNetworkResourceOptions `json:"options"` // Options for the request.
-}
-
-// LoadNetworkResource fetches the resource and returns the content.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-loadNetworkResource
-//
-// parameters:
-// frameID - Frame id to get the resource for.
-// url - URL of the resource to get content for.
-// options - Options for the request.
-func LoadNetworkResource(frameID cdp.FrameID, url string, options *LoadNetworkResourceOptions) *LoadNetworkResourceParams {
- return &LoadNetworkResourceParams{
- FrameID: frameID,
- URL: url,
- Options: options,
- }
-}
-
-// LoadNetworkResourceReturns return values.
-type LoadNetworkResourceReturns struct {
- Resource *LoadNetworkResourcePageResult `json:"resource,omitempty"`
-}
-
-// Do executes Network.loadNetworkResource against the provided context.
-//
-// returns:
-// resource
-func (p *LoadNetworkResourceParams) Do(ctx context.Context) (resource *LoadNetworkResourcePageResult, err error) {
- // execute
- var res LoadNetworkResourceReturns
- err = cdp.Execute(ctx, CommandLoadNetworkResource, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Resource, nil
-}
-
-// Command names.
-const (
- CommandSetAcceptedEncodings = "Network.setAcceptedEncodings"
- CommandClearAcceptedEncodingsOverride = "Network.clearAcceptedEncodingsOverride"
- CommandClearBrowserCache = "Network.clearBrowserCache"
- CommandClearBrowserCookies = "Network.clearBrowserCookies"
- CommandDeleteCookies = "Network.deleteCookies"
- CommandDisable = "Network.disable"
- CommandEmulateNetworkConditions = "Network.emulateNetworkConditions"
- CommandEnable = "Network.enable"
- CommandGetAllCookies = "Network.getAllCookies"
- CommandGetCertificate = "Network.getCertificate"
- CommandGetCookies = "Network.getCookies"
- CommandGetResponseBody = "Network.getResponseBody"
- CommandGetRequestPostData = "Network.getRequestPostData"
- CommandGetResponseBodyForInterception = "Network.getResponseBodyForInterception"
- CommandTakeResponseBodyForInterceptionAsStream = "Network.takeResponseBodyForInterceptionAsStream"
- CommandReplayXHR = "Network.replayXHR"
- CommandSearchInResponseBody = "Network.searchInResponseBody"
- CommandSetBlockedURLS = "Network.setBlockedURLs"
- CommandSetBypassServiceWorker = "Network.setBypassServiceWorker"
- CommandSetCacheDisabled = "Network.setCacheDisabled"
- CommandSetCookie = "Network.setCookie"
- CommandSetCookies = "Network.setCookies"
- CommandSetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"
- CommandSetAttachDebugStack = "Network.setAttachDebugStack"
- CommandGetSecurityIsolationStatus = "Network.getSecurityIsolationStatus"
- CommandLoadNetworkResource = "Network.loadNetworkResource"
-)
diff --git a/vendor/github.com/chromedp/cdproto/network/types.go b/vendor/github.com/chromedp/cdproto/network/types.go
deleted file mode 100644
index c541c626415..00000000000
--- a/vendor/github.com/chromedp/cdproto/network/types.go
+++ /dev/null
@@ -1,2023 +0,0 @@
-package network
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/io"
- "github.com/chromedp/cdproto/runtime"
- "github.com/chromedp/cdproto/security"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// ResourceType resource type as it was perceived by the rendering engine.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ResourceType
-type ResourceType string
-
-// String returns the ResourceType as string value.
-func (t ResourceType) String() string {
- return string(t)
-}
-
-// ResourceType values.
-const (
- ResourceTypeDocument ResourceType = "Document"
- ResourceTypeStylesheet ResourceType = "Stylesheet"
- ResourceTypeImage ResourceType = "Image"
- ResourceTypeMedia ResourceType = "Media"
- ResourceTypeFont ResourceType = "Font"
- ResourceTypeScript ResourceType = "Script"
- ResourceTypeTextTrack ResourceType = "TextTrack"
- ResourceTypeXHR ResourceType = "XHR"
- ResourceTypeFetch ResourceType = "Fetch"
- ResourceTypeEventSource ResourceType = "EventSource"
- ResourceTypeWebSocket ResourceType = "WebSocket"
- ResourceTypeManifest ResourceType = "Manifest"
- ResourceTypeSignedExchange ResourceType = "SignedExchange"
- ResourceTypePing ResourceType = "Ping"
- ResourceTypeCSPViolationReport ResourceType = "CSPViolationReport"
- ResourceTypePreflight ResourceType = "Preflight"
- ResourceTypeOther ResourceType = "Other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ResourceType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ResourceType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ResourceType(in.String()) {
- case ResourceTypeDocument:
- *t = ResourceTypeDocument
- case ResourceTypeStylesheet:
- *t = ResourceTypeStylesheet
- case ResourceTypeImage:
- *t = ResourceTypeImage
- case ResourceTypeMedia:
- *t = ResourceTypeMedia
- case ResourceTypeFont:
- *t = ResourceTypeFont
- case ResourceTypeScript:
- *t = ResourceTypeScript
- case ResourceTypeTextTrack:
- *t = ResourceTypeTextTrack
- case ResourceTypeXHR:
- *t = ResourceTypeXHR
- case ResourceTypeFetch:
- *t = ResourceTypeFetch
- case ResourceTypeEventSource:
- *t = ResourceTypeEventSource
- case ResourceTypeWebSocket:
- *t = ResourceTypeWebSocket
- case ResourceTypeManifest:
- *t = ResourceTypeManifest
- case ResourceTypeSignedExchange:
- *t = ResourceTypeSignedExchange
- case ResourceTypePing:
- *t = ResourceTypePing
- case ResourceTypeCSPViolationReport:
- *t = ResourceTypeCSPViolationReport
- case ResourceTypePreflight:
- *t = ResourceTypePreflight
- case ResourceTypeOther:
- *t = ResourceTypeOther
-
- default:
- in.AddError(errors.New("unknown ResourceType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ResourceType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// RequestID unique request identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-RequestId
-type RequestID string
-
-// String returns the RequestID as string value.
-func (t RequestID) String() string {
- return string(t)
-}
-
-// InterceptionID unique intercepted request identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-InterceptionId
-type InterceptionID string
-
-// String returns the InterceptionID as string value.
-func (t InterceptionID) String() string {
- return string(t)
-}
-
-// ErrorReason network level fetch failure reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ErrorReason
-type ErrorReason string
-
-// String returns the ErrorReason as string value.
-func (t ErrorReason) String() string {
- return string(t)
-}
-
-// ErrorReason values.
-const (
- ErrorReasonFailed ErrorReason = "Failed"
- ErrorReasonAborted ErrorReason = "Aborted"
- ErrorReasonTimedOut ErrorReason = "TimedOut"
- ErrorReasonAccessDenied ErrorReason = "AccessDenied"
- ErrorReasonConnectionClosed ErrorReason = "ConnectionClosed"
- ErrorReasonConnectionReset ErrorReason = "ConnectionReset"
- ErrorReasonConnectionRefused ErrorReason = "ConnectionRefused"
- ErrorReasonConnectionAborted ErrorReason = "ConnectionAborted"
- ErrorReasonConnectionFailed ErrorReason = "ConnectionFailed"
- ErrorReasonNameNotResolved ErrorReason = "NameNotResolved"
- ErrorReasonInternetDisconnected ErrorReason = "InternetDisconnected"
- ErrorReasonAddressUnreachable ErrorReason = "AddressUnreachable"
- ErrorReasonBlockedByClient ErrorReason = "BlockedByClient"
- ErrorReasonBlockedByResponse ErrorReason = "BlockedByResponse"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ErrorReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ErrorReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ErrorReason(in.String()) {
- case ErrorReasonFailed:
- *t = ErrorReasonFailed
- case ErrorReasonAborted:
- *t = ErrorReasonAborted
- case ErrorReasonTimedOut:
- *t = ErrorReasonTimedOut
- case ErrorReasonAccessDenied:
- *t = ErrorReasonAccessDenied
- case ErrorReasonConnectionClosed:
- *t = ErrorReasonConnectionClosed
- case ErrorReasonConnectionReset:
- *t = ErrorReasonConnectionReset
- case ErrorReasonConnectionRefused:
- *t = ErrorReasonConnectionRefused
- case ErrorReasonConnectionAborted:
- *t = ErrorReasonConnectionAborted
- case ErrorReasonConnectionFailed:
- *t = ErrorReasonConnectionFailed
- case ErrorReasonNameNotResolved:
- *t = ErrorReasonNameNotResolved
- case ErrorReasonInternetDisconnected:
- *t = ErrorReasonInternetDisconnected
- case ErrorReasonAddressUnreachable:
- *t = ErrorReasonAddressUnreachable
- case ErrorReasonBlockedByClient:
- *t = ErrorReasonBlockedByClient
- case ErrorReasonBlockedByResponse:
- *t = ErrorReasonBlockedByResponse
-
- default:
- in.AddError(errors.New("unknown ErrorReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ErrorReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Headers request / response headers as keys / values of JSON object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Headers
-type Headers map[string]interface{}
-
-// ConnectionType the underlying connection technology that the browser is
-// supposedly using.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ConnectionType
-type ConnectionType string
-
-// String returns the ConnectionType as string value.
-func (t ConnectionType) String() string {
- return string(t)
-}
-
-// ConnectionType values.
-const (
- ConnectionTypeNone ConnectionType = "none"
- ConnectionTypeCellular2g ConnectionType = "cellular2g"
- ConnectionTypeCellular3g ConnectionType = "cellular3g"
- ConnectionTypeCellular4g ConnectionType = "cellular4g"
- ConnectionTypeBluetooth ConnectionType = "bluetooth"
- ConnectionTypeEthernet ConnectionType = "ethernet"
- ConnectionTypeWifi ConnectionType = "wifi"
- ConnectionTypeWimax ConnectionType = "wimax"
- ConnectionTypeOther ConnectionType = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ConnectionType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ConnectionType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ConnectionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ConnectionType(in.String()) {
- case ConnectionTypeNone:
- *t = ConnectionTypeNone
- case ConnectionTypeCellular2g:
- *t = ConnectionTypeCellular2g
- case ConnectionTypeCellular3g:
- *t = ConnectionTypeCellular3g
- case ConnectionTypeCellular4g:
- *t = ConnectionTypeCellular4g
- case ConnectionTypeBluetooth:
- *t = ConnectionTypeBluetooth
- case ConnectionTypeEthernet:
- *t = ConnectionTypeEthernet
- case ConnectionTypeWifi:
- *t = ConnectionTypeWifi
- case ConnectionTypeWimax:
- *t = ConnectionTypeWimax
- case ConnectionTypeOther:
- *t = ConnectionTypeOther
-
- default:
- in.AddError(errors.New("unknown ConnectionType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ConnectionType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CookieSameSite represents the cookie's 'SameSite' status:
-// https://tools.ietf.org/html/draft-west-first-party-cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookieSameSite
-type CookieSameSite string
-
-// String returns the CookieSameSite as string value.
-func (t CookieSameSite) String() string {
- return string(t)
-}
-
-// CookieSameSite values.
-const (
- CookieSameSiteStrict CookieSameSite = "Strict"
- CookieSameSiteLax CookieSameSite = "Lax"
- CookieSameSiteNone CookieSameSite = "None"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CookieSameSite) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CookieSameSite) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CookieSameSite) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CookieSameSite(in.String()) {
- case CookieSameSiteStrict:
- *t = CookieSameSiteStrict
- case CookieSameSiteLax:
- *t = CookieSameSiteLax
- case CookieSameSiteNone:
- *t = CookieSameSiteNone
-
- default:
- in.AddError(errors.New("unknown CookieSameSite value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CookieSameSite) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CookiePriority represents the cookie's 'Priority' status:
-// https://tools.ietf.org/html/draft-west-cookie-priority-00.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookiePriority
-type CookiePriority string
-
-// String returns the CookiePriority as string value.
-func (t CookiePriority) String() string {
- return string(t)
-}
-
-// CookiePriority values.
-const (
- CookiePriorityLow CookiePriority = "Low"
- CookiePriorityMedium CookiePriority = "Medium"
- CookiePriorityHigh CookiePriority = "High"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CookiePriority) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CookiePriority) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CookiePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CookiePriority(in.String()) {
- case CookiePriorityLow:
- *t = CookiePriorityLow
- case CookiePriorityMedium:
- *t = CookiePriorityMedium
- case CookiePriorityHigh:
- *t = CookiePriorityHigh
-
- default:
- in.AddError(errors.New("unknown CookiePriority value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CookiePriority) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CookieSourceScheme represents the source scheme of the origin that
-// originally set the cookie. A value of "Unset" allows protocol clients to
-// emulate legacy cookie scope for the scheme. This is a temporary ability and
-// it will be removed in the future.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookieSourceScheme
-type CookieSourceScheme string
-
-// String returns the CookieSourceScheme as string value.
-func (t CookieSourceScheme) String() string {
- return string(t)
-}
-
-// CookieSourceScheme values.
-const (
- CookieSourceSchemeUnset CookieSourceScheme = "Unset"
- CookieSourceSchemeNonSecure CookieSourceScheme = "NonSecure"
- CookieSourceSchemeSecure CookieSourceScheme = "Secure"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CookieSourceScheme) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CookieSourceScheme) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CookieSourceScheme) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CookieSourceScheme(in.String()) {
- case CookieSourceSchemeUnset:
- *t = CookieSourceSchemeUnset
- case CookieSourceSchemeNonSecure:
- *t = CookieSourceSchemeNonSecure
- case CookieSourceSchemeSecure:
- *t = CookieSourceSchemeSecure
-
- default:
- in.AddError(errors.New("unknown CookieSourceScheme value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CookieSourceScheme) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ResourceTiming timing information for the request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ResourceTiming
-type ResourceTiming struct {
- RequestTime float64 `json:"requestTime"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
- ProxyStart float64 `json:"proxyStart"` // Started resolving proxy.
- ProxyEnd float64 `json:"proxyEnd"` // Finished resolving proxy.
- DNSStart float64 `json:"dnsStart"` // Started DNS address resolve.
- DNSEnd float64 `json:"dnsEnd"` // Finished DNS address resolve.
- ConnectStart float64 `json:"connectStart"` // Started connecting to the remote host.
- ConnectEnd float64 `json:"connectEnd"` // Connected to the remote host.
- SslStart float64 `json:"sslStart"` // Started SSL handshake.
- SslEnd float64 `json:"sslEnd"` // Finished SSL handshake.
- WorkerStart float64 `json:"workerStart"` // Started running ServiceWorker.
- WorkerReady float64 `json:"workerReady"` // Finished Starting ServiceWorker.
- WorkerFetchStart float64 `json:"workerFetchStart"` // Started fetch event.
- WorkerRespondWithSettled float64 `json:"workerRespondWithSettled"` // Settled fetch event respondWith promise.
- SendStart float64 `json:"sendStart"` // Started sending request.
- SendEnd float64 `json:"sendEnd"` // Finished sending request.
- PushStart float64 `json:"pushStart"` // Time the server started pushing request.
- PushEnd float64 `json:"pushEnd"` // Time the server finished pushing request.
- ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers.
-}
-
-// ResourcePriority loading priority of a resource request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ResourcePriority
-type ResourcePriority string
-
-// String returns the ResourcePriority as string value.
-func (t ResourcePriority) String() string {
- return string(t)
-}
-
-// ResourcePriority values.
-const (
- ResourcePriorityVeryLow ResourcePriority = "VeryLow"
- ResourcePriorityLow ResourcePriority = "Low"
- ResourcePriorityMedium ResourcePriority = "Medium"
- ResourcePriorityHigh ResourcePriority = "High"
- ResourcePriorityVeryHigh ResourcePriority = "VeryHigh"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ResourcePriority) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ResourcePriority) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ResourcePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ResourcePriority(in.String()) {
- case ResourcePriorityVeryLow:
- *t = ResourcePriorityVeryLow
- case ResourcePriorityLow:
- *t = ResourcePriorityLow
- case ResourcePriorityMedium:
- *t = ResourcePriorityMedium
- case ResourcePriorityHigh:
- *t = ResourcePriorityHigh
- case ResourcePriorityVeryHigh:
- *t = ResourcePriorityVeryHigh
-
- default:
- in.AddError(errors.New("unknown ResourcePriority value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ResourcePriority) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PostDataEntry post data entry for HTTP request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-PostDataEntry
-type PostDataEntry struct {
- Bytes string `json:"bytes,omitempty"`
-}
-
-// Request HTTP request data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Request
-type Request struct {
- URL string `json:"url"` // Request URL (without fragment).
- URLFragment string `json:"urlFragment,omitempty"` // Fragment of the requested URL starting with hash, if present.
- Method string `json:"method"` // HTTP request method.
- Headers Headers `json:"headers"` // HTTP request headers.
- PostData string `json:"postData,omitempty"` // HTTP POST request data.
- HasPostData bool `json:"hasPostData,omitempty"` // True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
- PostDataEntries []*PostDataEntry `json:"postDataEntries,omitempty"` // Request body elements. This will be converted from base64 to binary
- MixedContentType security.MixedContentType `json:"mixedContentType,omitempty"` // The mixed content type of the request.
- InitialPriority ResourcePriority `json:"initialPriority"` // Priority of the resource request at the time request is sent.
- ReferrerPolicy ReferrerPolicy `json:"referrerPolicy"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
- IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload.
- TrustTokenParams *TrustTokenParams `json:"trustTokenParams,omitempty"` // Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.
-}
-
-// SignedCertificateTimestamp details of a signed certificate timestamp
-// (SCT).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedCertificateTimestamp
-type SignedCertificateTimestamp struct {
- Status string `json:"status"` // Validation status.
- Origin string `json:"origin"` // Origin.
- LogDescription string `json:"logDescription"` // Log name / description.
- LogID string `json:"logId"` // Log ID.
- Timestamp *cdp.TimeSinceEpoch `json:"timestamp"` // Issuance date.
- HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm.
- SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm.
- SignatureData string `json:"signatureData"` // Signature data.
-}
-
-// SecurityDetails security details about a request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SecurityDetails
-type SecurityDetails struct {
- Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC").
- KeyExchange string `json:"keyExchange"` // Key Exchange used by the connection, or the empty string if not applicable.
- KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable.
- Cipher string `json:"cipher"` // Cipher name.
- Mac string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs.
- CertificateID security.CertificateID `json:"certificateId"` // Certificate ID value.
- SubjectName string `json:"subjectName"` // Certificate subject name.
- SanList []string `json:"sanList"` // Subject Alternative Name (SAN) DNS names and IP addresses.
- Issuer string `json:"issuer"` // Name of the issuing CA.
- ValidFrom *cdp.TimeSinceEpoch `json:"validFrom"` // Certificate valid from date.
- ValidTo *cdp.TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date
- SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs).
- CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"` // Whether the request complied with Certificate Transparency policy
-}
-
-// CertificateTransparencyCompliance whether the request complied with
-// Certificate Transparency policy.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CertificateTransparencyCompliance
-type CertificateTransparencyCompliance string
-
-// String returns the CertificateTransparencyCompliance as string value.
-func (t CertificateTransparencyCompliance) String() string {
- return string(t)
-}
-
-// CertificateTransparencyCompliance values.
-const (
- CertificateTransparencyComplianceUnknown CertificateTransparencyCompliance = "unknown"
- CertificateTransparencyComplianceNotCompliant CertificateTransparencyCompliance = "not-compliant"
- CertificateTransparencyComplianceCompliant CertificateTransparencyCompliance = "compliant"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CertificateTransparencyCompliance) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CertificateTransparencyCompliance) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CertificateTransparencyCompliance) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CertificateTransparencyCompliance(in.String()) {
- case CertificateTransparencyComplianceUnknown:
- *t = CertificateTransparencyComplianceUnknown
- case CertificateTransparencyComplianceNotCompliant:
- *t = CertificateTransparencyComplianceNotCompliant
- case CertificateTransparencyComplianceCompliant:
- *t = CertificateTransparencyComplianceCompliant
-
- default:
- in.AddError(errors.New("unknown CertificateTransparencyCompliance value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CertificateTransparencyCompliance) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BlockedReason the reason why request was blocked.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-BlockedReason
-type BlockedReason string
-
-// String returns the BlockedReason as string value.
-func (t BlockedReason) String() string {
- return string(t)
-}
-
-// BlockedReason values.
-const (
- BlockedReasonOther BlockedReason = "other"
- BlockedReasonCsp BlockedReason = "csp"
- BlockedReasonMixedContent BlockedReason = "mixed-content"
- BlockedReasonOrigin BlockedReason = "origin"
- BlockedReasonInspector BlockedReason = "inspector"
- BlockedReasonSubresourceFilter BlockedReason = "subresource-filter"
- BlockedReasonContentType BlockedReason = "content-type"
- BlockedReasonCoepFrameResourceNeedsCoepHeader BlockedReason = "coep-frame-resource-needs-coep-header"
- BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage BlockedReason = "coop-sandboxed-iframe-cannot-navigate-to-coop-page"
- BlockedReasonCorpNotSameOrigin BlockedReason = "corp-not-same-origin"
- BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep"
- BlockedReasonCorpNotSameSite BlockedReason = "corp-not-same-site"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t BlockedReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t BlockedReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch BlockedReason(in.String()) {
- case BlockedReasonOther:
- *t = BlockedReasonOther
- case BlockedReasonCsp:
- *t = BlockedReasonCsp
- case BlockedReasonMixedContent:
- *t = BlockedReasonMixedContent
- case BlockedReasonOrigin:
- *t = BlockedReasonOrigin
- case BlockedReasonInspector:
- *t = BlockedReasonInspector
- case BlockedReasonSubresourceFilter:
- *t = BlockedReasonSubresourceFilter
- case BlockedReasonContentType:
- *t = BlockedReasonContentType
- case BlockedReasonCoepFrameResourceNeedsCoepHeader:
- *t = BlockedReasonCoepFrameResourceNeedsCoepHeader
- case BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage:
- *t = BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage
- case BlockedReasonCorpNotSameOrigin:
- *t = BlockedReasonCorpNotSameOrigin
- case BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep:
- *t = BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep
- case BlockedReasonCorpNotSameSite:
- *t = BlockedReasonCorpNotSameSite
-
- default:
- in.AddError(errors.New("unknown BlockedReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BlockedReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CorsError the reason why request was blocked.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CorsError
-type CorsError string
-
-// String returns the CorsError as string value.
-func (t CorsError) String() string {
- return string(t)
-}
-
-// CorsError values.
-const (
- CorsErrorDisallowedByMode CorsError = "DisallowedByMode"
- CorsErrorInvalidResponse CorsError = "InvalidResponse"
- CorsErrorWildcardOriginNotAllowed CorsError = "WildcardOriginNotAllowed"
- CorsErrorMissingAllowOriginHeader CorsError = "MissingAllowOriginHeader"
- CorsErrorMultipleAllowOriginValues CorsError = "MultipleAllowOriginValues"
- CorsErrorInvalidAllowOriginValue CorsError = "InvalidAllowOriginValue"
- CorsErrorAllowOriginMismatch CorsError = "AllowOriginMismatch"
- CorsErrorInvalidAllowCredentials CorsError = "InvalidAllowCredentials"
- CorsErrorCorsDisabledScheme CorsError = "CorsDisabledScheme"
- CorsErrorPreflightInvalidStatus CorsError = "PreflightInvalidStatus"
- CorsErrorPreflightDisallowedRedirect CorsError = "PreflightDisallowedRedirect"
- CorsErrorPreflightWildcardOriginNotAllowed CorsError = "PreflightWildcardOriginNotAllowed"
- CorsErrorPreflightMissingAllowOriginHeader CorsError = "PreflightMissingAllowOriginHeader"
- CorsErrorPreflightMultipleAllowOriginValues CorsError = "PreflightMultipleAllowOriginValues"
- CorsErrorPreflightInvalidAllowOriginValue CorsError = "PreflightInvalidAllowOriginValue"
- CorsErrorPreflightAllowOriginMismatch CorsError = "PreflightAllowOriginMismatch"
- CorsErrorPreflightInvalidAllowCredentials CorsError = "PreflightInvalidAllowCredentials"
- CorsErrorPreflightMissingAllowExternal CorsError = "PreflightMissingAllowExternal"
- CorsErrorPreflightInvalidAllowExternal CorsError = "PreflightInvalidAllowExternal"
- CorsErrorInvalidAllowMethodsPreflightResponse CorsError = "InvalidAllowMethodsPreflightResponse"
- CorsErrorInvalidAllowHeadersPreflightResponse CorsError = "InvalidAllowHeadersPreflightResponse"
- CorsErrorMethodDisallowedByPreflightResponse CorsError = "MethodDisallowedByPreflightResponse"
- CorsErrorHeaderDisallowedByPreflightResponse CorsError = "HeaderDisallowedByPreflightResponse"
- CorsErrorRedirectContainsCredentials CorsError = "RedirectContainsCredentials"
- CorsErrorInsecurePrivateNetwork CorsError = "InsecurePrivateNetwork"
- CorsErrorNoCorsRedirectModeNotFollow CorsError = "NoCorsRedirectModeNotFollow"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CorsError) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CorsError) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CorsError(in.String()) {
- case CorsErrorDisallowedByMode:
- *t = CorsErrorDisallowedByMode
- case CorsErrorInvalidResponse:
- *t = CorsErrorInvalidResponse
- case CorsErrorWildcardOriginNotAllowed:
- *t = CorsErrorWildcardOriginNotAllowed
- case CorsErrorMissingAllowOriginHeader:
- *t = CorsErrorMissingAllowOriginHeader
- case CorsErrorMultipleAllowOriginValues:
- *t = CorsErrorMultipleAllowOriginValues
- case CorsErrorInvalidAllowOriginValue:
- *t = CorsErrorInvalidAllowOriginValue
- case CorsErrorAllowOriginMismatch:
- *t = CorsErrorAllowOriginMismatch
- case CorsErrorInvalidAllowCredentials:
- *t = CorsErrorInvalidAllowCredentials
- case CorsErrorCorsDisabledScheme:
- *t = CorsErrorCorsDisabledScheme
- case CorsErrorPreflightInvalidStatus:
- *t = CorsErrorPreflightInvalidStatus
- case CorsErrorPreflightDisallowedRedirect:
- *t = CorsErrorPreflightDisallowedRedirect
- case CorsErrorPreflightWildcardOriginNotAllowed:
- *t = CorsErrorPreflightWildcardOriginNotAllowed
- case CorsErrorPreflightMissingAllowOriginHeader:
- *t = CorsErrorPreflightMissingAllowOriginHeader
- case CorsErrorPreflightMultipleAllowOriginValues:
- *t = CorsErrorPreflightMultipleAllowOriginValues
- case CorsErrorPreflightInvalidAllowOriginValue:
- *t = CorsErrorPreflightInvalidAllowOriginValue
- case CorsErrorPreflightAllowOriginMismatch:
- *t = CorsErrorPreflightAllowOriginMismatch
- case CorsErrorPreflightInvalidAllowCredentials:
- *t = CorsErrorPreflightInvalidAllowCredentials
- case CorsErrorPreflightMissingAllowExternal:
- *t = CorsErrorPreflightMissingAllowExternal
- case CorsErrorPreflightInvalidAllowExternal:
- *t = CorsErrorPreflightInvalidAllowExternal
- case CorsErrorInvalidAllowMethodsPreflightResponse:
- *t = CorsErrorInvalidAllowMethodsPreflightResponse
- case CorsErrorInvalidAllowHeadersPreflightResponse:
- *t = CorsErrorInvalidAllowHeadersPreflightResponse
- case CorsErrorMethodDisallowedByPreflightResponse:
- *t = CorsErrorMethodDisallowedByPreflightResponse
- case CorsErrorHeaderDisallowedByPreflightResponse:
- *t = CorsErrorHeaderDisallowedByPreflightResponse
- case CorsErrorRedirectContainsCredentials:
- *t = CorsErrorRedirectContainsCredentials
- case CorsErrorInsecurePrivateNetwork:
- *t = CorsErrorInsecurePrivateNetwork
- case CorsErrorNoCorsRedirectModeNotFollow:
- *t = CorsErrorNoCorsRedirectModeNotFollow
-
- default:
- in.AddError(errors.New("unknown CorsError value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CorsError) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CorsErrorStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CorsErrorStatus
-type CorsErrorStatus struct {
- CorsError CorsError `json:"corsError"`
- FailedParameter string `json:"failedParameter"`
-}
-
-// ServiceWorkerResponseSource source of serviceworker response.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ServiceWorkerResponseSource
-type ServiceWorkerResponseSource string
-
-// String returns the ServiceWorkerResponseSource as string value.
-func (t ServiceWorkerResponseSource) String() string {
- return string(t)
-}
-
-// ServiceWorkerResponseSource values.
-const (
- ServiceWorkerResponseSourceCacheStorage ServiceWorkerResponseSource = "cache-storage"
- ServiceWorkerResponseSourceHTTPCache ServiceWorkerResponseSource = "http-cache"
- ServiceWorkerResponseSourceFallbackCode ServiceWorkerResponseSource = "fallback-code"
- ServiceWorkerResponseSourceNetwork ServiceWorkerResponseSource = "network"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ServiceWorkerResponseSource) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ServiceWorkerResponseSource) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ServiceWorkerResponseSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ServiceWorkerResponseSource(in.String()) {
- case ServiceWorkerResponseSourceCacheStorage:
- *t = ServiceWorkerResponseSourceCacheStorage
- case ServiceWorkerResponseSourceHTTPCache:
- *t = ServiceWorkerResponseSourceHTTPCache
- case ServiceWorkerResponseSourceFallbackCode:
- *t = ServiceWorkerResponseSourceFallbackCode
- case ServiceWorkerResponseSourceNetwork:
- *t = ServiceWorkerResponseSourceNetwork
-
- default:
- in.AddError(errors.New("unknown ServiceWorkerResponseSource value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ServiceWorkerResponseSource) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TrustTokenParams determines what type of Trust Token operation is executed
-// and depending on the type, some additional parameters. The values are
-// specified in third_party/blink/renderer/core/fetch/trust_token.idl.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TrustTokenParams
-type TrustTokenParams struct {
- Type TrustTokenOperationType `json:"type"`
- RefreshPolicy TrustTokenParamsRefreshPolicy `json:"refreshPolicy"` // Only set for "token-redemption" type and determine whether to request a fresh SRR or use a still valid cached SRR.
- Issuers []string `json:"issuers,omitempty"` // Origins of issuers from whom to request tokens or redemption records.
-}
-
-// TrustTokenOperationType [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TrustTokenOperationType
-type TrustTokenOperationType string
-
-// String returns the TrustTokenOperationType as string value.
-func (t TrustTokenOperationType) String() string {
- return string(t)
-}
-
-// TrustTokenOperationType values.
-const (
- TrustTokenOperationTypeIssuance TrustTokenOperationType = "Issuance"
- TrustTokenOperationTypeRedemption TrustTokenOperationType = "Redemption"
- TrustTokenOperationTypeSigning TrustTokenOperationType = "Signing"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TrustTokenOperationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TrustTokenOperationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TrustTokenOperationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TrustTokenOperationType(in.String()) {
- case TrustTokenOperationTypeIssuance:
- *t = TrustTokenOperationTypeIssuance
- case TrustTokenOperationTypeRedemption:
- *t = TrustTokenOperationTypeRedemption
- case TrustTokenOperationTypeSigning:
- *t = TrustTokenOperationTypeSigning
-
- default:
- in.AddError(errors.New("unknown TrustTokenOperationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TrustTokenOperationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Response HTTP response data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Response
-type Response struct {
- URL string `json:"url"` // Response URL. This URL can be different from CachedResource.url in case of redirect.
- Status int64 `json:"status"` // HTTP response status code.
- StatusText string `json:"statusText"` // HTTP response status text.
- Headers Headers `json:"headers"` // HTTP response headers.
- HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
- MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
- RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network.
- RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
- ConnectionReused bool `json:"connectionReused"` // Specifies whether physical connection was actually reused for this request.
- ConnectionID float64 `json:"connectionId"` // Physical connection id that was actually used for this request.
- RemoteIPAddress string `json:"remoteIPAddress,omitempty"` // Remote IP address.
- RemotePort int64 `json:"remotePort,omitempty"` // Remote port.
- FromDiskCache bool `json:"fromDiskCache,omitempty"` // Specifies that the request was served from the disk cache.
- FromServiceWorker bool `json:"fromServiceWorker,omitempty"` // Specifies that the request was served from the ServiceWorker.
- FromPrefetchCache bool `json:"fromPrefetchCache,omitempty"` // Specifies that the request was served from the prefetch cache.
- EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request so far.
- Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request.
- ServiceWorkerResponseSource ServiceWorkerResponseSource `json:"serviceWorkerResponseSource,omitempty"` // Response source of response from ServiceWorker.
- ResponseTime *cdp.TimeSinceEpoch `json:"responseTime,omitempty"` // The time at which the returned response was generated.
- CacheStorageCacheName string `json:"cacheStorageCacheName,omitempty"` // Cache Storage Cache Name.
- Protocol string `json:"protocol,omitempty"` // Protocol used to fetch this request.
- SecurityState security.State `json:"securityState"` // Security state of the request resource.
- SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request.
-}
-
-// WebSocketRequest webSocket request data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-WebSocketRequest
-type WebSocketRequest struct {
- Headers Headers `json:"headers"` // HTTP request headers.
-}
-
-// WebSocketResponse webSocket response data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-WebSocketResponse
-type WebSocketResponse struct {
- Status int64 `json:"status"` // HTTP response status code.
- StatusText string `json:"statusText"` // HTTP response status text.
- Headers Headers `json:"headers"` // HTTP response headers.
- HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
- RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers.
- RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
-}
-
-// WebSocketFrame webSocket message data. This represents an entire WebSocket
-// message, not just a fragmented frame as the name suggests.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-WebSocketFrame
-type WebSocketFrame struct {
- Opcode float64 `json:"opcode"` // WebSocket message opcode.
- Mask bool `json:"mask"` // WebSocket message mask.
- PayloadData string `json:"payloadData"` // WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
-}
-
-// CachedResource information about the cached resource.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CachedResource
-type CachedResource struct {
- URL string `json:"url"` // Resource URL. This is the url of the original network request.
- Type ResourceType `json:"type"` // Type of this resource.
- Response *Response `json:"response,omitempty"` // Cached response data.
- BodySize float64 `json:"bodySize"` // Cached response body size.
-}
-
-// Initiator information about the request initiator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Initiator
-type Initiator struct {
- Type InitiatorType `json:"type"` // Type of this initiator.
- Stack *runtime.StackTrace `json:"stack,omitempty"` // Initiator JavaScript stack trace, set for Script only.
- URL string `json:"url,omitempty"` // Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
- LineNumber float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).
- ColumnNumber float64 `json:"columnNumber,omitempty"` // Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).
- RequestID RequestID `json:"requestId,omitempty"` // Set if another request triggered this request (e.g. preflight).
-}
-
-// Cookie cookie object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Cookie
-type Cookie struct {
- Name string `json:"name"` // Cookie name.
- Value string `json:"value"` // Cookie value.
- Domain string `json:"domain"` // Cookie domain.
- Path string `json:"path"` // Cookie path.
- Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch.
- Size int64 `json:"size"` // Cookie size.
- HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only.
- Secure bool `json:"secure"` // True if cookie is secure.
- Session bool `json:"session"` // True in case of session cookie.
- SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
- Priority CookiePriority `json:"priority"` // Cookie Priority
- SameParty bool `json:"sameParty"` // True if cookie is SameParty.
- SourceScheme CookieSourceScheme `json:"sourceScheme"` // Cookie source scheme type.
- SourcePort int64 `json:"sourcePort"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
-}
-
-// SetCookieBlockedReason types of reasons why a cookie may not be stored
-// from a response.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SetCookieBlockedReason
-type SetCookieBlockedReason string
-
-// String returns the SetCookieBlockedReason as string value.
-func (t SetCookieBlockedReason) String() string {
- return string(t)
-}
-
-// SetCookieBlockedReason values.
-const (
- SetCookieBlockedReasonSecureOnly SetCookieBlockedReason = "SecureOnly"
- SetCookieBlockedReasonSameSiteStrict SetCookieBlockedReason = "SameSiteStrict"
- SetCookieBlockedReasonSameSiteLax SetCookieBlockedReason = "SameSiteLax"
- SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
- SetCookieBlockedReasonSameSiteNoneInsecure SetCookieBlockedReason = "SameSiteNoneInsecure"
- SetCookieBlockedReasonUserPreferences SetCookieBlockedReason = "UserPreferences"
- SetCookieBlockedReasonSyntaxError SetCookieBlockedReason = "SyntaxError"
- SetCookieBlockedReasonSchemeNotSupported SetCookieBlockedReason = "SchemeNotSupported"
- SetCookieBlockedReasonOverwriteSecure SetCookieBlockedReason = "OverwriteSecure"
- SetCookieBlockedReasonInvalidDomain SetCookieBlockedReason = "InvalidDomain"
- SetCookieBlockedReasonInvalidPrefix SetCookieBlockedReason = "InvalidPrefix"
- SetCookieBlockedReasonUnknownError SetCookieBlockedReason = "UnknownError"
- SetCookieBlockedReasonSchemefulSameSiteStrict SetCookieBlockedReason = "SchemefulSameSiteStrict"
- SetCookieBlockedReasonSchemefulSameSiteLax SetCookieBlockedReason = "SchemefulSameSiteLax"
- SetCookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax"
- SetCookieBlockedReasonSamePartyFromCrossPartyContext SetCookieBlockedReason = "SamePartyFromCrossPartyContext"
- SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes SetCookieBlockedReason = "SamePartyConflictsWithOtherAttributes"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetCookieBlockedReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetCookieBlockedReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetCookieBlockedReason(in.String()) {
- case SetCookieBlockedReasonSecureOnly:
- *t = SetCookieBlockedReasonSecureOnly
- case SetCookieBlockedReasonSameSiteStrict:
- *t = SetCookieBlockedReasonSameSiteStrict
- case SetCookieBlockedReasonSameSiteLax:
- *t = SetCookieBlockedReasonSameSiteLax
- case SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax:
- *t = SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax
- case SetCookieBlockedReasonSameSiteNoneInsecure:
- *t = SetCookieBlockedReasonSameSiteNoneInsecure
- case SetCookieBlockedReasonUserPreferences:
- *t = SetCookieBlockedReasonUserPreferences
- case SetCookieBlockedReasonSyntaxError:
- *t = SetCookieBlockedReasonSyntaxError
- case SetCookieBlockedReasonSchemeNotSupported:
- *t = SetCookieBlockedReasonSchemeNotSupported
- case SetCookieBlockedReasonOverwriteSecure:
- *t = SetCookieBlockedReasonOverwriteSecure
- case SetCookieBlockedReasonInvalidDomain:
- *t = SetCookieBlockedReasonInvalidDomain
- case SetCookieBlockedReasonInvalidPrefix:
- *t = SetCookieBlockedReasonInvalidPrefix
- case SetCookieBlockedReasonUnknownError:
- *t = SetCookieBlockedReasonUnknownError
- case SetCookieBlockedReasonSchemefulSameSiteStrict:
- *t = SetCookieBlockedReasonSchemefulSameSiteStrict
- case SetCookieBlockedReasonSchemefulSameSiteLax:
- *t = SetCookieBlockedReasonSchemefulSameSiteLax
- case SetCookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax:
- *t = SetCookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax
- case SetCookieBlockedReasonSamePartyFromCrossPartyContext:
- *t = SetCookieBlockedReasonSamePartyFromCrossPartyContext
- case SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes:
- *t = SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes
-
- default:
- in.AddError(errors.New("unknown SetCookieBlockedReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetCookieBlockedReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CookieBlockedReason types of reasons why a cookie may not be sent with a
-// request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookieBlockedReason
-type CookieBlockedReason string
-
-// String returns the CookieBlockedReason as string value.
-func (t CookieBlockedReason) String() string {
- return string(t)
-}
-
-// CookieBlockedReason values.
-const (
- CookieBlockedReasonSecureOnly CookieBlockedReason = "SecureOnly"
- CookieBlockedReasonNotOnPath CookieBlockedReason = "NotOnPath"
- CookieBlockedReasonDomainMismatch CookieBlockedReason = "DomainMismatch"
- CookieBlockedReasonSameSiteStrict CookieBlockedReason = "SameSiteStrict"
- CookieBlockedReasonSameSiteLax CookieBlockedReason = "SameSiteLax"
- CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
- CookieBlockedReasonSameSiteNoneInsecure CookieBlockedReason = "SameSiteNoneInsecure"
- CookieBlockedReasonUserPreferences CookieBlockedReason = "UserPreferences"
- CookieBlockedReasonUnknownError CookieBlockedReason = "UnknownError"
- CookieBlockedReasonSchemefulSameSiteStrict CookieBlockedReason = "SchemefulSameSiteStrict"
- CookieBlockedReasonSchemefulSameSiteLax CookieBlockedReason = "SchemefulSameSiteLax"
- CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax"
- CookieBlockedReasonSamePartyFromCrossPartyContext CookieBlockedReason = "SamePartyFromCrossPartyContext"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CookieBlockedReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CookieBlockedReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CookieBlockedReason(in.String()) {
- case CookieBlockedReasonSecureOnly:
- *t = CookieBlockedReasonSecureOnly
- case CookieBlockedReasonNotOnPath:
- *t = CookieBlockedReasonNotOnPath
- case CookieBlockedReasonDomainMismatch:
- *t = CookieBlockedReasonDomainMismatch
- case CookieBlockedReasonSameSiteStrict:
- *t = CookieBlockedReasonSameSiteStrict
- case CookieBlockedReasonSameSiteLax:
- *t = CookieBlockedReasonSameSiteLax
- case CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax:
- *t = CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax
- case CookieBlockedReasonSameSiteNoneInsecure:
- *t = CookieBlockedReasonSameSiteNoneInsecure
- case CookieBlockedReasonUserPreferences:
- *t = CookieBlockedReasonUserPreferences
- case CookieBlockedReasonUnknownError:
- *t = CookieBlockedReasonUnknownError
- case CookieBlockedReasonSchemefulSameSiteStrict:
- *t = CookieBlockedReasonSchemefulSameSiteStrict
- case CookieBlockedReasonSchemefulSameSiteLax:
- *t = CookieBlockedReasonSchemefulSameSiteLax
- case CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax:
- *t = CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax
- case CookieBlockedReasonSamePartyFromCrossPartyContext:
- *t = CookieBlockedReasonSamePartyFromCrossPartyContext
-
- default:
- in.AddError(errors.New("unknown CookieBlockedReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CookieBlockedReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BlockedSetCookieWithReason a cookie which was not stored from a response
-// with the corresponding reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-BlockedSetCookieWithReason
-type BlockedSetCookieWithReason struct {
- BlockedReasons []SetCookieBlockedReason `json:"blockedReasons"` // The reason(s) this cookie was blocked.
- CookieLine string `json:"cookieLine"` // The string representing this individual cookie as it would appear in the header. This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
- Cookie *Cookie `json:"cookie,omitempty"` // The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors.
-}
-
-// BlockedCookieWithReason a cookie with was not sent with a request with the
-// corresponding reason.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-BlockedCookieWithReason
-type BlockedCookieWithReason struct {
- BlockedReasons []CookieBlockedReason `json:"blockedReasons"` // The reason(s) the cookie was blocked.
- Cookie *Cookie `json:"cookie"` // The cookie object representing the cookie which was not sent.
-}
-
-// CookieParam cookie parameter object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CookieParam
-type CookieParam struct {
- Name string `json:"name"` // Cookie name.
- Value string `json:"value"` // Cookie value.
- URL string `json:"url,omitempty"` // The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
- Domain string `json:"domain,omitempty"` // Cookie domain.
- Path string `json:"path,omitempty"` // Cookie path.
- Secure bool `json:"secure,omitempty"` // True if cookie is secure.
- HTTPOnly bool `json:"httpOnly,omitempty"` // True if cookie is http-only.
- SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
- Expires *cdp.TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set
- Priority CookiePriority `json:"priority,omitempty"` // Cookie Priority.
- SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty.
- SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type.
- SourcePort int64 `json:"sourcePort,omitempty"` // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
-}
-
-// AuthChallenge authorization challenge for HTTP status code 401 or 407.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AuthChallenge
-type AuthChallenge struct {
- Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge.
- Origin string `json:"origin"` // Origin of the challenger.
- Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest
- Realm string `json:"realm"` // The realm of the challenge. May be empty.
-}
-
-// AuthChallengeResponse response to an AuthChallenge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AuthChallengeResponse
-type AuthChallengeResponse struct {
- Response AuthChallengeResponseResponse `json:"response"` // The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
- Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
- Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
-}
-
-// InterceptionStage stages of the interception to begin intercepting.
-// Request will intercept before the request is sent. Response will intercept
-// after the response is received.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-InterceptionStage
-type InterceptionStage string
-
-// String returns the InterceptionStage as string value.
-func (t InterceptionStage) String() string {
- return string(t)
-}
-
-// InterceptionStage values.
-const (
- InterceptionStageRequest InterceptionStage = "Request"
- InterceptionStageHeadersReceived InterceptionStage = "HeadersReceived"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t InterceptionStage) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t InterceptionStage) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *InterceptionStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch InterceptionStage(in.String()) {
- case InterceptionStageRequest:
- *t = InterceptionStageRequest
- case InterceptionStageHeadersReceived:
- *t = InterceptionStageHeadersReceived
-
- default:
- in.AddError(errors.New("unknown InterceptionStage value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *InterceptionStage) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// RequestPattern request pattern for interception.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-RequestPattern
-type RequestPattern struct {
- URLPattern string `json:"urlPattern,omitempty"` // Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*".
- ResourceType ResourceType `json:"resourceType,omitempty"` // If set, only requests for matching resource types will be intercepted.
- InterceptionStage InterceptionStage `json:"interceptionStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request.
-}
-
-// SignedExchangeSignature information about a signed exchange signature.
-// https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedExchangeSignature
-type SignedExchangeSignature struct {
- Label string `json:"label"` // Signed exchange signature label.
- Signature string `json:"signature"` // The hex string of signed exchange signature.
- Integrity string `json:"integrity"` // Signed exchange signature integrity.
- CertURL string `json:"certUrl,omitempty"` // Signed exchange signature cert Url.
- CertSha256 string `json:"certSha256,omitempty"` // The hex string of signed exchange signature cert sha256.
- ValidityURL string `json:"validityUrl"` // Signed exchange signature validity Url.
- Date int64 `json:"date"` // Signed exchange signature date.
- Expires int64 `json:"expires"` // Signed exchange signature expires.
- Certificates []string `json:"certificates,omitempty"` // The encoded certificates.
-}
-
-// SignedExchangeHeader information about a signed exchange header.
-// https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedExchangeHeader
-type SignedExchangeHeader struct {
- RequestURL string `json:"requestUrl"` // Signed exchange request URL.
- ResponseCode int64 `json:"responseCode"` // Signed exchange response code.
- ResponseHeaders Headers `json:"responseHeaders"` // Signed exchange response headers.
- Signatures []*SignedExchangeSignature `json:"signatures"` // Signed exchange response signature.
- HeaderIntegrity string `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of "sha256-".
-}
-
-// SignedExchangeErrorField field type for a signed exchange related error.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedExchangeErrorField
-type SignedExchangeErrorField string
-
-// String returns the SignedExchangeErrorField as string value.
-func (t SignedExchangeErrorField) String() string {
- return string(t)
-}
-
-// SignedExchangeErrorField values.
-const (
- SignedExchangeErrorFieldSignatureSig SignedExchangeErrorField = "signatureSig"
- SignedExchangeErrorFieldSignatureIntegrity SignedExchangeErrorField = "signatureIntegrity"
- SignedExchangeErrorFieldSignatureCertURL SignedExchangeErrorField = "signatureCertUrl"
- SignedExchangeErrorFieldSignatureCertSha256 SignedExchangeErrorField = "signatureCertSha256"
- SignedExchangeErrorFieldSignatureValidityURL SignedExchangeErrorField = "signatureValidityUrl"
- SignedExchangeErrorFieldSignatureTimestamps SignedExchangeErrorField = "signatureTimestamps"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SignedExchangeErrorField) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SignedExchangeErrorField) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SignedExchangeErrorField) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SignedExchangeErrorField(in.String()) {
- case SignedExchangeErrorFieldSignatureSig:
- *t = SignedExchangeErrorFieldSignatureSig
- case SignedExchangeErrorFieldSignatureIntegrity:
- *t = SignedExchangeErrorFieldSignatureIntegrity
- case SignedExchangeErrorFieldSignatureCertURL:
- *t = SignedExchangeErrorFieldSignatureCertURL
- case SignedExchangeErrorFieldSignatureCertSha256:
- *t = SignedExchangeErrorFieldSignatureCertSha256
- case SignedExchangeErrorFieldSignatureValidityURL:
- *t = SignedExchangeErrorFieldSignatureValidityURL
- case SignedExchangeErrorFieldSignatureTimestamps:
- *t = SignedExchangeErrorFieldSignatureTimestamps
-
- default:
- in.AddError(errors.New("unknown SignedExchangeErrorField value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SignedExchangeErrorField) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SignedExchangeError information about a signed exchange response.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedExchangeError
-type SignedExchangeError struct {
- Message string `json:"message"` // Error message.
- SignatureIndex int64 `json:"signatureIndex,omitempty"` // The index of the signature which caused the error.
- ErrorField SignedExchangeErrorField `json:"errorField,omitempty"` // The field which caused the error.
-}
-
-// SignedExchangeInfo information about a signed exchange response.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedExchangeInfo
-type SignedExchangeInfo struct {
- OuterResponse *Response `json:"outerResponse"` // The outer response of signed HTTP exchange which was received from network.
- Header *SignedExchangeHeader `json:"header,omitempty"` // Information about the signed exchange header.
- SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the signed exchange header.
- Errors []*SignedExchangeError `json:"errors,omitempty"` // Errors occurred while handling the signed exchagne.
-}
-
-// ContentEncoding list of content encodings supported by the backend.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ContentEncoding
-type ContentEncoding string
-
-// String returns the ContentEncoding as string value.
-func (t ContentEncoding) String() string {
- return string(t)
-}
-
-// ContentEncoding values.
-const (
- ContentEncodingDeflate ContentEncoding = "deflate"
- ContentEncodingGzip ContentEncoding = "gzip"
- ContentEncodingBr ContentEncoding = "br"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContentEncoding) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContentEncoding) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContentEncoding(in.String()) {
- case ContentEncodingDeflate:
- *t = ContentEncodingDeflate
- case ContentEncodingGzip:
- *t = ContentEncodingGzip
- case ContentEncodingBr:
- *t = ContentEncodingBr
-
- default:
- in.AddError(errors.New("unknown ContentEncoding value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContentEncoding) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PrivateNetworkRequestPolicy [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-PrivateNetworkRequestPolicy
-type PrivateNetworkRequestPolicy string
-
-// String returns the PrivateNetworkRequestPolicy as string value.
-func (t PrivateNetworkRequestPolicy) String() string {
- return string(t)
-}
-
-// PrivateNetworkRequestPolicy values.
-const (
- PrivateNetworkRequestPolicyAllow PrivateNetworkRequestPolicy = "Allow"
- PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "BlockFromInsecureToMorePrivate"
- PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "WarnFromInsecureToMorePrivate"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PrivateNetworkRequestPolicy) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PrivateNetworkRequestPolicy) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PrivateNetworkRequestPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PrivateNetworkRequestPolicy(in.String()) {
- case PrivateNetworkRequestPolicyAllow:
- *t = PrivateNetworkRequestPolicyAllow
- case PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate:
- *t = PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate
- case PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate:
- *t = PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate
-
- default:
- in.AddError(errors.New("unknown PrivateNetworkRequestPolicy value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PrivateNetworkRequestPolicy) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// IPAddressSpace [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-IPAddressSpace
-type IPAddressSpace string
-
-// String returns the IPAddressSpace as string value.
-func (t IPAddressSpace) String() string {
- return string(t)
-}
-
-// IPAddressSpace values.
-const (
- IPAddressSpaceLocal IPAddressSpace = "Local"
- IPAddressSpacePrivate IPAddressSpace = "Private"
- IPAddressSpacePublic IPAddressSpace = "Public"
- IPAddressSpaceUnknown IPAddressSpace = "Unknown"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t IPAddressSpace) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t IPAddressSpace) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *IPAddressSpace) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch IPAddressSpace(in.String()) {
- case IPAddressSpaceLocal:
- *t = IPAddressSpaceLocal
- case IPAddressSpacePrivate:
- *t = IPAddressSpacePrivate
- case IPAddressSpacePublic:
- *t = IPAddressSpacePublic
- case IPAddressSpaceUnknown:
- *t = IPAddressSpaceUnknown
-
- default:
- in.AddError(errors.New("unknown IPAddressSpace value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *IPAddressSpace) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ClientSecurityState [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ClientSecurityState
-type ClientSecurityState struct {
- InitiatorIsSecureContext bool `json:"initiatorIsSecureContext"`
- InitiatorIPAddressSpace IPAddressSpace `json:"initiatorIPAddressSpace"`
- PrivateNetworkRequestPolicy PrivateNetworkRequestPolicy `json:"privateNetworkRequestPolicy"`
-}
-
-// CrossOriginOpenerPolicyValue [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CrossOriginOpenerPolicyValue
-type CrossOriginOpenerPolicyValue string
-
-// String returns the CrossOriginOpenerPolicyValue as string value.
-func (t CrossOriginOpenerPolicyValue) String() string {
- return string(t)
-}
-
-// CrossOriginOpenerPolicyValue values.
-const (
- CrossOriginOpenerPolicyValueSameOrigin CrossOriginOpenerPolicyValue = "SameOrigin"
- CrossOriginOpenerPolicyValueSameOriginAllowPopups CrossOriginOpenerPolicyValue = "SameOriginAllowPopups"
- CrossOriginOpenerPolicyValueUnsafeNone CrossOriginOpenerPolicyValue = "UnsafeNone"
- CrossOriginOpenerPolicyValueSameOriginPlusCoep CrossOriginOpenerPolicyValue = "SameOriginPlusCoep"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CrossOriginOpenerPolicyValue) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CrossOriginOpenerPolicyValue) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CrossOriginOpenerPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CrossOriginOpenerPolicyValue(in.String()) {
- case CrossOriginOpenerPolicyValueSameOrigin:
- *t = CrossOriginOpenerPolicyValueSameOrigin
- case CrossOriginOpenerPolicyValueSameOriginAllowPopups:
- *t = CrossOriginOpenerPolicyValueSameOriginAllowPopups
- case CrossOriginOpenerPolicyValueUnsafeNone:
- *t = CrossOriginOpenerPolicyValueUnsafeNone
- case CrossOriginOpenerPolicyValueSameOriginPlusCoep:
- *t = CrossOriginOpenerPolicyValueSameOriginPlusCoep
-
- default:
- in.AddError(errors.New("unknown CrossOriginOpenerPolicyValue value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CrossOriginOpenerPolicyValue) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CrossOriginOpenerPolicyStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CrossOriginOpenerPolicyStatus
-type CrossOriginOpenerPolicyStatus struct {
- Value CrossOriginOpenerPolicyValue `json:"value"`
- ReportOnlyValue CrossOriginOpenerPolicyValue `json:"reportOnlyValue"`
- ReportingEndpoint string `json:"reportingEndpoint,omitempty"`
- ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"`
-}
-
-// CrossOriginEmbedderPolicyValue [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CrossOriginEmbedderPolicyValue
-type CrossOriginEmbedderPolicyValue string
-
-// String returns the CrossOriginEmbedderPolicyValue as string value.
-func (t CrossOriginEmbedderPolicyValue) String() string {
- return string(t)
-}
-
-// CrossOriginEmbedderPolicyValue values.
-const (
- CrossOriginEmbedderPolicyValueNone CrossOriginEmbedderPolicyValue = "None"
- CrossOriginEmbedderPolicyValueCredentialless CrossOriginEmbedderPolicyValue = "Credentialless"
- CrossOriginEmbedderPolicyValueRequireCorp CrossOriginEmbedderPolicyValue = "RequireCorp"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CrossOriginEmbedderPolicyValue) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CrossOriginEmbedderPolicyValue) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CrossOriginEmbedderPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CrossOriginEmbedderPolicyValue(in.String()) {
- case CrossOriginEmbedderPolicyValueNone:
- *t = CrossOriginEmbedderPolicyValueNone
- case CrossOriginEmbedderPolicyValueCredentialless:
- *t = CrossOriginEmbedderPolicyValueCredentialless
- case CrossOriginEmbedderPolicyValueRequireCorp:
- *t = CrossOriginEmbedderPolicyValueRequireCorp
-
- default:
- in.AddError(errors.New("unknown CrossOriginEmbedderPolicyValue value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CrossOriginEmbedderPolicyValue) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CrossOriginEmbedderPolicyStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-CrossOriginEmbedderPolicyStatus
-type CrossOriginEmbedderPolicyStatus struct {
- Value CrossOriginEmbedderPolicyValue `json:"value"`
- ReportOnlyValue CrossOriginEmbedderPolicyValue `json:"reportOnlyValue"`
- ReportingEndpoint string `json:"reportingEndpoint,omitempty"`
- ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"`
-}
-
-// SecurityIsolationStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SecurityIsolationStatus
-type SecurityIsolationStatus struct {
- Coop *CrossOriginOpenerPolicyStatus `json:"coop,omitempty"`
- Coep *CrossOriginEmbedderPolicyStatus `json:"coep,omitempty"`
-}
-
-// LoadNetworkResourcePageResult an object providing the result of a network
-// resource load.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-LoadNetworkResourcePageResult
-type LoadNetworkResourcePageResult struct {
- Success bool `json:"success"`
- NetError float64 `json:"netError,omitempty"` // Optional values used for error reporting.
- NetErrorName string `json:"netErrorName,omitempty"`
- HTTPStatusCode float64 `json:"httpStatusCode,omitempty"`
- Stream io.StreamHandle `json:"stream,omitempty"` // If successful, one of the following two fields holds the result.
- Headers Headers `json:"headers,omitempty"` // Response headers.
-}
-
-// LoadNetworkResourceOptions an options object that may be extended later to
-// better support CORS, CORB and streaming.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-LoadNetworkResourceOptions
-type LoadNetworkResourceOptions struct {
- DisableCache bool `json:"disableCache"`
- IncludeCredentials bool `json:"includeCredentials"`
-}
-
-// ReferrerPolicy the referrer policy of the request, as defined in
-// https://www.w3.org/TR/referrer-policy/.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Request
-type ReferrerPolicy string
-
-// String returns the ReferrerPolicy as string value.
-func (t ReferrerPolicy) String() string {
- return string(t)
-}
-
-// ReferrerPolicy values.
-const (
- ReferrerPolicyUnsafeURL ReferrerPolicy = "unsafe-url"
- ReferrerPolicyNoReferrerWhenDowngrade ReferrerPolicy = "no-referrer-when-downgrade"
- ReferrerPolicyNoReferrer ReferrerPolicy = "no-referrer"
- ReferrerPolicyOrigin ReferrerPolicy = "origin"
- ReferrerPolicyOriginWhenCrossOrigin ReferrerPolicy = "origin-when-cross-origin"
- ReferrerPolicySameOrigin ReferrerPolicy = "same-origin"
- ReferrerPolicyStrictOrigin ReferrerPolicy = "strict-origin"
- ReferrerPolicyStrictOriginWhenCrossOrigin ReferrerPolicy = "strict-origin-when-cross-origin"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ReferrerPolicy) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ReferrerPolicy) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ReferrerPolicy(in.String()) {
- case ReferrerPolicyUnsafeURL:
- *t = ReferrerPolicyUnsafeURL
- case ReferrerPolicyNoReferrerWhenDowngrade:
- *t = ReferrerPolicyNoReferrerWhenDowngrade
- case ReferrerPolicyNoReferrer:
- *t = ReferrerPolicyNoReferrer
- case ReferrerPolicyOrigin:
- *t = ReferrerPolicyOrigin
- case ReferrerPolicyOriginWhenCrossOrigin:
- *t = ReferrerPolicyOriginWhenCrossOrigin
- case ReferrerPolicySameOrigin:
- *t = ReferrerPolicySameOrigin
- case ReferrerPolicyStrictOrigin:
- *t = ReferrerPolicyStrictOrigin
- case ReferrerPolicyStrictOriginWhenCrossOrigin:
- *t = ReferrerPolicyStrictOriginWhenCrossOrigin
-
- default:
- in.AddError(errors.New("unknown ReferrerPolicy value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ReferrerPolicy) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TrustTokenParamsRefreshPolicy only set for "token-redemption" type and
-// determine whether to request a fresh SRR or use a still valid cached SRR.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TrustTokenParams
-type TrustTokenParamsRefreshPolicy string
-
-// String returns the TrustTokenParamsRefreshPolicy as string value.
-func (t TrustTokenParamsRefreshPolicy) String() string {
- return string(t)
-}
-
-// TrustTokenParamsRefreshPolicy values.
-const (
- TrustTokenParamsRefreshPolicyUseCached TrustTokenParamsRefreshPolicy = "UseCached"
- TrustTokenParamsRefreshPolicyRefresh TrustTokenParamsRefreshPolicy = "Refresh"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TrustTokenParamsRefreshPolicy) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TrustTokenParamsRefreshPolicy) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TrustTokenParamsRefreshPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TrustTokenParamsRefreshPolicy(in.String()) {
- case TrustTokenParamsRefreshPolicyUseCached:
- *t = TrustTokenParamsRefreshPolicyUseCached
- case TrustTokenParamsRefreshPolicyRefresh:
- *t = TrustTokenParamsRefreshPolicyRefresh
-
- default:
- in.AddError(errors.New("unknown TrustTokenParamsRefreshPolicy value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TrustTokenParamsRefreshPolicy) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// InitiatorType type of this initiator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Initiator
-type InitiatorType string
-
-// String returns the InitiatorType as string value.
-func (t InitiatorType) String() string {
- return string(t)
-}
-
-// InitiatorType values.
-const (
- InitiatorTypeParser InitiatorType = "parser"
- InitiatorTypeScript InitiatorType = "script"
- InitiatorTypePreload InitiatorType = "preload"
- InitiatorTypeSignedExchange InitiatorType = "SignedExchange"
- InitiatorTypePreflight InitiatorType = "preflight"
- InitiatorTypeOther InitiatorType = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t InitiatorType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t InitiatorType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch InitiatorType(in.String()) {
- case InitiatorTypeParser:
- *t = InitiatorTypeParser
- case InitiatorTypeScript:
- *t = InitiatorTypeScript
- case InitiatorTypePreload:
- *t = InitiatorTypePreload
- case InitiatorTypeSignedExchange:
- *t = InitiatorTypeSignedExchange
- case InitiatorTypePreflight:
- *t = InitiatorTypePreflight
- case InitiatorTypeOther:
- *t = InitiatorTypeOther
-
- default:
- in.AddError(errors.New("unknown InitiatorType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *InitiatorType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AuthChallengeSource source of the authentication challenge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AuthChallenge
-type AuthChallengeSource string
-
-// String returns the AuthChallengeSource as string value.
-func (t AuthChallengeSource) String() string {
- return string(t)
-}
-
-// AuthChallengeSource values.
-const (
- AuthChallengeSourceServer AuthChallengeSource = "Server"
- AuthChallengeSourceProxy AuthChallengeSource = "Proxy"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthChallengeSource) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthChallengeSource(in.String()) {
- case AuthChallengeSourceServer:
- *t = AuthChallengeSourceServer
- case AuthChallengeSourceProxy:
- *t = AuthChallengeSourceProxy
-
- default:
- in.AddError(errors.New("unknown AuthChallengeSource value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthChallengeSource) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AuthChallengeResponseResponse the decision on what to do in response to
-// the authorization challenge. Default means deferring to the default behavior
-// of the net stack, which will likely either the Cancel authentication or
-// display a popup dialog box.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AuthChallengeResponse
-type AuthChallengeResponseResponse string
-
-// String returns the AuthChallengeResponseResponse as string value.
-func (t AuthChallengeResponseResponse) String() string {
- return string(t)
-}
-
-// AuthChallengeResponseResponse values.
-const (
- AuthChallengeResponseResponseDefault AuthChallengeResponseResponse = "Default"
- AuthChallengeResponseResponseCancelAuth AuthChallengeResponseResponse = "CancelAuth"
- AuthChallengeResponseResponseProvideCredentials AuthChallengeResponseResponse = "ProvideCredentials"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthChallengeResponseResponse) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthChallengeResponseResponse(in.String()) {
- case AuthChallengeResponseResponseDefault:
- *t = AuthChallengeResponseResponseDefault
- case AuthChallengeResponseResponseCancelAuth:
- *t = AuthChallengeResponseResponseCancelAuth
- case AuthChallengeResponseResponseProvideCredentials:
- *t = AuthChallengeResponseResponseProvideCredentials
-
- default:
- in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthChallengeResponseResponse) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TrustTokenOperationDoneStatus detailed success or error status of the
-// operation. 'AlreadyExists' also signifies a successful operation, as the
-// result of the operation already exists und thus, the operation was abort
-// preemptively (e.g. a cache hit).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-trustTokenOperationDone
-type TrustTokenOperationDoneStatus string
-
-// String returns the TrustTokenOperationDoneStatus as string value.
-func (t TrustTokenOperationDoneStatus) String() string {
- return string(t)
-}
-
-// TrustTokenOperationDoneStatus values.
-const (
- TrustTokenOperationDoneStatusOk TrustTokenOperationDoneStatus = "Ok"
- TrustTokenOperationDoneStatusInvalidArgument TrustTokenOperationDoneStatus = "InvalidArgument"
- TrustTokenOperationDoneStatusFailedPrecondition TrustTokenOperationDoneStatus = "FailedPrecondition"
- TrustTokenOperationDoneStatusResourceExhausted TrustTokenOperationDoneStatus = "ResourceExhausted"
- TrustTokenOperationDoneStatusAlreadyExists TrustTokenOperationDoneStatus = "AlreadyExists"
- TrustTokenOperationDoneStatusUnavailable TrustTokenOperationDoneStatus = "Unavailable"
- TrustTokenOperationDoneStatusBadResponse TrustTokenOperationDoneStatus = "BadResponse"
- TrustTokenOperationDoneStatusInternalError TrustTokenOperationDoneStatus = "InternalError"
- TrustTokenOperationDoneStatusUnknownError TrustTokenOperationDoneStatus = "UnknownError"
- TrustTokenOperationDoneStatusFulfilledLocally TrustTokenOperationDoneStatus = "FulfilledLocally"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TrustTokenOperationDoneStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TrustTokenOperationDoneStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TrustTokenOperationDoneStatus(in.String()) {
- case TrustTokenOperationDoneStatusOk:
- *t = TrustTokenOperationDoneStatusOk
- case TrustTokenOperationDoneStatusInvalidArgument:
- *t = TrustTokenOperationDoneStatusInvalidArgument
- case TrustTokenOperationDoneStatusFailedPrecondition:
- *t = TrustTokenOperationDoneStatusFailedPrecondition
- case TrustTokenOperationDoneStatusResourceExhausted:
- *t = TrustTokenOperationDoneStatusResourceExhausted
- case TrustTokenOperationDoneStatusAlreadyExists:
- *t = TrustTokenOperationDoneStatusAlreadyExists
- case TrustTokenOperationDoneStatusUnavailable:
- *t = TrustTokenOperationDoneStatusUnavailable
- case TrustTokenOperationDoneStatusBadResponse:
- *t = TrustTokenOperationDoneStatusBadResponse
- case TrustTokenOperationDoneStatusInternalError:
- *t = TrustTokenOperationDoneStatusInternalError
- case TrustTokenOperationDoneStatusUnknownError:
- *t = TrustTokenOperationDoneStatusUnknownError
- case TrustTokenOperationDoneStatusFulfilledLocally:
- *t = TrustTokenOperationDoneStatusFulfilledLocally
-
- default:
- in.AddError(errors.New("unknown TrustTokenOperationDoneStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TrustTokenOperationDoneStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/overlay/easyjson.go b/vendor/github.com/chromedp/cdproto/overlay/easyjson.go
deleted file mode 100644
index 98ae11f2e37..00000000000
--- a/vendor/github.com/chromedp/cdproto/overlay/easyjson.go
+++ /dev/null
@@ -1,4430 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package overlay
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- dom "github.com/chromedp/cdproto/dom"
- page "github.com/chromedp/cdproto/page"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay(in *jlexer.Lexer, out *SourceOrderConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "parentOutlineColor":
- if in.IsNull() {
- in.Skip()
- out.ParentOutlineColor = nil
- } else {
- if out.ParentOutlineColor == nil {
- out.ParentOutlineColor = new(cdp.RGBA)
- }
- (*out.ParentOutlineColor).UnmarshalEasyJSON(in)
- }
- case "childOutlineColor":
- if in.IsNull() {
- in.Skip()
- out.ChildOutlineColor = nil
- } else {
- if out.ChildOutlineColor == nil {
- out.ChildOutlineColor = new(cdp.RGBA)
- }
- (*out.ChildOutlineColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay(out *jwriter.Writer, in SourceOrderConfig) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"parentOutlineColor\":"
- out.RawString(prefix[1:])
- if in.ParentOutlineColor == nil {
- out.RawString("null")
- } else {
- (*in.ParentOutlineColor).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"childOutlineColor\":"
- out.RawString(prefix)
- if in.ChildOutlineColor == nil {
- out.RawString("null")
- } else {
- (*in.ChildOutlineColor).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SourceOrderConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SourceOrderConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SourceOrderConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SourceOrderConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay1(in *jlexer.Lexer, out *SetShowWebVitalsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay1(out *jwriter.Writer, in SetShowWebVitalsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowWebVitalsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowWebVitalsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowWebVitalsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowWebVitalsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay2(in *jlexer.Lexer, out *SetShowViewportSizeOnResizeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay2(out *jwriter.Writer, in SetShowViewportSizeOnResizeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowViewportSizeOnResizeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowViewportSizeOnResizeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowViewportSizeOnResizeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowViewportSizeOnResizeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay3(in *jlexer.Lexer, out *SetShowScrollSnapOverlaysParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scrollSnapHighlightConfigs":
- if in.IsNull() {
- in.Skip()
- out.ScrollSnapHighlightConfigs = nil
- } else {
- in.Delim('[')
- if out.ScrollSnapHighlightConfigs == nil {
- if !in.IsDelim(']') {
- out.ScrollSnapHighlightConfigs = make([]*ScrollSnapHighlightConfig, 0, 8)
- } else {
- out.ScrollSnapHighlightConfigs = []*ScrollSnapHighlightConfig{}
- }
- } else {
- out.ScrollSnapHighlightConfigs = (out.ScrollSnapHighlightConfigs)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *ScrollSnapHighlightConfig
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(ScrollSnapHighlightConfig)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.ScrollSnapHighlightConfigs = append(out.ScrollSnapHighlightConfigs, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay3(out *jwriter.Writer, in SetShowScrollSnapOverlaysParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scrollSnapHighlightConfigs\":"
- out.RawString(prefix[1:])
- if in.ScrollSnapHighlightConfigs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.ScrollSnapHighlightConfigs {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowScrollSnapOverlaysParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowScrollSnapOverlaysParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowScrollSnapOverlaysParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowScrollSnapOverlaysParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay4(in *jlexer.Lexer, out *SetShowScrollBottleneckRectsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay4(out *jwriter.Writer, in SetShowScrollBottleneckRectsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowScrollBottleneckRectsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowScrollBottleneckRectsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowScrollBottleneckRectsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowScrollBottleneckRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay5(in *jlexer.Lexer, out *SetShowPaintRectsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- out.Result = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay5(out *jwriter.Writer, in SetShowPaintRectsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"result\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Result))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowPaintRectsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowPaintRectsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowPaintRectsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowPaintRectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay6(in *jlexer.Lexer, out *SetShowLayoutShiftRegionsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- out.Result = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay6(out *jwriter.Writer, in SetShowLayoutShiftRegionsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"result\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Result))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowLayoutShiftRegionsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowLayoutShiftRegionsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowLayoutShiftRegionsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowLayoutShiftRegionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay7(in *jlexer.Lexer, out *SetShowHitTestBordersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay7(out *jwriter.Writer, in SetShowHitTestBordersParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowHitTestBordersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowHitTestBordersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowHitTestBordersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowHitTestBordersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay8(in *jlexer.Lexer, out *SetShowHingeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "hingeConfig":
- if in.IsNull() {
- in.Skip()
- out.HingeConfig = nil
- } else {
- if out.HingeConfig == nil {
- out.HingeConfig = new(HingeConfig)
- }
- (*out.HingeConfig).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay8(out *jwriter.Writer, in SetShowHingeParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.HingeConfig != nil {
- const prefix string = ",\"hingeConfig\":"
- first = false
- out.RawString(prefix[1:])
- (*in.HingeConfig).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowHingeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowHingeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowHingeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowHingeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay9(in *jlexer.Lexer, out *SetShowGridOverlaysParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "gridNodeHighlightConfigs":
- if in.IsNull() {
- in.Skip()
- out.GridNodeHighlightConfigs = nil
- } else {
- in.Delim('[')
- if out.GridNodeHighlightConfigs == nil {
- if !in.IsDelim(']') {
- out.GridNodeHighlightConfigs = make([]*GridNodeHighlightConfig, 0, 8)
- } else {
- out.GridNodeHighlightConfigs = []*GridNodeHighlightConfig{}
- }
- } else {
- out.GridNodeHighlightConfigs = (out.GridNodeHighlightConfigs)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *GridNodeHighlightConfig
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(GridNodeHighlightConfig)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.GridNodeHighlightConfigs = append(out.GridNodeHighlightConfigs, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay9(out *jwriter.Writer, in SetShowGridOverlaysParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"gridNodeHighlightConfigs\":"
- out.RawString(prefix[1:])
- if in.GridNodeHighlightConfigs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.GridNodeHighlightConfigs {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowGridOverlaysParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowGridOverlaysParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowGridOverlaysParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowGridOverlaysParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay10(in *jlexer.Lexer, out *SetShowFlexOverlaysParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "flexNodeHighlightConfigs":
- if in.IsNull() {
- in.Skip()
- out.FlexNodeHighlightConfigs = nil
- } else {
- in.Delim('[')
- if out.FlexNodeHighlightConfigs == nil {
- if !in.IsDelim(']') {
- out.FlexNodeHighlightConfigs = make([]*FlexNodeHighlightConfig, 0, 8)
- } else {
- out.FlexNodeHighlightConfigs = []*FlexNodeHighlightConfig{}
- }
- } else {
- out.FlexNodeHighlightConfigs = (out.FlexNodeHighlightConfigs)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *FlexNodeHighlightConfig
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(FlexNodeHighlightConfig)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.FlexNodeHighlightConfigs = append(out.FlexNodeHighlightConfigs, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay10(out *jwriter.Writer, in SetShowFlexOverlaysParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"flexNodeHighlightConfigs\":"
- out.RawString(prefix[1:])
- if in.FlexNodeHighlightConfigs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.FlexNodeHighlightConfigs {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowFlexOverlaysParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowFlexOverlaysParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowFlexOverlaysParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowFlexOverlaysParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay11(in *jlexer.Lexer, out *SetShowFPSCounterParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay11(out *jwriter.Writer, in SetShowFPSCounterParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowFPSCounterParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowFPSCounterParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowFPSCounterParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowFPSCounterParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay12(in *jlexer.Lexer, out *SetShowDebugBordersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay12(out *jwriter.Writer, in SetShowDebugBordersParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowDebugBordersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowDebugBordersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowDebugBordersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowDebugBordersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay13(in *jlexer.Lexer, out *SetShowAdHighlightsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "show":
- out.Show = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay13(out *jwriter.Writer, in SetShowAdHighlightsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"show\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Show))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetShowAdHighlightsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetShowAdHighlightsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetShowAdHighlightsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetShowAdHighlightsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay14(in *jlexer.Lexer, out *SetPausedInDebuggerMessageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "message":
- out.Message = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay14(out *jwriter.Writer, in SetPausedInDebuggerMessageParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Message != "" {
- const prefix string = ",\"message\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Message))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetPausedInDebuggerMessageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetPausedInDebuggerMessageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetPausedInDebuggerMessageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetPausedInDebuggerMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay15(in *jlexer.Lexer, out *SetInspectModeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "mode":
- (out.Mode).UnmarshalEasyJSON(in)
- case "highlightConfig":
- if in.IsNull() {
- in.Skip()
- out.HighlightConfig = nil
- } else {
- if out.HighlightConfig == nil {
- out.HighlightConfig = new(HighlightConfig)
- }
- (*out.HighlightConfig).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay15(out *jwriter.Writer, in SetInspectModeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"mode\":"
- out.RawString(prefix[1:])
- (in.Mode).MarshalEasyJSON(out)
- }
- if in.HighlightConfig != nil {
- const prefix string = ",\"highlightConfig\":"
- out.RawString(prefix)
- (*in.HighlightConfig).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInspectModeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInspectModeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInspectModeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInspectModeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay16(in *jlexer.Lexer, out *ScrollSnapHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scrollSnapContainerHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.ScrollSnapContainerHighlightConfig = nil
- } else {
- if out.ScrollSnapContainerHighlightConfig == nil {
- out.ScrollSnapContainerHighlightConfig = new(ScrollSnapContainerHighlightConfig)
- }
- (*out.ScrollSnapContainerHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay16(out *jwriter.Writer, in ScrollSnapHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scrollSnapContainerHighlightConfig\":"
- out.RawString(prefix[1:])
- if in.ScrollSnapContainerHighlightConfig == nil {
- out.RawString("null")
- } else {
- (*in.ScrollSnapContainerHighlightConfig).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScrollSnapHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScrollSnapHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScrollSnapHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScrollSnapHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay17(in *jlexer.Lexer, out *ScrollSnapContainerHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "snapportBorder":
- if in.IsNull() {
- in.Skip()
- out.SnapportBorder = nil
- } else {
- if out.SnapportBorder == nil {
- out.SnapportBorder = new(LineStyle)
- }
- (*out.SnapportBorder).UnmarshalEasyJSON(in)
- }
- case "snapAreaBorder":
- if in.IsNull() {
- in.Skip()
- out.SnapAreaBorder = nil
- } else {
- if out.SnapAreaBorder == nil {
- out.SnapAreaBorder = new(LineStyle)
- }
- (*out.SnapAreaBorder).UnmarshalEasyJSON(in)
- }
- case "scrollMarginColor":
- if in.IsNull() {
- in.Skip()
- out.ScrollMarginColor = nil
- } else {
- if out.ScrollMarginColor == nil {
- out.ScrollMarginColor = new(cdp.RGBA)
- }
- (*out.ScrollMarginColor).UnmarshalEasyJSON(in)
- }
- case "scrollPaddingColor":
- if in.IsNull() {
- in.Skip()
- out.ScrollPaddingColor = nil
- } else {
- if out.ScrollPaddingColor == nil {
- out.ScrollPaddingColor = new(cdp.RGBA)
- }
- (*out.ScrollPaddingColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay17(out *jwriter.Writer, in ScrollSnapContainerHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SnapportBorder != nil {
- const prefix string = ",\"snapportBorder\":"
- first = false
- out.RawString(prefix[1:])
- (*in.SnapportBorder).MarshalEasyJSON(out)
- }
- if in.SnapAreaBorder != nil {
- const prefix string = ",\"snapAreaBorder\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.SnapAreaBorder).MarshalEasyJSON(out)
- }
- if in.ScrollMarginColor != nil {
- const prefix string = ",\"scrollMarginColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ScrollMarginColor).MarshalEasyJSON(out)
- }
- if in.ScrollPaddingColor != nil {
- const prefix string = ",\"scrollPaddingColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ScrollPaddingColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScrollSnapContainerHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScrollSnapContainerHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScrollSnapContainerHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScrollSnapContainerHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay18(in *jlexer.Lexer, out *LineStyle) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "color":
- if in.IsNull() {
- in.Skip()
- out.Color = nil
- } else {
- if out.Color == nil {
- out.Color = new(cdp.RGBA)
- }
- (*out.Color).UnmarshalEasyJSON(in)
- }
- case "pattern":
- (out.Pattern).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay18(out *jwriter.Writer, in LineStyle) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Color != nil {
- const prefix string = ",\"color\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Color).MarshalEasyJSON(out)
- }
- if in.Pattern != "" {
- const prefix string = ",\"pattern\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.Pattern).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LineStyle) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LineStyle) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LineStyle) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LineStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay19(in *jlexer.Lexer, out *HingeConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "rect":
- if in.IsNull() {
- in.Skip()
- out.Rect = nil
- } else {
- if out.Rect == nil {
- out.Rect = new(dom.Rect)
- }
- (*out.Rect).UnmarshalEasyJSON(in)
- }
- case "contentColor":
- if in.IsNull() {
- in.Skip()
- out.ContentColor = nil
- } else {
- if out.ContentColor == nil {
- out.ContentColor = new(cdp.RGBA)
- }
- (*out.ContentColor).UnmarshalEasyJSON(in)
- }
- case "outlineColor":
- if in.IsNull() {
- in.Skip()
- out.OutlineColor = nil
- } else {
- if out.OutlineColor == nil {
- out.OutlineColor = new(cdp.RGBA)
- }
- (*out.OutlineColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay19(out *jwriter.Writer, in HingeConfig) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"rect\":"
- out.RawString(prefix[1:])
- if in.Rect == nil {
- out.RawString("null")
- } else {
- (*in.Rect).MarshalEasyJSON(out)
- }
- }
- if in.ContentColor != nil {
- const prefix string = ",\"contentColor\":"
- out.RawString(prefix)
- (*in.ContentColor).MarshalEasyJSON(out)
- }
- if in.OutlineColor != nil {
- const prefix string = ",\"outlineColor\":"
- out.RawString(prefix)
- (*in.OutlineColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HingeConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HingeConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HingeConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HingeConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay20(in *jlexer.Lexer, out *HighlightSourceOrderParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sourceOrderConfig":
- if in.IsNull() {
- in.Skip()
- out.SourceOrderConfig = nil
- } else {
- if out.SourceOrderConfig == nil {
- out.SourceOrderConfig = new(SourceOrderConfig)
- }
- (*out.SourceOrderConfig).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay20(out *jwriter.Writer, in HighlightSourceOrderParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sourceOrderConfig\":"
- out.RawString(prefix[1:])
- if in.SourceOrderConfig == nil {
- out.RawString("null")
- } else {
- (*in.SourceOrderConfig).MarshalEasyJSON(out)
- }
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix)
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightSourceOrderParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightSourceOrderParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightSourceOrderParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightSourceOrderParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay21(in *jlexer.Lexer, out *HighlightRectParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = int64(in.Int64())
- case "y":
- out.Y = int64(in.Int64())
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- case "color":
- if in.IsNull() {
- in.Skip()
- out.Color = nil
- } else {
- if out.Color == nil {
- out.Color = new(cdp.RGBA)
- }
- (*out.Color).UnmarshalEasyJSON(in)
- }
- case "outlineColor":
- if in.IsNull() {
- in.Skip()
- out.OutlineColor = nil
- } else {
- if out.OutlineColor == nil {
- out.OutlineColor = new(cdp.RGBA)
- }
- (*out.OutlineColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay21(out *jwriter.Writer, in HighlightRectParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Int64(int64(in.Y))
- }
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Int64(int64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Int64(int64(in.Height))
- }
- if in.Color != nil {
- const prefix string = ",\"color\":"
- out.RawString(prefix)
- (*in.Color).MarshalEasyJSON(out)
- }
- if in.OutlineColor != nil {
- const prefix string = ",\"outlineColor\":"
- out.RawString(prefix)
- (*in.OutlineColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightRectParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightRectParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightRectParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightRectParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay22(in *jlexer.Lexer, out *HighlightQuadParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "quad":
- if in.IsNull() {
- in.Skip()
- out.Quad = nil
- } else {
- in.Delim('[')
- if out.Quad == nil {
- if !in.IsDelim(']') {
- out.Quad = make(dom.Quad, 0, 8)
- } else {
- out.Quad = dom.Quad{}
- }
- } else {
- out.Quad = (out.Quad)[:0]
- }
- for !in.IsDelim(']') {
- var v10 float64
- v10 = float64(in.Float64())
- out.Quad = append(out.Quad, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "color":
- if in.IsNull() {
- in.Skip()
- out.Color = nil
- } else {
- if out.Color == nil {
- out.Color = new(cdp.RGBA)
- }
- (*out.Color).UnmarshalEasyJSON(in)
- }
- case "outlineColor":
- if in.IsNull() {
- in.Skip()
- out.OutlineColor = nil
- } else {
- if out.OutlineColor == nil {
- out.OutlineColor = new(cdp.RGBA)
- }
- (*out.OutlineColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay22(out *jwriter.Writer, in HighlightQuadParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"quad\":"
- out.RawString(prefix[1:])
- if in.Quad == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Quad {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.Float64(float64(v12))
- }
- out.RawByte(']')
- }
- }
- if in.Color != nil {
- const prefix string = ",\"color\":"
- out.RawString(prefix)
- (*in.Color).MarshalEasyJSON(out)
- }
- if in.OutlineColor != nil {
- const prefix string = ",\"outlineColor\":"
- out.RawString(prefix)
- (*in.OutlineColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightQuadParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightQuadParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightQuadParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightQuadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay23(in *jlexer.Lexer, out *HighlightNodeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "highlightConfig":
- if in.IsNull() {
- in.Skip()
- out.HighlightConfig = nil
- } else {
- if out.HighlightConfig == nil {
- out.HighlightConfig = new(HighlightConfig)
- }
- (*out.HighlightConfig).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "objectId":
- out.ObjectID = runtime.RemoteObjectID(in.String())
- case "selector":
- out.Selector = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay23(out *jwriter.Writer, in HighlightNodeParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"highlightConfig\":"
- out.RawString(prefix[1:])
- if in.HighlightConfig == nil {
- out.RawString("null")
- } else {
- (*in.HighlightConfig).MarshalEasyJSON(out)
- }
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix)
- out.String(string(in.ObjectID))
- }
- if in.Selector != "" {
- const prefix string = ",\"selector\":"
- out.RawString(prefix)
- out.String(string(in.Selector))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightNodeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightNodeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay24(in *jlexer.Lexer, out *HighlightFrameParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "contentColor":
- if in.IsNull() {
- in.Skip()
- out.ContentColor = nil
- } else {
- if out.ContentColor == nil {
- out.ContentColor = new(cdp.RGBA)
- }
- (*out.ContentColor).UnmarshalEasyJSON(in)
- }
- case "contentOutlineColor":
- if in.IsNull() {
- in.Skip()
- out.ContentOutlineColor = nil
- } else {
- if out.ContentOutlineColor == nil {
- out.ContentOutlineColor = new(cdp.RGBA)
- }
- (*out.ContentOutlineColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay24(out *jwriter.Writer, in HighlightFrameParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- if in.ContentColor != nil {
- const prefix string = ",\"contentColor\":"
- out.RawString(prefix)
- (*in.ContentColor).MarshalEasyJSON(out)
- }
- if in.ContentOutlineColor != nil {
- const prefix string = ",\"contentOutlineColor\":"
- out.RawString(prefix)
- (*in.ContentOutlineColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightFrameParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightFrameParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay25(in *jlexer.Lexer, out *HighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "showInfo":
- out.ShowInfo = bool(in.Bool())
- case "showStyles":
- out.ShowStyles = bool(in.Bool())
- case "showRulers":
- out.ShowRulers = bool(in.Bool())
- case "showAccessibilityInfo":
- out.ShowAccessibilityInfo = bool(in.Bool())
- case "showExtensionLines":
- out.ShowExtensionLines = bool(in.Bool())
- case "contentColor":
- if in.IsNull() {
- in.Skip()
- out.ContentColor = nil
- } else {
- if out.ContentColor == nil {
- out.ContentColor = new(cdp.RGBA)
- }
- (*out.ContentColor).UnmarshalEasyJSON(in)
- }
- case "paddingColor":
- if in.IsNull() {
- in.Skip()
- out.PaddingColor = nil
- } else {
- if out.PaddingColor == nil {
- out.PaddingColor = new(cdp.RGBA)
- }
- (*out.PaddingColor).UnmarshalEasyJSON(in)
- }
- case "borderColor":
- if in.IsNull() {
- in.Skip()
- out.BorderColor = nil
- } else {
- if out.BorderColor == nil {
- out.BorderColor = new(cdp.RGBA)
- }
- (*out.BorderColor).UnmarshalEasyJSON(in)
- }
- case "marginColor":
- if in.IsNull() {
- in.Skip()
- out.MarginColor = nil
- } else {
- if out.MarginColor == nil {
- out.MarginColor = new(cdp.RGBA)
- }
- (*out.MarginColor).UnmarshalEasyJSON(in)
- }
- case "eventTargetColor":
- if in.IsNull() {
- in.Skip()
- out.EventTargetColor = nil
- } else {
- if out.EventTargetColor == nil {
- out.EventTargetColor = new(cdp.RGBA)
- }
- (*out.EventTargetColor).UnmarshalEasyJSON(in)
- }
- case "shapeColor":
- if in.IsNull() {
- in.Skip()
- out.ShapeColor = nil
- } else {
- if out.ShapeColor == nil {
- out.ShapeColor = new(cdp.RGBA)
- }
- (*out.ShapeColor).UnmarshalEasyJSON(in)
- }
- case "shapeMarginColor":
- if in.IsNull() {
- in.Skip()
- out.ShapeMarginColor = nil
- } else {
- if out.ShapeMarginColor == nil {
- out.ShapeMarginColor = new(cdp.RGBA)
- }
- (*out.ShapeMarginColor).UnmarshalEasyJSON(in)
- }
- case "cssGridColor":
- if in.IsNull() {
- in.Skip()
- out.CSSGridColor = nil
- } else {
- if out.CSSGridColor == nil {
- out.CSSGridColor = new(cdp.RGBA)
- }
- (*out.CSSGridColor).UnmarshalEasyJSON(in)
- }
- case "colorFormat":
- (out.ColorFormat).UnmarshalEasyJSON(in)
- case "gridHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.GridHighlightConfig = nil
- } else {
- if out.GridHighlightConfig == nil {
- out.GridHighlightConfig = new(GridHighlightConfig)
- }
- (*out.GridHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "flexContainerHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.FlexContainerHighlightConfig = nil
- } else {
- if out.FlexContainerHighlightConfig == nil {
- out.FlexContainerHighlightConfig = new(FlexContainerHighlightConfig)
- }
- (*out.FlexContainerHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "flexItemHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.FlexItemHighlightConfig = nil
- } else {
- if out.FlexItemHighlightConfig == nil {
- out.FlexItemHighlightConfig = new(FlexItemHighlightConfig)
- }
- (*out.FlexItemHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "contrastAlgorithm":
- (out.ContrastAlgorithm).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay25(out *jwriter.Writer, in HighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ShowInfo {
- const prefix string = ",\"showInfo\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.ShowInfo))
- }
- if in.ShowStyles {
- const prefix string = ",\"showStyles\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowStyles))
- }
- if in.ShowRulers {
- const prefix string = ",\"showRulers\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowRulers))
- }
- if in.ShowAccessibilityInfo {
- const prefix string = ",\"showAccessibilityInfo\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowAccessibilityInfo))
- }
- if in.ShowExtensionLines {
- const prefix string = ",\"showExtensionLines\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowExtensionLines))
- }
- if in.ContentColor != nil {
- const prefix string = ",\"contentColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ContentColor).MarshalEasyJSON(out)
- }
- if in.PaddingColor != nil {
- const prefix string = ",\"paddingColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.PaddingColor).MarshalEasyJSON(out)
- }
- if in.BorderColor != nil {
- const prefix string = ",\"borderColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.BorderColor).MarshalEasyJSON(out)
- }
- if in.MarginColor != nil {
- const prefix string = ",\"marginColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.MarginColor).MarshalEasyJSON(out)
- }
- if in.EventTargetColor != nil {
- const prefix string = ",\"eventTargetColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.EventTargetColor).MarshalEasyJSON(out)
- }
- if in.ShapeColor != nil {
- const prefix string = ",\"shapeColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ShapeColor).MarshalEasyJSON(out)
- }
- if in.ShapeMarginColor != nil {
- const prefix string = ",\"shapeMarginColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ShapeMarginColor).MarshalEasyJSON(out)
- }
- if in.CSSGridColor != nil {
- const prefix string = ",\"cssGridColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CSSGridColor).MarshalEasyJSON(out)
- }
- if in.ColorFormat != "" {
- const prefix string = ",\"colorFormat\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.ColorFormat).MarshalEasyJSON(out)
- }
- if in.GridHighlightConfig != nil {
- const prefix string = ",\"gridHighlightConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.GridHighlightConfig).MarshalEasyJSON(out)
- }
- if in.FlexContainerHighlightConfig != nil {
- const prefix string = ",\"flexContainerHighlightConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.FlexContainerHighlightConfig).MarshalEasyJSON(out)
- }
- if in.FlexItemHighlightConfig != nil {
- const prefix string = ",\"flexItemHighlightConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.FlexItemHighlightConfig).MarshalEasyJSON(out)
- }
- if in.ContrastAlgorithm != "" {
- const prefix string = ",\"contrastAlgorithm\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.ContrastAlgorithm).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay26(in *jlexer.Lexer, out *HideHighlightParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay26(out *jwriter.Writer, in HideHighlightParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HideHighlightParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HideHighlightParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HideHighlightParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HideHighlightParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay27(in *jlexer.Lexer, out *GridNodeHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "gridHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.GridHighlightConfig = nil
- } else {
- if out.GridHighlightConfig == nil {
- out.GridHighlightConfig = new(GridHighlightConfig)
- }
- (*out.GridHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay27(out *jwriter.Writer, in GridNodeHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"gridHighlightConfig\":"
- out.RawString(prefix[1:])
- if in.GridHighlightConfig == nil {
- out.RawString("null")
- } else {
- (*in.GridHighlightConfig).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GridNodeHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GridNodeHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GridNodeHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GridNodeHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay28(in *jlexer.Lexer, out *GridHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "showGridExtensionLines":
- out.ShowGridExtensionLines = bool(in.Bool())
- case "showPositiveLineNumbers":
- out.ShowPositiveLineNumbers = bool(in.Bool())
- case "showNegativeLineNumbers":
- out.ShowNegativeLineNumbers = bool(in.Bool())
- case "showAreaNames":
- out.ShowAreaNames = bool(in.Bool())
- case "showLineNames":
- out.ShowLineNames = bool(in.Bool())
- case "showTrackSizes":
- out.ShowTrackSizes = bool(in.Bool())
- case "gridBorderColor":
- if in.IsNull() {
- in.Skip()
- out.GridBorderColor = nil
- } else {
- if out.GridBorderColor == nil {
- out.GridBorderColor = new(cdp.RGBA)
- }
- (*out.GridBorderColor).UnmarshalEasyJSON(in)
- }
- case "rowLineColor":
- if in.IsNull() {
- in.Skip()
- out.RowLineColor = nil
- } else {
- if out.RowLineColor == nil {
- out.RowLineColor = new(cdp.RGBA)
- }
- (*out.RowLineColor).UnmarshalEasyJSON(in)
- }
- case "columnLineColor":
- if in.IsNull() {
- in.Skip()
- out.ColumnLineColor = nil
- } else {
- if out.ColumnLineColor == nil {
- out.ColumnLineColor = new(cdp.RGBA)
- }
- (*out.ColumnLineColor).UnmarshalEasyJSON(in)
- }
- case "gridBorderDash":
- out.GridBorderDash = bool(in.Bool())
- case "rowLineDash":
- out.RowLineDash = bool(in.Bool())
- case "columnLineDash":
- out.ColumnLineDash = bool(in.Bool())
- case "rowGapColor":
- if in.IsNull() {
- in.Skip()
- out.RowGapColor = nil
- } else {
- if out.RowGapColor == nil {
- out.RowGapColor = new(cdp.RGBA)
- }
- (*out.RowGapColor).UnmarshalEasyJSON(in)
- }
- case "rowHatchColor":
- if in.IsNull() {
- in.Skip()
- out.RowHatchColor = nil
- } else {
- if out.RowHatchColor == nil {
- out.RowHatchColor = new(cdp.RGBA)
- }
- (*out.RowHatchColor).UnmarshalEasyJSON(in)
- }
- case "columnGapColor":
- if in.IsNull() {
- in.Skip()
- out.ColumnGapColor = nil
- } else {
- if out.ColumnGapColor == nil {
- out.ColumnGapColor = new(cdp.RGBA)
- }
- (*out.ColumnGapColor).UnmarshalEasyJSON(in)
- }
- case "columnHatchColor":
- if in.IsNull() {
- in.Skip()
- out.ColumnHatchColor = nil
- } else {
- if out.ColumnHatchColor == nil {
- out.ColumnHatchColor = new(cdp.RGBA)
- }
- (*out.ColumnHatchColor).UnmarshalEasyJSON(in)
- }
- case "areaBorderColor":
- if in.IsNull() {
- in.Skip()
- out.AreaBorderColor = nil
- } else {
- if out.AreaBorderColor == nil {
- out.AreaBorderColor = new(cdp.RGBA)
- }
- (*out.AreaBorderColor).UnmarshalEasyJSON(in)
- }
- case "gridBackgroundColor":
- if in.IsNull() {
- in.Skip()
- out.GridBackgroundColor = nil
- } else {
- if out.GridBackgroundColor == nil {
- out.GridBackgroundColor = new(cdp.RGBA)
- }
- (*out.GridBackgroundColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay28(out *jwriter.Writer, in GridHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ShowGridExtensionLines {
- const prefix string = ",\"showGridExtensionLines\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.ShowGridExtensionLines))
- }
- if in.ShowPositiveLineNumbers {
- const prefix string = ",\"showPositiveLineNumbers\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowPositiveLineNumbers))
- }
- if in.ShowNegativeLineNumbers {
- const prefix string = ",\"showNegativeLineNumbers\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowNegativeLineNumbers))
- }
- if in.ShowAreaNames {
- const prefix string = ",\"showAreaNames\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowAreaNames))
- }
- if in.ShowLineNames {
- const prefix string = ",\"showLineNames\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowLineNames))
- }
- if in.ShowTrackSizes {
- const prefix string = ",\"showTrackSizes\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ShowTrackSizes))
- }
- if in.GridBorderColor != nil {
- const prefix string = ",\"gridBorderColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.GridBorderColor).MarshalEasyJSON(out)
- }
- if in.RowLineColor != nil {
- const prefix string = ",\"rowLineColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.RowLineColor).MarshalEasyJSON(out)
- }
- if in.ColumnLineColor != nil {
- const prefix string = ",\"columnLineColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ColumnLineColor).MarshalEasyJSON(out)
- }
- if in.GridBorderDash {
- const prefix string = ",\"gridBorderDash\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.GridBorderDash))
- }
- if in.RowLineDash {
- const prefix string = ",\"rowLineDash\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.RowLineDash))
- }
- if in.ColumnLineDash {
- const prefix string = ",\"columnLineDash\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.ColumnLineDash))
- }
- if in.RowGapColor != nil {
- const prefix string = ",\"rowGapColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.RowGapColor).MarshalEasyJSON(out)
- }
- if in.RowHatchColor != nil {
- const prefix string = ",\"rowHatchColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.RowHatchColor).MarshalEasyJSON(out)
- }
- if in.ColumnGapColor != nil {
- const prefix string = ",\"columnGapColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ColumnGapColor).MarshalEasyJSON(out)
- }
- if in.ColumnHatchColor != nil {
- const prefix string = ",\"columnHatchColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ColumnHatchColor).MarshalEasyJSON(out)
- }
- if in.AreaBorderColor != nil {
- const prefix string = ",\"areaBorderColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.AreaBorderColor).MarshalEasyJSON(out)
- }
- if in.GridBackgroundColor != nil {
- const prefix string = ",\"gridBackgroundColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.GridBackgroundColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GridHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GridHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GridHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GridHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay29(in *jlexer.Lexer, out *GetSourceOrderHighlightObjectForTestReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "highlight":
- (out.Highlight).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay29(out *jwriter.Writer, in GetSourceOrderHighlightObjectForTestReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if (in.Highlight).IsDefined() {
- const prefix string = ",\"highlight\":"
- first = false
- out.RawString(prefix[1:])
- (in.Highlight).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSourceOrderHighlightObjectForTestReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSourceOrderHighlightObjectForTestReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSourceOrderHighlightObjectForTestReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSourceOrderHighlightObjectForTestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay30(in *jlexer.Lexer, out *GetSourceOrderHighlightObjectForTestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay30(out *jwriter.Writer, in GetSourceOrderHighlightObjectForTestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetSourceOrderHighlightObjectForTestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetSourceOrderHighlightObjectForTestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetSourceOrderHighlightObjectForTestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetSourceOrderHighlightObjectForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay31(in *jlexer.Lexer, out *GetHighlightObjectForTestReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "highlight":
- (out.Highlight).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay31(out *jwriter.Writer, in GetHighlightObjectForTestReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if (in.Highlight).IsDefined() {
- const prefix string = ",\"highlight\":"
- first = false
- out.RawString(prefix[1:])
- (in.Highlight).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHighlightObjectForTestReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHighlightObjectForTestReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHighlightObjectForTestReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHighlightObjectForTestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay32(in *jlexer.Lexer, out *GetHighlightObjectForTestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- case "includeDistance":
- out.IncludeDistance = bool(in.Bool())
- case "includeStyle":
- out.IncludeStyle = bool(in.Bool())
- case "colorFormat":
- (out.ColorFormat).UnmarshalEasyJSON(in)
- case "showAccessibilityInfo":
- out.ShowAccessibilityInfo = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay32(out *jwriter.Writer, in GetHighlightObjectForTestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- if in.IncludeDistance {
- const prefix string = ",\"includeDistance\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeDistance))
- }
- if in.IncludeStyle {
- const prefix string = ",\"includeStyle\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeStyle))
- }
- if in.ColorFormat != "" {
- const prefix string = ",\"colorFormat\":"
- out.RawString(prefix)
- (in.ColorFormat).MarshalEasyJSON(out)
- }
- if in.ShowAccessibilityInfo {
- const prefix string = ",\"showAccessibilityInfo\":"
- out.RawString(prefix)
- out.Bool(bool(in.ShowAccessibilityInfo))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHighlightObjectForTestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHighlightObjectForTestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHighlightObjectForTestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHighlightObjectForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay33(in *jlexer.Lexer, out *GetGridHighlightObjectsForTestReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "highlights":
- (out.Highlights).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay33(out *jwriter.Writer, in GetGridHighlightObjectsForTestReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if (in.Highlights).IsDefined() {
- const prefix string = ",\"highlights\":"
- first = false
- out.RawString(prefix[1:])
- (in.Highlights).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetGridHighlightObjectsForTestReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetGridHighlightObjectsForTestReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetGridHighlightObjectsForTestReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetGridHighlightObjectsForTestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay34(in *jlexer.Lexer, out *GetGridHighlightObjectsForTestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIds = nil
- } else {
- in.Delim('[')
- if out.NodeIds == nil {
- if !in.IsDelim(']') {
- out.NodeIds = make([]cdp.NodeID, 0, 8)
- } else {
- out.NodeIds = []cdp.NodeID{}
- }
- } else {
- out.NodeIds = (out.NodeIds)[:0]
- }
- for !in.IsDelim(']') {
- var v13 cdp.NodeID
- (v13).UnmarshalEasyJSON(in)
- out.NodeIds = append(out.NodeIds, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay34(out *jwriter.Writer, in GetGridHighlightObjectsForTestParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeIds\":"
- out.RawString(prefix[1:])
- if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.NodeIds {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v15))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetGridHighlightObjectsForTestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetGridHighlightObjectsForTestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetGridHighlightObjectsForTestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetGridHighlightObjectsForTestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay35(in *jlexer.Lexer, out *FlexNodeHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "flexContainerHighlightConfig":
- if in.IsNull() {
- in.Skip()
- out.FlexContainerHighlightConfig = nil
- } else {
- if out.FlexContainerHighlightConfig == nil {
- out.FlexContainerHighlightConfig = new(FlexContainerHighlightConfig)
- }
- (*out.FlexContainerHighlightConfig).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay35(out *jwriter.Writer, in FlexNodeHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"flexContainerHighlightConfig\":"
- out.RawString(prefix[1:])
- if in.FlexContainerHighlightConfig == nil {
- out.RawString("null")
- } else {
- (*in.FlexContainerHighlightConfig).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FlexNodeHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FlexNodeHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FlexNodeHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FlexNodeHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay36(in *jlexer.Lexer, out *FlexItemHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "baseSizeBox":
- if in.IsNull() {
- in.Skip()
- out.BaseSizeBox = nil
- } else {
- if out.BaseSizeBox == nil {
- out.BaseSizeBox = new(BoxStyle)
- }
- (*out.BaseSizeBox).UnmarshalEasyJSON(in)
- }
- case "baseSizeBorder":
- if in.IsNull() {
- in.Skip()
- out.BaseSizeBorder = nil
- } else {
- if out.BaseSizeBorder == nil {
- out.BaseSizeBorder = new(LineStyle)
- }
- (*out.BaseSizeBorder).UnmarshalEasyJSON(in)
- }
- case "flexibilityArrow":
- if in.IsNull() {
- in.Skip()
- out.FlexibilityArrow = nil
- } else {
- if out.FlexibilityArrow == nil {
- out.FlexibilityArrow = new(LineStyle)
- }
- (*out.FlexibilityArrow).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay36(out *jwriter.Writer, in FlexItemHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BaseSizeBox != nil {
- const prefix string = ",\"baseSizeBox\":"
- first = false
- out.RawString(prefix[1:])
- (*in.BaseSizeBox).MarshalEasyJSON(out)
- }
- if in.BaseSizeBorder != nil {
- const prefix string = ",\"baseSizeBorder\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.BaseSizeBorder).MarshalEasyJSON(out)
- }
- if in.FlexibilityArrow != nil {
- const prefix string = ",\"flexibilityArrow\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.FlexibilityArrow).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FlexItemHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FlexItemHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FlexItemHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FlexItemHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay37(in *jlexer.Lexer, out *FlexContainerHighlightConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "containerBorder":
- if in.IsNull() {
- in.Skip()
- out.ContainerBorder = nil
- } else {
- if out.ContainerBorder == nil {
- out.ContainerBorder = new(LineStyle)
- }
- (*out.ContainerBorder).UnmarshalEasyJSON(in)
- }
- case "lineSeparator":
- if in.IsNull() {
- in.Skip()
- out.LineSeparator = nil
- } else {
- if out.LineSeparator == nil {
- out.LineSeparator = new(LineStyle)
- }
- (*out.LineSeparator).UnmarshalEasyJSON(in)
- }
- case "itemSeparator":
- if in.IsNull() {
- in.Skip()
- out.ItemSeparator = nil
- } else {
- if out.ItemSeparator == nil {
- out.ItemSeparator = new(LineStyle)
- }
- (*out.ItemSeparator).UnmarshalEasyJSON(in)
- }
- case "mainDistributedSpace":
- if in.IsNull() {
- in.Skip()
- out.MainDistributedSpace = nil
- } else {
- if out.MainDistributedSpace == nil {
- out.MainDistributedSpace = new(BoxStyle)
- }
- (*out.MainDistributedSpace).UnmarshalEasyJSON(in)
- }
- case "crossDistributedSpace":
- if in.IsNull() {
- in.Skip()
- out.CrossDistributedSpace = nil
- } else {
- if out.CrossDistributedSpace == nil {
- out.CrossDistributedSpace = new(BoxStyle)
- }
- (*out.CrossDistributedSpace).UnmarshalEasyJSON(in)
- }
- case "rowGapSpace":
- if in.IsNull() {
- in.Skip()
- out.RowGapSpace = nil
- } else {
- if out.RowGapSpace == nil {
- out.RowGapSpace = new(BoxStyle)
- }
- (*out.RowGapSpace).UnmarshalEasyJSON(in)
- }
- case "columnGapSpace":
- if in.IsNull() {
- in.Skip()
- out.ColumnGapSpace = nil
- } else {
- if out.ColumnGapSpace == nil {
- out.ColumnGapSpace = new(BoxStyle)
- }
- (*out.ColumnGapSpace).UnmarshalEasyJSON(in)
- }
- case "crossAlignment":
- if in.IsNull() {
- in.Skip()
- out.CrossAlignment = nil
- } else {
- if out.CrossAlignment == nil {
- out.CrossAlignment = new(LineStyle)
- }
- (*out.CrossAlignment).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay37(out *jwriter.Writer, in FlexContainerHighlightConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ContainerBorder != nil {
- const prefix string = ",\"containerBorder\":"
- first = false
- out.RawString(prefix[1:])
- (*in.ContainerBorder).MarshalEasyJSON(out)
- }
- if in.LineSeparator != nil {
- const prefix string = ",\"lineSeparator\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.LineSeparator).MarshalEasyJSON(out)
- }
- if in.ItemSeparator != nil {
- const prefix string = ",\"itemSeparator\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ItemSeparator).MarshalEasyJSON(out)
- }
- if in.MainDistributedSpace != nil {
- const prefix string = ",\"mainDistributedSpace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.MainDistributedSpace).MarshalEasyJSON(out)
- }
- if in.CrossDistributedSpace != nil {
- const prefix string = ",\"crossDistributedSpace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CrossDistributedSpace).MarshalEasyJSON(out)
- }
- if in.RowGapSpace != nil {
- const prefix string = ",\"rowGapSpace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.RowGapSpace).MarshalEasyJSON(out)
- }
- if in.ColumnGapSpace != nil {
- const prefix string = ",\"columnGapSpace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ColumnGapSpace).MarshalEasyJSON(out)
- }
- if in.CrossAlignment != nil {
- const prefix string = ",\"crossAlignment\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.CrossAlignment).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FlexContainerHighlightConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FlexContainerHighlightConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FlexContainerHighlightConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FlexContainerHighlightConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay38(in *jlexer.Lexer, out *EventScreenshotRequested) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "viewport":
- if in.IsNull() {
- in.Skip()
- out.Viewport = nil
- } else {
- if out.Viewport == nil {
- out.Viewport = new(page.Viewport)
- }
- (*out.Viewport).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay38(out *jwriter.Writer, in EventScreenshotRequested) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"viewport\":"
- out.RawString(prefix[1:])
- if in.Viewport == nil {
- out.RawString("null")
- } else {
- (*in.Viewport).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventScreenshotRequested) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventScreenshotRequested) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventScreenshotRequested) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventScreenshotRequested) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay39(in *jlexer.Lexer, out *EventNodeHighlightRequested) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay39(out *jwriter.Writer, in EventNodeHighlightRequested) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNodeHighlightRequested) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNodeHighlightRequested) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNodeHighlightRequested) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNodeHighlightRequested) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay40(in *jlexer.Lexer, out *EventInspectNodeRequested) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay40(out *jwriter.Writer, in EventInspectNodeRequested) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.BackendNodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInspectNodeRequested) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInspectNodeRequested) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInspectNodeRequested) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInspectNodeRequested) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay41(in *jlexer.Lexer, out *EventInspectModeCanceled) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay41(out *jwriter.Writer, in EventInspectModeCanceled) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInspectModeCanceled) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInspectModeCanceled) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInspectModeCanceled) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInspectModeCanceled) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay42(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay42(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay43(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay43(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay44(in *jlexer.Lexer, out *BoxStyle) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "fillColor":
- if in.IsNull() {
- in.Skip()
- out.FillColor = nil
- } else {
- if out.FillColor == nil {
- out.FillColor = new(cdp.RGBA)
- }
- (*out.FillColor).UnmarshalEasyJSON(in)
- }
- case "hatchColor":
- if in.IsNull() {
- in.Skip()
- out.HatchColor = nil
- } else {
- if out.HatchColor == nil {
- out.HatchColor = new(cdp.RGBA)
- }
- (*out.HatchColor).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay44(out *jwriter.Writer, in BoxStyle) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FillColor != nil {
- const prefix string = ",\"fillColor\":"
- first = false
- out.RawString(prefix[1:])
- (*in.FillColor).MarshalEasyJSON(out)
- }
- if in.HatchColor != nil {
- const prefix string = ",\"hatchColor\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.HatchColor).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BoxStyle) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BoxStyle) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoOverlay44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BoxStyle) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BoxStyle) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoOverlay44(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/overlay/events.go b/vendor/github.com/chromedp/cdproto/overlay/events.go
deleted file mode 100644
index 8c98b62e19e..00000000000
--- a/vendor/github.com/chromedp/cdproto/overlay/events.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package overlay
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/page"
-)
-
-// EventInspectNodeRequested fired when the node should be inspected. This
-// happens after call to setInspectMode or when user manually inspects an
-// element.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#event-inspectNodeRequested
-type EventInspectNodeRequested struct {
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Id of the node to inspect.
-}
-
-// EventNodeHighlightRequested fired when the node should be highlighted.
-// This happens after call to setInspectMode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#event-nodeHighlightRequested
-type EventNodeHighlightRequested struct {
- NodeID cdp.NodeID `json:"nodeId"`
-}
-
-// EventScreenshotRequested fired when user asks to capture screenshot of
-// some area on the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#event-screenshotRequested
-type EventScreenshotRequested struct {
- Viewport *page.Viewport `json:"viewport"` // Viewport to capture, in device independent pixels (dip).
-}
-
-// EventInspectModeCanceled fired when user cancels the inspect mode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#event-inspectModeCanceled
-type EventInspectModeCanceled struct{}
diff --git a/vendor/github.com/chromedp/cdproto/overlay/overlay.go b/vendor/github.com/chromedp/cdproto/overlay/overlay.go
deleted file mode 100644
index 4054a5618f3..00000000000
--- a/vendor/github.com/chromedp/cdproto/overlay/overlay.go
+++ /dev/null
@@ -1,819 +0,0 @@
-// Package overlay provides the Chrome DevTools Protocol
-// commands, types, and events for the Overlay domain.
-//
-// This domain provides various functionality related to drawing atop the
-// inspected page.
-//
-// Generated by the cdproto-gen command.
-package overlay
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/runtime"
- "github.com/mailru/easyjson"
-)
-
-// DisableParams disables domain notifications.
-type DisableParams struct{}
-
-// Disable disables domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Overlay.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables domain notifications.
-type EnableParams struct{}
-
-// Enable enables domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Overlay.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetHighlightObjectForTestParams for testing.
-type GetHighlightObjectForTestParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get highlight object for.
- IncludeDistance bool `json:"includeDistance,omitempty"` // Whether to include distance info.
- IncludeStyle bool `json:"includeStyle,omitempty"` // Whether to include style info.
- ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format to get config with (default: hex).
- ShowAccessibilityInfo bool `json:"showAccessibilityInfo,omitempty"` // Whether to show accessibility info (default: true).
-}
-
-// GetHighlightObjectForTest for testing.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getHighlightObjectForTest
-//
-// parameters:
-// nodeID - Id of the node to get highlight object for.
-func GetHighlightObjectForTest(nodeID cdp.NodeID) *GetHighlightObjectForTestParams {
- return &GetHighlightObjectForTestParams{
- NodeID: nodeID,
- }
-}
-
-// WithIncludeDistance whether to include distance info.
-func (p GetHighlightObjectForTestParams) WithIncludeDistance(includeDistance bool) *GetHighlightObjectForTestParams {
- p.IncludeDistance = includeDistance
- return &p
-}
-
-// WithIncludeStyle whether to include style info.
-func (p GetHighlightObjectForTestParams) WithIncludeStyle(includeStyle bool) *GetHighlightObjectForTestParams {
- p.IncludeStyle = includeStyle
- return &p
-}
-
-// WithColorFormat the color format to get config with (default: hex).
-func (p GetHighlightObjectForTestParams) WithColorFormat(colorFormat ColorFormat) *GetHighlightObjectForTestParams {
- p.ColorFormat = colorFormat
- return &p
-}
-
-// WithShowAccessibilityInfo whether to show accessibility info (default:
-// true).
-func (p GetHighlightObjectForTestParams) WithShowAccessibilityInfo(showAccessibilityInfo bool) *GetHighlightObjectForTestParams {
- p.ShowAccessibilityInfo = showAccessibilityInfo
- return &p
-}
-
-// GetHighlightObjectForTestReturns return values.
-type GetHighlightObjectForTestReturns struct {
- Highlight easyjson.RawMessage `json:"highlight,omitempty"`
-}
-
-// Do executes Overlay.getHighlightObjectForTest against the provided context.
-//
-// returns:
-// highlight - Highlight data for the node.
-func (p *GetHighlightObjectForTestParams) Do(ctx context.Context) (highlight easyjson.RawMessage, err error) {
- // execute
- var res GetHighlightObjectForTestReturns
- err = cdp.Execute(ctx, CommandGetHighlightObjectForTest, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Highlight, nil
-}
-
-// GetGridHighlightObjectsForTestParams for Persistent Grid testing.
-type GetGridHighlightObjectsForTestParams struct {
- NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for.
-}
-
-// GetGridHighlightObjectsForTest for Persistent Grid testing.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getGridHighlightObjectsForTest
-//
-// parameters:
-// nodeIds - Ids of the node to get highlight object for.
-func GetGridHighlightObjectsForTest(nodeIds []cdp.NodeID) *GetGridHighlightObjectsForTestParams {
- return &GetGridHighlightObjectsForTestParams{
- NodeIds: nodeIds,
- }
-}
-
-// GetGridHighlightObjectsForTestReturns return values.
-type GetGridHighlightObjectsForTestReturns struct {
- Highlights easyjson.RawMessage `json:"highlights,omitempty"`
-}
-
-// Do executes Overlay.getGridHighlightObjectsForTest against the provided context.
-//
-// returns:
-// highlights - Grid Highlight data for the node ids provided.
-func (p *GetGridHighlightObjectsForTestParams) Do(ctx context.Context) (highlights easyjson.RawMessage, err error) {
- // execute
- var res GetGridHighlightObjectsForTestReturns
- err = cdp.Execute(ctx, CommandGetGridHighlightObjectsForTest, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Highlights, nil
-}
-
-// GetSourceOrderHighlightObjectForTestParams for Source Order Viewer
-// testing.
-type GetSourceOrderHighlightObjectForTestParams struct {
- NodeID cdp.NodeID `json:"nodeId"` // Id of the node to highlight.
-}
-
-// GetSourceOrderHighlightObjectForTest for Source Order Viewer testing.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getSourceOrderHighlightObjectForTest
-//
-// parameters:
-// nodeID - Id of the node to highlight.
-func GetSourceOrderHighlightObjectForTest(nodeID cdp.NodeID) *GetSourceOrderHighlightObjectForTestParams {
- return &GetSourceOrderHighlightObjectForTestParams{
- NodeID: nodeID,
- }
-}
-
-// GetSourceOrderHighlightObjectForTestReturns return values.
-type GetSourceOrderHighlightObjectForTestReturns struct {
- Highlight easyjson.RawMessage `json:"highlight,omitempty"`
-}
-
-// Do executes Overlay.getSourceOrderHighlightObjectForTest against the provided context.
-//
-// returns:
-// highlight - Source order highlight data for the node id provided.
-func (p *GetSourceOrderHighlightObjectForTestParams) Do(ctx context.Context) (highlight easyjson.RawMessage, err error) {
- // execute
- var res GetSourceOrderHighlightObjectForTestReturns
- err = cdp.Execute(ctx, CommandGetSourceOrderHighlightObjectForTest, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Highlight, nil
-}
-
-// HideHighlightParams hides any highlight.
-type HideHighlightParams struct{}
-
-// HideHighlight hides any highlight.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-hideHighlight
-func HideHighlight() *HideHighlightParams {
- return &HideHighlightParams{}
-}
-
-// Do executes Overlay.hideHighlight against the provided context.
-func (p *HideHighlightParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHideHighlight, nil, nil)
-}
-
-// HighlightFrameParams highlights owner element of the frame with given id.
-type HighlightFrameParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame to highlight.
- ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
- ContentOutlineColor *cdp.RGBA `json:"contentOutlineColor,omitempty"` // The content box highlight outline color (default: transparent).
-}
-
-// HighlightFrame highlights owner element of the frame with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightFrame
-//
-// parameters:
-// frameID - Identifier of the frame to highlight.
-func HighlightFrame(frameID cdp.FrameID) *HighlightFrameParams {
- return &HighlightFrameParams{
- FrameID: frameID,
- }
-}
-
-// WithContentColor the content box highlight fill color (default:
-// transparent).
-func (p HighlightFrameParams) WithContentColor(contentColor *cdp.RGBA) *HighlightFrameParams {
- p.ContentColor = contentColor
- return &p
-}
-
-// WithContentOutlineColor the content box highlight outline color (default:
-// transparent).
-func (p HighlightFrameParams) WithContentOutlineColor(contentOutlineColor *cdp.RGBA) *HighlightFrameParams {
- p.ContentOutlineColor = contentOutlineColor
- return &p
-}
-
-// Do executes Overlay.highlightFrame against the provided context.
-func (p *HighlightFrameParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHighlightFrame, p, nil)
-}
-
-// HighlightNodeParams highlights DOM node with given id or with the given
-// JavaScript object wrapper. Either nodeId or objectId must be specified.
-type HighlightNodeParams struct {
- HighlightConfig *HighlightConfig `json:"highlightConfig"` // A descriptor for the highlight appearance.
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to highlight.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to highlight.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node to be highlighted.
- Selector string `json:"selector,omitempty"` // Selectors to highlight relevant nodes.
-}
-
-// HighlightNode highlights DOM node with given id or with the given
-// JavaScript object wrapper. Either nodeId or objectId must be specified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightNode
-//
-// parameters:
-// highlightConfig - A descriptor for the highlight appearance.
-func HighlightNode(highlightConfig *HighlightConfig) *HighlightNodeParams {
- return &HighlightNodeParams{
- HighlightConfig: highlightConfig,
- }
-}
-
-// WithNodeID identifier of the node to highlight.
-func (p HighlightNodeParams) WithNodeID(nodeID cdp.NodeID) *HighlightNodeParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node to highlight.
-func (p HighlightNodeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *HighlightNodeParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node to be highlighted.
-func (p HighlightNodeParams) WithObjectID(objectID runtime.RemoteObjectID) *HighlightNodeParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithSelector selectors to highlight relevant nodes.
-func (p HighlightNodeParams) WithSelector(selector string) *HighlightNodeParams {
- p.Selector = selector
- return &p
-}
-
-// Do executes Overlay.highlightNode against the provided context.
-func (p *HighlightNodeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHighlightNode, p, nil)
-}
-
-// HighlightQuadParams highlights given quad. Coordinates are absolute with
-// respect to the main frame viewport.
-type HighlightQuadParams struct {
- Quad dom.Quad `json:"quad"` // Quad to highlight
- Color *cdp.RGBA `json:"color,omitempty"` // The highlight fill color (default: transparent).
- OutlineColor *cdp.RGBA `json:"outlineColor,omitempty"` // The highlight outline color (default: transparent).
-}
-
-// HighlightQuad highlights given quad. Coordinates are absolute with respect
-// to the main frame viewport.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightQuad
-//
-// parameters:
-// quad - Quad to highlight
-func HighlightQuad(quad dom.Quad) *HighlightQuadParams {
- return &HighlightQuadParams{
- Quad: quad,
- }
-}
-
-// WithColor the highlight fill color (default: transparent).
-func (p HighlightQuadParams) WithColor(color *cdp.RGBA) *HighlightQuadParams {
- p.Color = color
- return &p
-}
-
-// WithOutlineColor the highlight outline color (default: transparent).
-func (p HighlightQuadParams) WithOutlineColor(outlineColor *cdp.RGBA) *HighlightQuadParams {
- p.OutlineColor = outlineColor
- return &p
-}
-
-// Do executes Overlay.highlightQuad against the provided context.
-func (p *HighlightQuadParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHighlightQuad, p, nil)
-}
-
-// HighlightRectParams highlights given rectangle. Coordinates are absolute
-// with respect to the main frame viewport.
-type HighlightRectParams struct {
- X int64 `json:"x"` // X coordinate
- Y int64 `json:"y"` // Y coordinate
- Width int64 `json:"width"` // Rectangle width
- Height int64 `json:"height"` // Rectangle height
- Color *cdp.RGBA `json:"color,omitempty"` // The highlight fill color (default: transparent).
- OutlineColor *cdp.RGBA `json:"outlineColor,omitempty"` // The highlight outline color (default: transparent).
-}
-
-// HighlightRect highlights given rectangle. Coordinates are absolute with
-// respect to the main frame viewport.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightRect
-//
-// parameters:
-// x - X coordinate
-// y - Y coordinate
-// width - Rectangle width
-// height - Rectangle height
-func HighlightRect(x int64, y int64, width int64, height int64) *HighlightRectParams {
- return &HighlightRectParams{
- X: x,
- Y: y,
- Width: width,
- Height: height,
- }
-}
-
-// WithColor the highlight fill color (default: transparent).
-func (p HighlightRectParams) WithColor(color *cdp.RGBA) *HighlightRectParams {
- p.Color = color
- return &p
-}
-
-// WithOutlineColor the highlight outline color (default: transparent).
-func (p HighlightRectParams) WithOutlineColor(outlineColor *cdp.RGBA) *HighlightRectParams {
- p.OutlineColor = outlineColor
- return &p
-}
-
-// Do executes Overlay.highlightRect against the provided context.
-func (p *HighlightRectParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHighlightRect, p, nil)
-}
-
-// HighlightSourceOrderParams highlights the source order of the children of
-// the DOM node with given id or with the given JavaScript object wrapper.
-// Either nodeId or objectId must be specified.
-type HighlightSourceOrderParams struct {
- SourceOrderConfig *SourceOrderConfig `json:"sourceOrderConfig"` // A descriptor for the appearance of the overlay drawing.
- NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to highlight.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to highlight.
- ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node to be highlighted.
-}
-
-// HighlightSourceOrder highlights the source order of the children of the
-// DOM node with given id or with the given JavaScript object wrapper. Either
-// nodeId or objectId must be specified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightSourceOrder
-//
-// parameters:
-// sourceOrderConfig - A descriptor for the appearance of the overlay drawing.
-func HighlightSourceOrder(sourceOrderConfig *SourceOrderConfig) *HighlightSourceOrderParams {
- return &HighlightSourceOrderParams{
- SourceOrderConfig: sourceOrderConfig,
- }
-}
-
-// WithNodeID identifier of the node to highlight.
-func (p HighlightSourceOrderParams) WithNodeID(nodeID cdp.NodeID) *HighlightSourceOrderParams {
- p.NodeID = nodeID
- return &p
-}
-
-// WithBackendNodeID identifier of the backend node to highlight.
-func (p HighlightSourceOrderParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *HighlightSourceOrderParams {
- p.BackendNodeID = backendNodeID
- return &p
-}
-
-// WithObjectID JavaScript object id of the node to be highlighted.
-func (p HighlightSourceOrderParams) WithObjectID(objectID runtime.RemoteObjectID) *HighlightSourceOrderParams {
- p.ObjectID = objectID
- return &p
-}
-
-// Do executes Overlay.highlightSourceOrder against the provided context.
-func (p *HighlightSourceOrderParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHighlightSourceOrder, p, nil)
-}
-
-// SetInspectModeParams enters the 'inspect' mode. In this mode, elements
-// that user is hovering over are highlighted. Backend then generates
-// 'inspectNodeRequested' event upon element selection.
-type SetInspectModeParams struct {
- Mode InspectMode `json:"mode"` // Set an inspection mode.
- HighlightConfig *HighlightConfig `json:"highlightConfig,omitempty"` // A descriptor for the highlight appearance of hovered-over nodes. May be omitted if enabled == false.
-}
-
-// SetInspectMode enters the 'inspect' mode. In this mode, elements that user
-// is hovering over are highlighted. Backend then generates
-// 'inspectNodeRequested' event upon element selection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setInspectMode
-//
-// parameters:
-// mode - Set an inspection mode.
-func SetInspectMode(mode InspectMode) *SetInspectModeParams {
- return &SetInspectModeParams{
- Mode: mode,
- }
-}
-
-// WithHighlightConfig a descriptor for the highlight appearance of
-// hovered-over nodes. May be omitted if enabled == false.
-func (p SetInspectModeParams) WithHighlightConfig(highlightConfig *HighlightConfig) *SetInspectModeParams {
- p.HighlightConfig = highlightConfig
- return &p
-}
-
-// Do executes Overlay.setInspectMode against the provided context.
-func (p *SetInspectModeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetInspectMode, p, nil)
-}
-
-// SetShowAdHighlightsParams highlights owner element of all frames detected
-// to be ads.
-type SetShowAdHighlightsParams struct {
- Show bool `json:"show"` // True for showing ad highlights
-}
-
-// SetShowAdHighlights highlights owner element of all frames detected to be
-// ads.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowAdHighlights
-//
-// parameters:
-// show - True for showing ad highlights
-func SetShowAdHighlights(show bool) *SetShowAdHighlightsParams {
- return &SetShowAdHighlightsParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowAdHighlights against the provided context.
-func (p *SetShowAdHighlightsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowAdHighlights, p, nil)
-}
-
-// SetPausedInDebuggerMessageParams [no description].
-type SetPausedInDebuggerMessageParams struct {
- Message string `json:"message,omitempty"` // The message to display, also triggers resume and step over controls.
-}
-
-// SetPausedInDebuggerMessage [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setPausedInDebuggerMessage
-//
-// parameters:
-func SetPausedInDebuggerMessage() *SetPausedInDebuggerMessageParams {
- return &SetPausedInDebuggerMessageParams{}
-}
-
-// WithMessage the message to display, also triggers resume and step over
-// controls.
-func (p SetPausedInDebuggerMessageParams) WithMessage(message string) *SetPausedInDebuggerMessageParams {
- p.Message = message
- return &p
-}
-
-// Do executes Overlay.setPausedInDebuggerMessage against the provided context.
-func (p *SetPausedInDebuggerMessageParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetPausedInDebuggerMessage, p, nil)
-}
-
-// SetShowDebugBordersParams requests that backend shows debug borders on
-// layers.
-type SetShowDebugBordersParams struct {
- Show bool `json:"show"` // True for showing debug borders
-}
-
-// SetShowDebugBorders requests that backend shows debug borders on layers.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowDebugBorders
-//
-// parameters:
-// show - True for showing debug borders
-func SetShowDebugBorders(show bool) *SetShowDebugBordersParams {
- return &SetShowDebugBordersParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowDebugBorders against the provided context.
-func (p *SetShowDebugBordersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowDebugBorders, p, nil)
-}
-
-// SetShowFPSCounterParams requests that backend shows the FPS counter.
-type SetShowFPSCounterParams struct {
- Show bool `json:"show"` // True for showing the FPS counter
-}
-
-// SetShowFPSCounter requests that backend shows the FPS counter.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFPSCounter
-//
-// parameters:
-// show - True for showing the FPS counter
-func SetShowFPSCounter(show bool) *SetShowFPSCounterParams {
- return &SetShowFPSCounterParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowFPSCounter against the provided context.
-func (p *SetShowFPSCounterParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowFPSCounter, p, nil)
-}
-
-// SetShowGridOverlaysParams highlight multiple elements with the CSS Grid
-// overlay.
-type SetShowGridOverlaysParams struct {
- GridNodeHighlightConfigs []*GridNodeHighlightConfig `json:"gridNodeHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
-}
-
-// SetShowGridOverlays highlight multiple elements with the CSS Grid overlay.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowGridOverlays
-//
-// parameters:
-// gridNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
-func SetShowGridOverlays(gridNodeHighlightConfigs []*GridNodeHighlightConfig) *SetShowGridOverlaysParams {
- return &SetShowGridOverlaysParams{
- GridNodeHighlightConfigs: gridNodeHighlightConfigs,
- }
-}
-
-// Do executes Overlay.setShowGridOverlays against the provided context.
-func (p *SetShowGridOverlaysParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowGridOverlays, p, nil)
-}
-
-// SetShowFlexOverlaysParams [no description].
-type SetShowFlexOverlaysParams struct {
- FlexNodeHighlightConfigs []*FlexNodeHighlightConfig `json:"flexNodeHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
-}
-
-// SetShowFlexOverlays [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFlexOverlays
-//
-// parameters:
-// flexNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
-func SetShowFlexOverlays(flexNodeHighlightConfigs []*FlexNodeHighlightConfig) *SetShowFlexOverlaysParams {
- return &SetShowFlexOverlaysParams{
- FlexNodeHighlightConfigs: flexNodeHighlightConfigs,
- }
-}
-
-// Do executes Overlay.setShowFlexOverlays against the provided context.
-func (p *SetShowFlexOverlaysParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowFlexOverlays, p, nil)
-}
-
-// SetShowScrollSnapOverlaysParams [no description].
-type SetShowScrollSnapOverlaysParams struct {
- ScrollSnapHighlightConfigs []*ScrollSnapHighlightConfig `json:"scrollSnapHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
-}
-
-// SetShowScrollSnapOverlays [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollSnapOverlays
-//
-// parameters:
-// scrollSnapHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
-func SetShowScrollSnapOverlays(scrollSnapHighlightConfigs []*ScrollSnapHighlightConfig) *SetShowScrollSnapOverlaysParams {
- return &SetShowScrollSnapOverlaysParams{
- ScrollSnapHighlightConfigs: scrollSnapHighlightConfigs,
- }
-}
-
-// Do executes Overlay.setShowScrollSnapOverlays against the provided context.
-func (p *SetShowScrollSnapOverlaysParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowScrollSnapOverlays, p, nil)
-}
-
-// SetShowPaintRectsParams requests that backend shows paint rectangles.
-type SetShowPaintRectsParams struct {
- Result bool `json:"result"` // True for showing paint rectangles
-}
-
-// SetShowPaintRects requests that backend shows paint rectangles.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowPaintRects
-//
-// parameters:
-// result - True for showing paint rectangles
-func SetShowPaintRects(result bool) *SetShowPaintRectsParams {
- return &SetShowPaintRectsParams{
- Result: result,
- }
-}
-
-// Do executes Overlay.setShowPaintRects against the provided context.
-func (p *SetShowPaintRectsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowPaintRects, p, nil)
-}
-
-// SetShowLayoutShiftRegionsParams requests that backend shows layout shift
-// regions.
-type SetShowLayoutShiftRegionsParams struct {
- Result bool `json:"result"` // True for showing layout shift regions
-}
-
-// SetShowLayoutShiftRegions requests that backend shows layout shift
-// regions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowLayoutShiftRegions
-//
-// parameters:
-// result - True for showing layout shift regions
-func SetShowLayoutShiftRegions(result bool) *SetShowLayoutShiftRegionsParams {
- return &SetShowLayoutShiftRegionsParams{
- Result: result,
- }
-}
-
-// Do executes Overlay.setShowLayoutShiftRegions against the provided context.
-func (p *SetShowLayoutShiftRegionsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowLayoutShiftRegions, p, nil)
-}
-
-// SetShowScrollBottleneckRectsParams requests that backend shows scroll
-// bottleneck rects.
-type SetShowScrollBottleneckRectsParams struct {
- Show bool `json:"show"` // True for showing scroll bottleneck rects
-}
-
-// SetShowScrollBottleneckRects requests that backend shows scroll bottleneck
-// rects.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollBottleneckRects
-//
-// parameters:
-// show - True for showing scroll bottleneck rects
-func SetShowScrollBottleneckRects(show bool) *SetShowScrollBottleneckRectsParams {
- return &SetShowScrollBottleneckRectsParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowScrollBottleneckRects against the provided context.
-func (p *SetShowScrollBottleneckRectsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowScrollBottleneckRects, p, nil)
-}
-
-// SetShowHitTestBordersParams requests that backend shows hit-test borders
-// on layers.
-type SetShowHitTestBordersParams struct {
- Show bool `json:"show"` // True for showing hit-test borders
-}
-
-// SetShowHitTestBorders requests that backend shows hit-test borders on
-// layers.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowHitTestBorders
-//
-// parameters:
-// show - True for showing hit-test borders
-func SetShowHitTestBorders(show bool) *SetShowHitTestBordersParams {
- return &SetShowHitTestBordersParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowHitTestBorders against the provided context.
-func (p *SetShowHitTestBordersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowHitTestBorders, p, nil)
-}
-
-// SetShowWebVitalsParams request that backend shows an overlay with web
-// vital metrics.
-type SetShowWebVitalsParams struct {
- Show bool `json:"show"`
-}
-
-// SetShowWebVitals request that backend shows an overlay with web vital
-// metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowWebVitals
-//
-// parameters:
-// show
-func SetShowWebVitals(show bool) *SetShowWebVitalsParams {
- return &SetShowWebVitalsParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowWebVitals against the provided context.
-func (p *SetShowWebVitalsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowWebVitals, p, nil)
-}
-
-// SetShowViewportSizeOnResizeParams paints viewport size upon main frame
-// resize.
-type SetShowViewportSizeOnResizeParams struct {
- Show bool `json:"show"` // Whether to paint size or not.
-}
-
-// SetShowViewportSizeOnResize paints viewport size upon main frame resize.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowViewportSizeOnResize
-//
-// parameters:
-// show - Whether to paint size or not.
-func SetShowViewportSizeOnResize(show bool) *SetShowViewportSizeOnResizeParams {
- return &SetShowViewportSizeOnResizeParams{
- Show: show,
- }
-}
-
-// Do executes Overlay.setShowViewportSizeOnResize against the provided context.
-func (p *SetShowViewportSizeOnResizeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowViewportSizeOnResize, p, nil)
-}
-
-// SetShowHingeParams add a dual screen device hinge.
-type SetShowHingeParams struct {
- HingeConfig *HingeConfig `json:"hingeConfig,omitempty"` // hinge data, null means hideHinge
-}
-
-// SetShowHinge add a dual screen device hinge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowHinge
-//
-// parameters:
-func SetShowHinge() *SetShowHingeParams {
- return &SetShowHingeParams{}
-}
-
-// WithHingeConfig hinge data, null means hideHinge.
-func (p SetShowHingeParams) WithHingeConfig(hingeConfig *HingeConfig) *SetShowHingeParams {
- p.HingeConfig = hingeConfig
- return &p
-}
-
-// Do executes Overlay.setShowHinge against the provided context.
-func (p *SetShowHingeParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetShowHinge, p, nil)
-}
-
-// Command names.
-const (
- CommandDisable = "Overlay.disable"
- CommandEnable = "Overlay.enable"
- CommandGetHighlightObjectForTest = "Overlay.getHighlightObjectForTest"
- CommandGetGridHighlightObjectsForTest = "Overlay.getGridHighlightObjectsForTest"
- CommandGetSourceOrderHighlightObjectForTest = "Overlay.getSourceOrderHighlightObjectForTest"
- CommandHideHighlight = "Overlay.hideHighlight"
- CommandHighlightFrame = "Overlay.highlightFrame"
- CommandHighlightNode = "Overlay.highlightNode"
- CommandHighlightQuad = "Overlay.highlightQuad"
- CommandHighlightRect = "Overlay.highlightRect"
- CommandHighlightSourceOrder = "Overlay.highlightSourceOrder"
- CommandSetInspectMode = "Overlay.setInspectMode"
- CommandSetShowAdHighlights = "Overlay.setShowAdHighlights"
- CommandSetPausedInDebuggerMessage = "Overlay.setPausedInDebuggerMessage"
- CommandSetShowDebugBorders = "Overlay.setShowDebugBorders"
- CommandSetShowFPSCounter = "Overlay.setShowFPSCounter"
- CommandSetShowGridOverlays = "Overlay.setShowGridOverlays"
- CommandSetShowFlexOverlays = "Overlay.setShowFlexOverlays"
- CommandSetShowScrollSnapOverlays = "Overlay.setShowScrollSnapOverlays"
- CommandSetShowPaintRects = "Overlay.setShowPaintRects"
- CommandSetShowLayoutShiftRegions = "Overlay.setShowLayoutShiftRegions"
- CommandSetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"
- CommandSetShowHitTestBorders = "Overlay.setShowHitTestBorders"
- CommandSetShowWebVitals = "Overlay.setShowWebVitals"
- CommandSetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"
- CommandSetShowHinge = "Overlay.setShowHinge"
-)
diff --git a/vendor/github.com/chromedp/cdproto/overlay/types.go b/vendor/github.com/chromedp/cdproto/overlay/types.go
deleted file mode 100644
index 9f639670137..00000000000
--- a/vendor/github.com/chromedp/cdproto/overlay/types.go
+++ /dev/null
@@ -1,346 +0,0 @@
-package overlay
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// SourceOrderConfig configuration data for drawing the source order of an
-// elements children.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-SourceOrderConfig
-type SourceOrderConfig struct {
- ParentOutlineColor *cdp.RGBA `json:"parentOutlineColor"` // the color to outline the givent element in.
- ChildOutlineColor *cdp.RGBA `json:"childOutlineColor"` // the color to outline the child elements in.
-}
-
-// GridHighlightConfig configuration data for the highlighting of Grid
-// elements.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-GridHighlightConfig
-type GridHighlightConfig struct {
- ShowGridExtensionLines bool `json:"showGridExtensionLines,omitempty"` // Whether the extension lines from grid cells to the rulers should be shown (default: false).
- ShowPositiveLineNumbers bool `json:"showPositiveLineNumbers,omitempty"` // Show Positive line number labels (default: false).
- ShowNegativeLineNumbers bool `json:"showNegativeLineNumbers,omitempty"` // Show Negative line number labels (default: false).
- ShowAreaNames bool `json:"showAreaNames,omitempty"` // Show area name labels (default: false).
- ShowLineNames bool `json:"showLineNames,omitempty"` // Show line name labels (default: false).
- ShowTrackSizes bool `json:"showTrackSizes,omitempty"` // Show track size labels (default: false).
- GridBorderColor *cdp.RGBA `json:"gridBorderColor,omitempty"` // The grid container border highlight color (default: transparent).
- RowLineColor *cdp.RGBA `json:"rowLineColor,omitempty"` // The row line color (default: transparent).
- ColumnLineColor *cdp.RGBA `json:"columnLineColor,omitempty"` // The column line color (default: transparent).
- GridBorderDash bool `json:"gridBorderDash,omitempty"` // Whether the grid border is dashed (default: false).
- RowLineDash bool `json:"rowLineDash,omitempty"` // Whether row lines are dashed (default: false).
- ColumnLineDash bool `json:"columnLineDash,omitempty"` // Whether column lines are dashed (default: false).
- RowGapColor *cdp.RGBA `json:"rowGapColor,omitempty"` // The row gap highlight fill color (default: transparent).
- RowHatchColor *cdp.RGBA `json:"rowHatchColor,omitempty"` // The row gap hatching fill color (default: transparent).
- ColumnGapColor *cdp.RGBA `json:"columnGapColor,omitempty"` // The column gap highlight fill color (default: transparent).
- ColumnHatchColor *cdp.RGBA `json:"columnHatchColor,omitempty"` // The column gap hatching fill color (default: transparent).
- AreaBorderColor *cdp.RGBA `json:"areaBorderColor,omitempty"` // The named grid areas border color (Default: transparent).
- GridBackgroundColor *cdp.RGBA `json:"gridBackgroundColor,omitempty"` // The grid container background color (Default: transparent).
-}
-
-// FlexContainerHighlightConfig configuration data for the highlighting of
-// Flex container elements.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexContainerHighlightConfig
-type FlexContainerHighlightConfig struct {
- ContainerBorder *LineStyle `json:"containerBorder,omitempty"` // The style of the container border
- LineSeparator *LineStyle `json:"lineSeparator,omitempty"` // The style of the separator between lines
- ItemSeparator *LineStyle `json:"itemSeparator,omitempty"` // The style of the separator between items
- MainDistributedSpace *BoxStyle `json:"mainDistributedSpace,omitempty"` // Style of content-distribution space on the main axis (justify-content).
- CrossDistributedSpace *BoxStyle `json:"crossDistributedSpace,omitempty"` // Style of content-distribution space on the cross axis (align-content).
- RowGapSpace *BoxStyle `json:"rowGapSpace,omitempty"` // Style of empty space caused by row gaps (gap/row-gap).
- ColumnGapSpace *BoxStyle `json:"columnGapSpace,omitempty"` // Style of empty space caused by columns gaps (gap/column-gap).
- CrossAlignment *LineStyle `json:"crossAlignment,omitempty"` // Style of the self-alignment line (align-items).
-}
-
-// FlexItemHighlightConfig configuration data for the highlighting of Flex
-// item elements.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexItemHighlightConfig
-type FlexItemHighlightConfig struct {
- BaseSizeBox *BoxStyle `json:"baseSizeBox,omitempty"` // Style of the box representing the item's base size
- BaseSizeBorder *LineStyle `json:"baseSizeBorder,omitempty"` // Style of the border around the box representing the item's base size
- FlexibilityArrow *LineStyle `json:"flexibilityArrow,omitempty"` // Style of the arrow representing if the item grew or shrank
-}
-
-// LineStyle style information for drawing a line.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-LineStyle
-type LineStyle struct {
- Color *cdp.RGBA `json:"color,omitempty"` // The color of the line (default: transparent)
- Pattern LineStylePattern `json:"pattern,omitempty"` // The line pattern (default: solid)
-}
-
-// BoxStyle style information for drawing a box.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-BoxStyle
-type BoxStyle struct {
- FillColor *cdp.RGBA `json:"fillColor,omitempty"` // The background color for the box (default: transparent)
- HatchColor *cdp.RGBA `json:"hatchColor,omitempty"` // The hatching color for the box (default: transparent)
-}
-
-// ContrastAlgorithm [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ContrastAlgorithm
-type ContrastAlgorithm string
-
-// String returns the ContrastAlgorithm as string value.
-func (t ContrastAlgorithm) String() string {
- return string(t)
-}
-
-// ContrastAlgorithm values.
-const (
- ContrastAlgorithmAa ContrastAlgorithm = "aa"
- ContrastAlgorithmAaa ContrastAlgorithm = "aaa"
- ContrastAlgorithmApca ContrastAlgorithm = "apca"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContrastAlgorithm) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContrastAlgorithm) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContrastAlgorithm(in.String()) {
- case ContrastAlgorithmAa:
- *t = ContrastAlgorithmAa
- case ContrastAlgorithmAaa:
- *t = ContrastAlgorithmAaa
- case ContrastAlgorithmApca:
- *t = ContrastAlgorithmApca
-
- default:
- in.AddError(errors.New("unknown ContrastAlgorithm value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContrastAlgorithm) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// HighlightConfig configuration data for the highlighting of page elements.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-HighlightConfig
-type HighlightConfig struct {
- ShowInfo bool `json:"showInfo,omitempty"` // Whether the node info tooltip should be shown (default: false).
- ShowStyles bool `json:"showStyles,omitempty"` // Whether the node styles in the tooltip (default: false).
- ShowRulers bool `json:"showRulers,omitempty"` // Whether the rulers should be shown (default: false).
- ShowAccessibilityInfo bool `json:"showAccessibilityInfo,omitempty"` // Whether the a11y info should be shown (default: true).
- ShowExtensionLines bool `json:"showExtensionLines,omitempty"` // Whether the extension lines from node to the rulers should be shown (default: false).
- ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
- PaddingColor *cdp.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent).
- BorderColor *cdp.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent).
- MarginColor *cdp.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent).
- EventTargetColor *cdp.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent).
- ShapeColor *cdp.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent).
- ShapeMarginColor *cdp.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent).
- CSSGridColor *cdp.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent).
- ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format used to format color styles (default: hex).
- GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig,omitempty"` // The grid layout highlight configuration (default: all transparent).
- FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig,omitempty"` // The flex container highlight configuration (default: all transparent).
- FlexItemHighlightConfig *FlexItemHighlightConfig `json:"flexItemHighlightConfig,omitempty"` // The flex item highlight configuration (default: all transparent).
- ContrastAlgorithm ContrastAlgorithm `json:"contrastAlgorithm,omitempty"` // The contrast algorithm to use for the contrast ratio (default: aa).
-}
-
-// ColorFormat [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ColorFormat
-type ColorFormat string
-
-// String returns the ColorFormat as string value.
-func (t ColorFormat) String() string {
- return string(t)
-}
-
-// ColorFormat values.
-const (
- ColorFormatRgb ColorFormat = "rgb"
- ColorFormatHsl ColorFormat = "hsl"
- ColorFormatHex ColorFormat = "hex"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ColorFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ColorFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ColorFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ColorFormat(in.String()) {
- case ColorFormatRgb:
- *t = ColorFormatRgb
- case ColorFormatHsl:
- *t = ColorFormatHsl
- case ColorFormatHex:
- *t = ColorFormatHex
-
- default:
- in.AddError(errors.New("unknown ColorFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ColorFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// GridNodeHighlightConfig configurations for Persistent Grid Highlight.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-GridNodeHighlightConfig
-type GridNodeHighlightConfig struct {
- GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig"` // A descriptor for the highlight appearance.
- NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
-}
-
-// FlexNodeHighlightConfig [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-FlexNodeHighlightConfig
-type FlexNodeHighlightConfig struct {
- FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig"` // A descriptor for the highlight appearance of flex containers.
- NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
-}
-
-// ScrollSnapContainerHighlightConfig [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ScrollSnapContainerHighlightConfig
-type ScrollSnapContainerHighlightConfig struct {
- SnapportBorder *LineStyle `json:"snapportBorder,omitempty"` // The style of the snapport border (default: transparent)
- SnapAreaBorder *LineStyle `json:"snapAreaBorder,omitempty"` // The style of the snap area border (default: transparent)
- ScrollMarginColor *cdp.RGBA `json:"scrollMarginColor,omitempty"` // The margin highlight fill color (default: transparent).
- ScrollPaddingColor *cdp.RGBA `json:"scrollPaddingColor,omitempty"` // The padding highlight fill color (default: transparent).
-}
-
-// ScrollSnapHighlightConfig [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ScrollSnapHighlightConfig
-type ScrollSnapHighlightConfig struct {
- ScrollSnapContainerHighlightConfig *ScrollSnapContainerHighlightConfig `json:"scrollSnapContainerHighlightConfig"` // A descriptor for the highlight appearance of scroll snap containers.
- NodeID cdp.NodeID `json:"nodeId"` // Identifier of the node to highlight.
-}
-
-// HingeConfig configuration for dual screen hinge.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-HingeConfig
-type HingeConfig struct {
- Rect *dom.Rect `json:"rect"` // A rectangle represent hinge
- ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: a dark color).
- OutlineColor *cdp.RGBA `json:"outlineColor,omitempty"` // The content box highlight outline color (default: transparent).
-}
-
-// InspectMode [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-InspectMode
-type InspectMode string
-
-// String returns the InspectMode as string value.
-func (t InspectMode) String() string {
- return string(t)
-}
-
-// InspectMode values.
-const (
- InspectModeSearchForNode InspectMode = "searchForNode"
- InspectModeSearchForUAShadowDOM InspectMode = "searchForUAShadowDOM"
- InspectModeCaptureAreaScreenshot InspectMode = "captureAreaScreenshot"
- InspectModeShowDistances InspectMode = "showDistances"
- InspectModeNone InspectMode = "none"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t InspectMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t InspectMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch InspectMode(in.String()) {
- case InspectModeSearchForNode:
- *t = InspectModeSearchForNode
- case InspectModeSearchForUAShadowDOM:
- *t = InspectModeSearchForUAShadowDOM
- case InspectModeCaptureAreaScreenshot:
- *t = InspectModeCaptureAreaScreenshot
- case InspectModeShowDistances:
- *t = InspectModeShowDistances
- case InspectModeNone:
- *t = InspectModeNone
-
- default:
- in.AddError(errors.New("unknown InspectMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *InspectMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// LineStylePattern the line pattern (default: solid).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-LineStyle
-type LineStylePattern string
-
-// String returns the LineStylePattern as string value.
-func (t LineStylePattern) String() string {
- return string(t)
-}
-
-// LineStylePattern values.
-const (
- LineStylePatternDashed LineStylePattern = "dashed"
- LineStylePatternDotted LineStylePattern = "dotted"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t LineStylePattern) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t LineStylePattern) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *LineStylePattern) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch LineStylePattern(in.String()) {
- case LineStylePatternDashed:
- *t = LineStylePatternDashed
- case LineStylePatternDotted:
- *t = LineStylePatternDotted
-
- default:
- in.AddError(errors.New("unknown LineStylePattern value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *LineStylePattern) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/page/easyjson.go b/vendor/github.com/chromedp/cdproto/page/easyjson.go
deleted file mode 100644
index 3e616ba606f..00000000000
--- a/vendor/github.com/chromedp/cdproto/page/easyjson.go
+++ /dev/null
@@ -1,8397 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package page
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- debugger "github.com/chromedp/cdproto/debugger"
- dom "github.com/chromedp/cdproto/dom"
- io "github.com/chromedp/cdproto/io"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage(in *jlexer.Lexer, out *WaitForDebuggerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage(out *jwriter.Writer, in WaitForDebuggerParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v WaitForDebuggerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v WaitForDebuggerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *WaitForDebuggerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *WaitForDebuggerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage1(in *jlexer.Lexer, out *VisualViewport) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "offsetX":
- out.OffsetX = float64(in.Float64())
- case "offsetY":
- out.OffsetY = float64(in.Float64())
- case "pageX":
- out.PageX = float64(in.Float64())
- case "pageY":
- out.PageY = float64(in.Float64())
- case "clientWidth":
- out.ClientWidth = float64(in.Float64())
- case "clientHeight":
- out.ClientHeight = float64(in.Float64())
- case "scale":
- out.Scale = float64(in.Float64())
- case "zoom":
- out.Zoom = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage1(out *jwriter.Writer, in VisualViewport) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"offsetX\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.OffsetX))
- }
- {
- const prefix string = ",\"offsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.OffsetY))
- }
- {
- const prefix string = ",\"pageX\":"
- out.RawString(prefix)
- out.Float64(float64(in.PageX))
- }
- {
- const prefix string = ",\"pageY\":"
- out.RawString(prefix)
- out.Float64(float64(in.PageY))
- }
- {
- const prefix string = ",\"clientWidth\":"
- out.RawString(prefix)
- out.Float64(float64(in.ClientWidth))
- }
- {
- const prefix string = ",\"clientHeight\":"
- out.RawString(prefix)
- out.Float64(float64(in.ClientHeight))
- }
- {
- const prefix string = ",\"scale\":"
- out.RawString(prefix)
- out.Float64(float64(in.Scale))
- }
- if in.Zoom != 0 {
- const prefix string = ",\"zoom\":"
- out.RawString(prefix)
- out.Float64(float64(in.Zoom))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v VisualViewport) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v VisualViewport) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *VisualViewport) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *VisualViewport) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage2(in *jlexer.Lexer, out *Viewport) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "x":
- out.X = float64(in.Float64())
- case "y":
- out.Y = float64(in.Float64())
- case "width":
- out.Width = float64(in.Float64())
- case "height":
- out.Height = float64(in.Float64())
- case "scale":
- out.Scale = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage2(out *jwriter.Writer, in Viewport) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"x\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.X))
- }
- {
- const prefix string = ",\"y\":"
- out.RawString(prefix)
- out.Float64(float64(in.Y))
- }
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Float64(float64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Float64(float64(in.Height))
- }
- {
- const prefix string = ",\"scale\":"
- out.RawString(prefix)
- out.Float64(float64(in.Scale))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Viewport) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Viewport) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Viewport) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Viewport) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage3(in *jlexer.Lexer, out *StopScreencastParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage3(out *jwriter.Writer, in StopScreencastParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopScreencastParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopScreencastParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopScreencastParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage4(in *jlexer.Lexer, out *StopLoadingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage4(out *jwriter.Writer, in StopLoadingParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopLoadingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopLoadingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopLoadingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopLoadingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage5(in *jlexer.Lexer, out *StartScreencastParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "format":
- (out.Format).UnmarshalEasyJSON(in)
- case "quality":
- out.Quality = int64(in.Int64())
- case "maxWidth":
- out.MaxWidth = int64(in.Int64())
- case "maxHeight":
- out.MaxHeight = int64(in.Int64())
- case "everyNthFrame":
- out.EveryNthFrame = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage5(out *jwriter.Writer, in StartScreencastParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Format != "" {
- const prefix string = ",\"format\":"
- first = false
- out.RawString(prefix[1:])
- (in.Format).MarshalEasyJSON(out)
- }
- if in.Quality != 0 {
- const prefix string = ",\"quality\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Quality))
- }
- if in.MaxWidth != 0 {
- const prefix string = ",\"maxWidth\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.MaxWidth))
- }
- if in.MaxHeight != 0 {
- const prefix string = ",\"maxHeight\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.MaxHeight))
- }
- if in.EveryNthFrame != 0 {
- const prefix string = ",\"everyNthFrame\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.EveryNthFrame))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartScreencastParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartScreencastParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartScreencastParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartScreencastParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage6(in *jlexer.Lexer, out *SetWebLifecycleStateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "state":
- (out.State).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage6(out *jwriter.Writer, in SetWebLifecycleStateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"state\":"
- out.RawString(prefix[1:])
- (in.State).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetWebLifecycleStateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetWebLifecycleStateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetWebLifecycleStateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetWebLifecycleStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage7(in *jlexer.Lexer, out *SetProduceCompilationCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage7(out *jwriter.Writer, in SetProduceCompilationCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetProduceCompilationCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetProduceCompilationCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetProduceCompilationCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetProduceCompilationCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage8(in *jlexer.Lexer, out *SetLifecycleEventsEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage8(out *jwriter.Writer, in SetLifecycleEventsEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetLifecycleEventsEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetLifecycleEventsEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetLifecycleEventsEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetLifecycleEventsEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage9(in *jlexer.Lexer, out *SetInterceptFileChooserDialogParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage9(out *jwriter.Writer, in SetInterceptFileChooserDialogParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetInterceptFileChooserDialogParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetInterceptFileChooserDialogParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetInterceptFileChooserDialogParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetInterceptFileChooserDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage10(in *jlexer.Lexer, out *SetFontSizesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "fontSizes":
- if in.IsNull() {
- in.Skip()
- out.FontSizes = nil
- } else {
- if out.FontSizes == nil {
- out.FontSizes = new(FontSizes)
- }
- (*out.FontSizes).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage10(out *jwriter.Writer, in SetFontSizesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"fontSizes\":"
- out.RawString(prefix[1:])
- if in.FontSizes == nil {
- out.RawString("null")
- } else {
- (*in.FontSizes).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetFontSizesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetFontSizesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetFontSizesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetFontSizesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage11(in *jlexer.Lexer, out *SetFontFamiliesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "fontFamilies":
- if in.IsNull() {
- in.Skip()
- out.FontFamilies = nil
- } else {
- if out.FontFamilies == nil {
- out.FontFamilies = new(FontFamilies)
- }
- (*out.FontFamilies).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage11(out *jwriter.Writer, in SetFontFamiliesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"fontFamilies\":"
- out.RawString(prefix[1:])
- if in.FontFamilies == nil {
- out.RawString("null")
- } else {
- (*in.FontFamilies).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetFontFamiliesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetFontFamiliesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetFontFamiliesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetFontFamiliesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage12(in *jlexer.Lexer, out *SetDownloadBehaviorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "behavior":
- (out.Behavior).UnmarshalEasyJSON(in)
- case "downloadPath":
- out.DownloadPath = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage12(out *jwriter.Writer, in SetDownloadBehaviorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"behavior\":"
- out.RawString(prefix[1:])
- (in.Behavior).MarshalEasyJSON(out)
- }
- if in.DownloadPath != "" {
- const prefix string = ",\"downloadPath\":"
- out.RawString(prefix)
- out.String(string(in.DownloadPath))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDownloadBehaviorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDownloadBehaviorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDownloadBehaviorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDownloadBehaviorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage13(in *jlexer.Lexer, out *SetDocumentContentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "html":
- out.HTML = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage13(out *jwriter.Writer, in SetDocumentContentParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"html\":"
- out.RawString(prefix)
- out.String(string(in.HTML))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDocumentContentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDocumentContentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDocumentContentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDocumentContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage14(in *jlexer.Lexer, out *SetBypassCSPParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage14(out *jwriter.Writer, in SetBypassCSPParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetBypassCSPParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetBypassCSPParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetBypassCSPParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetBypassCSPParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage15(in *jlexer.Lexer, out *SetAdBlockingEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage15(out *jwriter.Writer, in SetAdBlockingEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAdBlockingEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAdBlockingEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAdBlockingEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAdBlockingEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage16(in *jlexer.Lexer, out *SearchInResourceReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*debugger.SearchMatch, 0, 8)
- } else {
- out.Result = []*debugger.SearchMatch{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *debugger.SearchMatch
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(debugger.SearchMatch)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage16(out *jwriter.Writer, in SearchInResourceReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.Result {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInResourceReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInResourceReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInResourceReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInResourceReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage17(in *jlexer.Lexer, out *SearchInResourceParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "query":
- out.Query = string(in.String())
- case "caseSensitive":
- out.CaseSensitive = bool(in.Bool())
- case "isRegex":
- out.IsRegex = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage17(out *jwriter.Writer, in SearchInResourceParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"query\":"
- out.RawString(prefix)
- out.String(string(in.Query))
- }
- if in.CaseSensitive {
- const prefix string = ",\"caseSensitive\":"
- out.RawString(prefix)
- out.Bool(bool(in.CaseSensitive))
- }
- if in.IsRegex {
- const prefix string = ",\"isRegex\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsRegex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SearchInResourceParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SearchInResourceParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SearchInResourceParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SearchInResourceParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage18(in *jlexer.Lexer, out *ScreencastFrameMetadata) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "offsetTop":
- out.OffsetTop = float64(in.Float64())
- case "pageScaleFactor":
- out.PageScaleFactor = float64(in.Float64())
- case "deviceWidth":
- out.DeviceWidth = float64(in.Float64())
- case "deviceHeight":
- out.DeviceHeight = float64(in.Float64())
- case "scrollOffsetX":
- out.ScrollOffsetX = float64(in.Float64())
- case "scrollOffsetY":
- out.ScrollOffsetY = float64(in.Float64())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.TimeSinceEpoch)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage18(out *jwriter.Writer, in ScreencastFrameMetadata) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"offsetTop\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.OffsetTop))
- }
- {
- const prefix string = ",\"pageScaleFactor\":"
- out.RawString(prefix)
- out.Float64(float64(in.PageScaleFactor))
- }
- {
- const prefix string = ",\"deviceWidth\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeviceWidth))
- }
- {
- const prefix string = ",\"deviceHeight\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeviceHeight))
- }
- {
- const prefix string = ",\"scrollOffsetX\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetX))
- }
- {
- const prefix string = ",\"scrollOffsetY\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScrollOffsetY))
- }
- if in.Timestamp != nil {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScreencastFrameMetadata) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScreencastFrameMetadata) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScreencastFrameMetadata) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScreencastFrameMetadata) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage19(in *jlexer.Lexer, out *ScreencastFrameAckParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage19(out *jwriter.Writer, in ScreencastFrameAckParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sessionId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScreencastFrameAckParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScreencastFrameAckParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScreencastFrameAckParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScreencastFrameAckParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage20(in *jlexer.Lexer, out *ResetNavigationHistoryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage20(out *jwriter.Writer, in ResetNavigationHistoryParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ResetNavigationHistoryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ResetNavigationHistoryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ResetNavigationHistoryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ResetNavigationHistoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage21(in *jlexer.Lexer, out *RemoveScriptToEvaluateOnNewDocumentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "identifier":
- out.Identifier = ScriptIdentifier(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage21(out *jwriter.Writer, in RemoveScriptToEvaluateOnNewDocumentParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"identifier\":"
- out.RawString(prefix[1:])
- out.String(string(in.Identifier))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveScriptToEvaluateOnNewDocumentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveScriptToEvaluateOnNewDocumentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveScriptToEvaluateOnNewDocumentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveScriptToEvaluateOnNewDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage22(in *jlexer.Lexer, out *ReloadParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "ignoreCache":
- out.IgnoreCache = bool(in.Bool())
- case "scriptToEvaluateOnLoad":
- out.ScriptToEvaluateOnLoad = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage22(out *jwriter.Writer, in ReloadParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.IgnoreCache {
- const prefix string = ",\"ignoreCache\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.IgnoreCache))
- }
- if in.ScriptToEvaluateOnLoad != "" {
- const prefix string = ",\"scriptToEvaluateOnLoad\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ScriptToEvaluateOnLoad))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReloadParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReloadParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReloadParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReloadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage23(in *jlexer.Lexer, out *ProduceCompilationCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scripts":
- if in.IsNull() {
- in.Skip()
- out.Scripts = nil
- } else {
- in.Delim('[')
- if out.Scripts == nil {
- if !in.IsDelim(']') {
- out.Scripts = make([]*CompilationCacheParams, 0, 8)
- } else {
- out.Scripts = []*CompilationCacheParams{}
- }
- } else {
- out.Scripts = (out.Scripts)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *CompilationCacheParams
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(CompilationCacheParams)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Scripts = append(out.Scripts, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage23(out *jwriter.Writer, in ProduceCompilationCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scripts\":"
- out.RawString(prefix[1:])
- if in.Scripts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Scripts {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ProduceCompilationCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ProduceCompilationCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ProduceCompilationCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ProduceCompilationCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage24(in *jlexer.Lexer, out *PrintToPDFReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "data":
- out.Data = string(in.String())
- case "stream":
- out.Stream = io.StreamHandle(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage24(out *jwriter.Writer, in PrintToPDFReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Data != "" {
- const prefix string = ",\"data\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Data))
- }
- if in.Stream != "" {
- const prefix string = ",\"stream\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Stream))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PrintToPDFReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PrintToPDFReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PrintToPDFReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PrintToPDFReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage25(in *jlexer.Lexer, out *PrintToPDFParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "landscape":
- out.Landscape = bool(in.Bool())
- case "displayHeaderFooter":
- out.DisplayHeaderFooter = bool(in.Bool())
- case "printBackground":
- out.PrintBackground = bool(in.Bool())
- case "scale":
- out.Scale = float64(in.Float64())
- case "paperWidth":
- out.PaperWidth = float64(in.Float64())
- case "paperHeight":
- out.PaperHeight = float64(in.Float64())
- case "marginTop":
- out.MarginTop = float64(in.Float64())
- case "marginBottom":
- out.MarginBottom = float64(in.Float64())
- case "marginLeft":
- out.MarginLeft = float64(in.Float64())
- case "marginRight":
- out.MarginRight = float64(in.Float64())
- case "pageRanges":
- out.PageRanges = string(in.String())
- case "ignoreInvalidPageRanges":
- out.IgnoreInvalidPageRanges = bool(in.Bool())
- case "headerTemplate":
- out.HeaderTemplate = string(in.String())
- case "footerTemplate":
- out.FooterTemplate = string(in.String())
- case "preferCSSPageSize":
- out.PreferCSSPageSize = bool(in.Bool())
- case "transferMode":
- (out.TransferMode).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage25(out *jwriter.Writer, in PrintToPDFParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Landscape {
- const prefix string = ",\"landscape\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.Landscape))
- }
- if in.DisplayHeaderFooter {
- const prefix string = ",\"displayHeaderFooter\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.DisplayHeaderFooter))
- }
- if in.PrintBackground {
- const prefix string = ",\"printBackground\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.PrintBackground))
- }
- if in.Scale != 0 {
- const prefix string = ",\"scale\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Scale))
- }
- if in.PaperWidth != 0 {
- const prefix string = ",\"paperWidth\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.PaperWidth))
- }
- if in.PaperHeight != 0 {
- const prefix string = ",\"paperHeight\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.PaperHeight))
- }
- {
- const prefix string = ",\"marginTop\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.MarginTop))
- }
- {
- const prefix string = ",\"marginBottom\":"
- out.RawString(prefix)
- out.Float64(float64(in.MarginBottom))
- }
- {
- const prefix string = ",\"marginLeft\":"
- out.RawString(prefix)
- out.Float64(float64(in.MarginLeft))
- }
- {
- const prefix string = ",\"marginRight\":"
- out.RawString(prefix)
- out.Float64(float64(in.MarginRight))
- }
- if in.PageRanges != "" {
- const prefix string = ",\"pageRanges\":"
- out.RawString(prefix)
- out.String(string(in.PageRanges))
- }
- if in.IgnoreInvalidPageRanges {
- const prefix string = ",\"ignoreInvalidPageRanges\":"
- out.RawString(prefix)
- out.Bool(bool(in.IgnoreInvalidPageRanges))
- }
- if in.HeaderTemplate != "" {
- const prefix string = ",\"headerTemplate\":"
- out.RawString(prefix)
- out.String(string(in.HeaderTemplate))
- }
- if in.FooterTemplate != "" {
- const prefix string = ",\"footerTemplate\":"
- out.RawString(prefix)
- out.String(string(in.FooterTemplate))
- }
- if in.PreferCSSPageSize {
- const prefix string = ",\"preferCSSPageSize\":"
- out.RawString(prefix)
- out.Bool(bool(in.PreferCSSPageSize))
- }
- if in.TransferMode != "" {
- const prefix string = ",\"transferMode\":"
- out.RawString(prefix)
- (in.TransferMode).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PrintToPDFParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PrintToPDFParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PrintToPDFParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PrintToPDFParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage26(in *jlexer.Lexer, out *PermissionsPolicyFeatureState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "feature":
- (out.Feature).UnmarshalEasyJSON(in)
- case "allowed":
- out.Allowed = bool(in.Bool())
- case "locator":
- if in.IsNull() {
- in.Skip()
- out.Locator = nil
- } else {
- if out.Locator == nil {
- out.Locator = new(PermissionsPolicyBlockLocator)
- }
- (*out.Locator).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage26(out *jwriter.Writer, in PermissionsPolicyFeatureState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"feature\":"
- out.RawString(prefix[1:])
- (in.Feature).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"allowed\":"
- out.RawString(prefix)
- out.Bool(bool(in.Allowed))
- }
- if in.Locator != nil {
- const prefix string = ",\"locator\":"
- out.RawString(prefix)
- (*in.Locator).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PermissionsPolicyFeatureState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PermissionsPolicyFeatureState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PermissionsPolicyFeatureState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PermissionsPolicyFeatureState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage27(in *jlexer.Lexer, out *PermissionsPolicyBlockLocator) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "blockReason":
- (out.BlockReason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage27(out *jwriter.Writer, in PermissionsPolicyBlockLocator) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"blockReason\":"
- out.RawString(prefix)
- (in.BlockReason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PermissionsPolicyBlockLocator) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PermissionsPolicyBlockLocator) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PermissionsPolicyBlockLocator) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PermissionsPolicyBlockLocator) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage28(in *jlexer.Lexer, out *NavigationEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = int64(in.Int64())
- case "url":
- out.URL = string(in.String())
- case "userTypedURL":
- out.UserTypedURL = string(in.String())
- case "title":
- out.Title = string(in.String())
- case "transitionType":
- (out.TransitionType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage28(out *jwriter.Writer, in NavigationEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"userTypedURL\":"
- out.RawString(prefix)
- out.String(string(in.UserTypedURL))
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- {
- const prefix string = ",\"transitionType\":"
- out.RawString(prefix)
- (in.TransitionType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NavigationEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NavigationEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NavigationEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NavigationEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage29(in *jlexer.Lexer, out *NavigateToHistoryEntryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "entryId":
- out.EntryID = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage29(out *jwriter.Writer, in NavigateToHistoryEntryParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"entryId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.EntryID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NavigateToHistoryEntryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NavigateToHistoryEntryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NavigateToHistoryEntryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NavigateToHistoryEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage30(in *jlexer.Lexer, out *NavigateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "errorText":
- out.ErrorText = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage30(out *jwriter.Writer, in NavigateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- if in.LoaderID != "" {
- const prefix string = ",\"loaderId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.LoaderID))
- }
- if in.ErrorText != "" {
- const prefix string = ",\"errorText\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ErrorText))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NavigateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NavigateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NavigateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NavigateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage31(in *jlexer.Lexer, out *NavigateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "referrer":
- out.Referrer = string(in.String())
- case "transitionType":
- (out.TransitionType).UnmarshalEasyJSON(in)
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "referrerPolicy":
- (out.ReferrerPolicy).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage31(out *jwriter.Writer, in NavigateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if in.Referrer != "" {
- const prefix string = ",\"referrer\":"
- out.RawString(prefix)
- out.String(string(in.Referrer))
- }
- if in.TransitionType != "" {
- const prefix string = ",\"transitionType\":"
- out.RawString(prefix)
- (in.TransitionType).MarshalEasyJSON(out)
- }
- if in.FrameID != "" {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- if in.ReferrerPolicy != "" {
- const prefix string = ",\"referrerPolicy\":"
- out.RawString(prefix)
- (in.ReferrerPolicy).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v NavigateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v NavigateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *NavigateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *NavigateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage32(in *jlexer.Lexer, out *LayoutViewport) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "pageX":
- out.PageX = int64(in.Int64())
- case "pageY":
- out.PageY = int64(in.Int64())
- case "clientWidth":
- out.ClientWidth = int64(in.Int64())
- case "clientHeight":
- out.ClientHeight = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage32(out *jwriter.Writer, in LayoutViewport) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"pageX\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.PageX))
- }
- {
- const prefix string = ",\"pageY\":"
- out.RawString(prefix)
- out.Int64(int64(in.PageY))
- }
- {
- const prefix string = ",\"clientWidth\":"
- out.RawString(prefix)
- out.Int64(int64(in.ClientWidth))
- }
- {
- const prefix string = ",\"clientHeight\":"
- out.RawString(prefix)
- out.Int64(int64(in.ClientHeight))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LayoutViewport) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LayoutViewport) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LayoutViewport) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LayoutViewport) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage33(in *jlexer.Lexer, out *InstallabilityErrorArgument) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage33(out *jwriter.Writer, in InstallabilityErrorArgument) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InstallabilityErrorArgument) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InstallabilityErrorArgument) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InstallabilityErrorArgument) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InstallabilityErrorArgument) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage34(in *jlexer.Lexer, out *InstallabilityError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "errorId":
- out.ErrorID = string(in.String())
- case "errorArguments":
- if in.IsNull() {
- in.Skip()
- out.ErrorArguments = nil
- } else {
- in.Delim('[')
- if out.ErrorArguments == nil {
- if !in.IsDelim(']') {
- out.ErrorArguments = make([]*InstallabilityErrorArgument, 0, 8)
- } else {
- out.ErrorArguments = []*InstallabilityErrorArgument{}
- }
- } else {
- out.ErrorArguments = (out.ErrorArguments)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *InstallabilityErrorArgument
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(InstallabilityErrorArgument)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.ErrorArguments = append(out.ErrorArguments, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage34(out *jwriter.Writer, in InstallabilityError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"errorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ErrorID))
- }
- {
- const prefix string = ",\"errorArguments\":"
- out.RawString(prefix)
- if in.ErrorArguments == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.ErrorArguments {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InstallabilityError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InstallabilityError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InstallabilityError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InstallabilityError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage35(in *jlexer.Lexer, out *HandleJavaScriptDialogParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "accept":
- out.Accept = bool(in.Bool())
- case "promptText":
- out.PromptText = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage35(out *jwriter.Writer, in HandleJavaScriptDialogParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"accept\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Accept))
- }
- if in.PromptText != "" {
- const prefix string = ",\"promptText\":"
- out.RawString(prefix)
- out.String(string(in.PromptText))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v HandleJavaScriptDialogParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v HandleJavaScriptDialogParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *HandleJavaScriptDialogParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *HandleJavaScriptDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage36(in *jlexer.Lexer, out *GetResourceTreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameTree":
- if in.IsNull() {
- in.Skip()
- out.FrameTree = nil
- } else {
- if out.FrameTree == nil {
- out.FrameTree = new(FrameResourceTree)
- }
- (*out.FrameTree).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage36(out *jwriter.Writer, in GetResourceTreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FrameTree != nil {
- const prefix string = ",\"frameTree\":"
- first = false
- out.RawString(prefix[1:])
- (*in.FrameTree).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResourceTreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResourceTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResourceTreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResourceTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage37(in *jlexer.Lexer, out *GetResourceTreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage37(out *jwriter.Writer, in GetResourceTreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResourceTreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResourceTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResourceTreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResourceTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage38(in *jlexer.Lexer, out *GetResourceContentReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "content":
- out.Content = string(in.String())
- case "base64Encoded":
- out.Base64encoded = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage38(out *jwriter.Writer, in GetResourceContentReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Content != "" {
- const prefix string = ",\"content\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Content))
- }
- if in.Base64encoded {
- const prefix string = ",\"base64Encoded\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Base64encoded))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResourceContentReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResourceContentReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResourceContentReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResourceContentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage39(in *jlexer.Lexer, out *GetResourceContentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage39(out *jwriter.Writer, in GetResourceContentParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetResourceContentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetResourceContentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetResourceContentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetResourceContentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage40(in *jlexer.Lexer, out *GetPermissionsPolicyStateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "states":
- if in.IsNull() {
- in.Skip()
- out.States = nil
- } else {
- in.Delim('[')
- if out.States == nil {
- if !in.IsDelim(']') {
- out.States = make([]*PermissionsPolicyFeatureState, 0, 8)
- } else {
- out.States = []*PermissionsPolicyFeatureState{}
- }
- } else {
- out.States = (out.States)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *PermissionsPolicyFeatureState
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(PermissionsPolicyFeatureState)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.States = append(out.States, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage40(out *jwriter.Writer, in GetPermissionsPolicyStateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.States) != 0 {
- const prefix string = ",\"states\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v11, v12 := range in.States {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPermissionsPolicyStateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPermissionsPolicyStateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPermissionsPolicyStateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPermissionsPolicyStateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage41(in *jlexer.Lexer, out *GetPermissionsPolicyStateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage41(out *jwriter.Writer, in GetPermissionsPolicyStateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPermissionsPolicyStateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPermissionsPolicyStateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPermissionsPolicyStateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPermissionsPolicyStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage42(in *jlexer.Lexer, out *GetNavigationHistoryReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "currentIndex":
- out.CurrentIndex = int64(in.Int64())
- case "entries":
- if in.IsNull() {
- in.Skip()
- out.Entries = nil
- } else {
- in.Delim('[')
- if out.Entries == nil {
- if !in.IsDelim(']') {
- out.Entries = make([]*NavigationEntry, 0, 8)
- } else {
- out.Entries = []*NavigationEntry{}
- }
- } else {
- out.Entries = (out.Entries)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *NavigationEntry
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(NavigationEntry)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Entries = append(out.Entries, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage42(out *jwriter.Writer, in GetNavigationHistoryReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.CurrentIndex != 0 {
- const prefix string = ",\"currentIndex\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.CurrentIndex))
- }
- if len(in.Entries) != 0 {
- const prefix string = ",\"entries\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v14, v15 := range in.Entries {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNavigationHistoryReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNavigationHistoryReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNavigationHistoryReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNavigationHistoryReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage43(in *jlexer.Lexer, out *GetNavigationHistoryParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage43(out *jwriter.Writer, in GetNavigationHistoryParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetNavigationHistoryParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetNavigationHistoryParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetNavigationHistoryParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetNavigationHistoryParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage44(in *jlexer.Lexer, out *GetManifestIconsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "primaryIcon":
- out.PrimaryIcon = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage44(out *jwriter.Writer, in GetManifestIconsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.PrimaryIcon != "" {
- const prefix string = ",\"primaryIcon\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.PrimaryIcon))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetManifestIconsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetManifestIconsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetManifestIconsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetManifestIconsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage45(in *jlexer.Lexer, out *GetManifestIconsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage45(out *jwriter.Writer, in GetManifestIconsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetManifestIconsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetManifestIconsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetManifestIconsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetManifestIconsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage46(in *jlexer.Lexer, out *GetLayoutMetricsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "layoutViewport":
- if in.IsNull() {
- in.Skip()
- out.LayoutViewport = nil
- } else {
- if out.LayoutViewport == nil {
- out.LayoutViewport = new(LayoutViewport)
- }
- (*out.LayoutViewport).UnmarshalEasyJSON(in)
- }
- case "visualViewport":
- if in.IsNull() {
- in.Skip()
- out.VisualViewport = nil
- } else {
- if out.VisualViewport == nil {
- out.VisualViewport = new(VisualViewport)
- }
- (*out.VisualViewport).UnmarshalEasyJSON(in)
- }
- case "contentSize":
- if in.IsNull() {
- in.Skip()
- out.ContentSize = nil
- } else {
- if out.ContentSize == nil {
- out.ContentSize = new(dom.Rect)
- }
- (*out.ContentSize).UnmarshalEasyJSON(in)
- }
- case "cssLayoutViewport":
- if in.IsNull() {
- in.Skip()
- out.CSSLayoutViewport = nil
- } else {
- if out.CSSLayoutViewport == nil {
- out.CSSLayoutViewport = new(LayoutViewport)
- }
- (*out.CSSLayoutViewport).UnmarshalEasyJSON(in)
- }
- case "cssVisualViewport":
- if in.IsNull() {
- in.Skip()
- out.CSSVisualViewport = nil
- } else {
- if out.CSSVisualViewport == nil {
- out.CSSVisualViewport = new(VisualViewport)
- }
- (*out.CSSVisualViewport).UnmarshalEasyJSON(in)
- }
- case "cssContentSize":
- if in.IsNull() {
- in.Skip()
- out.CSSContentSize = nil
- } else {
- if out.CSSContentSize == nil {
- out.CSSContentSize = new(dom.Rect)
- }
- (*out.CSSContentSize).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage46(out *jwriter.Writer, in GetLayoutMetricsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"layoutViewport\":"
- out.RawString(prefix[1:])
- if in.LayoutViewport == nil {
- out.RawString("null")
- } else {
- (*in.LayoutViewport).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"visualViewport\":"
- out.RawString(prefix)
- if in.VisualViewport == nil {
- out.RawString("null")
- } else {
- (*in.VisualViewport).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"contentSize\":"
- out.RawString(prefix)
- if in.ContentSize == nil {
- out.RawString("null")
- } else {
- (*in.ContentSize).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"cssLayoutViewport\":"
- out.RawString(prefix)
- if in.CSSLayoutViewport == nil {
- out.RawString("null")
- } else {
- (*in.CSSLayoutViewport).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"cssVisualViewport\":"
- out.RawString(prefix)
- if in.CSSVisualViewport == nil {
- out.RawString("null")
- } else {
- (*in.CSSVisualViewport).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"cssContentSize\":"
- out.RawString(prefix)
- if in.CSSContentSize == nil {
- out.RawString("null")
- } else {
- (*in.CSSContentSize).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetLayoutMetricsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetLayoutMetricsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetLayoutMetricsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetLayoutMetricsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage47(in *jlexer.Lexer, out *GetLayoutMetricsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage47(out *jwriter.Writer, in GetLayoutMetricsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetLayoutMetricsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetLayoutMetricsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetLayoutMetricsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetLayoutMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage48(in *jlexer.Lexer, out *GetInstallabilityErrorsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "installabilityErrors":
- if in.IsNull() {
- in.Skip()
- out.InstallabilityErrors = nil
- } else {
- in.Delim('[')
- if out.InstallabilityErrors == nil {
- if !in.IsDelim(']') {
- out.InstallabilityErrors = make([]*InstallabilityError, 0, 8)
- } else {
- out.InstallabilityErrors = []*InstallabilityError{}
- }
- } else {
- out.InstallabilityErrors = (out.InstallabilityErrors)[:0]
- }
- for !in.IsDelim(']') {
- var v16 *InstallabilityError
- if in.IsNull() {
- in.Skip()
- v16 = nil
- } else {
- if v16 == nil {
- v16 = new(InstallabilityError)
- }
- (*v16).UnmarshalEasyJSON(in)
- }
- out.InstallabilityErrors = append(out.InstallabilityErrors, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage48(out *jwriter.Writer, in GetInstallabilityErrorsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.InstallabilityErrors) != 0 {
- const prefix string = ",\"installabilityErrors\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v17, v18 := range in.InstallabilityErrors {
- if v17 > 0 {
- out.RawByte(',')
- }
- if v18 == nil {
- out.RawString("null")
- } else {
- (*v18).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInstallabilityErrorsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInstallabilityErrorsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInstallabilityErrorsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInstallabilityErrorsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage49(in *jlexer.Lexer, out *GetInstallabilityErrorsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage49(out *jwriter.Writer, in GetInstallabilityErrorsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInstallabilityErrorsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInstallabilityErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInstallabilityErrorsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInstallabilityErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage50(in *jlexer.Lexer, out *GetFrameTreeReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameTree":
- if in.IsNull() {
- in.Skip()
- out.FrameTree = nil
- } else {
- if out.FrameTree == nil {
- out.FrameTree = new(FrameTree)
- }
- (*out.FrameTree).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage50(out *jwriter.Writer, in GetFrameTreeReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.FrameTree != nil {
- const prefix string = ",\"frameTree\":"
- first = false
- out.RawString(prefix[1:])
- (*in.FrameTree).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFrameTreeReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFrameTreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFrameTreeReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFrameTreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage50(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage51(in *jlexer.Lexer, out *GetFrameTreeParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage51(out *jwriter.Writer, in GetFrameTreeParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetFrameTreeParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage51(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetFrameTreeParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage51(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetFrameTreeParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage51(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetFrameTreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage51(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage52(in *jlexer.Lexer, out *GetAppManifestReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "errors":
- if in.IsNull() {
- in.Skip()
- out.Errors = nil
- } else {
- in.Delim('[')
- if out.Errors == nil {
- if !in.IsDelim(']') {
- out.Errors = make([]*AppManifestError, 0, 8)
- } else {
- out.Errors = []*AppManifestError{}
- }
- } else {
- out.Errors = (out.Errors)[:0]
- }
- for !in.IsDelim(']') {
- var v19 *AppManifestError
- if in.IsNull() {
- in.Skip()
- v19 = nil
- } else {
- if v19 == nil {
- v19 = new(AppManifestError)
- }
- (*v19).UnmarshalEasyJSON(in)
- }
- out.Errors = append(out.Errors, v19)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "data":
- out.Data = string(in.String())
- case "parsed":
- if in.IsNull() {
- in.Skip()
- out.Parsed = nil
- } else {
- if out.Parsed == nil {
- out.Parsed = new(AppManifestParsedProperties)
- }
- (*out.Parsed).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage52(out *jwriter.Writer, in GetAppManifestReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.URL != "" {
- const prefix string = ",\"url\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if len(in.Errors) != 0 {
- const prefix string = ",\"errors\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v20, v21 := range in.Errors {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Data != "" {
- const prefix string = ",\"data\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Data))
- }
- if in.Parsed != nil {
- const prefix string = ",\"parsed\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Parsed).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAppManifestReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage52(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAppManifestReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage52(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAppManifestReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage52(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAppManifestReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage52(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage53(in *jlexer.Lexer, out *GetAppManifestParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage53(out *jwriter.Writer, in GetAppManifestParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetAppManifestParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage53(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetAppManifestParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage53(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetAppManifestParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage53(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetAppManifestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage53(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage54(in *jlexer.Lexer, out *GenerateTestReportParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "message":
- out.Message = string(in.String())
- case "group":
- out.Group = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage54(out *jwriter.Writer, in GenerateTestReportParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix[1:])
- out.String(string(in.Message))
- }
- if in.Group != "" {
- const prefix string = ",\"group\":"
- out.RawString(prefix)
- out.String(string(in.Group))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GenerateTestReportParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage54(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GenerateTestReportParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage54(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GenerateTestReportParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage54(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GenerateTestReportParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage54(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage55(in *jlexer.Lexer, out *FrameTree) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(cdp.Frame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- case "childFrames":
- if in.IsNull() {
- in.Skip()
- out.ChildFrames = nil
- } else {
- in.Delim('[')
- if out.ChildFrames == nil {
- if !in.IsDelim(']') {
- out.ChildFrames = make([]*FrameTree, 0, 8)
- } else {
- out.ChildFrames = []*FrameTree{}
- }
- } else {
- out.ChildFrames = (out.ChildFrames)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *FrameTree
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(FrameTree)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.ChildFrames = append(out.ChildFrames, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage55(out *jwriter.Writer, in FrameTree) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frame\":"
- out.RawString(prefix[1:])
- if in.Frame == nil {
- out.RawString("null")
- } else {
- (*in.Frame).MarshalEasyJSON(out)
- }
- }
- if len(in.ChildFrames) != 0 {
- const prefix string = ",\"childFrames\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v23, v24 := range in.ChildFrames {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FrameTree) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage55(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FrameTree) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage55(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FrameTree) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage55(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FrameTree) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage55(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage56(in *jlexer.Lexer, out *FrameResourceTree) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(cdp.Frame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- case "childFrames":
- if in.IsNull() {
- in.Skip()
- out.ChildFrames = nil
- } else {
- in.Delim('[')
- if out.ChildFrames == nil {
- if !in.IsDelim(']') {
- out.ChildFrames = make([]*FrameResourceTree, 0, 8)
- } else {
- out.ChildFrames = []*FrameResourceTree{}
- }
- } else {
- out.ChildFrames = (out.ChildFrames)[:0]
- }
- for !in.IsDelim(']') {
- var v25 *FrameResourceTree
- if in.IsNull() {
- in.Skip()
- v25 = nil
- } else {
- if v25 == nil {
- v25 = new(FrameResourceTree)
- }
- (*v25).UnmarshalEasyJSON(in)
- }
- out.ChildFrames = append(out.ChildFrames, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "resources":
- if in.IsNull() {
- in.Skip()
- out.Resources = nil
- } else {
- in.Delim('[')
- if out.Resources == nil {
- if !in.IsDelim(']') {
- out.Resources = make([]*FrameResource, 0, 8)
- } else {
- out.Resources = []*FrameResource{}
- }
- } else {
- out.Resources = (out.Resources)[:0]
- }
- for !in.IsDelim(']') {
- var v26 *FrameResource
- if in.IsNull() {
- in.Skip()
- v26 = nil
- } else {
- if v26 == nil {
- v26 = new(FrameResource)
- }
- (*v26).UnmarshalEasyJSON(in)
- }
- out.Resources = append(out.Resources, v26)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage56(out *jwriter.Writer, in FrameResourceTree) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frame\":"
- out.RawString(prefix[1:])
- if in.Frame == nil {
- out.RawString("null")
- } else {
- (*in.Frame).MarshalEasyJSON(out)
- }
- }
- if len(in.ChildFrames) != 0 {
- const prefix string = ",\"childFrames\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v27, v28 := range in.ChildFrames {
- if v27 > 0 {
- out.RawByte(',')
- }
- if v28 == nil {
- out.RawString("null")
- } else {
- (*v28).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"resources\":"
- out.RawString(prefix)
- if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v29, v30 := range in.Resources {
- if v29 > 0 {
- out.RawByte(',')
- }
- if v30 == nil {
- out.RawString("null")
- } else {
- (*v30).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FrameResourceTree) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage56(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FrameResourceTree) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage56(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FrameResourceTree) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage56(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FrameResourceTree) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage56(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage57(in *jlexer.Lexer, out *FrameResource) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "mimeType":
- out.MimeType = string(in.String())
- case "lastModified":
- if in.IsNull() {
- in.Skip()
- out.LastModified = nil
- } else {
- if out.LastModified == nil {
- out.LastModified = new(cdp.TimeSinceEpoch)
- }
- (*out.LastModified).UnmarshalEasyJSON(in)
- }
- case "contentSize":
- out.ContentSize = float64(in.Float64())
- case "failed":
- out.Failed = bool(in.Bool())
- case "canceled":
- out.Canceled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage57(out *jwriter.Writer, in FrameResource) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"mimeType\":"
- out.RawString(prefix)
- out.String(string(in.MimeType))
- }
- if in.LastModified != nil {
- const prefix string = ",\"lastModified\":"
- out.RawString(prefix)
- (*in.LastModified).MarshalEasyJSON(out)
- }
- if in.ContentSize != 0 {
- const prefix string = ",\"contentSize\":"
- out.RawString(prefix)
- out.Float64(float64(in.ContentSize))
- }
- if in.Failed {
- const prefix string = ",\"failed\":"
- out.RawString(prefix)
- out.Bool(bool(in.Failed))
- }
- if in.Canceled {
- const prefix string = ",\"canceled\":"
- out.RawString(prefix)
- out.Bool(bool(in.Canceled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FrameResource) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage57(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FrameResource) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage57(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FrameResource) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage57(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FrameResource) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage57(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage58(in *jlexer.Lexer, out *FontSizes) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "standard":
- out.Standard = int64(in.Int64())
- case "fixed":
- out.Fixed = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage58(out *jwriter.Writer, in FontSizes) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Standard != 0 {
- const prefix string = ",\"standard\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.Standard))
- }
- if in.Fixed != 0 {
- const prefix string = ",\"fixed\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Fixed))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FontSizes) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage58(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FontSizes) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage58(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FontSizes) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage58(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FontSizes) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage58(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage59(in *jlexer.Lexer, out *FontFamilies) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "standard":
- out.Standard = string(in.String())
- case "fixed":
- out.Fixed = string(in.String())
- case "serif":
- out.Serif = string(in.String())
- case "sansSerif":
- out.SansSerif = string(in.String())
- case "cursive":
- out.Cursive = string(in.String())
- case "fantasy":
- out.Fantasy = string(in.String())
- case "pictograph":
- out.Pictograph = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage59(out *jwriter.Writer, in FontFamilies) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Standard != "" {
- const prefix string = ",\"standard\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Standard))
- }
- if in.Fixed != "" {
- const prefix string = ",\"fixed\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Fixed))
- }
- if in.Serif != "" {
- const prefix string = ",\"serif\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Serif))
- }
- if in.SansSerif != "" {
- const prefix string = ",\"sansSerif\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.SansSerif))
- }
- if in.Cursive != "" {
- const prefix string = ",\"cursive\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Cursive))
- }
- if in.Fantasy != "" {
- const prefix string = ",\"fantasy\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Fantasy))
- }
- if in.Pictograph != "" {
- const prefix string = ",\"pictograph\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.Pictograph))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FontFamilies) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage59(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FontFamilies) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage59(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FontFamilies) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage59(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FontFamilies) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage59(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage60(in *jlexer.Lexer, out *EventWindowOpen) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "windowName":
- out.WindowName = string(in.String())
- case "windowFeatures":
- if in.IsNull() {
- in.Skip()
- out.WindowFeatures = nil
- } else {
- in.Delim('[')
- if out.WindowFeatures == nil {
- if !in.IsDelim(']') {
- out.WindowFeatures = make([]string, 0, 4)
- } else {
- out.WindowFeatures = []string{}
- }
- } else {
- out.WindowFeatures = (out.WindowFeatures)[:0]
- }
- for !in.IsDelim(']') {
- var v31 string
- v31 = string(in.String())
- out.WindowFeatures = append(out.WindowFeatures, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "userGesture":
- out.UserGesture = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage60(out *jwriter.Writer, in EventWindowOpen) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"windowName\":"
- out.RawString(prefix)
- out.String(string(in.WindowName))
- }
- {
- const prefix string = ",\"windowFeatures\":"
- out.RawString(prefix)
- if in.WindowFeatures == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v32, v33 := range in.WindowFeatures {
- if v32 > 0 {
- out.RawByte(',')
- }
- out.String(string(v33))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"userGesture\":"
- out.RawString(prefix)
- out.Bool(bool(in.UserGesture))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWindowOpen) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage60(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWindowOpen) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage60(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWindowOpen) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage60(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWindowOpen) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage60(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage61(in *jlexer.Lexer, out *EventScreencastVisibilityChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "visible":
- out.Visible = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage61(out *jwriter.Writer, in EventScreencastVisibilityChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"visible\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Visible))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventScreencastVisibilityChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage61(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventScreencastVisibilityChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage61(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventScreencastVisibilityChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage61(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventScreencastVisibilityChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage61(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage62(in *jlexer.Lexer, out *EventScreencastFrame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "data":
- out.Data = string(in.String())
- case "metadata":
- if in.IsNull() {
- in.Skip()
- out.Metadata = nil
- } else {
- if out.Metadata == nil {
- out.Metadata = new(ScreencastFrameMetadata)
- }
- (*out.Metadata).UnmarshalEasyJSON(in)
- }
- case "sessionId":
- out.SessionID = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage62(out *jwriter.Writer, in EventScreencastFrame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix[1:])
- out.String(string(in.Data))
- }
- {
- const prefix string = ",\"metadata\":"
- out.RawString(prefix)
- if in.Metadata == nil {
- out.RawString("null")
- } else {
- (*in.Metadata).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"sessionId\":"
- out.RawString(prefix)
- out.Int64(int64(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventScreencastFrame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage62(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventScreencastFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage62(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventScreencastFrame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage62(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventScreencastFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage62(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage63(in *jlexer.Lexer, out *EventNavigatedWithinDocument) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage63(out *jwriter.Writer, in EventNavigatedWithinDocument) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNavigatedWithinDocument) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage63(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNavigatedWithinDocument) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage63(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNavigatedWithinDocument) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage63(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNavigatedWithinDocument) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage63(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage64(in *jlexer.Lexer, out *EventLoadEventFired) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage64(out *jwriter.Writer, in EventLoadEventFired) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLoadEventFired) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage64(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLoadEventFired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage64(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLoadEventFired) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage64(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLoadEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage64(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage65(in *jlexer.Lexer, out *EventLifecycleEvent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "name":
- out.Name = string(in.String())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage65(out *jwriter.Writer, in EventLifecycleEvent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventLifecycleEvent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage65(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventLifecycleEvent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage65(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventLifecycleEvent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage65(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventLifecycleEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage65(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage66(in *jlexer.Lexer, out *EventJavascriptDialogOpening) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "message":
- out.Message = string(in.String())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "hasBrowserHandler":
- out.HasBrowserHandler = bool(in.Bool())
- case "defaultPrompt":
- out.DefaultPrompt = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage66(out *jwriter.Writer, in EventJavascriptDialogOpening) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix)
- out.String(string(in.Message))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"hasBrowserHandler\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasBrowserHandler))
- }
- if in.DefaultPrompt != "" {
- const prefix string = ",\"defaultPrompt\":"
- out.RawString(prefix)
- out.String(string(in.DefaultPrompt))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventJavascriptDialogOpening) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage66(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventJavascriptDialogOpening) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage66(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventJavascriptDialogOpening) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage66(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventJavascriptDialogOpening) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage66(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage67(in *jlexer.Lexer, out *EventJavascriptDialogClosed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- out.Result = bool(in.Bool())
- case "userInput":
- out.UserInput = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage67(out *jwriter.Writer, in EventJavascriptDialogClosed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"result\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Result))
- }
- {
- const prefix string = ",\"userInput\":"
- out.RawString(prefix)
- out.String(string(in.UserInput))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventJavascriptDialogClosed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage67(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventJavascriptDialogClosed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage67(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventJavascriptDialogClosed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage67(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventJavascriptDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage67(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage68(in *jlexer.Lexer, out *EventInterstitialShown) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage68(out *jwriter.Writer, in EventInterstitialShown) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInterstitialShown) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage68(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInterstitialShown) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage68(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInterstitialShown) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage68(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInterstitialShown) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage68(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage69(in *jlexer.Lexer, out *EventInterstitialHidden) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage69(out *jwriter.Writer, in EventInterstitialHidden) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInterstitialHidden) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage69(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInterstitialHidden) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage69(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInterstitialHidden) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage69(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInterstitialHidden) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage69(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage70(in *jlexer.Lexer, out *EventFrameStoppedLoading) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage70(out *jwriter.Writer, in EventFrameStoppedLoading) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameStoppedLoading) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage70(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameStoppedLoading) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage70(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameStoppedLoading) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage70(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameStoppedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage70(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage71(in *jlexer.Lexer, out *EventFrameStartedLoading) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage71(out *jwriter.Writer, in EventFrameStartedLoading) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameStartedLoading) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage71(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameStartedLoading) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage71(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameStartedLoading) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage71(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameStartedLoading) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage71(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage72(in *jlexer.Lexer, out *EventFrameResized) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage72(out *jwriter.Writer, in EventFrameResized) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameResized) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage72(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameResized) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage72(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameResized) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage72(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameResized) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage72(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage73(in *jlexer.Lexer, out *EventFrameRequestedNavigation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "disposition":
- (out.Disposition).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage73(out *jwriter.Writer, in EventFrameRequestedNavigation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"disposition\":"
- out.RawString(prefix)
- (in.Disposition).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameRequestedNavigation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage73(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameRequestedNavigation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage73(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameRequestedNavigation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage73(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameRequestedNavigation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage73(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage74(in *jlexer.Lexer, out *EventFrameNavigated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(cdp.Frame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage74(out *jwriter.Writer, in EventFrameNavigated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frame\":"
- out.RawString(prefix[1:])
- if in.Frame == nil {
- out.RawString("null")
- } else {
- (*in.Frame).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameNavigated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage74(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameNavigated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage74(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameNavigated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage74(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameNavigated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage74(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage75(in *jlexer.Lexer, out *EventFrameDetached) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage75(out *jwriter.Writer, in EventFrameDetached) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameDetached) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage75(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameDetached) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage75(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameDetached) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage75(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameDetached) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage75(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage76(in *jlexer.Lexer, out *EventFrameAttached) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "parentFrameId":
- (out.ParentFrameID).UnmarshalEasyJSON(in)
- case "stack":
- if in.IsNull() {
- in.Skip()
- out.Stack = nil
- } else {
- if out.Stack == nil {
- out.Stack = new(runtime.StackTrace)
- }
- (*out.Stack).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage76(out *jwriter.Writer, in EventFrameAttached) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"parentFrameId\":"
- out.RawString(prefix)
- out.String(string(in.ParentFrameID))
- }
- if in.Stack != nil {
- const prefix string = ",\"stack\":"
- out.RawString(prefix)
- (*in.Stack).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFrameAttached) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage76(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFrameAttached) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage76(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFrameAttached) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage76(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFrameAttached) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage76(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage77(in *jlexer.Lexer, out *EventFileChooserOpened) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "mode":
- (out.Mode).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage77(out *jwriter.Writer, in EventFileChooserOpened) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- {
- const prefix string = ",\"mode\":"
- out.RawString(prefix)
- (in.Mode).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventFileChooserOpened) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage77(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventFileChooserOpened) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage77(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventFileChooserOpened) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage77(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventFileChooserOpened) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage77(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage78(in *jlexer.Lexer, out *EventDomContentEventFired) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(cdp.MonotonicTime)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage78(out *jwriter.Writer, in EventDomContentEventFired) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDomContentEventFired) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage78(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDomContentEventFired) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage78(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDomContentEventFired) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage78(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDomContentEventFired) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage78(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage79(in *jlexer.Lexer, out *EventDocumentOpened) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frame":
- if in.IsNull() {
- in.Skip()
- out.Frame = nil
- } else {
- if out.Frame == nil {
- out.Frame = new(cdp.Frame)
- }
- (*out.Frame).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage79(out *jwriter.Writer, in EventDocumentOpened) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frame\":"
- out.RawString(prefix[1:])
- if in.Frame == nil {
- out.RawString("null")
- } else {
- (*in.Frame).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDocumentOpened) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage79(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDocumentOpened) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage79(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDocumentOpened) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage79(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDocumentOpened) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage79(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage80(in *jlexer.Lexer, out *EventCompilationCacheProduced) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage80(out *jwriter.Writer, in EventCompilationCacheProduced) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventCompilationCacheProduced) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage80(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventCompilationCacheProduced) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage80(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventCompilationCacheProduced) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage80(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventCompilationCacheProduced) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage80(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage81(in *jlexer.Lexer, out *EventBackForwardCacheNotUsed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "notRestoredExplanations":
- if in.IsNull() {
- in.Skip()
- out.NotRestoredExplanations = nil
- } else {
- in.Delim('[')
- if out.NotRestoredExplanations == nil {
- if !in.IsDelim(']') {
- out.NotRestoredExplanations = make([]*BackForwardCacheNotRestoredExplanation, 0, 8)
- } else {
- out.NotRestoredExplanations = []*BackForwardCacheNotRestoredExplanation{}
- }
- } else {
- out.NotRestoredExplanations = (out.NotRestoredExplanations)[:0]
- }
- for !in.IsDelim(']') {
- var v34 *BackForwardCacheNotRestoredExplanation
- if in.IsNull() {
- in.Skip()
- v34 = nil
- } else {
- if v34 == nil {
- v34 = new(BackForwardCacheNotRestoredExplanation)
- }
- (*v34).UnmarshalEasyJSON(in)
- }
- out.NotRestoredExplanations = append(out.NotRestoredExplanations, v34)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage81(out *jwriter.Writer, in EventBackForwardCacheNotUsed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix)
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"notRestoredExplanations\":"
- out.RawString(prefix)
- if in.NotRestoredExplanations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v35, v36 := range in.NotRestoredExplanations {
- if v35 > 0 {
- out.RawByte(',')
- }
- if v36 == nil {
- out.RawString("null")
- } else {
- (*v36).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventBackForwardCacheNotUsed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage81(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventBackForwardCacheNotUsed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage81(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventBackForwardCacheNotUsed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage81(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventBackForwardCacheNotUsed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage81(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage82(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage82(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage82(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage82(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage82(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage82(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage83(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage83(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage83(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage83(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage83(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage83(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage84(in *jlexer.Lexer, out *CreateIsolatedWorldReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "executionContextId":
- out.ExecutionContextID = runtime.ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage84(out *jwriter.Writer, in CreateIsolatedWorldReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateIsolatedWorldReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage84(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateIsolatedWorldReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage84(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateIsolatedWorldReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage84(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateIsolatedWorldReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage84(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage85(in *jlexer.Lexer, out *CreateIsolatedWorldParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "worldName":
- out.WorldName = string(in.String())
- case "grantUniveralAccess":
- out.GrantUniveralAccess = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage85(out *jwriter.Writer, in CreateIsolatedWorldParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- if in.WorldName != "" {
- const prefix string = ",\"worldName\":"
- out.RawString(prefix)
- out.String(string(in.WorldName))
- }
- if in.GrantUniveralAccess {
- const prefix string = ",\"grantUniveralAccess\":"
- out.RawString(prefix)
- out.Bool(bool(in.GrantUniveralAccess))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateIsolatedWorldParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage85(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateIsolatedWorldParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage85(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateIsolatedWorldParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage85(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateIsolatedWorldParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage85(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage86(in *jlexer.Lexer, out *CrashParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage86(out *jwriter.Writer, in CrashParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CrashParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage86(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CrashParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage86(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CrashParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage86(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CrashParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage86(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage87(in *jlexer.Lexer, out *CompilationCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "eager":
- out.Eager = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage87(out *jwriter.Writer, in CompilationCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if in.Eager {
- const prefix string = ",\"eager\":"
- out.RawString(prefix)
- out.Bool(bool(in.Eager))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CompilationCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage87(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CompilationCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage87(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CompilationCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage87(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CompilationCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage87(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage88(in *jlexer.Lexer, out *CloseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage88(out *jwriter.Writer, in CloseParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CloseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage88(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage88(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CloseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage88(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage88(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage89(in *jlexer.Lexer, out *ClearCompilationCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage89(out *jwriter.Writer, in ClearCompilationCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearCompilationCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage89(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearCompilationCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage89(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearCompilationCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage89(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearCompilationCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage89(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage90(in *jlexer.Lexer, out *CaptureSnapshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage90(out *jwriter.Writer, in CaptureSnapshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Data != "" {
- const prefix string = ",\"data\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureSnapshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage90(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage90(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureSnapshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage90(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage90(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage91(in *jlexer.Lexer, out *CaptureSnapshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "format":
- (out.Format).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage91(out *jwriter.Writer, in CaptureSnapshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Format != "" {
- const prefix string = ",\"format\":"
- first = false
- out.RawString(prefix[1:])
- (in.Format).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureSnapshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage91(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage91(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureSnapshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage91(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage91(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage92(in *jlexer.Lexer, out *CaptureScreenshotReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage92(out *jwriter.Writer, in CaptureScreenshotReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Data != "" {
- const prefix string = ",\"data\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureScreenshotReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage92(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureScreenshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage92(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureScreenshotReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage92(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureScreenshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage92(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage93(in *jlexer.Lexer, out *CaptureScreenshotParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "format":
- (out.Format).UnmarshalEasyJSON(in)
- case "quality":
- out.Quality = int64(in.Int64())
- case "clip":
- if in.IsNull() {
- in.Skip()
- out.Clip = nil
- } else {
- if out.Clip == nil {
- out.Clip = new(Viewport)
- }
- (*out.Clip).UnmarshalEasyJSON(in)
- }
- case "fromSurface":
- out.FromSurface = bool(in.Bool())
- case "captureBeyondViewport":
- out.CaptureBeyondViewport = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage93(out *jwriter.Writer, in CaptureScreenshotParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Format != "" {
- const prefix string = ",\"format\":"
- first = false
- out.RawString(prefix[1:])
- (in.Format).MarshalEasyJSON(out)
- }
- if in.Quality != 0 {
- const prefix string = ",\"quality\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Int64(int64(in.Quality))
- }
- if in.Clip != nil {
- const prefix string = ",\"clip\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.Clip).MarshalEasyJSON(out)
- }
- if in.FromSurface {
- const prefix string = ",\"fromSurface\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.FromSurface))
- }
- if in.CaptureBeyondViewport {
- const prefix string = ",\"captureBeyondViewport\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.CaptureBeyondViewport))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CaptureScreenshotParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage93(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CaptureScreenshotParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage93(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CaptureScreenshotParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage93(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CaptureScreenshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage93(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage94(in *jlexer.Lexer, out *BringToFrontParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage94(out *jwriter.Writer, in BringToFrontParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BringToFrontParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage94(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BringToFrontParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage94(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BringToFrontParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage94(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BringToFrontParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage94(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage95(in *jlexer.Lexer, out *BackForwardCacheNotRestoredExplanation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "reason":
- (out.Reason).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage95(out *jwriter.Writer, in BackForwardCacheNotRestoredExplanation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix)
- (in.Reason).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BackForwardCacheNotRestoredExplanation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage95(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BackForwardCacheNotRestoredExplanation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage95(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BackForwardCacheNotRestoredExplanation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage95(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BackForwardCacheNotRestoredExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage95(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage96(in *jlexer.Lexer, out *AppManifestParsedProperties) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scope":
- out.Scope = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage96(out *jwriter.Writer, in AppManifestParsedProperties) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scope\":"
- out.RawString(prefix[1:])
- out.String(string(in.Scope))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AppManifestParsedProperties) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage96(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AppManifestParsedProperties) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage96(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AppManifestParsedProperties) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage96(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AppManifestParsedProperties) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage96(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage97(in *jlexer.Lexer, out *AppManifestError) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "message":
- out.Message = string(in.String())
- case "critical":
- out.Critical = int64(in.Int64())
- case "line":
- out.Line = int64(in.Int64())
- case "column":
- out.Column = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage97(out *jwriter.Writer, in AppManifestError) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix[1:])
- out.String(string(in.Message))
- }
- {
- const prefix string = ",\"critical\":"
- out.RawString(prefix)
- out.Int64(int64(in.Critical))
- }
- {
- const prefix string = ",\"line\":"
- out.RawString(prefix)
- out.Int64(int64(in.Line))
- }
- {
- const prefix string = ",\"column\":"
- out.RawString(prefix)
- out.Int64(int64(in.Column))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AppManifestError) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage97(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AppManifestError) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage97(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AppManifestError) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage97(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AppManifestError) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage97(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage98(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "identifier":
- out.Identifier = ScriptIdentifier(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage98(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Identifier != "" {
- const prefix string = ",\"identifier\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Identifier))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddScriptToEvaluateOnNewDocumentReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage98(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddScriptToEvaluateOnNewDocumentReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage98(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddScriptToEvaluateOnNewDocumentReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage98(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddScriptToEvaluateOnNewDocumentReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage98(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage99(in *jlexer.Lexer, out *AddScriptToEvaluateOnNewDocumentParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "source":
- out.Source = string(in.String())
- case "worldName":
- out.WorldName = string(in.String())
- case "includeCommandLineAPI":
- out.IncludeCommandLineAPI = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage99(out *jwriter.Writer, in AddScriptToEvaluateOnNewDocumentParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"source\":"
- out.RawString(prefix[1:])
- out.String(string(in.Source))
- }
- if in.WorldName != "" {
- const prefix string = ",\"worldName\":"
- out.RawString(prefix)
- out.String(string(in.WorldName))
- }
- if in.IncludeCommandLineAPI {
- const prefix string = ",\"includeCommandLineAPI\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeCommandLineAPI))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddScriptToEvaluateOnNewDocumentParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage99(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddScriptToEvaluateOnNewDocumentParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage99(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddScriptToEvaluateOnNewDocumentParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage99(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddScriptToEvaluateOnNewDocumentParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage99(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage100(in *jlexer.Lexer, out *AddCompilationCacheParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage100(out *jwriter.Writer, in AddCompilationCacheParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddCompilationCacheParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage100(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddCompilationCacheParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPage100(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddCompilationCacheParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage100(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddCompilationCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPage100(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/page/events.go b/vendor/github.com/chromedp/cdproto/page/events.go
deleted file mode 100644
index 2a8a6615168..00000000000
--- a/vendor/github.com/chromedp/cdproto/page/events.go
+++ /dev/null
@@ -1,197 +0,0 @@
-package page
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// EventDomContentEventFired [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-domContentEventFired
-type EventDomContentEventFired struct {
- Timestamp *cdp.MonotonicTime `json:"timestamp"`
-}
-
-// EventFileChooserOpened emitted only when page.interceptFileChooser is
-// enabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
-type EventFileChooserOpened struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame containing input node.
- BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Input node id.
- Mode FileChooserOpenedMode `json:"mode"` // Input mode.
-}
-
-// EventFrameAttached fired when frame has been attached to its parent.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameAttached
-type EventFrameAttached struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been attached.
- ParentFrameID cdp.FrameID `json:"parentFrameId"` // Parent frame identifier.
- Stack *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
-}
-
-// EventFrameDetached fired when frame has been detached from its parent.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameDetached
-type EventFrameDetached struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been detached.
- Reason FrameDetachedReason `json:"reason"`
-}
-
-// EventFrameNavigated fired once navigation of the frame has completed.
-// Frame is now associated with the new loader.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameNavigated
-type EventFrameNavigated struct {
- Frame *cdp.Frame `json:"frame"` // Frame object.
- Type NavigationType `json:"type"`
-}
-
-// EventDocumentOpened fired when opening document to write to.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-documentOpened
-type EventDocumentOpened struct {
- Frame *cdp.Frame `json:"frame"` // Frame object.
-}
-
-// EventFrameResized [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameResized
-type EventFrameResized struct{}
-
-// EventFrameRequestedNavigation fired when a renderer-initiated navigation
-// is requested. Navigation may still be cancelled after the event is issued.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameRequestedNavigation
-type EventFrameRequestedNavigation struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that is being navigated.
- Reason ClientNavigationReason `json:"reason"` // The reason for the navigation.
- URL string `json:"url"` // The destination URL for the requested navigation.
- Disposition ClientNavigationDisposition `json:"disposition"` // The disposition for the navigation.
-}
-
-// EventFrameStartedLoading fired when frame has started loading.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStartedLoading
-type EventFrameStartedLoading struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has started loading.
-}
-
-// EventFrameStoppedLoading fired when frame has stopped loading.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStoppedLoading
-type EventFrameStoppedLoading struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has stopped loading.
-}
-
-// EventInterstitialHidden fired when interstitial page was hidden.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-interstitialHidden
-type EventInterstitialHidden struct{}
-
-// EventInterstitialShown fired when interstitial page was shown.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-interstitialShown
-type EventInterstitialShown struct{}
-
-// EventJavascriptDialogClosed fired when a JavaScript initiated dialog
-// (alert, confirm, prompt, or onbeforeunload) has been closed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-javascriptDialogClosed
-type EventJavascriptDialogClosed struct {
- Result bool `json:"result"` // Whether dialog was confirmed.
- UserInput string `json:"userInput"` // User input in case of prompt.
-}
-
-// EventJavascriptDialogOpening fired when a JavaScript initiated dialog
-// (alert, confirm, prompt, or onbeforeunload) is about to open.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-javascriptDialogOpening
-type EventJavascriptDialogOpening struct {
- URL string `json:"url"` // Frame url.
- Message string `json:"message"` // Message that will be displayed by the dialog.
- Type DialogType `json:"type"` // Dialog type.
- HasBrowserHandler bool `json:"hasBrowserHandler"` // True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
- DefaultPrompt string `json:"defaultPrompt,omitempty"` // Default dialog prompt.
-}
-
-// EventLifecycleEvent fired for top level page lifecycle events such as
-// navigation, load, paint, etc.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-lifecycleEvent
-type EventLifecycleEvent struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame.
- LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker.
- Name string `json:"name"`
- Timestamp *cdp.MonotonicTime `json:"timestamp"`
-}
-
-// EventBackForwardCacheNotUsed fired for failed bfcache history navigations
-// if BackForwardCache feature is enabled. Do not assume any ordering with the
-// Page.frameNavigated event. This event is fired only for main-frame history
-// navigation where the document changes (non-same-document navigations), when
-// bfcache navigation fails.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-backForwardCacheNotUsed
-type EventBackForwardCacheNotUsed struct {
- LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navgation.
- FrameID cdp.FrameID `json:"frameId"` // The frame id of the associated frame.
- NotRestoredExplanations []*BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty.
-}
-
-// EventLoadEventFired [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-loadEventFired
-type EventLoadEventFired struct {
- Timestamp *cdp.MonotonicTime `json:"timestamp"`
-}
-
-// EventNavigatedWithinDocument fired when same-document navigation happens,
-// e.g. due to history API usage or anchor navigation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-navigatedWithinDocument
-type EventNavigatedWithinDocument struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame.
- URL string `json:"url"` // Frame's new url.
-}
-
-// EventScreencastFrame compressed image data requested by the
-// startScreencast.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-screencastFrame
-type EventScreencastFrame struct {
- Data string `json:"data"` // Base64-encoded compressed image.
- Metadata *ScreencastFrameMetadata `json:"metadata"` // Screencast frame metadata.
- SessionID int64 `json:"sessionId"` // Frame number.
-}
-
-// EventScreencastVisibilityChanged fired when the page with currently
-// enabled screencast was shown or hidden .
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-screencastVisibilityChanged
-type EventScreencastVisibilityChanged struct {
- Visible bool `json:"visible"` // True if the page is visible.
-}
-
-// EventWindowOpen fired when a new window is going to be opened, via
-// window.open(), link click, form submission, etc.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-windowOpen
-type EventWindowOpen struct {
- URL string `json:"url"` // The URL for the new window.
- WindowName string `json:"windowName"` // Window name.
- WindowFeatures []string `json:"windowFeatures"` // An array of enabled window features.
- UserGesture bool `json:"userGesture"` // Whether or not it was triggered by user gesture.
-}
-
-// EventCompilationCacheProduced issued for every compilation cache
-// generated. Is only available if Page.setGenerateCompilationCache is enabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-compilationCacheProduced
-type EventCompilationCacheProduced struct {
- URL string `json:"url"`
- Data string `json:"data"` // Base64-encoded data
-}
diff --git a/vendor/github.com/chromedp/cdproto/page/page.go b/vendor/github.com/chromedp/cdproto/page/page.go
deleted file mode 100644
index 05348872905..00000000000
--- a/vendor/github.com/chromedp/cdproto/page/page.go
+++ /dev/null
@@ -1,1600 +0,0 @@
-// Package page provides the Chrome DevTools Protocol
-// commands, types, and events for the Page domain.
-//
-// Actions and events related to the inspected page belong to the page
-// domain.
-//
-// Generated by the cdproto-gen command.
-package page
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
- "encoding/base64"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/debugger"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/io"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// AddScriptToEvaluateOnNewDocumentParams evaluates given script in every
-// frame upon creation (before loading frame's scripts).
-type AddScriptToEvaluateOnNewDocumentParams struct {
- Source string `json:"source"`
- WorldName string `json:"worldName,omitempty"` // If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
- IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Specifies whether command line API should be available to the script, defaults to false.
-}
-
-// AddScriptToEvaluateOnNewDocument evaluates given script in every frame
-// upon creation (before loading frame's scripts).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addScriptToEvaluateOnNewDocument
-//
-// parameters:
-// source
-func AddScriptToEvaluateOnNewDocument(source string) *AddScriptToEvaluateOnNewDocumentParams {
- return &AddScriptToEvaluateOnNewDocumentParams{
- Source: source,
- }
-}
-
-// WithWorldName if specified, creates an isolated world with the given name
-// and evaluates given script in it. This world name will be used as the
-// ExecutionContextDescription::name when the corresponding event is emitted.
-func (p AddScriptToEvaluateOnNewDocumentParams) WithWorldName(worldName string) *AddScriptToEvaluateOnNewDocumentParams {
- p.WorldName = worldName
- return &p
-}
-
-// WithIncludeCommandLineAPI specifies whether command line API should be
-// available to the script, defaults to false.
-func (p AddScriptToEvaluateOnNewDocumentParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *AddScriptToEvaluateOnNewDocumentParams {
- p.IncludeCommandLineAPI = includeCommandLineAPI
- return &p
-}
-
-// AddScriptToEvaluateOnNewDocumentReturns return values.
-type AddScriptToEvaluateOnNewDocumentReturns struct {
- Identifier ScriptIdentifier `json:"identifier,omitempty"` // Identifier of the added script.
-}
-
-// Do executes Page.addScriptToEvaluateOnNewDocument against the provided context.
-//
-// returns:
-// identifier - Identifier of the added script.
-func (p *AddScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (identifier ScriptIdentifier, err error) {
- // execute
- var res AddScriptToEvaluateOnNewDocumentReturns
- err = cdp.Execute(ctx, CommandAddScriptToEvaluateOnNewDocument, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Identifier, nil
-}
-
-// BringToFrontParams brings page to front (activates tab).
-type BringToFrontParams struct{}
-
-// BringToFront brings page to front (activates tab).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-bringToFront
-func BringToFront() *BringToFrontParams {
- return &BringToFrontParams{}
-}
-
-// Do executes Page.bringToFront against the provided context.
-func (p *BringToFrontParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandBringToFront, nil, nil)
-}
-
-// CaptureScreenshotParams capture page screenshot.
-type CaptureScreenshotParams struct {
- Format CaptureScreenshotFormat `json:"format,omitempty"` // Image compression format (defaults to png).
- Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
- Clip *Viewport `json:"clip,omitempty"` // Capture the screenshot of a given region only.
- FromSurface bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to true.
- CaptureBeyondViewport bool `json:"captureBeyondViewport,omitempty"` // Capture the screenshot beyond the viewport. Defaults to false.
-}
-
-// CaptureScreenshot capture page screenshot.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureScreenshot
-//
-// parameters:
-func CaptureScreenshot() *CaptureScreenshotParams {
- return &CaptureScreenshotParams{}
-}
-
-// WithFormat image compression format (defaults to png).
-func (p CaptureScreenshotParams) WithFormat(format CaptureScreenshotFormat) *CaptureScreenshotParams {
- p.Format = format
- return &p
-}
-
-// WithQuality compression quality from range [0..100] (jpeg only).
-func (p CaptureScreenshotParams) WithQuality(quality int64) *CaptureScreenshotParams {
- p.Quality = quality
- return &p
-}
-
-// WithClip capture the screenshot of a given region only.
-func (p CaptureScreenshotParams) WithClip(clip *Viewport) *CaptureScreenshotParams {
- p.Clip = clip
- return &p
-}
-
-// WithFromSurface capture the screenshot from the surface, rather than the
-// view. Defaults to true.
-func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams {
- p.FromSurface = fromSurface
- return &p
-}
-
-// WithCaptureBeyondViewport capture the screenshot beyond the viewport.
-// Defaults to false.
-func (p CaptureScreenshotParams) WithCaptureBeyondViewport(captureBeyondViewport bool) *CaptureScreenshotParams {
- p.CaptureBeyondViewport = captureBeyondViewport
- return &p
-}
-
-// CaptureScreenshotReturns return values.
-type CaptureScreenshotReturns struct {
- Data string `json:"data,omitempty"` // Base64-encoded image data.
-}
-
-// Do executes Page.captureScreenshot against the provided context.
-//
-// returns:
-// data - Base64-encoded image data.
-func (p *CaptureScreenshotParams) Do(ctx context.Context) (data []byte, err error) {
- // execute
- var res CaptureScreenshotReturns
- err = cdp.Execute(ctx, CommandCaptureScreenshot, p, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.Data)
- if err != nil {
- return nil, err
- }
- return dec, nil
-}
-
-// CaptureSnapshotParams returns a snapshot of the page as a string. For
-// MHTML format, the serialization includes iframes, shadow DOM, external
-// resources, and element-inline styles.
-type CaptureSnapshotParams struct {
- Format CaptureSnapshotFormat `json:"format,omitempty"` // Format (defaults to mhtml).
-}
-
-// CaptureSnapshot returns a snapshot of the page as a string. For MHTML
-// format, the serialization includes iframes, shadow DOM, external resources,
-// and element-inline styles.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureSnapshot
-//
-// parameters:
-func CaptureSnapshot() *CaptureSnapshotParams {
- return &CaptureSnapshotParams{}
-}
-
-// WithFormat format (defaults to mhtml).
-func (p CaptureSnapshotParams) WithFormat(format CaptureSnapshotFormat) *CaptureSnapshotParams {
- p.Format = format
- return &p
-}
-
-// CaptureSnapshotReturns return values.
-type CaptureSnapshotReturns struct {
- Data string `json:"data,omitempty"` // Serialized page data.
-}
-
-// Do executes Page.captureSnapshot against the provided context.
-//
-// returns:
-// data - Serialized page data.
-func (p *CaptureSnapshotParams) Do(ctx context.Context) (data string, err error) {
- // execute
- var res CaptureSnapshotReturns
- err = cdp.Execute(ctx, CommandCaptureSnapshot, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.Data, nil
-}
-
-// CreateIsolatedWorldParams creates an isolated world for the given frame.
-type CreateIsolatedWorldParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Id of the frame in which the isolated world should be created.
- WorldName string `json:"worldName,omitempty"` // An optional name which is reported in the Execution Context.
- GrantUniveralAccess bool `json:"grantUniveralAccess,omitempty"` // Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
-}
-
-// CreateIsolatedWorld creates an isolated world for the given frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-createIsolatedWorld
-//
-// parameters:
-// frameID - Id of the frame in which the isolated world should be created.
-func CreateIsolatedWorld(frameID cdp.FrameID) *CreateIsolatedWorldParams {
- return &CreateIsolatedWorldParams{
- FrameID: frameID,
- }
-}
-
-// WithWorldName an optional name which is reported in the Execution Context.
-func (p CreateIsolatedWorldParams) WithWorldName(worldName string) *CreateIsolatedWorldParams {
- p.WorldName = worldName
- return &p
-}
-
-// WithGrantUniveralAccess whether or not universal access should be granted
-// to the isolated world. This is a powerful option, use with caution.
-func (p CreateIsolatedWorldParams) WithGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldParams {
- p.GrantUniveralAccess = grantUniveralAccess
- return &p
-}
-
-// CreateIsolatedWorldReturns return values.
-type CreateIsolatedWorldReturns struct {
- ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Execution context of the isolated world.
-}
-
-// Do executes Page.createIsolatedWorld against the provided context.
-//
-// returns:
-// executionContextID - Execution context of the isolated world.
-func (p *CreateIsolatedWorldParams) Do(ctx context.Context) (executionContextID runtime.ExecutionContextID, err error) {
- // execute
- var res CreateIsolatedWorldReturns
- err = cdp.Execute(ctx, CommandCreateIsolatedWorld, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.ExecutionContextID, nil
-}
-
-// DisableParams disables page domain notifications.
-type DisableParams struct{}
-
-// Disable disables page domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Page.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables page domain notifications.
-type EnableParams struct{}
-
-// Enable enables page domain notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Page.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetAppManifestParams [no description].
-type GetAppManifestParams struct{}
-
-// GetAppManifest [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAppManifest
-func GetAppManifest() *GetAppManifestParams {
- return &GetAppManifestParams{}
-}
-
-// GetAppManifestReturns return values.
-type GetAppManifestReturns struct {
- URL string `json:"url,omitempty"` // Manifest location.
- Errors []*AppManifestError `json:"errors,omitempty"`
- Data string `json:"data,omitempty"` // Manifest content.
- Parsed *AppManifestParsedProperties `json:"parsed,omitempty"` // Parsed manifest properties
-}
-
-// Do executes Page.getAppManifest against the provided context.
-//
-// returns:
-// url - Manifest location.
-// errors
-// data - Manifest content.
-// parsed - Parsed manifest properties
-func (p *GetAppManifestParams) Do(ctx context.Context) (url string, errors []*AppManifestError, data string, parsed *AppManifestParsedProperties, err error) {
- // execute
- var res GetAppManifestReturns
- err = cdp.Execute(ctx, CommandGetAppManifest, nil, &res)
- if err != nil {
- return "", nil, "", nil, err
- }
-
- return res.URL, res.Errors, res.Data, res.Parsed, nil
-}
-
-// GetInstallabilityErrorsParams [no description].
-type GetInstallabilityErrorsParams struct{}
-
-// GetInstallabilityErrors [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getInstallabilityErrors
-func GetInstallabilityErrors() *GetInstallabilityErrorsParams {
- return &GetInstallabilityErrorsParams{}
-}
-
-// GetInstallabilityErrorsReturns return values.
-type GetInstallabilityErrorsReturns struct {
- InstallabilityErrors []*InstallabilityError `json:"installabilityErrors,omitempty"`
-}
-
-// Do executes Page.getInstallabilityErrors against the provided context.
-//
-// returns:
-// installabilityErrors
-func (p *GetInstallabilityErrorsParams) Do(ctx context.Context) (installabilityErrors []*InstallabilityError, err error) {
- // execute
- var res GetInstallabilityErrorsReturns
- err = cdp.Execute(ctx, CommandGetInstallabilityErrors, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.InstallabilityErrors, nil
-}
-
-// GetManifestIconsParams [no description].
-type GetManifestIconsParams struct{}
-
-// GetManifestIcons [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getManifestIcons
-func GetManifestIcons() *GetManifestIconsParams {
- return &GetManifestIconsParams{}
-}
-
-// GetManifestIconsReturns return values.
-type GetManifestIconsReturns struct {
- PrimaryIcon string `json:"primaryIcon,omitempty"`
-}
-
-// Do executes Page.getManifestIcons against the provided context.
-//
-// returns:
-// primaryIcon
-func (p *GetManifestIconsParams) Do(ctx context.Context) (primaryIcon []byte, err error) {
- // execute
- var res GetManifestIconsReturns
- err = cdp.Execute(ctx, CommandGetManifestIcons, nil, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.PrimaryIcon)
- if err != nil {
- return nil, err
- }
- return dec, nil
-}
-
-// GetFrameTreeParams returns present frame tree structure.
-type GetFrameTreeParams struct{}
-
-// GetFrameTree returns present frame tree structure.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getFrameTree
-func GetFrameTree() *GetFrameTreeParams {
- return &GetFrameTreeParams{}
-}
-
-// GetFrameTreeReturns return values.
-type GetFrameTreeReturns struct {
- FrameTree *FrameTree `json:"frameTree,omitempty"` // Present frame tree structure.
-}
-
-// Do executes Page.getFrameTree against the provided context.
-//
-// returns:
-// frameTree - Present frame tree structure.
-func (p *GetFrameTreeParams) Do(ctx context.Context) (frameTree *FrameTree, err error) {
- // execute
- var res GetFrameTreeReturns
- err = cdp.Execute(ctx, CommandGetFrameTree, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.FrameTree, nil
-}
-
-// GetLayoutMetricsParams returns metrics relating to the layouting of the
-// page, such as viewport bounds/scale.
-type GetLayoutMetricsParams struct{}
-
-// GetLayoutMetrics returns metrics relating to the layouting of the page,
-// such as viewport bounds/scale.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getLayoutMetrics
-func GetLayoutMetrics() *GetLayoutMetricsParams {
- return &GetLayoutMetricsParams{}
-}
-
-// GetLayoutMetricsReturns return values.
-type GetLayoutMetricsReturns struct {
- LayoutViewport *LayoutViewport `json:"layoutViewport"` // Deprecated metrics relating to the layout viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssLayoutViewport instead.
- VisualViewport *VisualViewport `json:"visualViewport"` // Deprecated metrics relating to the visual viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssVisualViewport instead.
- ContentSize *dom.Rect `json:"contentSize"` // Deprecated size of scrollable area. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssContentSize instead.
- CSSLayoutViewport *LayoutViewport `json:"cssLayoutViewport"` // Metrics relating to the layout viewport in CSS pixels.
- CSSVisualViewport *VisualViewport `json:"cssVisualViewport"` // Metrics relating to the visual viewport in CSS pixels.
- CSSContentSize *dom.Rect `json:"cssContentSize"` // Size of scrollable area in CSS pixels.
-}
-
-// Do executes Page.getLayoutMetrics against the provided context.
-//
-// returns:
-// layoutViewport - Deprecated metrics relating to the layout viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssLayoutViewport instead.
-// visualViewport - Deprecated metrics relating to the visual viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssVisualViewport instead.
-// contentSize - Deprecated size of scrollable area. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssContentSize instead.
-// cssLayoutViewport - Metrics relating to the layout viewport in CSS pixels.
-// cssVisualViewport - Metrics relating to the visual viewport in CSS pixels.
-// cssContentSize - Size of scrollable area in CSS pixels.
-func (p *GetLayoutMetricsParams) Do(ctx context.Context) (layoutViewport *LayoutViewport, visualViewport *VisualViewport, contentSize *dom.Rect, cssLayoutViewport *LayoutViewport, cssVisualViewport *VisualViewport, cssContentSize *dom.Rect, err error) {
- // execute
- var res GetLayoutMetricsReturns
- err = cdp.Execute(ctx, CommandGetLayoutMetrics, nil, &res)
- if err != nil {
- return nil, nil, nil, nil, nil, nil, err
- }
-
- return res.LayoutViewport, res.VisualViewport, res.ContentSize, res.CSSLayoutViewport, res.CSSVisualViewport, res.CSSContentSize, nil
-}
-
-// GetNavigationHistoryParams returns navigation history for the current
-// page.
-type GetNavigationHistoryParams struct{}
-
-// GetNavigationHistory returns navigation history for the current page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getNavigationHistory
-func GetNavigationHistory() *GetNavigationHistoryParams {
- return &GetNavigationHistoryParams{}
-}
-
-// GetNavigationHistoryReturns return values.
-type GetNavigationHistoryReturns struct {
- CurrentIndex int64 `json:"currentIndex,omitempty"` // Index of the current navigation history entry.
- Entries []*NavigationEntry `json:"entries,omitempty"` // Array of navigation history entries.
-}
-
-// Do executes Page.getNavigationHistory against the provided context.
-//
-// returns:
-// currentIndex - Index of the current navigation history entry.
-// entries - Array of navigation history entries.
-func (p *GetNavigationHistoryParams) Do(ctx context.Context) (currentIndex int64, entries []*NavigationEntry, err error) {
- // execute
- var res GetNavigationHistoryReturns
- err = cdp.Execute(ctx, CommandGetNavigationHistory, nil, &res)
- if err != nil {
- return 0, nil, err
- }
-
- return res.CurrentIndex, res.Entries, nil
-}
-
-// ResetNavigationHistoryParams resets navigation history for the current
-// page.
-type ResetNavigationHistoryParams struct{}
-
-// ResetNavigationHistory resets navigation history for the current page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-resetNavigationHistory
-func ResetNavigationHistory() *ResetNavigationHistoryParams {
- return &ResetNavigationHistoryParams{}
-}
-
-// Do executes Page.resetNavigationHistory against the provided context.
-func (p *ResetNavigationHistoryParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandResetNavigationHistory, nil, nil)
-}
-
-// GetResourceContentParams returns content of the given resource.
-type GetResourceContentParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Frame id to get resource for.
- URL string `json:"url"` // URL of the resource to get content for.
-}
-
-// GetResourceContent returns content of the given resource.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceContent
-//
-// parameters:
-// frameID - Frame id to get resource for.
-// url - URL of the resource to get content for.
-func GetResourceContent(frameID cdp.FrameID, url string) *GetResourceContentParams {
- return &GetResourceContentParams{
- FrameID: frameID,
- URL: url,
- }
-}
-
-// GetResourceContentReturns return values.
-type GetResourceContentReturns struct {
- Content string `json:"content,omitempty"` // Resource content.
- Base64encoded bool `json:"base64Encoded,omitempty"` // True, if content was served as base64.
-}
-
-// Do executes Page.getResourceContent against the provided context.
-//
-// returns:
-// content - Resource content.
-func (p *GetResourceContentParams) Do(ctx context.Context) (content []byte, err error) {
- // execute
- var res GetResourceContentReturns
- err = cdp.Execute(ctx, CommandGetResourceContent, p, &res)
- if err != nil {
- return nil, err
- }
-
- // decode
- var dec []byte
- if res.Base64encoded {
- dec, err = base64.StdEncoding.DecodeString(res.Content)
- if err != nil {
- return nil, err
- }
- } else {
- dec = []byte(res.Content)
- }
- return dec, nil
-}
-
-// GetResourceTreeParams returns present frame / resource tree structure.
-type GetResourceTreeParams struct{}
-
-// GetResourceTree returns present frame / resource tree structure.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceTree
-func GetResourceTree() *GetResourceTreeParams {
- return &GetResourceTreeParams{}
-}
-
-// GetResourceTreeReturns return values.
-type GetResourceTreeReturns struct {
- FrameTree *FrameResourceTree `json:"frameTree,omitempty"` // Present frame / resource tree structure.
-}
-
-// Do executes Page.getResourceTree against the provided context.
-//
-// returns:
-// frameTree - Present frame / resource tree structure.
-func (p *GetResourceTreeParams) Do(ctx context.Context) (frameTree *FrameResourceTree, err error) {
- // execute
- var res GetResourceTreeReturns
- err = cdp.Execute(ctx, CommandGetResourceTree, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.FrameTree, nil
-}
-
-// HandleJavaScriptDialogParams accepts or dismisses a JavaScript initiated
-// dialog (alert, confirm, prompt, or onbeforeunload).
-type HandleJavaScriptDialogParams struct {
- Accept bool `json:"accept"` // Whether to accept or dismiss the dialog.
- PromptText string `json:"promptText,omitempty"` // The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
-}
-
-// HandleJavaScriptDialog accepts or dismisses a JavaScript initiated dialog
-// (alert, confirm, prompt, or onbeforeunload).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-handleJavaScriptDialog
-//
-// parameters:
-// accept - Whether to accept or dismiss the dialog.
-func HandleJavaScriptDialog(accept bool) *HandleJavaScriptDialogParams {
- return &HandleJavaScriptDialogParams{
- Accept: accept,
- }
-}
-
-// WithPromptText the text to enter into the dialog prompt before accepting.
-// Used only if this is a prompt dialog.
-func (p HandleJavaScriptDialogParams) WithPromptText(promptText string) *HandleJavaScriptDialogParams {
- p.PromptText = promptText
- return &p
-}
-
-// Do executes Page.handleJavaScriptDialog against the provided context.
-func (p *HandleJavaScriptDialogParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandHandleJavaScriptDialog, p, nil)
-}
-
-// NavigateParams navigates current page to the given URL.
-type NavigateParams struct {
- URL string `json:"url"` // URL to navigate the page to.
- Referrer string `json:"referrer,omitempty"` // Referrer URL.
- TransitionType TransitionType `json:"transitionType,omitempty"` // Intended transition type.
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame id to navigate, if not specified navigates the top frame.
- ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"` // Referrer-policy used for the navigation.
-}
-
-// Navigate navigates current page to the given URL.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigate
-//
-// parameters:
-// url - URL to navigate the page to.
-func Navigate(url string) *NavigateParams {
- return &NavigateParams{
- URL: url,
- }
-}
-
-// WithReferrer referrer URL.
-func (p NavigateParams) WithReferrer(referrer string) *NavigateParams {
- p.Referrer = referrer
- return &p
-}
-
-// WithTransitionType intended transition type.
-func (p NavigateParams) WithTransitionType(transitionType TransitionType) *NavigateParams {
- p.TransitionType = transitionType
- return &p
-}
-
-// WithFrameID frame id to navigate, if not specified navigates the top
-// frame.
-func (p NavigateParams) WithFrameID(frameID cdp.FrameID) *NavigateParams {
- p.FrameID = frameID
- return &p
-}
-
-// WithReferrerPolicy referrer-policy used for the navigation.
-func (p NavigateParams) WithReferrerPolicy(referrerPolicy ReferrerPolicy) *NavigateParams {
- p.ReferrerPolicy = referrerPolicy
- return &p
-}
-
-// NavigateReturns return values.
-type NavigateReturns struct {
- FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame id that has navigated (or failed to navigate)
- LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier.
- ErrorText string `json:"errorText,omitempty"` // User friendly error message, present if and only if navigation has failed.
-}
-
-// Do executes Page.navigate against the provided context.
-//
-// returns:
-// frameID - Frame id that has navigated (or failed to navigate)
-// loaderID - Loader identifier.
-// errorText - User friendly error message, present if and only if navigation has failed.
-func (p *NavigateParams) Do(ctx context.Context) (frameID cdp.FrameID, loaderID cdp.LoaderID, errorText string, err error) {
- // execute
- var res NavigateReturns
- err = cdp.Execute(ctx, CommandNavigate, p, &res)
- if err != nil {
- return "", "", "", err
- }
-
- return res.FrameID, res.LoaderID, res.ErrorText, nil
-}
-
-// NavigateToHistoryEntryParams navigates current page to the given history
-// entry.
-type NavigateToHistoryEntryParams struct {
- EntryID int64 `json:"entryId"` // Unique id of the entry to navigate to.
-}
-
-// NavigateToHistoryEntry navigates current page to the given history entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigateToHistoryEntry
-//
-// parameters:
-// entryID - Unique id of the entry to navigate to.
-func NavigateToHistoryEntry(entryID int64) *NavigateToHistoryEntryParams {
- return &NavigateToHistoryEntryParams{
- EntryID: entryID,
- }
-}
-
-// Do executes Page.navigateToHistoryEntry against the provided context.
-func (p *NavigateToHistoryEntryParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandNavigateToHistoryEntry, p, nil)
-}
-
-// PrintToPDFParams print page as PDF.
-type PrintToPDFParams struct {
- Landscape bool `json:"landscape,omitempty"` // Paper orientation. Defaults to false.
- DisplayHeaderFooter bool `json:"displayHeaderFooter,omitempty"` // Display header and footer. Defaults to false.
- PrintBackground bool `json:"printBackground,omitempty"` // Print background graphics. Defaults to false.
- Scale float64 `json:"scale,omitempty"` // Scale of the webpage rendering. Defaults to 1.
- PaperWidth float64 `json:"paperWidth,omitempty"` // Paper width in inches. Defaults to 8.5 inches.
- PaperHeight float64 `json:"paperHeight,omitempty"` // Paper height in inches. Defaults to 11 inches.
- MarginTop float64 `json:"marginTop"` // Top margin in inches. Defaults to 1cm (~0.4 inches).
- MarginBottom float64 `json:"marginBottom"` // Bottom margin in inches. Defaults to 1cm (~0.4 inches).
- MarginLeft float64 `json:"marginLeft"` // Left margin in inches. Defaults to 1cm (~0.4 inches).
- MarginRight float64 `json:"marginRight"` // Right margin in inches. Defaults to 1cm (~0.4 inches).
- PageRanges string `json:"pageRanges,omitempty"` // Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
- IgnoreInvalidPageRanges bool `json:"ignoreInvalidPageRanges,omitempty"` // Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
- HeaderTemplate string `json:"headerTemplate,omitempty"` // HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - date: formatted print date - title: document title - url: document location - pageNumber: current page number - totalPages: total pages in the document For example, would generate span containing the title.
- FooterTemplate string `json:"footerTemplate,omitempty"` // HTML template for the print footer. Should use the same format as the headerTemplate.
- PreferCSSPageSize bool `json:"preferCSSPageSize,omitempty"` // Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
- TransferMode PrintToPDFTransferMode `json:"transferMode,omitempty"` // return as stream
-}
-
-// PrintToPDF print page as PDF.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-printToPDF
-//
-// parameters:
-func PrintToPDF() *PrintToPDFParams {
- return &PrintToPDFParams{}
-}
-
-// WithLandscape paper orientation. Defaults to false.
-func (p PrintToPDFParams) WithLandscape(landscape bool) *PrintToPDFParams {
- p.Landscape = landscape
- return &p
-}
-
-// WithDisplayHeaderFooter display header and footer. Defaults to false.
-func (p PrintToPDFParams) WithDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFParams {
- p.DisplayHeaderFooter = displayHeaderFooter
- return &p
-}
-
-// WithPrintBackground print background graphics. Defaults to false.
-func (p PrintToPDFParams) WithPrintBackground(printBackground bool) *PrintToPDFParams {
- p.PrintBackground = printBackground
- return &p
-}
-
-// WithScale scale of the webpage rendering. Defaults to 1.
-func (p PrintToPDFParams) WithScale(scale float64) *PrintToPDFParams {
- p.Scale = scale
- return &p
-}
-
-// WithPaperWidth paper width in inches. Defaults to 8.5 inches.
-func (p PrintToPDFParams) WithPaperWidth(paperWidth float64) *PrintToPDFParams {
- p.PaperWidth = paperWidth
- return &p
-}
-
-// WithPaperHeight paper height in inches. Defaults to 11 inches.
-func (p PrintToPDFParams) WithPaperHeight(paperHeight float64) *PrintToPDFParams {
- p.PaperHeight = paperHeight
- return &p
-}
-
-// WithMarginTop top margin in inches. Defaults to 1cm (~0.4 inches).
-func (p PrintToPDFParams) WithMarginTop(marginTop float64) *PrintToPDFParams {
- p.MarginTop = marginTop
- return &p
-}
-
-// WithMarginBottom bottom margin in inches. Defaults to 1cm (~0.4 inches).
-func (p PrintToPDFParams) WithMarginBottom(marginBottom float64) *PrintToPDFParams {
- p.MarginBottom = marginBottom
- return &p
-}
-
-// WithMarginLeft left margin in inches. Defaults to 1cm (~0.4 inches).
-func (p PrintToPDFParams) WithMarginLeft(marginLeft float64) *PrintToPDFParams {
- p.MarginLeft = marginLeft
- return &p
-}
-
-// WithMarginRight right margin in inches. Defaults to 1cm (~0.4 inches).
-func (p PrintToPDFParams) WithMarginRight(marginRight float64) *PrintToPDFParams {
- p.MarginRight = marginRight
- return &p
-}
-
-// WithPageRanges paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to
-// the empty string, which means print all pages.
-func (p PrintToPDFParams) WithPageRanges(pageRanges string) *PrintToPDFParams {
- p.PageRanges = pageRanges
- return &p
-}
-
-// WithIgnoreInvalidPageRanges whether to silently ignore invalid but
-// successfully parsed page ranges, such as '3-2'. Defaults to false.
-func (p PrintToPDFParams) WithIgnoreInvalidPageRanges(ignoreInvalidPageRanges bool) *PrintToPDFParams {
- p.IgnoreInvalidPageRanges = ignoreInvalidPageRanges
- return &p
-}
-
-// WithHeaderTemplate HTML template for the print header. Should be valid
-// HTML markup with following classes used to inject printing values into them:
-// - date: formatted print date - title: document title - url: document location
-// - pageNumber: current page number - totalPages: total pages in the document
-// For example, would generate span containing the
-// title.
-func (p PrintToPDFParams) WithHeaderTemplate(headerTemplate string) *PrintToPDFParams {
- p.HeaderTemplate = headerTemplate
- return &p
-}
-
-// WithFooterTemplate HTML template for the print footer. Should use the same
-// format as the headerTemplate.
-func (p PrintToPDFParams) WithFooterTemplate(footerTemplate string) *PrintToPDFParams {
- p.FooterTemplate = footerTemplate
- return &p
-}
-
-// WithPreferCSSPageSize whether or not to prefer page size as defined by
-// css. Defaults to false, in which case the content will be scaled to fit the
-// paper size.
-func (p PrintToPDFParams) WithPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFParams {
- p.PreferCSSPageSize = preferCSSPageSize
- return &p
-}
-
-// WithTransferMode return as stream.
-func (p PrintToPDFParams) WithTransferMode(transferMode PrintToPDFTransferMode) *PrintToPDFParams {
- p.TransferMode = transferMode
- return &p
-}
-
-// PrintToPDFReturns return values.
-type PrintToPDFReturns struct {
- Data string `json:"data,omitempty"` // Base64-encoded pdf data. Empty if |returnAsStream| is specified.
- Stream io.StreamHandle `json:"stream,omitempty"` // A handle of the stream that holds resulting PDF data.
-}
-
-// Do executes Page.printToPDF against the provided context.
-//
-// returns:
-// data - Base64-encoded pdf data. Empty if |returnAsStream| is specified.
-// stream - A handle of the stream that holds resulting PDF data.
-func (p *PrintToPDFParams) Do(ctx context.Context) (data []byte, stream io.StreamHandle, err error) {
- // execute
- var res PrintToPDFReturns
- err = cdp.Execute(ctx, CommandPrintToPDF, p, &res)
- if err != nil {
- return nil, "", err
- }
-
- // decode
- var dec []byte
- dec, err = base64.StdEncoding.DecodeString(res.Data)
- if err != nil {
- return nil, "", err
- }
- return dec, res.Stream, nil
-}
-
-// ReloadParams reloads given page optionally ignoring the cache.
-type ReloadParams struct {
- IgnoreCache bool `json:"ignoreCache,omitempty"` // If true, browser cache is ignored (as if the user pressed Shift+refresh).
- ScriptToEvaluateOnLoad string `json:"scriptToEvaluateOnLoad,omitempty"` // If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
-}
-
-// Reload reloads given page optionally ignoring the cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-reload
-//
-// parameters:
-func Reload() *ReloadParams {
- return &ReloadParams{}
-}
-
-// WithIgnoreCache if true, browser cache is ignored (as if the user pressed
-// Shift+refresh).
-func (p ReloadParams) WithIgnoreCache(ignoreCache bool) *ReloadParams {
- p.IgnoreCache = ignoreCache
- return &p
-}
-
-// WithScriptToEvaluateOnLoad if set, the script will be injected into all
-// frames of the inspected page after reload. Argument will be ignored if
-// reloading dataURL origin.
-func (p ReloadParams) WithScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) *ReloadParams {
- p.ScriptToEvaluateOnLoad = scriptToEvaluateOnLoad
- return &p
-}
-
-// Do executes Page.reload against the provided context.
-func (p *ReloadParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReload, p, nil)
-}
-
-// RemoveScriptToEvaluateOnNewDocumentParams removes given script from the
-// list.
-type RemoveScriptToEvaluateOnNewDocumentParams struct {
- Identifier ScriptIdentifier `json:"identifier"`
-}
-
-// RemoveScriptToEvaluateOnNewDocument removes given script from the list.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-removeScriptToEvaluateOnNewDocument
-//
-// parameters:
-// identifier
-func RemoveScriptToEvaluateOnNewDocument(identifier ScriptIdentifier) *RemoveScriptToEvaluateOnNewDocumentParams {
- return &RemoveScriptToEvaluateOnNewDocumentParams{
- Identifier: identifier,
- }
-}
-
-// Do executes Page.removeScriptToEvaluateOnNewDocument against the provided context.
-func (p *RemoveScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveScriptToEvaluateOnNewDocument, p, nil)
-}
-
-// ScreencastFrameAckParams acknowledges that a screencast frame has been
-// received by the frontend.
-type ScreencastFrameAckParams struct {
- SessionID int64 `json:"sessionId"` // Frame number.
-}
-
-// ScreencastFrameAck acknowledges that a screencast frame has been received
-// by the frontend.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-screencastFrameAck
-//
-// parameters:
-// sessionID - Frame number.
-func ScreencastFrameAck(sessionID int64) *ScreencastFrameAckParams {
- return &ScreencastFrameAckParams{
- SessionID: sessionID,
- }
-}
-
-// Do executes Page.screencastFrameAck against the provided context.
-func (p *ScreencastFrameAckParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandScreencastFrameAck, p, nil)
-}
-
-// SearchInResourceParams searches for given string in resource content.
-type SearchInResourceParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Frame id for resource to search in.
- URL string `json:"url"` // URL of the resource to search in.
- Query string `json:"query"` // String to search for.
- CaseSensitive bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive.
- IsRegex bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex.
-}
-
-// SearchInResource searches for given string in resource content.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-searchInResource
-//
-// parameters:
-// frameID - Frame id for resource to search in.
-// url - URL of the resource to search in.
-// query - String to search for.
-func SearchInResource(frameID cdp.FrameID, url string, query string) *SearchInResourceParams {
- return &SearchInResourceParams{
- FrameID: frameID,
- URL: url,
- Query: query,
- }
-}
-
-// WithCaseSensitive if true, search is case sensitive.
-func (p SearchInResourceParams) WithCaseSensitive(caseSensitive bool) *SearchInResourceParams {
- p.CaseSensitive = caseSensitive
- return &p
-}
-
-// WithIsRegex if true, treats string parameter as regex.
-func (p SearchInResourceParams) WithIsRegex(isRegex bool) *SearchInResourceParams {
- p.IsRegex = isRegex
- return &p
-}
-
-// SearchInResourceReturns return values.
-type SearchInResourceReturns struct {
- Result []*debugger.SearchMatch `json:"result,omitempty"` // List of search matches.
-}
-
-// Do executes Page.searchInResource against the provided context.
-//
-// returns:
-// result - List of search matches.
-func (p *SearchInResourceParams) Do(ctx context.Context) (result []*debugger.SearchMatch, err error) {
- // execute
- var res SearchInResourceReturns
- err = cdp.Execute(ctx, CommandSearchInResource, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// SetAdBlockingEnabledParams enable Chrome's experimental ad filter on all
-// sites.
-type SetAdBlockingEnabledParams struct {
- Enabled bool `json:"enabled"` // Whether to block ads.
-}
-
-// SetAdBlockingEnabled enable Chrome's experimental ad filter on all sites.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setAdBlockingEnabled
-//
-// parameters:
-// enabled - Whether to block ads.
-func SetAdBlockingEnabled(enabled bool) *SetAdBlockingEnabledParams {
- return &SetAdBlockingEnabledParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Page.setAdBlockingEnabled against the provided context.
-func (p *SetAdBlockingEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAdBlockingEnabled, p, nil)
-}
-
-// SetBypassCSPParams enable page Content Security Policy by-passing.
-type SetBypassCSPParams struct {
- Enabled bool `json:"enabled"` // Whether to bypass page CSP.
-}
-
-// SetBypassCSP enable page Content Security Policy by-passing.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setBypassCSP
-//
-// parameters:
-// enabled - Whether to bypass page CSP.
-func SetBypassCSP(enabled bool) *SetBypassCSPParams {
- return &SetBypassCSPParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Page.setBypassCSP against the provided context.
-func (p *SetBypassCSPParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetBypassCSP, p, nil)
-}
-
-// GetPermissionsPolicyStateParams get Permissions Policy state on given
-// frame.
-type GetPermissionsPolicyStateParams struct {
- FrameID cdp.FrameID `json:"frameId"`
-}
-
-// GetPermissionsPolicyState get Permissions Policy state on given frame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getPermissionsPolicyState
-//
-// parameters:
-// frameID
-func GetPermissionsPolicyState(frameID cdp.FrameID) *GetPermissionsPolicyStateParams {
- return &GetPermissionsPolicyStateParams{
- FrameID: frameID,
- }
-}
-
-// GetPermissionsPolicyStateReturns return values.
-type GetPermissionsPolicyStateReturns struct {
- States []*PermissionsPolicyFeatureState `json:"states,omitempty"`
-}
-
-// Do executes Page.getPermissionsPolicyState against the provided context.
-//
-// returns:
-// states
-func (p *GetPermissionsPolicyStateParams) Do(ctx context.Context) (states []*PermissionsPolicyFeatureState, err error) {
- // execute
- var res GetPermissionsPolicyStateReturns
- err = cdp.Execute(ctx, CommandGetPermissionsPolicyState, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.States, nil
-}
-
-// SetFontFamiliesParams set generic font families.
-type SetFontFamiliesParams struct {
- FontFamilies *FontFamilies `json:"fontFamilies"` // Specifies font families to set. If a font family is not specified, it won't be changed.
-}
-
-// SetFontFamilies set generic font families.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontFamilies
-//
-// parameters:
-// fontFamilies - Specifies font families to set. If a font family is not specified, it won't be changed.
-func SetFontFamilies(fontFamilies *FontFamilies) *SetFontFamiliesParams {
- return &SetFontFamiliesParams{
- FontFamilies: fontFamilies,
- }
-}
-
-// Do executes Page.setFontFamilies against the provided context.
-func (p *SetFontFamiliesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetFontFamilies, p, nil)
-}
-
-// SetFontSizesParams set default font sizes.
-type SetFontSizesParams struct {
- FontSizes *FontSizes `json:"fontSizes"` // Specifies font sizes to set. If a font size is not specified, it won't be changed.
-}
-
-// SetFontSizes set default font sizes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontSizes
-//
-// parameters:
-// fontSizes - Specifies font sizes to set. If a font size is not specified, it won't be changed.
-func SetFontSizes(fontSizes *FontSizes) *SetFontSizesParams {
- return &SetFontSizesParams{
- FontSizes: fontSizes,
- }
-}
-
-// Do executes Page.setFontSizes against the provided context.
-func (p *SetFontSizesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetFontSizes, p, nil)
-}
-
-// SetDocumentContentParams sets given markup as the document's HTML.
-type SetDocumentContentParams struct {
- FrameID cdp.FrameID `json:"frameId"` // Frame id to set HTML for.
- HTML string `json:"html"` // HTML content to set.
-}
-
-// SetDocumentContent sets given markup as the document's HTML.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDocumentContent
-//
-// parameters:
-// frameID - Frame id to set HTML for.
-// html - HTML content to set.
-func SetDocumentContent(frameID cdp.FrameID, html string) *SetDocumentContentParams {
- return &SetDocumentContentParams{
- FrameID: frameID,
- HTML: html,
- }
-}
-
-// Do executes Page.setDocumentContent against the provided context.
-func (p *SetDocumentContentParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDocumentContent, p, nil)
-}
-
-// SetDownloadBehaviorParams set the behavior when downloading a file.
-type SetDownloadBehaviorParams struct {
- Behavior SetDownloadBehaviorBehavior `json:"behavior"` // Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
- DownloadPath string `json:"downloadPath,omitempty"` // The default path to save downloaded files to. This is required if behavior is set to 'allow'
-}
-
-// SetDownloadBehavior set the behavior when downloading a file.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDownloadBehavior
-//
-// parameters:
-// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
-func SetDownloadBehavior(behavior SetDownloadBehaviorBehavior) *SetDownloadBehaviorParams {
- return &SetDownloadBehaviorParams{
- Behavior: behavior,
- }
-}
-
-// WithDownloadPath the default path to save downloaded files to. This is
-// required if behavior is set to 'allow'.
-func (p SetDownloadBehaviorParams) WithDownloadPath(downloadPath string) *SetDownloadBehaviorParams {
- p.DownloadPath = downloadPath
- return &p
-}
-
-// Do executes Page.setDownloadBehavior against the provided context.
-func (p *SetDownloadBehaviorParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDownloadBehavior, p, nil)
-}
-
-// SetLifecycleEventsEnabledParams controls whether page will emit lifecycle
-// events.
-type SetLifecycleEventsEnabledParams struct {
- Enabled bool `json:"enabled"` // If true, starts emitting lifecycle events.
-}
-
-// SetLifecycleEventsEnabled controls whether page will emit lifecycle
-// events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setLifecycleEventsEnabled
-//
-// parameters:
-// enabled - If true, starts emitting lifecycle events.
-func SetLifecycleEventsEnabled(enabled bool) *SetLifecycleEventsEnabledParams {
- return &SetLifecycleEventsEnabledParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Page.setLifecycleEventsEnabled against the provided context.
-func (p *SetLifecycleEventsEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetLifecycleEventsEnabled, p, nil)
-}
-
-// StartScreencastParams starts sending each frame using the screencastFrame
-// event.
-type StartScreencastParams struct {
- Format ScreencastFormat `json:"format,omitempty"` // Image compression format.
- Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100].
- MaxWidth int64 `json:"maxWidth,omitempty"` // Maximum screenshot width.
- MaxHeight int64 `json:"maxHeight,omitempty"` // Maximum screenshot height.
- EveryNthFrame int64 `json:"everyNthFrame,omitempty"` // Send every n-th frame.
-}
-
-// StartScreencast starts sending each frame using the screencastFrame event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-startScreencast
-//
-// parameters:
-func StartScreencast() *StartScreencastParams {
- return &StartScreencastParams{}
-}
-
-// WithFormat image compression format.
-func (p StartScreencastParams) WithFormat(format ScreencastFormat) *StartScreencastParams {
- p.Format = format
- return &p
-}
-
-// WithQuality compression quality from range [0..100].
-func (p StartScreencastParams) WithQuality(quality int64) *StartScreencastParams {
- p.Quality = quality
- return &p
-}
-
-// WithMaxWidth maximum screenshot width.
-func (p StartScreencastParams) WithMaxWidth(maxWidth int64) *StartScreencastParams {
- p.MaxWidth = maxWidth
- return &p
-}
-
-// WithMaxHeight maximum screenshot height.
-func (p StartScreencastParams) WithMaxHeight(maxHeight int64) *StartScreencastParams {
- p.MaxHeight = maxHeight
- return &p
-}
-
-// WithEveryNthFrame send every n-th frame.
-func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScreencastParams {
- p.EveryNthFrame = everyNthFrame
- return &p
-}
-
-// Do executes Page.startScreencast against the provided context.
-func (p *StartScreencastParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartScreencast, p, nil)
-}
-
-// StopLoadingParams force the page stop all navigations and pending resource
-// fetches.
-type StopLoadingParams struct{}
-
-// StopLoading force the page stop all navigations and pending resource
-// fetches.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopLoading
-func StopLoading() *StopLoadingParams {
- return &StopLoadingParams{}
-}
-
-// Do executes Page.stopLoading against the provided context.
-func (p *StopLoadingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopLoading, nil, nil)
-}
-
-// CrashParams crashes renderer on the IO thread, generates minidumps.
-type CrashParams struct{}
-
-// Crash crashes renderer on the IO thread, generates minidumps.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-crash
-func Crash() *CrashParams {
- return &CrashParams{}
-}
-
-// Do executes Page.crash against the provided context.
-func (p *CrashParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCrash, nil, nil)
-}
-
-// CloseParams tries to close page, running its beforeunload hooks, if any.
-type CloseParams struct{}
-
-// Close tries to close page, running its beforeunload hooks, if any.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-close
-func Close() *CloseParams {
- return &CloseParams{}
-}
-
-// Do executes Page.close against the provided context.
-func (p *CloseParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClose, nil, nil)
-}
-
-// SetWebLifecycleStateParams tries to update the web lifecycle state of the
-// page. It will transition the page to the given state according to:
-// https://github.com/WICG/web-lifecycle/.
-type SetWebLifecycleStateParams struct {
- State SetWebLifecycleStateState `json:"state"` // Target lifecycle state
-}
-
-// SetWebLifecycleState tries to update the web lifecycle state of the page.
-// It will transition the page to the given state according to:
-// https://github.com/WICG/web-lifecycle/.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
-//
-// parameters:
-// state - Target lifecycle state
-func SetWebLifecycleState(state SetWebLifecycleStateState) *SetWebLifecycleStateParams {
- return &SetWebLifecycleStateParams{
- State: state,
- }
-}
-
-// Do executes Page.setWebLifecycleState against the provided context.
-func (p *SetWebLifecycleStateParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetWebLifecycleState, p, nil)
-}
-
-// StopScreencastParams stops sending each frame in the screencastFrame.
-type StopScreencastParams struct{}
-
-// StopScreencast stops sending each frame in the screencastFrame.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopScreencast
-func StopScreencast() *StopScreencastParams {
- return &StopScreencastParams{}
-}
-
-// Do executes Page.stopScreencast against the provided context.
-func (p *StopScreencastParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopScreencast, nil, nil)
-}
-
-// SetProduceCompilationCacheParams forces compilation cache to be generated
-// for every subresource script. See also: Page.produceCompilationCache.
-type SetProduceCompilationCacheParams struct {
- Enabled bool `json:"enabled"`
-}
-
-// SetProduceCompilationCache forces compilation cache to be generated for
-// every subresource script. See also: Page.produceCompilationCache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setProduceCompilationCache
-//
-// parameters:
-// enabled
-func SetProduceCompilationCache(enabled bool) *SetProduceCompilationCacheParams {
- return &SetProduceCompilationCacheParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Page.setProduceCompilationCache against the provided context.
-func (p *SetProduceCompilationCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetProduceCompilationCache, p, nil)
-}
-
-// ProduceCompilationCacheParams requests backend to produce compilation
-// cache for the specified scripts. Unlike setProduceCompilationCache, this
-// allows client to only produce cache for specific scripts. scripts are
-// appeneded to the list of scripts for which the cache for would produced.
-// Disabling compilation cache with setProduceCompilationCache would reset all
-// pending cache requests. The list may also be reset during page navigation.
-// When script with a matching URL is encountered, the cache is optionally
-// produced upon backend discretion, based on internal heuristics. See also:
-// Page.compilationCacheProduced.
-type ProduceCompilationCacheParams struct {
- Scripts []*CompilationCacheParams `json:"scripts"`
-}
-
-// ProduceCompilationCache requests backend to produce compilation cache for
-// the specified scripts. Unlike setProduceCompilationCache, this allows client
-// to only produce cache for specific scripts. scripts are appeneded to the list
-// of scripts for which the cache for would produced. Disabling compilation
-// cache with setProduceCompilationCache would reset all pending cache requests.
-// The list may also be reset during page navigation. When script with a
-// matching URL is encountered, the cache is optionally produced upon backend
-// discretion, based on internal heuristics. See also:
-// Page.compilationCacheProduced.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-produceCompilationCache
-//
-// parameters:
-// scripts
-func ProduceCompilationCache(scripts []*CompilationCacheParams) *ProduceCompilationCacheParams {
- return &ProduceCompilationCacheParams{
- Scripts: scripts,
- }
-}
-
-// Do executes Page.produceCompilationCache against the provided context.
-func (p *ProduceCompilationCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandProduceCompilationCache, p, nil)
-}
-
-// AddCompilationCacheParams seeds compilation cache for given url.
-// Compilation cache does not survive cross-process navigation.
-type AddCompilationCacheParams struct {
- URL string `json:"url"`
- Data string `json:"data"` // Base64-encoded data
-}
-
-// AddCompilationCache seeds compilation cache for given url. Compilation
-// cache does not survive cross-process navigation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addCompilationCache
-//
-// parameters:
-// url
-// data - Base64-encoded data
-func AddCompilationCache(url string, data string) *AddCompilationCacheParams {
- return &AddCompilationCacheParams{
- URL: url,
- Data: data,
- }
-}
-
-// Do executes Page.addCompilationCache against the provided context.
-func (p *AddCompilationCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandAddCompilationCache, p, nil)
-}
-
-// ClearCompilationCacheParams clears seeded compilation cache.
-type ClearCompilationCacheParams struct{}
-
-// ClearCompilationCache clears seeded compilation cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-clearCompilationCache
-func ClearCompilationCache() *ClearCompilationCacheParams {
- return &ClearCompilationCacheParams{}
-}
-
-// Do executes Page.clearCompilationCache against the provided context.
-func (p *ClearCompilationCacheParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearCompilationCache, nil, nil)
-}
-
-// GenerateTestReportParams generates a report for testing.
-type GenerateTestReportParams struct {
- Message string `json:"message"` // Message to be displayed in the report.
- Group string `json:"group,omitempty"` // Specifies the endpoint group to deliver the report to.
-}
-
-// GenerateTestReport generates a report for testing.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-generateTestReport
-//
-// parameters:
-// message - Message to be displayed in the report.
-func GenerateTestReport(message string) *GenerateTestReportParams {
- return &GenerateTestReportParams{
- Message: message,
- }
-}
-
-// WithGroup specifies the endpoint group to deliver the report to.
-func (p GenerateTestReportParams) WithGroup(group string) *GenerateTestReportParams {
- p.Group = group
- return &p
-}
-
-// Do executes Page.generateTestReport against the provided context.
-func (p *GenerateTestReportParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandGenerateTestReport, p, nil)
-}
-
-// WaitForDebuggerParams pauses page execution. Can be resumed using generic
-// Runtime.runIfWaitingForDebugger.
-type WaitForDebuggerParams struct{}
-
-// WaitForDebugger pauses page execution. Can be resumed using generic
-// Runtime.runIfWaitingForDebugger.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-waitForDebugger
-func WaitForDebugger() *WaitForDebuggerParams {
- return &WaitForDebuggerParams{}
-}
-
-// Do executes Page.waitForDebugger against the provided context.
-func (p *WaitForDebuggerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandWaitForDebugger, nil, nil)
-}
-
-// SetInterceptFileChooserDialogParams intercept file chooser requests and
-// transfer control to protocol clients. When file chooser interception is
-// enabled, native file chooser dialog is not shown. Instead, a protocol event
-// Page.fileChooserOpened is emitted.
-type SetInterceptFileChooserDialogParams struct {
- Enabled bool `json:"enabled"`
-}
-
-// SetInterceptFileChooserDialog intercept file chooser requests and transfer
-// control to protocol clients. When file chooser interception is enabled,
-// native file chooser dialog is not shown. Instead, a protocol event
-// Page.fileChooserOpened is emitted.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setInterceptFileChooserDialog
-//
-// parameters:
-// enabled
-func SetInterceptFileChooserDialog(enabled bool) *SetInterceptFileChooserDialogParams {
- return &SetInterceptFileChooserDialogParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Page.setInterceptFileChooserDialog against the provided context.
-func (p *SetInterceptFileChooserDialogParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetInterceptFileChooserDialog, p, nil)
-}
-
-// Command names.
-const (
- CommandAddScriptToEvaluateOnNewDocument = "Page.addScriptToEvaluateOnNewDocument"
- CommandBringToFront = "Page.bringToFront"
- CommandCaptureScreenshot = "Page.captureScreenshot"
- CommandCaptureSnapshot = "Page.captureSnapshot"
- CommandCreateIsolatedWorld = "Page.createIsolatedWorld"
- CommandDisable = "Page.disable"
- CommandEnable = "Page.enable"
- CommandGetAppManifest = "Page.getAppManifest"
- CommandGetInstallabilityErrors = "Page.getInstallabilityErrors"
- CommandGetManifestIcons = "Page.getManifestIcons"
- CommandGetFrameTree = "Page.getFrameTree"
- CommandGetLayoutMetrics = "Page.getLayoutMetrics"
- CommandGetNavigationHistory = "Page.getNavigationHistory"
- CommandResetNavigationHistory = "Page.resetNavigationHistory"
- CommandGetResourceContent = "Page.getResourceContent"
- CommandGetResourceTree = "Page.getResourceTree"
- CommandHandleJavaScriptDialog = "Page.handleJavaScriptDialog"
- CommandNavigate = "Page.navigate"
- CommandNavigateToHistoryEntry = "Page.navigateToHistoryEntry"
- CommandPrintToPDF = "Page.printToPDF"
- CommandReload = "Page.reload"
- CommandRemoveScriptToEvaluateOnNewDocument = "Page.removeScriptToEvaluateOnNewDocument"
- CommandScreencastFrameAck = "Page.screencastFrameAck"
- CommandSearchInResource = "Page.searchInResource"
- CommandSetAdBlockingEnabled = "Page.setAdBlockingEnabled"
- CommandSetBypassCSP = "Page.setBypassCSP"
- CommandGetPermissionsPolicyState = "Page.getPermissionsPolicyState"
- CommandSetFontFamilies = "Page.setFontFamilies"
- CommandSetFontSizes = "Page.setFontSizes"
- CommandSetDocumentContent = "Page.setDocumentContent"
- CommandSetDownloadBehavior = "Page.setDownloadBehavior"
- CommandSetLifecycleEventsEnabled = "Page.setLifecycleEventsEnabled"
- CommandStartScreencast = "Page.startScreencast"
- CommandStopLoading = "Page.stopLoading"
- CommandCrash = "Page.crash"
- CommandClose = "Page.close"
- CommandSetWebLifecycleState = "Page.setWebLifecycleState"
- CommandStopScreencast = "Page.stopScreencast"
- CommandSetProduceCompilationCache = "Page.setProduceCompilationCache"
- CommandProduceCompilationCache = "Page.produceCompilationCache"
- CommandAddCompilationCache = "Page.addCompilationCache"
- CommandClearCompilationCache = "Page.clearCompilationCache"
- CommandGenerateTestReport = "Page.generateTestReport"
- CommandWaitForDebugger = "Page.waitForDebugger"
- CommandSetInterceptFileChooserDialog = "Page.setInterceptFileChooserDialog"
-)
diff --git a/vendor/github.com/chromedp/cdproto/page/types.go b/vendor/github.com/chromedp/cdproto/page/types.go
deleted file mode 100644
index 74aeda2c33e..00000000000
--- a/vendor/github.com/chromedp/cdproto/page/types.go
+++ /dev/null
@@ -1,1527 +0,0 @@
-package page
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/network"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// PermissionsPolicyFeature all Permissions Policy features. This enum should
-// match the one defined in
-// third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyFeature
-type PermissionsPolicyFeature string
-
-// String returns the PermissionsPolicyFeature as string value.
-func (t PermissionsPolicyFeature) String() string {
- return string(t)
-}
-
-// PermissionsPolicyFeature values.
-const (
- PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer"
- PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor"
- PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting"
- PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay"
- PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera"
- PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr"
- PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory"
- PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink"
- PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect"
- PermissionsPolicyFeatureChLang PermissionsPolicyFeature = "ch-lang"
- PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme"
- PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt"
- PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua"
- PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch"
- PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness"
- PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform"
- PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model"
- PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile"
- PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version"
- PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version"
- PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width"
- PermissionsPolicyFeatureChWidth PermissionsPolicyFeature = "ch-width"
- PermissionsPolicyFeatureClipboardRead PermissionsPolicyFeature = "clipboard-read"
- PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write"
- PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated"
- PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets"
- PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture"
- PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain"
- PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media"
- PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport"
- PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered"
- PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation"
- PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen"
- PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate"
- PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad"
- PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation"
- PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope"
- PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid"
- PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection"
- PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort"
- PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer"
- PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone"
- PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi"
- PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials"
- PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment"
- PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture"
- PermissionsPolicyFeaturePublickeyCredentialsGet PermissionsPolicyFeature = "publickey-credentials-get"
- PermissionsPolicyFeatureScreenWakeLock PermissionsPolicyFeature = "screen-wake-lock"
- PermissionsPolicyFeatureSerial PermissionsPolicyFeature = "serial"
- PermissionsPolicyFeatureSharedAutofill PermissionsPolicyFeature = "shared-autofill"
- PermissionsPolicyFeatureStorageAccessAPI PermissionsPolicyFeature = "storage-access-api"
- PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr"
- PermissionsPolicyFeatureTrustTokenRedemption PermissionsPolicyFeature = "trust-token-redemption"
- PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb"
- PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll"
- PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share"
- PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement"
- PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PermissionsPolicyFeature) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PermissionsPolicyFeature) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PermissionsPolicyFeature(in.String()) {
- case PermissionsPolicyFeatureAccelerometer:
- *t = PermissionsPolicyFeatureAccelerometer
- case PermissionsPolicyFeatureAmbientLightSensor:
- *t = PermissionsPolicyFeatureAmbientLightSensor
- case PermissionsPolicyFeatureAttributionReporting:
- *t = PermissionsPolicyFeatureAttributionReporting
- case PermissionsPolicyFeatureAutoplay:
- *t = PermissionsPolicyFeatureAutoplay
- case PermissionsPolicyFeatureCamera:
- *t = PermissionsPolicyFeatureCamera
- case PermissionsPolicyFeatureChDpr:
- *t = PermissionsPolicyFeatureChDpr
- case PermissionsPolicyFeatureChDeviceMemory:
- *t = PermissionsPolicyFeatureChDeviceMemory
- case PermissionsPolicyFeatureChDownlink:
- *t = PermissionsPolicyFeatureChDownlink
- case PermissionsPolicyFeatureChEct:
- *t = PermissionsPolicyFeatureChEct
- case PermissionsPolicyFeatureChLang:
- *t = PermissionsPolicyFeatureChLang
- case PermissionsPolicyFeatureChPrefersColorScheme:
- *t = PermissionsPolicyFeatureChPrefersColorScheme
- case PermissionsPolicyFeatureChRtt:
- *t = PermissionsPolicyFeatureChRtt
- case PermissionsPolicyFeatureChUa:
- *t = PermissionsPolicyFeatureChUa
- case PermissionsPolicyFeatureChUaArch:
- *t = PermissionsPolicyFeatureChUaArch
- case PermissionsPolicyFeatureChUaBitness:
- *t = PermissionsPolicyFeatureChUaBitness
- case PermissionsPolicyFeatureChUaPlatform:
- *t = PermissionsPolicyFeatureChUaPlatform
- case PermissionsPolicyFeatureChUaModel:
- *t = PermissionsPolicyFeatureChUaModel
- case PermissionsPolicyFeatureChUaMobile:
- *t = PermissionsPolicyFeatureChUaMobile
- case PermissionsPolicyFeatureChUaFullVersion:
- *t = PermissionsPolicyFeatureChUaFullVersion
- case PermissionsPolicyFeatureChUaPlatformVersion:
- *t = PermissionsPolicyFeatureChUaPlatformVersion
- case PermissionsPolicyFeatureChViewportWidth:
- *t = PermissionsPolicyFeatureChViewportWidth
- case PermissionsPolicyFeatureChWidth:
- *t = PermissionsPolicyFeatureChWidth
- case PermissionsPolicyFeatureClipboardRead:
- *t = PermissionsPolicyFeatureClipboardRead
- case PermissionsPolicyFeatureClipboardWrite:
- *t = PermissionsPolicyFeatureClipboardWrite
- case PermissionsPolicyFeatureCrossOriginIsolated:
- *t = PermissionsPolicyFeatureCrossOriginIsolated
- case PermissionsPolicyFeatureDirectSockets:
- *t = PermissionsPolicyFeatureDirectSockets
- case PermissionsPolicyFeatureDisplayCapture:
- *t = PermissionsPolicyFeatureDisplayCapture
- case PermissionsPolicyFeatureDocumentDomain:
- *t = PermissionsPolicyFeatureDocumentDomain
- case PermissionsPolicyFeatureEncryptedMedia:
- *t = PermissionsPolicyFeatureEncryptedMedia
- case PermissionsPolicyFeatureExecutionWhileOutOfViewport:
- *t = PermissionsPolicyFeatureExecutionWhileOutOfViewport
- case PermissionsPolicyFeatureExecutionWhileNotRendered:
- *t = PermissionsPolicyFeatureExecutionWhileNotRendered
- case PermissionsPolicyFeatureFocusWithoutUserActivation:
- *t = PermissionsPolicyFeatureFocusWithoutUserActivation
- case PermissionsPolicyFeatureFullscreen:
- *t = PermissionsPolicyFeatureFullscreen
- case PermissionsPolicyFeatureFrobulate:
- *t = PermissionsPolicyFeatureFrobulate
- case PermissionsPolicyFeatureGamepad:
- *t = PermissionsPolicyFeatureGamepad
- case PermissionsPolicyFeatureGeolocation:
- *t = PermissionsPolicyFeatureGeolocation
- case PermissionsPolicyFeatureGyroscope:
- *t = PermissionsPolicyFeatureGyroscope
- case PermissionsPolicyFeatureHid:
- *t = PermissionsPolicyFeatureHid
- case PermissionsPolicyFeatureIdleDetection:
- *t = PermissionsPolicyFeatureIdleDetection
- case PermissionsPolicyFeatureInterestCohort:
- *t = PermissionsPolicyFeatureInterestCohort
- case PermissionsPolicyFeatureMagnetometer:
- *t = PermissionsPolicyFeatureMagnetometer
- case PermissionsPolicyFeatureMicrophone:
- *t = PermissionsPolicyFeatureMicrophone
- case PermissionsPolicyFeatureMidi:
- *t = PermissionsPolicyFeatureMidi
- case PermissionsPolicyFeatureOtpCredentials:
- *t = PermissionsPolicyFeatureOtpCredentials
- case PermissionsPolicyFeaturePayment:
- *t = PermissionsPolicyFeaturePayment
- case PermissionsPolicyFeaturePictureInPicture:
- *t = PermissionsPolicyFeaturePictureInPicture
- case PermissionsPolicyFeaturePublickeyCredentialsGet:
- *t = PermissionsPolicyFeaturePublickeyCredentialsGet
- case PermissionsPolicyFeatureScreenWakeLock:
- *t = PermissionsPolicyFeatureScreenWakeLock
- case PermissionsPolicyFeatureSerial:
- *t = PermissionsPolicyFeatureSerial
- case PermissionsPolicyFeatureSharedAutofill:
- *t = PermissionsPolicyFeatureSharedAutofill
- case PermissionsPolicyFeatureStorageAccessAPI:
- *t = PermissionsPolicyFeatureStorageAccessAPI
- case PermissionsPolicyFeatureSyncXhr:
- *t = PermissionsPolicyFeatureSyncXhr
- case PermissionsPolicyFeatureTrustTokenRedemption:
- *t = PermissionsPolicyFeatureTrustTokenRedemption
- case PermissionsPolicyFeatureUsb:
- *t = PermissionsPolicyFeatureUsb
- case PermissionsPolicyFeatureVerticalScroll:
- *t = PermissionsPolicyFeatureVerticalScroll
- case PermissionsPolicyFeatureWebShare:
- *t = PermissionsPolicyFeatureWebShare
- case PermissionsPolicyFeatureWindowPlacement:
- *t = PermissionsPolicyFeatureWindowPlacement
- case PermissionsPolicyFeatureXrSpatialTracking:
- *t = PermissionsPolicyFeatureXrSpatialTracking
-
- default:
- in.AddError(errors.New("unknown PermissionsPolicyFeature value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PermissionsPolicyFeature) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PermissionsPolicyBlockReason reason for a permissions policy feature to be
-// disabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyBlockReason
-type PermissionsPolicyBlockReason string
-
-// String returns the PermissionsPolicyBlockReason as string value.
-func (t PermissionsPolicyBlockReason) String() string {
- return string(t)
-}
-
-// PermissionsPolicyBlockReason values.
-const (
- PermissionsPolicyBlockReasonHeader PermissionsPolicyBlockReason = "Header"
- PermissionsPolicyBlockReasonIframeAttribute PermissionsPolicyBlockReason = "IframeAttribute"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PermissionsPolicyBlockReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PermissionsPolicyBlockReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PermissionsPolicyBlockReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PermissionsPolicyBlockReason(in.String()) {
- case PermissionsPolicyBlockReasonHeader:
- *t = PermissionsPolicyBlockReasonHeader
- case PermissionsPolicyBlockReasonIframeAttribute:
- *t = PermissionsPolicyBlockReasonIframeAttribute
-
- default:
- in.AddError(errors.New("unknown PermissionsPolicyBlockReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PermissionsPolicyBlockReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PermissionsPolicyBlockLocator [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyBlockLocator
-type PermissionsPolicyBlockLocator struct {
- FrameID cdp.FrameID `json:"frameId"`
- BlockReason PermissionsPolicyBlockReason `json:"blockReason"`
-}
-
-// PermissionsPolicyFeatureState [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyFeatureState
-type PermissionsPolicyFeatureState struct {
- Feature PermissionsPolicyFeature `json:"feature"`
- Allowed bool `json:"allowed"`
- Locator *PermissionsPolicyBlockLocator `json:"locator,omitempty"`
-}
-
-// FrameResource information about the Resource on the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameResource
-type FrameResource struct {
- URL string `json:"url"` // Resource URL.
- Type network.ResourceType `json:"type"` // Type of this resource.
- MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
- LastModified *cdp.TimeSinceEpoch `json:"lastModified,omitempty"` // last-modified timestamp as reported by server.
- ContentSize float64 `json:"contentSize,omitempty"` // Resource content size.
- Failed bool `json:"failed,omitempty"` // True if the resource failed to load.
- Canceled bool `json:"canceled,omitempty"` // True if the resource was canceled during loading.
-}
-
-// FrameResourceTree information about the Frame hierarchy along with their
-// cached resources.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameResourceTree
-type FrameResourceTree struct {
- Frame *cdp.Frame `json:"frame"` // Frame information for this tree item.
- ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"` // Child frames.
- Resources []*FrameResource `json:"resources"` // Information about frame resources.
-}
-
-// FrameTree information about the Frame hierarchy.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameTree
-type FrameTree struct {
- Frame *cdp.Frame `json:"frame"` // Frame information for this tree item.
- ChildFrames []*FrameTree `json:"childFrames,omitempty"` // Child frames.
-}
-
-// ScriptIdentifier unique script identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScriptIdentifier
-type ScriptIdentifier string
-
-// String returns the ScriptIdentifier as string value.
-func (t ScriptIdentifier) String() string {
- return string(t)
-}
-
-// TransitionType transition type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-TransitionType
-type TransitionType string
-
-// String returns the TransitionType as string value.
-func (t TransitionType) String() string {
- return string(t)
-}
-
-// TransitionType values.
-const (
- TransitionTypeLink TransitionType = "link"
- TransitionTypeTyped TransitionType = "typed"
- TransitionTypeAddressBar TransitionType = "address_bar"
- TransitionTypeAutoBookmark TransitionType = "auto_bookmark"
- TransitionTypeAutoSubframe TransitionType = "auto_subframe"
- TransitionTypeManualSubframe TransitionType = "manual_subframe"
- TransitionTypeGenerated TransitionType = "generated"
- TransitionTypeAutoToplevel TransitionType = "auto_toplevel"
- TransitionTypeFormSubmit TransitionType = "form_submit"
- TransitionTypeReload TransitionType = "reload"
- TransitionTypeKeyword TransitionType = "keyword"
- TransitionTypeKeywordGenerated TransitionType = "keyword_generated"
- TransitionTypeOther TransitionType = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TransitionType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TransitionType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TransitionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TransitionType(in.String()) {
- case TransitionTypeLink:
- *t = TransitionTypeLink
- case TransitionTypeTyped:
- *t = TransitionTypeTyped
- case TransitionTypeAddressBar:
- *t = TransitionTypeAddressBar
- case TransitionTypeAutoBookmark:
- *t = TransitionTypeAutoBookmark
- case TransitionTypeAutoSubframe:
- *t = TransitionTypeAutoSubframe
- case TransitionTypeManualSubframe:
- *t = TransitionTypeManualSubframe
- case TransitionTypeGenerated:
- *t = TransitionTypeGenerated
- case TransitionTypeAutoToplevel:
- *t = TransitionTypeAutoToplevel
- case TransitionTypeFormSubmit:
- *t = TransitionTypeFormSubmit
- case TransitionTypeReload:
- *t = TransitionTypeReload
- case TransitionTypeKeyword:
- *t = TransitionTypeKeyword
- case TransitionTypeKeywordGenerated:
- *t = TransitionTypeKeywordGenerated
- case TransitionTypeOther:
- *t = TransitionTypeOther
-
- default:
- in.AddError(errors.New("unknown TransitionType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TransitionType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// NavigationEntry navigation history entry.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-NavigationEntry
-type NavigationEntry struct {
- ID int64 `json:"id"` // Unique id of the navigation history entry.
- URL string `json:"url"` // URL of the navigation history entry.
- UserTypedURL string `json:"userTypedURL"` // URL that the user typed in the url bar.
- Title string `json:"title"` // Title of the navigation history entry.
- TransitionType TransitionType `json:"transitionType"` // Transition type.
-}
-
-// ScreencastFrameMetadata screencast frame metadata.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScreencastFrameMetadata
-type ScreencastFrameMetadata struct {
- OffsetTop float64 `json:"offsetTop"` // Top offset in DIP.
- PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor.
- DeviceWidth float64 `json:"deviceWidth"` // Device screen width in DIP.
- DeviceHeight float64 `json:"deviceHeight"` // Device screen height in DIP.
- ScrollOffsetX float64 `json:"scrollOffsetX"` // Position of horizontal scroll in CSS pixels.
- ScrollOffsetY float64 `json:"scrollOffsetY"` // Position of vertical scroll in CSS pixels.
- Timestamp *cdp.TimeSinceEpoch `json:"timestamp,omitempty"` // Frame swap timestamp.
-}
-
-// DialogType javascript dialog type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-DialogType
-type DialogType string
-
-// String returns the DialogType as string value.
-func (t DialogType) String() string {
- return string(t)
-}
-
-// DialogType values.
-const (
- DialogTypeAlert DialogType = "alert"
- DialogTypeConfirm DialogType = "confirm"
- DialogTypePrompt DialogType = "prompt"
- DialogTypeBeforeunload DialogType = "beforeunload"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t DialogType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t DialogType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *DialogType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch DialogType(in.String()) {
- case DialogTypeAlert:
- *t = DialogTypeAlert
- case DialogTypeConfirm:
- *t = DialogTypeConfirm
- case DialogTypePrompt:
- *t = DialogTypePrompt
- case DialogTypeBeforeunload:
- *t = DialogTypeBeforeunload
-
- default:
- in.AddError(errors.New("unknown DialogType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *DialogType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AppManifestError error while paring app manifest.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AppManifestError
-type AppManifestError struct {
- Message string `json:"message"` // Error message.
- Critical int64 `json:"critical"` // If criticial, this is a non-recoverable parse error.
- Line int64 `json:"line"` // Error line.
- Column int64 `json:"column"` // Error column.
-}
-
-// AppManifestParsedProperties parsed app manifest properties.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AppManifestParsedProperties
-type AppManifestParsedProperties struct {
- Scope string `json:"scope"` // Computed scope value
-}
-
-// LayoutViewport layout viewport position and dimensions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-LayoutViewport
-type LayoutViewport struct {
- PageX int64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels).
- PageY int64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
- ClientWidth int64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
- ClientHeight int64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
-}
-
-// VisualViewport visual viewport position, dimensions, and scale.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-VisualViewport
-type VisualViewport struct {
- OffsetX float64 `json:"offsetX"` // Horizontal offset relative to the layout viewport (CSS pixels).
- OffsetY float64 `json:"offsetY"` // Vertical offset relative to the layout viewport (CSS pixels).
- PageX float64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels).
- PageY float64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
- ClientWidth float64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
- ClientHeight float64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
- Scale float64 `json:"scale"` // Scale relative to the ideal viewport (size at width=device-width).
- Zoom float64 `json:"zoom,omitempty"` // Page zoom factor (CSS to device independent pixels ratio).
-}
-
-// Viewport viewport for capturing screenshot.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Viewport
-type Viewport struct {
- X float64 `json:"x"` // X offset in device independent pixels (dip).
- Y float64 `json:"y"` // Y offset in device independent pixels (dip).
- Width float64 `json:"width"` // Rectangle width in device independent pixels (dip).
- Height float64 `json:"height"` // Rectangle height in device independent pixels (dip).
- Scale float64 `json:"scale"` // Page scale factor.
-}
-
-// FontFamilies generic font families collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FontFamilies
-type FontFamilies struct {
- Standard string `json:"standard,omitempty"` // The standard font-family.
- Fixed string `json:"fixed,omitempty"` // The fixed font-family.
- Serif string `json:"serif,omitempty"` // The serif font-family.
- SansSerif string `json:"sansSerif,omitempty"` // The sansSerif font-family.
- Cursive string `json:"cursive,omitempty"` // The cursive font-family.
- Fantasy string `json:"fantasy,omitempty"` // The fantasy font-family.
- Pictograph string `json:"pictograph,omitempty"` // The pictograph font-family.
-}
-
-// FontSizes default font sizes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FontSizes
-type FontSizes struct {
- Standard int64 `json:"standard,omitempty"` // Default standard font size.
- Fixed int64 `json:"fixed,omitempty"` // Default fixed font size.
-}
-
-// ClientNavigationReason [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ClientNavigationReason
-type ClientNavigationReason string
-
-// String returns the ClientNavigationReason as string value.
-func (t ClientNavigationReason) String() string {
- return string(t)
-}
-
-// ClientNavigationReason values.
-const (
- ClientNavigationReasonFormSubmissionGet ClientNavigationReason = "formSubmissionGet"
- ClientNavigationReasonFormSubmissionPost ClientNavigationReason = "formSubmissionPost"
- ClientNavigationReasonHTTPHeaderRefresh ClientNavigationReason = "httpHeaderRefresh"
- ClientNavigationReasonScriptInitiated ClientNavigationReason = "scriptInitiated"
- ClientNavigationReasonMetaTagRefresh ClientNavigationReason = "metaTagRefresh"
- ClientNavigationReasonPageBlockInterstitial ClientNavigationReason = "pageBlockInterstitial"
- ClientNavigationReasonReload ClientNavigationReason = "reload"
- ClientNavigationReasonAnchorClick ClientNavigationReason = "anchorClick"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ClientNavigationReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ClientNavigationReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ClientNavigationReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ClientNavigationReason(in.String()) {
- case ClientNavigationReasonFormSubmissionGet:
- *t = ClientNavigationReasonFormSubmissionGet
- case ClientNavigationReasonFormSubmissionPost:
- *t = ClientNavigationReasonFormSubmissionPost
- case ClientNavigationReasonHTTPHeaderRefresh:
- *t = ClientNavigationReasonHTTPHeaderRefresh
- case ClientNavigationReasonScriptInitiated:
- *t = ClientNavigationReasonScriptInitiated
- case ClientNavigationReasonMetaTagRefresh:
- *t = ClientNavigationReasonMetaTagRefresh
- case ClientNavigationReasonPageBlockInterstitial:
- *t = ClientNavigationReasonPageBlockInterstitial
- case ClientNavigationReasonReload:
- *t = ClientNavigationReasonReload
- case ClientNavigationReasonAnchorClick:
- *t = ClientNavigationReasonAnchorClick
-
- default:
- in.AddError(errors.New("unknown ClientNavigationReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ClientNavigationReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ClientNavigationDisposition [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ClientNavigationDisposition
-type ClientNavigationDisposition string
-
-// String returns the ClientNavigationDisposition as string value.
-func (t ClientNavigationDisposition) String() string {
- return string(t)
-}
-
-// ClientNavigationDisposition values.
-const (
- ClientNavigationDispositionCurrentTab ClientNavigationDisposition = "currentTab"
- ClientNavigationDispositionNewTab ClientNavigationDisposition = "newTab"
- ClientNavigationDispositionNewWindow ClientNavigationDisposition = "newWindow"
- ClientNavigationDispositionDownload ClientNavigationDisposition = "download"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ClientNavigationDisposition) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ClientNavigationDisposition) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ClientNavigationDisposition) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ClientNavigationDisposition(in.String()) {
- case ClientNavigationDispositionCurrentTab:
- *t = ClientNavigationDispositionCurrentTab
- case ClientNavigationDispositionNewTab:
- *t = ClientNavigationDispositionNewTab
- case ClientNavigationDispositionNewWindow:
- *t = ClientNavigationDispositionNewWindow
- case ClientNavigationDispositionDownload:
- *t = ClientNavigationDispositionDownload
-
- default:
- in.AddError(errors.New("unknown ClientNavigationDisposition value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ClientNavigationDisposition) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// InstallabilityErrorArgument [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-InstallabilityErrorArgument
-type InstallabilityErrorArgument struct {
- Name string `json:"name"` // Argument name (e.g. name:'minimum-icon-size-in-pixels').
- Value string `json:"value"` // Argument value (e.g. value:'64').
-}
-
-// InstallabilityError the installability error.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-InstallabilityError
-type InstallabilityError struct {
- ErrorID string `json:"errorId"` // The error id (e.g. 'manifest-missing-suitable-icon').
- ErrorArguments []*InstallabilityErrorArgument `json:"errorArguments"` // The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
-}
-
-// ReferrerPolicy the referring-policy used for the navigation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ReferrerPolicy
-type ReferrerPolicy string
-
-// String returns the ReferrerPolicy as string value.
-func (t ReferrerPolicy) String() string {
- return string(t)
-}
-
-// ReferrerPolicy values.
-const (
- ReferrerPolicyNoReferrer ReferrerPolicy = "noReferrer"
- ReferrerPolicyNoReferrerWhenDowngrade ReferrerPolicy = "noReferrerWhenDowngrade"
- ReferrerPolicyOrigin ReferrerPolicy = "origin"
- ReferrerPolicyOriginWhenCrossOrigin ReferrerPolicy = "originWhenCrossOrigin"
- ReferrerPolicySameOrigin ReferrerPolicy = "sameOrigin"
- ReferrerPolicyStrictOrigin ReferrerPolicy = "strictOrigin"
- ReferrerPolicyStrictOriginWhenCrossOrigin ReferrerPolicy = "strictOriginWhenCrossOrigin"
- ReferrerPolicyUnsafeURL ReferrerPolicy = "unsafeUrl"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ReferrerPolicy) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ReferrerPolicy) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ReferrerPolicy(in.String()) {
- case ReferrerPolicyNoReferrer:
- *t = ReferrerPolicyNoReferrer
- case ReferrerPolicyNoReferrerWhenDowngrade:
- *t = ReferrerPolicyNoReferrerWhenDowngrade
- case ReferrerPolicyOrigin:
- *t = ReferrerPolicyOrigin
- case ReferrerPolicyOriginWhenCrossOrigin:
- *t = ReferrerPolicyOriginWhenCrossOrigin
- case ReferrerPolicySameOrigin:
- *t = ReferrerPolicySameOrigin
- case ReferrerPolicyStrictOrigin:
- *t = ReferrerPolicyStrictOrigin
- case ReferrerPolicyStrictOriginWhenCrossOrigin:
- *t = ReferrerPolicyStrictOriginWhenCrossOrigin
- case ReferrerPolicyUnsafeURL:
- *t = ReferrerPolicyUnsafeURL
-
- default:
- in.AddError(errors.New("unknown ReferrerPolicy value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ReferrerPolicy) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CompilationCacheParams per-script compilation cache parameters for
-// Page.produceCompilationCache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-CompilationCacheParams
-type CompilationCacheParams struct {
- URL string `json:"url"` // The URL of the script to produce a compilation cache entry for.
- Eager bool `json:"eager,omitempty"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).
-}
-
-// NavigationType the type of a frameNavigated event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-NavigationType
-type NavigationType string
-
-// String returns the NavigationType as string value.
-func (t NavigationType) String() string {
- return string(t)
-}
-
-// NavigationType values.
-const (
- NavigationTypeNavigation NavigationType = "Navigation"
- NavigationTypeBackForwardCacheRestore NavigationType = "BackForwardCacheRestore"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t NavigationType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t NavigationType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *NavigationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch NavigationType(in.String()) {
- case NavigationTypeNavigation:
- *t = NavigationTypeNavigation
- case NavigationTypeBackForwardCacheRestore:
- *t = NavigationTypeBackForwardCacheRestore
-
- default:
- in.AddError(errors.New("unknown NavigationType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *NavigationType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BackForwardCacheNotRestoredReason list of not restored reasons for
-// back-forward cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-BackForwardCacheNotRestoredReason
-type BackForwardCacheNotRestoredReason string
-
-// String returns the BackForwardCacheNotRestoredReason as string value.
-func (t BackForwardCacheNotRestoredReason) String() string {
- return string(t)
-}
-
-// BackForwardCacheNotRestoredReason values.
-const (
- BackForwardCacheNotRestoredReasonNotMainFrame BackForwardCacheNotRestoredReason = "NotMainFrame"
- BackForwardCacheNotRestoredReasonBackForwardCacheDisabled BackForwardCacheNotRestoredReason = "BackForwardCacheDisabled"
- BackForwardCacheNotRestoredReasonRelatedActiveContentsExist BackForwardCacheNotRestoredReason = "RelatedActiveContentsExist"
- BackForwardCacheNotRestoredReasonHTTPSTatusNotOK BackForwardCacheNotRestoredReason = "HTTPStatusNotOK"
- BackForwardCacheNotRestoredReasonSchemeNotHTTPOrHTTPS BackForwardCacheNotRestoredReason = "SchemeNotHTTPOrHTTPS"
- BackForwardCacheNotRestoredReasonLoading BackForwardCacheNotRestoredReason = "Loading"
- BackForwardCacheNotRestoredReasonWasGrantedMediaAccess BackForwardCacheNotRestoredReason = "WasGrantedMediaAccess"
- BackForwardCacheNotRestoredReasonDisableForRenderFrameHostCalled BackForwardCacheNotRestoredReason = "DisableForRenderFrameHostCalled"
- BackForwardCacheNotRestoredReasonDomainNotAllowed BackForwardCacheNotRestoredReason = "DomainNotAllowed"
- BackForwardCacheNotRestoredReasonHTTPMethodNotGET BackForwardCacheNotRestoredReason = "HTTPMethodNotGET"
- BackForwardCacheNotRestoredReasonSubframeIsNavigating BackForwardCacheNotRestoredReason = "SubframeIsNavigating"
- BackForwardCacheNotRestoredReasonTimeout BackForwardCacheNotRestoredReason = "Timeout"
- BackForwardCacheNotRestoredReasonCacheLimit BackForwardCacheNotRestoredReason = "CacheLimit"
- BackForwardCacheNotRestoredReasonJavaScriptExecution BackForwardCacheNotRestoredReason = "JavaScriptExecution"
- BackForwardCacheNotRestoredReasonRendererProcessKilled BackForwardCacheNotRestoredReason = "RendererProcessKilled"
- BackForwardCacheNotRestoredReasonRendererProcessCrashed BackForwardCacheNotRestoredReason = "RendererProcessCrashed"
- BackForwardCacheNotRestoredReasonGrantedMediaStreamAccess BackForwardCacheNotRestoredReason = "GrantedMediaStreamAccess"
- BackForwardCacheNotRestoredReasonSchedulerTrackedFeatureUsed BackForwardCacheNotRestoredReason = "SchedulerTrackedFeatureUsed"
- BackForwardCacheNotRestoredReasonConflictingBrowsingInstance BackForwardCacheNotRestoredReason = "ConflictingBrowsingInstance"
- BackForwardCacheNotRestoredReasonCacheFlushed BackForwardCacheNotRestoredReason = "CacheFlushed"
- BackForwardCacheNotRestoredReasonServiceWorkerVersionActivation BackForwardCacheNotRestoredReason = "ServiceWorkerVersionActivation"
- BackForwardCacheNotRestoredReasonSessionRestored BackForwardCacheNotRestoredReason = "SessionRestored"
- BackForwardCacheNotRestoredReasonServiceWorkerPostMessage BackForwardCacheNotRestoredReason = "ServiceWorkerPostMessage"
- BackForwardCacheNotRestoredReasonEnteredBackForwardCacheBeforeServiceWorkerHostAdded BackForwardCacheNotRestoredReason = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded"
- BackForwardCacheNotRestoredReasonRenderFrameHostReusedSameSite BackForwardCacheNotRestoredReason = "RenderFrameHostReused_SameSite"
- BackForwardCacheNotRestoredReasonRenderFrameHostReusedCrossSite BackForwardCacheNotRestoredReason = "RenderFrameHostReused_CrossSite"
- BackForwardCacheNotRestoredReasonServiceWorkerClaim BackForwardCacheNotRestoredReason = "ServiceWorkerClaim"
- BackForwardCacheNotRestoredReasonIgnoreEventAndEvict BackForwardCacheNotRestoredReason = "IgnoreEventAndEvict"
- BackForwardCacheNotRestoredReasonHaveInnerContents BackForwardCacheNotRestoredReason = "HaveInnerContents"
- BackForwardCacheNotRestoredReasonTimeoutPuttingInCache BackForwardCacheNotRestoredReason = "TimeoutPuttingInCache"
- BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByLowMemory BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByLowMemory"
- BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByCommandLine BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByCommandLine"
- BackForwardCacheNotRestoredReasonNetworkRequestDatapipeDrainedAsBytesConsumer BackForwardCacheNotRestoredReason = "NetworkRequestDatapipeDrainedAsBytesConsumer"
- BackForwardCacheNotRestoredReasonNetworkRequestRedirected BackForwardCacheNotRestoredReason = "NetworkRequestRedirected"
- BackForwardCacheNotRestoredReasonNetworkRequestTimeout BackForwardCacheNotRestoredReason = "NetworkRequestTimeout"
- BackForwardCacheNotRestoredReasonNetworkExceedsBufferLimit BackForwardCacheNotRestoredReason = "NetworkExceedsBufferLimit"
- BackForwardCacheNotRestoredReasonNavigationCancelledWhileRestoring BackForwardCacheNotRestoredReason = "NavigationCancelledWhileRestoring"
- BackForwardCacheNotRestoredReasonNotMostRecentNavigationEntry BackForwardCacheNotRestoredReason = "NotMostRecentNavigationEntry"
- BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForPrerender BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForPrerender"
- BackForwardCacheNotRestoredReasonUserAgentOverrideDiffers BackForwardCacheNotRestoredReason = "UserAgentOverrideDiffers"
- BackForwardCacheNotRestoredReasonForegroundCacheLimit BackForwardCacheNotRestoredReason = "ForegroundCacheLimit"
- BackForwardCacheNotRestoredReasonBrowsingInstanceNotSwapped BackForwardCacheNotRestoredReason = "BrowsingInstanceNotSwapped"
- BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForDelegate BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForDelegate"
- BackForwardCacheNotRestoredReasonOptInUnloadHeaderNotPresent BackForwardCacheNotRestoredReason = "OptInUnloadHeaderNotPresent"
- BackForwardCacheNotRestoredReasonUnloadHandlerExistsInMainFrame BackForwardCacheNotRestoredReason = "UnloadHandlerExistsInMainFrame"
- BackForwardCacheNotRestoredReasonUnloadHandlerExistsInSubFrame BackForwardCacheNotRestoredReason = "UnloadHandlerExistsInSubFrame"
- BackForwardCacheNotRestoredReasonServiceWorkerUnregistration BackForwardCacheNotRestoredReason = "ServiceWorkerUnregistration"
- BackForwardCacheNotRestoredReasonWebSocket BackForwardCacheNotRestoredReason = "WebSocket"
- BackForwardCacheNotRestoredReasonWebRTC BackForwardCacheNotRestoredReason = "WebRTC"
- BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoStore BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoStore"
- BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoCache BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoCache"
- BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoStore BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoStore"
- BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoCache"
- BackForwardCacheNotRestoredReasonContainsPlugins BackForwardCacheNotRestoredReason = "ContainsPlugins"
- BackForwardCacheNotRestoredReasonDocumentLoaded BackForwardCacheNotRestoredReason = "DocumentLoaded"
- BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet BackForwardCacheNotRestoredReason = "DedicatedWorkerOrWorklet"
- BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers"
- BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction BackForwardCacheNotRestoredReason = "OutstandingIndexedDBTransaction"
- BackForwardCacheNotRestoredReasonRequestedGeolocationPermission BackForwardCacheNotRestoredReason = "RequestedGeolocationPermission"
- BackForwardCacheNotRestoredReasonRequestedNotificationsPermission BackForwardCacheNotRestoredReason = "RequestedNotificationsPermission"
- BackForwardCacheNotRestoredReasonRequestedMIDIPermission BackForwardCacheNotRestoredReason = "RequestedMIDIPermission"
- BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission"
- BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission BackForwardCacheNotRestoredReason = "RequestedVideoCapturePermission"
- BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors BackForwardCacheNotRestoredReason = "RequestedBackForwardCacheBlockedSensors"
- BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission BackForwardCacheNotRestoredReason = "RequestedBackgroundWorkPermission"
- BackForwardCacheNotRestoredReasonBroadcastChannel BackForwardCacheNotRestoredReason = "BroadcastChannel"
- BackForwardCacheNotRestoredReasonIndexedDBConnection BackForwardCacheNotRestoredReason = "IndexedDBConnection"
- BackForwardCacheNotRestoredReasonWebXR BackForwardCacheNotRestoredReason = "WebXR"
- BackForwardCacheNotRestoredReasonSharedWorker BackForwardCacheNotRestoredReason = "SharedWorker"
- BackForwardCacheNotRestoredReasonWebLocks BackForwardCacheNotRestoredReason = "WebLocks"
- BackForwardCacheNotRestoredReasonWebHID BackForwardCacheNotRestoredReason = "WebHID"
- BackForwardCacheNotRestoredReasonWebShare BackForwardCacheNotRestoredReason = "WebShare"
- BackForwardCacheNotRestoredReasonRequestedStorageAccessGrant BackForwardCacheNotRestoredReason = "RequestedStorageAccessGrant"
- BackForwardCacheNotRestoredReasonWebNfc BackForwardCacheNotRestoredReason = "WebNfc"
- BackForwardCacheNotRestoredReasonWebFileSystem BackForwardCacheNotRestoredReason = "WebFileSystem"
- BackForwardCacheNotRestoredReasonOutstandingNetworkRequestFetch BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestFetch"
- BackForwardCacheNotRestoredReasonOutstandingNetworkRequestXHR BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestXHR"
- BackForwardCacheNotRestoredReasonAppBanner BackForwardCacheNotRestoredReason = "AppBanner"
- BackForwardCacheNotRestoredReasonPrinting BackForwardCacheNotRestoredReason = "Printing"
- BackForwardCacheNotRestoredReasonWebDatabase BackForwardCacheNotRestoredReason = "WebDatabase"
- BackForwardCacheNotRestoredReasonPictureInPicture BackForwardCacheNotRestoredReason = "PictureInPicture"
- BackForwardCacheNotRestoredReasonPortal BackForwardCacheNotRestoredReason = "Portal"
- BackForwardCacheNotRestoredReasonSpeechRecognizer BackForwardCacheNotRestoredReason = "SpeechRecognizer"
- BackForwardCacheNotRestoredReasonIdleManager BackForwardCacheNotRestoredReason = "IdleManager"
- BackForwardCacheNotRestoredReasonPaymentManager BackForwardCacheNotRestoredReason = "PaymentManager"
- BackForwardCacheNotRestoredReasonSpeechSynthesis BackForwardCacheNotRestoredReason = "SpeechSynthesis"
- BackForwardCacheNotRestoredReasonKeyboardLock BackForwardCacheNotRestoredReason = "KeyboardLock"
- BackForwardCacheNotRestoredReasonWebOTPService BackForwardCacheNotRestoredReason = "WebOTPService"
- BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestDirectSocket"
- BackForwardCacheNotRestoredReasonIsolatedWorldScript BackForwardCacheNotRestoredReason = "IsolatedWorldScript"
- BackForwardCacheNotRestoredReasonInjectedStyleSheet BackForwardCacheNotRestoredReason = "InjectedStyleSheet"
- BackForwardCacheNotRestoredReasonMediaSessionImplOnServiceCreated BackForwardCacheNotRestoredReason = "MediaSessionImplOnServiceCreated"
- BackForwardCacheNotRestoredReasonUnknown BackForwardCacheNotRestoredReason = "Unknown"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t BackForwardCacheNotRestoredReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t BackForwardCacheNotRestoredReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch BackForwardCacheNotRestoredReason(in.String()) {
- case BackForwardCacheNotRestoredReasonNotMainFrame:
- *t = BackForwardCacheNotRestoredReasonNotMainFrame
- case BackForwardCacheNotRestoredReasonBackForwardCacheDisabled:
- *t = BackForwardCacheNotRestoredReasonBackForwardCacheDisabled
- case BackForwardCacheNotRestoredReasonRelatedActiveContentsExist:
- *t = BackForwardCacheNotRestoredReasonRelatedActiveContentsExist
- case BackForwardCacheNotRestoredReasonHTTPSTatusNotOK:
- *t = BackForwardCacheNotRestoredReasonHTTPSTatusNotOK
- case BackForwardCacheNotRestoredReasonSchemeNotHTTPOrHTTPS:
- *t = BackForwardCacheNotRestoredReasonSchemeNotHTTPOrHTTPS
- case BackForwardCacheNotRestoredReasonLoading:
- *t = BackForwardCacheNotRestoredReasonLoading
- case BackForwardCacheNotRestoredReasonWasGrantedMediaAccess:
- *t = BackForwardCacheNotRestoredReasonWasGrantedMediaAccess
- case BackForwardCacheNotRestoredReasonDisableForRenderFrameHostCalled:
- *t = BackForwardCacheNotRestoredReasonDisableForRenderFrameHostCalled
- case BackForwardCacheNotRestoredReasonDomainNotAllowed:
- *t = BackForwardCacheNotRestoredReasonDomainNotAllowed
- case BackForwardCacheNotRestoredReasonHTTPMethodNotGET:
- *t = BackForwardCacheNotRestoredReasonHTTPMethodNotGET
- case BackForwardCacheNotRestoredReasonSubframeIsNavigating:
- *t = BackForwardCacheNotRestoredReasonSubframeIsNavigating
- case BackForwardCacheNotRestoredReasonTimeout:
- *t = BackForwardCacheNotRestoredReasonTimeout
- case BackForwardCacheNotRestoredReasonCacheLimit:
- *t = BackForwardCacheNotRestoredReasonCacheLimit
- case BackForwardCacheNotRestoredReasonJavaScriptExecution:
- *t = BackForwardCacheNotRestoredReasonJavaScriptExecution
- case BackForwardCacheNotRestoredReasonRendererProcessKilled:
- *t = BackForwardCacheNotRestoredReasonRendererProcessKilled
- case BackForwardCacheNotRestoredReasonRendererProcessCrashed:
- *t = BackForwardCacheNotRestoredReasonRendererProcessCrashed
- case BackForwardCacheNotRestoredReasonGrantedMediaStreamAccess:
- *t = BackForwardCacheNotRestoredReasonGrantedMediaStreamAccess
- case BackForwardCacheNotRestoredReasonSchedulerTrackedFeatureUsed:
- *t = BackForwardCacheNotRestoredReasonSchedulerTrackedFeatureUsed
- case BackForwardCacheNotRestoredReasonConflictingBrowsingInstance:
- *t = BackForwardCacheNotRestoredReasonConflictingBrowsingInstance
- case BackForwardCacheNotRestoredReasonCacheFlushed:
- *t = BackForwardCacheNotRestoredReasonCacheFlushed
- case BackForwardCacheNotRestoredReasonServiceWorkerVersionActivation:
- *t = BackForwardCacheNotRestoredReasonServiceWorkerVersionActivation
- case BackForwardCacheNotRestoredReasonSessionRestored:
- *t = BackForwardCacheNotRestoredReasonSessionRestored
- case BackForwardCacheNotRestoredReasonServiceWorkerPostMessage:
- *t = BackForwardCacheNotRestoredReasonServiceWorkerPostMessage
- case BackForwardCacheNotRestoredReasonEnteredBackForwardCacheBeforeServiceWorkerHostAdded:
- *t = BackForwardCacheNotRestoredReasonEnteredBackForwardCacheBeforeServiceWorkerHostAdded
- case BackForwardCacheNotRestoredReasonRenderFrameHostReusedSameSite:
- *t = BackForwardCacheNotRestoredReasonRenderFrameHostReusedSameSite
- case BackForwardCacheNotRestoredReasonRenderFrameHostReusedCrossSite:
- *t = BackForwardCacheNotRestoredReasonRenderFrameHostReusedCrossSite
- case BackForwardCacheNotRestoredReasonServiceWorkerClaim:
- *t = BackForwardCacheNotRestoredReasonServiceWorkerClaim
- case BackForwardCacheNotRestoredReasonIgnoreEventAndEvict:
- *t = BackForwardCacheNotRestoredReasonIgnoreEventAndEvict
- case BackForwardCacheNotRestoredReasonHaveInnerContents:
- *t = BackForwardCacheNotRestoredReasonHaveInnerContents
- case BackForwardCacheNotRestoredReasonTimeoutPuttingInCache:
- *t = BackForwardCacheNotRestoredReasonTimeoutPuttingInCache
- case BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByLowMemory:
- *t = BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByLowMemory
- case BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByCommandLine:
- *t = BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByCommandLine
- case BackForwardCacheNotRestoredReasonNetworkRequestDatapipeDrainedAsBytesConsumer:
- *t = BackForwardCacheNotRestoredReasonNetworkRequestDatapipeDrainedAsBytesConsumer
- case BackForwardCacheNotRestoredReasonNetworkRequestRedirected:
- *t = BackForwardCacheNotRestoredReasonNetworkRequestRedirected
- case BackForwardCacheNotRestoredReasonNetworkRequestTimeout:
- *t = BackForwardCacheNotRestoredReasonNetworkRequestTimeout
- case BackForwardCacheNotRestoredReasonNetworkExceedsBufferLimit:
- *t = BackForwardCacheNotRestoredReasonNetworkExceedsBufferLimit
- case BackForwardCacheNotRestoredReasonNavigationCancelledWhileRestoring:
- *t = BackForwardCacheNotRestoredReasonNavigationCancelledWhileRestoring
- case BackForwardCacheNotRestoredReasonNotMostRecentNavigationEntry:
- *t = BackForwardCacheNotRestoredReasonNotMostRecentNavigationEntry
- case BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForPrerender:
- *t = BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForPrerender
- case BackForwardCacheNotRestoredReasonUserAgentOverrideDiffers:
- *t = BackForwardCacheNotRestoredReasonUserAgentOverrideDiffers
- case BackForwardCacheNotRestoredReasonForegroundCacheLimit:
- *t = BackForwardCacheNotRestoredReasonForegroundCacheLimit
- case BackForwardCacheNotRestoredReasonBrowsingInstanceNotSwapped:
- *t = BackForwardCacheNotRestoredReasonBrowsingInstanceNotSwapped
- case BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForDelegate:
- *t = BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForDelegate
- case BackForwardCacheNotRestoredReasonOptInUnloadHeaderNotPresent:
- *t = BackForwardCacheNotRestoredReasonOptInUnloadHeaderNotPresent
- case BackForwardCacheNotRestoredReasonUnloadHandlerExistsInMainFrame:
- *t = BackForwardCacheNotRestoredReasonUnloadHandlerExistsInMainFrame
- case BackForwardCacheNotRestoredReasonUnloadHandlerExistsInSubFrame:
- *t = BackForwardCacheNotRestoredReasonUnloadHandlerExistsInSubFrame
- case BackForwardCacheNotRestoredReasonServiceWorkerUnregistration:
- *t = BackForwardCacheNotRestoredReasonServiceWorkerUnregistration
- case BackForwardCacheNotRestoredReasonWebSocket:
- *t = BackForwardCacheNotRestoredReasonWebSocket
- case BackForwardCacheNotRestoredReasonWebRTC:
- *t = BackForwardCacheNotRestoredReasonWebRTC
- case BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoStore:
- *t = BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoStore
- case BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoCache:
- *t = BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoCache
- case BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoStore:
- *t = BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoStore
- case BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache:
- *t = BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache
- case BackForwardCacheNotRestoredReasonContainsPlugins:
- *t = BackForwardCacheNotRestoredReasonContainsPlugins
- case BackForwardCacheNotRestoredReasonDocumentLoaded:
- *t = BackForwardCacheNotRestoredReasonDocumentLoaded
- case BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet:
- *t = BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet
- case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers:
- *t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers
- case BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction:
- *t = BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction
- case BackForwardCacheNotRestoredReasonRequestedGeolocationPermission:
- *t = BackForwardCacheNotRestoredReasonRequestedGeolocationPermission
- case BackForwardCacheNotRestoredReasonRequestedNotificationsPermission:
- *t = BackForwardCacheNotRestoredReasonRequestedNotificationsPermission
- case BackForwardCacheNotRestoredReasonRequestedMIDIPermission:
- *t = BackForwardCacheNotRestoredReasonRequestedMIDIPermission
- case BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission:
- *t = BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission
- case BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission:
- *t = BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission
- case BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors:
- *t = BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors
- case BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission:
- *t = BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission
- case BackForwardCacheNotRestoredReasonBroadcastChannel:
- *t = BackForwardCacheNotRestoredReasonBroadcastChannel
- case BackForwardCacheNotRestoredReasonIndexedDBConnection:
- *t = BackForwardCacheNotRestoredReasonIndexedDBConnection
- case BackForwardCacheNotRestoredReasonWebXR:
- *t = BackForwardCacheNotRestoredReasonWebXR
- case BackForwardCacheNotRestoredReasonSharedWorker:
- *t = BackForwardCacheNotRestoredReasonSharedWorker
- case BackForwardCacheNotRestoredReasonWebLocks:
- *t = BackForwardCacheNotRestoredReasonWebLocks
- case BackForwardCacheNotRestoredReasonWebHID:
- *t = BackForwardCacheNotRestoredReasonWebHID
- case BackForwardCacheNotRestoredReasonWebShare:
- *t = BackForwardCacheNotRestoredReasonWebShare
- case BackForwardCacheNotRestoredReasonRequestedStorageAccessGrant:
- *t = BackForwardCacheNotRestoredReasonRequestedStorageAccessGrant
- case BackForwardCacheNotRestoredReasonWebNfc:
- *t = BackForwardCacheNotRestoredReasonWebNfc
- case BackForwardCacheNotRestoredReasonWebFileSystem:
- *t = BackForwardCacheNotRestoredReasonWebFileSystem
- case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestFetch:
- *t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestFetch
- case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestXHR:
- *t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestXHR
- case BackForwardCacheNotRestoredReasonAppBanner:
- *t = BackForwardCacheNotRestoredReasonAppBanner
- case BackForwardCacheNotRestoredReasonPrinting:
- *t = BackForwardCacheNotRestoredReasonPrinting
- case BackForwardCacheNotRestoredReasonWebDatabase:
- *t = BackForwardCacheNotRestoredReasonWebDatabase
- case BackForwardCacheNotRestoredReasonPictureInPicture:
- *t = BackForwardCacheNotRestoredReasonPictureInPicture
- case BackForwardCacheNotRestoredReasonPortal:
- *t = BackForwardCacheNotRestoredReasonPortal
- case BackForwardCacheNotRestoredReasonSpeechRecognizer:
- *t = BackForwardCacheNotRestoredReasonSpeechRecognizer
- case BackForwardCacheNotRestoredReasonIdleManager:
- *t = BackForwardCacheNotRestoredReasonIdleManager
- case BackForwardCacheNotRestoredReasonPaymentManager:
- *t = BackForwardCacheNotRestoredReasonPaymentManager
- case BackForwardCacheNotRestoredReasonSpeechSynthesis:
- *t = BackForwardCacheNotRestoredReasonSpeechSynthesis
- case BackForwardCacheNotRestoredReasonKeyboardLock:
- *t = BackForwardCacheNotRestoredReasonKeyboardLock
- case BackForwardCacheNotRestoredReasonWebOTPService:
- *t = BackForwardCacheNotRestoredReasonWebOTPService
- case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket:
- *t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket
- case BackForwardCacheNotRestoredReasonIsolatedWorldScript:
- *t = BackForwardCacheNotRestoredReasonIsolatedWorldScript
- case BackForwardCacheNotRestoredReasonInjectedStyleSheet:
- *t = BackForwardCacheNotRestoredReasonInjectedStyleSheet
- case BackForwardCacheNotRestoredReasonMediaSessionImplOnServiceCreated:
- *t = BackForwardCacheNotRestoredReasonMediaSessionImplOnServiceCreated
- case BackForwardCacheNotRestoredReasonUnknown:
- *t = BackForwardCacheNotRestoredReasonUnknown
-
- default:
- in.AddError(errors.New("unknown BackForwardCacheNotRestoredReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BackForwardCacheNotRestoredReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BackForwardCacheNotRestoredReasonType types of not restored reasons for
-// back-forward cache.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-BackForwardCacheNotRestoredReasonType
-type BackForwardCacheNotRestoredReasonType string
-
-// String returns the BackForwardCacheNotRestoredReasonType as string value.
-func (t BackForwardCacheNotRestoredReasonType) String() string {
- return string(t)
-}
-
-// BackForwardCacheNotRestoredReasonType values.
-const (
- BackForwardCacheNotRestoredReasonTypeSupportPending BackForwardCacheNotRestoredReasonType = "SupportPending"
- BackForwardCacheNotRestoredReasonTypePageSupportNeeded BackForwardCacheNotRestoredReasonType = "PageSupportNeeded"
- BackForwardCacheNotRestoredReasonTypeCircumstantial BackForwardCacheNotRestoredReasonType = "Circumstantial"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t BackForwardCacheNotRestoredReasonType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t BackForwardCacheNotRestoredReasonType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *BackForwardCacheNotRestoredReasonType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch BackForwardCacheNotRestoredReasonType(in.String()) {
- case BackForwardCacheNotRestoredReasonTypeSupportPending:
- *t = BackForwardCacheNotRestoredReasonTypeSupportPending
- case BackForwardCacheNotRestoredReasonTypePageSupportNeeded:
- *t = BackForwardCacheNotRestoredReasonTypePageSupportNeeded
- case BackForwardCacheNotRestoredReasonTypeCircumstantial:
- *t = BackForwardCacheNotRestoredReasonTypeCircumstantial
-
- default:
- in.AddError(errors.New("unknown BackForwardCacheNotRestoredReasonType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *BackForwardCacheNotRestoredReasonType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// BackForwardCacheNotRestoredExplanation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-BackForwardCacheNotRestoredExplanation
-type BackForwardCacheNotRestoredExplanation struct {
- Type BackForwardCacheNotRestoredReasonType `json:"type"` // Type of the reason
- Reason BackForwardCacheNotRestoredReason `json:"reason"` // Not restored reason
-}
-
-// FileChooserOpenedMode input mode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
-type FileChooserOpenedMode string
-
-// String returns the FileChooserOpenedMode as string value.
-func (t FileChooserOpenedMode) String() string {
- return string(t)
-}
-
-// FileChooserOpenedMode values.
-const (
- FileChooserOpenedModeSelectSingle FileChooserOpenedMode = "selectSingle"
- FileChooserOpenedModeSelectMultiple FileChooserOpenedMode = "selectMultiple"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t FileChooserOpenedMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t FileChooserOpenedMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *FileChooserOpenedMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch FileChooserOpenedMode(in.String()) {
- case FileChooserOpenedModeSelectSingle:
- *t = FileChooserOpenedModeSelectSingle
- case FileChooserOpenedModeSelectMultiple:
- *t = FileChooserOpenedModeSelectMultiple
-
- default:
- in.AddError(errors.New("unknown FileChooserOpenedMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *FileChooserOpenedMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// FrameDetachedReason [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameDetached
-type FrameDetachedReason string
-
-// String returns the FrameDetachedReason as string value.
-func (t FrameDetachedReason) String() string {
- return string(t)
-}
-
-// FrameDetachedReason values.
-const (
- FrameDetachedReasonRemove FrameDetachedReason = "remove"
- FrameDetachedReasonSwap FrameDetachedReason = "swap"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t FrameDetachedReason) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t FrameDetachedReason) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *FrameDetachedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch FrameDetachedReason(in.String()) {
- case FrameDetachedReasonRemove:
- *t = FrameDetachedReasonRemove
- case FrameDetachedReasonSwap:
- *t = FrameDetachedReasonSwap
-
- default:
- in.AddError(errors.New("unknown FrameDetachedReason value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *FrameDetachedReason) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CaptureScreenshotFormat image compression format (defaults to png).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureScreenshot
-type CaptureScreenshotFormat string
-
-// String returns the CaptureScreenshotFormat as string value.
-func (t CaptureScreenshotFormat) String() string {
- return string(t)
-}
-
-// CaptureScreenshotFormat values.
-const (
- CaptureScreenshotFormatJpeg CaptureScreenshotFormat = "jpeg"
- CaptureScreenshotFormatPng CaptureScreenshotFormat = "png"
- CaptureScreenshotFormatWebp CaptureScreenshotFormat = "webp"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CaptureScreenshotFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CaptureScreenshotFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CaptureScreenshotFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CaptureScreenshotFormat(in.String()) {
- case CaptureScreenshotFormatJpeg:
- *t = CaptureScreenshotFormatJpeg
- case CaptureScreenshotFormatPng:
- *t = CaptureScreenshotFormatPng
- case CaptureScreenshotFormatWebp:
- *t = CaptureScreenshotFormatWebp
-
- default:
- in.AddError(errors.New("unknown CaptureScreenshotFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CaptureScreenshotFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CaptureSnapshotFormat format (defaults to mhtml).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureSnapshot
-type CaptureSnapshotFormat string
-
-// String returns the CaptureSnapshotFormat as string value.
-func (t CaptureSnapshotFormat) String() string {
- return string(t)
-}
-
-// CaptureSnapshotFormat values.
-const (
- CaptureSnapshotFormatMhtml CaptureSnapshotFormat = "mhtml"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CaptureSnapshotFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CaptureSnapshotFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CaptureSnapshotFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CaptureSnapshotFormat(in.String()) {
- case CaptureSnapshotFormatMhtml:
- *t = CaptureSnapshotFormatMhtml
-
- default:
- in.AddError(errors.New("unknown CaptureSnapshotFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CaptureSnapshotFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// PrintToPDFTransferMode return as stream.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-printToPDF
-type PrintToPDFTransferMode string
-
-// String returns the PrintToPDFTransferMode as string value.
-func (t PrintToPDFTransferMode) String() string {
- return string(t)
-}
-
-// PrintToPDFTransferMode values.
-const (
- PrintToPDFTransferModeReturnAsBase64 PrintToPDFTransferMode = "ReturnAsBase64"
- PrintToPDFTransferModeReturnAsStream PrintToPDFTransferMode = "ReturnAsStream"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t PrintToPDFTransferMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t PrintToPDFTransferMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *PrintToPDFTransferMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch PrintToPDFTransferMode(in.String()) {
- case PrintToPDFTransferModeReturnAsBase64:
- *t = PrintToPDFTransferModeReturnAsBase64
- case PrintToPDFTransferModeReturnAsStream:
- *t = PrintToPDFTransferModeReturnAsStream
-
- default:
- in.AddError(errors.New("unknown PrintToPDFTransferMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *PrintToPDFTransferMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetDownloadBehaviorBehavior whether to allow all or deny all download
-// requests, or use default Chrome behavior if available (otherwise deny).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDownloadBehavior
-type SetDownloadBehaviorBehavior string
-
-// String returns the SetDownloadBehaviorBehavior as string value.
-func (t SetDownloadBehaviorBehavior) String() string {
- return string(t)
-}
-
-// SetDownloadBehaviorBehavior values.
-const (
- SetDownloadBehaviorBehaviorDeny SetDownloadBehaviorBehavior = "deny"
- SetDownloadBehaviorBehaviorAllow SetDownloadBehaviorBehavior = "allow"
- SetDownloadBehaviorBehaviorDefault SetDownloadBehaviorBehavior = "default"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetDownloadBehaviorBehavior) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetDownloadBehaviorBehavior) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetDownloadBehaviorBehavior(in.String()) {
- case SetDownloadBehaviorBehaviorDeny:
- *t = SetDownloadBehaviorBehaviorDeny
- case SetDownloadBehaviorBehaviorAllow:
- *t = SetDownloadBehaviorBehaviorAllow
- case SetDownloadBehaviorBehaviorDefault:
- *t = SetDownloadBehaviorBehaviorDefault
-
- default:
- in.AddError(errors.New("unknown SetDownloadBehaviorBehavior value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetDownloadBehaviorBehavior) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ScreencastFormat image compression format.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-startScreencast
-type ScreencastFormat string
-
-// String returns the ScreencastFormat as string value.
-func (t ScreencastFormat) String() string {
- return string(t)
-}
-
-// ScreencastFormat values.
-const (
- ScreencastFormatJpeg ScreencastFormat = "jpeg"
- ScreencastFormatPng ScreencastFormat = "png"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ScreencastFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ScreencastFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ScreencastFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ScreencastFormat(in.String()) {
- case ScreencastFormatJpeg:
- *t = ScreencastFormatJpeg
- case ScreencastFormatPng:
- *t = ScreencastFormatPng
-
- default:
- in.AddError(errors.New("unknown ScreencastFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ScreencastFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SetWebLifecycleStateState target lifecycle state.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
-type SetWebLifecycleStateState string
-
-// String returns the SetWebLifecycleStateState as string value.
-func (t SetWebLifecycleStateState) String() string {
- return string(t)
-}
-
-// SetWebLifecycleStateState values.
-const (
- SetWebLifecycleStateStateFrozen SetWebLifecycleStateState = "frozen"
- SetWebLifecycleStateStateActive SetWebLifecycleStateState = "active"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SetWebLifecycleStateState) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SetWebLifecycleStateState) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SetWebLifecycleStateState) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SetWebLifecycleStateState(in.String()) {
- case SetWebLifecycleStateStateFrozen:
- *t = SetWebLifecycleStateStateFrozen
- case SetWebLifecycleStateStateActive:
- *t = SetWebLifecycleStateStateActive
-
- default:
- in.AddError(errors.New("unknown SetWebLifecycleStateState value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SetWebLifecycleStateState) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/performance/easyjson.go b/vendor/github.com/chromedp/cdproto/performance/easyjson.go
deleted file mode 100644
index 9c2c1ce9c29..00000000000
--- a/vendor/github.com/chromedp/cdproto/performance/easyjson.go
+++ /dev/null
@@ -1,503 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package performance
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance(in *jlexer.Lexer, out *Metric) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance(out *jwriter.Writer, in Metric) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.Float64(float64(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Metric) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Metric) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Metric) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Metric) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance1(in *jlexer.Lexer, out *GetMetricsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "metrics":
- if in.IsNull() {
- in.Skip()
- out.Metrics = nil
- } else {
- in.Delim('[')
- if out.Metrics == nil {
- if !in.IsDelim(']') {
- out.Metrics = make([]*Metric, 0, 8)
- } else {
- out.Metrics = []*Metric{}
- }
- } else {
- out.Metrics = (out.Metrics)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *Metric
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(Metric)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Metrics = append(out.Metrics, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance1(out *jwriter.Writer, in GetMetricsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Metrics) != 0 {
- const prefix string = ",\"metrics\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.Metrics {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMetricsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMetricsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMetricsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMetricsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance2(in *jlexer.Lexer, out *GetMetricsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance2(out *jwriter.Writer, in GetMetricsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetMetricsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetMetricsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetMetricsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetMetricsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance3(in *jlexer.Lexer, out *EventMetrics) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "metrics":
- if in.IsNull() {
- in.Skip()
- out.Metrics = nil
- } else {
- in.Delim('[')
- if out.Metrics == nil {
- if !in.IsDelim(']') {
- out.Metrics = make([]*Metric, 0, 8)
- } else {
- out.Metrics = []*Metric{}
- }
- } else {
- out.Metrics = (out.Metrics)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Metric
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Metric)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Metrics = append(out.Metrics, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "title":
- out.Title = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance3(out *jwriter.Writer, in EventMetrics) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"metrics\":"
- out.RawString(prefix[1:])
- if in.Metrics == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Metrics {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventMetrics) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventMetrics) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventMetrics) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventMetrics) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance4(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timeDomain":
- (out.TimeDomain).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance4(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TimeDomain != "" {
- const prefix string = ",\"timeDomain\":"
- first = false
- out.RawString(prefix[1:])
- (in.TimeDomain).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance5(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance5(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformance5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformance5(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/performance/events.go b/vendor/github.com/chromedp/cdproto/performance/events.go
deleted file mode 100644
index ad22007047e..00000000000
--- a/vendor/github.com/chromedp/cdproto/performance/events.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package performance
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventMetrics current values of the metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#event-metrics
-type EventMetrics struct {
- Metrics []*Metric `json:"metrics"` // Current values of the metrics.
- Title string `json:"title"` // Timestamp title.
-}
diff --git a/vendor/github.com/chromedp/cdproto/performance/performance.go b/vendor/github.com/chromedp/cdproto/performance/performance.go
deleted file mode 100644
index feb04915a6f..00000000000
--- a/vendor/github.com/chromedp/cdproto/performance/performance.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Package performance provides the Chrome DevTools Protocol
-// commands, types, and events for the Performance domain.
-//
-// Generated by the cdproto-gen command.
-package performance
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DisableParams disable collecting and reporting metrics.
-type DisableParams struct{}
-
-// Disable disable collecting and reporting metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Performance.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enable collecting and reporting metrics.
-type EnableParams struct {
- TimeDomain EnableTimeDomain `json:"timeDomain,omitempty"` // Time domain to use for collecting and reporting duration metrics.
-}
-
-// Enable enable collecting and reporting metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-enable
-//
-// parameters:
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// WithTimeDomain time domain to use for collecting and reporting duration
-// metrics.
-func (p EnableParams) WithTimeDomain(timeDomain EnableTimeDomain) *EnableParams {
- p.TimeDomain = timeDomain
- return &p
-}
-
-// Do executes Performance.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, p, nil)
-}
-
-// GetMetricsParams retrieve current values of run-time metrics.
-type GetMetricsParams struct{}
-
-// GetMetrics retrieve current values of run-time metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-getMetrics
-func GetMetrics() *GetMetricsParams {
- return &GetMetricsParams{}
-}
-
-// GetMetricsReturns return values.
-type GetMetricsReturns struct {
- Metrics []*Metric `json:"metrics,omitempty"` // Current values for run-time metrics.
-}
-
-// Do executes Performance.getMetrics against the provided context.
-//
-// returns:
-// metrics - Current values for run-time metrics.
-func (p *GetMetricsParams) Do(ctx context.Context) (metrics []*Metric, err error) {
- // execute
- var res GetMetricsReturns
- err = cdp.Execute(ctx, CommandGetMetrics, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Metrics, nil
-}
-
-// Command names.
-const (
- CommandDisable = "Performance.disable"
- CommandEnable = "Performance.enable"
- CommandGetMetrics = "Performance.getMetrics"
-)
diff --git a/vendor/github.com/chromedp/cdproto/performance/types.go b/vendor/github.com/chromedp/cdproto/performance/types.go
deleted file mode 100644
index cc67838f8c2..00000000000
--- a/vendor/github.com/chromedp/cdproto/performance/types.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package performance
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// Metric run-time execution metric.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#type-Metric
-type Metric struct {
- Name string `json:"name"` // Metric name.
- Value float64 `json:"value"` // Metric value.
-}
-
-// EnableTimeDomain time domain to use for collecting and reporting duration
-// metrics.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Performance#method-enable
-type EnableTimeDomain string
-
-// String returns the EnableTimeDomain as string value.
-func (t EnableTimeDomain) String() string {
- return string(t)
-}
-
-// EnableTimeDomain values.
-const (
- EnableTimeDomainTimeTicks EnableTimeDomain = "timeTicks"
- EnableTimeDomainThreadTicks EnableTimeDomain = "threadTicks"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t EnableTimeDomain) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t EnableTimeDomain) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *EnableTimeDomain) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch EnableTimeDomain(in.String()) {
- case EnableTimeDomainTimeTicks:
- *t = EnableTimeDomainTimeTicks
- case EnableTimeDomainThreadTicks:
- *t = EnableTimeDomainThreadTicks
-
- default:
- in.AddError(errors.New("unknown EnableTimeDomain value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *EnableTimeDomain) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/performancetimeline/easyjson.go b/vendor/github.com/chromedp/cdproto/performancetimeline/easyjson.go
deleted file mode 100644
index 7a9887136c7..00000000000
--- a/vendor/github.com/chromedp/cdproto/performancetimeline/easyjson.go
+++ /dev/null
@@ -1,705 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package performancetimeline
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- dom "github.com/chromedp/cdproto/dom"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline(in *jlexer.Lexer, out *TimelineEvent) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "frameId":
- (out.FrameID).UnmarshalEasyJSON(in)
- case "type":
- out.Type = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "time":
- if in.IsNull() {
- in.Skip()
- out.Time = nil
- } else {
- if out.Time == nil {
- out.Time = new(cdp.TimeSinceEpoch)
- }
- (*out.Time).UnmarshalEasyJSON(in)
- }
- case "duration":
- out.Duration = float64(in.Float64())
- case "lcpDetails":
- if in.IsNull() {
- in.Skip()
- out.LcpDetails = nil
- } else {
- if out.LcpDetails == nil {
- out.LcpDetails = new(LargestContentfulPaint)
- }
- (*out.LcpDetails).UnmarshalEasyJSON(in)
- }
- case "layoutShiftDetails":
- if in.IsNull() {
- in.Skip()
- out.LayoutShiftDetails = nil
- } else {
- if out.LayoutShiftDetails == nil {
- out.LayoutShiftDetails = new(LayoutShift)
- }
- (*out.LayoutShiftDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline(out *jwriter.Writer, in TimelineEvent) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"frameId\":"
- out.RawString(prefix[1:])
- out.String(string(in.FrameID))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- out.String(string(in.Type))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"time\":"
- out.RawString(prefix)
- if in.Time == nil {
- out.RawString("null")
- } else {
- (*in.Time).MarshalEasyJSON(out)
- }
- }
- if in.Duration != 0 {
- const prefix string = ",\"duration\":"
- out.RawString(prefix)
- out.Float64(float64(in.Duration))
- }
- if in.LcpDetails != nil {
- const prefix string = ",\"lcpDetails\":"
- out.RawString(prefix)
- (*in.LcpDetails).MarshalEasyJSON(out)
- }
- if in.LayoutShiftDetails != nil {
- const prefix string = ",\"layoutShiftDetails\":"
- out.RawString(prefix)
- (*in.LayoutShiftDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TimelineEvent) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TimelineEvent) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TimelineEvent) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TimelineEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1(in *jlexer.Lexer, out *LayoutShiftAttribution) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "previousRect":
- if in.IsNull() {
- in.Skip()
- out.PreviousRect = nil
- } else {
- if out.PreviousRect == nil {
- out.PreviousRect = new(dom.Rect)
- }
- (*out.PreviousRect).UnmarshalEasyJSON(in)
- }
- case "currentRect":
- if in.IsNull() {
- in.Skip()
- out.CurrentRect = nil
- } else {
- if out.CurrentRect == nil {
- out.CurrentRect = new(dom.Rect)
- }
- (*out.CurrentRect).UnmarshalEasyJSON(in)
- }
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1(out *jwriter.Writer, in LayoutShiftAttribution) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"previousRect\":"
- out.RawString(prefix[1:])
- if in.PreviousRect == nil {
- out.RawString("null")
- } else {
- (*in.PreviousRect).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"currentRect\":"
- out.RawString(prefix)
- if in.CurrentRect == nil {
- out.RawString("null")
- } else {
- (*in.CurrentRect).MarshalEasyJSON(out)
- }
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LayoutShiftAttribution) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LayoutShiftAttribution) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LayoutShiftAttribution) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LayoutShiftAttribution) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2(in *jlexer.Lexer, out *LayoutShift) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- out.Value = float64(in.Float64())
- case "hadRecentInput":
- out.HadRecentInput = bool(in.Bool())
- case "lastInputTime":
- if in.IsNull() {
- in.Skip()
- out.LastInputTime = nil
- } else {
- if out.LastInputTime == nil {
- out.LastInputTime = new(cdp.TimeSinceEpoch)
- }
- (*out.LastInputTime).UnmarshalEasyJSON(in)
- }
- case "sources":
- if in.IsNull() {
- in.Skip()
- out.Sources = nil
- } else {
- in.Delim('[')
- if out.Sources == nil {
- if !in.IsDelim(']') {
- out.Sources = make([]*LayoutShiftAttribution, 0, 8)
- } else {
- out.Sources = []*LayoutShiftAttribution{}
- }
- } else {
- out.Sources = (out.Sources)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *LayoutShiftAttribution
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(LayoutShiftAttribution)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Sources = append(out.Sources, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2(out *jwriter.Writer, in LayoutShift) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Value))
- }
- {
- const prefix string = ",\"hadRecentInput\":"
- out.RawString(prefix)
- out.Bool(bool(in.HadRecentInput))
- }
- {
- const prefix string = ",\"lastInputTime\":"
- out.RawString(prefix)
- if in.LastInputTime == nil {
- out.RawString("null")
- } else {
- (*in.LastInputTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"sources\":"
- out.RawString(prefix)
- if in.Sources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Sources {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LayoutShift) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LayoutShift) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LayoutShift) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LayoutShift) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3(in *jlexer.Lexer, out *LargestContentfulPaint) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "renderTime":
- if in.IsNull() {
- in.Skip()
- out.RenderTime = nil
- } else {
- if out.RenderTime == nil {
- out.RenderTime = new(cdp.TimeSinceEpoch)
- }
- (*out.RenderTime).UnmarshalEasyJSON(in)
- }
- case "loadTime":
- if in.IsNull() {
- in.Skip()
- out.LoadTime = nil
- } else {
- if out.LoadTime == nil {
- out.LoadTime = new(cdp.TimeSinceEpoch)
- }
- (*out.LoadTime).UnmarshalEasyJSON(in)
- }
- case "size":
- out.Size = float64(in.Float64())
- case "elementId":
- out.ElementID = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "nodeId":
- (out.NodeID).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3(out *jwriter.Writer, in LargestContentfulPaint) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"renderTime\":"
- out.RawString(prefix[1:])
- if in.RenderTime == nil {
- out.RawString("null")
- } else {
- (*in.RenderTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"loadTime\":"
- out.RawString(prefix)
- if in.LoadTime == nil {
- out.RawString("null")
- } else {
- (*in.LoadTime).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix)
- out.Float64(float64(in.Size))
- }
- if in.ElementID != "" {
- const prefix string = ",\"elementId\":"
- out.RawString(prefix)
- out.String(string(in.ElementID))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.NodeID != 0 {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v LargestContentfulPaint) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v LargestContentfulPaint) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *LargestContentfulPaint) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *LargestContentfulPaint) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4(in *jlexer.Lexer, out *EventTimelineEventAdded) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "event":
- if in.IsNull() {
- in.Skip()
- out.Event = nil
- } else {
- if out.Event == nil {
- out.Event = new(TimelineEvent)
- }
- (*out.Event).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4(out *jwriter.Writer, in EventTimelineEventAdded) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"event\":"
- out.RawString(prefix[1:])
- if in.Event == nil {
- out.RawString("null")
- } else {
- (*in.Event).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTimelineEventAdded) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTimelineEventAdded) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTimelineEventAdded) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTimelineEventAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "eventTypes":
- if in.IsNull() {
- in.Skip()
- out.EventTypes = nil
- } else {
- in.Delim('[')
- if out.EventTypes == nil {
- if !in.IsDelim(']') {
- out.EventTypes = make([]string, 0, 4)
- } else {
- out.EventTypes = []string{}
- }
- } else {
- out.EventTypes = (out.EventTypes)[:0]
- }
- for !in.IsDelim(']') {
- var v4 string
- v4 = string(in.String())
- out.EventTypes = append(out.EventTypes, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"eventTypes\":"
- out.RawString(prefix[1:])
- if in.EventTypes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.EventTypes {
- if v5 > 0 {
- out.RawByte(',')
- }
- out.String(string(v6))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPerformancetimeline5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPerformancetimeline5(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/performancetimeline/events.go b/vendor/github.com/chromedp/cdproto/performancetimeline/events.go
deleted file mode 100644
index 740d0e45ffb..00000000000
--- a/vendor/github.com/chromedp/cdproto/performancetimeline/events.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package performancetimeline
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventTimelineEventAdded sent when a performance timeline event is added.
-// See reportPerformanceTimeline method.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#event-timelineEventAdded
-type EventTimelineEventAdded struct {
- Event *TimelineEvent `json:"event"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go b/vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go
deleted file mode 100644
index 91462c35e41..00000000000
--- a/vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Package performancetimeline provides the Chrome DevTools Protocol
-// commands, types, and events for the PerformanceTimeline domain.
-//
-// Reporting of performance timeline events, as specified in
-// https://w3c.github.io/performance-timeline/#dom-performanceobserver.
-//
-// Generated by the cdproto-gen command.
-package performancetimeline
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams previously buffered events would be reported before method
-// returns. See also: timelineEventAdded.
-type EnableParams struct {
- EventTypes []string `json:"eventTypes"` // The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.
-}
-
-// Enable previously buffered events would be reported before method returns.
-// See also: timelineEventAdded.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#method-enable
-//
-// parameters:
-// eventTypes - The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.
-func Enable(eventTypes []string) *EnableParams {
- return &EnableParams{
- EventTypes: eventTypes,
- }
-}
-
-// Do executes PerformanceTimeline.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, p, nil)
-}
-
-// Command names.
-const (
- CommandEnable = "PerformanceTimeline.enable"
-)
diff --git a/vendor/github.com/chromedp/cdproto/performancetimeline/types.go b/vendor/github.com/chromedp/cdproto/performancetimeline/types.go
deleted file mode 100644
index 887a37cbf61..00000000000
--- a/vendor/github.com/chromedp/cdproto/performancetimeline/types.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package performancetimeline
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
-)
-
-// LargestContentfulPaint see https://github.com/WICG/LargestContentfulPaint
-// and largest_contentful_paint.idl.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LargestContentfulPaint
-type LargestContentfulPaint struct {
- RenderTime *cdp.TimeSinceEpoch `json:"renderTime"`
- LoadTime *cdp.TimeSinceEpoch `json:"loadTime"`
- Size float64 `json:"size"` // The number of pixels being painted.
- ElementID string `json:"elementId,omitempty"` // The id attribute of the element, if available.
- URL string `json:"url,omitempty"` // The URL of the image (may be trimmed).
- NodeID cdp.BackendNodeID `json:"nodeId,omitempty"`
-}
-
-// LayoutShiftAttribution [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShiftAttribution
-type LayoutShiftAttribution struct {
- PreviousRect *dom.Rect `json:"previousRect"`
- CurrentRect *dom.Rect `json:"currentRect"`
- NodeID cdp.BackendNodeID `json:"nodeId,omitempty"`
-}
-
-// LayoutShift see
-// https://wicg.github.io/layout-instability/#sec-layout-shift and
-// layout_shift.idl.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-LayoutShift
-type LayoutShift struct {
- Value float64 `json:"value"` // Score increment produced by this event.
- HadRecentInput bool `json:"hadRecentInput"`
- LastInputTime *cdp.TimeSinceEpoch `json:"lastInputTime"`
- Sources []*LayoutShiftAttribution `json:"sources"`
-}
-
-// TimelineEvent [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#type-TimelineEvent
-type TimelineEvent struct {
- FrameID cdp.FrameID `json:"frameId"` // Identifies the frame that this event is related to. Empty for non-frame targets.
- Type string `json:"type"` // The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fiedls is present.
- Name string `json:"name"` // Name may be empty depending on the type.
- Time *cdp.TimeSinceEpoch `json:"time"` // Time in seconds since Epoch, monotonically increasing within document lifetime.
- Duration float64 `json:"duration,omitempty"` // Event duration, if applicable.
- LcpDetails *LargestContentfulPaint `json:"lcpDetails,omitempty"`
- LayoutShiftDetails *LayoutShift `json:"layoutShiftDetails,omitempty"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/profiler/easyjson.go b/vendor/github.com/chromedp/cdproto/profiler/easyjson.go
deleted file mode 100644
index e3a8e4c4545..00000000000
--- a/vendor/github.com/chromedp/cdproto/profiler/easyjson.go
+++ /dev/null
@@ -1,3392 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package profiler
-
-import (
- json "encoding/json"
- debugger "github.com/chromedp/cdproto/debugger"
- runtime "github.com/chromedp/cdproto/runtime"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler(in *jlexer.Lexer, out *TypeProfileEntry) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "offset":
- out.Offset = int64(in.Int64())
- case "types":
- if in.IsNull() {
- in.Skip()
- out.Types = nil
- } else {
- in.Delim('[')
- if out.Types == nil {
- if !in.IsDelim(']') {
- out.Types = make([]*TypeObject, 0, 8)
- } else {
- out.Types = []*TypeObject{}
- }
- } else {
- out.Types = (out.Types)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *TypeObject
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(TypeObject)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Types = append(out.Types, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler(out *jwriter.Writer, in TypeProfileEntry) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"offset\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Offset))
- }
- {
- const prefix string = ",\"types\":"
- out.RawString(prefix)
- if in.Types == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Types {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TypeProfileEntry) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TypeProfileEntry) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TypeProfileEntry) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TypeProfileEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler1(in *jlexer.Lexer, out *TypeObject) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler1(out *jwriter.Writer, in TypeObject) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TypeObject) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TypeObject) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TypeObject) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TypeObject) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler2(in *jlexer.Lexer, out *TakeTypeProfileReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*ScriptTypeProfile, 0, 8)
- } else {
- out.Result = []*ScriptTypeProfile{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *ScriptTypeProfile
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(ScriptTypeProfile)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler2(out *jwriter.Writer, in TakeTypeProfileReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.Result {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeTypeProfileReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeTypeProfileReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeTypeProfileReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeTypeProfileReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler3(in *jlexer.Lexer, out *TakeTypeProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler3(out *jwriter.Writer, in TakeTypeProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakeTypeProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakeTypeProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakeTypeProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakeTypeProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler4(in *jlexer.Lexer, out *TakePreciseCoverageReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*ScriptCoverage, 0, 8)
- } else {
- out.Result = []*ScriptCoverage{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *ScriptCoverage
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(ScriptCoverage)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "timestamp":
- out.Timestamp = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler4(out *jwriter.Writer, in TakePreciseCoverageReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Result {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Timestamp != 0 {
- const prefix string = ",\"timestamp\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Timestamp))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakePreciseCoverageReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakePreciseCoverageReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakePreciseCoverageReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakePreciseCoverageReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler5(in *jlexer.Lexer, out *TakePreciseCoverageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler5(out *jwriter.Writer, in TakePreciseCoverageParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TakePreciseCoverageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TakePreciseCoverageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TakePreciseCoverageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TakePreciseCoverageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler6(in *jlexer.Lexer, out *StopTypeProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler6(out *jwriter.Writer, in StopTypeProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopTypeProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopTypeProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopTypeProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopTypeProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler7(in *jlexer.Lexer, out *StopReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(Profile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler7(out *jwriter.Writer, in StopReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Profile != nil {
- const prefix string = ",\"profile\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Profile).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler8(in *jlexer.Lexer, out *StopPreciseCoverageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler8(out *jwriter.Writer, in StopPreciseCoverageParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopPreciseCoverageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopPreciseCoverageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopPreciseCoverageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopPreciseCoverageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler9(in *jlexer.Lexer, out *StopParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler9(out *jwriter.Writer, in StopParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler10(in *jlexer.Lexer, out *StartTypeProfileParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler10(out *jwriter.Writer, in StartTypeProfileParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartTypeProfileParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartTypeProfileParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartTypeProfileParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartTypeProfileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler11(in *jlexer.Lexer, out *StartPreciseCoverageReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- out.Timestamp = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler11(out *jwriter.Writer, in StartPreciseCoverageReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Timestamp != 0 {
- const prefix string = ",\"timestamp\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.Timestamp))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartPreciseCoverageReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartPreciseCoverageReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartPreciseCoverageReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartPreciseCoverageReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler12(in *jlexer.Lexer, out *StartPreciseCoverageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "callCount":
- out.CallCount = bool(in.Bool())
- case "detailed":
- out.Detailed = bool(in.Bool())
- case "allowTriggeredUpdates":
- out.AllowTriggeredUpdates = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler12(out *jwriter.Writer, in StartPreciseCoverageParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.CallCount {
- const prefix string = ",\"callCount\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.CallCount))
- }
- if in.Detailed {
- const prefix string = ",\"detailed\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Detailed))
- }
- if in.AllowTriggeredUpdates {
- const prefix string = ",\"allowTriggeredUpdates\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.AllowTriggeredUpdates))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartPreciseCoverageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartPreciseCoverageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartPreciseCoverageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartPreciseCoverageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler13(in *jlexer.Lexer, out *StartParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler13(out *jwriter.Writer, in StartParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler14(in *jlexer.Lexer, out *SetSamplingIntervalParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "interval":
- out.Interval = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler14(out *jwriter.Writer, in SetSamplingIntervalParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"interval\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Interval))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetSamplingIntervalParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetSamplingIntervalParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetSamplingIntervalParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetSamplingIntervalParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler15(in *jlexer.Lexer, out *ScriptTypeProfile) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "entries":
- if in.IsNull() {
- in.Skip()
- out.Entries = nil
- } else {
- in.Delim('[')
- if out.Entries == nil {
- if !in.IsDelim(']') {
- out.Entries = make([]*TypeProfileEntry, 0, 8)
- } else {
- out.Entries = []*TypeProfileEntry{}
- }
- } else {
- out.Entries = (out.Entries)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *TypeProfileEntry
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(TypeProfileEntry)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Entries = append(out.Entries, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler15(out *jwriter.Writer, in ScriptTypeProfile) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"entries\":"
- out.RawString(prefix)
- if in.Entries == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Entries {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScriptTypeProfile) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScriptTypeProfile) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScriptTypeProfile) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScriptTypeProfile) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler16(in *jlexer.Lexer, out *ScriptCoverage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = runtime.ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "functions":
- if in.IsNull() {
- in.Skip()
- out.Functions = nil
- } else {
- in.Delim('[')
- if out.Functions == nil {
- if !in.IsDelim(']') {
- out.Functions = make([]*FunctionCoverage, 0, 8)
- } else {
- out.Functions = []*FunctionCoverage{}
- }
- } else {
- out.Functions = (out.Functions)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *FunctionCoverage
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(FunctionCoverage)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Functions = append(out.Functions, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler16(out *jwriter.Writer, in ScriptCoverage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"functions\":"
- out.RawString(prefix)
- if in.Functions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Functions {
- if v14 > 0 {
- out.RawByte(',')
- }
- if v15 == nil {
- out.RawString("null")
- } else {
- (*v15).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ScriptCoverage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ScriptCoverage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ScriptCoverage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ScriptCoverage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler17(in *jlexer.Lexer, out *RuntimeCallCounterInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = float64(in.Float64())
- case "time":
- out.Time = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler17(out *jwriter.Writer, in RuntimeCallCounterInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.Float64(float64(in.Value))
- }
- {
- const prefix string = ",\"time\":"
- out.RawString(prefix)
- out.Float64(float64(in.Time))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RuntimeCallCounterInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RuntimeCallCounterInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RuntimeCallCounterInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RuntimeCallCounterInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler18(in *jlexer.Lexer, out *ProfileNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = int64(in.Int64())
- case "callFrame":
- if in.IsNull() {
- in.Skip()
- out.CallFrame = nil
- } else {
- if out.CallFrame == nil {
- out.CallFrame = new(runtime.CallFrame)
- }
- (*out.CallFrame).UnmarshalEasyJSON(in)
- }
- case "hitCount":
- out.HitCount = int64(in.Int64())
- case "children":
- if in.IsNull() {
- in.Skip()
- out.Children = nil
- } else {
- in.Delim('[')
- if out.Children == nil {
- if !in.IsDelim(']') {
- out.Children = make([]int64, 0, 8)
- } else {
- out.Children = []int64{}
- }
- } else {
- out.Children = (out.Children)[:0]
- }
- for !in.IsDelim(']') {
- var v16 int64
- v16 = int64(in.Int64())
- out.Children = append(out.Children, v16)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "deoptReason":
- out.DeoptReason = string(in.String())
- case "positionTicks":
- if in.IsNull() {
- in.Skip()
- out.PositionTicks = nil
- } else {
- in.Delim('[')
- if out.PositionTicks == nil {
- if !in.IsDelim(']') {
- out.PositionTicks = make([]*PositionTickInfo, 0, 8)
- } else {
- out.PositionTicks = []*PositionTickInfo{}
- }
- } else {
- out.PositionTicks = (out.PositionTicks)[:0]
- }
- for !in.IsDelim(']') {
- var v17 *PositionTickInfo
- if in.IsNull() {
- in.Skip()
- v17 = nil
- } else {
- if v17 == nil {
- v17 = new(PositionTickInfo)
- }
- (*v17).UnmarshalEasyJSON(in)
- }
- out.PositionTicks = append(out.PositionTicks, v17)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler18(out *jwriter.Writer, in ProfileNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ID))
- }
- {
- const prefix string = ",\"callFrame\":"
- out.RawString(prefix)
- if in.CallFrame == nil {
- out.RawString("null")
- } else {
- (*in.CallFrame).MarshalEasyJSON(out)
- }
- }
- if in.HitCount != 0 {
- const prefix string = ",\"hitCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.HitCount))
- }
- if len(in.Children) != 0 {
- const prefix string = ",\"children\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v18, v19 := range in.Children {
- if v18 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v19))
- }
- out.RawByte(']')
- }
- }
- if in.DeoptReason != "" {
- const prefix string = ",\"deoptReason\":"
- out.RawString(prefix)
- out.String(string(in.DeoptReason))
- }
- if len(in.PositionTicks) != 0 {
- const prefix string = ",\"positionTicks\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v20, v21 := range in.PositionTicks {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ProfileNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ProfileNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ProfileNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ProfileNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler19(in *jlexer.Lexer, out *Profile) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodes":
- if in.IsNull() {
- in.Skip()
- out.Nodes = nil
- } else {
- in.Delim('[')
- if out.Nodes == nil {
- if !in.IsDelim(']') {
- out.Nodes = make([]*ProfileNode, 0, 8)
- } else {
- out.Nodes = []*ProfileNode{}
- }
- } else {
- out.Nodes = (out.Nodes)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *ProfileNode
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(ProfileNode)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.Nodes = append(out.Nodes, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "startTime":
- out.StartTime = float64(in.Float64())
- case "endTime":
- out.EndTime = float64(in.Float64())
- case "samples":
- if in.IsNull() {
- in.Skip()
- out.Samples = nil
- } else {
- in.Delim('[')
- if out.Samples == nil {
- if !in.IsDelim(']') {
- out.Samples = make([]int64, 0, 8)
- } else {
- out.Samples = []int64{}
- }
- } else {
- out.Samples = (out.Samples)[:0]
- }
- for !in.IsDelim(']') {
- var v23 int64
- v23 = int64(in.Int64())
- out.Samples = append(out.Samples, v23)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "timeDeltas":
- if in.IsNull() {
- in.Skip()
- out.TimeDeltas = nil
- } else {
- in.Delim('[')
- if out.TimeDeltas == nil {
- if !in.IsDelim(']') {
- out.TimeDeltas = make([]int64, 0, 8)
- } else {
- out.TimeDeltas = []int64{}
- }
- } else {
- out.TimeDeltas = (out.TimeDeltas)[:0]
- }
- for !in.IsDelim(']') {
- var v24 int64
- v24 = int64(in.Int64())
- out.TimeDeltas = append(out.TimeDeltas, v24)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler19(out *jwriter.Writer, in Profile) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodes\":"
- out.RawString(prefix[1:])
- if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v25, v26 := range in.Nodes {
- if v25 > 0 {
- out.RawByte(',')
- }
- if v26 == nil {
- out.RawString("null")
- } else {
- (*v26).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"startTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.StartTime))
- }
- {
- const prefix string = ",\"endTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.EndTime))
- }
- if len(in.Samples) != 0 {
- const prefix string = ",\"samples\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v27, v28 := range in.Samples {
- if v27 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v28))
- }
- out.RawByte(']')
- }
- }
- if len(in.TimeDeltas) != 0 {
- const prefix string = ",\"timeDeltas\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v29, v30 := range in.TimeDeltas {
- if v29 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v30))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Profile) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Profile) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Profile) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Profile) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler20(in *jlexer.Lexer, out *PositionTickInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "line":
- out.Line = int64(in.Int64())
- case "ticks":
- out.Ticks = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler20(out *jwriter.Writer, in PositionTickInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"line\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Line))
- }
- {
- const prefix string = ",\"ticks\":"
- out.RawString(prefix)
- out.Int64(int64(in.Ticks))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PositionTickInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PositionTickInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PositionTickInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PositionTickInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler21(in *jlexer.Lexer, out *GetRuntimeCallStatsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*RuntimeCallCounterInfo, 0, 8)
- } else {
- out.Result = []*RuntimeCallCounterInfo{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v31 *RuntimeCallCounterInfo
- if in.IsNull() {
- in.Skip()
- v31 = nil
- } else {
- if v31 == nil {
- v31 = new(RuntimeCallCounterInfo)
- }
- (*v31).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v31)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler21(out *jwriter.Writer, in GetRuntimeCallStatsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v32, v33 := range in.Result {
- if v32 > 0 {
- out.RawByte(',')
- }
- if v33 == nil {
- out.RawString("null")
- } else {
- (*v33).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRuntimeCallStatsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRuntimeCallStatsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRuntimeCallStatsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRuntimeCallStatsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler22(in *jlexer.Lexer, out *GetRuntimeCallStatsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler22(out *jwriter.Writer, in GetRuntimeCallStatsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRuntimeCallStatsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRuntimeCallStatsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRuntimeCallStatsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRuntimeCallStatsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler23(in *jlexer.Lexer, out *GetCountersReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*CounterInfo, 0, 8)
- } else {
- out.Result = []*CounterInfo{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v34 *CounterInfo
- if in.IsNull() {
- in.Skip()
- v34 = nil
- } else {
- if v34 == nil {
- v34 = new(CounterInfo)
- }
- (*v34).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v34)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler23(out *jwriter.Writer, in GetCountersReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v35, v36 := range in.Result {
- if v35 > 0 {
- out.RawByte(',')
- }
- if v36 == nil {
- out.RawString("null")
- } else {
- (*v36).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCountersReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCountersReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCountersReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCountersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler24(in *jlexer.Lexer, out *GetCountersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler24(out *jwriter.Writer, in GetCountersParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCountersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCountersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCountersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCountersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler25(in *jlexer.Lexer, out *GetBestEffortCoverageReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*ScriptCoverage, 0, 8)
- } else {
- out.Result = []*ScriptCoverage{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v37 *ScriptCoverage
- if in.IsNull() {
- in.Skip()
- v37 = nil
- } else {
- if v37 == nil {
- v37 = new(ScriptCoverage)
- }
- (*v37).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v37)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler25(out *jwriter.Writer, in GetBestEffortCoverageReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v38, v39 := range in.Result {
- if v38 > 0 {
- out.RawByte(',')
- }
- if v39 == nil {
- out.RawString("null")
- } else {
- (*v39).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBestEffortCoverageReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBestEffortCoverageReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBestEffortCoverageReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBestEffortCoverageReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler26(in *jlexer.Lexer, out *GetBestEffortCoverageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler26(out *jwriter.Writer, in GetBestEffortCoverageParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBestEffortCoverageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBestEffortCoverageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBestEffortCoverageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBestEffortCoverageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler27(in *jlexer.Lexer, out *FunctionCoverage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "functionName":
- out.FunctionName = string(in.String())
- case "ranges":
- if in.IsNull() {
- in.Skip()
- out.Ranges = nil
- } else {
- in.Delim('[')
- if out.Ranges == nil {
- if !in.IsDelim(']') {
- out.Ranges = make([]*CoverageRange, 0, 8)
- } else {
- out.Ranges = []*CoverageRange{}
- }
- } else {
- out.Ranges = (out.Ranges)[:0]
- }
- for !in.IsDelim(']') {
- var v40 *CoverageRange
- if in.IsNull() {
- in.Skip()
- v40 = nil
- } else {
- if v40 == nil {
- v40 = new(CoverageRange)
- }
- (*v40).UnmarshalEasyJSON(in)
- }
- out.Ranges = append(out.Ranges, v40)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "isBlockCoverage":
- out.IsBlockCoverage = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler27(out *jwriter.Writer, in FunctionCoverage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"functionName\":"
- out.RawString(prefix[1:])
- out.String(string(in.FunctionName))
- }
- {
- const prefix string = ",\"ranges\":"
- out.RawString(prefix)
- if in.Ranges == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v41, v42 := range in.Ranges {
- if v41 > 0 {
- out.RawByte(',')
- }
- if v42 == nil {
- out.RawString("null")
- } else {
- (*v42).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"isBlockCoverage\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsBlockCoverage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v FunctionCoverage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v FunctionCoverage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *FunctionCoverage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *FunctionCoverage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler28(in *jlexer.Lexer, out *EventPreciseCoverageDeltaUpdate) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- out.Timestamp = float64(in.Float64())
- case "occasion":
- out.Occasion = string(in.String())
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*ScriptCoverage, 0, 8)
- } else {
- out.Result = []*ScriptCoverage{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v43 *ScriptCoverage
- if in.IsNull() {
- in.Skip()
- v43 = nil
- } else {
- if v43 == nil {
- v43 = new(ScriptCoverage)
- }
- (*v43).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v43)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler28(out *jwriter.Writer, in EventPreciseCoverageDeltaUpdate) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.Timestamp))
- }
- {
- const prefix string = ",\"occasion\":"
- out.RawString(prefix)
- out.String(string(in.Occasion))
- }
- {
- const prefix string = ",\"result\":"
- out.RawString(prefix)
- if in.Result == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v44, v45 := range in.Result {
- if v44 > 0 {
- out.RawByte(',')
- }
- if v45 == nil {
- out.RawString("null")
- } else {
- (*v45).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventPreciseCoverageDeltaUpdate) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventPreciseCoverageDeltaUpdate) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventPreciseCoverageDeltaUpdate) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventPreciseCoverageDeltaUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler29(in *jlexer.Lexer, out *EventConsoleProfileStarted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(debugger.Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "title":
- out.Title = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler29(out *jwriter.Writer, in EventConsoleProfileStarted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- if in.Title != "" {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventConsoleProfileStarted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventConsoleProfileStarted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventConsoleProfileStarted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventConsoleProfileStarted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler30(in *jlexer.Lexer, out *EventConsoleProfileFinished) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- case "location":
- if in.IsNull() {
- in.Skip()
- out.Location = nil
- } else {
- if out.Location == nil {
- out.Location = new(debugger.Location)
- }
- (*out.Location).UnmarshalEasyJSON(in)
- }
- case "profile":
- if in.IsNull() {
- in.Skip()
- out.Profile = nil
- } else {
- if out.Profile == nil {
- out.Profile = new(Profile)
- }
- (*out.Profile).UnmarshalEasyJSON(in)
- }
- case "title":
- out.Title = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler30(out *jwriter.Writer, in EventConsoleProfileFinished) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- {
- const prefix string = ",\"location\":"
- out.RawString(prefix)
- if in.Location == nil {
- out.RawString("null")
- } else {
- (*in.Location).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"profile\":"
- out.RawString(prefix)
- if in.Profile == nil {
- out.RawString("null")
- } else {
- (*in.Profile).MarshalEasyJSON(out)
- }
- }
- if in.Title != "" {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventConsoleProfileFinished) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventConsoleProfileFinished) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventConsoleProfileFinished) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventConsoleProfileFinished) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler31(in *jlexer.Lexer, out *EnableRuntimeCallStatsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler31(out *jwriter.Writer, in EnableRuntimeCallStatsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableRuntimeCallStatsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableRuntimeCallStatsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableRuntimeCallStatsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableRuntimeCallStatsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler32(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler32(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler33(in *jlexer.Lexer, out *EnableCountersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler33(out *jwriter.Writer, in EnableCountersParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableCountersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableCountersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableCountersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableCountersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler34(in *jlexer.Lexer, out *DisableRuntimeCallStatsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler34(out *jwriter.Writer, in DisableRuntimeCallStatsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableRuntimeCallStatsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableRuntimeCallStatsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableRuntimeCallStatsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableRuntimeCallStatsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler35(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler35(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler36(in *jlexer.Lexer, out *DisableCountersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler36(out *jwriter.Writer, in DisableCountersParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableCountersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableCountersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableCountersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableCountersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler37(in *jlexer.Lexer, out *CoverageRange) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "startOffset":
- out.StartOffset = int64(in.Int64())
- case "endOffset":
- out.EndOffset = int64(in.Int64())
- case "count":
- out.Count = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler37(out *jwriter.Writer, in CoverageRange) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"startOffset\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.StartOffset))
- }
- {
- const prefix string = ",\"endOffset\":"
- out.RawString(prefix)
- out.Int64(int64(in.EndOffset))
- }
- {
- const prefix string = ",\"count\":"
- out.RawString(prefix)
- out.Int64(int64(in.Count))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CoverageRange) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CoverageRange) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CoverageRange) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CoverageRange) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler38(in *jlexer.Lexer, out *CounterInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- out.Value = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler38(out *jwriter.Writer, in CounterInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.Int64(int64(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CounterInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CounterInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoProfiler38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CounterInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CounterInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoProfiler38(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/profiler/events.go b/vendor/github.com/chromedp/cdproto/profiler/events.go
deleted file mode 100644
index a017aaee649..00000000000
--- a/vendor/github.com/chromedp/cdproto/profiler/events.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package profiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/debugger"
-)
-
-// EventConsoleProfileFinished [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-consoleProfileFinished
-type EventConsoleProfileFinished struct {
- ID string `json:"id"`
- Location *debugger.Location `json:"location"` // Location of console.profileEnd().
- Profile *Profile `json:"profile"`
- Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
-}
-
-// EventConsoleProfileStarted sent when new profile recording is started
-// using console.profile() call.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-consoleProfileStarted
-type EventConsoleProfileStarted struct {
- ID string `json:"id"`
- Location *debugger.Location `json:"location"` // Location of console.profile().
- Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
-}
-
-// EventPreciseCoverageDeltaUpdate reports coverage delta since the last poll
-// (either from an event like this, or from takePreciseCoverage for the current
-// isolate. May only be sent if precise code coverage has been started. This
-// event can be trigged by the embedder to, for example, trigger collection of
-// coverage data immediately at a certain point in time.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-preciseCoverageDeltaUpdate
-type EventPreciseCoverageDeltaUpdate struct {
- Timestamp float64 `json:"timestamp"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
- Occasion string `json:"occasion"` // Identifier for distinguishing coverage events.
- Result []*ScriptCoverage `json:"result"` // Coverage data for the current isolate.
-}
diff --git a/vendor/github.com/chromedp/cdproto/profiler/profiler.go b/vendor/github.com/chromedp/cdproto/profiler/profiler.go
deleted file mode 100644
index b38460796b0..00000000000
--- a/vendor/github.com/chromedp/cdproto/profiler/profiler.go
+++ /dev/null
@@ -1,460 +0,0 @@
-// Package profiler provides the Chrome DevTools Protocol
-// commands, types, and events for the Profiler domain.
-//
-// Generated by the cdproto-gen command.
-package profiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DisableParams [no description].
-type DisableParams struct{}
-
-// Disable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Profiler.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams [no description].
-type EnableParams struct{}
-
-// Enable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Profiler.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// GetBestEffortCoverageParams collect coverage data for the current isolate.
-// The coverage data may be incomplete due to garbage collection.
-type GetBestEffortCoverageParams struct{}
-
-// GetBestEffortCoverage collect coverage data for the current isolate. The
-// coverage data may be incomplete due to garbage collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getBestEffortCoverage
-func GetBestEffortCoverage() *GetBestEffortCoverageParams {
- return &GetBestEffortCoverageParams{}
-}
-
-// GetBestEffortCoverageReturns return values.
-type GetBestEffortCoverageReturns struct {
- Result []*ScriptCoverage `json:"result,omitempty"` // Coverage data for the current isolate.
-}
-
-// Do executes Profiler.getBestEffortCoverage against the provided context.
-//
-// returns:
-// result - Coverage data for the current isolate.
-func (p *GetBestEffortCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, err error) {
- // execute
- var res GetBestEffortCoverageReturns
- err = cdp.Execute(ctx, CommandGetBestEffortCoverage, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// SetSamplingIntervalParams changes CPU profiler sampling interval. Must be
-// called before CPU profiles recording started.
-type SetSamplingIntervalParams struct {
- Interval int64 `json:"interval"` // New sampling interval in microseconds.
-}
-
-// SetSamplingInterval changes CPU profiler sampling interval. Must be called
-// before CPU profiles recording started.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-setSamplingInterval
-//
-// parameters:
-// interval - New sampling interval in microseconds.
-func SetSamplingInterval(interval int64) *SetSamplingIntervalParams {
- return &SetSamplingIntervalParams{
- Interval: interval,
- }
-}
-
-// Do executes Profiler.setSamplingInterval against the provided context.
-func (p *SetSamplingIntervalParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetSamplingInterval, p, nil)
-}
-
-// StartParams [no description].
-type StartParams struct{}
-
-// Start [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-start
-func Start() *StartParams {
- return &StartParams{}
-}
-
-// Do executes Profiler.start against the provided context.
-func (p *StartParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStart, nil, nil)
-}
-
-// StartPreciseCoverageParams enable precise code coverage. Coverage data for
-// JavaScript executed before enabling precise code coverage may be incomplete.
-// Enabling prevents running optimized code and resets execution counters.
-type StartPreciseCoverageParams struct {
- CallCount bool `json:"callCount,omitempty"` // Collect accurate call counts beyond simple 'covered' or 'not covered'.
- Detailed bool `json:"detailed,omitempty"` // Collect block-based coverage.
- AllowTriggeredUpdates bool `json:"allowTriggeredUpdates,omitempty"` // Allow the backend to send updates on its own initiative
-}
-
-// StartPreciseCoverage enable precise code coverage. Coverage data for
-// JavaScript executed before enabling precise code coverage may be incomplete.
-// Enabling prevents running optimized code and resets execution counters.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startPreciseCoverage
-//
-// parameters:
-func StartPreciseCoverage() *StartPreciseCoverageParams {
- return &StartPreciseCoverageParams{}
-}
-
-// WithCallCount collect accurate call counts beyond simple 'covered' or 'not
-// covered'.
-func (p StartPreciseCoverageParams) WithCallCount(callCount bool) *StartPreciseCoverageParams {
- p.CallCount = callCount
- return &p
-}
-
-// WithDetailed collect block-based coverage.
-func (p StartPreciseCoverageParams) WithDetailed(detailed bool) *StartPreciseCoverageParams {
- p.Detailed = detailed
- return &p
-}
-
-// WithAllowTriggeredUpdates allow the backend to send updates on its own
-// initiative.
-func (p StartPreciseCoverageParams) WithAllowTriggeredUpdates(allowTriggeredUpdates bool) *StartPreciseCoverageParams {
- p.AllowTriggeredUpdates = allowTriggeredUpdates
- return &p
-}
-
-// StartPreciseCoverageReturns return values.
-type StartPreciseCoverageReturns struct {
- Timestamp float64 `json:"timestamp,omitempty"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
-}
-
-// Do executes Profiler.startPreciseCoverage against the provided context.
-//
-// returns:
-// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
-func (p *StartPreciseCoverageParams) Do(ctx context.Context) (timestamp float64, err error) {
- // execute
- var res StartPreciseCoverageReturns
- err = cdp.Execute(ctx, CommandStartPreciseCoverage, p, &res)
- if err != nil {
- return 0, err
- }
-
- return res.Timestamp, nil
-}
-
-// StartTypeProfileParams enable type profile.
-type StartTypeProfileParams struct{}
-
-// StartTypeProfile enable type profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startTypeProfile
-func StartTypeProfile() *StartTypeProfileParams {
- return &StartTypeProfileParams{}
-}
-
-// Do executes Profiler.startTypeProfile against the provided context.
-func (p *StartTypeProfileParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartTypeProfile, nil, nil)
-}
-
-// StopParams [no description].
-type StopParams struct{}
-
-// Stop [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stop
-func Stop() *StopParams {
- return &StopParams{}
-}
-
-// StopReturns return values.
-type StopReturns struct {
- Profile *Profile `json:"profile,omitempty"` // Recorded profile.
-}
-
-// Do executes Profiler.stop against the provided context.
-//
-// returns:
-// profile - Recorded profile.
-func (p *StopParams) Do(ctx context.Context) (profile *Profile, err error) {
- // execute
- var res StopReturns
- err = cdp.Execute(ctx, CommandStop, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Profile, nil
-}
-
-// StopPreciseCoverageParams disable precise code coverage. Disabling
-// releases unnecessary execution count records and allows executing optimized
-// code.
-type StopPreciseCoverageParams struct{}
-
-// StopPreciseCoverage disable precise code coverage. Disabling releases
-// unnecessary execution count records and allows executing optimized code.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopPreciseCoverage
-func StopPreciseCoverage() *StopPreciseCoverageParams {
- return &StopPreciseCoverageParams{}
-}
-
-// Do executes Profiler.stopPreciseCoverage against the provided context.
-func (p *StopPreciseCoverageParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopPreciseCoverage, nil, nil)
-}
-
-// StopTypeProfileParams disable type profile. Disabling releases type
-// profile data collected so far.
-type StopTypeProfileParams struct{}
-
-// StopTypeProfile disable type profile. Disabling releases type profile data
-// collected so far.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopTypeProfile
-func StopTypeProfile() *StopTypeProfileParams {
- return &StopTypeProfileParams{}
-}
-
-// Do executes Profiler.stopTypeProfile against the provided context.
-func (p *StopTypeProfileParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopTypeProfile, nil, nil)
-}
-
-// TakePreciseCoverageParams collect coverage data for the current isolate,
-// and resets execution counters. Precise code coverage needs to have started.
-type TakePreciseCoverageParams struct{}
-
-// TakePreciseCoverage collect coverage data for the current isolate, and
-// resets execution counters. Precise code coverage needs to have started.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takePreciseCoverage
-func TakePreciseCoverage() *TakePreciseCoverageParams {
- return &TakePreciseCoverageParams{}
-}
-
-// TakePreciseCoverageReturns return values.
-type TakePreciseCoverageReturns struct {
- Result []*ScriptCoverage `json:"result,omitempty"` // Coverage data for the current isolate.
- Timestamp float64 `json:"timestamp,omitempty"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
-}
-
-// Do executes Profiler.takePreciseCoverage against the provided context.
-//
-// returns:
-// result - Coverage data for the current isolate.
-// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
-func (p *TakePreciseCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, timestamp float64, err error) {
- // execute
- var res TakePreciseCoverageReturns
- err = cdp.Execute(ctx, CommandTakePreciseCoverage, nil, &res)
- if err != nil {
- return nil, 0, err
- }
-
- return res.Result, res.Timestamp, nil
-}
-
-// TakeTypeProfileParams collect type profile.
-type TakeTypeProfileParams struct{}
-
-// TakeTypeProfile collect type profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takeTypeProfile
-func TakeTypeProfile() *TakeTypeProfileParams {
- return &TakeTypeProfileParams{}
-}
-
-// TakeTypeProfileReturns return values.
-type TakeTypeProfileReturns struct {
- Result []*ScriptTypeProfile `json:"result,omitempty"` // Type profile for all scripts since startTypeProfile() was turned on.
-}
-
-// Do executes Profiler.takeTypeProfile against the provided context.
-//
-// returns:
-// result - Type profile for all scripts since startTypeProfile() was turned on.
-func (p *TakeTypeProfileParams) Do(ctx context.Context) (result []*ScriptTypeProfile, err error) {
- // execute
- var res TakeTypeProfileReturns
- err = cdp.Execute(ctx, CommandTakeTypeProfile, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// EnableCountersParams enable counters collection.
-type EnableCountersParams struct{}
-
-// EnableCounters enable counters collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableCounters
-func EnableCounters() *EnableCountersParams {
- return &EnableCountersParams{}
-}
-
-// Do executes Profiler.enableCounters against the provided context.
-func (p *EnableCountersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnableCounters, nil, nil)
-}
-
-// DisableCountersParams disable counters collection.
-type DisableCountersParams struct{}
-
-// DisableCounters disable counters collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableCounters
-func DisableCounters() *DisableCountersParams {
- return &DisableCountersParams{}
-}
-
-// Do executes Profiler.disableCounters against the provided context.
-func (p *DisableCountersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisableCounters, nil, nil)
-}
-
-// GetCountersParams retrieve counters.
-type GetCountersParams struct{}
-
-// GetCounters retrieve counters.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getCounters
-func GetCounters() *GetCountersParams {
- return &GetCountersParams{}
-}
-
-// GetCountersReturns return values.
-type GetCountersReturns struct {
- Result []*CounterInfo `json:"result,omitempty"` // Collected counters information.
-}
-
-// Do executes Profiler.getCounters against the provided context.
-//
-// returns:
-// result - Collected counters information.
-func (p *GetCountersParams) Do(ctx context.Context) (result []*CounterInfo, err error) {
- // execute
- var res GetCountersReturns
- err = cdp.Execute(ctx, CommandGetCounters, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// EnableRuntimeCallStatsParams enable run time call stats collection.
-type EnableRuntimeCallStatsParams struct{}
-
-// EnableRuntimeCallStats enable run time call stats collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableRuntimeCallStats
-func EnableRuntimeCallStats() *EnableRuntimeCallStatsParams {
- return &EnableRuntimeCallStatsParams{}
-}
-
-// Do executes Profiler.enableRuntimeCallStats against the provided context.
-func (p *EnableRuntimeCallStatsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnableRuntimeCallStats, nil, nil)
-}
-
-// DisableRuntimeCallStatsParams disable run time call stats collection.
-type DisableRuntimeCallStatsParams struct{}
-
-// DisableRuntimeCallStats disable run time call stats collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableRuntimeCallStats
-func DisableRuntimeCallStats() *DisableRuntimeCallStatsParams {
- return &DisableRuntimeCallStatsParams{}
-}
-
-// Do executes Profiler.disableRuntimeCallStats against the provided context.
-func (p *DisableRuntimeCallStatsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisableRuntimeCallStats, nil, nil)
-}
-
-// GetRuntimeCallStatsParams retrieve run time call stats.
-type GetRuntimeCallStatsParams struct{}
-
-// GetRuntimeCallStats retrieve run time call stats.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getRuntimeCallStats
-func GetRuntimeCallStats() *GetRuntimeCallStatsParams {
- return &GetRuntimeCallStatsParams{}
-}
-
-// GetRuntimeCallStatsReturns return values.
-type GetRuntimeCallStatsReturns struct {
- Result []*RuntimeCallCounterInfo `json:"result,omitempty"` // Collected runtime call counter information.
-}
-
-// Do executes Profiler.getRuntimeCallStats against the provided context.
-//
-// returns:
-// result - Collected runtime call counter information.
-func (p *GetRuntimeCallStatsParams) Do(ctx context.Context) (result []*RuntimeCallCounterInfo, err error) {
- // execute
- var res GetRuntimeCallStatsReturns
- err = cdp.Execute(ctx, CommandGetRuntimeCallStats, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Result, nil
-}
-
-// Command names.
-const (
- CommandDisable = "Profiler.disable"
- CommandEnable = "Profiler.enable"
- CommandGetBestEffortCoverage = "Profiler.getBestEffortCoverage"
- CommandSetSamplingInterval = "Profiler.setSamplingInterval"
- CommandStart = "Profiler.start"
- CommandStartPreciseCoverage = "Profiler.startPreciseCoverage"
- CommandStartTypeProfile = "Profiler.startTypeProfile"
- CommandStop = "Profiler.stop"
- CommandStopPreciseCoverage = "Profiler.stopPreciseCoverage"
- CommandStopTypeProfile = "Profiler.stopTypeProfile"
- CommandTakePreciseCoverage = "Profiler.takePreciseCoverage"
- CommandTakeTypeProfile = "Profiler.takeTypeProfile"
- CommandEnableCounters = "Profiler.enableCounters"
- CommandDisableCounters = "Profiler.disableCounters"
- CommandGetCounters = "Profiler.getCounters"
- CommandEnableRuntimeCallStats = "Profiler.enableRuntimeCallStats"
- CommandDisableRuntimeCallStats = "Profiler.disableRuntimeCallStats"
- CommandGetRuntimeCallStats = "Profiler.getRuntimeCallStats"
-)
diff --git a/vendor/github.com/chromedp/cdproto/profiler/types.go b/vendor/github.com/chromedp/cdproto/profiler/types.go
deleted file mode 100644
index 799ee6e5863..00000000000
--- a/vendor/github.com/chromedp/cdproto/profiler/types.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package profiler
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/runtime"
-)
-
-// ProfileNode profile node. Holds callsite information, execution statistics
-// and child nodes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ProfileNode
-type ProfileNode struct {
- ID int64 `json:"id"` // Unique id of the node.
- CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
- HitCount int64 `json:"hitCount,omitempty"` // Number of samples where this node was on top of the call stack.
- Children []int64 `json:"children,omitempty"` // Child node ids.
- DeoptReason string `json:"deoptReason,omitempty"` // The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
- PositionTicks []*PositionTickInfo `json:"positionTicks,omitempty"` // An array of source position ticks.
-}
-
-// Profile Profile.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-Profile
-type Profile struct {
- Nodes []*ProfileNode `json:"nodes"` // The list of profile nodes. First item is the root node.
- StartTime float64 `json:"startTime"` // Profiling start timestamp in microseconds.
- EndTime float64 `json:"endTime"` // Profiling end timestamp in microseconds.
- Samples []int64 `json:"samples,omitempty"` // Ids of samples top nodes.
- TimeDeltas []int64 `json:"timeDeltas,omitempty"` // Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
-}
-
-// PositionTickInfo specifies a number of samples attributed to a certain
-// source position.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-PositionTickInfo
-type PositionTickInfo struct {
- Line int64 `json:"line"` // Source line number (1-based).
- Ticks int64 `json:"ticks"` // Number of samples attributed to the source line.
-}
-
-// CoverageRange coverage data for a source range.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-CoverageRange
-type CoverageRange struct {
- StartOffset int64 `json:"startOffset"` // JavaScript script source offset for the range start.
- EndOffset int64 `json:"endOffset"` // JavaScript script source offset for the range end.
- Count int64 `json:"count"` // Collected execution count of the source range.
-}
-
-// FunctionCoverage coverage data for a JavaScript function.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-FunctionCoverage
-type FunctionCoverage struct {
- FunctionName string `json:"functionName"` // JavaScript function name.
- Ranges []*CoverageRange `json:"ranges"` // Source ranges inside the function with coverage data.
- IsBlockCoverage bool `json:"isBlockCoverage"` // Whether coverage data for this function has block granularity.
-}
-
-// ScriptCoverage coverage data for a JavaScript script.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage
-type ScriptCoverage struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // JavaScript script id.
- URL string `json:"url"` // JavaScript script name or url.
- Functions []*FunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
-}
-
-// TypeObject describes a type collected during runtime.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeObject
-type TypeObject struct {
- Name string `json:"name"` // Name of a type collected with type profiling.
-}
-
-// TypeProfileEntry source offset and types for a parameter or return value.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeProfileEntry
-type TypeProfileEntry struct {
- Offset int64 `json:"offset"` // Source offset of the parameter or end of function for return values.
- Types []*TypeObject `json:"types"` // The types for this parameter or return value.
-}
-
-// ScriptTypeProfile type profile data collected during runtime for a
-// JavaScript script.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptTypeProfile
-type ScriptTypeProfile struct {
- ScriptID runtime.ScriptID `json:"scriptId"` // JavaScript script id.
- URL string `json:"url"` // JavaScript script name or url.
- Entries []*TypeProfileEntry `json:"entries"` // Type profile entries for parameters and return values of the functions in the script.
-}
-
-// CounterInfo collected counter information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-CounterInfo
-type CounterInfo struct {
- Name string `json:"name"` // Counter name.
- Value int64 `json:"value"` // Counter value.
-}
-
-// RuntimeCallCounterInfo runtime call counter information.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-RuntimeCallCounterInfo
-type RuntimeCallCounterInfo struct {
- Name string `json:"name"` // Counter name.
- Value float64 `json:"value"` // Counter value.
- Time float64 `json:"time"` // Counter time in seconds.
-}
diff --git a/vendor/github.com/chromedp/cdproto/runtime/easyjson.go b/vendor/github.com/chromedp/cdproto/runtime/easyjson.go
deleted file mode 100644
index b67d814fc25..00000000000
--- a/vendor/github.com/chromedp/cdproto/runtime/easyjson.go
+++ /dev/null
@@ -1,5006 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package runtime
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(in *jlexer.Lexer, out *TerminateExecutionParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(out *jwriter.Writer, in TerminateExecutionParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TerminateExecutionParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TerminateExecutionParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TerminateExecutionParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TerminateExecutionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(in *jlexer.Lexer, out *StackTraceID) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- case "debuggerId":
- out.DebuggerID = UniqueDebuggerID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(out *jwriter.Writer, in StackTraceID) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- if in.DebuggerID != "" {
- const prefix string = ",\"debuggerId\":"
- out.RawString(prefix)
- out.String(string(in.DebuggerID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StackTraceID) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StackTraceID) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StackTraceID) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StackTraceID) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(in *jlexer.Lexer, out *StackTrace) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "description":
- out.Description = string(in.String())
- case "callFrames":
- if in.IsNull() {
- in.Skip()
- out.CallFrames = nil
- } else {
- in.Delim('[')
- if out.CallFrames == nil {
- if !in.IsDelim(']') {
- out.CallFrames = make([]*CallFrame, 0, 8)
- } else {
- out.CallFrames = []*CallFrame{}
- }
- } else {
- out.CallFrames = (out.CallFrames)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *CallFrame
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(CallFrame)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.CallFrames = append(out.CallFrames, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "parent":
- if in.IsNull() {
- in.Skip()
- out.Parent = nil
- } else {
- if out.Parent == nil {
- out.Parent = new(StackTrace)
- }
- (*out.Parent).UnmarshalEasyJSON(in)
- }
- case "parentId":
- if in.IsNull() {
- in.Skip()
- out.ParentID = nil
- } else {
- if out.ParentID == nil {
- out.ParentID = new(StackTraceID)
- }
- (*out.ParentID).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(out *jwriter.Writer, in StackTrace) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Description != "" {
- const prefix string = ",\"description\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.Description))
- }
- {
- const prefix string = ",\"callFrames\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.CallFrames {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Parent != nil {
- const prefix string = ",\"parent\":"
- out.RawString(prefix)
- (*in.Parent).MarshalEasyJSON(out)
- }
- if in.ParentID != nil {
- const prefix string = ",\"parentId\":"
- out.RawString(prefix)
- (*in.ParentID).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StackTrace) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StackTrace) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StackTrace) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StackTrace) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(in *jlexer.Lexer, out *SetMaxCallStackSizeToCaptureParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "size":
- out.Size = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(out *jwriter.Writer, in SetMaxCallStackSizeToCaptureParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"size\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Size))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetMaxCallStackSizeToCaptureParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetMaxCallStackSizeToCaptureParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetMaxCallStackSizeToCaptureParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetMaxCallStackSizeToCaptureParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(in *jlexer.Lexer, out *SetCustomObjectFormatterEnabledParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(out *jwriter.Writer, in SetCustomObjectFormatterEnabledParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(in *jlexer.Lexer, out *RunScriptReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(out *jwriter.Writer, in RunScriptReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RunScriptReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RunScriptReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RunScriptReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RunScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime6(in *jlexer.Lexer, out *RunScriptParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = ScriptID(in.String())
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- case "silent":
- out.Silent = bool(in.Bool())
- case "includeCommandLineAPI":
- out.IncludeCommandLineAPI = bool(in.Bool())
- case "returnByValue":
- out.ReturnByValue = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- case "awaitPromise":
- out.AwaitPromise = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime6(out *jwriter.Writer, in RunScriptParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- if in.Silent {
- const prefix string = ",\"silent\":"
- out.RawString(prefix)
- out.Bool(bool(in.Silent))
- }
- if in.IncludeCommandLineAPI {
- const prefix string = ",\"includeCommandLineAPI\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeCommandLineAPI))
- }
- if in.ReturnByValue {
- const prefix string = ",\"returnByValue\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReturnByValue))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- if in.AwaitPromise {
- const prefix string = ",\"awaitPromise\":"
- out.RawString(prefix)
- out.Bool(bool(in.AwaitPromise))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RunScriptParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RunScriptParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RunScriptParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RunScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime7(in *jlexer.Lexer, out *RunIfWaitingForDebuggerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime7(out *jwriter.Writer, in RunIfWaitingForDebuggerParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RunIfWaitingForDebuggerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RunIfWaitingForDebuggerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RunIfWaitingForDebuggerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RunIfWaitingForDebuggerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime8(in *jlexer.Lexer, out *RemoveBindingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime8(out *jwriter.Writer, in RemoveBindingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveBindingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveBindingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveBindingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveBindingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime9(in *jlexer.Lexer, out *RemoteObject) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "subtype":
- (out.Subtype).UnmarshalEasyJSON(in)
- case "className":
- out.ClassName = string(in.String())
- case "value":
- (out.Value).UnmarshalEasyJSON(in)
- case "unserializableValue":
- out.UnserializableValue = UnserializableValue(in.String())
- case "description":
- out.Description = string(in.String())
- case "objectId":
- out.ObjectID = RemoteObjectID(in.String())
- case "preview":
- if in.IsNull() {
- in.Skip()
- out.Preview = nil
- } else {
- if out.Preview == nil {
- out.Preview = new(ObjectPreview)
- }
- (*out.Preview).UnmarshalEasyJSON(in)
- }
- case "customPreview":
- if in.IsNull() {
- in.Skip()
- out.CustomPreview = nil
- } else {
- if out.CustomPreview == nil {
- out.CustomPreview = new(CustomPreview)
- }
- (*out.CustomPreview).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime9(out *jwriter.Writer, in RemoteObject) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Subtype != "" {
- const prefix string = ",\"subtype\":"
- out.RawString(prefix)
- (in.Subtype).MarshalEasyJSON(out)
- }
- if in.ClassName != "" {
- const prefix string = ",\"className\":"
- out.RawString(prefix)
- out.String(string(in.ClassName))
- }
- if (in.Value).IsDefined() {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (in.Value).MarshalEasyJSON(out)
- }
- if in.UnserializableValue != "" {
- const prefix string = ",\"unserializableValue\":"
- out.RawString(prefix)
- out.String(string(in.UnserializableValue))
- }
- if in.Description != "" {
- const prefix string = ",\"description\":"
- out.RawString(prefix)
- out.String(string(in.Description))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix)
- out.String(string(in.ObjectID))
- }
- if in.Preview != nil {
- const prefix string = ",\"preview\":"
- out.RawString(prefix)
- (*in.Preview).MarshalEasyJSON(out)
- }
- if in.CustomPreview != nil {
- const prefix string = ",\"customPreview\":"
- out.RawString(prefix)
- (*in.CustomPreview).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoteObject) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoteObject) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoteObject) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoteObject) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime10(in *jlexer.Lexer, out *ReleaseObjectParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime10(out *jwriter.Writer, in ReleaseObjectParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReleaseObjectParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReleaseObjectParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReleaseObjectParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReleaseObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime11(in *jlexer.Lexer, out *ReleaseObjectGroupParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime11(out *jwriter.Writer, in ReleaseObjectGroupParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectGroup))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ReleaseObjectGroupParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ReleaseObjectGroupParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ReleaseObjectGroupParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ReleaseObjectGroupParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime12(in *jlexer.Lexer, out *QueryObjectsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objects":
- if in.IsNull() {
- in.Skip()
- out.Objects = nil
- } else {
- if out.Objects == nil {
- out.Objects = new(RemoteObject)
- }
- (*out.Objects).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime12(out *jwriter.Writer, in QueryObjectsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Objects != nil {
- const prefix string = ",\"objects\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Objects).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QueryObjectsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QueryObjectsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QueryObjectsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QueryObjectsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime13(in *jlexer.Lexer, out *QueryObjectsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "prototypeObjectId":
- out.PrototypeObjectID = RemoteObjectID(in.String())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime13(out *jwriter.Writer, in QueryObjectsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"prototypeObjectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PrototypeObjectID))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v QueryObjectsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v QueryObjectsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *QueryObjectsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *QueryObjectsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime14(in *jlexer.Lexer, out *PropertyPreview) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "value":
- out.Value = string(in.String())
- case "valuePreview":
- if in.IsNull() {
- in.Skip()
- out.ValuePreview = nil
- } else {
- if out.ValuePreview == nil {
- out.ValuePreview = new(ObjectPreview)
- }
- (*out.ValuePreview).UnmarshalEasyJSON(in)
- }
- case "subtype":
- (out.Subtype).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime14(out *jwriter.Writer, in PropertyPreview) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Value != "" {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- out.String(string(in.Value))
- }
- if in.ValuePreview != nil {
- const prefix string = ",\"valuePreview\":"
- out.RawString(prefix)
- (*in.ValuePreview).MarshalEasyJSON(out)
- }
- if in.Subtype != "" {
- const prefix string = ",\"subtype\":"
- out.RawString(prefix)
- (in.Subtype).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PropertyPreview) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PropertyPreview) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PropertyPreview) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PropertyPreview) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime15(in *jlexer.Lexer, out *PropertyDescriptor) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(RemoteObject)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- case "writable":
- out.Writable = bool(in.Bool())
- case "get":
- if in.IsNull() {
- in.Skip()
- out.Get = nil
- } else {
- if out.Get == nil {
- out.Get = new(RemoteObject)
- }
- (*out.Get).UnmarshalEasyJSON(in)
- }
- case "set":
- if in.IsNull() {
- in.Skip()
- out.Set = nil
- } else {
- if out.Set == nil {
- out.Set = new(RemoteObject)
- }
- (*out.Set).UnmarshalEasyJSON(in)
- }
- case "configurable":
- out.Configurable = bool(in.Bool())
- case "enumerable":
- out.Enumerable = bool(in.Bool())
- case "wasThrown":
- out.WasThrown = bool(in.Bool())
- case "isOwn":
- out.IsOwn = bool(in.Bool())
- case "symbol":
- if in.IsNull() {
- in.Skip()
- out.Symbol = nil
- } else {
- if out.Symbol == nil {
- out.Symbol = new(RemoteObject)
- }
- (*out.Symbol).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime15(out *jwriter.Writer, in PropertyDescriptor) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.Value != nil {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (*in.Value).MarshalEasyJSON(out)
- }
- if in.Writable {
- const prefix string = ",\"writable\":"
- out.RawString(prefix)
- out.Bool(bool(in.Writable))
- }
- if in.Get != nil {
- const prefix string = ",\"get\":"
- out.RawString(prefix)
- (*in.Get).MarshalEasyJSON(out)
- }
- if in.Set != nil {
- const prefix string = ",\"set\":"
- out.RawString(prefix)
- (*in.Set).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"configurable\":"
- out.RawString(prefix)
- out.Bool(bool(in.Configurable))
- }
- {
- const prefix string = ",\"enumerable\":"
- out.RawString(prefix)
- out.Bool(bool(in.Enumerable))
- }
- if in.WasThrown {
- const prefix string = ",\"wasThrown\":"
- out.RawString(prefix)
- out.Bool(bool(in.WasThrown))
- }
- if in.IsOwn {
- const prefix string = ",\"isOwn\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsOwn))
- }
- if in.Symbol != nil {
- const prefix string = ",\"symbol\":"
- out.RawString(prefix)
- (*in.Symbol).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PropertyDescriptor) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PropertyDescriptor) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime16(in *jlexer.Lexer, out *PrivatePropertyDescriptor) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(RemoteObject)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- case "get":
- if in.IsNull() {
- in.Skip()
- out.Get = nil
- } else {
- if out.Get == nil {
- out.Get = new(RemoteObject)
- }
- (*out.Get).UnmarshalEasyJSON(in)
- }
- case "set":
- if in.IsNull() {
- in.Skip()
- out.Set = nil
- } else {
- if out.Set == nil {
- out.Set = new(RemoteObject)
- }
- (*out.Set).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime16(out *jwriter.Writer, in PrivatePropertyDescriptor) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.Value != nil {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (*in.Value).MarshalEasyJSON(out)
- }
- if in.Get != nil {
- const prefix string = ",\"get\":"
- out.RawString(prefix)
- (*in.Get).MarshalEasyJSON(out)
- }
- if in.Set != nil {
- const prefix string = ",\"set\":"
- out.RawString(prefix)
- (*in.Set).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v PrivatePropertyDescriptor) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v PrivatePropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *PrivatePropertyDescriptor) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *PrivatePropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime17(in *jlexer.Lexer, out *ObjectPreview) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "subtype":
- (out.Subtype).UnmarshalEasyJSON(in)
- case "description":
- out.Description = string(in.String())
- case "overflow":
- out.Overflow = bool(in.Bool())
- case "properties":
- if in.IsNull() {
- in.Skip()
- out.Properties = nil
- } else {
- in.Delim('[')
- if out.Properties == nil {
- if !in.IsDelim(']') {
- out.Properties = make([]*PropertyPreview, 0, 8)
- } else {
- out.Properties = []*PropertyPreview{}
- }
- } else {
- out.Properties = (out.Properties)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *PropertyPreview
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(PropertyPreview)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Properties = append(out.Properties, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "entries":
- if in.IsNull() {
- in.Skip()
- out.Entries = nil
- } else {
- in.Delim('[')
- if out.Entries == nil {
- if !in.IsDelim(']') {
- out.Entries = make([]*EntryPreview, 0, 8)
- } else {
- out.Entries = []*EntryPreview{}
- }
- } else {
- out.Entries = (out.Entries)[:0]
- }
- for !in.IsDelim(']') {
- var v5 *EntryPreview
- if in.IsNull() {
- in.Skip()
- v5 = nil
- } else {
- if v5 == nil {
- v5 = new(EntryPreview)
- }
- (*v5).UnmarshalEasyJSON(in)
- }
- out.Entries = append(out.Entries, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime17(out *jwriter.Writer, in ObjectPreview) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- if in.Subtype != "" {
- const prefix string = ",\"subtype\":"
- out.RawString(prefix)
- (in.Subtype).MarshalEasyJSON(out)
- }
- if in.Description != "" {
- const prefix string = ",\"description\":"
- out.RawString(prefix)
- out.String(string(in.Description))
- }
- {
- const prefix string = ",\"overflow\":"
- out.RawString(prefix)
- out.Bool(bool(in.Overflow))
- }
- {
- const prefix string = ",\"properties\":"
- out.RawString(prefix)
- if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.Properties {
- if v6 > 0 {
- out.RawByte(',')
- }
- if v7 == nil {
- out.RawString("null")
- } else {
- (*v7).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.Entries) != 0 {
- const prefix string = ",\"entries\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.Entries {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ObjectPreview) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ObjectPreview) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ObjectPreview) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ObjectPreview) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime18(in *jlexer.Lexer, out *InternalPropertyDescriptor) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(RemoteObject)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime18(out *jwriter.Writer, in InternalPropertyDescriptor) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.Value != nil {
- const prefix string = ",\"value\":"
- out.RawString(prefix)
- (*in.Value).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InternalPropertyDescriptor) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InternalPropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InternalPropertyDescriptor) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InternalPropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime19(in *jlexer.Lexer, out *GlobalLexicalScopeNamesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "names":
- if in.IsNull() {
- in.Skip()
- out.Names = nil
- } else {
- in.Delim('[')
- if out.Names == nil {
- if !in.IsDelim(']') {
- out.Names = make([]string, 0, 4)
- } else {
- out.Names = []string{}
- }
- } else {
- out.Names = (out.Names)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Names = append(out.Names, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime19(out *jwriter.Writer, in GlobalLexicalScopeNamesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Names) != 0 {
- const prefix string = ",\"names\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v11, v12 := range in.Names {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GlobalLexicalScopeNamesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GlobalLexicalScopeNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GlobalLexicalScopeNamesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GlobalLexicalScopeNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime20(in *jlexer.Lexer, out *GlobalLexicalScopeNamesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime20(out *jwriter.Writer, in GlobalLexicalScopeNamesParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GlobalLexicalScopeNamesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GlobalLexicalScopeNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GlobalLexicalScopeNamesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GlobalLexicalScopeNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime21(in *jlexer.Lexer, out *GetPropertiesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- in.Delim('[')
- if out.Result == nil {
- if !in.IsDelim(']') {
- out.Result = make([]*PropertyDescriptor, 0, 8)
- } else {
- out.Result = []*PropertyDescriptor{}
- }
- } else {
- out.Result = (out.Result)[:0]
- }
- for !in.IsDelim(']') {
- var v13 *PropertyDescriptor
- if in.IsNull() {
- in.Skip()
- v13 = nil
- } else {
- if v13 == nil {
- v13 = new(PropertyDescriptor)
- }
- (*v13).UnmarshalEasyJSON(in)
- }
- out.Result = append(out.Result, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "internalProperties":
- if in.IsNull() {
- in.Skip()
- out.InternalProperties = nil
- } else {
- in.Delim('[')
- if out.InternalProperties == nil {
- if !in.IsDelim(']') {
- out.InternalProperties = make([]*InternalPropertyDescriptor, 0, 8)
- } else {
- out.InternalProperties = []*InternalPropertyDescriptor{}
- }
- } else {
- out.InternalProperties = (out.InternalProperties)[:0]
- }
- for !in.IsDelim(']') {
- var v14 *InternalPropertyDescriptor
- if in.IsNull() {
- in.Skip()
- v14 = nil
- } else {
- if v14 == nil {
- v14 = new(InternalPropertyDescriptor)
- }
- (*v14).UnmarshalEasyJSON(in)
- }
- out.InternalProperties = append(out.InternalProperties, v14)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "privateProperties":
- if in.IsNull() {
- in.Skip()
- out.PrivateProperties = nil
- } else {
- in.Delim('[')
- if out.PrivateProperties == nil {
- if !in.IsDelim(']') {
- out.PrivateProperties = make([]*PrivatePropertyDescriptor, 0, 8)
- } else {
- out.PrivateProperties = []*PrivatePropertyDescriptor{}
- }
- } else {
- out.PrivateProperties = (out.PrivateProperties)[:0]
- }
- for !in.IsDelim(']') {
- var v15 *PrivatePropertyDescriptor
- if in.IsNull() {
- in.Skip()
- v15 = nil
- } else {
- if v15 == nil {
- v15 = new(PrivatePropertyDescriptor)
- }
- (*v15).UnmarshalEasyJSON(in)
- }
- out.PrivateProperties = append(out.PrivateProperties, v15)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime21(out *jwriter.Writer, in GetPropertiesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Result) != 0 {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v16, v17 := range in.Result {
- if v16 > 0 {
- out.RawByte(',')
- }
- if v17 == nil {
- out.RawString("null")
- } else {
- (*v17).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.InternalProperties) != 0 {
- const prefix string = ",\"internalProperties\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v18, v19 := range in.InternalProperties {
- if v18 > 0 {
- out.RawByte(',')
- }
- if v19 == nil {
- out.RawString("null")
- } else {
- (*v19).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if len(in.PrivateProperties) != 0 {
- const prefix string = ",\"privateProperties\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v20, v21 := range in.PrivateProperties {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPropertiesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPropertiesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPropertiesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPropertiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime22(in *jlexer.Lexer, out *GetPropertiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "objectId":
- out.ObjectID = RemoteObjectID(in.String())
- case "ownProperties":
- out.OwnProperties = bool(in.Bool())
- case "accessorPropertiesOnly":
- out.AccessorPropertiesOnly = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime22(out *jwriter.Writer, in GetPropertiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ObjectID))
- }
- if in.OwnProperties {
- const prefix string = ",\"ownProperties\":"
- out.RawString(prefix)
- out.Bool(bool(in.OwnProperties))
- }
- if in.AccessorPropertiesOnly {
- const prefix string = ",\"accessorPropertiesOnly\":"
- out.RawString(prefix)
- out.Bool(bool(in.AccessorPropertiesOnly))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetPropertiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetPropertiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetPropertiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime23(in *jlexer.Lexer, out *GetIsolateIDReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime23(out *jwriter.Writer, in GetIsolateIDReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ID != "" {
- const prefix string = ",\"id\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetIsolateIDReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetIsolateIDReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetIsolateIDReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetIsolateIDReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime24(in *jlexer.Lexer, out *GetIsolateIDParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime24(out *jwriter.Writer, in GetIsolateIDParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetIsolateIDParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetIsolateIDParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetIsolateIDParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetIsolateIDParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime25(in *jlexer.Lexer, out *GetHeapUsageReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "usedSize":
- out.UsedSize = float64(in.Float64())
- case "totalSize":
- out.TotalSize = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime25(out *jwriter.Writer, in GetHeapUsageReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.UsedSize != 0 {
- const prefix string = ",\"usedSize\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.UsedSize))
- }
- if in.TotalSize != 0 {
- const prefix string = ",\"totalSize\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.TotalSize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHeapUsageReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHeapUsageReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHeapUsageReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHeapUsageReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime26(in *jlexer.Lexer, out *GetHeapUsageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime26(out *jwriter.Writer, in GetHeapUsageParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetHeapUsageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetHeapUsageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetHeapUsageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetHeapUsageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime27(in *jlexer.Lexer, out *ExecutionContextDescription) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "id":
- out.ID = ExecutionContextID(in.Int64())
- case "origin":
- out.Origin = string(in.String())
- case "name":
- out.Name = string(in.String())
- case "uniqueId":
- out.UniqueID = string(in.String())
- case "auxData":
- (out.AuxData).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime27(out *jwriter.Writer, in ExecutionContextDescription) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ID))
- }
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix)
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix)
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"uniqueId\":"
- out.RawString(prefix)
- out.String(string(in.UniqueID))
- }
- if (in.AuxData).IsDefined() {
- const prefix string = ",\"auxData\":"
- out.RawString(prefix)
- (in.AuxData).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExecutionContextDescription) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExecutionContextDescription) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExecutionContextDescription) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExecutionContextDescription) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime28(in *jlexer.Lexer, out *ExceptionDetails) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "exceptionId":
- out.ExceptionID = int64(in.Int64())
- case "text":
- out.Text = string(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- case "scriptId":
- out.ScriptID = ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- case "exception":
- if in.IsNull() {
- in.Skip()
- out.Exception = nil
- } else {
- if out.Exception == nil {
- out.Exception = new(RemoteObject)
- }
- (*out.Exception).UnmarshalEasyJSON(in)
- }
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- case "exceptionMetaData":
- (out.ExceptionMetaData).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime28(out *jwriter.Writer, in ExceptionDetails) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"exceptionId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ExceptionID))
- }
- {
- const prefix string = ",\"text\":"
- out.RawString(prefix)
- out.String(string(in.Text))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- if in.ScriptID != "" {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix)
- out.String(string(in.ScriptID))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- out.RawString(prefix)
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- if in.Exception != nil {
- const prefix string = ",\"exception\":"
- out.RawString(prefix)
- (*in.Exception).MarshalEasyJSON(out)
- }
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- if (in.ExceptionMetaData).IsDefined() {
- const prefix string = ",\"exceptionMetaData\":"
- out.RawString(prefix)
- (in.ExceptionMetaData).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExceptionDetails) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExceptionDetails) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExceptionDetails) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExceptionDetails) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime29(in *jlexer.Lexer, out *EventInspectRequested) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "object":
- if in.IsNull() {
- in.Skip()
- out.Object = nil
- } else {
- if out.Object == nil {
- out.Object = new(RemoteObject)
- }
- (*out.Object).UnmarshalEasyJSON(in)
- }
- case "hints":
- (out.Hints).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime29(out *jwriter.Writer, in EventInspectRequested) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"object\":"
- out.RawString(prefix[1:])
- if in.Object == nil {
- out.RawString("null")
- } else {
- (*in.Object).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"hints\":"
- out.RawString(prefix)
- (in.Hints).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventInspectRequested) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventInspectRequested) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventInspectRequested) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventInspectRequested) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime30(in *jlexer.Lexer, out *EventExecutionContextsCleared) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime30(out *jwriter.Writer, in EventExecutionContextsCleared) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventExecutionContextsCleared) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventExecutionContextsCleared) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventExecutionContextsCleared) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventExecutionContextsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime30(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime31(in *jlexer.Lexer, out *EventExecutionContextDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime31(out *jwriter.Writer, in EventExecutionContextDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventExecutionContextDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime31(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventExecutionContextDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime31(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventExecutionContextDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime31(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventExecutionContextDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime31(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime32(in *jlexer.Lexer, out *EventExecutionContextCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "context":
- if in.IsNull() {
- in.Skip()
- out.Context = nil
- } else {
- if out.Context == nil {
- out.Context = new(ExecutionContextDescription)
- }
- (*out.Context).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime32(out *jwriter.Writer, in EventExecutionContextCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"context\":"
- out.RawString(prefix[1:])
- if in.Context == nil {
- out.RawString("null")
- } else {
- (*in.Context).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventExecutionContextCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime32(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventExecutionContextCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime32(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventExecutionContextCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime32(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventExecutionContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime32(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime33(in *jlexer.Lexer, out *EventExceptionThrown) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(Timestamp)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime33(out *jwriter.Writer, in EventExceptionThrown) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix[1:])
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"exceptionDetails\":"
- out.RawString(prefix)
- if in.ExceptionDetails == nil {
- out.RawString("null")
- } else {
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventExceptionThrown) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime33(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventExceptionThrown) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime33(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventExceptionThrown) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime33(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventExceptionThrown) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime33(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime34(in *jlexer.Lexer, out *EventExceptionRevoked) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "reason":
- out.Reason = string(in.String())
- case "exceptionId":
- out.ExceptionID = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime34(out *jwriter.Writer, in EventExceptionRevoked) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"reason\":"
- out.RawString(prefix[1:])
- out.String(string(in.Reason))
- }
- {
- const prefix string = ",\"exceptionId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExceptionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventExceptionRevoked) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime34(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventExceptionRevoked) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime34(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventExceptionRevoked) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime34(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventExceptionRevoked) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime34(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime35(in *jlexer.Lexer, out *EventConsoleAPICalled) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- (out.Type).UnmarshalEasyJSON(in)
- case "args":
- if in.IsNull() {
- in.Skip()
- out.Args = nil
- } else {
- in.Delim('[')
- if out.Args == nil {
- if !in.IsDelim(']') {
- out.Args = make([]*RemoteObject, 0, 8)
- } else {
- out.Args = []*RemoteObject{}
- }
- } else {
- out.Args = (out.Args)[:0]
- }
- for !in.IsDelim(']') {
- var v22 *RemoteObject
- if in.IsNull() {
- in.Skip()
- v22 = nil
- } else {
- if v22 == nil {
- v22 = new(RemoteObject)
- }
- (*v22).UnmarshalEasyJSON(in)
- }
- out.Args = append(out.Args, v22)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- case "timestamp":
- if in.IsNull() {
- in.Skip()
- out.Timestamp = nil
- } else {
- if out.Timestamp == nil {
- out.Timestamp = new(Timestamp)
- }
- (*out.Timestamp).UnmarshalEasyJSON(in)
- }
- case "stackTrace":
- if in.IsNull() {
- in.Skip()
- out.StackTrace = nil
- } else {
- if out.StackTrace == nil {
- out.StackTrace = new(StackTrace)
- }
- (*out.StackTrace).UnmarshalEasyJSON(in)
- }
- case "context":
- out.Context = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime35(out *jwriter.Writer, in EventConsoleAPICalled) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- (in.Type).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"args\":"
- out.RawString(prefix)
- if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v23, v24 := range in.Args {
- if v23 > 0 {
- out.RawByte(',')
- }
- if v24 == nil {
- out.RawString("null")
- } else {
- (*v24).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- {
- const prefix string = ",\"timestamp\":"
- out.RawString(prefix)
- if in.Timestamp == nil {
- out.RawString("null")
- } else {
- (*in.Timestamp).MarshalEasyJSON(out)
- }
- }
- if in.StackTrace != nil {
- const prefix string = ",\"stackTrace\":"
- out.RawString(prefix)
- (*in.StackTrace).MarshalEasyJSON(out)
- }
- if in.Context != "" {
- const prefix string = ",\"context\":"
- out.RawString(prefix)
- out.String(string(in.Context))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventConsoleAPICalled) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime35(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventConsoleAPICalled) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime35(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventConsoleAPICalled) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime35(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventConsoleAPICalled) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime35(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime36(in *jlexer.Lexer, out *EventBindingCalled) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "payload":
- out.Payload = string(in.String())
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime36(out *jwriter.Writer, in EventBindingCalled) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- {
- const prefix string = ",\"payload\":"
- out.RawString(prefix)
- out.String(string(in.Payload))
- }
- {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventBindingCalled) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime36(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventBindingCalled) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime36(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventBindingCalled) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime36(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventBindingCalled) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime36(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime37(in *jlexer.Lexer, out *EvaluateReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime37(out *jwriter.Writer, in EvaluateReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EvaluateReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime37(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EvaluateReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime37(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EvaluateReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime37(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EvaluateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime37(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime38(in *jlexer.Lexer, out *EvaluateParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "expression":
- out.Expression = string(in.String())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- case "includeCommandLineAPI":
- out.IncludeCommandLineAPI = bool(in.Bool())
- case "silent":
- out.Silent = bool(in.Bool())
- case "contextId":
- out.ContextID = ExecutionContextID(in.Int64())
- case "returnByValue":
- out.ReturnByValue = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- case "userGesture":
- out.UserGesture = bool(in.Bool())
- case "awaitPromise":
- out.AwaitPromise = bool(in.Bool())
- case "throwOnSideEffect":
- out.ThrowOnSideEffect = bool(in.Bool())
- case "timeout":
- out.Timeout = TimeDelta(in.Float64())
- case "disableBreaks":
- out.DisableBreaks = bool(in.Bool())
- case "replMode":
- out.ReplMode = bool(in.Bool())
- case "allowUnsafeEvalBlockedByCSP":
- out.AllowUnsafeEvalBlockedByCSP = bool(in.Bool())
- case "uniqueContextId":
- out.UniqueContextID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime38(out *jwriter.Writer, in EvaluateParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"expression\":"
- out.RawString(prefix[1:])
- out.String(string(in.Expression))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- if in.IncludeCommandLineAPI {
- const prefix string = ",\"includeCommandLineAPI\":"
- out.RawString(prefix)
- out.Bool(bool(in.IncludeCommandLineAPI))
- }
- if in.Silent {
- const prefix string = ",\"silent\":"
- out.RawString(prefix)
- out.Bool(bool(in.Silent))
- }
- if in.ContextID != 0 {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ContextID))
- }
- if in.ReturnByValue {
- const prefix string = ",\"returnByValue\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReturnByValue))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- if in.UserGesture {
- const prefix string = ",\"userGesture\":"
- out.RawString(prefix)
- out.Bool(bool(in.UserGesture))
- }
- if in.AwaitPromise {
- const prefix string = ",\"awaitPromise\":"
- out.RawString(prefix)
- out.Bool(bool(in.AwaitPromise))
- }
- if in.ThrowOnSideEffect {
- const prefix string = ",\"throwOnSideEffect\":"
- out.RawString(prefix)
- out.Bool(bool(in.ThrowOnSideEffect))
- }
- if in.Timeout != 0 {
- const prefix string = ",\"timeout\":"
- out.RawString(prefix)
- out.Float64(float64(in.Timeout))
- }
- if in.DisableBreaks {
- const prefix string = ",\"disableBreaks\":"
- out.RawString(prefix)
- out.Bool(bool(in.DisableBreaks))
- }
- if in.ReplMode {
- const prefix string = ",\"replMode\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReplMode))
- }
- if in.AllowUnsafeEvalBlockedByCSP {
- const prefix string = ",\"allowUnsafeEvalBlockedByCSP\":"
- out.RawString(prefix)
- out.Bool(bool(in.AllowUnsafeEvalBlockedByCSP))
- }
- if in.UniqueContextID != "" {
- const prefix string = ",\"uniqueContextId\":"
- out.RawString(prefix)
- out.String(string(in.UniqueContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EvaluateParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime38(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EvaluateParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime38(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EvaluateParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime38(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EvaluateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime38(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime39(in *jlexer.Lexer, out *EntryPreview) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "key":
- if in.IsNull() {
- in.Skip()
- out.Key = nil
- } else {
- if out.Key == nil {
- out.Key = new(ObjectPreview)
- }
- (*out.Key).UnmarshalEasyJSON(in)
- }
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- if out.Value == nil {
- out.Value = new(ObjectPreview)
- }
- (*out.Value).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime39(out *jwriter.Writer, in EntryPreview) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Key != nil {
- const prefix string = ",\"key\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Key).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"value\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- if in.Value == nil {
- out.RawString("null")
- } else {
- (*in.Value).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EntryPreview) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime39(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EntryPreview) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime39(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EntryPreview) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime39(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EntryPreview) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime39(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime40(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime40(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime40(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime40(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime40(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime40(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime41(in *jlexer.Lexer, out *DiscardConsoleEntriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime41(out *jwriter.Writer, in DiscardConsoleEntriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DiscardConsoleEntriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime41(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DiscardConsoleEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime41(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DiscardConsoleEntriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime41(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DiscardConsoleEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime41(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime42(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime42(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime42(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime42(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime42(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime42(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime43(in *jlexer.Lexer, out *CustomPreview) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "header":
- out.Header = string(in.String())
- case "bodyGetterId":
- out.BodyGetterID = RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime43(out *jwriter.Writer, in CustomPreview) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"header\":"
- out.RawString(prefix[1:])
- out.String(string(in.Header))
- }
- if in.BodyGetterID != "" {
- const prefix string = ",\"bodyGetterId\":"
- out.RawString(prefix)
- out.String(string(in.BodyGetterID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CustomPreview) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime43(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CustomPreview) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime43(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CustomPreview) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime43(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CustomPreview) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime43(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime44(in *jlexer.Lexer, out *CompileScriptReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scriptId":
- out.ScriptID = ScriptID(in.String())
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime44(out *jwriter.Writer, in CompileScriptReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.ScriptID != "" {
- const prefix string = ",\"scriptId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.ScriptID))
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CompileScriptReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime44(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CompileScriptReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime44(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CompileScriptReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime44(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CompileScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime44(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime45(in *jlexer.Lexer, out *CompileScriptParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "expression":
- out.Expression = string(in.String())
- case "sourceURL":
- out.SourceURL = string(in.String())
- case "persistScript":
- out.PersistScript = bool(in.Bool())
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime45(out *jwriter.Writer, in CompileScriptParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"expression\":"
- out.RawString(prefix[1:])
- out.String(string(in.Expression))
- }
- {
- const prefix string = ",\"sourceURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceURL))
- }
- {
- const prefix string = ",\"persistScript\":"
- out.RawString(prefix)
- out.Bool(bool(in.PersistScript))
- }
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CompileScriptParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime45(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime45(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CompileScriptParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime45(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime45(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(in *jlexer.Lexer, out *CallFunctionOnReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(out *jwriter.Writer, in CallFunctionOnReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CallFunctionOnReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CallFunctionOnReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CallFunctionOnReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CallFunctionOnReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(in *jlexer.Lexer, out *CallFunctionOnParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "functionDeclaration":
- out.FunctionDeclaration = string(in.String())
- case "objectId":
- out.ObjectID = RemoteObjectID(in.String())
- case "arguments":
- if in.IsNull() {
- in.Skip()
- out.Arguments = nil
- } else {
- in.Delim('[')
- if out.Arguments == nil {
- if !in.IsDelim(']') {
- out.Arguments = make([]*CallArgument, 0, 8)
- } else {
- out.Arguments = []*CallArgument{}
- }
- } else {
- out.Arguments = (out.Arguments)[:0]
- }
- for !in.IsDelim(']') {
- var v25 *CallArgument
- if in.IsNull() {
- in.Skip()
- v25 = nil
- } else {
- if v25 == nil {
- v25 = new(CallArgument)
- }
- (*v25).UnmarshalEasyJSON(in)
- }
- out.Arguments = append(out.Arguments, v25)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "silent":
- out.Silent = bool(in.Bool())
- case "returnByValue":
- out.ReturnByValue = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- case "userGesture":
- out.UserGesture = bool(in.Bool())
- case "awaitPromise":
- out.AwaitPromise = bool(in.Bool())
- case "executionContextId":
- out.ExecutionContextID = ExecutionContextID(in.Int64())
- case "objectGroup":
- out.ObjectGroup = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(out *jwriter.Writer, in CallFunctionOnParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"functionDeclaration\":"
- out.RawString(prefix[1:])
- out.String(string(in.FunctionDeclaration))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- out.RawString(prefix)
- out.String(string(in.ObjectID))
- }
- if len(in.Arguments) != 0 {
- const prefix string = ",\"arguments\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v26, v27 := range in.Arguments {
- if v26 > 0 {
- out.RawByte(',')
- }
- if v27 == nil {
- out.RawString("null")
- } else {
- (*v27).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Silent {
- const prefix string = ",\"silent\":"
- out.RawString(prefix)
- out.Bool(bool(in.Silent))
- }
- if in.ReturnByValue {
- const prefix string = ",\"returnByValue\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReturnByValue))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- if in.UserGesture {
- const prefix string = ",\"userGesture\":"
- out.RawString(prefix)
- out.Bool(bool(in.UserGesture))
- }
- if in.AwaitPromise {
- const prefix string = ",\"awaitPromise\":"
- out.RawString(prefix)
- out.Bool(bool(in.AwaitPromise))
- }
- if in.ExecutionContextID != 0 {
- const prefix string = ",\"executionContextId\":"
- out.RawString(prefix)
- out.Int64(int64(in.ExecutionContextID))
- }
- if in.ObjectGroup != "" {
- const prefix string = ",\"objectGroup\":"
- out.RawString(prefix)
- out.String(string(in.ObjectGroup))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CallFunctionOnParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(in *jlexer.Lexer, out *CallFrame) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "functionName":
- out.FunctionName = string(in.String())
- case "scriptId":
- out.ScriptID = ScriptID(in.String())
- case "url":
- out.URL = string(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(out *jwriter.Writer, in CallFrame) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"functionName\":"
- out.RawString(prefix[1:])
- out.String(string(in.FunctionName))
- }
- {
- const prefix string = ",\"scriptId\":"
- out.RawString(prefix)
- out.String(string(in.ScriptID))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CallFrame) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CallFrame) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(in *jlexer.Lexer, out *CallArgument) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- (out.Value).UnmarshalEasyJSON(in)
- case "unserializableValue":
- out.UnserializableValue = UnserializableValue(in.String())
- case "objectId":
- out.ObjectID = RemoteObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(out *jwriter.Writer, in CallArgument) {
- out.RawByte('{')
- first := true
- _ = first
- if (in.Value).IsDefined() {
- const prefix string = ",\"value\":"
- first = false
- out.RawString(prefix[1:])
- (in.Value).MarshalEasyJSON(out)
- }
- if in.UnserializableValue != "" {
- const prefix string = ",\"unserializableValue\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.UnserializableValue))
- }
- if in.ObjectID != "" {
- const prefix string = ",\"objectId\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ObjectID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CallArgument) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CallArgument) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CallArgument) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CallArgument) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, out *AwaitPromiseReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "result":
- if in.IsNull() {
- in.Skip()
- out.Result = nil
- } else {
- if out.Result == nil {
- out.Result = new(RemoteObject)
- }
- (*out.Result).UnmarshalEasyJSON(in)
- }
- case "exceptionDetails":
- if in.IsNull() {
- in.Skip()
- out.ExceptionDetails = nil
- } else {
- if out.ExceptionDetails == nil {
- out.ExceptionDetails = new(ExceptionDetails)
- }
- (*out.ExceptionDetails).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer, in AwaitPromiseReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Result != nil {
- const prefix string = ",\"result\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Result).MarshalEasyJSON(out)
- }
- if in.ExceptionDetails != nil {
- const prefix string = ",\"exceptionDetails\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.ExceptionDetails).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AwaitPromiseReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AwaitPromiseReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AwaitPromiseReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AwaitPromiseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(in *jlexer.Lexer, out *AwaitPromiseParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "promiseObjectId":
- out.PromiseObjectID = RemoteObjectID(in.String())
- case "returnByValue":
- out.ReturnByValue = bool(in.Bool())
- case "generatePreview":
- out.GeneratePreview = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(out *jwriter.Writer, in AwaitPromiseParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"promiseObjectId\":"
- out.RawString(prefix[1:])
- out.String(string(in.PromiseObjectID))
- }
- if in.ReturnByValue {
- const prefix string = ",\"returnByValue\":"
- out.RawString(prefix)
- out.Bool(bool(in.ReturnByValue))
- }
- if in.GeneratePreview {
- const prefix string = ",\"generatePreview\":"
- out.RawString(prefix)
- out.Bool(bool(in.GeneratePreview))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AwaitPromiseParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(in *jlexer.Lexer, out *AddBindingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "name":
- out.Name = string(in.String())
- case "executionContextName":
- out.ExecutionContextName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(out *jwriter.Writer, in AddBindingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"name\":"
- out.RawString(prefix[1:])
- out.String(string(in.Name))
- }
- if in.ExecutionContextName != "" {
- const prefix string = ",\"executionContextName\":"
- out.RawString(prefix)
- out.String(string(in.ExecutionContextName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddBindingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddBindingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddBindingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddBindingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/runtime/events.go b/vendor/github.com/chromedp/cdproto/runtime/events.go
deleted file mode 100644
index a8d9dc7cfab..00000000000
--- a/vendor/github.com/chromedp/cdproto/runtime/events.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package runtime
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/mailru/easyjson"
-)
-
-// EventBindingCalled notification is issued every time when binding is
-// called.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-bindingCalled
-type EventBindingCalled struct {
- Name string `json:"name"`
- Payload string `json:"payload"`
- ExecutionContextID ExecutionContextID `json:"executionContextId"` // Identifier of the context where the call was made.
-}
-
-// EventConsoleAPICalled issued when console API was called.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-consoleAPICalled
-type EventConsoleAPICalled struct {
- Type APIType `json:"type"` // Type of the call.
- Args []*RemoteObject `json:"args"` // Call arguments.
- ExecutionContextID ExecutionContextID `json:"executionContextId"` // Identifier of the context where the call was made.
- Timestamp *Timestamp `json:"timestamp"` // Call timestamp.
- StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: assert, error, trace, warning. For other types the async call chain can be retrieved using Debugger.getStackTrace and stackTrace.parentId field.
- Context string `json:"context,omitempty"` // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
-}
-
-// EventExceptionRevoked issued when unhandled exception was revoked.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-exceptionRevoked
-type EventExceptionRevoked struct {
- Reason string `json:"reason"` // Reason describing why exception was revoked.
- ExceptionID int64 `json:"exceptionId"` // The id of revoked exception, as reported in exceptionThrown.
-}
-
-// EventExceptionThrown issued when exception was thrown and unhandled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-exceptionThrown
-type EventExceptionThrown struct {
- Timestamp *Timestamp `json:"timestamp"` // Timestamp of the exception.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`
-}
-
-// EventExecutionContextCreated issued when new execution context is created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-executionContextCreated
-type EventExecutionContextCreated struct {
- Context *ExecutionContextDescription `json:"context"` // A newly created execution context.
-}
-
-// EventExecutionContextDestroyed issued when execution context is destroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-executionContextDestroyed
-type EventExecutionContextDestroyed struct {
- ExecutionContextID ExecutionContextID `json:"executionContextId"` // Id of the destroyed context
-}
-
-// EventExecutionContextsCleared issued when all executionContexts were
-// cleared in browser.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-executionContextsCleared
-type EventExecutionContextsCleared struct{}
-
-// EventInspectRequested issued when object should be inspected (for example,
-// as a result of inspect() command line API call).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-inspectRequested
-type EventInspectRequested struct {
- Object *RemoteObject `json:"object"`
- Hints easyjson.RawMessage `json:"hints"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/runtime/runtime.go b/vendor/github.com/chromedp/cdproto/runtime/runtime.go
deleted file mode 100644
index 2f51545744d..00000000000
--- a/vendor/github.com/chromedp/cdproto/runtime/runtime.go
+++ /dev/null
@@ -1,984 +0,0 @@
-// Package runtime provides the Chrome DevTools Protocol
-// commands, types, and events for the Runtime domain.
-//
-// Runtime domain exposes JavaScript runtime by means of remote evaluation
-// and mirror objects. Evaluation results are returned as mirror object that
-// expose object type, string representation and unique identifier that can be
-// used for further object reference. Original objects are maintained in memory
-// unless they are either explicitly released or are released along with the
-// other objects in their object group.
-//
-// Generated by the cdproto-gen command.
-package runtime
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// AwaitPromiseParams add handler to promise with given promise object id.
-type AwaitPromiseParams struct {
- PromiseObjectID RemoteObjectID `json:"promiseObjectId"` // Identifier of the promise.
- ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
-}
-
-// AwaitPromise add handler to promise with given promise object id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-awaitPromise
-//
-// parameters:
-// promiseObjectID - Identifier of the promise.
-func AwaitPromise(promiseObjectID RemoteObjectID) *AwaitPromiseParams {
- return &AwaitPromiseParams{
- PromiseObjectID: promiseObjectID,
- }
-}
-
-// WithReturnByValue whether the result is expected to be a JSON object that
-// should be sent by value.
-func (p AwaitPromiseParams) WithReturnByValue(returnByValue bool) *AwaitPromiseParams {
- p.ReturnByValue = returnByValue
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the result.
-func (p AwaitPromiseParams) WithGeneratePreview(generatePreview bool) *AwaitPromiseParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// AwaitPromiseReturns return values.
-type AwaitPromiseReturns struct {
- Result *RemoteObject `json:"result,omitempty"` // Promise result. Will contain rejected value if promise was rejected.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if stack strace is available.
-}
-
-// Do executes Runtime.awaitPromise against the provided context.
-//
-// returns:
-// result - Promise result. Will contain rejected value if promise was rejected.
-// exceptionDetails - Exception details if stack strace is available.
-func (p *AwaitPromiseParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res AwaitPromiseReturns
- err = cdp.Execute(ctx, CommandAwaitPromise, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Result, res.ExceptionDetails, nil
-}
-
-// CallFunctionOnParams calls function with given declaration on the given
-// object. Object group of the result is inherited from the target object.
-type CallFunctionOnParams struct {
- FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call.
- ObjectID RemoteObjectID `json:"objectId,omitempty"` // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
- Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
- Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
- UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
- AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
- ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
-}
-
-// CallFunctionOn calls function with given declaration on the given object.
-// Object group of the result is inherited from the target object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-callFunctionOn
-//
-// parameters:
-// functionDeclaration - Declaration of the function to call.
-func CallFunctionOn(functionDeclaration string) *CallFunctionOnParams {
- return &CallFunctionOnParams{
- FunctionDeclaration: functionDeclaration,
- }
-}
-
-// WithObjectID identifier of the object to call function on. Either objectId
-// or executionContextId should be specified.
-func (p CallFunctionOnParams) WithObjectID(objectID RemoteObjectID) *CallFunctionOnParams {
- p.ObjectID = objectID
- return &p
-}
-
-// WithArguments call arguments. All call arguments must belong to the same
-// JavaScript world as the target object.
-func (p CallFunctionOnParams) WithArguments(arguments []*CallArgument) *CallFunctionOnParams {
- p.Arguments = arguments
- return &p
-}
-
-// WithSilent in silent mode exceptions thrown during evaluation are not
-// reported and do not pause execution. Overrides setPauseOnException state.
-func (p CallFunctionOnParams) WithSilent(silent bool) *CallFunctionOnParams {
- p.Silent = silent
- return &p
-}
-
-// WithReturnByValue whether the result is expected to be a JSON object which
-// should be sent by value.
-func (p CallFunctionOnParams) WithReturnByValue(returnByValue bool) *CallFunctionOnParams {
- p.ReturnByValue = returnByValue
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the result.
-func (p CallFunctionOnParams) WithGeneratePreview(generatePreview bool) *CallFunctionOnParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// WithUserGesture whether execution should be treated as initiated by user
-// in the UI.
-func (p CallFunctionOnParams) WithUserGesture(userGesture bool) *CallFunctionOnParams {
- p.UserGesture = userGesture
- return &p
-}
-
-// WithAwaitPromise whether execution should await for resulting value and
-// return once awaited promise is resolved.
-func (p CallFunctionOnParams) WithAwaitPromise(awaitPromise bool) *CallFunctionOnParams {
- p.AwaitPromise = awaitPromise
- return &p
-}
-
-// WithExecutionContextID specifies execution context which global object
-// will be used to call function on. Either executionContextId or objectId
-// should be specified.
-func (p CallFunctionOnParams) WithExecutionContextID(executionContextID ExecutionContextID) *CallFunctionOnParams {
- p.ExecutionContextID = executionContextID
- return &p
-}
-
-// WithObjectGroup symbolic group name that can be used to release multiple
-// objects. If objectGroup is not specified and objectId is, objectGroup will be
-// inherited from object.
-func (p CallFunctionOnParams) WithObjectGroup(objectGroup string) *CallFunctionOnParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// CallFunctionOnReturns return values.
-type CallFunctionOnReturns struct {
- Result *RemoteObject `json:"result,omitempty"` // Call result.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Runtime.callFunctionOn against the provided context.
-//
-// returns:
-// result - Call result.
-// exceptionDetails - Exception details.
-func (p *CallFunctionOnParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res CallFunctionOnReturns
- err = cdp.Execute(ctx, CommandCallFunctionOn, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Result, res.ExceptionDetails, nil
-}
-
-// CompileScriptParams compiles expression.
-type CompileScriptParams struct {
- Expression string `json:"expression"` // Expression to compile.
- SourceURL string `json:"sourceURL"` // Source url to be set for the script.
- PersistScript bool `json:"persistScript"` // Specifies whether the compiled script should be persisted.
- ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
-}
-
-// CompileScript compiles expression.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-compileScript
-//
-// parameters:
-// expression - Expression to compile.
-// sourceURL - Source url to be set for the script.
-// persistScript - Specifies whether the compiled script should be persisted.
-func CompileScript(expression string, sourceURL string, persistScript bool) *CompileScriptParams {
- return &CompileScriptParams{
- Expression: expression,
- SourceURL: sourceURL,
- PersistScript: persistScript,
- }
-}
-
-// WithExecutionContextID specifies in which execution context to perform
-// script run. If the parameter is omitted the evaluation will be performed in
-// the context of the inspected page.
-func (p CompileScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *CompileScriptParams {
- p.ExecutionContextID = executionContextID
- return &p
-}
-
-// CompileScriptReturns return values.
-type CompileScriptReturns struct {
- ScriptID ScriptID `json:"scriptId,omitempty"` // Id of the script.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Runtime.compileScript against the provided context.
-//
-// returns:
-// scriptID - Id of the script.
-// exceptionDetails - Exception details.
-func (p *CompileScriptParams) Do(ctx context.Context) (scriptID ScriptID, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res CompileScriptReturns
- err = cdp.Execute(ctx, CommandCompileScript, p, &res)
- if err != nil {
- return "", nil, err
- }
-
- return res.ScriptID, res.ExceptionDetails, nil
-}
-
-// DisableParams disables reporting of execution contexts creation.
-type DisableParams struct{}
-
-// Disable disables reporting of execution contexts creation.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Runtime.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// DiscardConsoleEntriesParams discards collected exceptions and console API
-// calls.
-type DiscardConsoleEntriesParams struct{}
-
-// DiscardConsoleEntries discards collected exceptions and console API calls.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-discardConsoleEntries
-func DiscardConsoleEntries() *DiscardConsoleEntriesParams {
- return &DiscardConsoleEntriesParams{}
-}
-
-// Do executes Runtime.discardConsoleEntries against the provided context.
-func (p *DiscardConsoleEntriesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDiscardConsoleEntries, nil, nil)
-}
-
-// EnableParams enables reporting of execution contexts creation by means of
-// executionContextCreated event. When the reporting gets enabled the event will
-// be sent immediately for each existing execution context.
-type EnableParams struct{}
-
-// Enable enables reporting of execution contexts creation by means of
-// executionContextCreated event. When the reporting gets enabled the event will
-// be sent immediately for each existing execution context.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Runtime.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// EvaluateParams evaluates expression on global object.
-type EvaluateParams struct {
- Expression string `json:"expression"` // Expression to evaluate.
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
- IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
- Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- ContextID ExecutionContextID `json:"contextId,omitempty"` // Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with uniqueContextId, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
- ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
- UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
- AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
- ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
- Timeout TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
- DisableBreaks bool `json:"disableBreaks,omitempty"` // Disable breakpoints during execution.
- ReplMode bool `json:"replMode,omitempty"` // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
- AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,omitempty"` // The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
- UniqueContextID string `json:"uniqueContextId,omitempty"` // An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with contextId.
-}
-
-// Evaluate evaluates expression on global object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-evaluate
-//
-// parameters:
-// expression - Expression to evaluate.
-func Evaluate(expression string) *EvaluateParams {
- return &EvaluateParams{
- Expression: expression,
- }
-}
-
-// WithObjectGroup symbolic group name that can be used to release multiple
-// objects.
-func (p EvaluateParams) WithObjectGroup(objectGroup string) *EvaluateParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// WithIncludeCommandLineAPI determines whether Command Line API should be
-// available during the evaluation.
-func (p EvaluateParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateParams {
- p.IncludeCommandLineAPI = includeCommandLineAPI
- return &p
-}
-
-// WithSilent in silent mode exceptions thrown during evaluation are not
-// reported and do not pause execution. Overrides setPauseOnException state.
-func (p EvaluateParams) WithSilent(silent bool) *EvaluateParams {
- p.Silent = silent
- return &p
-}
-
-// WithContextID specifies in which execution context to perform evaluation.
-// If the parameter is omitted the evaluation will be performed in the context
-// of the inspected page. This is mutually exclusive with uniqueContextId, which
-// offers an alternative way to identify the execution context that is more
-// reliable in a multi-process environment.
-func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams {
- p.ContextID = contextID
- return &p
-}
-
-// WithReturnByValue whether the result is expected to be a JSON object that
-// should be sent by value.
-func (p EvaluateParams) WithReturnByValue(returnByValue bool) *EvaluateParams {
- p.ReturnByValue = returnByValue
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the result.
-func (p EvaluateParams) WithGeneratePreview(generatePreview bool) *EvaluateParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// WithUserGesture whether execution should be treated as initiated by user
-// in the UI.
-func (p EvaluateParams) WithUserGesture(userGesture bool) *EvaluateParams {
- p.UserGesture = userGesture
- return &p
-}
-
-// WithAwaitPromise whether execution should await for resulting value and
-// return once awaited promise is resolved.
-func (p EvaluateParams) WithAwaitPromise(awaitPromise bool) *EvaluateParams {
- p.AwaitPromise = awaitPromise
- return &p
-}
-
-// WithThrowOnSideEffect whether to throw an exception if side effect cannot
-// be ruled out during evaluation. This implies disableBreaks below.
-func (p EvaluateParams) WithThrowOnSideEffect(throwOnSideEffect bool) *EvaluateParams {
- p.ThrowOnSideEffect = throwOnSideEffect
- return &p
-}
-
-// WithTimeout terminate execution after timing out (number of milliseconds).
-func (p EvaluateParams) WithTimeout(timeout TimeDelta) *EvaluateParams {
- p.Timeout = timeout
- return &p
-}
-
-// WithDisableBreaks disable breakpoints during execution.
-func (p EvaluateParams) WithDisableBreaks(disableBreaks bool) *EvaluateParams {
- p.DisableBreaks = disableBreaks
- return &p
-}
-
-// WithReplMode setting this flag to true enables let re-declaration and
-// top-level await. Note that let variables can only be re-declared if they
-// originate from replMode themselves.
-func (p EvaluateParams) WithReplMode(replMode bool) *EvaluateParams {
- p.ReplMode = replMode
- return &p
-}
-
-// WithAllowUnsafeEvalBlockedByCSP the Content Security Policy (CSP) for the
-// target might block 'unsafe-eval' which includes eval(), Function(),
-// setTimeout() and setInterval() when called with non-callable arguments. This
-// flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to
-// true.
-func (p EvaluateParams) WithAllowUnsafeEvalBlockedByCSP(allowUnsafeEvalBlockedByCSP bool) *EvaluateParams {
- p.AllowUnsafeEvalBlockedByCSP = allowUnsafeEvalBlockedByCSP
- return &p
-}
-
-// WithUniqueContextID an alternative way to specify the execution context to
-// evaluate in. Compared to contextId that may be reused across processes, this
-// is guaranteed to be system-unique, so it can be used to prevent accidental
-// evaluation of the expression in context different than intended (e.g. as a
-// result of navigation across process boundaries). This is mutually exclusive
-// with contextId.
-func (p EvaluateParams) WithUniqueContextID(uniqueContextID string) *EvaluateParams {
- p.UniqueContextID = uniqueContextID
- return &p
-}
-
-// EvaluateReturns return values.
-type EvaluateReturns struct {
- Result *RemoteObject `json:"result,omitempty"` // Evaluation result.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Runtime.evaluate against the provided context.
-//
-// returns:
-// result - Evaluation result.
-// exceptionDetails - Exception details.
-func (p *EvaluateParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res EvaluateReturns
- err = cdp.Execute(ctx, CommandEvaluate, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Result, res.ExceptionDetails, nil
-}
-
-// GetIsolateIDParams returns the isolate id.
-type GetIsolateIDParams struct{}
-
-// GetIsolateID returns the isolate id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getIsolateId
-func GetIsolateID() *GetIsolateIDParams {
- return &GetIsolateIDParams{}
-}
-
-// GetIsolateIDReturns return values.
-type GetIsolateIDReturns struct {
- ID string `json:"id,omitempty"` // The isolate id.
-}
-
-// Do executes Runtime.getIsolateId against the provided context.
-//
-// returns:
-// id - The isolate id.
-func (p *GetIsolateIDParams) Do(ctx context.Context) (id string, err error) {
- // execute
- var res GetIsolateIDReturns
- err = cdp.Execute(ctx, CommandGetIsolateID, nil, &res)
- if err != nil {
- return "", err
- }
-
- return res.ID, nil
-}
-
-// GetHeapUsageParams returns the JavaScript heap usage. It is the total
-// usage of the corresponding isolate not scoped to a particular Runtime.
-type GetHeapUsageParams struct{}
-
-// GetHeapUsage returns the JavaScript heap usage. It is the total usage of
-// the corresponding isolate not scoped to a particular Runtime.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getHeapUsage
-func GetHeapUsage() *GetHeapUsageParams {
- return &GetHeapUsageParams{}
-}
-
-// GetHeapUsageReturns return values.
-type GetHeapUsageReturns struct {
- UsedSize float64 `json:"usedSize,omitempty"` // Used heap size in bytes.
- TotalSize float64 `json:"totalSize,omitempty"` // Allocated heap size in bytes.
-}
-
-// Do executes Runtime.getHeapUsage against the provided context.
-//
-// returns:
-// usedSize - Used heap size in bytes.
-// totalSize - Allocated heap size in bytes.
-func (p *GetHeapUsageParams) Do(ctx context.Context) (usedSize float64, totalSize float64, err error) {
- // execute
- var res GetHeapUsageReturns
- err = cdp.Execute(ctx, CommandGetHeapUsage, nil, &res)
- if err != nil {
- return 0, 0, err
- }
-
- return res.UsedSize, res.TotalSize, nil
-}
-
-// GetPropertiesParams returns properties of a given object. Object group of
-// the result is inherited from the target object.
-type GetPropertiesParams struct {
- ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to return properties for.
- OwnProperties bool `json:"ownProperties,omitempty"` // If true, returns properties belonging only to the element itself, not to its prototype chain.
- AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"` // If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the results.
-}
-
-// GetProperties returns properties of a given object. Object group of the
-// result is inherited from the target object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getProperties
-//
-// parameters:
-// objectID - Identifier of the object to return properties for.
-func GetProperties(objectID RemoteObjectID) *GetPropertiesParams {
- return &GetPropertiesParams{
- ObjectID: objectID,
- }
-}
-
-// WithOwnProperties if true, returns properties belonging only to the
-// element itself, not to its prototype chain.
-func (p GetPropertiesParams) WithOwnProperties(ownProperties bool) *GetPropertiesParams {
- p.OwnProperties = ownProperties
- return &p
-}
-
-// WithAccessorPropertiesOnly if true, returns accessor properties (with
-// getter/setter) only; internal properties are not returned either.
-func (p GetPropertiesParams) WithAccessorPropertiesOnly(accessorPropertiesOnly bool) *GetPropertiesParams {
- p.AccessorPropertiesOnly = accessorPropertiesOnly
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the results.
-func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPropertiesParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// GetPropertiesReturns return values.
-type GetPropertiesReturns struct {
- Result []*PropertyDescriptor `json:"result,omitempty"` // Object properties.
- InternalProperties []*InternalPropertyDescriptor `json:"internalProperties,omitempty"` // Internal object properties (only of the element itself).
- PrivateProperties []*PrivatePropertyDescriptor `json:"privateProperties,omitempty"` // Object private properties.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Runtime.getProperties against the provided context.
-//
-// returns:
-// result - Object properties.
-// internalProperties - Internal object properties (only of the element itself).
-// privateProperties - Object private properties.
-// exceptionDetails - Exception details.
-func (p *GetPropertiesParams) Do(ctx context.Context) (result []*PropertyDescriptor, internalProperties []*InternalPropertyDescriptor, privateProperties []*PrivatePropertyDescriptor, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res GetPropertiesReturns
- err = cdp.Execute(ctx, CommandGetProperties, p, &res)
- if err != nil {
- return nil, nil, nil, nil, err
- }
-
- return res.Result, res.InternalProperties, res.PrivateProperties, res.ExceptionDetails, nil
-}
-
-// GlobalLexicalScopeNamesParams returns all let, const and class variables
-// from global scope.
-type GlobalLexicalScopeNamesParams struct {
- ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to lookup global scope variables.
-}
-
-// GlobalLexicalScopeNames returns all let, const and class variables from
-// global scope.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-globalLexicalScopeNames
-//
-// parameters:
-func GlobalLexicalScopeNames() *GlobalLexicalScopeNamesParams {
- return &GlobalLexicalScopeNamesParams{}
-}
-
-// WithExecutionContextID specifies in which execution context to lookup
-// global scope variables.
-func (p GlobalLexicalScopeNamesParams) WithExecutionContextID(executionContextID ExecutionContextID) *GlobalLexicalScopeNamesParams {
- p.ExecutionContextID = executionContextID
- return &p
-}
-
-// GlobalLexicalScopeNamesReturns return values.
-type GlobalLexicalScopeNamesReturns struct {
- Names []string `json:"names,omitempty"`
-}
-
-// Do executes Runtime.globalLexicalScopeNames against the provided context.
-//
-// returns:
-// names
-func (p *GlobalLexicalScopeNamesParams) Do(ctx context.Context) (names []string, err error) {
- // execute
- var res GlobalLexicalScopeNamesReturns
- err = cdp.Execute(ctx, CommandGlobalLexicalScopeNames, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Names, nil
-}
-
-// QueryObjectsParams [no description].
-type QueryObjectsParams struct {
- PrototypeObjectID RemoteObjectID `json:"prototypeObjectId"` // Identifier of the prototype to return objects for.
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release the results.
-}
-
-// QueryObjects [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-queryObjects
-//
-// parameters:
-// prototypeObjectID - Identifier of the prototype to return objects for.
-func QueryObjects(prototypeObjectID RemoteObjectID) *QueryObjectsParams {
- return &QueryObjectsParams{
- PrototypeObjectID: prototypeObjectID,
- }
-}
-
-// WithObjectGroup symbolic group name that can be used to release the
-// results.
-func (p QueryObjectsParams) WithObjectGroup(objectGroup string) *QueryObjectsParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// QueryObjectsReturns return values.
-type QueryObjectsReturns struct {
- Objects *RemoteObject `json:"objects,omitempty"` // Array with objects.
-}
-
-// Do executes Runtime.queryObjects against the provided context.
-//
-// returns:
-// objects - Array with objects.
-func (p *QueryObjectsParams) Do(ctx context.Context) (objects *RemoteObject, err error) {
- // execute
- var res QueryObjectsReturns
- err = cdp.Execute(ctx, CommandQueryObjects, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Objects, nil
-}
-
-// ReleaseObjectParams releases remote object with given id.
-type ReleaseObjectParams struct {
- ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to release.
-}
-
-// ReleaseObject releases remote object with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObject
-//
-// parameters:
-// objectID - Identifier of the object to release.
-func ReleaseObject(objectID RemoteObjectID) *ReleaseObjectParams {
- return &ReleaseObjectParams{
- ObjectID: objectID,
- }
-}
-
-// Do executes Runtime.releaseObject against the provided context.
-func (p *ReleaseObjectParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReleaseObject, p, nil)
-}
-
-// ReleaseObjectGroupParams releases all remote objects that belong to a
-// given group.
-type ReleaseObjectGroupParams struct {
- ObjectGroup string `json:"objectGroup"` // Symbolic object group name.
-}
-
-// ReleaseObjectGroup releases all remote objects that belong to a given
-// group.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObjectGroup
-//
-// parameters:
-// objectGroup - Symbolic object group name.
-func ReleaseObjectGroup(objectGroup string) *ReleaseObjectGroupParams {
- return &ReleaseObjectGroupParams{
- ObjectGroup: objectGroup,
- }
-}
-
-// Do executes Runtime.releaseObjectGroup against the provided context.
-func (p *ReleaseObjectGroupParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandReleaseObjectGroup, p, nil)
-}
-
-// RunIfWaitingForDebuggerParams tells inspected instance to run if it was
-// waiting for debugger to attach.
-type RunIfWaitingForDebuggerParams struct{}
-
-// RunIfWaitingForDebugger tells inspected instance to run if it was waiting
-// for debugger to attach.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-runIfWaitingForDebugger
-func RunIfWaitingForDebugger() *RunIfWaitingForDebuggerParams {
- return &RunIfWaitingForDebuggerParams{}
-}
-
-// Do executes Runtime.runIfWaitingForDebugger against the provided context.
-func (p *RunIfWaitingForDebuggerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRunIfWaitingForDebugger, nil, nil)
-}
-
-// RunScriptParams runs script with given id in a given context.
-type RunScriptParams struct {
- ScriptID ScriptID `json:"scriptId"` // Id of the script to run.
- ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
- ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
- Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
- IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
- ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value.
- GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
- AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
-}
-
-// RunScript runs script with given id in a given context.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-runScript
-//
-// parameters:
-// scriptID - Id of the script to run.
-func RunScript(scriptID ScriptID) *RunScriptParams {
- return &RunScriptParams{
- ScriptID: scriptID,
- }
-}
-
-// WithExecutionContextID specifies in which execution context to perform
-// script run. If the parameter is omitted the evaluation will be performed in
-// the context of the inspected page.
-func (p RunScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *RunScriptParams {
- p.ExecutionContextID = executionContextID
- return &p
-}
-
-// WithObjectGroup symbolic group name that can be used to release multiple
-// objects.
-func (p RunScriptParams) WithObjectGroup(objectGroup string) *RunScriptParams {
- p.ObjectGroup = objectGroup
- return &p
-}
-
-// WithSilent in silent mode exceptions thrown during evaluation are not
-// reported and do not pause execution. Overrides setPauseOnException state.
-func (p RunScriptParams) WithSilent(silent bool) *RunScriptParams {
- p.Silent = silent
- return &p
-}
-
-// WithIncludeCommandLineAPI determines whether Command Line API should be
-// available during the evaluation.
-func (p RunScriptParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *RunScriptParams {
- p.IncludeCommandLineAPI = includeCommandLineAPI
- return &p
-}
-
-// WithReturnByValue whether the result is expected to be a JSON object which
-// should be sent by value.
-func (p RunScriptParams) WithReturnByValue(returnByValue bool) *RunScriptParams {
- p.ReturnByValue = returnByValue
- return &p
-}
-
-// WithGeneratePreview whether preview should be generated for the result.
-func (p RunScriptParams) WithGeneratePreview(generatePreview bool) *RunScriptParams {
- p.GeneratePreview = generatePreview
- return &p
-}
-
-// WithAwaitPromise whether execution should await for resulting value and
-// return once awaited promise is resolved.
-func (p RunScriptParams) WithAwaitPromise(awaitPromise bool) *RunScriptParams {
- p.AwaitPromise = awaitPromise
- return &p
-}
-
-// RunScriptReturns return values.
-type RunScriptReturns struct {
- Result *RemoteObject `json:"result,omitempty"` // Run result.
- ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
-}
-
-// Do executes Runtime.runScript against the provided context.
-//
-// returns:
-// result - Run result.
-// exceptionDetails - Exception details.
-func (p *RunScriptParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
- // execute
- var res RunScriptReturns
- err = cdp.Execute(ctx, CommandRunScript, p, &res)
- if err != nil {
- return nil, nil, err
- }
-
- return res.Result, res.ExceptionDetails, nil
-}
-
-// SetCustomObjectFormatterEnabledParams [no description].
-type SetCustomObjectFormatterEnabledParams struct {
- Enabled bool `json:"enabled"`
-}
-
-// SetCustomObjectFormatterEnabled [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-setCustomObjectFormatterEnabled
-//
-// parameters:
-// enabled
-func SetCustomObjectFormatterEnabled(enabled bool) *SetCustomObjectFormatterEnabledParams {
- return &SetCustomObjectFormatterEnabledParams{
- Enabled: enabled,
- }
-}
-
-// Do executes Runtime.setCustomObjectFormatterEnabled against the provided context.
-func (p *SetCustomObjectFormatterEnabledParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCustomObjectFormatterEnabled, p, nil)
-}
-
-// SetMaxCallStackSizeToCaptureParams [no description].
-type SetMaxCallStackSizeToCaptureParams struct {
- Size int64 `json:"size"`
-}
-
-// SetMaxCallStackSizeToCapture [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-setMaxCallStackSizeToCapture
-//
-// parameters:
-// size
-func SetMaxCallStackSizeToCapture(size int64) *SetMaxCallStackSizeToCaptureParams {
- return &SetMaxCallStackSizeToCaptureParams{
- Size: size,
- }
-}
-
-// Do executes Runtime.setMaxCallStackSizeToCapture against the provided context.
-func (p *SetMaxCallStackSizeToCaptureParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetMaxCallStackSizeToCapture, p, nil)
-}
-
-// TerminateExecutionParams terminate current or next JavaScript execution.
-// Will cancel the termination when the outer-most script execution ends.
-type TerminateExecutionParams struct{}
-
-// TerminateExecution terminate current or next JavaScript execution. Will
-// cancel the termination when the outer-most script execution ends.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-terminateExecution
-func TerminateExecution() *TerminateExecutionParams {
- return &TerminateExecutionParams{}
-}
-
-// Do executes Runtime.terminateExecution against the provided context.
-func (p *TerminateExecutionParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandTerminateExecution, nil, nil)
-}
-
-// AddBindingParams if executionContextId is empty, adds binding with the
-// given name on the global objects of all inspected contexts, including those
-// created later, bindings survive reloads. Binding function takes exactly one
-// argument, this argument should be string, in case of any other input,
-// function throws an exception. Each binding function call produces
-// Runtime.bindingCalled notification.
-type AddBindingParams struct {
- Name string `json:"name"`
- ExecutionContextName string `json:"executionContextName,omitempty"` // If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also ExecutionContext.name and worldName parameter to Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive with executionContextId.
-}
-
-// AddBinding if executionContextId is empty, adds binding with the given
-// name on the global objects of all inspected contexts, including those created
-// later, bindings survive reloads. Binding function takes exactly one argument,
-// this argument should be string, in case of any other input, function throws
-// an exception. Each binding function call produces Runtime.bindingCalled
-// notification.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-addBinding
-//
-// parameters:
-// name
-func AddBinding(name string) *AddBindingParams {
- return &AddBindingParams{
- Name: name,
- }
-}
-
-// WithExecutionContextName if specified, the binding is exposed to the
-// executionContext with matching name, even for contexts created after the
-// binding is added. See also ExecutionContext.name and worldName parameter to
-// Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive
-// with executionContextId.
-func (p AddBindingParams) WithExecutionContextName(executionContextName string) *AddBindingParams {
- p.ExecutionContextName = executionContextName
- return &p
-}
-
-// Do executes Runtime.addBinding against the provided context.
-func (p *AddBindingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandAddBinding, p, nil)
-}
-
-// RemoveBindingParams this method does not remove binding function from
-// global object but unsubscribes current runtime agent from
-// Runtime.bindingCalled notifications.
-type RemoveBindingParams struct {
- Name string `json:"name"`
-}
-
-// RemoveBinding this method does not remove binding function from global
-// object but unsubscribes current runtime agent from Runtime.bindingCalled
-// notifications.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-removeBinding
-//
-// parameters:
-// name
-func RemoveBinding(name string) *RemoveBindingParams {
- return &RemoveBindingParams{
- Name: name,
- }
-}
-
-// Do executes Runtime.removeBinding against the provided context.
-func (p *RemoveBindingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveBinding, p, nil)
-}
-
-// Command names.
-const (
- CommandAwaitPromise = "Runtime.awaitPromise"
- CommandCallFunctionOn = "Runtime.callFunctionOn"
- CommandCompileScript = "Runtime.compileScript"
- CommandDisable = "Runtime.disable"
- CommandDiscardConsoleEntries = "Runtime.discardConsoleEntries"
- CommandEnable = "Runtime.enable"
- CommandEvaluate = "Runtime.evaluate"
- CommandGetIsolateID = "Runtime.getIsolateId"
- CommandGetHeapUsage = "Runtime.getHeapUsage"
- CommandGetProperties = "Runtime.getProperties"
- CommandGlobalLexicalScopeNames = "Runtime.globalLexicalScopeNames"
- CommandQueryObjects = "Runtime.queryObjects"
- CommandReleaseObject = "Runtime.releaseObject"
- CommandReleaseObjectGroup = "Runtime.releaseObjectGroup"
- CommandRunIfWaitingForDebugger = "Runtime.runIfWaitingForDebugger"
- CommandRunScript = "Runtime.runScript"
- CommandSetCustomObjectFormatterEnabled = "Runtime.setCustomObjectFormatterEnabled"
- CommandSetMaxCallStackSizeToCapture = "Runtime.setMaxCallStackSizeToCapture"
- CommandTerminateExecution = "Runtime.terminateExecution"
- CommandAddBinding = "Runtime.addBinding"
- CommandRemoveBinding = "Runtime.removeBinding"
-)
diff --git a/vendor/github.com/chromedp/cdproto/runtime/types.go b/vendor/github.com/chromedp/cdproto/runtime/types.go
deleted file mode 100644
index a979c140c1f..00000000000
--- a/vendor/github.com/chromedp/cdproto/runtime/types.go
+++ /dev/null
@@ -1,534 +0,0 @@
-package runtime
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
- "fmt"
- "strconv"
- "strings"
- "time"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// ScriptID unique script identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ScriptId
-type ScriptID string
-
-// String returns the ScriptID as string value.
-func (t ScriptID) String() string {
- return string(t)
-}
-
-// RemoteObjectID unique object identifier.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObjectId
-type RemoteObjectID string
-
-// String returns the RemoteObjectID as string value.
-func (t RemoteObjectID) String() string {
- return string(t)
-}
-
-// UnserializableValue primitive value which cannot be JSON-stringified.
-// Includes values -0, NaN, Infinity, -Infinity, and bigint literals.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UnserializableValue
-type UnserializableValue string
-
-// String returns the UnserializableValue as string value.
-func (t UnserializableValue) String() string {
- return string(t)
-}
-
-// RemoteObject mirror object referencing original JavaScript object.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObject
-type RemoteObject struct {
- Type Type `json:"type"` // Object type.
- Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. NOTE: If you change anything here, make sure to also update subtype in ObjectPreview and PropertyPreview below.
- ClassName string `json:"className,omitempty"` // Object class (constructor) name. Specified for object type values only.
- Value easyjson.RawMessage `json:"value,omitempty"` // Remote object value in case of primitive values or JSON values (if it was requested).
- UnserializableValue UnserializableValue `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified does not have value, but gets this property.
- Description string `json:"description,omitempty"` // String representation of the object.
- ObjectID RemoteObjectID `json:"objectId,omitempty"` // Unique object identifier (for non-primitive values).
- Preview *ObjectPreview `json:"preview,omitempty"` // Preview containing abbreviated property values. Specified for object type values only.
- CustomPreview *CustomPreview `json:"customPreview,omitempty"`
-}
-
-// CustomPreview [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-CustomPreview
-type CustomPreview struct {
- Header string `json:"header"` // The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject.
- BodyGetterID RemoteObjectID `json:"bodyGetterId,omitempty"` // If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array.
-}
-
-// ObjectPreview object containing abbreviated remote object value.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ObjectPreview
-type ObjectPreview struct {
- Type Type `json:"type"` // Object type.
- Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
- Description string `json:"description,omitempty"` // String representation of the object.
- Overflow bool `json:"overflow"` // True iff some of the properties or entries of the original object did not fit.
- Properties []*PropertyPreview `json:"properties"` // List of the properties.
- Entries []*EntryPreview `json:"entries,omitempty"` // List of the entries. Specified for map and set subtype values only.
-}
-
-// PropertyPreview [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-PropertyPreview
-type PropertyPreview struct {
- Name string `json:"name"` // Property name.
- Type Type `json:"type"` // Object type. Accessor means that the property itself is an accessor property.
- Value string `json:"value,omitempty"` // User-friendly property value string.
- ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // Nested value preview.
- Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
-}
-
-// EntryPreview [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-EntryPreview
-type EntryPreview struct {
- Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries.
- Value *ObjectPreview `json:"value"` // Preview of the value.
-}
-
-// PropertyDescriptor object property descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-PropertyDescriptor
-type PropertyDescriptor struct {
- Name string `json:"name"` // Property name or symbol description.
- Value *RemoteObject `json:"value,omitempty"` // The value associated with the property.
- Writable bool `json:"writable,omitempty"` // True if the value associated with the property may be changed (data descriptors only).
- Get *RemoteObject `json:"get,omitempty"` // A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
- Set *RemoteObject `json:"set,omitempty"` // A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).
- Configurable bool `json:"configurable"` // True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
- Enumerable bool `json:"enumerable"` // True if this property shows up during enumeration of the properties on the corresponding object.
- WasThrown bool `json:"wasThrown,omitempty"` // True if the result was thrown during the evaluation.
- IsOwn bool `json:"isOwn,omitempty"` // True if the property is owned for the object.
- Symbol *RemoteObject `json:"symbol,omitempty"` // Property symbol object, if the property is of the symbol type.
-}
-
-// InternalPropertyDescriptor object internal property descriptor. This
-// property isn't normally visible in JavaScript code.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-InternalPropertyDescriptor
-type InternalPropertyDescriptor struct {
- Name string `json:"name"` // Conventional property name.
- Value *RemoteObject `json:"value,omitempty"` // The value associated with the property.
-}
-
-// PrivatePropertyDescriptor object private field descriptor.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-PrivatePropertyDescriptor
-type PrivatePropertyDescriptor struct {
- Name string `json:"name"` // Private property name.
- Value *RemoteObject `json:"value,omitempty"` // The value associated with the private property.
- Get *RemoteObject `json:"get,omitempty"` // A function which serves as a getter for the private property, or undefined if there is no getter (accessor descriptors only).
- Set *RemoteObject `json:"set,omitempty"` // A function which serves as a setter for the private property, or undefined if there is no setter (accessor descriptors only).
-}
-
-// CallArgument represents function call argument. Either remote object id
-// objectId, primitive value, unserializable primitive value or neither of (for
-// undefined) them should be specified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-CallArgument
-type CallArgument struct {
- Value easyjson.RawMessage `json:"value,omitempty"` // Primitive value or serializable javascript object.
- UnserializableValue UnserializableValue `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified.
- ObjectID RemoteObjectID `json:"objectId,omitempty"` // Remote object handle.
-}
-
-// ExecutionContextID ID of an execution context.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ExecutionContextId
-type ExecutionContextID int64
-
-// Int64 returns the ExecutionContextID as int64 value.
-func (t ExecutionContextID) Int64() int64 {
- return int64(t)
-}
-
-// ExecutionContextDescription description of an isolated world.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ExecutionContextDescription
-type ExecutionContextDescription struct {
- ID ExecutionContextID `json:"id"` // Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
- Origin string `json:"origin"` // Execution context origin.
- Name string `json:"name"` // Human readable name describing given context.
- UniqueID string `json:"uniqueId"` // A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation.
- AuxData easyjson.RawMessage `json:"auxData,omitempty"`
-}
-
-// ExceptionDetails detailed information about exception (or error) that was
-// thrown during script compilation or execution.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ExceptionDetails
-type ExceptionDetails struct {
- ExceptionID int64 `json:"exceptionId"` // Exception id.
- Text string `json:"text"` // Exception text, which should be used together with exception object when available.
- LineNumber int64 `json:"lineNumber"` // Line number of the exception location (0-based).
- ColumnNumber int64 `json:"columnNumber"` // Column number of the exception location (0-based).
- ScriptID ScriptID `json:"scriptId,omitempty"` // Script ID of the exception location.
- URL string `json:"url,omitempty"` // URL of the exception location, to be used when the script was not reported.
- StackTrace *StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace if available.
- Exception *RemoteObject `json:"exception,omitempty"` // Exception object if available.
- ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where exception happened.
- ExceptionMetaData easyjson.RawMessage `json:"exceptionMetaData,omitempty"`
-}
-
-// Error satisfies the error interface.
-func (e *ExceptionDetails) Error() string {
- var b strings.Builder
- // TODO: watch script parsed events and match the ExceptionDetails.ScriptID
- // to the name/location of the actual code and display here
- fmt.Fprintf(&b, "exception %q (%d:%d)", e.Text, e.LineNumber, e.ColumnNumber)
- if obj := e.Exception; obj != nil {
- fmt.Fprintf(&b, ": %s", obj.Description)
- }
- return b.String()
-}
-
-// Timestamp number of milliseconds since epoch.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-Timestamp
-type Timestamp time.Time
-
-// Time returns the Timestamp as time.Time value.
-func (t Timestamp) Time() time.Time {
- return time.Time(t)
-}
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Timestamp) MarshalEasyJSON(out *jwriter.Writer) {
- v := float64(time.Time(t).UnixNano() / int64(time.Millisecond))
-
- out.Buffer.EnsureSpace(20)
- out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64)
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Timestamp) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Timestamp) UnmarshalEasyJSON(in *jlexer.Lexer) {
- *t = Timestamp(time.Unix(0, int64(in.Float64()*float64(time.Millisecond))))
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Timestamp) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TimeDelta number of milliseconds.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-TimeDelta
-type TimeDelta float64
-
-// Float64 returns the TimeDelta as float64 value.
-func (t TimeDelta) Float64() float64 {
- return float64(t)
-}
-
-// CallFrame stack entry for runtime errors and assertions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-CallFrame
-type CallFrame struct {
- FunctionName string `json:"functionName"` // JavaScript function name.
- ScriptID ScriptID `json:"scriptId"` // JavaScript script id.
- URL string `json:"url"` // JavaScript script name or url.
- LineNumber int64 `json:"lineNumber"` // JavaScript script line number (0-based).
- ColumnNumber int64 `json:"columnNumber"` // JavaScript script column number (0-based).
-}
-
-// StackTrace call frames for assertions or error messages.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-StackTrace
-type StackTrace struct {
- Description string `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
- CallFrames []*CallFrame `json:"callFrames"` // JavaScript function name.
- Parent *StackTrace `json:"parent,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available.
- ParentID *StackTraceID `json:"parentId,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available.
-}
-
-// UniqueDebuggerID unique identifier of current debugger.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UniqueDebuggerId
-type UniqueDebuggerID string
-
-// String returns the UniqueDebuggerID as string value.
-func (t UniqueDebuggerID) String() string {
- return string(t)
-}
-
-// StackTraceID if debuggerId is set stack trace comes from another debugger
-// and can be resolved there. This allows to track cross-debugger calls. See
-// Runtime.StackTrace and Debugger.paused for usages.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-StackTraceId
-type StackTraceID struct {
- ID string `json:"id"`
- DebuggerID UniqueDebuggerID `json:"debuggerId,omitempty"`
-}
-
-// Type object type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObject
-type Type string
-
-// String returns the Type as string value.
-func (t Type) String() string {
- return string(t)
-}
-
-// Type values.
-const (
- TypeObject Type = "object"
- TypeFunction Type = "function"
- TypeUndefined Type = "undefined"
- TypeString Type = "string"
- TypeNumber Type = "number"
- TypeBoolean Type = "boolean"
- TypeSymbol Type = "symbol"
- TypeBigint Type = "bigint"
- TypeAccessor Type = "accessor"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Type) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Type) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Type(in.String()) {
- case TypeObject:
- *t = TypeObject
- case TypeFunction:
- *t = TypeFunction
- case TypeUndefined:
- *t = TypeUndefined
- case TypeString:
- *t = TypeString
- case TypeNumber:
- *t = TypeNumber
- case TypeBoolean:
- *t = TypeBoolean
- case TypeSymbol:
- *t = TypeSymbol
- case TypeBigint:
- *t = TypeBigint
- case TypeAccessor:
- *t = TypeAccessor
-
- default:
- in.AddError(errors.New("unknown Type value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Type) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Subtype object subtype hint. Specified for object type values only. NOTE:
-// If you change anything here, make sure to also update subtype in
-// ObjectPreview and PropertyPreview below.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObject
-type Subtype string
-
-// String returns the Subtype as string value.
-func (t Subtype) String() string {
- return string(t)
-}
-
-// Subtype values.
-const (
- SubtypeArray Subtype = "array"
- SubtypeNull Subtype = "null"
- SubtypeNode Subtype = "node"
- SubtypeRegexp Subtype = "regexp"
- SubtypeDate Subtype = "date"
- SubtypeMap Subtype = "map"
- SubtypeSet Subtype = "set"
- SubtypeWeakmap Subtype = "weakmap"
- SubtypeWeakset Subtype = "weakset"
- SubtypeIterator Subtype = "iterator"
- SubtypeGenerator Subtype = "generator"
- SubtypeError Subtype = "error"
- SubtypeProxy Subtype = "proxy"
- SubtypePromise Subtype = "promise"
- SubtypeTypedarray Subtype = "typedarray"
- SubtypeArraybuffer Subtype = "arraybuffer"
- SubtypeDataview Subtype = "dataview"
- SubtypeWebassemblymemory Subtype = "webassemblymemory"
- SubtypeWasmvalue Subtype = "wasmvalue"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Subtype) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Subtype) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Subtype) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Subtype(in.String()) {
- case SubtypeArray:
- *t = SubtypeArray
- case SubtypeNull:
- *t = SubtypeNull
- case SubtypeNode:
- *t = SubtypeNode
- case SubtypeRegexp:
- *t = SubtypeRegexp
- case SubtypeDate:
- *t = SubtypeDate
- case SubtypeMap:
- *t = SubtypeMap
- case SubtypeSet:
- *t = SubtypeSet
- case SubtypeWeakmap:
- *t = SubtypeWeakmap
- case SubtypeWeakset:
- *t = SubtypeWeakset
- case SubtypeIterator:
- *t = SubtypeIterator
- case SubtypeGenerator:
- *t = SubtypeGenerator
- case SubtypeError:
- *t = SubtypeError
- case SubtypeProxy:
- *t = SubtypeProxy
- case SubtypePromise:
- *t = SubtypePromise
- case SubtypeTypedarray:
- *t = SubtypeTypedarray
- case SubtypeArraybuffer:
- *t = SubtypeArraybuffer
- case SubtypeDataview:
- *t = SubtypeDataview
- case SubtypeWebassemblymemory:
- *t = SubtypeWebassemblymemory
- case SubtypeWasmvalue:
- *t = SubtypeWasmvalue
-
- default:
- in.AddError(errors.New("unknown Subtype value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Subtype) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// APIType type of the call.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-consoleAPICalled
-type APIType string
-
-// String returns the APIType as string value.
-func (t APIType) String() string {
- return string(t)
-}
-
-// APIType values.
-const (
- APITypeLog APIType = "log"
- APITypeDebug APIType = "debug"
- APITypeInfo APIType = "info"
- APITypeError APIType = "error"
- APITypeWarning APIType = "warning"
- APITypeDir APIType = "dir"
- APITypeDirxml APIType = "dirxml"
- APITypeTable APIType = "table"
- APITypeTrace APIType = "trace"
- APITypeClear APIType = "clear"
- APITypeStartGroup APIType = "startGroup"
- APITypeStartGroupCollapsed APIType = "startGroupCollapsed"
- APITypeEndGroup APIType = "endGroup"
- APITypeAssert APIType = "assert"
- APITypeProfile APIType = "profile"
- APITypeProfileEnd APIType = "profileEnd"
- APITypeCount APIType = "count"
- APITypeTimeEnd APIType = "timeEnd"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t APIType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t APIType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *APIType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch APIType(in.String()) {
- case APITypeLog:
- *t = APITypeLog
- case APITypeDebug:
- *t = APITypeDebug
- case APITypeInfo:
- *t = APITypeInfo
- case APITypeError:
- *t = APITypeError
- case APITypeWarning:
- *t = APITypeWarning
- case APITypeDir:
- *t = APITypeDir
- case APITypeDirxml:
- *t = APITypeDirxml
- case APITypeTable:
- *t = APITypeTable
- case APITypeTrace:
- *t = APITypeTrace
- case APITypeClear:
- *t = APITypeClear
- case APITypeStartGroup:
- *t = APITypeStartGroup
- case APITypeStartGroupCollapsed:
- *t = APITypeStartGroupCollapsed
- case APITypeEndGroup:
- *t = APITypeEndGroup
- case APITypeAssert:
- *t = APITypeAssert
- case APITypeProfile:
- *t = APITypeProfile
- case APITypeProfileEnd:
- *t = APITypeProfileEnd
- case APITypeCount:
- *t = APITypeCount
- case APITypeTimeEnd:
- *t = APITypeTimeEnd
-
- default:
- in.AddError(errors.New("unknown APIType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *APIType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/security/easyjson.go b/vendor/github.com/chromedp/cdproto/security/easyjson.go
deleted file mode 100644
index 99df09f6147..00000000000
--- a/vendor/github.com/chromedp/cdproto/security/easyjson.go
+++ /dev/null
@@ -1,1025 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package security
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(in *jlexer.Lexer, out *VisibleSecurityState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "certificateSecurityState":
- if in.IsNull() {
- in.Skip()
- out.CertificateSecurityState = nil
- } else {
- if out.CertificateSecurityState == nil {
- out.CertificateSecurityState = new(CertificateSecurityState)
- }
- (*out.CertificateSecurityState).UnmarshalEasyJSON(in)
- }
- case "safetyTipInfo":
- if in.IsNull() {
- in.Skip()
- out.SafetyTipInfo = nil
- } else {
- if out.SafetyTipInfo == nil {
- out.SafetyTipInfo = new(SafetyTipInfo)
- }
- (*out.SafetyTipInfo).UnmarshalEasyJSON(in)
- }
- case "securityStateIssueIds":
- if in.IsNull() {
- in.Skip()
- out.SecurityStateIssueIds = nil
- } else {
- in.Delim('[')
- if out.SecurityStateIssueIds == nil {
- if !in.IsDelim(']') {
- out.SecurityStateIssueIds = make([]string, 0, 4)
- } else {
- out.SecurityStateIssueIds = []string{}
- }
- } else {
- out.SecurityStateIssueIds = (out.SecurityStateIssueIds)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.SecurityStateIssueIds = append(out.SecurityStateIssueIds, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(out *jwriter.Writer, in VisibleSecurityState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix[1:])
- (in.SecurityState).MarshalEasyJSON(out)
- }
- if in.CertificateSecurityState != nil {
- const prefix string = ",\"certificateSecurityState\":"
- out.RawString(prefix)
- (*in.CertificateSecurityState).MarshalEasyJSON(out)
- }
- if in.SafetyTipInfo != nil {
- const prefix string = ",\"safetyTipInfo\":"
- out.RawString(prefix)
- (*in.SafetyTipInfo).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"securityStateIssueIds\":"
- out.RawString(prefix)
- if in.SecurityStateIssueIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.SecurityStateIssueIds {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v VisibleSecurityState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v VisibleSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *VisibleSecurityState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *VisibleSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(in *jlexer.Lexer, out *StateExplanation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "title":
- out.Title = string(in.String())
- case "summary":
- out.Summary = string(in.String())
- case "description":
- out.Description = string(in.String())
- case "mixedContentType":
- (out.MixedContentType).UnmarshalEasyJSON(in)
- case "certificate":
- if in.IsNull() {
- in.Skip()
- out.Certificate = nil
- } else {
- in.Delim('[')
- if out.Certificate == nil {
- if !in.IsDelim(']') {
- out.Certificate = make([]string, 0, 4)
- } else {
- out.Certificate = []string{}
- }
- } else {
- out.Certificate = (out.Certificate)[:0]
- }
- for !in.IsDelim(']') {
- var v4 string
- v4 = string(in.String())
- out.Certificate = append(out.Certificate, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "recommendations":
- if in.IsNull() {
- in.Skip()
- out.Recommendations = nil
- } else {
- in.Delim('[')
- if out.Recommendations == nil {
- if !in.IsDelim(']') {
- out.Recommendations = make([]string, 0, 4)
- } else {
- out.Recommendations = []string{}
- }
- } else {
- out.Recommendations = (out.Recommendations)[:0]
- }
- for !in.IsDelim(']') {
- var v5 string
- v5 = string(in.String())
- out.Recommendations = append(out.Recommendations, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(out *jwriter.Writer, in StateExplanation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix[1:])
- (in.SecurityState).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- {
- const prefix string = ",\"summary\":"
- out.RawString(prefix)
- out.String(string(in.Summary))
- }
- {
- const prefix string = ",\"description\":"
- out.RawString(prefix)
- out.String(string(in.Description))
- }
- {
- const prefix string = ",\"mixedContentType\":"
- out.RawString(prefix)
- (in.MixedContentType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"certificate\":"
- out.RawString(prefix)
- if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.Certificate {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.String(string(v7))
- }
- out.RawByte(']')
- }
- }
- if len(in.Recommendations) != 0 {
- const prefix string = ",\"recommendations\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.Recommendations {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StateExplanation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StateExplanation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(in *jlexer.Lexer, out *SetIgnoreCertificateErrorsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "ignore":
- out.Ignore = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(out *jwriter.Writer, in SetIgnoreCertificateErrorsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"ignore\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Ignore))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetIgnoreCertificateErrorsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetIgnoreCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetIgnoreCertificateErrorsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetIgnoreCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(in *jlexer.Lexer, out *SafetyTipInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "safetyTipStatus":
- (out.SafetyTipStatus).UnmarshalEasyJSON(in)
- case "safeUrl":
- out.SafeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(out *jwriter.Writer, in SafetyTipInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"safetyTipStatus\":"
- out.RawString(prefix[1:])
- (in.SafetyTipStatus).MarshalEasyJSON(out)
- }
- if in.SafeURL != "" {
- const prefix string = ",\"safeUrl\":"
- out.RawString(prefix)
- out.String(string(in.SafeURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SafetyTipInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SafetyTipInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SafetyTipInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SafetyTipInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(in *jlexer.Lexer, out *EventVisibleSecurityStateChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "visibleSecurityState":
- if in.IsNull() {
- in.Skip()
- out.VisibleSecurityState = nil
- } else {
- if out.VisibleSecurityState == nil {
- out.VisibleSecurityState = new(VisibleSecurityState)
- }
- (*out.VisibleSecurityState).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(out *jwriter.Writer, in EventVisibleSecurityStateChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"visibleSecurityState\":"
- out.RawString(prefix[1:])
- if in.VisibleSecurityState == nil {
- out.RawString("null")
- } else {
- (*in.VisibleSecurityState).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventVisibleSecurityStateChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventVisibleSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventVisibleSecurityStateChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventVisibleSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(in *jlexer.Lexer, out *EventSecurityStateChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "explanations":
- if in.IsNull() {
- in.Skip()
- out.Explanations = nil
- } else {
- in.Delim('[')
- if out.Explanations == nil {
- if !in.IsDelim(']') {
- out.Explanations = make([]*StateExplanation, 0, 8)
- } else {
- out.Explanations = []*StateExplanation{}
- }
- } else {
- out.Explanations = (out.Explanations)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *StateExplanation
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(StateExplanation)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Explanations = append(out.Explanations, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "summary":
- out.Summary = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(out *jwriter.Writer, in EventSecurityStateChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix[1:])
- (in.SecurityState).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"explanations\":"
- out.RawString(prefix)
- if in.Explanations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Explanations {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.Summary != "" {
- const prefix string = ",\"summary\":"
- out.RawString(prefix)
- out.String(string(in.Summary))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventSecurityStateChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(in *jlexer.Lexer, out *CertificateSecurityState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "protocol":
- out.Protocol = string(in.String())
- case "keyExchange":
- out.KeyExchange = string(in.String())
- case "keyExchangeGroup":
- out.KeyExchangeGroup = string(in.String())
- case "cipher":
- out.Cipher = string(in.String())
- case "mac":
- out.Mac = string(in.String())
- case "certificate":
- if in.IsNull() {
- in.Skip()
- out.Certificate = nil
- } else {
- in.Delim('[')
- if out.Certificate == nil {
- if !in.IsDelim(']') {
- out.Certificate = make([]string, 0, 4)
- } else {
- out.Certificate = []string{}
- }
- } else {
- out.Certificate = (out.Certificate)[:0]
- }
- for !in.IsDelim(']') {
- var v13 string
- v13 = string(in.String())
- out.Certificate = append(out.Certificate, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "subjectName":
- out.SubjectName = string(in.String())
- case "issuer":
- out.Issuer = string(in.String())
- case "validFrom":
- if in.IsNull() {
- in.Skip()
- out.ValidFrom = nil
- } else {
- if out.ValidFrom == nil {
- out.ValidFrom = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidFrom).UnmarshalEasyJSON(in)
- }
- case "validTo":
- if in.IsNull() {
- in.Skip()
- out.ValidTo = nil
- } else {
- if out.ValidTo == nil {
- out.ValidTo = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidTo).UnmarshalEasyJSON(in)
- }
- case "certificateNetworkError":
- out.CertificateNetworkError = string(in.String())
- case "certificateHasWeakSignature":
- out.CertificateHasWeakSignature = bool(in.Bool())
- case "certificateHasSha1Signature":
- out.CertificateHasSha1signature = bool(in.Bool())
- case "modernSSL":
- out.ModernSSL = bool(in.Bool())
- case "obsoleteSslProtocol":
- out.ObsoleteSslProtocol = bool(in.Bool())
- case "obsoleteSslKeyExchange":
- out.ObsoleteSslKeyExchange = bool(in.Bool())
- case "obsoleteSslCipher":
- out.ObsoleteSslCipher = bool(in.Bool())
- case "obsoleteSslSignature":
- out.ObsoleteSslSignature = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(out *jwriter.Writer, in CertificateSecurityState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"protocol\":"
- out.RawString(prefix[1:])
- out.String(string(in.Protocol))
- }
- {
- const prefix string = ",\"keyExchange\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchange))
- }
- if in.KeyExchangeGroup != "" {
- const prefix string = ",\"keyExchangeGroup\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchangeGroup))
- }
- {
- const prefix string = ",\"cipher\":"
- out.RawString(prefix)
- out.String(string(in.Cipher))
- }
- if in.Mac != "" {
- const prefix string = ",\"mac\":"
- out.RawString(prefix)
- out.String(string(in.Mac))
- }
- {
- const prefix string = ",\"certificate\":"
- out.RawString(prefix)
- if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Certificate {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.String(string(v15))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"subjectName\":"
- out.RawString(prefix)
- out.String(string(in.SubjectName))
- }
- {
- const prefix string = ",\"issuer\":"
- out.RawString(prefix)
- out.String(string(in.Issuer))
- }
- {
- const prefix string = ",\"validFrom\":"
- out.RawString(prefix)
- if in.ValidFrom == nil {
- out.RawString("null")
- } else {
- (*in.ValidFrom).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"validTo\":"
- out.RawString(prefix)
- if in.ValidTo == nil {
- out.RawString("null")
- } else {
- (*in.ValidTo).MarshalEasyJSON(out)
- }
- }
- if in.CertificateNetworkError != "" {
- const prefix string = ",\"certificateNetworkError\":"
- out.RawString(prefix)
- out.String(string(in.CertificateNetworkError))
- }
- {
- const prefix string = ",\"certificateHasWeakSignature\":"
- out.RawString(prefix)
- out.Bool(bool(in.CertificateHasWeakSignature))
- }
- {
- const prefix string = ",\"certificateHasSha1Signature\":"
- out.RawString(prefix)
- out.Bool(bool(in.CertificateHasSha1signature))
- }
- {
- const prefix string = ",\"modernSSL\":"
- out.RawString(prefix)
- out.Bool(bool(in.ModernSSL))
- }
- {
- const prefix string = ",\"obsoleteSslProtocol\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslProtocol))
- }
- {
- const prefix string = ",\"obsoleteSslKeyExchange\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslKeyExchange))
- }
- {
- const prefix string = ",\"obsoleteSslCipher\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslCipher))
- }
- {
- const prefix string = ",\"obsoleteSslSignature\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslSignature))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CertificateSecurityState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CertificateSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CertificateSecurityState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CertificateSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/security/events.go b/vendor/github.com/chromedp/cdproto/security/events.go
deleted file mode 100644
index e320cdfca9f..00000000000
--- a/vendor/github.com/chromedp/cdproto/security/events.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package security
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventVisibleSecurityStateChanged the security state of the page changed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#event-visibleSecurityStateChanged
-type EventVisibleSecurityStateChanged struct {
- VisibleSecurityState *VisibleSecurityState `json:"visibleSecurityState"` // Security state information about the page.
-}
-
-// EventSecurityStateChanged the security state of the page changed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#event-securityStateChanged
-type EventSecurityStateChanged struct {
- SecurityState State `json:"securityState"` // Security state.
- Explanations []*StateExplanation `json:"explanations"` // List of explanations for the security state. If the overall security state is insecure or warning, at least one corresponding explanation should be included.
- Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state.
-}
diff --git a/vendor/github.com/chromedp/cdproto/security/security.go b/vendor/github.com/chromedp/cdproto/security/security.go
deleted file mode 100644
index b91fad45f54..00000000000
--- a/vendor/github.com/chromedp/cdproto/security/security.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Package security provides the Chrome DevTools Protocol
-// commands, types, and events for the Security domain.
-//
-// Security.
-//
-// Generated by the cdproto-gen command.
-package security
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DisableParams disables tracking security state changes.
-type DisableParams struct{}
-
-// Disable disables tracking security state changes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes Security.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// EnableParams enables tracking security state changes.
-type EnableParams struct{}
-
-// Enable enables tracking security state changes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes Security.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// SetIgnoreCertificateErrorsParams enable/disable whether all certificate
-// errors should be ignored.
-type SetIgnoreCertificateErrorsParams struct {
- Ignore bool `json:"ignore"` // If true, all certificate errors will be ignored.
-}
-
-// SetIgnoreCertificateErrors enable/disable whether all certificate errors
-// should be ignored.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#method-setIgnoreCertificateErrors
-//
-// parameters:
-// ignore - If true, all certificate errors will be ignored.
-func SetIgnoreCertificateErrors(ignore bool) *SetIgnoreCertificateErrorsParams {
- return &SetIgnoreCertificateErrorsParams{
- Ignore: ignore,
- }
-}
-
-// Do executes Security.setIgnoreCertificateErrors against the provided context.
-func (p *SetIgnoreCertificateErrorsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetIgnoreCertificateErrors, p, nil)
-}
-
-// Command names.
-const (
- CommandDisable = "Security.disable"
- CommandEnable = "Security.enable"
- CommandSetIgnoreCertificateErrors = "Security.setIgnoreCertificateErrors"
-)
diff --git a/vendor/github.com/chromedp/cdproto/security/types.go b/vendor/github.com/chromedp/cdproto/security/types.go
deleted file mode 100644
index bbd9134b89f..00000000000
--- a/vendor/github.com/chromedp/cdproto/security/types.go
+++ /dev/null
@@ -1,273 +0,0 @@
-package security
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// CertificateID an internal certificate ID value.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-CertificateId
-type CertificateID int64
-
-// Int64 returns the CertificateID as int64 value.
-func (t CertificateID) Int64() int64 {
- return int64(t)
-}
-
-// MixedContentType a description of mixed content (HTTP resources on HTTPS
-// pages), as defined by https://www.w3.org/TR/mixed-content/#categories.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-MixedContentType
-type MixedContentType string
-
-// String returns the MixedContentType as string value.
-func (t MixedContentType) String() string {
- return string(t)
-}
-
-// MixedContentType values.
-const (
- MixedContentTypeBlockable MixedContentType = "blockable"
- MixedContentTypeOptionallyBlockable MixedContentType = "optionally-blockable"
- MixedContentTypeNone MixedContentType = "none"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MixedContentType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MixedContentType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MixedContentType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MixedContentType(in.String()) {
- case MixedContentTypeBlockable:
- *t = MixedContentTypeBlockable
- case MixedContentTypeOptionallyBlockable:
- *t = MixedContentTypeOptionallyBlockable
- case MixedContentTypeNone:
- *t = MixedContentTypeNone
-
- default:
- in.AddError(errors.New("unknown MixedContentType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MixedContentType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// State the security level of a page or resource.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-SecurityState
-type State string
-
-// String returns the State as string value.
-func (t State) String() string {
- return string(t)
-}
-
-// State values.
-const (
- StateUnknown State = "unknown"
- StateNeutral State = "neutral"
- StateInsecure State = "insecure"
- StateSecure State = "secure"
- StateInfo State = "info"
- StateInsecureBroken State = "insecure-broken"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t State) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t State) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *State) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch State(in.String()) {
- case StateUnknown:
- *t = StateUnknown
- case StateNeutral:
- *t = StateNeutral
- case StateInsecure:
- *t = StateInsecure
- case StateSecure:
- *t = StateSecure
- case StateInfo:
- *t = StateInfo
- case StateInsecureBroken:
- *t = StateInsecureBroken
-
- default:
- in.AddError(errors.New("unknown State value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *State) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// CertificateSecurityState details about the security state of the page
-// certificate.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-CertificateSecurityState
-type CertificateSecurityState struct {
- Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC").
- KeyExchange string `json:"keyExchange"` // Key Exchange used by the connection, or the empty string if not applicable.
- KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable.
- Cipher string `json:"cipher"` // Cipher name.
- Mac string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs.
- Certificate []string `json:"certificate"` // Page certificate.
- SubjectName string `json:"subjectName"` // Certificate subject name.
- Issuer string `json:"issuer"` // Name of the issuing CA.
- ValidFrom *cdp.TimeSinceEpoch `json:"validFrom"` // Certificate valid from date.
- ValidTo *cdp.TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date
- CertificateNetworkError string `json:"certificateNetworkError,omitempty"` // The highest priority network error code, if the certificate has an error.
- CertificateHasWeakSignature bool `json:"certificateHasWeakSignature"` // True if the certificate uses a weak signature aglorithm.
- CertificateHasSha1signature bool `json:"certificateHasSha1Signature"` // True if the certificate has a SHA1 signature in the chain.
- ModernSSL bool `json:"modernSSL"` // True if modern SSL
- ObsoleteSslProtocol bool `json:"obsoleteSslProtocol"` // True if the connection is using an obsolete SSL protocol.
- ObsoleteSslKeyExchange bool `json:"obsoleteSslKeyExchange"` // True if the connection is using an obsolete SSL key exchange.
- ObsoleteSslCipher bool `json:"obsoleteSslCipher"` // True if the connection is using an obsolete SSL cipher.
- ObsoleteSslSignature bool `json:"obsoleteSslSignature"` // True if the connection is using an obsolete SSL signature.
-}
-
-// SafetyTipStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-SafetyTipStatus
-type SafetyTipStatus string
-
-// String returns the SafetyTipStatus as string value.
-func (t SafetyTipStatus) String() string {
- return string(t)
-}
-
-// SafetyTipStatus values.
-const (
- SafetyTipStatusBadReputation SafetyTipStatus = "badReputation"
- SafetyTipStatusLookalike SafetyTipStatus = "lookalike"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SafetyTipStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SafetyTipStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SafetyTipStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SafetyTipStatus(in.String()) {
- case SafetyTipStatusBadReputation:
- *t = SafetyTipStatusBadReputation
- case SafetyTipStatusLookalike:
- *t = SafetyTipStatusLookalike
-
- default:
- in.AddError(errors.New("unknown SafetyTipStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SafetyTipStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// SafetyTipInfo [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-SafetyTipInfo
-type SafetyTipInfo struct {
- SafetyTipStatus SafetyTipStatus `json:"safetyTipStatus"` // Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
- SafeURL string `json:"safeUrl,omitempty"` // The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
-}
-
-// VisibleSecurityState security state information about the page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-VisibleSecurityState
-type VisibleSecurityState struct {
- SecurityState State `json:"securityState"` // The security level of the page.
- CertificateSecurityState *CertificateSecurityState `json:"certificateSecurityState,omitempty"` // Security state details about the page certificate.
- SafetyTipInfo *SafetyTipInfo `json:"safetyTipInfo,omitempty"` // The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
- SecurityStateIssueIds []string `json:"securityStateIssueIds"` // Array of security state issues ids.
-}
-
-// StateExplanation an explanation of an factor contributing to the security
-// state.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-SecurityStateExplanation
-type StateExplanation struct {
- SecurityState State `json:"securityState"` // Security state representing the severity of the factor being explained.
- Title string `json:"title"` // Title describing the type of factor.
- Summary string `json:"summary"` // Short phrase describing the type of factor.
- Description string `json:"description"` // Full text explanation of the factor.
- MixedContentType MixedContentType `json:"mixedContentType"` // The type of mixed content described by the explanation.
- Certificate []string `json:"certificate"` // Page certificate.
- Recommendations []string `json:"recommendations,omitempty"` // Recommendations to fix any issues.
-}
-
-// CertificateErrorAction the action to take when a certificate error occurs.
-// continue will continue processing the request and cancel will cancel the
-// request.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#type-CertificateErrorAction
-type CertificateErrorAction string
-
-// String returns the CertificateErrorAction as string value.
-func (t CertificateErrorAction) String() string {
- return string(t)
-}
-
-// CertificateErrorAction values.
-const (
- CertificateErrorActionContinue CertificateErrorAction = "continue"
- CertificateErrorActionCancel CertificateErrorAction = "cancel"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t CertificateErrorAction) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t CertificateErrorAction) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *CertificateErrorAction) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch CertificateErrorAction(in.String()) {
- case CertificateErrorActionContinue:
- *t = CertificateErrorActionContinue
- case CertificateErrorActionCancel:
- *t = CertificateErrorActionCancel
-
- default:
- in.AddError(errors.New("unknown CertificateErrorAction value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *CertificateErrorAction) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/serviceworker/easyjson.go b/vendor/github.com/chromedp/cdproto/serviceworker/easyjson.go
deleted file mode 100644
index 6863c36ef2e..00000000000
--- a/vendor/github.com/chromedp/cdproto/serviceworker/easyjson.go
+++ /dev/null
@@ -1,1537 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package serviceworker
-
-import (
- json "encoding/json"
- target "github.com/chromedp/cdproto/target"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(in *jlexer.Lexer, out *Version) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "versionId":
- out.VersionID = string(in.String())
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "scriptURL":
- out.ScriptURL = string(in.String())
- case "runningStatus":
- (out.RunningStatus).UnmarshalEasyJSON(in)
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- case "scriptLastModified":
- out.ScriptLastModified = float64(in.Float64())
- case "scriptResponseTime":
- out.ScriptResponseTime = float64(in.Float64())
- case "controlledClients":
- if in.IsNull() {
- in.Skip()
- out.ControlledClients = nil
- } else {
- in.Delim('[')
- if out.ControlledClients == nil {
- if !in.IsDelim(']') {
- out.ControlledClients = make([]target.ID, 0, 4)
- } else {
- out.ControlledClients = []target.ID{}
- }
- } else {
- out.ControlledClients = (out.ControlledClients)[:0]
- }
- for !in.IsDelim(']') {
- var v1 target.ID
- v1 = target.ID(in.String())
- out.ControlledClients = append(out.ControlledClients, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "targetId":
- out.TargetID = target.ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(out *jwriter.Writer, in Version) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"versionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.VersionID))
- }
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix)
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"scriptURL\":"
- out.RawString(prefix)
- out.String(string(in.ScriptURL))
- }
- {
- const prefix string = ",\"runningStatus\":"
- out.RawString(prefix)
- (in.RunningStatus).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- (in.Status).MarshalEasyJSON(out)
- }
- if in.ScriptLastModified != 0 {
- const prefix string = ",\"scriptLastModified\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScriptLastModified))
- }
- if in.ScriptResponseTime != 0 {
- const prefix string = ",\"scriptResponseTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.ScriptResponseTime))
- }
- if len(in.ControlledClients) != 0 {
- const prefix string = ",\"controlledClients\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v2, v3 := range in.ControlledClients {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- if in.TargetID != "" {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix)
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Version) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Version) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Version) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Version) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(in *jlexer.Lexer, out *UpdateRegistrationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scopeURL":
- out.ScopeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(out *jwriter.Writer, in UpdateRegistrationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scopeURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScopeURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UpdateRegistrationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UpdateRegistrationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UpdateRegistrationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UpdateRegistrationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(in *jlexer.Lexer, out *UnregisterParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scopeURL":
- out.ScopeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(out *jwriter.Writer, in UnregisterParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scopeURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScopeURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UnregisterParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UnregisterParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UnregisterParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UnregisterParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(in *jlexer.Lexer, out *StopWorkerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "versionId":
- out.VersionID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(out *jwriter.Writer, in StopWorkerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"versionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.VersionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopWorkerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopWorkerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(in *jlexer.Lexer, out *StopAllWorkersParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(out *jwriter.Writer, in StopAllWorkersParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StopAllWorkersParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StopAllWorkersParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StopAllWorkersParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StopAllWorkersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(in *jlexer.Lexer, out *StartWorkerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scopeURL":
- out.ScopeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(out *jwriter.Writer, in StartWorkerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scopeURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScopeURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartWorkerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartWorkerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(in *jlexer.Lexer, out *SkipWaitingParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "scopeURL":
- out.ScopeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(out *jwriter.Writer, in SkipWaitingParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"scopeURL\":"
- out.RawString(prefix[1:])
- out.String(string(in.ScopeURL))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SkipWaitingParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SkipWaitingParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SkipWaitingParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SkipWaitingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(in *jlexer.Lexer, out *SetForceUpdateOnPageLoadParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "forceUpdateOnPageLoad":
- out.ForceUpdateOnPageLoad = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(out *jwriter.Writer, in SetForceUpdateOnPageLoadParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"forceUpdateOnPageLoad\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.ForceUpdateOnPageLoad))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetForceUpdateOnPageLoadParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetForceUpdateOnPageLoadParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetForceUpdateOnPageLoadParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetForceUpdateOnPageLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(in *jlexer.Lexer, out *Registration) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "scopeURL":
- out.ScopeURL = string(in.String())
- case "isDeleted":
- out.IsDeleted = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(out *jwriter.Writer, in Registration) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix[1:])
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"scopeURL\":"
- out.RawString(prefix)
- out.String(string(in.ScopeURL))
- }
- {
- const prefix string = ",\"isDeleted\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsDeleted))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Registration) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Registration) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Registration) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Registration) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(in *jlexer.Lexer, out *InspectWorkerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "versionId":
- out.VersionID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(out *jwriter.Writer, in InspectWorkerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"versionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.VersionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v InspectWorkerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v InspectWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *InspectWorkerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *InspectWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(in *jlexer.Lexer, out *EventWorkerVersionUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "versions":
- if in.IsNull() {
- in.Skip()
- out.Versions = nil
- } else {
- in.Delim('[')
- if out.Versions == nil {
- if !in.IsDelim(']') {
- out.Versions = make([]*Version, 0, 8)
- } else {
- out.Versions = []*Version{}
- }
- } else {
- out.Versions = (out.Versions)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Version
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Version)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.Versions = append(out.Versions, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(out *jwriter.Writer, in EventWorkerVersionUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"versions\":"
- out.RawString(prefix[1:])
- if in.Versions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.Versions {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWorkerVersionUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWorkerVersionUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWorkerVersionUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWorkerVersionUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(in *jlexer.Lexer, out *EventWorkerRegistrationUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "registrations":
- if in.IsNull() {
- in.Skip()
- out.Registrations = nil
- } else {
- in.Delim('[')
- if out.Registrations == nil {
- if !in.IsDelim(']') {
- out.Registrations = make([]*Registration, 0, 8)
- } else {
- out.Registrations = []*Registration{}
- }
- } else {
- out.Registrations = (out.Registrations)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *Registration
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(Registration)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Registrations = append(out.Registrations, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(out *jwriter.Writer, in EventWorkerRegistrationUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"registrations\":"
- out.RawString(prefix[1:])
- if in.Registrations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v8, v9 := range in.Registrations {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWorkerRegistrationUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWorkerRegistrationUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWorkerRegistrationUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWorkerRegistrationUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(in *jlexer.Lexer, out *EventWorkerErrorReported) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "errorMessage":
- if in.IsNull() {
- in.Skip()
- out.ErrorMessage = nil
- } else {
- if out.ErrorMessage == nil {
- out.ErrorMessage = new(ErrorMessage)
- }
- (*out.ErrorMessage).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(out *jwriter.Writer, in EventWorkerErrorReported) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"errorMessage\":"
- out.RawString(prefix[1:])
- if in.ErrorMessage == nil {
- out.RawString("null")
- } else {
- (*in.ErrorMessage).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventWorkerErrorReported) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventWorkerErrorReported) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventWorkerErrorReported) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventWorkerErrorReported) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(in *jlexer.Lexer, out *ErrorMessage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "errorMessage":
- out.ErrorMessage = string(in.String())
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "versionId":
- out.VersionID = string(in.String())
- case "sourceURL":
- out.SourceURL = string(in.String())
- case "lineNumber":
- out.LineNumber = int64(in.Int64())
- case "columnNumber":
- out.ColumnNumber = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(out *jwriter.Writer, in ErrorMessage) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"errorMessage\":"
- out.RawString(prefix[1:])
- out.String(string(in.ErrorMessage))
- }
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix)
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"versionId\":"
- out.RawString(prefix)
- out.String(string(in.VersionID))
- }
- {
- const prefix string = ",\"sourceURL\":"
- out.RawString(prefix)
- out.String(string(in.SourceURL))
- }
- {
- const prefix string = ",\"lineNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.LineNumber))
- }
- {
- const prefix string = ",\"columnNumber\":"
- out.RawString(prefix)
- out.Int64(int64(in.ColumnNumber))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ErrorMessage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ErrorMessage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ErrorMessage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ErrorMessage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(in *jlexer.Lexer, out *DispatchSyncEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "tag":
- out.Tag = string(in.String())
- case "lastChance":
- out.LastChance = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(out *jwriter.Writer, in DispatchSyncEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix)
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"tag\":"
- out.RawString(prefix)
- out.String(string(in.Tag))
- }
- {
- const prefix string = ",\"lastChance\":"
- out.RawString(prefix)
- out.Bool(bool(in.LastChance))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchSyncEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchSyncEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchSyncEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(in *jlexer.Lexer, out *DispatchPeriodicSyncEventParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "tag":
- out.Tag = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(out *jwriter.Writer, in DispatchPeriodicSyncEventParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix)
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"tag\":"
- out.RawString(prefix)
- out.String(string(in.Tag))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DispatchPeriodicSyncEventParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DispatchPeriodicSyncEventParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DispatchPeriodicSyncEventParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DispatchPeriodicSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(in *jlexer.Lexer, out *DeliverPushMessageParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "registrationId":
- out.RegistrationID = RegistrationID(in.String())
- case "data":
- out.Data = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(out *jwriter.Writer, in DeliverPushMessageParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"registrationId\":"
- out.RawString(prefix)
- out.String(string(in.RegistrationID))
- }
- {
- const prefix string = ",\"data\":"
- out.RawString(prefix)
- out.String(string(in.Data))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DeliverPushMessageParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DeliverPushMessageParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DeliverPushMessageParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DeliverPushMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/serviceworker/events.go b/vendor/github.com/chromedp/cdproto/serviceworker/events.go
deleted file mode 100644
index 0852bd0557e..00000000000
--- a/vendor/github.com/chromedp/cdproto/serviceworker/events.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package serviceworker
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventWorkerErrorReported [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerErrorReported
-type EventWorkerErrorReported struct {
- ErrorMessage *ErrorMessage `json:"errorMessage"`
-}
-
-// EventWorkerRegistrationUpdated [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerRegistrationUpdated
-type EventWorkerRegistrationUpdated struct {
- Registrations []*Registration `json:"registrations"`
-}
-
-// EventWorkerVersionUpdated [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerVersionUpdated
-type EventWorkerVersionUpdated struct {
- Versions []*Version `json:"versions"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/serviceworker/serviceworker.go b/vendor/github.com/chromedp/cdproto/serviceworker/serviceworker.go
deleted file mode 100644
index 3c01d71a53d..00000000000
--- a/vendor/github.com/chromedp/cdproto/serviceworker/serviceworker.go
+++ /dev/null
@@ -1,316 +0,0 @@
-// Package serviceworker provides the Chrome DevTools Protocol
-// commands, types, and events for the ServiceWorker domain.
-//
-// Generated by the cdproto-gen command.
-package serviceworker
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// DeliverPushMessageParams [no description].
-type DeliverPushMessageParams struct {
- Origin string `json:"origin"`
- RegistrationID RegistrationID `json:"registrationId"`
- Data string `json:"data"`
-}
-
-// DeliverPushMessage [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-deliverPushMessage
-//
-// parameters:
-// origin
-// registrationID
-// data
-func DeliverPushMessage(origin string, registrationID RegistrationID, data string) *DeliverPushMessageParams {
- return &DeliverPushMessageParams{
- Origin: origin,
- RegistrationID: registrationID,
- Data: data,
- }
-}
-
-// Do executes ServiceWorker.deliverPushMessage against the provided context.
-func (p *DeliverPushMessageParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDeliverPushMessage, p, nil)
-}
-
-// DisableParams [no description].
-type DisableParams struct{}
-
-// Disable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes ServiceWorker.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// DispatchSyncEventParams [no description].
-type DispatchSyncEventParams struct {
- Origin string `json:"origin"`
- RegistrationID RegistrationID `json:"registrationId"`
- Tag string `json:"tag"`
- LastChance bool `json:"lastChance"`
-}
-
-// DispatchSyncEvent [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-dispatchSyncEvent
-//
-// parameters:
-// origin
-// registrationID
-// tag
-// lastChance
-func DispatchSyncEvent(origin string, registrationID RegistrationID, tag string, lastChance bool) *DispatchSyncEventParams {
- return &DispatchSyncEventParams{
- Origin: origin,
- RegistrationID: registrationID,
- Tag: tag,
- LastChance: lastChance,
- }
-}
-
-// Do executes ServiceWorker.dispatchSyncEvent against the provided context.
-func (p *DispatchSyncEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchSyncEvent, p, nil)
-}
-
-// DispatchPeriodicSyncEventParams [no description].
-type DispatchPeriodicSyncEventParams struct {
- Origin string `json:"origin"`
- RegistrationID RegistrationID `json:"registrationId"`
- Tag string `json:"tag"`
-}
-
-// DispatchPeriodicSyncEvent [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-dispatchPeriodicSyncEvent
-//
-// parameters:
-// origin
-// registrationID
-// tag
-func DispatchPeriodicSyncEvent(origin string, registrationID RegistrationID, tag string) *DispatchPeriodicSyncEventParams {
- return &DispatchPeriodicSyncEventParams{
- Origin: origin,
- RegistrationID: registrationID,
- Tag: tag,
- }
-}
-
-// Do executes ServiceWorker.dispatchPeriodicSyncEvent against the provided context.
-func (p *DispatchPeriodicSyncEventParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDispatchPeriodicSyncEvent, p, nil)
-}
-
-// EnableParams [no description].
-type EnableParams struct{}
-
-// Enable [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes ServiceWorker.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// InspectWorkerParams [no description].
-type InspectWorkerParams struct {
- VersionID string `json:"versionId"`
-}
-
-// InspectWorker [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-inspectWorker
-//
-// parameters:
-// versionID
-func InspectWorker(versionID string) *InspectWorkerParams {
- return &InspectWorkerParams{
- VersionID: versionID,
- }
-}
-
-// Do executes ServiceWorker.inspectWorker against the provided context.
-func (p *InspectWorkerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandInspectWorker, p, nil)
-}
-
-// SetForceUpdateOnPageLoadParams [no description].
-type SetForceUpdateOnPageLoadParams struct {
- ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"`
-}
-
-// SetForceUpdateOnPageLoad [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-setForceUpdateOnPageLoad
-//
-// parameters:
-// forceUpdateOnPageLoad
-func SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) *SetForceUpdateOnPageLoadParams {
- return &SetForceUpdateOnPageLoadParams{
- ForceUpdateOnPageLoad: forceUpdateOnPageLoad,
- }
-}
-
-// Do executes ServiceWorker.setForceUpdateOnPageLoad against the provided context.
-func (p *SetForceUpdateOnPageLoadParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetForceUpdateOnPageLoad, p, nil)
-}
-
-// SkipWaitingParams [no description].
-type SkipWaitingParams struct {
- ScopeURL string `json:"scopeURL"`
-}
-
-// SkipWaiting [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-skipWaiting
-//
-// parameters:
-// scopeURL
-func SkipWaiting(scopeURL string) *SkipWaitingParams {
- return &SkipWaitingParams{
- ScopeURL: scopeURL,
- }
-}
-
-// Do executes ServiceWorker.skipWaiting against the provided context.
-func (p *SkipWaitingParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSkipWaiting, p, nil)
-}
-
-// StartWorkerParams [no description].
-type StartWorkerParams struct {
- ScopeURL string `json:"scopeURL"`
-}
-
-// StartWorker [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-startWorker
-//
-// parameters:
-// scopeURL
-func StartWorker(scopeURL string) *StartWorkerParams {
- return &StartWorkerParams{
- ScopeURL: scopeURL,
- }
-}
-
-// Do executes ServiceWorker.startWorker against the provided context.
-func (p *StartWorkerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStartWorker, p, nil)
-}
-
-// StopAllWorkersParams [no description].
-type StopAllWorkersParams struct{}
-
-// StopAllWorkers [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopAllWorkers
-func StopAllWorkers() *StopAllWorkersParams {
- return &StopAllWorkersParams{}
-}
-
-// Do executes ServiceWorker.stopAllWorkers against the provided context.
-func (p *StopAllWorkersParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopAllWorkers, nil, nil)
-}
-
-// StopWorkerParams [no description].
-type StopWorkerParams struct {
- VersionID string `json:"versionId"`
-}
-
-// StopWorker [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopWorker
-//
-// parameters:
-// versionID
-func StopWorker(versionID string) *StopWorkerParams {
- return &StopWorkerParams{
- VersionID: versionID,
- }
-}
-
-// Do executes ServiceWorker.stopWorker against the provided context.
-func (p *StopWorkerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStopWorker, p, nil)
-}
-
-// UnregisterParams [no description].
-type UnregisterParams struct {
- ScopeURL string `json:"scopeURL"`
-}
-
-// Unregister [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-unregister
-//
-// parameters:
-// scopeURL
-func Unregister(scopeURL string) *UnregisterParams {
- return &UnregisterParams{
- ScopeURL: scopeURL,
- }
-}
-
-// Do executes ServiceWorker.unregister against the provided context.
-func (p *UnregisterParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUnregister, p, nil)
-}
-
-// UpdateRegistrationParams [no description].
-type UpdateRegistrationParams struct {
- ScopeURL string `json:"scopeURL"`
-}
-
-// UpdateRegistration [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-updateRegistration
-//
-// parameters:
-// scopeURL
-func UpdateRegistration(scopeURL string) *UpdateRegistrationParams {
- return &UpdateRegistrationParams{
- ScopeURL: scopeURL,
- }
-}
-
-// Do executes ServiceWorker.updateRegistration against the provided context.
-func (p *UpdateRegistrationParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUpdateRegistration, p, nil)
-}
-
-// Command names.
-const (
- CommandDeliverPushMessage = "ServiceWorker.deliverPushMessage"
- CommandDisable = "ServiceWorker.disable"
- CommandDispatchSyncEvent = "ServiceWorker.dispatchSyncEvent"
- CommandDispatchPeriodicSyncEvent = "ServiceWorker.dispatchPeriodicSyncEvent"
- CommandEnable = "ServiceWorker.enable"
- CommandInspectWorker = "ServiceWorker.inspectWorker"
- CommandSetForceUpdateOnPageLoad = "ServiceWorker.setForceUpdateOnPageLoad"
- CommandSkipWaiting = "ServiceWorker.skipWaiting"
- CommandStartWorker = "ServiceWorker.startWorker"
- CommandStopAllWorkers = "ServiceWorker.stopAllWorkers"
- CommandStopWorker = "ServiceWorker.stopWorker"
- CommandUnregister = "ServiceWorker.unregister"
- CommandUpdateRegistration = "ServiceWorker.updateRegistration"
-)
diff --git a/vendor/github.com/chromedp/cdproto/serviceworker/types.go b/vendor/github.com/chromedp/cdproto/serviceworker/types.go
deleted file mode 100644
index cf7a94832d7..00000000000
--- a/vendor/github.com/chromedp/cdproto/serviceworker/types.go
+++ /dev/null
@@ -1,164 +0,0 @@
-package serviceworker
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/target"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// RegistrationID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-RegistrationID
-type RegistrationID string
-
-// String returns the RegistrationID as string value.
-func (t RegistrationID) String() string {
- return string(t)
-}
-
-// Registration serviceWorker registration.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerRegistration
-type Registration struct {
- RegistrationID RegistrationID `json:"registrationId"`
- ScopeURL string `json:"scopeURL"`
- IsDeleted bool `json:"isDeleted"`
-}
-
-// VersionRunningStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionRunningStatus
-type VersionRunningStatus string
-
-// String returns the VersionRunningStatus as string value.
-func (t VersionRunningStatus) String() string {
- return string(t)
-}
-
-// VersionRunningStatus values.
-const (
- VersionRunningStatusStopped VersionRunningStatus = "stopped"
- VersionRunningStatusStarting VersionRunningStatus = "starting"
- VersionRunningStatusRunning VersionRunningStatus = "running"
- VersionRunningStatusStopping VersionRunningStatus = "stopping"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t VersionRunningStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t VersionRunningStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *VersionRunningStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch VersionRunningStatus(in.String()) {
- case VersionRunningStatusStopped:
- *t = VersionRunningStatusStopped
- case VersionRunningStatusStarting:
- *t = VersionRunningStatusStarting
- case VersionRunningStatusRunning:
- *t = VersionRunningStatusRunning
- case VersionRunningStatusStopping:
- *t = VersionRunningStatusStopping
-
- default:
- in.AddError(errors.New("unknown VersionRunningStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *VersionRunningStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// VersionStatus [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus
-type VersionStatus string
-
-// String returns the VersionStatus as string value.
-func (t VersionStatus) String() string {
- return string(t)
-}
-
-// VersionStatus values.
-const (
- VersionStatusNew VersionStatus = "new"
- VersionStatusInstalling VersionStatus = "installing"
- VersionStatusInstalled VersionStatus = "installed"
- VersionStatusActivating VersionStatus = "activating"
- VersionStatusActivated VersionStatus = "activated"
- VersionStatusRedundant VersionStatus = "redundant"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t VersionStatus) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t VersionStatus) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *VersionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch VersionStatus(in.String()) {
- case VersionStatusNew:
- *t = VersionStatusNew
- case VersionStatusInstalling:
- *t = VersionStatusInstalling
- case VersionStatusInstalled:
- *t = VersionStatusInstalled
- case VersionStatusActivating:
- *t = VersionStatusActivating
- case VersionStatusActivated:
- *t = VersionStatusActivated
- case VersionStatusRedundant:
- *t = VersionStatusRedundant
-
- default:
- in.AddError(errors.New("unknown VersionStatus value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *VersionStatus) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Version serviceWorker version.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersion
-type Version struct {
- VersionID string `json:"versionId"`
- RegistrationID RegistrationID `json:"registrationId"`
- ScriptURL string `json:"scriptURL"`
- RunningStatus VersionRunningStatus `json:"runningStatus"`
- Status VersionStatus `json:"status"`
- ScriptLastModified float64 `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script.
- ScriptResponseTime float64 `json:"scriptResponseTime,omitempty"` // The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.
- ControlledClients []target.ID `json:"controlledClients,omitempty"`
- TargetID target.ID `json:"targetId,omitempty"`
-}
-
-// ErrorMessage serviceWorker error message.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerErrorMessage
-type ErrorMessage struct {
- ErrorMessage string `json:"errorMessage"`
- RegistrationID RegistrationID `json:"registrationId"`
- VersionID string `json:"versionId"`
- SourceURL string `json:"sourceURL"`
- LineNumber int64 `json:"lineNumber"`
- ColumnNumber int64 `json:"columnNumber"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/storage/easyjson.go b/vendor/github.com/chromedp/cdproto/storage/easyjson.go
deleted file mode 100644
index cd48f5b4e78..00000000000
--- a/vendor/github.com/chromedp/cdproto/storage/easyjson.go
+++ /dev/null
@@ -1,1734 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package storage
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- network "github.com/chromedp/cdproto/network"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage(in *jlexer.Lexer, out *UsageForType) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "storageType":
- (out.StorageType).UnmarshalEasyJSON(in)
- case "usage":
- out.Usage = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage(out *jwriter.Writer, in UsageForType) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"storageType\":"
- out.RawString(prefix[1:])
- (in.StorageType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"usage\":"
- out.RawString(prefix)
- out.Float64(float64(in.Usage))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UsageForType) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UsageForType) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UsageForType) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UsageForType) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage1(in *jlexer.Lexer, out *UntrackIndexedDBForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage1(out *jwriter.Writer, in UntrackIndexedDBForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UntrackIndexedDBForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UntrackIndexedDBForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UntrackIndexedDBForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UntrackIndexedDBForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage2(in *jlexer.Lexer, out *UntrackCacheStorageForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage2(out *jwriter.Writer, in UntrackCacheStorageForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UntrackCacheStorageForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UntrackCacheStorageForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UntrackCacheStorageForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UntrackCacheStorageForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage3(in *jlexer.Lexer, out *TrustTokens) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "issuerOrigin":
- out.IssuerOrigin = string(in.String())
- case "count":
- out.Count = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage3(out *jwriter.Writer, in TrustTokens) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"issuerOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.IssuerOrigin))
- }
- {
- const prefix string = ",\"count\":"
- out.RawString(prefix)
- out.Float64(float64(in.Count))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrustTokens) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrustTokens) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrustTokens) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrustTokens) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage4(in *jlexer.Lexer, out *TrackIndexedDBForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage4(out *jwriter.Writer, in TrackIndexedDBForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrackIndexedDBForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrackIndexedDBForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrackIndexedDBForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrackIndexedDBForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage5(in *jlexer.Lexer, out *TrackCacheStorageForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage5(out *jwriter.Writer, in TrackCacheStorageForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TrackCacheStorageForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TrackCacheStorageForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TrackCacheStorageForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TrackCacheStorageForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage6(in *jlexer.Lexer, out *SetCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookies":
- if in.IsNull() {
- in.Skip()
- out.Cookies = nil
- } else {
- in.Delim('[')
- if out.Cookies == nil {
- if !in.IsDelim(']') {
- out.Cookies = make([]*network.CookieParam, 0, 8)
- } else {
- out.Cookies = []*network.CookieParam{}
- }
- } else {
- out.Cookies = (out.Cookies)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *network.CookieParam
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(network.CookieParam)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Cookies = append(out.Cookies, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage6(out *jwriter.Writer, in SetCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"cookies\":"
- out.RawString(prefix[1:])
- if in.Cookies == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Cookies {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage7(in *jlexer.Lexer, out *OverrideQuotaForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "quotaSize":
- out.QuotaSize = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage7(out *jwriter.Writer, in OverrideQuotaForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- if in.QuotaSize != 0 {
- const prefix string = ",\"quotaSize\":"
- out.RawString(prefix)
- out.Float64(float64(in.QuotaSize))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v OverrideQuotaForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v OverrideQuotaForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *OverrideQuotaForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *OverrideQuotaForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage8(in *jlexer.Lexer, out *GetUsageAndQuotaReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "usage":
- out.Usage = float64(in.Float64())
- case "quota":
- out.Quota = float64(in.Float64())
- case "overrideActive":
- out.OverrideActive = bool(in.Bool())
- case "usageBreakdown":
- if in.IsNull() {
- in.Skip()
- out.UsageBreakdown = nil
- } else {
- in.Delim('[')
- if out.UsageBreakdown == nil {
- if !in.IsDelim(']') {
- out.UsageBreakdown = make([]*UsageForType, 0, 8)
- } else {
- out.UsageBreakdown = []*UsageForType{}
- }
- } else {
- out.UsageBreakdown = (out.UsageBreakdown)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *UsageForType
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(UsageForType)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.UsageBreakdown = append(out.UsageBreakdown, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage8(out *jwriter.Writer, in GetUsageAndQuotaReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Usage != 0 {
- const prefix string = ",\"usage\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.Usage))
- }
- if in.Quota != 0 {
- const prefix string = ",\"quota\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Quota))
- }
- if in.OverrideActive {
- const prefix string = ",\"overrideActive\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.OverrideActive))
- }
- if len(in.UsageBreakdown) != 0 {
- const prefix string = ",\"usageBreakdown\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v5, v6 := range in.UsageBreakdown {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetUsageAndQuotaReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetUsageAndQuotaReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetUsageAndQuotaReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetUsageAndQuotaReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage9(in *jlexer.Lexer, out *GetUsageAndQuotaParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage9(out *jwriter.Writer, in GetUsageAndQuotaParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetUsageAndQuotaParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetUsageAndQuotaParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetUsageAndQuotaParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetUsageAndQuotaParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage10(in *jlexer.Lexer, out *GetTrustTokensReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "tokens":
- if in.IsNull() {
- in.Skip()
- out.Tokens = nil
- } else {
- in.Delim('[')
- if out.Tokens == nil {
- if !in.IsDelim(']') {
- out.Tokens = make([]*TrustTokens, 0, 8)
- } else {
- out.Tokens = []*TrustTokens{}
- }
- } else {
- out.Tokens = (out.Tokens)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *TrustTokens
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(TrustTokens)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Tokens = append(out.Tokens, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage10(out *jwriter.Writer, in GetTrustTokensReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Tokens) != 0 {
- const prefix string = ",\"tokens\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.Tokens {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTrustTokensReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTrustTokensReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTrustTokensReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTrustTokensReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage11(in *jlexer.Lexer, out *GetTrustTokensParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage11(out *jwriter.Writer, in GetTrustTokensParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTrustTokensParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTrustTokensParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTrustTokensParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTrustTokensParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage12(in *jlexer.Lexer, out *GetCookiesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "cookies":
- if in.IsNull() {
- in.Skip()
- out.Cookies = nil
- } else {
- in.Delim('[')
- if out.Cookies == nil {
- if !in.IsDelim(']') {
- out.Cookies = make([]*network.Cookie, 0, 8)
- } else {
- out.Cookies = []*network.Cookie{}
- }
- } else {
- out.Cookies = (out.Cookies)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *network.Cookie
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(network.Cookie)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.Cookies = append(out.Cookies, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage12(out *jwriter.Writer, in GetCookiesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Cookies) != 0 {
- const prefix string = ",\"cookies\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v11, v12 := range in.Cookies {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCookiesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCookiesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage13(in *jlexer.Lexer, out *GetCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage13(out *jwriter.Writer, in GetCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage14(in *jlexer.Lexer, out *EventIndexedDBListUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage14(out *jwriter.Writer, in EventIndexedDBListUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventIndexedDBListUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventIndexedDBListUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventIndexedDBListUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventIndexedDBListUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage15(in *jlexer.Lexer, out *EventIndexedDBContentUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "databaseName":
- out.DatabaseName = string(in.String())
- case "objectStoreName":
- out.ObjectStoreName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage15(out *jwriter.Writer, in EventIndexedDBContentUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"databaseName\":"
- out.RawString(prefix)
- out.String(string(in.DatabaseName))
- }
- {
- const prefix string = ",\"objectStoreName\":"
- out.RawString(prefix)
- out.String(string(in.ObjectStoreName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventIndexedDBContentUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventIndexedDBContentUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventIndexedDBContentUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventIndexedDBContentUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage16(in *jlexer.Lexer, out *EventCacheStorageListUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage16(out *jwriter.Writer, in EventCacheStorageListUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventCacheStorageListUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventCacheStorageListUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventCacheStorageListUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventCacheStorageListUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage17(in *jlexer.Lexer, out *EventCacheStorageContentUpdated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "cacheName":
- out.CacheName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage17(out *jwriter.Writer, in EventCacheStorageContentUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"cacheName\":"
- out.RawString(prefix)
- out.String(string(in.CacheName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventCacheStorageContentUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventCacheStorageContentUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventCacheStorageContentUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventCacheStorageContentUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage18(in *jlexer.Lexer, out *ClearTrustTokensReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "didDeleteTokens":
- out.DidDeleteTokens = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage18(out *jwriter.Writer, in ClearTrustTokensReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DidDeleteTokens {
- const prefix string = ",\"didDeleteTokens\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.DidDeleteTokens))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearTrustTokensReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearTrustTokensReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearTrustTokensReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearTrustTokensReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage19(in *jlexer.Lexer, out *ClearTrustTokensParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "issuerOrigin":
- out.IssuerOrigin = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage19(out *jwriter.Writer, in ClearTrustTokensParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"issuerOrigin\":"
- out.RawString(prefix[1:])
- out.String(string(in.IssuerOrigin))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearTrustTokensParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearTrustTokensParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearTrustTokensParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearTrustTokensParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage20(in *jlexer.Lexer, out *ClearDataForOriginParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "origin":
- out.Origin = string(in.String())
- case "storageTypes":
- out.StorageTypes = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage20(out *jwriter.Writer, in ClearDataForOriginParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"origin\":"
- out.RawString(prefix[1:])
- out.String(string(in.Origin))
- }
- {
- const prefix string = ",\"storageTypes\":"
- out.RawString(prefix)
- out.String(string(in.StorageTypes))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearDataForOriginParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearDataForOriginParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearDataForOriginParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearDataForOriginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage21(in *jlexer.Lexer, out *ClearCookiesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage21(out *jwriter.Writer, in ClearCookiesParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearCookiesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearCookiesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoStorage21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearCookiesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoStorage21(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/storage/events.go b/vendor/github.com/chromedp/cdproto/storage/events.go
deleted file mode 100644
index b44225edf6b..00000000000
--- a/vendor/github.com/chromedp/cdproto/storage/events.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package storage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventCacheStorageContentUpdated a cache's contents have been modified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#event-cacheStorageContentUpdated
-type EventCacheStorageContentUpdated struct {
- Origin string `json:"origin"` // Origin to update.
- CacheName string `json:"cacheName"` // Name of cache in origin.
-}
-
-// EventCacheStorageListUpdated a cache has been added/deleted.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#event-cacheStorageListUpdated
-type EventCacheStorageListUpdated struct {
- Origin string `json:"origin"` // Origin to update.
-}
-
-// EventIndexedDBContentUpdated the origin's IndexedDB object store has been
-// modified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#event-indexedDBContentUpdated
-type EventIndexedDBContentUpdated struct {
- Origin string `json:"origin"` // Origin to update.
- DatabaseName string `json:"databaseName"` // Database to update.
- ObjectStoreName string `json:"objectStoreName"` // ObjectStore to update.
-}
-
-// EventIndexedDBListUpdated the origin's IndexedDB database list has been
-// modified.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#event-indexedDBListUpdated
-type EventIndexedDBListUpdated struct {
- Origin string `json:"origin"` // Origin to update.
-}
diff --git a/vendor/github.com/chromedp/cdproto/storage/storage.go b/vendor/github.com/chromedp/cdproto/storage/storage.go
deleted file mode 100644
index 6ddea022b7f..00000000000
--- a/vendor/github.com/chromedp/cdproto/storage/storage.go
+++ /dev/null
@@ -1,399 +0,0 @@
-// Package storage provides the Chrome DevTools Protocol
-// commands, types, and events for the Storage domain.
-//
-// Generated by the cdproto-gen command.
-package storage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/network"
-)
-
-// ClearDataForOriginParams clears storage for origin.
-type ClearDataForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
- StorageTypes string `json:"storageTypes"` // Comma separated list of StorageType to clear.
-}
-
-// ClearDataForOrigin clears storage for origin.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearDataForOrigin
-//
-// parameters:
-// origin - Security origin.
-// storageTypes - Comma separated list of StorageType to clear.
-func ClearDataForOrigin(origin string, storageTypes string) *ClearDataForOriginParams {
- return &ClearDataForOriginParams{
- Origin: origin,
- StorageTypes: storageTypes,
- }
-}
-
-// Do executes Storage.clearDataForOrigin against the provided context.
-func (p *ClearDataForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearDataForOrigin, p, nil)
-}
-
-// GetCookiesParams returns all browser cookies.
-type GetCookiesParams struct {
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // Browser context to use when called on the browser endpoint.
-}
-
-// GetCookies returns all browser cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getCookies
-//
-// parameters:
-func GetCookies() *GetCookiesParams {
- return &GetCookiesParams{}
-}
-
-// WithBrowserContextID browser context to use when called on the browser
-// endpoint.
-func (p GetCookiesParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *GetCookiesParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// GetCookiesReturns return values.
-type GetCookiesReturns struct {
- Cookies []*network.Cookie `json:"cookies,omitempty"` // Array of cookie objects.
-}
-
-// Do executes Storage.getCookies against the provided context.
-//
-// returns:
-// cookies - Array of cookie objects.
-func (p *GetCookiesParams) Do(ctx context.Context) (cookies []*network.Cookie, err error) {
- // execute
- var res GetCookiesReturns
- err = cdp.Execute(ctx, CommandGetCookies, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Cookies, nil
-}
-
-// SetCookiesParams sets given cookies.
-type SetCookiesParams struct {
- Cookies []*network.CookieParam `json:"cookies"` // Cookies to be set.
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // Browser context to use when called on the browser endpoint.
-}
-
-// SetCookies sets given cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-setCookies
-//
-// parameters:
-// cookies - Cookies to be set.
-func SetCookies(cookies []*network.CookieParam) *SetCookiesParams {
- return &SetCookiesParams{
- Cookies: cookies,
- }
-}
-
-// WithBrowserContextID browser context to use when called on the browser
-// endpoint.
-func (p SetCookiesParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *SetCookiesParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Storage.setCookies against the provided context.
-func (p *SetCookiesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetCookies, p, nil)
-}
-
-// ClearCookiesParams clears cookies.
-type ClearCookiesParams struct {
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // Browser context to use when called on the browser endpoint.
-}
-
-// ClearCookies clears cookies.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearCookies
-//
-// parameters:
-func ClearCookies() *ClearCookiesParams {
- return &ClearCookiesParams{}
-}
-
-// WithBrowserContextID browser context to use when called on the browser
-// endpoint.
-func (p ClearCookiesParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *ClearCookiesParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// Do executes Storage.clearCookies against the provided context.
-func (p *ClearCookiesParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearCookies, p, nil)
-}
-
-// GetUsageAndQuotaParams returns usage and quota in bytes.
-type GetUsageAndQuotaParams struct {
- Origin string `json:"origin"` // Security origin.
-}
-
-// GetUsageAndQuota returns usage and quota in bytes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getUsageAndQuota
-//
-// parameters:
-// origin - Security origin.
-func GetUsageAndQuota(origin string) *GetUsageAndQuotaParams {
- return &GetUsageAndQuotaParams{
- Origin: origin,
- }
-}
-
-// GetUsageAndQuotaReturns return values.
-type GetUsageAndQuotaReturns struct {
- Usage float64 `json:"usage,omitempty"` // Storage usage (bytes).
- Quota float64 `json:"quota,omitempty"` // Storage quota (bytes).
- OverrideActive bool `json:"overrideActive,omitempty"` // Whether or not the origin has an active storage quota override
- UsageBreakdown []*UsageForType `json:"usageBreakdown,omitempty"` // Storage usage per type (bytes).
-}
-
-// Do executes Storage.getUsageAndQuota against the provided context.
-//
-// returns:
-// usage - Storage usage (bytes).
-// quota - Storage quota (bytes).
-// overrideActive - Whether or not the origin has an active storage quota override
-// usageBreakdown - Storage usage per type (bytes).
-func (p *GetUsageAndQuotaParams) Do(ctx context.Context) (usage float64, quota float64, overrideActive bool, usageBreakdown []*UsageForType, err error) {
- // execute
- var res GetUsageAndQuotaReturns
- err = cdp.Execute(ctx, CommandGetUsageAndQuota, p, &res)
- if err != nil {
- return 0, 0, false, nil, err
- }
-
- return res.Usage, res.Quota, res.OverrideActive, res.UsageBreakdown, nil
-}
-
-// OverrideQuotaForOriginParams override quota for the specified origin.
-type OverrideQuotaForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
- QuotaSize float64 `json:"quotaSize,omitempty"` // The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
-}
-
-// OverrideQuotaForOrigin override quota for the specified origin.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-overrideQuotaForOrigin
-//
-// parameters:
-// origin - Security origin.
-func OverrideQuotaForOrigin(origin string) *OverrideQuotaForOriginParams {
- return &OverrideQuotaForOriginParams{
- Origin: origin,
- }
-}
-
-// WithQuotaSize the quota size (in bytes) to override the original quota
-// with. If this is called multiple times, the overridden quota will be equal to
-// the quotaSize provided in the final call. If this is called without
-// specifying a quotaSize, the quota will be reset to the default value for the
-// specified origin. If this is called multiple times with different origins,
-// the override will be maintained for each origin until it is disabled (called
-// without a quotaSize).
-func (p OverrideQuotaForOriginParams) WithQuotaSize(quotaSize float64) *OverrideQuotaForOriginParams {
- p.QuotaSize = quotaSize
- return &p
-}
-
-// Do executes Storage.overrideQuotaForOrigin against the provided context.
-func (p *OverrideQuotaForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandOverrideQuotaForOrigin, p, nil)
-}
-
-// TrackCacheStorageForOriginParams registers origin to be notified when an
-// update occurs to its cache storage list.
-type TrackCacheStorageForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
-}
-
-// TrackCacheStorageForOrigin registers origin to be notified when an update
-// occurs to its cache storage list.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-trackCacheStorageForOrigin
-//
-// parameters:
-// origin - Security origin.
-func TrackCacheStorageForOrigin(origin string) *TrackCacheStorageForOriginParams {
- return &TrackCacheStorageForOriginParams{
- Origin: origin,
- }
-}
-
-// Do executes Storage.trackCacheStorageForOrigin against the provided context.
-func (p *TrackCacheStorageForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandTrackCacheStorageForOrigin, p, nil)
-}
-
-// TrackIndexedDBForOriginParams registers origin to be notified when an
-// update occurs to its IndexedDB.
-type TrackIndexedDBForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
-}
-
-// TrackIndexedDBForOrigin registers origin to be notified when an update
-// occurs to its IndexedDB.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-trackIndexedDBForOrigin
-//
-// parameters:
-// origin - Security origin.
-func TrackIndexedDBForOrigin(origin string) *TrackIndexedDBForOriginParams {
- return &TrackIndexedDBForOriginParams{
- Origin: origin,
- }
-}
-
-// Do executes Storage.trackIndexedDBForOrigin against the provided context.
-func (p *TrackIndexedDBForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandTrackIndexedDBForOrigin, p, nil)
-}
-
-// UntrackCacheStorageForOriginParams unregisters origin from receiving
-// notifications for cache storage.
-type UntrackCacheStorageForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
-}
-
-// UntrackCacheStorageForOrigin unregisters origin from receiving
-// notifications for cache storage.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-untrackCacheStorageForOrigin
-//
-// parameters:
-// origin - Security origin.
-func UntrackCacheStorageForOrigin(origin string) *UntrackCacheStorageForOriginParams {
- return &UntrackCacheStorageForOriginParams{
- Origin: origin,
- }
-}
-
-// Do executes Storage.untrackCacheStorageForOrigin against the provided context.
-func (p *UntrackCacheStorageForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUntrackCacheStorageForOrigin, p, nil)
-}
-
-// UntrackIndexedDBForOriginParams unregisters origin from receiving
-// notifications for IndexedDB.
-type UntrackIndexedDBForOriginParams struct {
- Origin string `json:"origin"` // Security origin.
-}
-
-// UntrackIndexedDBForOrigin unregisters origin from receiving notifications
-// for IndexedDB.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-untrackIndexedDBForOrigin
-//
-// parameters:
-// origin - Security origin.
-func UntrackIndexedDBForOrigin(origin string) *UntrackIndexedDBForOriginParams {
- return &UntrackIndexedDBForOriginParams{
- Origin: origin,
- }
-}
-
-// Do executes Storage.untrackIndexedDBForOrigin against the provided context.
-func (p *UntrackIndexedDBForOriginParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUntrackIndexedDBForOrigin, p, nil)
-}
-
-// GetTrustTokensParams returns the number of stored Trust Tokens per issuer
-// for the current browsing context.
-type GetTrustTokensParams struct{}
-
-// GetTrustTokens returns the number of stored Trust Tokens per issuer for
-// the current browsing context.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getTrustTokens
-func GetTrustTokens() *GetTrustTokensParams {
- return &GetTrustTokensParams{}
-}
-
-// GetTrustTokensReturns return values.
-type GetTrustTokensReturns struct {
- Tokens []*TrustTokens `json:"tokens,omitempty"`
-}
-
-// Do executes Storage.getTrustTokens against the provided context.
-//
-// returns:
-// tokens
-func (p *GetTrustTokensParams) Do(ctx context.Context) (tokens []*TrustTokens, err error) {
- // execute
- var res GetTrustTokensReturns
- err = cdp.Execute(ctx, CommandGetTrustTokens, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Tokens, nil
-}
-
-// ClearTrustTokensParams removes all Trust Tokens issued by the provided
-// issuerOrigin. Leaves other stored data, including the issuer's Redemption
-// Records, intact.
-type ClearTrustTokensParams struct {
- IssuerOrigin string `json:"issuerOrigin"`
-}
-
-// ClearTrustTokens removes all Trust Tokens issued by the provided
-// issuerOrigin. Leaves other stored data, including the issuer's Redemption
-// Records, intact.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearTrustTokens
-//
-// parameters:
-// issuerOrigin
-func ClearTrustTokens(issuerOrigin string) *ClearTrustTokensParams {
- return &ClearTrustTokensParams{
- IssuerOrigin: issuerOrigin,
- }
-}
-
-// ClearTrustTokensReturns return values.
-type ClearTrustTokensReturns struct {
- DidDeleteTokens bool `json:"didDeleteTokens,omitempty"` // True if any tokens were deleted, false otherwise.
-}
-
-// Do executes Storage.clearTrustTokens against the provided context.
-//
-// returns:
-// didDeleteTokens - True if any tokens were deleted, false otherwise.
-func (p *ClearTrustTokensParams) Do(ctx context.Context) (didDeleteTokens bool, err error) {
- // execute
- var res ClearTrustTokensReturns
- err = cdp.Execute(ctx, CommandClearTrustTokens, p, &res)
- if err != nil {
- return false, err
- }
-
- return res.DidDeleteTokens, nil
-}
-
-// Command names.
-const (
- CommandClearDataForOrigin = "Storage.clearDataForOrigin"
- CommandGetCookies = "Storage.getCookies"
- CommandSetCookies = "Storage.setCookies"
- CommandClearCookies = "Storage.clearCookies"
- CommandGetUsageAndQuota = "Storage.getUsageAndQuota"
- CommandOverrideQuotaForOrigin = "Storage.overrideQuotaForOrigin"
- CommandTrackCacheStorageForOrigin = "Storage.trackCacheStorageForOrigin"
- CommandTrackIndexedDBForOrigin = "Storage.trackIndexedDBForOrigin"
- CommandUntrackCacheStorageForOrigin = "Storage.untrackCacheStorageForOrigin"
- CommandUntrackIndexedDBForOrigin = "Storage.untrackIndexedDBForOrigin"
- CommandGetTrustTokens = "Storage.getTrustTokens"
- CommandClearTrustTokens = "Storage.clearTrustTokens"
-)
diff --git a/vendor/github.com/chromedp/cdproto/storage/types.go b/vendor/github.com/chromedp/cdproto/storage/types.go
deleted file mode 100644
index 7b7a460dc36..00000000000
--- a/vendor/github.com/chromedp/cdproto/storage/types.go
+++ /dev/null
@@ -1,99 +0,0 @@
-package storage
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// Type enum of possible storage types.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-StorageType
-type Type string
-
-// String returns the Type as string value.
-func (t Type) String() string {
- return string(t)
-}
-
-// Type values.
-const (
- TypeAppcache Type = "appcache"
- TypeCookies Type = "cookies"
- TypeFileSystems Type = "file_systems"
- TypeIndexeddb Type = "indexeddb"
- TypeLocalStorage Type = "local_storage"
- TypeShaderCache Type = "shader_cache"
- TypeWebsql Type = "websql"
- TypeServiceWorkers Type = "service_workers"
- TypeCacheStorage Type = "cache_storage"
- TypeAll Type = "all"
- TypeOther Type = "other"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Type) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Type) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Type(in.String()) {
- case TypeAppcache:
- *t = TypeAppcache
- case TypeCookies:
- *t = TypeCookies
- case TypeFileSystems:
- *t = TypeFileSystems
- case TypeIndexeddb:
- *t = TypeIndexeddb
- case TypeLocalStorage:
- *t = TypeLocalStorage
- case TypeShaderCache:
- *t = TypeShaderCache
- case TypeWebsql:
- *t = TypeWebsql
- case TypeServiceWorkers:
- *t = TypeServiceWorkers
- case TypeCacheStorage:
- *t = TypeCacheStorage
- case TypeAll:
- *t = TypeAll
- case TypeOther:
- *t = TypeOther
-
- default:
- in.AddError(errors.New("unknown Type value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Type) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// UsageForType usage for a storage type.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-UsageForType
-type UsageForType struct {
- StorageType Type `json:"storageType"` // Name of storage type.
- Usage float64 `json:"usage"` // Storage usage (bytes).
-}
-
-// TrustTokens pair of issuer origin and number of available (signed, but not
-// used) Trust Tokens from that issuer.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-TrustTokens
-type TrustTokens struct {
- IssuerOrigin string `json:"issuerOrigin"`
- Count float64 `json:"count"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/systeminfo/easyjson.go b/vendor/github.com/chromedp/cdproto/systeminfo/easyjson.go
deleted file mode 100644
index e09ed93054f..00000000000
--- a/vendor/github.com/chromedp/cdproto/systeminfo/easyjson.go
+++ /dev/null
@@ -1,1287 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package systeminfo
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(in *jlexer.Lexer, out *VideoEncodeAcceleratorCapability) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- out.Profile = string(in.String())
- case "maxResolution":
- if in.IsNull() {
- in.Skip()
- out.MaxResolution = nil
- } else {
- if out.MaxResolution == nil {
- out.MaxResolution = new(Size)
- }
- (*out.MaxResolution).UnmarshalEasyJSON(in)
- }
- case "maxFramerateNumerator":
- out.MaxFramerateNumerator = int64(in.Int64())
- case "maxFramerateDenominator":
- out.MaxFramerateDenominator = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(out *jwriter.Writer, in VideoEncodeAcceleratorCapability) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"profile\":"
- out.RawString(prefix[1:])
- out.String(string(in.Profile))
- }
- {
- const prefix string = ",\"maxResolution\":"
- out.RawString(prefix)
- if in.MaxResolution == nil {
- out.RawString("null")
- } else {
- (*in.MaxResolution).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"maxFramerateNumerator\":"
- out.RawString(prefix)
- out.Int64(int64(in.MaxFramerateNumerator))
- }
- {
- const prefix string = ",\"maxFramerateDenominator\":"
- out.RawString(prefix)
- out.Int64(int64(in.MaxFramerateDenominator))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v VideoEncodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v VideoEncodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *VideoEncodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *VideoEncodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(in *jlexer.Lexer, out *VideoDecodeAcceleratorCapability) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "profile":
- out.Profile = string(in.String())
- case "maxResolution":
- if in.IsNull() {
- in.Skip()
- out.MaxResolution = nil
- } else {
- if out.MaxResolution == nil {
- out.MaxResolution = new(Size)
- }
- (*out.MaxResolution).UnmarshalEasyJSON(in)
- }
- case "minResolution":
- if in.IsNull() {
- in.Skip()
- out.MinResolution = nil
- } else {
- if out.MinResolution == nil {
- out.MinResolution = new(Size)
- }
- (*out.MinResolution).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(out *jwriter.Writer, in VideoDecodeAcceleratorCapability) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"profile\":"
- out.RawString(prefix[1:])
- out.String(string(in.Profile))
- }
- {
- const prefix string = ",\"maxResolution\":"
- out.RawString(prefix)
- if in.MaxResolution == nil {
- out.RawString("null")
- } else {
- (*in.MaxResolution).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"minResolution\":"
- out.RawString(prefix)
- if in.MinResolution == nil {
- out.RawString("null")
- } else {
- (*in.MinResolution).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v VideoDecodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v VideoDecodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *VideoDecodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *VideoDecodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(in *jlexer.Lexer, out *Size) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(out *jwriter.Writer, in Size) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"width\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Width))
- }
- {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Int64(int64(in.Height))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Size) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Size) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Size) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Size) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(in *jlexer.Lexer, out *ProcessInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "type":
- out.Type = string(in.String())
- case "id":
- out.ID = int64(in.Int64())
- case "cpuTime":
- out.CPUTime = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(out *jwriter.Writer, in ProcessInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix[1:])
- out.String(string(in.Type))
- }
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix)
- out.Int64(int64(in.ID))
- }
- {
- const prefix string = ",\"cpuTime\":"
- out.RawString(prefix)
- out.Float64(float64(in.CPUTime))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ProcessInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ProcessInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ProcessInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ProcessInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(in *jlexer.Lexer, out *ImageDecodeAcceleratorCapability) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "imageType":
- (out.ImageType).UnmarshalEasyJSON(in)
- case "maxDimensions":
- if in.IsNull() {
- in.Skip()
- out.MaxDimensions = nil
- } else {
- if out.MaxDimensions == nil {
- out.MaxDimensions = new(Size)
- }
- (*out.MaxDimensions).UnmarshalEasyJSON(in)
- }
- case "minDimensions":
- if in.IsNull() {
- in.Skip()
- out.MinDimensions = nil
- } else {
- if out.MinDimensions == nil {
- out.MinDimensions = new(Size)
- }
- (*out.MinDimensions).UnmarshalEasyJSON(in)
- }
- case "subsamplings":
- if in.IsNull() {
- in.Skip()
- out.Subsamplings = nil
- } else {
- in.Delim('[')
- if out.Subsamplings == nil {
- if !in.IsDelim(']') {
- out.Subsamplings = make([]SubsamplingFormat, 0, 4)
- } else {
- out.Subsamplings = []SubsamplingFormat{}
- }
- } else {
- out.Subsamplings = (out.Subsamplings)[:0]
- }
- for !in.IsDelim(']') {
- var v1 SubsamplingFormat
- (v1).UnmarshalEasyJSON(in)
- out.Subsamplings = append(out.Subsamplings, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(out *jwriter.Writer, in ImageDecodeAcceleratorCapability) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"imageType\":"
- out.RawString(prefix[1:])
- (in.ImageType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"maxDimensions\":"
- out.RawString(prefix)
- if in.MaxDimensions == nil {
- out.RawString("null")
- } else {
- (*in.MaxDimensions).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"minDimensions\":"
- out.RawString(prefix)
- if in.MinDimensions == nil {
- out.RawString("null")
- } else {
- (*in.MinDimensions).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"subsamplings\":"
- out.RawString(prefix)
- if in.Subsamplings == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Subsamplings {
- if v2 > 0 {
- out.RawByte(',')
- }
- (v3).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ImageDecodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ImageDecodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ImageDecodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ImageDecodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(in *jlexer.Lexer, out *GetProcessInfoReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "processInfo":
- if in.IsNull() {
- in.Skip()
- out.ProcessInfo = nil
- } else {
- in.Delim('[')
- if out.ProcessInfo == nil {
- if !in.IsDelim(']') {
- out.ProcessInfo = make([]*ProcessInfo, 0, 8)
- } else {
- out.ProcessInfo = []*ProcessInfo{}
- }
- } else {
- out.ProcessInfo = (out.ProcessInfo)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *ProcessInfo
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(ProcessInfo)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.ProcessInfo = append(out.ProcessInfo, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(out *jwriter.Writer, in GetProcessInfoReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.ProcessInfo) != 0 {
- const prefix string = ",\"processInfo\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.ProcessInfo {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetProcessInfoReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetProcessInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetProcessInfoReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetProcessInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(in *jlexer.Lexer, out *GetProcessInfoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(out *jwriter.Writer, in GetProcessInfoParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetProcessInfoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetProcessInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetProcessInfoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetProcessInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(in *jlexer.Lexer, out *GetInfoReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "gpu":
- if in.IsNull() {
- in.Skip()
- out.Gpu = nil
- } else {
- if out.Gpu == nil {
- out.Gpu = new(GPUInfo)
- }
- (*out.Gpu).UnmarshalEasyJSON(in)
- }
- case "modelName":
- out.ModelName = string(in.String())
- case "modelVersion":
- out.ModelVersion = string(in.String())
- case "commandLine":
- out.CommandLine = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(out *jwriter.Writer, in GetInfoReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Gpu != nil {
- const prefix string = ",\"gpu\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Gpu).MarshalEasyJSON(out)
- }
- if in.ModelName != "" {
- const prefix string = ",\"modelName\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ModelName))
- }
- if in.ModelVersion != "" {
- const prefix string = ",\"modelVersion\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ModelVersion))
- }
- if in.CommandLine != "" {
- const prefix string = ",\"commandLine\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.CommandLine))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInfoReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInfoReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(in *jlexer.Lexer, out *GetInfoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(out *jwriter.Writer, in GetInfoParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetInfoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetInfoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(in *jlexer.Lexer, out *GPUInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "devices":
- if in.IsNull() {
- in.Skip()
- out.Devices = nil
- } else {
- in.Delim('[')
- if out.Devices == nil {
- if !in.IsDelim(']') {
- out.Devices = make([]*GPUDevice, 0, 8)
- } else {
- out.Devices = []*GPUDevice{}
- }
- } else {
- out.Devices = (out.Devices)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *GPUDevice
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(GPUDevice)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.Devices = append(out.Devices, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "auxAttributes":
- (out.AuxAttributes).UnmarshalEasyJSON(in)
- case "featureStatus":
- (out.FeatureStatus).UnmarshalEasyJSON(in)
- case "driverBugWorkarounds":
- if in.IsNull() {
- in.Skip()
- out.DriverBugWorkarounds = nil
- } else {
- in.Delim('[')
- if out.DriverBugWorkarounds == nil {
- if !in.IsDelim(']') {
- out.DriverBugWorkarounds = make([]string, 0, 4)
- } else {
- out.DriverBugWorkarounds = []string{}
- }
- } else {
- out.DriverBugWorkarounds = (out.DriverBugWorkarounds)[:0]
- }
- for !in.IsDelim(']') {
- var v8 string
- v8 = string(in.String())
- out.DriverBugWorkarounds = append(out.DriverBugWorkarounds, v8)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "videoDecoding":
- if in.IsNull() {
- in.Skip()
- out.VideoDecoding = nil
- } else {
- in.Delim('[')
- if out.VideoDecoding == nil {
- if !in.IsDelim(']') {
- out.VideoDecoding = make([]*VideoDecodeAcceleratorCapability, 0, 8)
- } else {
- out.VideoDecoding = []*VideoDecodeAcceleratorCapability{}
- }
- } else {
- out.VideoDecoding = (out.VideoDecoding)[:0]
- }
- for !in.IsDelim(']') {
- var v9 *VideoDecodeAcceleratorCapability
- if in.IsNull() {
- in.Skip()
- v9 = nil
- } else {
- if v9 == nil {
- v9 = new(VideoDecodeAcceleratorCapability)
- }
- (*v9).UnmarshalEasyJSON(in)
- }
- out.VideoDecoding = append(out.VideoDecoding, v9)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "videoEncoding":
- if in.IsNull() {
- in.Skip()
- out.VideoEncoding = nil
- } else {
- in.Delim('[')
- if out.VideoEncoding == nil {
- if !in.IsDelim(']') {
- out.VideoEncoding = make([]*VideoEncodeAcceleratorCapability, 0, 8)
- } else {
- out.VideoEncoding = []*VideoEncodeAcceleratorCapability{}
- }
- } else {
- out.VideoEncoding = (out.VideoEncoding)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *VideoEncodeAcceleratorCapability
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(VideoEncodeAcceleratorCapability)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.VideoEncoding = append(out.VideoEncoding, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "imageDecoding":
- if in.IsNull() {
- in.Skip()
- out.ImageDecoding = nil
- } else {
- in.Delim('[')
- if out.ImageDecoding == nil {
- if !in.IsDelim(']') {
- out.ImageDecoding = make([]*ImageDecodeAcceleratorCapability, 0, 8)
- } else {
- out.ImageDecoding = []*ImageDecodeAcceleratorCapability{}
- }
- } else {
- out.ImageDecoding = (out.ImageDecoding)[:0]
- }
- for !in.IsDelim(']') {
- var v11 *ImageDecodeAcceleratorCapability
- if in.IsNull() {
- in.Skip()
- v11 = nil
- } else {
- if v11 == nil {
- v11 = new(ImageDecodeAcceleratorCapability)
- }
- (*v11).UnmarshalEasyJSON(in)
- }
- out.ImageDecoding = append(out.ImageDecoding, v11)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(out *jwriter.Writer, in GPUInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"devices\":"
- out.RawString(prefix[1:])
- if in.Devices == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v12, v13 := range in.Devices {
- if v12 > 0 {
- out.RawByte(',')
- }
- if v13 == nil {
- out.RawString("null")
- } else {
- (*v13).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- if (in.AuxAttributes).IsDefined() {
- const prefix string = ",\"auxAttributes\":"
- out.RawString(prefix)
- (in.AuxAttributes).MarshalEasyJSON(out)
- }
- if (in.FeatureStatus).IsDefined() {
- const prefix string = ",\"featureStatus\":"
- out.RawString(prefix)
- (in.FeatureStatus).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"driverBugWorkarounds\":"
- out.RawString(prefix)
- if in.DriverBugWorkarounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.DriverBugWorkarounds {
- if v14 > 0 {
- out.RawByte(',')
- }
- out.String(string(v15))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"videoDecoding\":"
- out.RawString(prefix)
- if in.VideoDecoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v16, v17 := range in.VideoDecoding {
- if v16 > 0 {
- out.RawByte(',')
- }
- if v17 == nil {
- out.RawString("null")
- } else {
- (*v17).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"videoEncoding\":"
- out.RawString(prefix)
- if in.VideoEncoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v18, v19 := range in.VideoEncoding {
- if v18 > 0 {
- out.RawByte(',')
- }
- if v19 == nil {
- out.RawString("null")
- } else {
- (*v19).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"imageDecoding\":"
- out.RawString(prefix)
- if in.ImageDecoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v20, v21 := range in.ImageDecoding {
- if v20 > 0 {
- out.RawByte(',')
- }
- if v21 == nil {
- out.RawString("null")
- } else {
- (*v21).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GPUInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GPUInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GPUInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GPUInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(in *jlexer.Lexer, out *GPUDevice) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "vendorId":
- out.VendorID = float64(in.Float64())
- case "deviceId":
- out.DeviceID = float64(in.Float64())
- case "subSysId":
- out.SubSysID = float64(in.Float64())
- case "revision":
- out.Revision = float64(in.Float64())
- case "vendorString":
- out.VendorString = string(in.String())
- case "deviceString":
- out.DeviceString = string(in.String())
- case "driverVendor":
- out.DriverVendor = string(in.String())
- case "driverVersion":
- out.DriverVersion = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(out *jwriter.Writer, in GPUDevice) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"vendorId\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.VendorID))
- }
- {
- const prefix string = ",\"deviceId\":"
- out.RawString(prefix)
- out.Float64(float64(in.DeviceID))
- }
- if in.SubSysID != 0 {
- const prefix string = ",\"subSysId\":"
- out.RawString(prefix)
- out.Float64(float64(in.SubSysID))
- }
- if in.Revision != 0 {
- const prefix string = ",\"revision\":"
- out.RawString(prefix)
- out.Float64(float64(in.Revision))
- }
- {
- const prefix string = ",\"vendorString\":"
- out.RawString(prefix)
- out.String(string(in.VendorString))
- }
- {
- const prefix string = ",\"deviceString\":"
- out.RawString(prefix)
- out.String(string(in.DeviceString))
- }
- {
- const prefix string = ",\"driverVendor\":"
- out.RawString(prefix)
- out.String(string(in.DriverVendor))
- }
- {
- const prefix string = ",\"driverVersion\":"
- out.RawString(prefix)
- out.String(string(in.DriverVersion))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GPUDevice) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GPUDevice) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GPUDevice) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GPUDevice) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/systeminfo/systeminfo.go b/vendor/github.com/chromedp/cdproto/systeminfo/systeminfo.go
deleted file mode 100644
index ce0e7a31883..00000000000
--- a/vendor/github.com/chromedp/cdproto/systeminfo/systeminfo.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Package systeminfo provides the Chrome DevTools Protocol
-// commands, types, and events for the SystemInfo domain.
-//
-// The SystemInfo domain defines methods and events for querying low-level
-// system information.
-//
-// Generated by the cdproto-gen command.
-package systeminfo
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// GetInfoParams returns information about the system.
-type GetInfoParams struct{}
-
-// GetInfo returns information about the system.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#method-getInfo
-func GetInfo() *GetInfoParams {
- return &GetInfoParams{}
-}
-
-// GetInfoReturns return values.
-type GetInfoReturns struct {
- Gpu *GPUInfo `json:"gpu,omitempty"` // Information about the GPUs on the system.
- ModelName string `json:"modelName,omitempty"` // A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
- ModelVersion string `json:"modelVersion,omitempty"` // A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
- CommandLine string `json:"commandLine,omitempty"` // The command line string used to launch the browser. Will be the empty string if not supported.
-}
-
-// Do executes SystemInfo.getInfo against the provided context.
-//
-// returns:
-// gpu - Information about the GPUs on the system.
-// modelName - A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported.
-// modelVersion - A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported.
-// commandLine - The command line string used to launch the browser. Will be the empty string if not supported.
-func (p *GetInfoParams) Do(ctx context.Context) (gpu *GPUInfo, modelName string, modelVersion string, commandLine string, err error) {
- // execute
- var res GetInfoReturns
- err = cdp.Execute(ctx, CommandGetInfo, nil, &res)
- if err != nil {
- return nil, "", "", "", err
- }
-
- return res.Gpu, res.ModelName, res.ModelVersion, res.CommandLine, nil
-}
-
-// GetProcessInfoParams returns information about all running processes.
-type GetProcessInfoParams struct{}
-
-// GetProcessInfo returns information about all running processes.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#method-getProcessInfo
-func GetProcessInfo() *GetProcessInfoParams {
- return &GetProcessInfoParams{}
-}
-
-// GetProcessInfoReturns return values.
-type GetProcessInfoReturns struct {
- ProcessInfo []*ProcessInfo `json:"processInfo,omitempty"` // An array of process info blocks.
-}
-
-// Do executes SystemInfo.getProcessInfo against the provided context.
-//
-// returns:
-// processInfo - An array of process info blocks.
-func (p *GetProcessInfoParams) Do(ctx context.Context) (processInfo []*ProcessInfo, err error) {
- // execute
- var res GetProcessInfoReturns
- err = cdp.Execute(ctx, CommandGetProcessInfo, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.ProcessInfo, nil
-}
-
-// Command names.
-const (
- CommandGetInfo = "SystemInfo.getInfo"
- CommandGetProcessInfo = "SystemInfo.getProcessInfo"
-)
diff --git a/vendor/github.com/chromedp/cdproto/systeminfo/types.go b/vendor/github.com/chromedp/cdproto/systeminfo/types.go
deleted file mode 100644
index 7634005e536..00000000000
--- a/vendor/github.com/chromedp/cdproto/systeminfo/types.go
+++ /dev/null
@@ -1,181 +0,0 @@
-package systeminfo
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// GPUDevice describes a single graphics processor (GPU).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-GPUDevice
-type GPUDevice struct {
- VendorID float64 `json:"vendorId"` // PCI ID of the GPU vendor, if available; 0 otherwise.
- DeviceID float64 `json:"deviceId"` // PCI ID of the GPU device, if available; 0 otherwise.
- SubSysID float64 `json:"subSysId,omitempty"` // Sub sys ID of the GPU, only available on Windows.
- Revision float64 `json:"revision,omitempty"` // Revision of the GPU, only available on Windows.
- VendorString string `json:"vendorString"` // String description of the GPU vendor, if the PCI ID is not available.
- DeviceString string `json:"deviceString"` // String description of the GPU device, if the PCI ID is not available.
- DriverVendor string `json:"driverVendor"` // String description of the GPU driver vendor.
- DriverVersion string `json:"driverVersion"` // String description of the GPU driver version.
-}
-
-// Size describes the width and height dimensions of an entity.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-Size
-type Size struct {
- Width int64 `json:"width"` // Width in pixels.
- Height int64 `json:"height"` // Height in pixels.
-}
-
-// VideoDecodeAcceleratorCapability describes a supported video decoding
-// profile with its associated minimum and maximum resolutions.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-VideoDecodeAcceleratorCapability
-type VideoDecodeAcceleratorCapability struct {
- Profile string `json:"profile"` // Video codec profile that is supported, e.g. VP9 Profile 2.
- MaxResolution *Size `json:"maxResolution"` // Maximum video dimensions in pixels supported for this |profile|.
- MinResolution *Size `json:"minResolution"` // Minimum video dimensions in pixels supported for this |profile|.
-}
-
-// VideoEncodeAcceleratorCapability describes a supported video encoding
-// profile with its associated maximum resolution and maximum framerate.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-VideoEncodeAcceleratorCapability
-type VideoEncodeAcceleratorCapability struct {
- Profile string `json:"profile"` // Video codec profile that is supported, e.g H264 Main.
- MaxResolution *Size `json:"maxResolution"` // Maximum video dimensions in pixels supported for this |profile|.
- MaxFramerateNumerator int64 `json:"maxFramerateNumerator"` // Maximum encoding framerate in frames per second supported for this |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 24000/1001 fps, etc.
- MaxFramerateDenominator int64 `json:"maxFramerateDenominator"`
-}
-
-// SubsamplingFormat yUV subsampling type of the pixels of a given image.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-SubsamplingFormat
-type SubsamplingFormat string
-
-// String returns the SubsamplingFormat as string value.
-func (t SubsamplingFormat) String() string {
- return string(t)
-}
-
-// SubsamplingFormat values.
-const (
- SubsamplingFormatYuv420 SubsamplingFormat = "yuv420"
- SubsamplingFormatYuv422 SubsamplingFormat = "yuv422"
- SubsamplingFormatYuv444 SubsamplingFormat = "yuv444"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t SubsamplingFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t SubsamplingFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *SubsamplingFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch SubsamplingFormat(in.String()) {
- case SubsamplingFormatYuv420:
- *t = SubsamplingFormatYuv420
- case SubsamplingFormatYuv422:
- *t = SubsamplingFormatYuv422
- case SubsamplingFormatYuv444:
- *t = SubsamplingFormatYuv444
-
- default:
- in.AddError(errors.New("unknown SubsamplingFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *SubsamplingFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ImageType image format of a given image.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-ImageType
-type ImageType string
-
-// String returns the ImageType as string value.
-func (t ImageType) String() string {
- return string(t)
-}
-
-// ImageType values.
-const (
- ImageTypeJpeg ImageType = "jpeg"
- ImageTypeWebp ImageType = "webp"
- ImageTypeUnknown ImageType = "unknown"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ImageType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ImageType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ImageType(in.String()) {
- case ImageTypeJpeg:
- *t = ImageTypeJpeg
- case ImageTypeWebp:
- *t = ImageTypeWebp
- case ImageTypeUnknown:
- *t = ImageTypeUnknown
-
- default:
- in.AddError(errors.New("unknown ImageType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ImageType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ImageDecodeAcceleratorCapability describes a supported image decoding
-// profile with its associated minimum and maximum resolutions and subsampling.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-ImageDecodeAcceleratorCapability
-type ImageDecodeAcceleratorCapability struct {
- ImageType ImageType `json:"imageType"` // Image coded, e.g. Jpeg.
- MaxDimensions *Size `json:"maxDimensions"` // Maximum supported dimensions of the image in pixels.
- MinDimensions *Size `json:"minDimensions"` // Minimum supported dimensions of the image in pixels.
- Subsamplings []SubsamplingFormat `json:"subsamplings"` // Optional array of supported subsampling formats, e.g. 4:2:0, if known.
-}
-
-// GPUInfo provides information about the GPU(s) on the system.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-GPUInfo
-type GPUInfo struct {
- Devices []*GPUDevice `json:"devices"` // The graphics devices on the system. Element 0 is the primary GPU.
- AuxAttributes easyjson.RawMessage `json:"auxAttributes,omitempty"`
- FeatureStatus easyjson.RawMessage `json:"featureStatus,omitempty"`
- DriverBugWorkarounds []string `json:"driverBugWorkarounds"` // An optional array of GPU driver bug workarounds.
- VideoDecoding []*VideoDecodeAcceleratorCapability `json:"videoDecoding"` // Supported accelerated video decoding capabilities.
- VideoEncoding []*VideoEncodeAcceleratorCapability `json:"videoEncoding"` // Supported accelerated video encoding capabilities.
- ImageDecoding []*ImageDecodeAcceleratorCapability `json:"imageDecoding"` // Supported accelerated image decoding capabilities.
-}
-
-// ProcessInfo represents process info.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#type-ProcessInfo
-type ProcessInfo struct {
- Type string `json:"type"` // Specifies process type.
- ID int64 `json:"id"` // Specifies process id.
- CPUTime float64 `json:"cpuTime"` // Specifies cumulative CPU usage in seconds across all threads of the process since the process start.
-}
diff --git a/vendor/github.com/chromedp/cdproto/target/easyjson.go b/vendor/github.com/chromedp/cdproto/target/easyjson.go
deleted file mode 100644
index 58073a7c70c..00000000000
--- a/vendor/github.com/chromedp/cdproto/target/easyjson.go
+++ /dev/null
@@ -1,2407 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package target
-
-import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(in *jlexer.Lexer, out *SetRemoteLocationsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "locations":
- if in.IsNull() {
- in.Skip()
- out.Locations = nil
- } else {
- in.Delim('[')
- if out.Locations == nil {
- if !in.IsDelim(']') {
- out.Locations = make([]*RemoteLocation, 0, 8)
- } else {
- out.Locations = []*RemoteLocation{}
- }
- } else {
- out.Locations = (out.Locations)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *RemoteLocation
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(RemoteLocation)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Locations = append(out.Locations, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(out *jwriter.Writer, in SetRemoteLocationsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"locations\":"
- out.RawString(prefix[1:])
- if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.Locations {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetRemoteLocationsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetRemoteLocationsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetRemoteLocationsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetRemoteLocationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(in *jlexer.Lexer, out *SetDiscoverTargetsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "discover":
- out.Discover = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(out *jwriter.Writer, in SetDiscoverTargetsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"discover\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Discover))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetDiscoverTargetsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetDiscoverTargetsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetDiscoverTargetsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetDiscoverTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(in *jlexer.Lexer, out *SetAutoAttachParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "autoAttach":
- out.AutoAttach = bool(in.Bool())
- case "waitForDebuggerOnStart":
- out.WaitForDebuggerOnStart = bool(in.Bool())
- case "flatten":
- out.Flatten = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(out *jwriter.Writer, in SetAutoAttachParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"autoAttach\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.AutoAttach))
- }
- {
- const prefix string = ",\"waitForDebuggerOnStart\":"
- out.RawString(prefix)
- out.Bool(bool(in.WaitForDebuggerOnStart))
- }
- if in.Flatten {
- const prefix string = ",\"flatten\":"
- out.RawString(prefix)
- out.Bool(bool(in.Flatten))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAutoAttachParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAutoAttachParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAutoAttachParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAutoAttachParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(in *jlexer.Lexer, out *RemoteLocation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "host":
- out.Host = string(in.String())
- case "port":
- out.Port = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(out *jwriter.Writer, in RemoteLocation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"host\":"
- out.RawString(prefix[1:])
- out.String(string(in.Host))
- }
- {
- const prefix string = ",\"port\":"
- out.RawString(prefix)
- out.Int64(int64(in.Port))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoteLocation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoteLocation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoteLocation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoteLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(in *jlexer.Lexer, out *Info) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- case "type":
- out.Type = string(in.String())
- case "title":
- out.Title = string(in.String())
- case "url":
- out.URL = string(in.String())
- case "attached":
- out.Attached = bool(in.Bool())
- case "openerId":
- out.OpenerID = ID(in.String())
- case "canAccessOpener":
- out.CanAccessOpener = bool(in.Bool())
- case "openerFrameId":
- (out.OpenerFrameID).UnmarshalEasyJSON(in)
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(out *jwriter.Writer, in Info) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- {
- const prefix string = ",\"type\":"
- out.RawString(prefix)
- out.String(string(in.Type))
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- {
- const prefix string = ",\"attached\":"
- out.RawString(prefix)
- out.Bool(bool(in.Attached))
- }
- if in.OpenerID != "" {
- const prefix string = ",\"openerId\":"
- out.RawString(prefix)
- out.String(string(in.OpenerID))
- }
- {
- const prefix string = ",\"canAccessOpener\":"
- out.RawString(prefix)
- out.Bool(bool(in.CanAccessOpener))
- }
- if in.OpenerFrameID != "" {
- const prefix string = ",\"openerFrameId\":"
- out.RawString(prefix)
- out.String(string(in.OpenerFrameID))
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Info) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Info) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Info) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Info) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(in *jlexer.Lexer, out *GetTargetsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetInfos":
- if in.IsNull() {
- in.Skip()
- out.TargetInfos = nil
- } else {
- in.Delim('[')
- if out.TargetInfos == nil {
- if !in.IsDelim(']') {
- out.TargetInfos = make([]*Info, 0, 8)
- } else {
- out.TargetInfos = []*Info{}
- }
- } else {
- out.TargetInfos = (out.TargetInfos)[:0]
- }
- for !in.IsDelim(']') {
- var v4 *Info
- if in.IsNull() {
- in.Skip()
- v4 = nil
- } else {
- if v4 == nil {
- v4 = new(Info)
- }
- (*v4).UnmarshalEasyJSON(in)
- }
- out.TargetInfos = append(out.TargetInfos, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(out *jwriter.Writer, in GetTargetsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.TargetInfos) != 0 {
- const prefix string = ",\"targetInfos\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v5, v6 := range in.TargetInfos {
- if v5 > 0 {
- out.RawByte(',')
- }
- if v6 == nil {
- out.RawString("null")
- } else {
- (*v6).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTargetsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTargetsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTargetsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTargetsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(in *jlexer.Lexer, out *GetTargetsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(out *jwriter.Writer, in GetTargetsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTargetsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTargetsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTargetsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(in *jlexer.Lexer, out *GetTargetInfoReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetInfo":
- if in.IsNull() {
- in.Skip()
- out.TargetInfo = nil
- } else {
- if out.TargetInfo == nil {
- out.TargetInfo = new(Info)
- }
- (*out.TargetInfo).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(out *jwriter.Writer, in GetTargetInfoReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TargetInfo != nil {
- const prefix string = ",\"targetInfo\":"
- first = false
- out.RawString(prefix[1:])
- (*in.TargetInfo).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTargetInfoReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTargetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTargetInfoReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTargetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(in *jlexer.Lexer, out *GetTargetInfoParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(out *jwriter.Writer, in GetTargetInfoParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TargetID != "" {
- const prefix string = ",\"targetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetTargetInfoParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetTargetInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetTargetInfoParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetTargetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(in *jlexer.Lexer, out *GetBrowserContextsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextIds":
- if in.IsNull() {
- in.Skip()
- out.BrowserContextIds = nil
- } else {
- in.Delim('[')
- if out.BrowserContextIds == nil {
- if !in.IsDelim(']') {
- out.BrowserContextIds = make([]cdp.BrowserContextID, 0, 4)
- } else {
- out.BrowserContextIds = []cdp.BrowserContextID{}
- }
- } else {
- out.BrowserContextIds = (out.BrowserContextIds)[:0]
- }
- for !in.IsDelim(']') {
- var v7 cdp.BrowserContextID
- v7 = cdp.BrowserContextID(in.String())
- out.BrowserContextIds = append(out.BrowserContextIds, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(out *jwriter.Writer, in GetBrowserContextsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.BrowserContextIds) != 0 {
- const prefix string = ",\"browserContextIds\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v8, v9 := range in.BrowserContextIds {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserContextsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserContextsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserContextsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserContextsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(in *jlexer.Lexer, out *GetBrowserContextsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(out *jwriter.Writer, in GetBrowserContextsParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetBrowserContextsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetBrowserContextsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetBrowserContextsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetBrowserContextsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(in *jlexer.Lexer, out *ExposeDevToolsProtocolParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- case "bindingName":
- out.BindingName = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(out *jwriter.Writer, in ExposeDevToolsProtocolParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- if in.BindingName != "" {
- const prefix string = ",\"bindingName\":"
- out.RawString(prefix)
- out.String(string(in.BindingName))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ExposeDevToolsProtocolParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ExposeDevToolsProtocolParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ExposeDevToolsProtocolParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ExposeDevToolsProtocolParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(in *jlexer.Lexer, out *EventTargetInfoChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetInfo":
- if in.IsNull() {
- in.Skip()
- out.TargetInfo = nil
- } else {
- if out.TargetInfo == nil {
- out.TargetInfo = new(Info)
- }
- (*out.TargetInfo).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(out *jwriter.Writer, in EventTargetInfoChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetInfo\":"
- out.RawString(prefix[1:])
- if in.TargetInfo == nil {
- out.RawString("null")
- } else {
- (*in.TargetInfo).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetInfoChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetInfoChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetInfoChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetInfoChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(in *jlexer.Lexer, out *EventTargetDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(out *jwriter.Writer, in EventTargetDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(in *jlexer.Lexer, out *EventTargetCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetInfo":
- if in.IsNull() {
- in.Skip()
- out.TargetInfo = nil
- } else {
- if out.TargetInfo == nil {
- out.TargetInfo = new(Info)
- }
- (*out.TargetInfo).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(out *jwriter.Writer, in EventTargetCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetInfo\":"
- out.RawString(prefix[1:])
- if in.TargetInfo == nil {
- out.RawString("null")
- } else {
- (*in.TargetInfo).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(in *jlexer.Lexer, out *EventTargetCrashed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- case "status":
- out.Status = string(in.String())
- case "errorCode":
- out.ErrorCode = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(out *jwriter.Writer, in EventTargetCrashed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- out.String(string(in.Status))
- }
- {
- const prefix string = ",\"errorCode\":"
- out.RawString(prefix)
- out.Int64(int64(in.ErrorCode))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTargetCrashed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTargetCrashed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTargetCrashed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTargetCrashed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(in *jlexer.Lexer, out *EventReceivedMessageFromTarget) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- case "message":
- out.Message = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(out *jwriter.Writer, in EventReceivedMessageFromTarget) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sessionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- {
- const prefix string = ",\"message\":"
- out.RawString(prefix)
- out.String(string(in.Message))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventReceivedMessageFromTarget) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventReceivedMessageFromTarget) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventReceivedMessageFromTarget) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventReceivedMessageFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(in *jlexer.Lexer, out *EventDetachedFromTarget) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(out *jwriter.Writer, in EventDetachedFromTarget) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sessionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDetachedFromTarget) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDetachedFromTarget) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDetachedFromTarget) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDetachedFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(in *jlexer.Lexer, out *EventAttachedToTarget) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- case "targetInfo":
- if in.IsNull() {
- in.Skip()
- out.TargetInfo = nil
- } else {
- if out.TargetInfo == nil {
- out.TargetInfo = new(Info)
- }
- (*out.TargetInfo).UnmarshalEasyJSON(in)
- }
- case "waitingForDebugger":
- out.WaitingForDebugger = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(out *jwriter.Writer, in EventAttachedToTarget) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"sessionId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- {
- const prefix string = ",\"targetInfo\":"
- out.RawString(prefix)
- if in.TargetInfo == nil {
- out.RawString("null")
- } else {
- (*in.TargetInfo).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"waitingForDebugger\":"
- out.RawString(prefix)
- out.Bool(bool(in.WaitingForDebugger))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAttachedToTarget) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAttachedToTarget) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAttachedToTarget) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAttachedToTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(in *jlexer.Lexer, out *DisposeBrowserContextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(out *jwriter.Writer, in DisposeBrowserContextParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisposeBrowserContextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisposeBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisposeBrowserContextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisposeBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(in *jlexer.Lexer, out *DetachFromTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(out *jwriter.Writer, in DetachFromTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SessionID != "" {
- const prefix string = ",\"sessionId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DetachFromTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DetachFromTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DetachFromTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DetachFromTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(in *jlexer.Lexer, out *CreateTargetReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(out *jwriter.Writer, in CreateTargetReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.TargetID != "" {
- const prefix string = ",\"targetId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateTargetReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateTargetReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(in *jlexer.Lexer, out *CreateTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "url":
- out.URL = string(in.String())
- case "width":
- out.Width = int64(in.Int64())
- case "height":
- out.Height = int64(in.Int64())
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- case "enableBeginFrameControl":
- out.EnableBeginFrameControl = bool(in.Bool())
- case "newWindow":
- out.NewWindow = bool(in.Bool())
- case "background":
- out.Background = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(out *jwriter.Writer, in CreateTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix[1:])
- out.String(string(in.URL))
- }
- if in.Width != 0 {
- const prefix string = ",\"width\":"
- out.RawString(prefix)
- out.Int64(int64(in.Width))
- }
- if in.Height != 0 {
- const prefix string = ",\"height\":"
- out.RawString(prefix)
- out.Int64(int64(in.Height))
- }
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- out.RawString(prefix)
- out.String(string(in.BrowserContextID))
- }
- if in.EnableBeginFrameControl {
- const prefix string = ",\"enableBeginFrameControl\":"
- out.RawString(prefix)
- out.Bool(bool(in.EnableBeginFrameControl))
- }
- if in.NewWindow {
- const prefix string = ",\"newWindow\":"
- out.RawString(prefix)
- out.Bool(bool(in.NewWindow))
- }
- if in.Background {
- const prefix string = ",\"background\":"
- out.RawString(prefix)
- out.Bool(bool(in.Background))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(in *jlexer.Lexer, out *CreateBrowserContextReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "browserContextId":
- out.BrowserContextID = cdp.BrowserContextID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(out *jwriter.Writer, in CreateBrowserContextReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BrowserContextID != "" {
- const prefix string = ",\"browserContextId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.BrowserContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateBrowserContextReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateBrowserContextReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(in *jlexer.Lexer, out *CreateBrowserContextParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "disposeOnDetach":
- out.DisposeOnDetach = bool(in.Bool())
- case "proxyServer":
- out.ProxyServer = string(in.String())
- case "proxyBypassList":
- out.ProxyBypassList = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(out *jwriter.Writer, in CreateBrowserContextParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DisposeOnDetach {
- const prefix string = ",\"disposeOnDetach\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.DisposeOnDetach))
- }
- if in.ProxyServer != "" {
- const prefix string = ",\"proxyServer\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ProxyServer))
- }
- if in.ProxyBypassList != "" {
- const prefix string = ",\"proxyBypassList\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.ProxyBypassList))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CreateBrowserContextParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CreateBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CreateBrowserContextParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CreateBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(in *jlexer.Lexer, out *CloseTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(out *jwriter.Writer, in CloseTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v CloseTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v CloseTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *CloseTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *CloseTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(in *jlexer.Lexer, out *AttachToTargetReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(out *jwriter.Writer, in AttachToTargetReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SessionID != "" {
- const prefix string = ",\"sessionId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AttachToTargetReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AttachToTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AttachToTargetReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AttachToTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(in *jlexer.Lexer, out *AttachToTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- case "flatten":
- out.Flatten = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(out *jwriter.Writer, in AttachToTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- if in.Flatten {
- const prefix string = ",\"flatten\":"
- out.RawString(prefix)
- out.Bool(bool(in.Flatten))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AttachToTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AttachToTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AttachToTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AttachToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(in *jlexer.Lexer, out *AttachToBrowserTargetReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "sessionId":
- out.SessionID = SessionID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(out *jwriter.Writer, in AttachToBrowserTargetReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.SessionID != "" {
- const prefix string = ",\"sessionId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.SessionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AttachToBrowserTargetReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AttachToBrowserTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AttachToBrowserTargetReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AttachToBrowserTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(in *jlexer.Lexer, out *AttachToBrowserTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(out *jwriter.Writer, in AttachToBrowserTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AttachToBrowserTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AttachToBrowserTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AttachToBrowserTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AttachToBrowserTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(in *jlexer.Lexer, out *ActivateTargetParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "targetId":
- out.TargetID = ID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(out *jwriter.Writer, in ActivateTargetParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"targetId\":"
- out.RawString(prefix[1:])
- out.String(string(in.TargetID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ActivateTargetParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ActivateTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ActivateTargetParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ActivateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/target/events.go b/vendor/github.com/chromedp/cdproto/target/events.go
deleted file mode 100644
index 114a4288dac..00000000000
--- a/vendor/github.com/chromedp/cdproto/target/events.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package target
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventAttachedToTarget issued when attached to target because of
-// auto-attach or attachToTarget command.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-attachedToTarget
-type EventAttachedToTarget struct {
- SessionID SessionID `json:"sessionId"` // Identifier assigned to the session used to send/receive messages.
- TargetInfo *Info `json:"targetInfo"`
- WaitingForDebugger bool `json:"waitingForDebugger"`
-}
-
-// EventDetachedFromTarget issued when detached from target for any reason
-// (including detachFromTarget command). Can be issued multiple times per target
-// if multiple sessions have been attached to it.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-detachedFromTarget
-type EventDetachedFromTarget struct {
- SessionID SessionID `json:"sessionId"` // Detached session identifier.
-}
-
-// EventReceivedMessageFromTarget notifies about a new protocol message
-// received from the session (as reported in attachedToTarget event).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-receivedMessageFromTarget
-type EventReceivedMessageFromTarget struct {
- SessionID SessionID `json:"sessionId"` // Identifier of a session which sends a message.
- Message string `json:"message"`
-}
-
-// EventTargetCreated issued when a possible inspection target is created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCreated
-type EventTargetCreated struct {
- TargetInfo *Info `json:"targetInfo"`
-}
-
-// EventTargetDestroyed issued when a target is destroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetDestroyed
-type EventTargetDestroyed struct {
- TargetID ID `json:"targetId"`
-}
-
-// EventTargetCrashed issued when a target has crashed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCrashed
-type EventTargetCrashed struct {
- TargetID ID `json:"targetId"`
- Status string `json:"status"` // Termination status type.
- ErrorCode int64 `json:"errorCode"` // Termination error code.
-}
-
-// EventTargetInfoChanged issued when some information about a target has
-// changed. This only happens between targetCreated and targetDestroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetInfoChanged
-type EventTargetInfoChanged struct {
- TargetInfo *Info `json:"targetInfo"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/target/target.go b/vendor/github.com/chromedp/cdproto/target/target.go
deleted file mode 100644
index 29cdf971bce..00000000000
--- a/vendor/github.com/chromedp/cdproto/target/target.go
+++ /dev/null
@@ -1,577 +0,0 @@
-// Package target provides the Chrome DevTools Protocol
-// commands, types, and events for the Target domain.
-//
-// Supports additional targets discovery and allows to attach to them.
-//
-// Generated by the cdproto-gen command.
-package target
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ActivateTargetParams activates (focuses) the target.
-type ActivateTargetParams struct {
- TargetID ID `json:"targetId"`
-}
-
-// ActivateTarget activates (focuses) the target.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-activateTarget
-//
-// parameters:
-// targetID
-func ActivateTarget(targetID ID) *ActivateTargetParams {
- return &ActivateTargetParams{
- TargetID: targetID,
- }
-}
-
-// Do executes Target.activateTarget against the provided context.
-func (p *ActivateTargetParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandActivateTarget, p, nil)
-}
-
-// AttachToTargetParams attaches to the target with given id.
-type AttachToTargetParams struct {
- TargetID ID `json:"targetId"`
- Flatten bool `json:"flatten,omitempty"` // Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
-}
-
-// AttachToTarget attaches to the target with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToTarget
-//
-// parameters:
-// targetID
-func AttachToTarget(targetID ID) *AttachToTargetParams {
- return &AttachToTargetParams{
- TargetID: targetID,
- }
-}
-
-// WithFlatten enables "flat" access to the session via specifying sessionId
-// attribute in the commands. We plan to make this the default, deprecate
-// non-flattened mode, and eventually retire it. See crbug.com/991325.
-func (p AttachToTargetParams) WithFlatten(flatten bool) *AttachToTargetParams {
- p.Flatten = flatten
- return &p
-}
-
-// AttachToTargetReturns return values.
-type AttachToTargetReturns struct {
- SessionID SessionID `json:"sessionId,omitempty"` // Id assigned to the session.
-}
-
-// Do executes Target.attachToTarget against the provided context.
-//
-// returns:
-// sessionID - Id assigned to the session.
-func (p *AttachToTargetParams) Do(ctx context.Context) (sessionID SessionID, err error) {
- // execute
- var res AttachToTargetReturns
- err = cdp.Execute(ctx, CommandAttachToTarget, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.SessionID, nil
-}
-
-// AttachToBrowserTargetParams attaches to the browser target, only uses flat
-// sessionId mode.
-type AttachToBrowserTargetParams struct{}
-
-// AttachToBrowserTarget attaches to the browser target, only uses flat
-// sessionId mode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-attachToBrowserTarget
-func AttachToBrowserTarget() *AttachToBrowserTargetParams {
- return &AttachToBrowserTargetParams{}
-}
-
-// AttachToBrowserTargetReturns return values.
-type AttachToBrowserTargetReturns struct {
- SessionID SessionID `json:"sessionId,omitempty"` // Id assigned to the session.
-}
-
-// Do executes Target.attachToBrowserTarget against the provided context.
-//
-// returns:
-// sessionID - Id assigned to the session.
-func (p *AttachToBrowserTargetParams) Do(ctx context.Context) (sessionID SessionID, err error) {
- // execute
- var res AttachToBrowserTargetReturns
- err = cdp.Execute(ctx, CommandAttachToBrowserTarget, nil, &res)
- if err != nil {
- return "", err
- }
-
- return res.SessionID, nil
-}
-
-// CloseTargetParams closes the target. If the target is a page that gets
-// closed too.
-type CloseTargetParams struct {
- TargetID ID `json:"targetId"`
-}
-
-// CloseTarget closes the target. If the target is a page that gets closed
-// too.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-closeTarget
-//
-// parameters:
-// targetID
-func CloseTarget(targetID ID) *CloseTargetParams {
- return &CloseTargetParams{
- TargetID: targetID,
- }
-}
-
-// Do executes Target.closeTarget against the provided context.
-func (p *CloseTargetParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandCloseTarget, p, nil)
-}
-
-// ExposeDevToolsProtocolParams inject object to the target's main frame that
-// provides a communication channel with browser target. Injected object will be
-// available as window[bindingName]. The object has the follwing API: -
-// binding.send(json) - a method to send messages over the remote debugging
-// protocol - binding.onmessage = json => handleMessage(json) - a callback that
-// will be called for the protocol notifications and command responses.
-type ExposeDevToolsProtocolParams struct {
- TargetID ID `json:"targetId"`
- BindingName string `json:"bindingName,omitempty"` // Binding name, 'cdp' if not specified.
-}
-
-// ExposeDevToolsProtocol inject object to the target's main frame that
-// provides a communication channel with browser target. Injected object will be
-// available as window[bindingName]. The object has the follwing API: -
-// binding.send(json) - a method to send messages over the remote debugging
-// protocol - binding.onmessage = json => handleMessage(json) - a callback that
-// will be called for the protocol notifications and command responses.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-exposeDevToolsProtocol
-//
-// parameters:
-// targetID
-func ExposeDevToolsProtocol(targetID ID) *ExposeDevToolsProtocolParams {
- return &ExposeDevToolsProtocolParams{
- TargetID: targetID,
- }
-}
-
-// WithBindingName binding name, 'cdp' if not specified.
-func (p ExposeDevToolsProtocolParams) WithBindingName(bindingName string) *ExposeDevToolsProtocolParams {
- p.BindingName = bindingName
- return &p
-}
-
-// Do executes Target.exposeDevToolsProtocol against the provided context.
-func (p *ExposeDevToolsProtocolParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandExposeDevToolsProtocol, p, nil)
-}
-
-// CreateBrowserContextParams creates a new empty BrowserContext. Similar to
-// an incognito profile but you can have more than one.
-type CreateBrowserContextParams struct {
- DisposeOnDetach bool `json:"disposeOnDetach,omitempty"` // If specified, disposes this context when debugging session disconnects.
- ProxyServer string `json:"proxyServer,omitempty"` // Proxy server, similar to the one passed to --proxy-server
- ProxyBypassList string `json:"proxyBypassList,omitempty"` // Proxy bypass list, similar to the one passed to --proxy-bypass-list
-}
-
-// CreateBrowserContext creates a new empty BrowserContext. Similar to an
-// incognito profile but you can have more than one.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createBrowserContext
-//
-// parameters:
-func CreateBrowserContext() *CreateBrowserContextParams {
- return &CreateBrowserContextParams{}
-}
-
-// WithDisposeOnDetach if specified, disposes this context when debugging
-// session disconnects.
-func (p CreateBrowserContextParams) WithDisposeOnDetach(disposeOnDetach bool) *CreateBrowserContextParams {
- p.DisposeOnDetach = disposeOnDetach
- return &p
-}
-
-// WithProxyServer proxy server, similar to the one passed to --proxy-server.
-func (p CreateBrowserContextParams) WithProxyServer(proxyServer string) *CreateBrowserContextParams {
- p.ProxyServer = proxyServer
- return &p
-}
-
-// WithProxyBypassList proxy bypass list, similar to the one passed to
-// --proxy-bypass-list.
-func (p CreateBrowserContextParams) WithProxyBypassList(proxyBypassList string) *CreateBrowserContextParams {
- p.ProxyBypassList = proxyBypassList
- return &p
-}
-
-// CreateBrowserContextReturns return values.
-type CreateBrowserContextReturns struct {
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // The id of the context created.
-}
-
-// Do executes Target.createBrowserContext against the provided context.
-//
-// returns:
-// browserContextID - The id of the context created.
-func (p *CreateBrowserContextParams) Do(ctx context.Context) (browserContextID cdp.BrowserContextID, err error) {
- // execute
- var res CreateBrowserContextReturns
- err = cdp.Execute(ctx, CommandCreateBrowserContext, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.BrowserContextID, nil
-}
-
-// GetBrowserContextsParams returns all browser contexts created with
-// Target.createBrowserContext method.
-type GetBrowserContextsParams struct{}
-
-// GetBrowserContexts returns all browser contexts created with
-// Target.createBrowserContext method.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getBrowserContexts
-func GetBrowserContexts() *GetBrowserContextsParams {
- return &GetBrowserContextsParams{}
-}
-
-// GetBrowserContextsReturns return values.
-type GetBrowserContextsReturns struct {
- BrowserContextIds []cdp.BrowserContextID `json:"browserContextIds,omitempty"` // An array of browser context ids.
-}
-
-// Do executes Target.getBrowserContexts against the provided context.
-//
-// returns:
-// browserContextIds - An array of browser context ids.
-func (p *GetBrowserContextsParams) Do(ctx context.Context) (browserContextIds []cdp.BrowserContextID, err error) {
- // execute
- var res GetBrowserContextsReturns
- err = cdp.Execute(ctx, CommandGetBrowserContexts, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.BrowserContextIds, nil
-}
-
-// CreateTargetParams creates a new page.
-type CreateTargetParams struct {
- URL string `json:"url"` // The initial URL the page will be navigated to. An empty string indicates about:blank.
- Width int64 `json:"width,omitempty"` // Frame width in DIP (headless chrome only).
- Height int64 `json:"height,omitempty"` // Frame height in DIP (headless chrome only).
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"` // The browser context to create the page in.
- EnableBeginFrameControl bool `json:"enableBeginFrameControl,omitempty"` // Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).
- NewWindow bool `json:"newWindow,omitempty"` // Whether to create a new Window or Tab (chrome-only, false by default).
- Background bool `json:"background,omitempty"` // Whether to create the target in background or foreground (chrome-only, false by default).
-}
-
-// CreateTarget creates a new page.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-createTarget
-//
-// parameters:
-// url - The initial URL the page will be navigated to. An empty string indicates about:blank.
-func CreateTarget(url string) *CreateTargetParams {
- return &CreateTargetParams{
- URL: url,
- }
-}
-
-// WithWidth frame width in DIP (headless chrome only).
-func (p CreateTargetParams) WithWidth(width int64) *CreateTargetParams {
- p.Width = width
- return &p
-}
-
-// WithHeight frame height in DIP (headless chrome only).
-func (p CreateTargetParams) WithHeight(height int64) *CreateTargetParams {
- p.Height = height
- return &p
-}
-
-// WithBrowserContextID the browser context to create the page in.
-func (p CreateTargetParams) WithBrowserContextID(browserContextID cdp.BrowserContextID) *CreateTargetParams {
- p.BrowserContextID = browserContextID
- return &p
-}
-
-// WithEnableBeginFrameControl whether BeginFrames for this target will be
-// controlled via DevTools (headless chrome only, not supported on MacOS yet,
-// false by default).
-func (p CreateTargetParams) WithEnableBeginFrameControl(enableBeginFrameControl bool) *CreateTargetParams {
- p.EnableBeginFrameControl = enableBeginFrameControl
- return &p
-}
-
-// WithNewWindow whether to create a new Window or Tab (chrome-only, false by
-// default).
-func (p CreateTargetParams) WithNewWindow(newWindow bool) *CreateTargetParams {
- p.NewWindow = newWindow
- return &p
-}
-
-// WithBackground whether to create the target in background or foreground
-// (chrome-only, false by default).
-func (p CreateTargetParams) WithBackground(background bool) *CreateTargetParams {
- p.Background = background
- return &p
-}
-
-// CreateTargetReturns return values.
-type CreateTargetReturns struct {
- TargetID ID `json:"targetId,omitempty"` // The id of the page opened.
-}
-
-// Do executes Target.createTarget against the provided context.
-//
-// returns:
-// targetID - The id of the page opened.
-func (p *CreateTargetParams) Do(ctx context.Context) (targetID ID, err error) {
- // execute
- var res CreateTargetReturns
- err = cdp.Execute(ctx, CommandCreateTarget, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.TargetID, nil
-}
-
-// DetachFromTargetParams detaches session with given id.
-type DetachFromTargetParams struct {
- SessionID SessionID `json:"sessionId,omitempty"` // Session to detach.
-}
-
-// DetachFromTarget detaches session with given id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-detachFromTarget
-//
-// parameters:
-func DetachFromTarget() *DetachFromTargetParams {
- return &DetachFromTargetParams{}
-}
-
-// WithSessionID session to detach.
-func (p DetachFromTargetParams) WithSessionID(sessionID SessionID) *DetachFromTargetParams {
- p.SessionID = sessionID
- return &p
-}
-
-// Do executes Target.detachFromTarget against the provided context.
-func (p *DetachFromTargetParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDetachFromTarget, p, nil)
-}
-
-// DisposeBrowserContextParams deletes a BrowserContext. All the belonging
-// pages will be closed without calling their beforeunload hooks.
-type DisposeBrowserContextParams struct {
- BrowserContextID cdp.BrowserContextID `json:"browserContextId"`
-}
-
-// DisposeBrowserContext deletes a BrowserContext. All the belonging pages
-// will be closed without calling their beforeunload hooks.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-disposeBrowserContext
-//
-// parameters:
-// browserContextID
-func DisposeBrowserContext(browserContextID cdp.BrowserContextID) *DisposeBrowserContextParams {
- return &DisposeBrowserContextParams{
- BrowserContextID: browserContextID,
- }
-}
-
-// Do executes Target.disposeBrowserContext against the provided context.
-func (p *DisposeBrowserContextParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisposeBrowserContext, p, nil)
-}
-
-// GetTargetInfoParams returns information about a target.
-type GetTargetInfoParams struct {
- TargetID ID `json:"targetId,omitempty"`
-}
-
-// GetTargetInfo returns information about a target.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargetInfo
-//
-// parameters:
-func GetTargetInfo() *GetTargetInfoParams {
- return &GetTargetInfoParams{}
-}
-
-// WithTargetID [no description].
-func (p GetTargetInfoParams) WithTargetID(targetID ID) *GetTargetInfoParams {
- p.TargetID = targetID
- return &p
-}
-
-// GetTargetInfoReturns return values.
-type GetTargetInfoReturns struct {
- TargetInfo *Info `json:"targetInfo,omitempty"`
-}
-
-// Do executes Target.getTargetInfo against the provided context.
-//
-// returns:
-// targetInfo
-func (p *GetTargetInfoParams) Do(ctx context.Context) (targetInfo *Info, err error) {
- // execute
- var res GetTargetInfoReturns
- err = cdp.Execute(ctx, CommandGetTargetInfo, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.TargetInfo, nil
-}
-
-// GetTargetsParams retrieves a list of available targets.
-type GetTargetsParams struct{}
-
-// GetTargets retrieves a list of available targets.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-getTargets
-func GetTargets() *GetTargetsParams {
- return &GetTargetsParams{}
-}
-
-// GetTargetsReturns return values.
-type GetTargetsReturns struct {
- TargetInfos []*Info `json:"targetInfos,omitempty"` // The list of targets.
-}
-
-// Do executes Target.getTargets against the provided context.
-//
-// returns:
-// targetInfos - The list of targets.
-func (p *GetTargetsParams) Do(ctx context.Context) (targetInfos []*Info, err error) {
- // execute
- var res GetTargetsReturns
- err = cdp.Execute(ctx, CommandGetTargets, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.TargetInfos, nil
-}
-
-// SetAutoAttachParams controls whether to automatically attach to new
-// targets which are considered to be related to this one. When turned on,
-// attaches to all existing related targets as well. When turned off,
-// automatically detaches from all currently attached targets.
-type SetAutoAttachParams struct {
- AutoAttach bool `json:"autoAttach"` // Whether to auto-attach to related targets.
- WaitForDebuggerOnStart bool `json:"waitForDebuggerOnStart"` // Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.
- Flatten bool `json:"flatten,omitempty"` // Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
-}
-
-// SetAutoAttach controls whether to automatically attach to new targets
-// which are considered to be related to this one. When turned on, attaches to
-// all existing related targets as well. When turned off, automatically detaches
-// from all currently attached targets.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setAutoAttach
-//
-// parameters:
-// autoAttach - Whether to auto-attach to related targets.
-// waitForDebuggerOnStart - Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets.
-func SetAutoAttach(autoAttach bool, waitForDebuggerOnStart bool) *SetAutoAttachParams {
- return &SetAutoAttachParams{
- AutoAttach: autoAttach,
- WaitForDebuggerOnStart: waitForDebuggerOnStart,
- }
-}
-
-// WithFlatten enables "flat" access to the session via specifying sessionId
-// attribute in the commands. We plan to make this the default, deprecate
-// non-flattened mode, and eventually retire it. See crbug.com/991325.
-func (p SetAutoAttachParams) WithFlatten(flatten bool) *SetAutoAttachParams {
- p.Flatten = flatten
- return &p
-}
-
-// Do executes Target.setAutoAttach against the provided context.
-func (p *SetAutoAttachParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAutoAttach, p, nil)
-}
-
-// SetDiscoverTargetsParams controls whether to discover available targets
-// and notify via targetCreated/targetInfoChanged/targetDestroyed events.
-type SetDiscoverTargetsParams struct {
- Discover bool `json:"discover"` // Whether to discover available targets.
-}
-
-// SetDiscoverTargets controls whether to discover available targets and
-// notify via targetCreated/targetInfoChanged/targetDestroyed events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setDiscoverTargets
-//
-// parameters:
-// discover - Whether to discover available targets.
-func SetDiscoverTargets(discover bool) *SetDiscoverTargetsParams {
- return &SetDiscoverTargetsParams{
- Discover: discover,
- }
-}
-
-// Do executes Target.setDiscoverTargets against the provided context.
-func (p *SetDiscoverTargetsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetDiscoverTargets, p, nil)
-}
-
-// SetRemoteLocationsParams enables target discovery for the specified
-// locations, when setDiscoverTargets was set to true.
-type SetRemoteLocationsParams struct {
- Locations []*RemoteLocation `json:"locations"` // List of remote locations.
-}
-
-// SetRemoteLocations enables target discovery for the specified locations,
-// when setDiscoverTargets was set to true.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setRemoteLocations
-//
-// parameters:
-// locations - List of remote locations.
-func SetRemoteLocations(locations []*RemoteLocation) *SetRemoteLocationsParams {
- return &SetRemoteLocationsParams{
- Locations: locations,
- }
-}
-
-// Do executes Target.setRemoteLocations against the provided context.
-func (p *SetRemoteLocationsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetRemoteLocations, p, nil)
-}
-
-// Command names.
-const (
- CommandActivateTarget = "Target.activateTarget"
- CommandAttachToTarget = "Target.attachToTarget"
- CommandAttachToBrowserTarget = "Target.attachToBrowserTarget"
- CommandCloseTarget = "Target.closeTarget"
- CommandExposeDevToolsProtocol = "Target.exposeDevToolsProtocol"
- CommandCreateBrowserContext = "Target.createBrowserContext"
- CommandGetBrowserContexts = "Target.getBrowserContexts"
- CommandCreateTarget = "Target.createTarget"
- CommandDetachFromTarget = "Target.detachFromTarget"
- CommandDisposeBrowserContext = "Target.disposeBrowserContext"
- CommandGetTargetInfo = "Target.getTargetInfo"
- CommandGetTargets = "Target.getTargets"
- CommandSetAutoAttach = "Target.setAutoAttach"
- CommandSetDiscoverTargets = "Target.setDiscoverTargets"
- CommandSetRemoteLocations = "Target.setRemoteLocations"
-)
diff --git a/vendor/github.com/chromedp/cdproto/target/types.go b/vendor/github.com/chromedp/cdproto/target/types.go
deleted file mode 100644
index 18586a98117..00000000000
--- a/vendor/github.com/chromedp/cdproto/target/types.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package target
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/cdp"
-)
-
-// ID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetID
-type ID string
-
-// String returns the ID as string value.
-func (t ID) String() string {
- return string(t)
-}
-
-// SessionID unique identifier of attached debugging session.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-SessionID
-type SessionID string
-
-// String returns the SessionID as string value.
-func (t SessionID) String() string {
- return string(t)
-}
-
-// Info [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-TargetInfo
-type Info struct {
- TargetID ID `json:"targetId"`
- Type string `json:"type"`
- Title string `json:"title"`
- URL string `json:"url"`
- Attached bool `json:"attached"` // Whether the target has an attached client.
- OpenerID ID `json:"openerId,omitempty"` // Opener target Id
- CanAccessOpener bool `json:"canAccessOpener"` // Whether the target has access to the originating window.
- OpenerFrameID cdp.FrameID `json:"openerFrameId,omitempty"` // Frame id of originating window (is only set if target has an opener).
- BrowserContextID cdp.BrowserContextID `json:"browserContextId,omitempty"`
-}
-
-// RemoteLocation [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Target#type-RemoteLocation
-type RemoteLocation struct {
- Host string `json:"host"`
- Port int64 `json:"port"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/tethering/easyjson.go b/vendor/github.com/chromedp/cdproto/tethering/easyjson.go
deleted file mode 100644
index 2a8cf7d931d..00000000000
--- a/vendor/github.com/chromedp/cdproto/tethering/easyjson.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package tethering
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering(in *jlexer.Lexer, out *UnbindParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "port":
- out.Port = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering(out *jwriter.Writer, in UnbindParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"port\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Port))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v UnbindParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v UnbindParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *UnbindParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *UnbindParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering1(in *jlexer.Lexer, out *EventAccepted) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "port":
- out.Port = int64(in.Int64())
- case "connectionId":
- out.ConnectionID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering1(out *jwriter.Writer, in EventAccepted) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"port\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Port))
- }
- {
- const prefix string = ",\"connectionId\":"
- out.RawString(prefix)
- out.String(string(in.ConnectionID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAccepted) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAccepted) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAccepted) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAccepted) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering2(in *jlexer.Lexer, out *BindParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "port":
- out.Port = int64(in.Int64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering2(out *jwriter.Writer, in BindParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"port\":"
- out.RawString(prefix[1:])
- out.Int64(int64(in.Port))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BindParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BindParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTethering2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BindParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BindParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTethering2(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/tethering/events.go b/vendor/github.com/chromedp/cdproto/tethering/events.go
deleted file mode 100644
index 06e9576dbf4..00000000000
--- a/vendor/github.com/chromedp/cdproto/tethering/events.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package tethering
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventAccepted informs that port was successfully bound and got a specified
-// connection id.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tethering#event-accepted
-type EventAccepted struct {
- Port int64 `json:"port"` // Port number that was successfully bound.
- ConnectionID string `json:"connectionId"` // Connection id to be used.
-}
diff --git a/vendor/github.com/chromedp/cdproto/tethering/tethering.go b/vendor/github.com/chromedp/cdproto/tethering/tethering.go
deleted file mode 100644
index 2f21f2f9942..00000000000
--- a/vendor/github.com/chromedp/cdproto/tethering/tethering.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Package tethering provides the Chrome DevTools Protocol
-// commands, types, and events for the Tethering domain.
-//
-// The Tethering domain defines methods and events for browser port binding.
-//
-// Generated by the cdproto-gen command.
-package tethering
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// BindParams request browser port binding.
-type BindParams struct {
- Port int64 `json:"port"` // Port number to bind.
-}
-
-// Bind request browser port binding.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tethering#method-bind
-//
-// parameters:
-// port - Port number to bind.
-func Bind(port int64) *BindParams {
- return &BindParams{
- Port: port,
- }
-}
-
-// Do executes Tethering.bind against the provided context.
-func (p *BindParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandBind, p, nil)
-}
-
-// UnbindParams request browser port unbinding.
-type UnbindParams struct {
- Port int64 `json:"port"` // Port number to unbind.
-}
-
-// Unbind request browser port unbinding.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tethering#method-unbind
-//
-// parameters:
-// port - Port number to unbind.
-func Unbind(port int64) *UnbindParams {
- return &UnbindParams{
- Port: port,
- }
-}
-
-// Do executes Tethering.unbind against the provided context.
-func (p *UnbindParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandUnbind, p, nil)
-}
-
-// Command names.
-const (
- CommandBind = "Tethering.bind"
- CommandUnbind = "Tethering.unbind"
-)
diff --git a/vendor/github.com/chromedp/cdproto/tracing/easyjson.go b/vendor/github.com/chromedp/cdproto/tracing/easyjson.go
deleted file mode 100644
index ad791b55f97..00000000000
--- a/vendor/github.com/chromedp/cdproto/tracing/easyjson.go
+++ /dev/null
@@ -1,1190 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package tracing
-
-import (
- json "encoding/json"
- io "github.com/chromedp/cdproto/io"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing(in *jlexer.Lexer, out *TraceConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "recordMode":
- (out.RecordMode).UnmarshalEasyJSON(in)
- case "enableSampling":
- out.EnableSampling = bool(in.Bool())
- case "enableSystrace":
- out.EnableSystrace = bool(in.Bool())
- case "enableArgumentFilter":
- out.EnableArgumentFilter = bool(in.Bool())
- case "includedCategories":
- if in.IsNull() {
- in.Skip()
- out.IncludedCategories = nil
- } else {
- in.Delim('[')
- if out.IncludedCategories == nil {
- if !in.IsDelim(']') {
- out.IncludedCategories = make([]string, 0, 4)
- } else {
- out.IncludedCategories = []string{}
- }
- } else {
- out.IncludedCategories = (out.IncludedCategories)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.IncludedCategories = append(out.IncludedCategories, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "excludedCategories":
- if in.IsNull() {
- in.Skip()
- out.ExcludedCategories = nil
- } else {
- in.Delim('[')
- if out.ExcludedCategories == nil {
- if !in.IsDelim(']') {
- out.ExcludedCategories = make([]string, 0, 4)
- } else {
- out.ExcludedCategories = []string{}
- }
- } else {
- out.ExcludedCategories = (out.ExcludedCategories)[:0]
- }
- for !in.IsDelim(']') {
- var v2 string
- v2 = string(in.String())
- out.ExcludedCategories = append(out.ExcludedCategories, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "syntheticDelays":
- if in.IsNull() {
- in.Skip()
- out.SyntheticDelays = nil
- } else {
- in.Delim('[')
- if out.SyntheticDelays == nil {
- if !in.IsDelim(']') {
- out.SyntheticDelays = make([]string, 0, 4)
- } else {
- out.SyntheticDelays = []string{}
- }
- } else {
- out.SyntheticDelays = (out.SyntheticDelays)[:0]
- }
- for !in.IsDelim(']') {
- var v3 string
- v3 = string(in.String())
- out.SyntheticDelays = append(out.SyntheticDelays, v3)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "memoryDumpConfig":
- if in.IsNull() {
- in.Skip()
- out.MemoryDumpConfig = nil
- } else {
- if out.MemoryDumpConfig == nil {
- out.MemoryDumpConfig = new(MemoryDumpConfig)
- }
- (*out.MemoryDumpConfig).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing(out *jwriter.Writer, in TraceConfig) {
- out.RawByte('{')
- first := true
- _ = first
- if in.RecordMode != "" {
- const prefix string = ",\"recordMode\":"
- first = false
- out.RawString(prefix[1:])
- (in.RecordMode).MarshalEasyJSON(out)
- }
- if in.EnableSampling {
- const prefix string = ",\"enableSampling\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.EnableSampling))
- }
- if in.EnableSystrace {
- const prefix string = ",\"enableSystrace\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.EnableSystrace))
- }
- if in.EnableArgumentFilter {
- const prefix string = ",\"enableArgumentFilter\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.EnableArgumentFilter))
- }
- if len(in.IncludedCategories) != 0 {
- const prefix string = ",\"includedCategories\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v4, v5 := range in.IncludedCategories {
- if v4 > 0 {
- out.RawByte(',')
- }
- out.String(string(v5))
- }
- out.RawByte(']')
- }
- }
- if len(in.ExcludedCategories) != 0 {
- const prefix string = ",\"excludedCategories\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v6, v7 := range in.ExcludedCategories {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.String(string(v7))
- }
- out.RawByte(']')
- }
- }
- if len(in.SyntheticDelays) != 0 {
- const prefix string = ",\"syntheticDelays\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- {
- out.RawByte('[')
- for v8, v9 := range in.SyntheticDelays {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- if in.MemoryDumpConfig != nil {
- const prefix string = ",\"memoryDumpConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.MemoryDumpConfig).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v TraceConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v TraceConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *TraceConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *TraceConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing1(in *jlexer.Lexer, out *StartParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "bufferUsageReportingInterval":
- out.BufferUsageReportingInterval = float64(in.Float64())
- case "transferMode":
- (out.TransferMode).UnmarshalEasyJSON(in)
- case "streamFormat":
- (out.StreamFormat).UnmarshalEasyJSON(in)
- case "streamCompression":
- (out.StreamCompression).UnmarshalEasyJSON(in)
- case "traceConfig":
- if in.IsNull() {
- in.Skip()
- out.TraceConfig = nil
- } else {
- if out.TraceConfig == nil {
- out.TraceConfig = new(TraceConfig)
- }
- (*out.TraceConfig).UnmarshalEasyJSON(in)
- }
- case "perfettoConfig":
- out.PerfettoConfig = string(in.String())
- case "tracingBackend":
- (out.TracingBackend).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing1(out *jwriter.Writer, in StartParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.BufferUsageReportingInterval != 0 {
- const prefix string = ",\"bufferUsageReportingInterval\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.BufferUsageReportingInterval))
- }
- if in.TransferMode != "" {
- const prefix string = ",\"transferMode\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.TransferMode).MarshalEasyJSON(out)
- }
- if in.StreamFormat != "" {
- const prefix string = ",\"streamFormat\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.StreamFormat).MarshalEasyJSON(out)
- }
- if in.StreamCompression != "" {
- const prefix string = ",\"streamCompression\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.StreamCompression).MarshalEasyJSON(out)
- }
- if in.TraceConfig != nil {
- const prefix string = ",\"traceConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (*in.TraceConfig).MarshalEasyJSON(out)
- }
- if in.PerfettoConfig != "" {
- const prefix string = ",\"perfettoConfig\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.String(string(in.PerfettoConfig))
- }
- if in.TracingBackend != "" {
- const prefix string = ",\"tracingBackend\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.TracingBackend).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v StartParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v StartParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *StartParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing2(in *jlexer.Lexer, out *RequestMemoryDumpReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "dumpGuid":
- out.DumpGUID = string(in.String())
- case "success":
- out.Success = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing2(out *jwriter.Writer, in RequestMemoryDumpReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.DumpGUID != "" {
- const prefix string = ",\"dumpGuid\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.DumpGUID))
- }
- if in.Success {
- const prefix string = ",\"success\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Bool(bool(in.Success))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestMemoryDumpReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestMemoryDumpReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestMemoryDumpReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestMemoryDumpReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing3(in *jlexer.Lexer, out *RequestMemoryDumpParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "deterministic":
- out.Deterministic = bool(in.Bool())
- case "levelOfDetail":
- (out.LevelOfDetail).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing3(out *jwriter.Writer, in RequestMemoryDumpParams) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Deterministic {
- const prefix string = ",\"deterministic\":"
- first = false
- out.RawString(prefix[1:])
- out.Bool(bool(in.Deterministic))
- }
- if in.LevelOfDetail != "" {
- const prefix string = ",\"levelOfDetail\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- (in.LevelOfDetail).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RequestMemoryDumpParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RequestMemoryDumpParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RequestMemoryDumpParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RequestMemoryDumpParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing4(in *jlexer.Lexer, out *RecordClockSyncMarkerParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "syncId":
- out.SyncID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing4(out *jwriter.Writer, in RecordClockSyncMarkerParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"syncId\":"
- out.RawString(prefix[1:])
- out.String(string(in.SyncID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RecordClockSyncMarkerParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RecordClockSyncMarkerParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RecordClockSyncMarkerParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RecordClockSyncMarkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing5(in *jlexer.Lexer, out *MemoryDumpConfig) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing5(out *jwriter.Writer, in MemoryDumpConfig) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v MemoryDumpConfig) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v MemoryDumpConfig) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *MemoryDumpConfig) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *MemoryDumpConfig) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing6(in *jlexer.Lexer, out *GetCategoriesReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "categories":
- if in.IsNull() {
- in.Skip()
- out.Categories = nil
- } else {
- in.Delim('[')
- if out.Categories == nil {
- if !in.IsDelim(']') {
- out.Categories = make([]string, 0, 4)
- } else {
- out.Categories = []string{}
- }
- } else {
- out.Categories = (out.Categories)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Categories = append(out.Categories, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing6(out *jwriter.Writer, in GetCategoriesReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Categories) != 0 {
- const prefix string = ",\"categories\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v11, v12 := range in.Categories {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCategoriesReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCategoriesReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCategoriesReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCategoriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing7(in *jlexer.Lexer, out *GetCategoriesParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing7(out *jwriter.Writer, in GetCategoriesParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCategoriesParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCategoriesParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCategoriesParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCategoriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing8(in *jlexer.Lexer, out *EventTracingComplete) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "dataLossOccurred":
- out.DataLossOccurred = bool(in.Bool())
- case "stream":
- out.Stream = io.StreamHandle(in.String())
- case "traceFormat":
- (out.TraceFormat).UnmarshalEasyJSON(in)
- case "streamCompression":
- (out.StreamCompression).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing8(out *jwriter.Writer, in EventTracingComplete) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"dataLossOccurred\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.DataLossOccurred))
- }
- if in.Stream != "" {
- const prefix string = ",\"stream\":"
- out.RawString(prefix)
- out.String(string(in.Stream))
- }
- if in.TraceFormat != "" {
- const prefix string = ",\"traceFormat\":"
- out.RawString(prefix)
- (in.TraceFormat).MarshalEasyJSON(out)
- }
- if in.StreamCompression != "" {
- const prefix string = ",\"streamCompression\":"
- out.RawString(prefix)
- (in.StreamCompression).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventTracingComplete) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventTracingComplete) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventTracingComplete) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventTracingComplete) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing9(in *jlexer.Lexer, out *EventDataCollected) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "value":
- if in.IsNull() {
- in.Skip()
- out.Value = nil
- } else {
- in.Delim('[')
- if out.Value == nil {
- if !in.IsDelim(']') {
- out.Value = make([]easyjson.RawMessage, 0, 2)
- } else {
- out.Value = []easyjson.RawMessage{}
- }
- } else {
- out.Value = (out.Value)[:0]
- }
- for !in.IsDelim(']') {
- var v13 easyjson.RawMessage
- (v13).UnmarshalEasyJSON(in)
- out.Value = append(out.Value, v13)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing9(out *jwriter.Writer, in EventDataCollected) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"value\":"
- out.RawString(prefix[1:])
- if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v14, v15 := range in.Value {
- if v14 > 0 {
- out.RawByte(',')
- }
- (v15).MarshalEasyJSON(out)
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventDataCollected) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventDataCollected) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventDataCollected) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventDataCollected) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing10(in *jlexer.Lexer, out *EventBufferUsage) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "percentFull":
- out.PercentFull = float64(in.Float64())
- case "eventCount":
- out.EventCount = float64(in.Float64())
- case "value":
- out.Value = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing10(out *jwriter.Writer, in EventBufferUsage) {
- out.RawByte('{')
- first := true
- _ = first
- if in.PercentFull != 0 {
- const prefix string = ",\"percentFull\":"
- first = false
- out.RawString(prefix[1:])
- out.Float64(float64(in.PercentFull))
- }
- if in.EventCount != 0 {
- const prefix string = ",\"eventCount\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.EventCount))
- }
- if in.Value != 0 {
- const prefix string = ",\"value\":"
- if first {
- first = false
- out.RawString(prefix[1:])
- } else {
- out.RawString(prefix)
- }
- out.Float64(float64(in.Value))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventBufferUsage) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventBufferUsage) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventBufferUsage) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventBufferUsage) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing11(in *jlexer.Lexer, out *EndParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing11(out *jwriter.Writer, in EndParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EndParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EndParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoTracing11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EndParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EndParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoTracing11(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/tracing/events.go b/vendor/github.com/chromedp/cdproto/tracing/events.go
deleted file mode 100644
index d972dc6eda5..00000000000
--- a/vendor/github.com/chromedp/cdproto/tracing/events.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package tracing
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "github.com/chromedp/cdproto/io"
- "github.com/mailru/easyjson"
-)
-
-// EventBufferUsage [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-bufferUsage
-type EventBufferUsage struct {
- PercentFull float64 `json:"percentFull,omitempty"` // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
- EventCount float64 `json:"eventCount,omitempty"` // An approximate number of events in the trace log.
- Value float64 `json:"value,omitempty"` // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
-}
-
-// EventDataCollected contains an bucket of collected trace events. When
-// tracing is stopped collected events will be send as a sequence of
-// dataCollected events followed by tracingComplete event.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-dataCollected
-type EventDataCollected struct {
- Value []easyjson.RawMessage `json:"value"`
-}
-
-// EventTracingComplete signals that tracing is stopped and there is no trace
-// buffers pending flush, all data were delivered via dataCollected events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-tracingComplete
-type EventTracingComplete struct {
- DataLossOccurred bool `json:"dataLossOccurred"` // Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around.
- Stream io.StreamHandle `json:"stream,omitempty"` // A handle of the stream that holds resulting trace data.
- TraceFormat StreamFormat `json:"traceFormat,omitempty"` // Trace data format of returned stream.
- StreamCompression StreamCompression `json:"streamCompression,omitempty"` // Compression format of returned stream.
-}
diff --git a/vendor/github.com/chromedp/cdproto/tracing/tracing.go b/vendor/github.com/chromedp/cdproto/tracing/tracing.go
deleted file mode 100644
index 5c86241e334..00000000000
--- a/vendor/github.com/chromedp/cdproto/tracing/tracing.go
+++ /dev/null
@@ -1,213 +0,0 @@
-// Package tracing provides the Chrome DevTools Protocol
-// commands, types, and events for the Tracing domain.
-//
-// Generated by the cdproto-gen command.
-package tracing
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EndParams stop trace events collection.
-type EndParams struct{}
-
-// End stop trace events collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-end
-func End() *EndParams {
- return &EndParams{}
-}
-
-// Do executes Tracing.end against the provided context.
-func (p *EndParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnd, nil, nil)
-}
-
-// GetCategoriesParams gets supported tracing categories.
-type GetCategoriesParams struct{}
-
-// GetCategories gets supported tracing categories.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-getCategories
-func GetCategories() *GetCategoriesParams {
- return &GetCategoriesParams{}
-}
-
-// GetCategoriesReturns return values.
-type GetCategoriesReturns struct {
- Categories []string `json:"categories,omitempty"` // A list of supported tracing categories.
-}
-
-// Do executes Tracing.getCategories against the provided context.
-//
-// returns:
-// categories - A list of supported tracing categories.
-func (p *GetCategoriesParams) Do(ctx context.Context) (categories []string, err error) {
- // execute
- var res GetCategoriesReturns
- err = cdp.Execute(ctx, CommandGetCategories, nil, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Categories, nil
-}
-
-// RecordClockSyncMarkerParams record a clock sync marker in the trace.
-type RecordClockSyncMarkerParams struct {
- SyncID string `json:"syncId"` // The ID of this clock sync marker
-}
-
-// RecordClockSyncMarker record a clock sync marker in the trace.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-recordClockSyncMarker
-//
-// parameters:
-// syncID - The ID of this clock sync marker
-func RecordClockSyncMarker(syncID string) *RecordClockSyncMarkerParams {
- return &RecordClockSyncMarkerParams{
- SyncID: syncID,
- }
-}
-
-// Do executes Tracing.recordClockSyncMarker against the provided context.
-func (p *RecordClockSyncMarkerParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRecordClockSyncMarker, p, nil)
-}
-
-// RequestMemoryDumpParams request a global memory dump.
-type RequestMemoryDumpParams struct {
- Deterministic bool `json:"deterministic,omitempty"` // Enables more deterministic results by forcing garbage collection
- LevelOfDetail MemoryDumpLevelOfDetail `json:"levelOfDetail,omitempty"` // Specifies level of details in memory dump. Defaults to "detailed".
-}
-
-// RequestMemoryDump request a global memory dump.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-requestMemoryDump
-//
-// parameters:
-func RequestMemoryDump() *RequestMemoryDumpParams {
- return &RequestMemoryDumpParams{}
-}
-
-// WithDeterministic enables more deterministic results by forcing garbage
-// collection.
-func (p RequestMemoryDumpParams) WithDeterministic(deterministic bool) *RequestMemoryDumpParams {
- p.Deterministic = deterministic
- return &p
-}
-
-// WithLevelOfDetail specifies level of details in memory dump. Defaults to
-// "detailed".
-func (p RequestMemoryDumpParams) WithLevelOfDetail(levelOfDetail MemoryDumpLevelOfDetail) *RequestMemoryDumpParams {
- p.LevelOfDetail = levelOfDetail
- return &p
-}
-
-// RequestMemoryDumpReturns return values.
-type RequestMemoryDumpReturns struct {
- DumpGUID string `json:"dumpGuid,omitempty"` // GUID of the resulting global memory dump.
- Success bool `json:"success,omitempty"` // True iff the global memory dump succeeded.
-}
-
-// Do executes Tracing.requestMemoryDump against the provided context.
-//
-// returns:
-// dumpGUID - GUID of the resulting global memory dump.
-// success - True iff the global memory dump succeeded.
-func (p *RequestMemoryDumpParams) Do(ctx context.Context) (dumpGUID string, success bool, err error) {
- // execute
- var res RequestMemoryDumpReturns
- err = cdp.Execute(ctx, CommandRequestMemoryDump, p, &res)
- if err != nil {
- return "", false, err
- }
-
- return res.DumpGUID, res.Success, nil
-}
-
-// StartParams start trace events collection.
-type StartParams struct {
- BufferUsageReportingInterval float64 `json:"bufferUsageReportingInterval,omitempty"` // If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
- TransferMode TransferMode `json:"transferMode,omitempty"` // Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).
- StreamFormat StreamFormat `json:"streamFormat,omitempty"` // Trace data format to use. This only applies when using ReturnAsStream transfer mode (defaults to json).
- StreamCompression StreamCompression `json:"streamCompression,omitempty"` // Compression format to use. This only applies when using ReturnAsStream transfer mode (defaults to none)
- TraceConfig *TraceConfig `json:"traceConfig,omitempty"`
- PerfettoConfig string `json:"perfettoConfig,omitempty"` // Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters categories, options, traceConfig are ignored.
- TracingBackend Backend `json:"tracingBackend,omitempty"` // Backend type (defaults to auto)
-}
-
-// Start start trace events collection.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-start
-//
-// parameters:
-func Start() *StartParams {
- return &StartParams{}
-}
-
-// WithBufferUsageReportingInterval if set, the agent will issue bufferUsage
-// events at this interval, specified in milliseconds.
-func (p StartParams) WithBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartParams {
- p.BufferUsageReportingInterval = bufferUsageReportingInterval
- return &p
-}
-
-// WithTransferMode whether to report trace events as series of dataCollected
-// events or to save trace to a stream (defaults to ReportEvents).
-func (p StartParams) WithTransferMode(transferMode TransferMode) *StartParams {
- p.TransferMode = transferMode
- return &p
-}
-
-// WithStreamFormat trace data format to use. This only applies when using
-// ReturnAsStream transfer mode (defaults to json).
-func (p StartParams) WithStreamFormat(streamFormat StreamFormat) *StartParams {
- p.StreamFormat = streamFormat
- return &p
-}
-
-// WithStreamCompression compression format to use. This only applies when
-// using ReturnAsStream transfer mode (defaults to none).
-func (p StartParams) WithStreamCompression(streamCompression StreamCompression) *StartParams {
- p.StreamCompression = streamCompression
- return &p
-}
-
-// WithTraceConfig [no description].
-func (p StartParams) WithTraceConfig(traceConfig *TraceConfig) *StartParams {
- p.TraceConfig = traceConfig
- return &p
-}
-
-// WithPerfettoConfig base64-encoded serialized perfetto.protos.TraceConfig
-// protobuf message When specified, the parameters categories, options,
-// traceConfig are ignored.
-func (p StartParams) WithPerfettoConfig(perfettoConfig string) *StartParams {
- p.PerfettoConfig = perfettoConfig
- return &p
-}
-
-// WithTracingBackend backend type (defaults to auto).
-func (p StartParams) WithTracingBackend(tracingBackend Backend) *StartParams {
- p.TracingBackend = tracingBackend
- return &p
-}
-
-// Do executes Tracing.start against the provided context.
-func (p *StartParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandStart, p, nil)
-}
-
-// Command names.
-const (
- CommandEnd = "Tracing.end"
- CommandGetCategories = "Tracing.getCategories"
- CommandRecordClockSyncMarker = "Tracing.recordClockSyncMarker"
- CommandRequestMemoryDump = "Tracing.requestMemoryDump"
- CommandStart = "Tracing.start"
-)
diff --git a/vendor/github.com/chromedp/cdproto/tracing/types.go b/vendor/github.com/chromedp/cdproto/tracing/types.go
deleted file mode 100644
index cd837eafc1a..00000000000
--- a/vendor/github.com/chromedp/cdproto/tracing/types.go
+++ /dev/null
@@ -1,316 +0,0 @@
-package tracing
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// MemoryDumpConfig configuration for memory dump. Used only when
-// "memory-infra" category is enabled.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-MemoryDumpConfig
-type MemoryDumpConfig struct{}
-
-// TraceConfig [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-TraceConfig
-type TraceConfig struct {
- RecordMode RecordMode `json:"recordMode,omitempty"` // Controls how the trace buffer stores data.
- EnableSampling bool `json:"enableSampling,omitempty"` // Turns on JavaScript stack sampling.
- EnableSystrace bool `json:"enableSystrace,omitempty"` // Turns on system tracing.
- EnableArgumentFilter bool `json:"enableArgumentFilter,omitempty"` // Turns on argument filter.
- IncludedCategories []string `json:"includedCategories,omitempty"` // Included category filters.
- ExcludedCategories []string `json:"excludedCategories,omitempty"` // Excluded category filters.
- SyntheticDelays []string `json:"syntheticDelays,omitempty"` // Configuration to synthesize the delays in tracing.
- MemoryDumpConfig *MemoryDumpConfig `json:"memoryDumpConfig,omitempty"` // Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
-}
-
-// StreamFormat data format of a trace. Can be either the legacy JSON format
-// or the protocol buffer format. Note that the JSON format will be deprecated
-// soon.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-StreamFormat
-type StreamFormat string
-
-// String returns the StreamFormat as string value.
-func (t StreamFormat) String() string {
- return string(t)
-}
-
-// StreamFormat values.
-const (
- StreamFormatJSON StreamFormat = "json"
- StreamFormatProto StreamFormat = "proto"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t StreamFormat) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t StreamFormat) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *StreamFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch StreamFormat(in.String()) {
- case StreamFormatJSON:
- *t = StreamFormatJSON
- case StreamFormatProto:
- *t = StreamFormatProto
-
- default:
- in.AddError(errors.New("unknown StreamFormat value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *StreamFormat) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// StreamCompression compression type to use for traces returned via streams.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-StreamCompression
-type StreamCompression string
-
-// String returns the StreamCompression as string value.
-func (t StreamCompression) String() string {
- return string(t)
-}
-
-// StreamCompression values.
-const (
- StreamCompressionNone StreamCompression = "none"
- StreamCompressionGzip StreamCompression = "gzip"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t StreamCompression) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t StreamCompression) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *StreamCompression) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch StreamCompression(in.String()) {
- case StreamCompressionNone:
- *t = StreamCompressionNone
- case StreamCompressionGzip:
- *t = StreamCompressionGzip
-
- default:
- in.AddError(errors.New("unknown StreamCompression value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *StreamCompression) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// MemoryDumpLevelOfDetail details exposed when memory request explicitly
-// declared. Keep consistent with memory_dump_request_args.h and
-// memory_instrumentation.mojom.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-MemoryDumpLevelOfDetail
-type MemoryDumpLevelOfDetail string
-
-// String returns the MemoryDumpLevelOfDetail as string value.
-func (t MemoryDumpLevelOfDetail) String() string {
- return string(t)
-}
-
-// MemoryDumpLevelOfDetail values.
-const (
- MemoryDumpLevelOfDetailBackground MemoryDumpLevelOfDetail = "background"
- MemoryDumpLevelOfDetailLight MemoryDumpLevelOfDetail = "light"
- MemoryDumpLevelOfDetailDetailed MemoryDumpLevelOfDetail = "detailed"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t MemoryDumpLevelOfDetail) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t MemoryDumpLevelOfDetail) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *MemoryDumpLevelOfDetail) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch MemoryDumpLevelOfDetail(in.String()) {
- case MemoryDumpLevelOfDetailBackground:
- *t = MemoryDumpLevelOfDetailBackground
- case MemoryDumpLevelOfDetailLight:
- *t = MemoryDumpLevelOfDetailLight
- case MemoryDumpLevelOfDetailDetailed:
- *t = MemoryDumpLevelOfDetailDetailed
-
- default:
- in.AddError(errors.New("unknown MemoryDumpLevelOfDetail value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *MemoryDumpLevelOfDetail) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Backend backend type to use for tracing. chrome uses the Chrome-integrated
-// tracing service and is supported on all platforms. system is only supported
-// on Chrome OS and uses the Perfetto system tracing service. auto chooses
-// system when the perfettoConfig provided to Tracing.start specifies at least
-// one non-Chrome data source; otherwise uses chrome.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-TracingBackend
-type Backend string
-
-// String returns the Backend as string value.
-func (t Backend) String() string {
- return string(t)
-}
-
-// Backend values.
-const (
- BackendAuto Backend = "auto"
- BackendChrome Backend = "chrome"
- BackendSystem Backend = "system"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Backend) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Backend) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Backend) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Backend(in.String()) {
- case BackendAuto:
- *t = BackendAuto
- case BackendChrome:
- *t = BackendChrome
- case BackendSystem:
- *t = BackendSystem
-
- default:
- in.AddError(errors.New("unknown Backend value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Backend) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// RecordMode controls how the trace buffer stores data.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-TraceConfig
-type RecordMode string
-
-// String returns the RecordMode as string value.
-func (t RecordMode) String() string {
- return string(t)
-}
-
-// RecordMode values.
-const (
- RecordModeRecordUntilFull RecordMode = "recordUntilFull"
- RecordModeRecordContinuously RecordMode = "recordContinuously"
- RecordModeRecordAsMuchAsPossible RecordMode = "recordAsMuchAsPossible"
- RecordModeEchoToConsole RecordMode = "echoToConsole"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t RecordMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t RecordMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *RecordMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch RecordMode(in.String()) {
- case RecordModeRecordUntilFull:
- *t = RecordModeRecordUntilFull
- case RecordModeRecordContinuously:
- *t = RecordModeRecordContinuously
- case RecordModeRecordAsMuchAsPossible:
- *t = RecordModeRecordAsMuchAsPossible
- case RecordModeEchoToConsole:
- *t = RecordModeEchoToConsole
-
- default:
- in.AddError(errors.New("unknown RecordMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *RecordMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// TransferMode whether to report trace events as series of dataCollected
-// events or to save trace to a stream (defaults to ReportEvents).
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-start
-type TransferMode string
-
-// String returns the TransferMode as string value.
-func (t TransferMode) String() string {
- return string(t)
-}
-
-// TransferMode values.
-const (
- TransferModeReportEvents TransferMode = "ReportEvents"
- TransferModeReturnAsStream TransferMode = "ReturnAsStream"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t TransferMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t TransferMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *TransferMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch TransferMode(in.String()) {
- case TransferModeReportEvents:
- *t = TransferModeReportEvents
- case TransferModeReturnAsStream:
- *t = TransferModeReturnAsStream
-
- default:
- in.AddError(errors.New("unknown TransferMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *TransferMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
diff --git a/vendor/github.com/chromedp/cdproto/webaudio/easyjson.go b/vendor/github.com/chromedp/cdproto/webaudio/easyjson.go
deleted file mode 100644
index 26b3876e096..00000000000
--- a/vendor/github.com/chromedp/cdproto/webaudio/easyjson.go
+++ /dev/null
@@ -1,1828 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package webaudio
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio(in *jlexer.Lexer, out *GetRealtimeDataReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "realtimeData":
- if in.IsNull() {
- in.Skip()
- out.RealtimeData = nil
- } else {
- if out.RealtimeData == nil {
- out.RealtimeData = new(ContextRealtimeData)
- }
- (*out.RealtimeData).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio(out *jwriter.Writer, in GetRealtimeDataReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.RealtimeData != nil {
- const prefix string = ",\"realtimeData\":"
- first = false
- out.RawString(prefix[1:])
- (*in.RealtimeData).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRealtimeDataReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRealtimeDataReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRealtimeDataReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRealtimeDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio1(in *jlexer.Lexer, out *GetRealtimeDataParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio1(out *jwriter.Writer, in GetRealtimeDataParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetRealtimeDataParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetRealtimeDataParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetRealtimeDataParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetRealtimeDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio2(in *jlexer.Lexer, out *EventNodesDisconnected) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "sourceId":
- out.SourceID = GraphObjectID(in.String())
- case "destinationId":
- out.DestinationID = GraphObjectID(in.String())
- case "sourceOutputIndex":
- out.SourceOutputIndex = float64(in.Float64())
- case "destinationInputIndex":
- out.DestinationInputIndex = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio2(out *jwriter.Writer, in EventNodesDisconnected) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"sourceId\":"
- out.RawString(prefix)
- out.String(string(in.SourceID))
- }
- {
- const prefix string = ",\"destinationId\":"
- out.RawString(prefix)
- out.String(string(in.DestinationID))
- }
- if in.SourceOutputIndex != 0 {
- const prefix string = ",\"sourceOutputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.SourceOutputIndex))
- }
- if in.DestinationInputIndex != 0 {
- const prefix string = ",\"destinationInputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.DestinationInputIndex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNodesDisconnected) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNodesDisconnected) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNodesDisconnected) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNodesDisconnected) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio3(in *jlexer.Lexer, out *EventNodesConnected) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "sourceId":
- out.SourceID = GraphObjectID(in.String())
- case "destinationId":
- out.DestinationID = GraphObjectID(in.String())
- case "sourceOutputIndex":
- out.SourceOutputIndex = float64(in.Float64())
- case "destinationInputIndex":
- out.DestinationInputIndex = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio3(out *jwriter.Writer, in EventNodesConnected) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"sourceId\":"
- out.RawString(prefix)
- out.String(string(in.SourceID))
- }
- {
- const prefix string = ",\"destinationId\":"
- out.RawString(prefix)
- out.String(string(in.DestinationID))
- }
- if in.SourceOutputIndex != 0 {
- const prefix string = ",\"sourceOutputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.SourceOutputIndex))
- }
- if in.DestinationInputIndex != 0 {
- const prefix string = ",\"destinationInputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.DestinationInputIndex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNodesConnected) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNodesConnected) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNodesConnected) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNodesConnected) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio4(in *jlexer.Lexer, out *EventNodeParamDisconnected) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "sourceId":
- out.SourceID = GraphObjectID(in.String())
- case "destinationId":
- out.DestinationID = GraphObjectID(in.String())
- case "sourceOutputIndex":
- out.SourceOutputIndex = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio4(out *jwriter.Writer, in EventNodeParamDisconnected) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"sourceId\":"
- out.RawString(prefix)
- out.String(string(in.SourceID))
- }
- {
- const prefix string = ",\"destinationId\":"
- out.RawString(prefix)
- out.String(string(in.DestinationID))
- }
- if in.SourceOutputIndex != 0 {
- const prefix string = ",\"sourceOutputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.SourceOutputIndex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNodeParamDisconnected) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNodeParamDisconnected) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNodeParamDisconnected) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNodeParamDisconnected) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio5(in *jlexer.Lexer, out *EventNodeParamConnected) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "sourceId":
- out.SourceID = GraphObjectID(in.String())
- case "destinationId":
- out.DestinationID = GraphObjectID(in.String())
- case "sourceOutputIndex":
- out.SourceOutputIndex = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio5(out *jwriter.Writer, in EventNodeParamConnected) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"sourceId\":"
- out.RawString(prefix)
- out.String(string(in.SourceID))
- }
- {
- const prefix string = ",\"destinationId\":"
- out.RawString(prefix)
- out.String(string(in.DestinationID))
- }
- if in.SourceOutputIndex != 0 {
- const prefix string = ",\"sourceOutputIndex\":"
- out.RawString(prefix)
- out.Float64(float64(in.SourceOutputIndex))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventNodeParamConnected) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventNodeParamConnected) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventNodeParamConnected) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventNodeParamConnected) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio6(in *jlexer.Lexer, out *EventContextWillBeDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio6(out *jwriter.Writer, in EventContextWillBeDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventContextWillBeDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventContextWillBeDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventContextWillBeDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventContextWillBeDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio7(in *jlexer.Lexer, out *EventContextCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "context":
- if in.IsNull() {
- in.Skip()
- out.Context = nil
- } else {
- if out.Context == nil {
- out.Context = new(BaseAudioContext)
- }
- (*out.Context).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio7(out *jwriter.Writer, in EventContextCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"context\":"
- out.RawString(prefix[1:])
- if in.Context == nil {
- out.RawString("null")
- } else {
- (*in.Context).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventContextCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventContextCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventContextCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio8(in *jlexer.Lexer, out *EventContextChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "context":
- if in.IsNull() {
- in.Skip()
- out.Context = nil
- } else {
- if out.Context == nil {
- out.Context = new(BaseAudioContext)
- }
- (*out.Context).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio8(out *jwriter.Writer, in EventContextChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"context\":"
- out.RawString(prefix[1:])
- if in.Context == nil {
- out.RawString("null")
- } else {
- (*in.Context).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventContextChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventContextChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventContextChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventContextChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio9(in *jlexer.Lexer, out *EventAudioParamWillBeDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "nodeId":
- out.NodeID = GraphObjectID(in.String())
- case "paramId":
- out.ParamID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio9(out *jwriter.Writer, in EventAudioParamWillBeDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.String(string(in.NodeID))
- }
- {
- const prefix string = ",\"paramId\":"
- out.RawString(prefix)
- out.String(string(in.ParamID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioParamWillBeDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioParamWillBeDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioParamWillBeDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioParamWillBeDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio10(in *jlexer.Lexer, out *EventAudioParamCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "param":
- if in.IsNull() {
- in.Skip()
- out.Param = nil
- } else {
- if out.Param == nil {
- out.Param = new(AudioParam)
- }
- (*out.Param).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio10(out *jwriter.Writer, in EventAudioParamCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"param\":"
- out.RawString(prefix[1:])
- if in.Param == nil {
- out.RawString("null")
- } else {
- (*in.Param).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioParamCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioParamCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioParamCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioParamCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio11(in *jlexer.Lexer, out *EventAudioNodeWillBeDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "nodeId":
- out.NodeID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio11(out *jwriter.Writer, in EventAudioNodeWillBeDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.String(string(in.NodeID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioNodeWillBeDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioNodeWillBeDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioNodeWillBeDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioNodeWillBeDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio12(in *jlexer.Lexer, out *EventAudioNodeCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "node":
- if in.IsNull() {
- in.Skip()
- out.Node = nil
- } else {
- if out.Node == nil {
- out.Node = new(AudioNode)
- }
- (*out.Node).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio12(out *jwriter.Writer, in EventAudioNodeCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"node\":"
- out.RawString(prefix[1:])
- if in.Node == nil {
- out.RawString("null")
- } else {
- (*in.Node).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioNodeCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioNodeCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioNodeCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioNodeCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio13(in *jlexer.Lexer, out *EventAudioListenerWillBeDestroyed) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "listenerId":
- out.ListenerID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio13(out *jwriter.Writer, in EventAudioListenerWillBeDestroyed) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"listenerId\":"
- out.RawString(prefix)
- out.String(string(in.ListenerID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioListenerWillBeDestroyed) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioListenerWillBeDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioListenerWillBeDestroyed) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioListenerWillBeDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio14(in *jlexer.Lexer, out *EventAudioListenerCreated) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "listener":
- if in.IsNull() {
- in.Skip()
- out.Listener = nil
- } else {
- if out.Listener == nil {
- out.Listener = new(AudioListener)
- }
- (*out.Listener).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio14(out *jwriter.Writer, in EventAudioListenerCreated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"listener\":"
- out.RawString(prefix[1:])
- if in.Listener == nil {
- out.RawString("null")
- } else {
- (*in.Listener).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EventAudioListenerCreated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EventAudioListenerCreated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EventAudioListenerCreated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EventAudioListenerCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio15(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio15(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio15(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio16(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio16(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio16(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio16(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio16(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio16(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio17(in *jlexer.Lexer, out *ContextRealtimeData) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "currentTime":
- out.CurrentTime = float64(in.Float64())
- case "renderCapacity":
- out.RenderCapacity = float64(in.Float64())
- case "callbackIntervalMean":
- out.CallbackIntervalMean = float64(in.Float64())
- case "callbackIntervalVariance":
- out.CallbackIntervalVariance = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio17(out *jwriter.Writer, in ContextRealtimeData) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"currentTime\":"
- out.RawString(prefix[1:])
- out.Float64(float64(in.CurrentTime))
- }
- {
- const prefix string = ",\"renderCapacity\":"
- out.RawString(prefix)
- out.Float64(float64(in.RenderCapacity))
- }
- {
- const prefix string = ",\"callbackIntervalMean\":"
- out.RawString(prefix)
- out.Float64(float64(in.CallbackIntervalMean))
- }
- {
- const prefix string = ",\"callbackIntervalVariance\":"
- out.RawString(prefix)
- out.Float64(float64(in.CallbackIntervalVariance))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ContextRealtimeData) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio17(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ContextRealtimeData) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio17(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ContextRealtimeData) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio17(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ContextRealtimeData) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio17(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio18(in *jlexer.Lexer, out *BaseAudioContext) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "contextType":
- (out.ContextType).UnmarshalEasyJSON(in)
- case "contextState":
- (out.ContextState).UnmarshalEasyJSON(in)
- case "realtimeData":
- if in.IsNull() {
- in.Skip()
- out.RealtimeData = nil
- } else {
- if out.RealtimeData == nil {
- out.RealtimeData = new(ContextRealtimeData)
- }
- (*out.RealtimeData).UnmarshalEasyJSON(in)
- }
- case "callbackBufferSize":
- out.CallbackBufferSize = float64(in.Float64())
- case "maxOutputChannelCount":
- out.MaxOutputChannelCount = float64(in.Float64())
- case "sampleRate":
- out.SampleRate = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio18(out *jwriter.Writer, in BaseAudioContext) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"contextType\":"
- out.RawString(prefix)
- (in.ContextType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"contextState\":"
- out.RawString(prefix)
- (in.ContextState).MarshalEasyJSON(out)
- }
- if in.RealtimeData != nil {
- const prefix string = ",\"realtimeData\":"
- out.RawString(prefix)
- (*in.RealtimeData).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"callbackBufferSize\":"
- out.RawString(prefix)
- out.Float64(float64(in.CallbackBufferSize))
- }
- {
- const prefix string = ",\"maxOutputChannelCount\":"
- out.RawString(prefix)
- out.Float64(float64(in.MaxOutputChannelCount))
- }
- {
- const prefix string = ",\"sampleRate\":"
- out.RawString(prefix)
- out.Float64(float64(in.SampleRate))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v BaseAudioContext) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio18(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v BaseAudioContext) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio18(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *BaseAudioContext) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio18(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *BaseAudioContext) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio18(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio19(in *jlexer.Lexer, out *AudioParam) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "paramId":
- out.ParamID = GraphObjectID(in.String())
- case "nodeId":
- out.NodeID = GraphObjectID(in.String())
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "paramType":
- out.ParamType = ParamType(in.String())
- case "rate":
- (out.Rate).UnmarshalEasyJSON(in)
- case "defaultValue":
- out.DefaultValue = float64(in.Float64())
- case "minValue":
- out.MinValue = float64(in.Float64())
- case "maxValue":
- out.MaxValue = float64(in.Float64())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio19(out *jwriter.Writer, in AudioParam) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"paramId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ParamID))
- }
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix)
- out.String(string(in.NodeID))
- }
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix)
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"paramType\":"
- out.RawString(prefix)
- out.String(string(in.ParamType))
- }
- {
- const prefix string = ",\"rate\":"
- out.RawString(prefix)
- (in.Rate).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"defaultValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.DefaultValue))
- }
- {
- const prefix string = ",\"minValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.MinValue))
- }
- {
- const prefix string = ",\"maxValue\":"
- out.RawString(prefix)
- out.Float64(float64(in.MaxValue))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AudioParam) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio19(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AudioParam) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio19(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AudioParam) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio19(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AudioParam) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio19(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio20(in *jlexer.Lexer, out *AudioNode) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "nodeId":
- out.NodeID = GraphObjectID(in.String())
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- case "nodeType":
- (out.NodeType).UnmarshalEasyJSON(in)
- case "numberOfInputs":
- out.NumberOfInputs = float64(in.Float64())
- case "numberOfOutputs":
- out.NumberOfOutputs = float64(in.Float64())
- case "channelCount":
- out.ChannelCount = float64(in.Float64())
- case "channelCountMode":
- (out.ChannelCountMode).UnmarshalEasyJSON(in)
- case "channelInterpretation":
- (out.ChannelInterpretation).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio20(out *jwriter.Writer, in AudioNode) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"nodeId\":"
- out.RawString(prefix[1:])
- out.String(string(in.NodeID))
- }
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix)
- out.String(string(in.ContextID))
- }
- {
- const prefix string = ",\"nodeType\":"
- out.RawString(prefix)
- (in.NodeType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"numberOfInputs\":"
- out.RawString(prefix)
- out.Float64(float64(in.NumberOfInputs))
- }
- {
- const prefix string = ",\"numberOfOutputs\":"
- out.RawString(prefix)
- out.Float64(float64(in.NumberOfOutputs))
- }
- {
- const prefix string = ",\"channelCount\":"
- out.RawString(prefix)
- out.Float64(float64(in.ChannelCount))
- }
- {
- const prefix string = ",\"channelCountMode\":"
- out.RawString(prefix)
- (in.ChannelCountMode).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"channelInterpretation\":"
- out.RawString(prefix)
- (in.ChannelInterpretation).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AudioNode) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio20(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AudioNode) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio20(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AudioNode) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio20(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AudioNode) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio20(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio21(in *jlexer.Lexer, out *AudioListener) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "listenerId":
- out.ListenerID = GraphObjectID(in.String())
- case "contextId":
- out.ContextID = GraphObjectID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio21(out *jwriter.Writer, in AudioListener) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"listenerId\":"
- out.RawString(prefix[1:])
- out.String(string(in.ListenerID))
- }
- {
- const prefix string = ",\"contextId\":"
- out.RawString(prefix)
- out.String(string(in.ContextID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AudioListener) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio21(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AudioListener) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebaudio21(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AudioListener) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio21(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AudioListener) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebaudio21(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/webaudio/events.go b/vendor/github.com/chromedp/cdproto/webaudio/events.go
deleted file mode 100644
index 6e5d3c50601..00000000000
--- a/vendor/github.com/chromedp/cdproto/webaudio/events.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package webaudio
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-// EventContextCreated notifies that a new BaseAudioContext has been created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextCreated
-type EventContextCreated struct {
- Context *BaseAudioContext `json:"context"`
-}
-
-// EventContextWillBeDestroyed notifies that an existing BaseAudioContext
-// will be destroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextWillBeDestroyed
-type EventContextWillBeDestroyed struct {
- ContextID GraphObjectID `json:"contextId"`
-}
-
-// EventContextChanged notifies that existing BaseAudioContext has changed
-// some properties (id stays the same)..
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextChanged
-type EventContextChanged struct {
- Context *BaseAudioContext `json:"context"`
-}
-
-// EventAudioListenerCreated notifies that the construction of an
-// AudioListener has finished.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioListenerCreated
-type EventAudioListenerCreated struct {
- Listener *AudioListener `json:"listener"`
-}
-
-// EventAudioListenerWillBeDestroyed notifies that a new AudioListener has
-// been created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioListenerWillBeDestroyed
-type EventAudioListenerWillBeDestroyed struct {
- ContextID GraphObjectID `json:"contextId"`
- ListenerID GraphObjectID `json:"listenerId"`
-}
-
-// EventAudioNodeCreated notifies that a new AudioNode has been created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioNodeCreated
-type EventAudioNodeCreated struct {
- Node *AudioNode `json:"node"`
-}
-
-// EventAudioNodeWillBeDestroyed notifies that an existing AudioNode has been
-// destroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioNodeWillBeDestroyed
-type EventAudioNodeWillBeDestroyed struct {
- ContextID GraphObjectID `json:"contextId"`
- NodeID GraphObjectID `json:"nodeId"`
-}
-
-// EventAudioParamCreated notifies that a new AudioParam has been created.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioParamCreated
-type EventAudioParamCreated struct {
- Param *AudioParam `json:"param"`
-}
-
-// EventAudioParamWillBeDestroyed notifies that an existing AudioParam has
-// been destroyed.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-audioParamWillBeDestroyed
-type EventAudioParamWillBeDestroyed struct {
- ContextID GraphObjectID `json:"contextId"`
- NodeID GraphObjectID `json:"nodeId"`
- ParamID GraphObjectID `json:"paramId"`
-}
-
-// EventNodesConnected notifies that two AudioNodes are connected.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-nodesConnected
-type EventNodesConnected struct {
- ContextID GraphObjectID `json:"contextId"`
- SourceID GraphObjectID `json:"sourceId"`
- DestinationID GraphObjectID `json:"destinationId"`
- SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"`
- DestinationInputIndex float64 `json:"destinationInputIndex,omitempty"`
-}
-
-// EventNodesDisconnected notifies that AudioNodes are disconnected. The
-// destination can be null, and it means all the outgoing connections from the
-// source are disconnected.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-nodesDisconnected
-type EventNodesDisconnected struct {
- ContextID GraphObjectID `json:"contextId"`
- SourceID GraphObjectID `json:"sourceId"`
- DestinationID GraphObjectID `json:"destinationId"`
- SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"`
- DestinationInputIndex float64 `json:"destinationInputIndex,omitempty"`
-}
-
-// EventNodeParamConnected notifies that an AudioNode is connected to an
-// AudioParam.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-nodeParamConnected
-type EventNodeParamConnected struct {
- ContextID GraphObjectID `json:"contextId"`
- SourceID GraphObjectID `json:"sourceId"`
- DestinationID GraphObjectID `json:"destinationId"`
- SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"`
-}
-
-// EventNodeParamDisconnected notifies that an AudioNode is disconnected to
-// an AudioParam.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-nodeParamDisconnected
-type EventNodeParamDisconnected struct {
- ContextID GraphObjectID `json:"contextId"`
- SourceID GraphObjectID `json:"sourceId"`
- DestinationID GraphObjectID `json:"destinationId"`
- SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/webaudio/types.go b/vendor/github.com/chromedp/cdproto/webaudio/types.go
deleted file mode 100644
index 25dfe4ca6e9..00000000000
--- a/vendor/github.com/chromedp/cdproto/webaudio/types.go
+++ /dev/null
@@ -1,329 +0,0 @@
-package webaudio
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// GraphObjectID an unique ID for a graph object (AudioContext, AudioNode,
-// AudioParam) in Web Audio API.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-GraphObjectId
-type GraphObjectID string
-
-// String returns the GraphObjectID as string value.
-func (t GraphObjectID) String() string {
- return string(t)
-}
-
-// ContextType enum of BaseAudioContext types.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextType
-type ContextType string
-
-// String returns the ContextType as string value.
-func (t ContextType) String() string {
- return string(t)
-}
-
-// ContextType values.
-const (
- ContextTypeRealtime ContextType = "realtime"
- ContextTypeOffline ContextType = "offline"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContextType) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContextType) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContextType(in.String()) {
- case ContextTypeRealtime:
- *t = ContextTypeRealtime
- case ContextTypeOffline:
- *t = ContextTypeOffline
-
- default:
- in.AddError(errors.New("unknown ContextType value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContextType) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ContextState enum of AudioContextState from the spec.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextState
-type ContextState string
-
-// String returns the ContextState as string value.
-func (t ContextState) String() string {
- return string(t)
-}
-
-// ContextState values.
-const (
- ContextStateSuspended ContextState = "suspended"
- ContextStateRunning ContextState = "running"
- ContextStateClosed ContextState = "closed"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ContextState) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ContextState) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ContextState) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ContextState(in.String()) {
- case ContextStateSuspended:
- *t = ContextStateSuspended
- case ContextStateRunning:
- *t = ContextStateRunning
- case ContextStateClosed:
- *t = ContextStateClosed
-
- default:
- in.AddError(errors.New("unknown ContextState value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ContextState) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// NodeType enum of AudioNode types.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-NodeType
-type NodeType string
-
-// String returns the NodeType as string value.
-func (t NodeType) String() string {
- return string(t)
-}
-
-// ChannelCountMode enum of AudioNode::ChannelCountMode from the spec.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ChannelCountMode
-type ChannelCountMode string
-
-// String returns the ChannelCountMode as string value.
-func (t ChannelCountMode) String() string {
- return string(t)
-}
-
-// ChannelCountMode values.
-const (
- ChannelCountModeClampedMax ChannelCountMode = "clamped-max"
- ChannelCountModeExplicit ChannelCountMode = "explicit"
- ChannelCountModeMax ChannelCountMode = "max"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ChannelCountMode) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ChannelCountMode) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ChannelCountMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ChannelCountMode(in.String()) {
- case ChannelCountModeClampedMax:
- *t = ChannelCountModeClampedMax
- case ChannelCountModeExplicit:
- *t = ChannelCountModeExplicit
- case ChannelCountModeMax:
- *t = ChannelCountModeMax
-
- default:
- in.AddError(errors.New("unknown ChannelCountMode value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ChannelCountMode) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ChannelInterpretation enum of AudioNode::ChannelInterpretation from the
-// spec.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ChannelInterpretation
-type ChannelInterpretation string
-
-// String returns the ChannelInterpretation as string value.
-func (t ChannelInterpretation) String() string {
- return string(t)
-}
-
-// ChannelInterpretation values.
-const (
- ChannelInterpretationDiscrete ChannelInterpretation = "discrete"
- ChannelInterpretationSpeakers ChannelInterpretation = "speakers"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t ChannelInterpretation) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t ChannelInterpretation) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *ChannelInterpretation) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch ChannelInterpretation(in.String()) {
- case ChannelInterpretationDiscrete:
- *t = ChannelInterpretationDiscrete
- case ChannelInterpretationSpeakers:
- *t = ChannelInterpretationSpeakers
-
- default:
- in.AddError(errors.New("unknown ChannelInterpretation value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *ChannelInterpretation) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ParamType enum of AudioParam types.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ParamType
-type ParamType string
-
-// String returns the ParamType as string value.
-func (t ParamType) String() string {
- return string(t)
-}
-
-// AutomationRate enum of AudioParam::AutomationRate from the spec.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-AutomationRate
-type AutomationRate string
-
-// String returns the AutomationRate as string value.
-func (t AutomationRate) String() string {
- return string(t)
-}
-
-// AutomationRate values.
-const (
- AutomationRateARate AutomationRate = "a-rate"
- AutomationRateKRate AutomationRate = "k-rate"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AutomationRate) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AutomationRate) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AutomationRate) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AutomationRate(in.String()) {
- case AutomationRateARate:
- *t = AutomationRateARate
- case AutomationRateKRate:
- *t = AutomationRateKRate
-
- default:
- in.AddError(errors.New("unknown AutomationRate value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AutomationRate) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// ContextRealtimeData fields in AudioContext that change in real-time.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextRealtimeData
-type ContextRealtimeData struct {
- CurrentTime float64 `json:"currentTime"` // The current context time in second in BaseAudioContext.
- RenderCapacity float64 `json:"renderCapacity"` // The time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur.
- CallbackIntervalMean float64 `json:"callbackIntervalMean"` // A running mean of callback interval.
- CallbackIntervalVariance float64 `json:"callbackIntervalVariance"` // A running variance of callback interval.
-}
-
-// BaseAudioContext protocol object for BaseAudioContext.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-BaseAudioContext
-type BaseAudioContext struct {
- ContextID GraphObjectID `json:"contextId"`
- ContextType ContextType `json:"contextType"`
- ContextState ContextState `json:"contextState"`
- RealtimeData *ContextRealtimeData `json:"realtimeData,omitempty"`
- CallbackBufferSize float64 `json:"callbackBufferSize"` // Platform-dependent callback buffer size.
- MaxOutputChannelCount float64 `json:"maxOutputChannelCount"` // Number of output channels supported by audio hardware in use.
- SampleRate float64 `json:"sampleRate"` // Context sample rate.
-}
-
-// AudioListener protocol object for AudioListener.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-AudioListener
-type AudioListener struct {
- ListenerID GraphObjectID `json:"listenerId"`
- ContextID GraphObjectID `json:"contextId"`
-}
-
-// AudioNode protocol object for AudioNode.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-AudioNode
-type AudioNode struct {
- NodeID GraphObjectID `json:"nodeId"`
- ContextID GraphObjectID `json:"contextId"`
- NodeType cdp.NodeType `json:"nodeType"`
- NumberOfInputs float64 `json:"numberOfInputs"`
- NumberOfOutputs float64 `json:"numberOfOutputs"`
- ChannelCount float64 `json:"channelCount"`
- ChannelCountMode ChannelCountMode `json:"channelCountMode"`
- ChannelInterpretation ChannelInterpretation `json:"channelInterpretation"`
-}
-
-// AudioParam protocol object for AudioParam.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-AudioParam
-type AudioParam struct {
- ParamID GraphObjectID `json:"paramId"`
- NodeID GraphObjectID `json:"nodeId"`
- ContextID GraphObjectID `json:"contextId"`
- ParamType ParamType `json:"paramType"`
- Rate AutomationRate `json:"rate"`
- DefaultValue float64 `json:"defaultValue"`
- MinValue float64 `json:"minValue"`
- MaxValue float64 `json:"maxValue"`
-}
diff --git a/vendor/github.com/chromedp/cdproto/webaudio/webaudio.go b/vendor/github.com/chromedp/cdproto/webaudio/webaudio.go
deleted file mode 100644
index b7cc7112437..00000000000
--- a/vendor/github.com/chromedp/cdproto/webaudio/webaudio.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Package webaudio provides the Chrome DevTools Protocol
-// commands, types, and events for the WebAudio domain.
-//
-// This domain allows inspection of Web Audio API.
-// https://webaudio.github.io/web-audio-api/.
-//
-// Generated by the cdproto-gen command.
-package webaudio
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams enables the WebAudio domain and starts sending context
-// lifetime events.
-type EnableParams struct{}
-
-// Enable enables the WebAudio domain and starts sending context lifetime
-// events.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes WebAudio.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// DisableParams disables the WebAudio domain.
-type DisableParams struct{}
-
-// Disable disables the WebAudio domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes WebAudio.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// GetRealtimeDataParams fetch the realtime data from the registered
-// contexts.
-type GetRealtimeDataParams struct {
- ContextID GraphObjectID `json:"contextId"`
-}
-
-// GetRealtimeData fetch the realtime data from the registered contexts.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-getRealtimeData
-//
-// parameters:
-// contextID
-func GetRealtimeData(contextID GraphObjectID) *GetRealtimeDataParams {
- return &GetRealtimeDataParams{
- ContextID: contextID,
- }
-}
-
-// GetRealtimeDataReturns return values.
-type GetRealtimeDataReturns struct {
- RealtimeData *ContextRealtimeData `json:"realtimeData,omitempty"`
-}
-
-// Do executes WebAudio.getRealtimeData against the provided context.
-//
-// returns:
-// realtimeData
-func (p *GetRealtimeDataParams) Do(ctx context.Context) (realtimeData *ContextRealtimeData, err error) {
- // execute
- var res GetRealtimeDataReturns
- err = cdp.Execute(ctx, CommandGetRealtimeData, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.RealtimeData, nil
-}
-
-// Command names.
-const (
- CommandEnable = "WebAudio.enable"
- CommandDisable = "WebAudio.disable"
- CommandGetRealtimeData = "WebAudio.getRealtimeData"
-)
diff --git a/vendor/github.com/chromedp/cdproto/webauthn/easyjson.go b/vendor/github.com/chromedp/cdproto/webauthn/easyjson.go
deleted file mode 100644
index daf3d394d8f..00000000000
--- a/vendor/github.com/chromedp/cdproto/webauthn/easyjson.go
+++ /dev/null
@@ -1,1271 +0,0 @@
-// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
-
-package webauthn
-
-import (
- json "encoding/json"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
-)
-
-// suppress unused package warning
-var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
-)
-
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn(in *jlexer.Lexer, out *VirtualAuthenticatorOptions) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "protocol":
- (out.Protocol).UnmarshalEasyJSON(in)
- case "ctap2Version":
- (out.Ctap2version).UnmarshalEasyJSON(in)
- case "transport":
- (out.Transport).UnmarshalEasyJSON(in)
- case "hasResidentKey":
- out.HasResidentKey = bool(in.Bool())
- case "hasUserVerification":
- out.HasUserVerification = bool(in.Bool())
- case "hasLargeBlob":
- out.HasLargeBlob = bool(in.Bool())
- case "hasCredBlob":
- out.HasCredBlob = bool(in.Bool())
- case "automaticPresenceSimulation":
- out.AutomaticPresenceSimulation = bool(in.Bool())
- case "isUserVerified":
- out.IsUserVerified = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn(out *jwriter.Writer, in VirtualAuthenticatorOptions) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"protocol\":"
- out.RawString(prefix[1:])
- (in.Protocol).MarshalEasyJSON(out)
- }
- if in.Ctap2version != "" {
- const prefix string = ",\"ctap2Version\":"
- out.RawString(prefix)
- (in.Ctap2version).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"transport\":"
- out.RawString(prefix)
- (in.Transport).MarshalEasyJSON(out)
- }
- if in.HasResidentKey {
- const prefix string = ",\"hasResidentKey\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasResidentKey))
- }
- if in.HasUserVerification {
- const prefix string = ",\"hasUserVerification\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasUserVerification))
- }
- if in.HasLargeBlob {
- const prefix string = ",\"hasLargeBlob\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasLargeBlob))
- }
- if in.HasCredBlob {
- const prefix string = ",\"hasCredBlob\":"
- out.RawString(prefix)
- out.Bool(bool(in.HasCredBlob))
- }
- if in.AutomaticPresenceSimulation {
- const prefix string = ",\"automaticPresenceSimulation\":"
- out.RawString(prefix)
- out.Bool(bool(in.AutomaticPresenceSimulation))
- }
- if in.IsUserVerified {
- const prefix string = ",\"isUserVerified\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsUserVerified))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v VirtualAuthenticatorOptions) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v VirtualAuthenticatorOptions) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *VirtualAuthenticatorOptions) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *VirtualAuthenticatorOptions) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn1(in *jlexer.Lexer, out *SetUserVerifiedParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- case "isUserVerified":
- out.IsUserVerified = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn1(out *jwriter.Writer, in SetUserVerifiedParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- {
- const prefix string = ",\"isUserVerified\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsUserVerified))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetUserVerifiedParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetUserVerifiedParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn1(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetUserVerifiedParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn1(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetUserVerifiedParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn1(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(in *jlexer.Lexer, out *SetAutomaticPresenceSimulationParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- case "enabled":
- out.Enabled = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(out *jwriter.Writer, in SetAutomaticPresenceSimulationParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- {
- const prefix string = ",\"enabled\":"
- out.RawString(prefix)
- out.Bool(bool(in.Enabled))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v SetAutomaticPresenceSimulationParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v SetAutomaticPresenceSimulationParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *SetAutomaticPresenceSimulationParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *SetAutomaticPresenceSimulationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(in *jlexer.Lexer, out *RemoveVirtualAuthenticatorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(out *jwriter.Writer, in RemoveVirtualAuthenticatorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveVirtualAuthenticatorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(in *jlexer.Lexer, out *RemoveCredentialParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- case "credentialId":
- out.CredentialID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(out *jwriter.Writer, in RemoveCredentialParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- {
- const prefix string = ",\"credentialId\":"
- out.RawString(prefix)
- out.String(string(in.CredentialID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v RemoveCredentialParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v RemoveCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *RemoveCredentialParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *RemoveCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(in *jlexer.Lexer, out *GetCredentialsReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "credentials":
- if in.IsNull() {
- in.Skip()
- out.Credentials = nil
- } else {
- in.Delim('[')
- if out.Credentials == nil {
- if !in.IsDelim(']') {
- out.Credentials = make([]*Credential, 0, 8)
- } else {
- out.Credentials = []*Credential{}
- }
- } else {
- out.Credentials = (out.Credentials)[:0]
- }
- for !in.IsDelim(']') {
- var v1 *Credential
- if in.IsNull() {
- in.Skip()
- v1 = nil
- } else {
- if v1 == nil {
- v1 = new(Credential)
- }
- (*v1).UnmarshalEasyJSON(in)
- }
- out.Credentials = append(out.Credentials, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(out *jwriter.Writer, in GetCredentialsReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if len(in.Credentials) != 0 {
- const prefix string = ",\"credentials\":"
- first = false
- out.RawString(prefix[1:])
- {
- out.RawByte('[')
- for v2, v3 := range in.Credentials {
- if v2 > 0 {
- out.RawByte(',')
- }
- if v3 == nil {
- out.RawString("null")
- } else {
- (*v3).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCredentialsReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCredentialsReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCredentialsReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCredentialsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(in *jlexer.Lexer, out *GetCredentialsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(out *jwriter.Writer, in GetCredentialsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCredentialsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCredentialsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCredentialsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(in *jlexer.Lexer, out *GetCredentialReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "credential":
- if in.IsNull() {
- in.Skip()
- out.Credential = nil
- } else {
- if out.Credential == nil {
- out.Credential = new(Credential)
- }
- (*out.Credential).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(out *jwriter.Writer, in GetCredentialReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.Credential != nil {
- const prefix string = ",\"credential\":"
- first = false
- out.RawString(prefix[1:])
- (*in.Credential).MarshalEasyJSON(out)
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCredentialReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCredentialReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCredentialReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCredentialReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(in *jlexer.Lexer, out *GetCredentialParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- case "credentialId":
- out.CredentialID = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(out *jwriter.Writer, in GetCredentialParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- {
- const prefix string = ",\"credentialId\":"
- out.RawString(prefix)
- out.String(string(in.CredentialID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v GetCredentialParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v GetCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *GetCredentialParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *GetCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(in *jlexer.Lexer, out *Credential) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "credentialId":
- out.CredentialID = string(in.String())
- case "isResidentCredential":
- out.IsResidentCredential = bool(in.Bool())
- case "rpId":
- out.RpID = string(in.String())
- case "privateKey":
- out.PrivateKey = string(in.String())
- case "userHandle":
- out.UserHandle = string(in.String())
- case "signCount":
- out.SignCount = int64(in.Int64())
- case "largeBlob":
- out.LargeBlob = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(out *jwriter.Writer, in Credential) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"credentialId\":"
- out.RawString(prefix[1:])
- out.String(string(in.CredentialID))
- }
- {
- const prefix string = ",\"isResidentCredential\":"
- out.RawString(prefix)
- out.Bool(bool(in.IsResidentCredential))
- }
- if in.RpID != "" {
- const prefix string = ",\"rpId\":"
- out.RawString(prefix)
- out.String(string(in.RpID))
- }
- {
- const prefix string = ",\"privateKey\":"
- out.RawString(prefix)
- out.String(string(in.PrivateKey))
- }
- if in.UserHandle != "" {
- const prefix string = ",\"userHandle\":"
- out.RawString(prefix)
- out.String(string(in.UserHandle))
- }
- {
- const prefix string = ",\"signCount\":"
- out.RawString(prefix)
- out.Int64(int64(in.SignCount))
- }
- if in.LargeBlob != "" {
- const prefix string = ",\"largeBlob\":"
- out.RawString(prefix)
- out.String(string(in.LargeBlob))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v Credential) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v Credential) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *Credential) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *Credential) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(in *jlexer.Lexer, out *ClearCredentialsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(out *jwriter.Writer, in ClearCredentialsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v ClearCredentialsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v ClearCredentialsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *ClearCredentialsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *ClearCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(in *jlexer.Lexer, out *AddVirtualAuthenticatorReturns) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(out *jwriter.Writer, in AddVirtualAuthenticatorReturns) {
- out.RawByte('{')
- first := true
- _ = first
- if in.AuthenticatorID != "" {
- const prefix string = ",\"authenticatorId\":"
- first = false
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddVirtualAuthenticatorReturns) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddVirtualAuthenticatorReturns) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddVirtualAuthenticatorReturns) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddVirtualAuthenticatorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(in *jlexer.Lexer, out *AddVirtualAuthenticatorParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "options":
- if in.IsNull() {
- in.Skip()
- out.Options = nil
- } else {
- if out.Options == nil {
- out.Options = new(VirtualAuthenticatorOptions)
- }
- (*out.Options).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(out *jwriter.Writer, in AddVirtualAuthenticatorParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"options\":"
- out.RawString(prefix[1:])
- if in.Options == nil {
- out.RawString("null")
- } else {
- (*in.Options).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddVirtualAuthenticatorParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(l, v)
-}
-func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(in *jlexer.Lexer, out *AddCredentialParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "authenticatorId":
- out.AuthenticatorID = AuthenticatorID(in.String())
- case "credential":
- if in.IsNull() {
- in.Skip()
- out.Credential = nil
- } else {
- if out.Credential == nil {
- out.Credential = new(Credential)
- }
- (*out.Credential).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
-}
-func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(out *jwriter.Writer, in AddCredentialParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"authenticatorId\":"
- out.RawString(prefix[1:])
- out.String(string(in.AuthenticatorID))
- }
- {
- const prefix string = ",\"credential\":"
- out.RawString(prefix)
- if in.Credential == nil {
- out.RawString("null")
- } else {
- (*in.Credential).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
-}
-
-// MarshalJSON supports json.Marshaler interface
-func (v AddCredentialParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(&w, v)
- return w.Buffer.BuildBytes(), w.Error
-}
-
-// MarshalEasyJSON supports easyjson.Marshaler interface
-func (v AddCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(w, v)
-}
-
-// UnmarshalJSON supports json.Unmarshaler interface
-func (v *AddCredentialParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(&r, v)
- return r.Error()
-}
-
-// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
-func (v *AddCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(l, v)
-}
diff --git a/vendor/github.com/chromedp/cdproto/webauthn/types.go b/vendor/github.com/chromedp/cdproto/webauthn/types.go
deleted file mode 100644
index ee1ed9f8180..00000000000
--- a/vendor/github.com/chromedp/cdproto/webauthn/types.go
+++ /dev/null
@@ -1,190 +0,0 @@
-package webauthn
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "errors"
-
- "github.com/mailru/easyjson"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-)
-
-// AuthenticatorID [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorId
-type AuthenticatorID string
-
-// String returns the AuthenticatorID as string value.
-func (t AuthenticatorID) String() string {
- return string(t)
-}
-
-// AuthenticatorProtocol [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorProtocol
-type AuthenticatorProtocol string
-
-// String returns the AuthenticatorProtocol as string value.
-func (t AuthenticatorProtocol) String() string {
- return string(t)
-}
-
-// AuthenticatorProtocol values.
-const (
- AuthenticatorProtocolU2f AuthenticatorProtocol = "u2f"
- AuthenticatorProtocolCtap2 AuthenticatorProtocol = "ctap2"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthenticatorProtocol) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthenticatorProtocol) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthenticatorProtocol) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthenticatorProtocol(in.String()) {
- case AuthenticatorProtocolU2f:
- *t = AuthenticatorProtocolU2f
- case AuthenticatorProtocolCtap2:
- *t = AuthenticatorProtocolCtap2
-
- default:
- in.AddError(errors.New("unknown AuthenticatorProtocol value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthenticatorProtocol) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// Ctap2version [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-Ctap2Version
-type Ctap2version string
-
-// String returns the Ctap2version as string value.
-func (t Ctap2version) String() string {
- return string(t)
-}
-
-// Ctap2version values.
-const (
- Ctap2versionCtap20 Ctap2version = "ctap2_0"
- Ctap2versionCtap21 Ctap2version = "ctap2_1"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t Ctap2version) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t Ctap2version) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *Ctap2version) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch Ctap2version(in.String()) {
- case Ctap2versionCtap20:
- *t = Ctap2versionCtap20
- case Ctap2versionCtap21:
- *t = Ctap2versionCtap21
-
- default:
- in.AddError(errors.New("unknown Ctap2version value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *Ctap2version) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// AuthenticatorTransport [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-AuthenticatorTransport
-type AuthenticatorTransport string
-
-// String returns the AuthenticatorTransport as string value.
-func (t AuthenticatorTransport) String() string {
- return string(t)
-}
-
-// AuthenticatorTransport values.
-const (
- AuthenticatorTransportUsb AuthenticatorTransport = "usb"
- AuthenticatorTransportNfc AuthenticatorTransport = "nfc"
- AuthenticatorTransportBle AuthenticatorTransport = "ble"
- AuthenticatorTransportCable AuthenticatorTransport = "cable"
- AuthenticatorTransportInternal AuthenticatorTransport = "internal"
-)
-
-// MarshalEasyJSON satisfies easyjson.Marshaler.
-func (t AuthenticatorTransport) MarshalEasyJSON(out *jwriter.Writer) {
- out.String(string(t))
-}
-
-// MarshalJSON satisfies json.Marshaler.
-func (t AuthenticatorTransport) MarshalJSON() ([]byte, error) {
- return easyjson.Marshal(t)
-}
-
-// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
-func (t *AuthenticatorTransport) UnmarshalEasyJSON(in *jlexer.Lexer) {
- switch AuthenticatorTransport(in.String()) {
- case AuthenticatorTransportUsb:
- *t = AuthenticatorTransportUsb
- case AuthenticatorTransportNfc:
- *t = AuthenticatorTransportNfc
- case AuthenticatorTransportBle:
- *t = AuthenticatorTransportBle
- case AuthenticatorTransportCable:
- *t = AuthenticatorTransportCable
- case AuthenticatorTransportInternal:
- *t = AuthenticatorTransportInternal
-
- default:
- in.AddError(errors.New("unknown AuthenticatorTransport value"))
- }
-}
-
-// UnmarshalJSON satisfies json.Unmarshaler.
-func (t *AuthenticatorTransport) UnmarshalJSON(buf []byte) error {
- return easyjson.Unmarshal(buf, t)
-}
-
-// VirtualAuthenticatorOptions [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-VirtualAuthenticatorOptions
-type VirtualAuthenticatorOptions struct {
- Protocol AuthenticatorProtocol `json:"protocol"`
- Ctap2version Ctap2version `json:"ctap2Version,omitempty"` // Defaults to ctap2_0. Ignored if |protocol| == u2f.
- Transport AuthenticatorTransport `json:"transport"`
- HasResidentKey bool `json:"hasResidentKey,omitempty"` // Defaults to false.
- HasUserVerification bool `json:"hasUserVerification,omitempty"` // Defaults to false.
- HasLargeBlob bool `json:"hasLargeBlob,omitempty"` // If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.
- HasCredBlob bool `json:"hasCredBlob,omitempty"` // If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.
- AutomaticPresenceSimulation bool `json:"automaticPresenceSimulation,omitempty"` // If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.
- IsUserVerified bool `json:"isUserVerified,omitempty"` // Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.
-}
-
-// Credential [no description].
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#type-Credential
-type Credential struct {
- CredentialID string `json:"credentialId"`
- IsResidentCredential bool `json:"isResidentCredential"`
- RpID string `json:"rpId,omitempty"` // Relying Party ID the credential is scoped to. Must be set when adding a credential.
- PrivateKey string `json:"privateKey"` // The ECDSA P-256 private key in PKCS#8 format.
- UserHandle string `json:"userHandle,omitempty"` // An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.
- SignCount int64 `json:"signCount"` // Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
- LargeBlob string `json:"largeBlob,omitempty"` // The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension
-}
diff --git a/vendor/github.com/chromedp/cdproto/webauthn/webauthn.go b/vendor/github.com/chromedp/cdproto/webauthn/webauthn.go
deleted file mode 100644
index 7da9d3bc7e5..00000000000
--- a/vendor/github.com/chromedp/cdproto/webauthn/webauthn.go
+++ /dev/null
@@ -1,332 +0,0 @@
-// Package webauthn provides the Chrome DevTools Protocol
-// commands, types, and events for the WebAuthn domain.
-//
-// This domain allows configuring virtual authenticators to test the WebAuthn
-// API.
-//
-// Generated by the cdproto-gen command.
-package webauthn
-
-// Code generated by cdproto-gen. DO NOT EDIT.
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-// EnableParams enable the WebAuthn domain and start intercepting credential
-// storage and retrieval with a virtual authenticator.
-type EnableParams struct{}
-
-// Enable enable the WebAuthn domain and start intercepting credential
-// storage and retrieval with a virtual authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-enable
-func Enable() *EnableParams {
- return &EnableParams{}
-}
-
-// Do executes WebAuthn.enable against the provided context.
-func (p *EnableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandEnable, nil, nil)
-}
-
-// DisableParams disable the WebAuthn domain.
-type DisableParams struct{}
-
-// Disable disable the WebAuthn domain.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-disable
-func Disable() *DisableParams {
- return &DisableParams{}
-}
-
-// Do executes WebAuthn.disable against the provided context.
-func (p *DisableParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandDisable, nil, nil)
-}
-
-// AddVirtualAuthenticatorParams creates and adds a virtual authenticator.
-type AddVirtualAuthenticatorParams struct {
- Options *VirtualAuthenticatorOptions `json:"options"`
-}
-
-// AddVirtualAuthenticator creates and adds a virtual authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addVirtualAuthenticator
-//
-// parameters:
-// options
-func AddVirtualAuthenticator(options *VirtualAuthenticatorOptions) *AddVirtualAuthenticatorParams {
- return &AddVirtualAuthenticatorParams{
- Options: options,
- }
-}
-
-// AddVirtualAuthenticatorReturns return values.
-type AddVirtualAuthenticatorReturns struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId,omitempty"`
-}
-
-// Do executes WebAuthn.addVirtualAuthenticator against the provided context.
-//
-// returns:
-// authenticatorID
-func (p *AddVirtualAuthenticatorParams) Do(ctx context.Context) (authenticatorID AuthenticatorID, err error) {
- // execute
- var res AddVirtualAuthenticatorReturns
- err = cdp.Execute(ctx, CommandAddVirtualAuthenticator, p, &res)
- if err != nil {
- return "", err
- }
-
- return res.AuthenticatorID, nil
-}
-
-// RemoveVirtualAuthenticatorParams removes the given authenticator.
-type RemoveVirtualAuthenticatorParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
-}
-
-// RemoveVirtualAuthenticator removes the given authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeVirtualAuthenticator
-//
-// parameters:
-// authenticatorID
-func RemoveVirtualAuthenticator(authenticatorID AuthenticatorID) *RemoveVirtualAuthenticatorParams {
- return &RemoveVirtualAuthenticatorParams{
- AuthenticatorID: authenticatorID,
- }
-}
-
-// Do executes WebAuthn.removeVirtualAuthenticator against the provided context.
-func (p *RemoveVirtualAuthenticatorParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveVirtualAuthenticator, p, nil)
-}
-
-// AddCredentialParams adds the credential to the specified authenticator.
-type AddCredentialParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
- Credential *Credential `json:"credential"`
-}
-
-// AddCredential adds the credential to the specified authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-addCredential
-//
-// parameters:
-// authenticatorID
-// credential
-func AddCredential(authenticatorID AuthenticatorID, credential *Credential) *AddCredentialParams {
- return &AddCredentialParams{
- AuthenticatorID: authenticatorID,
- Credential: credential,
- }
-}
-
-// Do executes WebAuthn.addCredential against the provided context.
-func (p *AddCredentialParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandAddCredential, p, nil)
-}
-
-// GetCredentialParams returns a single credential stored in the given
-// virtual authenticator that matches the credential ID.
-type GetCredentialParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
- CredentialID string `json:"credentialId"`
-}
-
-// GetCredential returns a single credential stored in the given virtual
-// authenticator that matches the credential ID.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredential
-//
-// parameters:
-// authenticatorID
-// credentialID
-func GetCredential(authenticatorID AuthenticatorID, credentialID string) *GetCredentialParams {
- return &GetCredentialParams{
- AuthenticatorID: authenticatorID,
- CredentialID: credentialID,
- }
-}
-
-// GetCredentialReturns return values.
-type GetCredentialReturns struct {
- Credential *Credential `json:"credential,omitempty"`
-}
-
-// Do executes WebAuthn.getCredential against the provided context.
-//
-// returns:
-// credential
-func (p *GetCredentialParams) Do(ctx context.Context) (credential *Credential, err error) {
- // execute
- var res GetCredentialReturns
- err = cdp.Execute(ctx, CommandGetCredential, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Credential, nil
-}
-
-// GetCredentialsParams returns all the credentials stored in the given
-// virtual authenticator.
-type GetCredentialsParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
-}
-
-// GetCredentials returns all the credentials stored in the given virtual
-// authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-getCredentials
-//
-// parameters:
-// authenticatorID
-func GetCredentials(authenticatorID AuthenticatorID) *GetCredentialsParams {
- return &GetCredentialsParams{
- AuthenticatorID: authenticatorID,
- }
-}
-
-// GetCredentialsReturns return values.
-type GetCredentialsReturns struct {
- Credentials []*Credential `json:"credentials,omitempty"`
-}
-
-// Do executes WebAuthn.getCredentials against the provided context.
-//
-// returns:
-// credentials
-func (p *GetCredentialsParams) Do(ctx context.Context) (credentials []*Credential, err error) {
- // execute
- var res GetCredentialsReturns
- err = cdp.Execute(ctx, CommandGetCredentials, p, &res)
- if err != nil {
- return nil, err
- }
-
- return res.Credentials, nil
-}
-
-// RemoveCredentialParams removes a credential from the authenticator.
-type RemoveCredentialParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
- CredentialID string `json:"credentialId"`
-}
-
-// RemoveCredential removes a credential from the authenticator.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-removeCredential
-//
-// parameters:
-// authenticatorID
-// credentialID
-func RemoveCredential(authenticatorID AuthenticatorID, credentialID string) *RemoveCredentialParams {
- return &RemoveCredentialParams{
- AuthenticatorID: authenticatorID,
- CredentialID: credentialID,
- }
-}
-
-// Do executes WebAuthn.removeCredential against the provided context.
-func (p *RemoveCredentialParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandRemoveCredential, p, nil)
-}
-
-// ClearCredentialsParams clears all the credentials from the specified
-// device.
-type ClearCredentialsParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
-}
-
-// ClearCredentials clears all the credentials from the specified device.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-clearCredentials
-//
-// parameters:
-// authenticatorID
-func ClearCredentials(authenticatorID AuthenticatorID) *ClearCredentialsParams {
- return &ClearCredentialsParams{
- AuthenticatorID: authenticatorID,
- }
-}
-
-// Do executes WebAuthn.clearCredentials against the provided context.
-func (p *ClearCredentialsParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandClearCredentials, p, nil)
-}
-
-// SetUserVerifiedParams sets whether User Verification succeeds or fails for
-// an authenticator. The default is true.
-type SetUserVerifiedParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
- IsUserVerified bool `json:"isUserVerified"`
-}
-
-// SetUserVerified sets whether User Verification succeeds or fails for an
-// authenticator. The default is true.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setUserVerified
-//
-// parameters:
-// authenticatorID
-// isUserVerified
-func SetUserVerified(authenticatorID AuthenticatorID, isUserVerified bool) *SetUserVerifiedParams {
- return &SetUserVerifiedParams{
- AuthenticatorID: authenticatorID,
- IsUserVerified: isUserVerified,
- }
-}
-
-// Do executes WebAuthn.setUserVerified against the provided context.
-func (p *SetUserVerifiedParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetUserVerified, p, nil)
-}
-
-// SetAutomaticPresenceSimulationParams sets whether tests of user presence
-// will succeed immediately (if true) or fail to resolve (if false) for an
-// authenticator. The default is true.
-type SetAutomaticPresenceSimulationParams struct {
- AuthenticatorID AuthenticatorID `json:"authenticatorId"`
- Enabled bool `json:"enabled"`
-}
-
-// SetAutomaticPresenceSimulation sets whether tests of user presence will
-// succeed immediately (if true) or fail to resolve (if false) for an
-// authenticator. The default is true.
-//
-// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setAutomaticPresenceSimulation
-//
-// parameters:
-// authenticatorID
-// enabled
-func SetAutomaticPresenceSimulation(authenticatorID AuthenticatorID, enabled bool) *SetAutomaticPresenceSimulationParams {
- return &SetAutomaticPresenceSimulationParams{
- AuthenticatorID: authenticatorID,
- Enabled: enabled,
- }
-}
-
-// Do executes WebAuthn.setAutomaticPresenceSimulation against the provided context.
-func (p *SetAutomaticPresenceSimulationParams) Do(ctx context.Context) (err error) {
- return cdp.Execute(ctx, CommandSetAutomaticPresenceSimulation, p, nil)
-}
-
-// Command names.
-const (
- CommandEnable = "WebAuthn.enable"
- CommandDisable = "WebAuthn.disable"
- CommandAddVirtualAuthenticator = "WebAuthn.addVirtualAuthenticator"
- CommandRemoveVirtualAuthenticator = "WebAuthn.removeVirtualAuthenticator"
- CommandAddCredential = "WebAuthn.addCredential"
- CommandGetCredential = "WebAuthn.getCredential"
- CommandGetCredentials = "WebAuthn.getCredentials"
- CommandRemoveCredential = "WebAuthn.removeCredential"
- CommandClearCredentials = "WebAuthn.clearCredentials"
- CommandSetUserVerified = "WebAuthn.setUserVerified"
- CommandSetAutomaticPresenceSimulation = "WebAuthn.setAutomaticPresenceSimulation"
-)
diff --git a/vendor/github.com/chromedp/chromedp/.gitignore b/vendor/github.com/chromedp/chromedp/.gitignore
deleted file mode 100644
index b4ed1b4bcc1..00000000000
--- a/vendor/github.com/chromedp/chromedp/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-out.txt
-out*.txt
-old*.txt
-cdp-*.log
-cdp-*.txt
-*.out
-
-/chromedp.test
-/chromedp.test.exe
-
-/*.png
-/*.pdf
diff --git a/vendor/github.com/chromedp/chromedp/LICENSE b/vendor/github.com/chromedp/chromedp/LICENSE
deleted file mode 100644
index 0b5be741bd5..00000000000
--- a/vendor/github.com/chromedp/chromedp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016-2020 Kenneth Shaw
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/chromedp/chromedp/README.md b/vendor/github.com/chromedp/chromedp/README.md
deleted file mode 100644
index d1f6fb061b7..00000000000
--- a/vendor/github.com/chromedp/chromedp/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# About chromedp
-
-Package `chromedp` is a faster, simpler way to drive browsers supporting the
-[Chrome DevTools Protocol][devtools-protocol] in Go without external dependencies.
-
-[![Unit Tests][chromedp-ci-status]][chromedp-ci]
-[![Go Reference][goref-chromedp-status]][goref-chromedp]
-
-## Installing
-
-Install in the usual Go way:
-
-```sh
-$ go get -u github.com/chromedp/chromedp
-```
-
-## Examples
-
-Refer to the [Go reference][goref-chromedp] for the documentation and examples.
-Additionally, the [examples][chromedp-examples] repository contains more
-examples on complex actions, and other common high-level tasks such as taking
-full page screenshots.
-
-## Frequently Asked Questions
-
-> I can't see any Chrome browser window
-
-By default, Chrome is run in headless mode. See `DefaultExecAllocatorOptions`, and
-[an example][goref-chromedp-exec-allocator] to override the default options.
-
-> I'm seeing "context canceled" errors
-
-When the connection to the browser is lost, `chromedp` cancels the context, and
-it may result in this error. This occurs, for example, if the browser is closed
-manually, or if the browser process has been killed or otherwise terminated.
-
-> Chrome exits as soon as my Go program finishes
-
-On Linux, `chromedp` is configured to avoid leaking resources by force-killing
-any started Chrome child processes. If you need to launch a long-running Chrome
-instance, manually start Chrome and connect using `RemoteAllocator`.
-
-> Executing an action without `Run` results in "invalid context"
-
-By default, a `chromedp` context does not have an executor, however one can be
-specified manually if necessary; see [issue #326][github-326]
-for an example.
-
-> I can't use an `Action` with `Run` because it returns many values
-
-Wrap it with an `ActionFunc`:
-
-```go
-ctx, cancel := chromedp.NewContext()
-defer cancel()
-chromedp.Run(ctx, chromedp.ActionFunc(func(ctx context.Context) error {
- _, err := domain.SomeAction().Do(ctx)
- return err
-}))
-```
-
-> I want to use chromedp on a headless environment
-
-The simplest way is to run the Go program that uses chromedp inside the
-[chromedp/headless-shell][docker-headless-shell] image. That image contains
-`headless-shell`, a smaller headless build of Chrome, which `chromedp` is able
-to find out of the box.
-
-## Resources
-
-* [`headless-shell`][docker-headless-shell] - A build of `headless-shell` that is used for testing `chromedp`
-* [chromedp: A New Way to Drive the Web][gophercon-2017-presentation] - GopherCon SG 2017 talk
-* [Chrome DevTools Protocol][devtools-protocol] - Chrome DevTools Protocol reference
-* [chromedp examples][chromedp-examples] - More complicated examples for `chromedp`
-* [`github.com/chromedp/cdproto`][goref-cdproto] - Go reference for the generated Chrome DevTools Protocol API
-* [`github.com/chromedp/pdlgen`][chromedp-pdlgen] - tool used to generate `cdproto`
-* [`github.com/chromedp/chromedp-proxy`][chromedp-proxy] - a simple CDP proxy for logging CDP clients and browsers
-
-[chromedp-ci]: https://github.com/chromedp/chromedp/actions/workflows/test.yml (Test CI)
-[chromedp-ci-status]: https://github.com/chromedp/chromedp/actions/workflows/test.yml/badge.svg (Test CI)
-[chromedp-examples]: https://github.com/chromedp/examples
-[chromedp-pdlgen]: https://github.com/chromedp/pdlgen
-[chromedp-proxy]: https://github.com/chromedp/chromedp-proxy
-[devtools-protocol]: https://chromedevtools.github.io/devtools-protocol/
-[docker-headless-shell]: https://hub.docker.com/r/chromedp/headless-shell/
-[github-326]: https://github.com/chromedp/chromedp/issues/326
-[gophercon-2017-presentation]: https://www.youtube.com/watch?v=_7pWCg94sKw
-[goref-cdproto]: https://pkg.go.dev/github.com/chromedp/cdproto
-[goref-chromedp-exec-allocator]: https://pkg.go.dev/github.com/chromedp/chromedp#example-ExecAllocator
-[goref-chromedp]: https://pkg.go.dev/github.com/chromedp/chromedp
-[goref-chromedp-status]: https://pkg.go.dev/badge/github.com/chromedp/chromedp.svg
diff --git a/vendor/github.com/chromedp/chromedp/allocate.go b/vendor/github.com/chromedp/chromedp/allocate.go
deleted file mode 100644
index 2c9d736577f..00000000000
--- a/vendor/github.com/chromedp/chromedp/allocate.go
+++ /dev/null
@@ -1,547 +0,0 @@
-package chromedp
-
-import (
- "bufio"
- "bytes"
- "context"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "sync"
- "time"
-)
-
-// An Allocator is responsible for creating and managing a number of browsers.
-//
-// This interface abstracts away how the browser process is actually run. For
-// example, an Allocator implementation may reuse browser processes, or connect
-// to already-running browsers on remote machines.
-type Allocator interface {
- // Allocate creates a new browser. It can be cancelled via the provided
- // context, at which point all the resources used by the browser (such
- // as temporary directories) will be freed.
- Allocate(context.Context, ...BrowserOption) (*Browser, error)
-
- // Wait blocks until an allocator has freed all of its resources.
- // Cancelling the allocator context will already perform this operation,
- // so normally there's no need to call Wait directly.
- Wait()
-}
-
-// setupExecAllocator is similar to NewExecAllocator, but it allows NewContext
-// to create the allocator without the unnecessary context layer.
-func setupExecAllocator(opts ...ExecAllocatorOption) *ExecAllocator {
- ep := &ExecAllocator{
- initFlags: make(map[string]interface{}),
- }
- for _, o := range opts {
- o(ep)
- }
- if ep.execPath == "" {
- ep.execPath = findExecPath()
- }
- return ep
-}
-
-// DefaultExecAllocatorOptions are the ExecAllocator options used by NewContext
-// if the given parent context doesn't have an allocator set up. Do not modify
-// this global; instead, use NewExecAllocator. See ExampleExecAllocator.
-var DefaultExecAllocatorOptions = [...]ExecAllocatorOption{
- NoFirstRun,
- NoDefaultBrowserCheck,
- Headless,
-
- // After Puppeteer's default behavior.
- Flag("disable-background-networking", true),
- Flag("enable-features", "NetworkService,NetworkServiceInProcess"),
- Flag("disable-background-timer-throttling", true),
- Flag("disable-backgrounding-occluded-windows", true),
- Flag("disable-breakpad", true),
- Flag("disable-client-side-phishing-detection", true),
- Flag("disable-default-apps", true),
- Flag("disable-dev-shm-usage", true),
- Flag("disable-extensions", true),
- Flag("disable-features", "site-per-process,Translate,BlinkGenPropertyTrees"),
- Flag("disable-hang-monitor", true),
- Flag("disable-ipc-flooding-protection", true),
- Flag("disable-popup-blocking", true),
- Flag("disable-prompt-on-repost", true),
- Flag("disable-renderer-backgrounding", true),
- Flag("disable-sync", true),
- Flag("force-color-profile", "srgb"),
- Flag("metrics-recording-only", true),
- Flag("safebrowsing-disable-auto-update", true),
- Flag("enable-automation", true),
- Flag("password-store", "basic"),
- Flag("use-mock-keychain", true),
-}
-
-// NewExecAllocator creates a new context set up with an ExecAllocator, suitable
-// for use with NewContext.
-func NewExecAllocator(parent context.Context, opts ...ExecAllocatorOption) (context.Context, context.CancelFunc) {
- ctx, cancel := context.WithCancel(parent)
- c := &Context{Allocator: setupExecAllocator(opts...)}
-
- ctx = context.WithValue(ctx, contextKey{}, c)
- cancelWait := func() {
- cancel()
- c.Allocator.Wait()
- }
- return ctx, cancelWait
-}
-
-// ExecAllocatorOption is a exec allocator option.
-type ExecAllocatorOption = func(*ExecAllocator)
-
-// ExecAllocator is an Allocator which starts new browser processes on the host
-// machine.
-type ExecAllocator struct {
- execPath string
- initFlags map[string]interface{}
- initEnv []string
-
- wg sync.WaitGroup
-
- combinedOutputWriter io.Writer
-
- modifyCmdFunc func(cmd *exec.Cmd)
-}
-
-// allocTempDir is used to group all ExecAllocator temporary user data dirs in
-// the same location, useful for the tests. If left empty, the system's default
-// temporary directory is used.
-var allocTempDir string
-
-// Allocate satisfies the Allocator interface.
-func (a *ExecAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (*Browser, error) {
- c := FromContext(ctx)
- if c == nil {
- return nil, ErrInvalidContext
- }
-
- var args []string
- for name, value := range a.initFlags {
- switch value := value.(type) {
- case string:
- args = append(args, fmt.Sprintf("--%s=%s", name, value))
- case bool:
- if value {
- args = append(args, fmt.Sprintf("--%s", name))
- }
- default:
- return nil, fmt.Errorf("invalid exec pool flag")
- }
- }
-
- removeDir := false
- dataDir, ok := a.initFlags["user-data-dir"].(string)
- if !ok {
- tempDir, err := ioutil.TempDir(allocTempDir, "chromedp-runner")
- if err != nil {
- return nil, err
- }
- args = append(args, "--user-data-dir="+tempDir)
- dataDir = tempDir
- removeDir = true
- }
- if _, ok := a.initFlags["no-sandbox"]; !ok && os.Getuid() == 0 {
- // Running as root, for example in a Linux container. Chrome
- // needs --no-sandbox when running as root, so make that the
- // default, unless the user set Flag("no-sandbox", false).
- args = append(args, "--no-sandbox")
- }
- if _, ok := a.initFlags["remote-debugging-port"]; !ok {
- args = append(args, "--remote-debugging-port=0")
- }
-
- // Force the first page to be blank, instead of the welcome page;
- // --no-first-run doesn't enforce that.
- args = append(args, "about:blank")
-
- cmd := exec.CommandContext(ctx, a.execPath, args...)
- defer func() {
- if removeDir && cmd.Process == nil {
- // We couldn't start the process, so we didn't get to
- // the goroutine that handles RemoveAll below. Remove it
- // to not leave an empty directory.
- os.RemoveAll(dataDir)
- }
- }()
-
- if a.modifyCmdFunc != nil {
- a.modifyCmdFunc(cmd)
- } else {
- allocateCmdOptions(cmd)
- }
-
- stdout, err := cmd.StdoutPipe()
- if err != nil {
- return nil, err
- }
- cmd.Stderr = cmd.Stdout
-
- // Preserve environment variables set in the (lowest priority) existing
- // environment, OverrideCmdFunc(), and Env (highest priority)
- if len(a.initEnv) > 0 || len(cmd.Env) > 0 {
- cmd.Env = append(os.Environ(), cmd.Env...)
- cmd.Env = append(cmd.Env, a.initEnv...)
- }
-
- // We must start the cmd before calling cmd.Wait, as otherwise the two
- // can run into a data race.
- if err := cmd.Start(); err != nil {
- return nil, err
- }
-
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case <-c.allocated: // for this browser's root context
- }
- a.wg.Add(1) // for the entire allocator
- if a.combinedOutputWriter != nil {
- a.wg.Add(1) // for the io.Copy in a separate goroutine
- }
- go func() {
- // First wait for the process to be finished.
- // TODO: do we care about this error in any scenario? if the
- // user cancelled the context and killed chrome, this will most
- // likely just be "signal: killed", which isn't interesting.
- cmd.Wait()
-
- // Then delete the temporary user data directory, if needed.
- if removeDir {
- if err := os.RemoveAll(dataDir); c.cancelErr == nil {
- c.cancelErr = err
- }
- }
- a.wg.Done()
- close(c.allocated)
- }()
-
- // Chrome will sometimes fail to print the websocket, or run for a long
- // time, without properly exiting. To avoid blocking forever in those
- // cases, give up after twenty seconds.
- const wsURLReadTimeout = 20 * time.Second
-
- var wsURL string
- wsURLChan := make(chan struct{}, 1)
- go func() {
- wsURL, err = readOutput(stdout, a.combinedOutputWriter, a.wg.Done)
- wsURLChan <- struct{}{}
- }()
- select {
- case <-wsURLChan:
- case <-time.After(wsURLReadTimeout):
- err = errors.New("websocket url timeout reached")
- }
- if err != nil {
- if a.combinedOutputWriter != nil {
- // There's no io.Copy goroutine to call the done func.
- // TODO: a cleaner way to deal with this edge case?
- a.wg.Done()
- }
- return nil, err
- }
-
- browser, err := NewBrowser(ctx, wsURL, opts...)
- if err != nil {
- return nil, err
- }
- go func() {
- // If the browser loses connection, kill the entire process and
- // handler at once. Don't use Cancel, as that will attempt to
- // gracefully close the browser, which will hang.
- // Don't cancel if we're in the middle of a graceful Close,
- // since we want to let Chrome shut itself when it is fully
- // finished.
- <-browser.LostConnection
- select {
- case <-browser.closingGracefully:
- default:
- c.cancel()
- }
- }()
- browser.process = cmd.Process
- browser.userDataDir = dataDir
- return browser, nil
-}
-
-// readOutput grabs the websocket address from chrome's output, returning as
-// soon as it is found. All read output is forwarded to forward, if non-nil.
-// done is used to signal that the asynchronous io.Copy is done, if any.
-func readOutput(rc io.ReadCloser, forward io.Writer, done func()) (wsURL string, _ error) {
- prefix := []byte("DevTools listening on")
- var accumulated bytes.Buffer
- bufr := bufio.NewReader(rc)
-readLoop:
- for {
- line, err := bufr.ReadBytes('\n')
- if err != nil {
- return "", fmt.Errorf("chrome failed to start:\n%s",
- accumulated.Bytes())
- }
- if forward != nil {
- if _, err := forward.Write(line); err != nil {
- return "", err
- }
- }
-
- if bytes.HasPrefix(line, prefix) {
- line = line[len(prefix):]
- // use TrimSpace, to also remove \r on Windows
- line = bytes.TrimSpace(line)
- wsURL = string(line)
- break readLoop
- }
- accumulated.Write(line)
- }
- if forward == nil {
- // We don't need the process's output anymore.
- rc.Close()
- } else {
- // Copy the rest of the output in a separate goroutine, as we
- // need to return with the websocket URL.
- go func() {
- io.Copy(forward, bufr)
- done()
- }()
- }
- return wsURL, nil
-}
-
-// Wait satisfies the Allocator interface.
-func (a *ExecAllocator) Wait() {
- a.wg.Wait()
-}
-
-// ExecPath returns an ExecAllocatorOption which uses the given path to execute
-// browser processes. The given path can be an absolute path to a binary, or
-// just the name of the program to find via exec.LookPath.
-func ExecPath(path string) ExecAllocatorOption {
- return func(a *ExecAllocator) {
- // Convert to an absolute path if possible, to avoid
- // repeated LookPath calls in each Allocate.
- if fullPath, _ := exec.LookPath(path); fullPath != "" {
- a.execPath = fullPath
- } else {
- a.execPath = path
- }
- }
-}
-
-// findExecPath tries to find the Chrome browser somewhere in the current
-// system. It finds in different locations on different OS systems.
-// It could perform a rather aggressive search. That may make it a bit slow,
-// but it will only be run when creating a new ExecAllocator.
-func findExecPath() string {
- var locations []string
- switch runtime.GOOS {
- case "darwin":
- locations = []string{
- // Mac
- "/Applications/Chromium.app/Contents/MacOS/Chromium",
- "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
- }
- case "windows":
- locations = []string{
- // Windows
- "chrome",
- "chrome.exe", // in case PATHEXT is misconfigured
- `C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`,
- `C:\Program Files\Google\Chrome\Application\chrome.exe`,
- filepath.Join(os.Getenv("USERPROFILE"), `AppData\Local\Google\Chrome\Application\chrome.exe`),
- }
- default:
- locations = []string{
- // Unix-like
- "headless_shell",
- "headless-shell",
- "chromium",
- "chromium-browser",
- "google-chrome",
- "google-chrome-stable",
- "google-chrome-beta",
- "google-chrome-unstable",
- "/usr/bin/google-chrome",
- }
- }
-
- for _, path := range locations {
- found, err := exec.LookPath(path)
- if err == nil {
- return found
- }
- }
- // Fall back to something simple and sensible, to give a useful error
- // message.
- return "google-chrome"
-}
-
-// Flag is a generic command line option to pass a flag to Chrome. If the value
-// is a string, it will be passed as --name=value. If it's a boolean, it will be
-// passed as --name if value is true.
-func Flag(name string, value interface{}) ExecAllocatorOption {
- return func(a *ExecAllocator) {
- a.initFlags[name] = value
- }
-}
-
-// Env is a list of generic environment variables in the form NAME=value
-// to pass into the new Chrome process. These will be appended to the
-// environment of the golang process as retrieved by os.Environ.
-func Env(vars ...string) ExecAllocatorOption {
- return func(a *ExecAllocator) {
- a.initEnv = append(a.initEnv, vars...)
- }
-}
-
-// ModifyCmdFunc allows for running an arbitrary function on the
-// browser exec.Cmd object. This overrides the default version
-// of the command which sends SIGKILL to any open browsers when
-// the Go program exits.
-func ModifyCmdFunc(f func(cmd *exec.Cmd)) ExecAllocatorOption {
- return func(a *ExecAllocator) {
- a.modifyCmdFunc = f
- }
-}
-
-// UserDataDir is the command line option to set the user data dir.
-//
-// Note: set this option to manually set the profile directory used by Chrome.
-// When this is not set, then a default path will be created in the /tmp
-// directory.
-func UserDataDir(dir string) ExecAllocatorOption {
- return Flag("user-data-dir", dir)
-}
-
-// ProxyServer is the command line option to set the outbound proxy server.
-func ProxyServer(proxy string) ExecAllocatorOption {
- return Flag("proxy-server", proxy)
-}
-
-// WindowSize is the command line option to set the initial window size.
-func WindowSize(width, height int) ExecAllocatorOption {
- return Flag("window-size", fmt.Sprintf("%d,%d", width, height))
-}
-
-// UserAgent is the command line option to set the default User-Agent
-// header.
-func UserAgent(userAgent string) ExecAllocatorOption {
- return Flag("user-agent", userAgent)
-}
-
-// NoSandbox is the Chrome comamnd line option to disable the sandbox.
-func NoSandbox(a *ExecAllocator) {
- Flag("no-sandbox", true)(a)
-}
-
-// NoFirstRun is the Chrome comamnd line option to disable the first run
-// dialog.
-func NoFirstRun(a *ExecAllocator) {
- Flag("no-first-run", true)(a)
-}
-
-// NoDefaultBrowserCheck is the Chrome comamnd line option to disable the
-// default browser check.
-func NoDefaultBrowserCheck(a *ExecAllocator) {
- Flag("no-default-browser-check", true)(a)
-}
-
-// Headless is the command line option to run in headless mode. On top of
-// setting the headless flag, it also hides scrollbars and mutes audio.
-func Headless(a *ExecAllocator) {
- Flag("headless", true)(a)
- // Like in Puppeteer.
- Flag("hide-scrollbars", true)(a)
- Flag("mute-audio", true)(a)
-}
-
-// DisableGPU is the command line option to disable the GPU process.
-func DisableGPU(a *ExecAllocator) {
- Flag("disable-gpu", true)(a)
-}
-
-// CombinedOutput is used to set an io.Writer where stdout and stderr
-// from the browser will be sent
-func CombinedOutput(w io.Writer) ExecAllocatorOption {
- return func(a *ExecAllocator) {
- a.combinedOutputWriter = w
- }
-}
-
-// NewRemoteAllocator creates a new context set up with a RemoteAllocator,
-// suitable for use with NewContext. The url should point to the browser's
-// websocket address, such as "ws://127.0.0.1:$PORT/devtools/browser/...".
-// If the url does not contain "/devtools/browser/", it will try to detect
-// the correct one by sending a request to "http://$HOST:$PORT/json/version".
-//
-// The url with the following formats are accepted:
-// * ws://127.0.0.1:9222/
-// * http://127.0.0.1:9222/
-//
-// But "ws://127.0.0.1:9222/devtools/browser/" are not accepted.
-// Because it contains "/devtools/browser/" and will be considered
-// as a valid websocket debugger URL.
-func NewRemoteAllocator(parent context.Context, url string) (context.Context, context.CancelFunc) {
- ctx, cancel := context.WithCancel(parent)
- c := &Context{Allocator: &RemoteAllocator{
- wsURL: detectURL(url),
- }}
- ctx = context.WithValue(ctx, contextKey{}, c)
- return ctx, cancel
-}
-
-// RemoteAllocator is an Allocator which connects to an already running Chrome
-// process via a websocket URL.
-type RemoteAllocator struct {
- wsURL string
-
- wg sync.WaitGroup
-}
-
-// Allocate satisfies the Allocator interface.
-func (a *RemoteAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (*Browser, error) {
- c := FromContext(ctx)
- if c == nil {
- return nil, ErrInvalidContext
- }
-
- // Use a different context for the websocket, so we can have a chance at
- // closing the relevant pages before closing the websocket connection.
- wctx, cancel := context.WithCancel(context.Background())
-
- close(c.allocated)
- a.wg.Add(1) // for the entire allocator
- go func() {
- <-ctx.Done()
- Cancel(ctx) // block until all pages are closed
- cancel() // close the websocket connection
- a.wg.Done()
- }()
- browser, err := NewBrowser(wctx, a.wsURL, opts...)
- if err != nil {
- return nil, err
- }
- go func() {
- // If the browser loses connection, kill the entire process and
- // handler at once.
- <-browser.LostConnection
- select {
- case <-browser.closingGracefully:
- default:
- Cancel(ctx)
- }
- }()
- return browser, nil
-}
-
-// Wait satisfies the Allocator interface.
-func (a *RemoteAllocator) Wait() {
- a.wg.Wait()
-}
diff --git a/vendor/github.com/chromedp/chromedp/allocate_linux.go b/vendor/github.com/chromedp/chromedp/allocate_linux.go
deleted file mode 100644
index ef7ce9ee5b6..00000000000
--- a/vendor/github.com/chromedp/chromedp/allocate_linux.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// +build linux
-
-package chromedp
-
-import (
- "os"
- "os/exec"
- "syscall"
-)
-
-func allocateCmdOptions(cmd *exec.Cmd) {
- if _, ok := os.LookupEnv("LAMBDA_TASK_ROOT"); ok {
- // do nothing on AWS Lambda
- return
- }
- if cmd.SysProcAttr == nil {
- cmd.SysProcAttr = new(syscall.SysProcAttr)
- }
- // When the parent process dies (Go), kill the child as well.
- cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL
-}
diff --git a/vendor/github.com/chromedp/chromedp/allocate_other.go b/vendor/github.com/chromedp/chromedp/allocate_other.go
deleted file mode 100644
index 46e0e172270..00000000000
--- a/vendor/github.com/chromedp/chromedp/allocate_other.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build !linux
-
-package chromedp
-
-import "os/exec"
-
-func allocateCmdOptions(cmd *exec.Cmd) {
-}
diff --git a/vendor/github.com/chromedp/chromedp/browser.go b/vendor/github.com/chromedp/chromedp/browser.go
deleted file mode 100644
index 05527d44ba7..00000000000
--- a/vendor/github.com/chromedp/chromedp/browser.go
+++ /dev/null
@@ -1,358 +0,0 @@
-package chromedp
-
-import (
- "context"
- "errors"
- "fmt"
- "log"
- "os"
- "sync"
- "sync/atomic"
- "time"
-
- easyjson "github.com/mailru/easyjson"
-
- "github.com/chromedp/cdproto"
- "github.com/chromedp/cdproto/browser"
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
- "github.com/chromedp/cdproto/target"
-)
-
-// Browser is the high-level Chrome DevTools Protocol browser manager, handling
-// the browser process runner, WebSocket clients, associated targets, and
-// network, page, and DOM events.
-type Browser struct {
- // next is the next message id.
- // NOTE: needs to be 64-bit aligned for 32-bit targets too, so be careful when moving this field.
- // This will be eventually done by the compiler once https://github.com/golang/go/issues/599 is fixed.
- next int64
-
- // LostConnection is closed when the websocket connection to Chrome is
- // dropped. This can be useful to make sure that Browser's context is
- // cancelled (and the handler stopped) once the connection has failed.
- LostConnection chan struct{}
-
- // closingGracefully is closed by Close before gracefully shutting down
- // the browser. This way, when the connection to the browser is lost and
- // LostConnection is closed, we will know not to immediately kill the
- // Chrome process. This is important to let the browser shut itself off,
- // saving its state to disk.
- closingGracefully chan struct{}
-
- dialTimeout time.Duration
-
- // pages keeps track of the attached targets, indexed by each's session
- // ID. The only reaon this is a field is so that the tests can check the
- // map once a browser is closed.
- pages map[target.SessionID]*Target
-
- listenersMu sync.Mutex
- listeners []cancelableListener
-
- conn Transport
-
- // newTabQueue is the queue used to create new target handlers, once a new
- // tab is created and attached to. The newly created Target is sent back
- // via newTabResult.
- newTabQueue chan *Target
-
- // cmdQueue is the outgoing command queue.
- cmdQueue chan *cdproto.Message
-
- // logging funcs
- logf func(string, ...interface{})
- errf func(string, ...interface{})
- dbgf func(string, ...interface{})
-
- // The optional fields below are helpful for some tests.
-
- // process can be initialized by the allocators which start a process
- // when allocating a browser.
- process *os.Process
-
- // userDataDir can be initialized by the allocators which set up user
- // data dirs directly.
- userDataDir string
-}
-
-// NewBrowser creates a new browser. Typically, this function wouldn't be called
-// directly, as the Allocator interface takes care of it.
-func NewBrowser(ctx context.Context, urlstr string, opts ...BrowserOption) (*Browser, error) {
- b := &Browser{
- LostConnection: make(chan struct{}),
- closingGracefully: make(chan struct{}),
-
- dialTimeout: 10 * time.Second,
-
- newTabQueue: make(chan *Target),
-
- // Fit some jobs without blocking, to reduce blocking in Execute.
- cmdQueue: make(chan *cdproto.Message, 32),
-
- logf: log.Printf,
- }
- // apply options
- for _, o := range opts {
- o(b)
- }
- // ensure errf is set
- if b.errf == nil {
- b.errf = func(s string, v ...interface{}) { b.logf("ERROR: "+s, v...) }
- }
-
- dialCtx := ctx
- if b.dialTimeout > 0 {
- var cancel context.CancelFunc
- dialCtx, cancel = context.WithTimeout(ctx, b.dialTimeout)
- defer cancel()
- }
-
- var err error
- urlstr = forceIP(urlstr)
- b.conn, err = DialContext(dialCtx, urlstr, WithConnDebugf(b.dbgf))
- if err != nil {
- return nil, fmt.Errorf("could not dial %q: %w", urlstr, err)
- }
-
- go b.run(ctx)
- return b, nil
-}
-
-// Process returns the process object of the browser.
-//
-// It could be nil when the browser is allocated with RemoteAllocator.
-// It could be useful for a monitoring system to collect process metrics of the browser process.
-// (see https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#NewProcessCollector for an example)
-//
-// Example:
-// if process := chromedp.FromContext(ctx).Browser.Process(); process != nil {
-// fmt.Printf("Browser PID: %v", process.Pid)
-// }
-func (b *Browser) Process() *os.Process {
- return b.process
-}
-
-func (b *Browser) newExecutorForTarget(ctx context.Context, targetID target.ID, sessionID target.SessionID) (*Target, error) {
- if targetID == "" {
- return nil, errors.New("empty target ID")
- }
- if sessionID == "" {
- return nil, errors.New("empty session ID")
- }
- t := &Target{
- browser: b,
- TargetID: targetID,
- SessionID: sessionID,
-
- messageQueue: make(chan *cdproto.Message, 1024),
- frames: make(map[cdp.FrameID]*cdp.Frame),
- execContexts: make(map[cdp.FrameID]runtime.ExecutionContextID),
- cur: cdp.FrameID(targetID),
-
- logf: b.logf,
- errf: b.errf,
- }
-
- // This send should be blocking, to ensure the tab is inserted into the
- // map before any more target events are routed.
- select {
- case <-ctx.Done():
- return nil, ctx.Err()
- case b.newTabQueue <- t:
- }
- return t, nil
-}
-
-func (b *Browser) Execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
- // Certain methods aren't available to the user directly.
- if method == browser.CommandClose {
- return fmt.Errorf("to close the browser gracefully, use chromedp.Cancel")
- }
- return b.execute(ctx, method, params, res)
-}
-
-func (b *Browser) execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
- id := atomic.AddInt64(&b.next, 1)
- lctx, cancel := context.WithCancel(ctx)
- ch := make(chan *cdproto.Message, 1)
- fn := func(ev interface{}) {
- if msg, ok := ev.(*cdproto.Message); ok && msg.ID == id {
- select {
- case <-ctx.Done():
- case ch <- msg:
- }
- cancel()
- }
- }
- b.listenersMu.Lock()
- b.listeners = append(b.listeners, cancelableListener{lctx, fn})
- b.listenersMu.Unlock()
-
- // send command
- var buf []byte
- if params != nil {
- var err error
- buf, err = easyjson.Marshal(params)
- if err != nil {
- return err
- }
- }
- cmd := &cdproto.Message{
- ID: id,
- Method: cdproto.MethodType(method),
- Params: buf,
- }
- select {
- case <-ctx.Done():
- return ctx.Err()
- case b.cmdQueue <- cmd:
- }
-
- // wait for result
- select {
- case <-ctx.Done():
- return ctx.Err()
- case msg := <-ch:
- switch {
- case msg == nil:
- return ErrChannelClosed
- case msg.Error != nil:
- return msg.Error
- case res != nil:
- return easyjson.Unmarshal(msg.Result, res)
- }
- }
- return nil
-}
-
-func (b *Browser) run(ctx context.Context) {
- defer b.conn.Close()
-
- // incomingQueue is the queue of incoming target events, to be routed by
- // their session ID.
- incomingQueue := make(chan *cdproto.Message, 1)
-
- delTabQueue := make(chan target.SessionID, 1)
-
- // This goroutine continuously reads events from the websocket
- // connection. The separate goroutine is needed since a websocket read
- // is blocking, so it cannot be used in a select statement.
- go func() {
- // Signal to run and exit the browser cleanup goroutine.
- defer close(b.LostConnection)
-
- for {
- msg := new(cdproto.Message)
- if err := b.conn.Read(ctx, msg); err != nil {
- return
- }
-
- switch {
- case msg.SessionID != "" && (msg.Method != "" || msg.ID != 0):
- select {
- case <-ctx.Done():
- return
- case incomingQueue <- msg:
- }
-
- case msg.Method != "":
- ev, err := cdproto.UnmarshalMessage(msg)
- if err != nil {
- b.errf("%s", err)
- continue
- }
- b.listenersMu.Lock()
- b.listeners = runListeners(b.listeners, ev)
- b.listenersMu.Unlock()
-
- if ev, ok := ev.(*target.EventDetachedFromTarget); ok {
- delTabQueue <- ev.SessionID
- }
-
- case msg.ID != 0:
- b.listenersMu.Lock()
- b.listeners = runListeners(b.listeners, msg)
- b.listenersMu.Unlock()
-
- default:
- b.errf("ignoring malformed incoming message (missing id or method): %#v", msg)
- }
- }
- }()
-
- b.pages = make(map[target.SessionID]*Target, 32)
- for {
- select {
- case <-ctx.Done():
- return
-
- case msg := <-b.cmdQueue:
- if err := b.conn.Write(ctx, msg); err != nil {
- b.errf("%s", err)
- continue
- }
-
- case t := <-b.newTabQueue:
- if _, ok := b.pages[t.SessionID]; ok {
- b.errf("executor for %q already exists", t.SessionID)
- }
- b.pages[t.SessionID] = t
-
- case sessionID := <-delTabQueue:
- if _, ok := b.pages[sessionID]; !ok {
- b.errf("executor for %q doesn't exist", sessionID)
- }
- delete(b.pages, sessionID)
-
- case m := <-incomingQueue:
- page, ok := b.pages[m.SessionID]
- if !ok {
- // A page we recently closed still sending events.
- continue
- }
-
- select {
- case <-ctx.Done():
- return
- case page.messageQueue <- m:
- }
-
- case <-b.LostConnection:
- return // to avoid "write: broken pipe" errors
- }
- }
-}
-
-// BrowserOption is a browser option.
-type BrowserOption = func(*Browser)
-
-// WithBrowserLogf is a browser option to specify a func to receive general logging.
-func WithBrowserLogf(f func(string, ...interface{})) BrowserOption {
- return func(b *Browser) { b.logf = f }
-}
-
-// WithBrowserErrorf is a browser option to specify a func to receive error logging.
-func WithBrowserErrorf(f func(string, ...interface{})) BrowserOption {
- return func(b *Browser) { b.errf = f }
-}
-
-// WithBrowserDebugf is a browser option to specify a func to log actual
-// websocket messages.
-func WithBrowserDebugf(f func(string, ...interface{})) BrowserOption {
- return func(b *Browser) { b.dbgf = f }
-}
-
-// WithConsolef is a browser option to specify a func to receive chrome log events.
-//
-// Note: NOT YET IMPLEMENTED.
-func WithConsolef(f func(string, ...interface{})) BrowserOption {
- return func(b *Browser) {}
-}
-
-// WithDialTimeout is a browser option to specify the timeout when dialing a
-// browser's websocket address. The default is ten seconds; use a zero duration
-// to not use a timeout.
-func WithDialTimeout(d time.Duration) BrowserOption {
- return func(b *Browser) { b.dialTimeout = d }
-}
diff --git a/vendor/github.com/chromedp/chromedp/chromedp.go b/vendor/github.com/chromedp/chromedp/chromedp.go
deleted file mode 100644
index d02b3d52959..00000000000
--- a/vendor/github.com/chromedp/chromedp/chromedp.go
+++ /dev/null
@@ -1,725 +0,0 @@
-// Package chromedp is a high level Chrome DevTools Protocol client that
-// simplifies driving browsers for scraping, unit testing, or profiling web
-// pages using the CDP.
-//
-// chromedp requires no third-party dependencies, implementing the async Chrome
-// DevTools Protocol entirely in Go.
-//
-// This package includes a number of simple examples. Additionally,
-// https://github.com/chromedp/examples contains more complex examples.
-package chromedp
-
-import (
- "context"
- "fmt"
- "strings"
- "sync"
- "time"
-
- "github.com/chromedp/cdproto/browser"
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/css"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/inspector"
- "github.com/chromedp/cdproto/log"
- "github.com/chromedp/cdproto/network"
- "github.com/chromedp/cdproto/page"
- "github.com/chromedp/cdproto/runtime"
- "github.com/chromedp/cdproto/target"
-)
-
-// Context is attached to any context.Context which is valid for use with Run.
-type Context struct {
- // Allocator is used to create new browsers. It is inherited from the
- // parent context when using NewContext.
- Allocator Allocator
-
- // Browser is the browser being used in the context. It is inherited
- // from the parent context when using NewContext.
- Browser *Browser
-
- // Target is the target to run actions (commands) against. It is not
- // inherited from the parent context, and typically each context will
- // have its own unique Target pointing to a separate browser tab (page).
- Target *Target
-
- // targetID is set up by WithTargetID. If nil, Run will pick the only
- // unused page target, or create a new one.
- targetID target.ID
-
- browserListeners []cancelableListener
- targetListeners []cancelableListener
-
- // browserOpts holds the browser options passed to NewContext via
- // WithBrowserOption, so that they can later be used when allocating a
- // browser in Run.
- browserOpts []BrowserOption
-
- // cancel simply cancels the context that was used to start Browser.
- // This is useful to stop all activity and avoid deadlocks if we detect
- // that the browser was closed or happened to crash. Note that this
- // cancel function doesn't do any waiting.
- cancel func()
-
- // first records whether this context created a brand new Chrome
- // process. This is important, because its cancellation should stop the
- // entire browser and its handler, and not just a portion of its pages.
- first bool
-
- // closedTarget allows waiting for a target's page to be closed on
- // cancellation.
- closedTarget sync.WaitGroup
-
- // allocated is closed when an allocated browser completely stops. If no
- // browser needs to be allocated, the channel is simply not initialised
- // and remains nil.
- allocated chan struct{}
-
- // cancelErr is the first error encountered when cancelling this
- // context, for example if a browser's temporary user data directory
- // couldn't be deleted.
- cancelErr error
-}
-
-// NewContext creates a chromedp context from the parent context. The parent
-// context's Allocator is inherited, defaulting to an ExecAllocator with
-// DefaultExecAllocatorOptions.
-//
-// If the parent context contains an allocated Browser, the child context
-// inherits it, and its first Run creates a new tab on that browser. Otherwise,
-// its first Run will allocate a new browser.
-//
-// Cancelling the returned context will close a tab or an entire browser,
-// depending on the logic described above. To cancel a context while checking
-// for errors, see Cancel.
-//
-// Note that NewContext doesn't allocate nor start a browser; that happens the
-// first time Run is used on the context.
-func NewContext(parent context.Context, opts ...ContextOption) (context.Context, context.CancelFunc) {
- ctx, cancel := context.WithCancel(parent)
-
- c := &Context{cancel: cancel, first: true}
- if pc := FromContext(parent); pc != nil {
- c.Allocator = pc.Allocator
- c.Browser = pc.Browser
- // don't inherit Target, so that NewContext can be used to
- // create a new tab on the same browser.
-
- c.first = c.Browser == nil
-
- // TODO: make this more generic somehow.
- if _, ok := c.Allocator.(*RemoteAllocator); ok {
- c.first = false
- }
- }
- if c.Browser == nil {
- // set up the semaphore for Allocator.Allocate
- c.allocated = make(chan struct{}, 1)
- c.allocated <- struct{}{}
- }
-
- for _, o := range opts {
- o(c)
- }
- if c.Allocator == nil {
- c.Allocator = setupExecAllocator(DefaultExecAllocatorOptions[:]...)
- }
-
- ctx = context.WithValue(ctx, contextKey{}, c)
- c.closedTarget.Add(1)
- go func() {
- <-ctx.Done()
- defer c.closedTarget.Done()
- if c.first {
- // This is the original browser tab, so the entire
- // browser will already be cleaned up elsewhere.
- return
- }
-
- if c.Target == nil {
- // This is a new tab, but we didn't create it and attach
- // to it yet. Nothing to do.
- return
- }
-
- // Not the original browser tab; simply detach and close it.
- // We need a new context, as ctx is cancelled; use a 1s timeout.
- ctx, cancel := context.WithTimeout(context.Background(), time.Second)
- defer cancel()
- if id := c.Target.SessionID; id != "" {
- action := target.DetachFromTarget().WithSessionID(id)
- if err := action.Do(cdp.WithExecutor(ctx, c.Browser)); c.cancelErr == nil && err != nil {
- c.cancelErr = err
- }
- }
- if id := c.Target.TargetID; id != "" {
- action := target.CloseTarget(id)
- if err := action.Do(cdp.WithExecutor(ctx, c.Browser)); c.cancelErr == nil && err != nil {
- c.cancelErr = err
- }
- }
- }()
- cancelWait := func() {
- cancel()
- c.closedTarget.Wait()
- // If we allocated, wait for the browser to stop.
- if c.allocated != nil {
- <-c.allocated
- }
- }
- return ctx, cancelWait
-}
-
-type contextKey struct{}
-
-// FromContext extracts the Context data stored inside a context.Context.
-func FromContext(ctx context.Context) *Context {
- c, _ := ctx.Value(contextKey{}).(*Context)
- return c
-}
-
-// Cancel cancels a chromedp context, waits for its resources to be cleaned up,
-// and returns any error encountered during that process.
-//
-// If the context allocated a browser, the browser will be closed gracefully by
-// Cancel. A timeout can be attached to this context to determine how long to
-// wait for the browser to close itself:
-//
-// tctx, tcancel := context.WithTimeout(ctx, 10 * time.Second)
-// defer tcancel()
-// chromedp.Cancel(tctx)
-//
-// Usually a "defer cancel()" will be enough for most use cases. However, Cancel
-// is the better option if one wants to gracefully close a browser, or catch
-// underlying errors happening during cancellation.
-func Cancel(ctx context.Context) error {
- c := FromContext(ctx)
- if c == nil {
- return ErrInvalidContext
- }
- graceful := c.first && c.Browser != nil
- if graceful {
- close(c.Browser.closingGracefully)
- if err := c.Browser.execute(ctx, browser.CommandClose, nil, nil); err != nil {
- return err
- }
- } else {
- c.cancel()
- c.closedTarget.Wait()
- }
- // If we allocated, wait for the browser to stop, up to any possible
- // deadline set in this ctx.
- ready := false
- if c.allocated != nil {
- select {
- case <-c.allocated:
- ready = true
- case <-ctx.Done():
- }
- }
- // If this was a graceful close, cancel the entire context, in case any
- // goroutines or resources are left, or if we hit the timeout above and
- // the browser hasn't finished yet. Note that, in the non-graceful path,
- // we already called c.cancel above.
- if graceful {
- c.cancel()
- }
-
- // If we allocated and we hit ctx.Done earlier, we can't rely on
- // cancelErr being ready until the allocated channel is closed, as that
- // is racy. If we didn't hit ctx.Done earlier, then c.allocated was
- // already cancelled then, so this will be a no-op.
- if !ready && c.allocated != nil {
- <-c.allocated
- }
- return c.cancelErr
-}
-
-func initContextBrowser(ctx context.Context) (*Context, error) {
- c := FromContext(ctx)
- // If c is nil, it's not a chromedp context.
- // If c.Allocator is nil, NewContext wasn't used properly.
- // If c.cancel is nil, Run is being called directly with an allocator
- // context.
- if c == nil || c.Allocator == nil || c.cancel == nil {
- return nil, ErrInvalidContext
- }
- if c.Browser == nil {
- browser, err := c.Allocator.Allocate(ctx, c.browserOpts...)
- if err != nil {
- return nil, err
- }
- c.Browser = browser
- c.Browser.listeners = append(c.Browser.listeners, c.browserListeners...)
- }
- return c, nil
-}
-
-// Run runs an action against context. The provided context must be a valid
-// chromedp context, typically created via NewContext.
-//
-// Note that the first time Run is called on a context, a browser will be
-// allocated via Allocator. Thus, it's generally a bad idea to use a context
-// timeout on the first Run call, as it will stop the entire browser.
-func Run(ctx context.Context, actions ...Action) error {
- c, err := initContextBrowser(ctx)
- if err != nil {
- return err
- }
- if c.Target == nil {
- if err := c.newTarget(ctx); err != nil {
- return err
- }
- }
- return Tasks(actions).Do(cdp.WithExecutor(ctx, c.Target))
-}
-
-func (c *Context) newTarget(ctx context.Context) error {
- if c.targetID != "" {
- if err := c.attachTarget(ctx, c.targetID); err != nil {
- return err
- }
- // This new page might have already loaded its top-level frame
- // already, in which case we wouldn't see the frameNavigated and
- // documentUpdated events. Load them here.
- // Since at the time of writing this (2020-1-27), Page.* CDP methods are
- // not implemented in worker targets, we need to skip this step when we
- // attach to workers.
- if !c.Target.isWorker {
- tree, err := page.GetFrameTree().Do(cdp.WithExecutor(ctx, c.Target))
- if err != nil {
- return err
- }
- c.Target.frames[tree.Frame.ID] = tree.Frame
- c.Target.cur = tree.Frame.ID
- c.Target.documentUpdated(ctx)
- }
- return nil
- }
- if !c.first {
- var err error
- c.targetID, err = target.CreateTarget("about:blank").Do(cdp.WithExecutor(ctx, c.Browser))
- if err != nil {
- return err
- }
- return c.attachTarget(ctx, c.targetID)
- }
-
- // This is like WaitNewTarget, but for the entire browser.
- ch := make(chan target.ID, 1)
- lctx, cancel := context.WithCancel(ctx)
- ListenBrowser(lctx, func(ev interface{}) {
- var info *target.Info
- switch ev := ev.(type) {
- case *target.EventTargetCreated:
- info = ev.TargetInfo
- case *target.EventTargetInfoChanged:
- info = ev.TargetInfo
- default:
- return
- }
- if info.Type == "page" && info.URL == "about:blank" {
- select {
- case <-lctx.Done():
- case ch <- info.TargetID:
- }
- cancel()
- }
- })
-
- // wait for the first blank tab to appear
- action := target.SetDiscoverTargets(true)
- if err := action.Do(cdp.WithExecutor(ctx, c.Browser)); err != nil {
- return err
- }
- select {
- case <-ctx.Done():
- return ctx.Err()
- case c.targetID = <-ch:
- }
- return c.attachTarget(ctx, c.targetID)
-}
-
-func (c *Context) attachTarget(ctx context.Context, targetID target.ID) error {
- sessionID, err := target.AttachToTarget(targetID).WithFlatten(true).Do(cdp.WithExecutor(ctx, c.Browser))
- if err != nil {
- return err
- }
-
- c.Target, err = c.Browser.newExecutorForTarget(ctx, targetID, sessionID)
- if err != nil {
- return err
- }
-
- c.Target.listeners = append(c.Target.listeners, c.targetListeners...)
- go c.Target.run(ctx)
-
- // Check if this is a worker target. We cannot use Target.getTargetInfo or
- // Target.getTargets in a worker, so we check if "self" refers to a
- // WorkerGlobalScope or ServiceWorkerGlobalScope.
- if err := runtime.Enable().Do(cdp.WithExecutor(ctx, c.Target)); err != nil {
- return err
- }
- res, _, err := runtime.Evaluate("self").Do(cdp.WithExecutor(ctx, c.Target))
- if err != nil {
- return err
- }
- c.Target.isWorker = strings.Contains(res.ClassName, "WorkerGlobalScope")
-
- // Enable available domains and discover targets.
- actions := []Action{
- log.Enable(),
- network.Enable(),
- }
- // These actions are not available on a worker target.
- if !c.Target.isWorker {
- actions = append(actions, []Action{
- inspector.Enable(),
- page.Enable(),
- dom.Enable(),
- css.Enable(),
- target.SetDiscoverTargets(true),
- target.SetAutoAttach(true, false).WithFlatten(true),
- page.SetLifecycleEventsEnabled(true),
- }...)
- }
-
- for _, action := range actions {
- if err := action.Do(cdp.WithExecutor(ctx, c.Target)); err != nil {
- return fmt.Errorf("unable to execute %T: %w", action, err)
- }
- }
- return nil
-}
-
-// ContextOption is a context option.
-type ContextOption = func(*Context)
-
-// WithTargetID sets up a context to be attached to an existing target, instead
-// of creating a new one.
-func WithTargetID(id target.ID) ContextOption {
- return func(c *Context) { c.targetID = id }
-}
-
-// WithLogf is a shortcut for WithBrowserOption(WithBrowserLogf(f)).
-func WithLogf(f func(string, ...interface{})) ContextOption {
- return WithBrowserOption(WithBrowserLogf(f))
-}
-
-// WithErrorf is a shortcut for WithBrowserOption(WithBrowserErrorf(f)).
-func WithErrorf(f func(string, ...interface{})) ContextOption {
- return WithBrowserOption(WithBrowserErrorf(f))
-}
-
-// WithDebugf is a shortcut for WithBrowserOption(WithBrowserDebugf(f)).
-func WithDebugf(f func(string, ...interface{})) ContextOption {
- return WithBrowserOption(WithBrowserDebugf(f))
-}
-
-// WithBrowserOption allows passing a number of browser options to the allocator
-// when allocating a new browser. As such, this context option can only be used
-// when NewContext is allocating a new browser.
-func WithBrowserOption(opts ...BrowserOption) ContextOption {
- return func(c *Context) {
- if c.Browser != nil {
- panic("WithBrowserOption can only be used when allocating a new browser")
- }
- c.browserOpts = append(c.browserOpts, opts...)
- }
-}
-
-// RunResponse is an alternative to Run which can be used with a list of actions
-// that trigger a page navigation, such as clicking on a link or button.
-//
-// RunResponse will run the actions and block until a page loads, returning the
-// HTTP response information for its HTML document. This can be useful to wait
-// for the page to be ready, or to catch 404 status codes, for example.
-//
-// Note that if the actions trigger multiple navigations, only the first is
-// used. And if the actions trigger no navigations at all, RunResponse will
-// block until the context is cancelled.
-func RunResponse(ctx context.Context, actions ...Action) (*network.Response, error) {
- var resp *network.Response
- if err := Run(ctx, responseAction(&resp, actions...)); err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-func responseAction(resp **network.Response, actions ...Action) Action {
- return ActionFunc(func(ctx context.Context) error {
- // loaderID lets us filter the requests from the currently
- // loading navigation.
- var loaderID cdp.LoaderID
-
- // reqID is the request we're currently looking at. This can
- // go through multiple values, e.g. if the page redirects.
- var reqID network.RequestID
-
- // frameID corresponds to the target's root frame.
- var frameID cdp.FrameID
-
- var loadErr error
- hasInit := false
- finished := false
-
- // First, set up the function to handle events.
- // We are listening for lifeycle events, so we will use those to
- // make sure we grab the response for a request initiated by the
- // loaderID that we want.
-
- lctx, lcancel := context.WithCancel(ctx)
- defer lcancel()
- handleEvent := func(ev interface{}) {
- switch ev := ev.(type) {
- case *network.EventRequestWillBeSent:
- if ev.LoaderID == loaderID && ev.Type == network.ResourceTypeDocument {
- reqID = ev.RequestID
- }
- case *network.EventLoadingFailed:
- if ev.RequestID == reqID {
- loadErr = fmt.Errorf("page load error %s", ev.ErrorText)
- // If Canceled is true, we won't receive a
- // loadEventFired at all.
- if ev.Canceled {
- finished = true
- lcancel()
- }
- }
- case *network.EventResponseReceived:
- if ev.RequestID == reqID && resp != nil {
- *resp = ev.Response
- }
- case *page.EventLifecycleEvent:
- if ev.FrameID == frameID && ev.Name == "init" {
- hasInit = true
- }
- case *page.EventLoadEventFired:
- // Ignore load events before the "init"
- // lifecycle event, as those are old.
- if hasInit {
- finished = true
- lcancel()
- }
- }
- }
- // earlyEvents is a buffered list of events which happened
- // before we knew what loaderID to look for.
- var earlyEvents []interface{}
-
- // Obtain frameID from the target.
- c := FromContext(ctx)
- c.Target.frameMu.Lock()
- frameID = c.Target.cur
- c.Target.frameMu.Unlock()
-
- ListenTarget(lctx, func(ev interface{}) {
- if loaderID != "" {
- handleEvent(ev)
- return
- }
- earlyEvents = append(earlyEvents, ev)
- switch ev := ev.(type) {
- case *page.EventFrameNavigated:
- // Make sure we keep frameID up to date.
- if ev.Frame.ParentID == "" {
- frameID = ev.Frame.ID
- }
- case *network.EventRequestWillBeSent:
- // Under some circumstances like ERR_TOO_MANY_REDIRECTS, we never
- // see the "init" lifecycle event we want. Those "lone" requests
- // also tend to have a loaderID that matches their requestID, for
- // some reason. If such a request is seen, use it.
- // TODO: research this some more when we have the time.
- if ev.FrameID == frameID && string(ev.LoaderID) == string(ev.RequestID) {
- loaderID = ev.LoaderID
- }
- case *page.EventLifecycleEvent:
- if ev.FrameID == frameID && ev.Name == "init" {
- loaderID = ev.LoaderID
- }
- case *page.EventNavigatedWithinDocument:
- // A fragment navigation doesn't need extra steps.
- finished = true
- lcancel()
- }
- if loaderID != "" {
- for _, ev := range earlyEvents {
- handleEvent(ev)
- }
- earlyEvents = nil
- }
- })
-
- // Second, run the actions.
- if err := Run(ctx, actions...); err != nil {
- return err
- }
-
- // Third, block until we have finished loading.
- select {
- case <-lctx.Done():
- if loadErr != nil {
- return loadErr
- }
-
- // If the ctx parameter was cancelled by the caller (or
- // by a timeout etc) the select will race between
- // lctx.Done and ctx.Done, since lctx is a sub-context
- // of ctx. So we can't return nil here, as otherwise
- // that race would mean that we would drop 50% of the
- // parent context cancellation errors.
- if !finished {
- return ctx.Err()
- }
- return nil
- case <-ctx.Done():
- return ctx.Err()
- }
- })
-}
-
-// Targets lists all the targets in the browser attached to the given context.
-func Targets(ctx context.Context) ([]*target.Info, error) {
- c, err := initContextBrowser(ctx)
- if err != nil {
- return nil, err
- }
- // TODO: If this is a new browser, the initial target (tab) might not be
- // ready yet. Should we block until at least one target is available?
- // Right now, the caller has to add retries with a timeout.
- return target.GetTargets().Do(cdp.WithExecutor(ctx, c.Browser))
-}
-
-// Action is the common interface for an action that will be executed against a
-// context and frame handler.
-type Action interface {
- // Do executes the action using the provided context and frame handler.
- Do(context.Context) error
-}
-
-// ActionFunc is a adapter to allow the use of ordinary func's as an Action.
-type ActionFunc func(context.Context) error
-
-// Do executes the func f using the provided context and frame handler.
-func (f ActionFunc) Do(ctx context.Context) error {
- return f(ctx)
-}
-
-// Tasks is a sequential list of Actions that can be used as a single Action.
-type Tasks []Action
-
-// Do executes the list of Actions sequentially, using the provided context and
-// frame handler.
-func (t Tasks) Do(ctx context.Context) error {
- for _, a := range t {
- if err := a.Do(ctx); err != nil {
- return err
- }
- }
- return nil
-}
-
-// Sleep is an empty action that calls time.Sleep with the specified duration.
-//
-// Note: this is a temporary action definition for convenience, and will likely
-// be marked for deprecation in the future, after the remaining Actions have
-// been able to be written/tested.
-func Sleep(d time.Duration) Action {
- return ActionFunc(func(ctx context.Context) error {
- // Don't use time.After, to avoid a temporary goroutine leak if
- // ctx is cancelled before the timer fires.
- t := time.NewTimer(d)
- select {
- case <-ctx.Done():
- t.Stop()
- return ctx.Err()
- case <-t.C:
- }
- return nil
- })
-}
-
-type cancelableListener struct {
- ctx context.Context
- fn func(ev interface{})
-}
-
-// ListenBrowser adds a function which will be called whenever a browser event
-// is received on the chromedp context. Note that this only includes browser
-// events; command responses and target events are not included. Cancelling ctx
-// stops the listener from receiving any more events.
-//
-// Note that the function is called synchronously when handling events. The
-// function should avoid blocking at all costs. For example, any Actions must be
-// run via a separate goroutine.
-func ListenBrowser(ctx context.Context, fn func(ev interface{})) {
- c := FromContext(ctx)
- if c == nil {
- panic(ErrInvalidContext)
- }
- cl := cancelableListener{ctx, fn}
- if c.Browser != nil {
- c.Browser.listenersMu.Lock()
- c.Browser.listeners = append(c.Browser.listeners, cl)
- c.Browser.listenersMu.Unlock()
- } else {
- c.browserListeners = append(c.browserListeners, cl)
- }
-}
-
-// ListenTarget adds a function which will be called whenever a target event is
-// received on the chromedp context. Cancelling ctx stops the listener from
-// receiving any more events.
-//
-// Note that the function is called synchronously when handling events. The
-// function should avoid blocking at all costs. For example, any Actions must be
-// run via a separate goroutine.
-func ListenTarget(ctx context.Context, fn func(ev interface{})) {
- c := FromContext(ctx)
- if c == nil {
- panic(ErrInvalidContext)
- }
- cl := cancelableListener{ctx, fn}
- if c.Target != nil {
- c.Target.listenersMu.Lock()
- c.Target.listeners = append(c.Target.listeners, cl)
- c.Target.listenersMu.Unlock()
- } else {
- c.targetListeners = append(c.targetListeners, cl)
- }
-}
-
-// WaitNewTarget can be used to wait for the current target to open a new
-// target. Once fn matches a new unattached target, its target ID is sent via
-// the returned channel.
-func WaitNewTarget(ctx context.Context, fn func(*target.Info) bool) <-chan target.ID {
- ch := make(chan target.ID, 1)
- lctx, cancel := context.WithCancel(ctx)
- ListenTarget(lctx, func(ev interface{}) {
- var info *target.Info
- switch ev := ev.(type) {
- case *target.EventTargetCreated:
- info = ev.TargetInfo
- case *target.EventTargetInfoChanged:
- info = ev.TargetInfo
- default:
- return
- }
- if info.OpenerID == "" {
- return // not a child target
- }
- if info.Attached {
- return // already attached; not a new target
- }
- if fn(info) {
- select {
- case <-lctx.Done():
- case ch <- info.TargetID:
- }
- close(ch)
- cancel()
- }
- })
- return ch
-}
diff --git a/vendor/github.com/chromedp/chromedp/conn.go b/vendor/github.com/chromedp/chromedp/conn.go
deleted file mode 100644
index 4e71cb92ff3..00000000000
--- a/vendor/github.com/chromedp/chromedp/conn.go
+++ /dev/null
@@ -1,152 +0,0 @@
-package chromedp
-
-import (
- "bytes"
- "context"
- "io"
- "net"
-
- "github.com/gobwas/ws"
- "github.com/gobwas/ws/wsutil"
- "github.com/mailru/easyjson/jlexer"
- "github.com/mailru/easyjson/jwriter"
-
- "github.com/chromedp/cdproto"
-)
-
-// Transport is the common interface to send/receive messages to a target.
-//
-// This interface is currently used internally by Browser, but it is exposed as
-// it will be useful as part of the public API in the future.
-type Transport interface {
- Read(context.Context, *cdproto.Message) error
- Write(context.Context, *cdproto.Message) error
- io.Closer
-}
-
-// Conn implements Transport with a gobwas/ws websocket connection.
-type Conn struct {
- conn net.Conn
-
- // reuse the websocket reader and writer to avoid an alloc per
- // Read/Write.
- reader wsutil.Reader
- writer wsutil.Writer
-
- // reuse the easyjson structs to avoid allocs per Read/Write.
- decoder jlexer.Lexer
- encoder jwriter.Writer
-
- dbgf func(string, ...interface{})
-}
-
-// DialContext dials the specified websocket URL using gobwas/ws.
-func DialContext(ctx context.Context, urlstr string, opts ...DialOption) (*Conn, error) {
- // connect
- conn, br, _, err := ws.Dial(ctx, urlstr)
- if err != nil {
- return nil, err
- }
- if br != nil {
- panic("br should be nil")
- }
-
- // apply opts
- c := &Conn{
- conn: conn,
- // The default buffer size is 4KiB, which should be enough.
- // But github.com/gobwas/ws has a bug right row
- // (see https://github.com/gobwas/ws/pull/134),
- // so we will pass 65544 to make it reserve 10 or 14 bytes for header.
- // Once the issue is fixed, we can pass 0 to use the default size (4KiB).
- writer: *wsutil.NewWriterBufferSize(conn,
- ws.StateClientSide, ws.OpText, 65544),
- }
- for _, o := range opts {
- o(c)
- }
-
- return c, nil
-}
-
-// Close satisfies the io.Closer interface.
-func (c *Conn) Close() error {
- return c.conn.Close()
-}
-
-// Read reads the next message.
-func (c *Conn) Read(_ context.Context, msg *cdproto.Message) error {
- // get websocket reader
- c.reader = wsutil.Reader{Source: c.conn, State: ws.StateClientSide}
- h, err := c.reader.NextFrame()
- if err != nil {
- return err
- }
- if h.OpCode != ws.OpText {
- return ErrInvalidWebsocketMessage
- }
-
- var b bytes.Buffer
- if _, err := b.ReadFrom(&c.reader); err != nil {
- return err
- }
- buf := b.Bytes()
- if c.dbgf != nil {
- c.dbgf("<- %s", buf)
- }
-
- // unmarshal, reusing lexer
- c.decoder = jlexer.Lexer{Data: buf}
- msg.UnmarshalEasyJSON(&c.decoder)
- return c.decoder.Error()
-}
-
-// Write writes a message.
-func (c *Conn) Write(_ context.Context, msg *cdproto.Message) error {
- c.writer.Reset(c.conn, ws.StateClientSide, ws.OpText)
- // Chrome doesn't support fragmentation of incoming websocket messages. To
- // compensate this, they support single-fragment messages of up to 100MiB.
- //
- // See https://github.com/ChromeDevTools/devtools-protocol/issues/175.
- //
- // And according to https://bugs.chromium.org/p/chromium/issues/detail?id=1069431,
- // it seems like that fragmentation won't be supported very soon.
- // Luckily, now github.com/gobwas/ws will grow the buffer if needed.
- // The func name DisableFlush is a little misleading,
- // but it do make it grow the buffer if needed.
- c.writer.DisableFlush()
-
- // Reuse the easyjson writer.
- c.encoder = jwriter.Writer{}
-
- // Perform the marshal.
- msg.MarshalEasyJSON(&c.encoder)
- if err := c.encoder.Error; err != nil {
- return err
- }
-
- // Write the bytes to the websocket.
- // BuildBytes consumes the buffer, so we can't use it as well as DumpTo.
- if c.dbgf != nil {
- buf, _ := c.encoder.BuildBytes()
- c.dbgf("-> %s", buf)
- if _, err := c.writer.Write(buf); err != nil {
- return err
- }
- } else {
- if _, err := c.encoder.DumpTo(&c.writer); err != nil {
- return err
- }
- }
- return c.writer.Flush()
-}
-
-// DialOption is a dial option.
-type DialOption = func(*Conn)
-
-// WithConnDebugf is a dial option to set a protocol logger.
-func WithConnDebugf(f func(string, ...interface{})) DialOption {
- return func(c *Conn) {
- c.dbgf = f
- }
-}
diff --git a/vendor/github.com/chromedp/chromedp/device/device.go b/vendor/github.com/chromedp/chromedp/device/device.go
deleted file mode 100644
index b60be1fea6f..00000000000
--- a/vendor/github.com/chromedp/chromedp/device/device.go
+++ /dev/null
@@ -1,324 +0,0 @@
-package device
-
-// See: https://raw.githubusercontent.com/puppeteer/puppeteer/main/src/common/DeviceDescriptors.ts
-
-// Generated by gen.go. DO NOT EDIT.
-
-// Devices.
-const (
- // Reset is the reset device.
- Reset infoType = iota
-
- // BlackberryPlayBook is the "Blackberry PlayBook" device.
- BlackberryPlayBook
-
- // BlackberryPlayBooklandscape is the "Blackberry PlayBook landscape" device.
- BlackberryPlayBooklandscape
-
- // BlackBerryZ30 is the "BlackBerry Z30" device.
- BlackBerryZ30
-
- // BlackBerryZ30landscape is the "BlackBerry Z30 landscape" device.
- BlackBerryZ30landscape
-
- // GalaxyNote3 is the "Galaxy Note 3" device.
- GalaxyNote3
-
- // GalaxyNote3landscape is the "Galaxy Note 3 landscape" device.
- GalaxyNote3landscape
-
- // GalaxyNoteII is the "Galaxy Note II" device.
- GalaxyNoteII
-
- // GalaxyNoteIIlandscape is the "Galaxy Note II landscape" device.
- GalaxyNoteIIlandscape
-
- // GalaxySIII is the "Galaxy S III" device.
- GalaxySIII
-
- // GalaxySIIIlandscape is the "Galaxy S III landscape" device.
- GalaxySIIIlandscape
-
- // GalaxyS5 is the "Galaxy S5" device.
- GalaxyS5
-
- // GalaxyS5landscape is the "Galaxy S5 landscape" device.
- GalaxyS5landscape
-
- // IPad is the "iPad" device.
- IPad
-
- // IPadlandscape is the "iPad landscape" device.
- IPadlandscape
-
- // IPadMini is the "iPad Mini" device.
- IPadMini
-
- // IPadMinilandscape is the "iPad Mini landscape" device.
- IPadMinilandscape
-
- // IPadPro is the "iPad Pro" device.
- IPadPro
-
- // IPadProlandscape is the "iPad Pro landscape" device.
- IPadProlandscape
-
- // IPhone4 is the "iPhone 4" device.
- IPhone4
-
- // IPhone4landscape is the "iPhone 4 landscape" device.
- IPhone4landscape
-
- // IPhone5 is the "iPhone 5" device.
- IPhone5
-
- // IPhone5landscape is the "iPhone 5 landscape" device.
- IPhone5landscape
-
- // IPhone6 is the "iPhone 6" device.
- IPhone6
-
- // IPhone6landscape is the "iPhone 6 landscape" device.
- IPhone6landscape
-
- // IPhone6Plus is the "iPhone 6 Plus" device.
- IPhone6Plus
-
- // IPhone6Pluslandscape is the "iPhone 6 Plus landscape" device.
- IPhone6Pluslandscape
-
- // IPhone7 is the "iPhone 7" device.
- IPhone7
-
- // IPhone7landscape is the "iPhone 7 landscape" device.
- IPhone7landscape
-
- // IPhone7Plus is the "iPhone 7 Plus" device.
- IPhone7Plus
-
- // IPhone7Pluslandscape is the "iPhone 7 Plus landscape" device.
- IPhone7Pluslandscape
-
- // IPhone8 is the "iPhone 8" device.
- IPhone8
-
- // IPhone8landscape is the "iPhone 8 landscape" device.
- IPhone8landscape
-
- // IPhone8Plus is the "iPhone 8 Plus" device.
- IPhone8Plus
-
- // IPhone8Pluslandscape is the "iPhone 8 Plus landscape" device.
- IPhone8Pluslandscape
-
- // IPhoneSE is the "iPhone SE" device.
- IPhoneSE
-
- // IPhoneSElandscape is the "iPhone SE landscape" device.
- IPhoneSElandscape
-
- // IPhoneX is the "iPhone X" device.
- IPhoneX
-
- // IPhoneXlandscape is the "iPhone X landscape" device.
- IPhoneXlandscape
-
- // IPhoneXR is the "iPhone XR" device.
- IPhoneXR
-
- // IPhoneXRlandscape is the "iPhone XR landscape" device.
- IPhoneXRlandscape
-
- // IPhone11 is the "iPhone 11" device.
- IPhone11
-
- // IPhone11landscape is the "iPhone 11 landscape" device.
- IPhone11landscape
-
- // IPhone11Pro is the "iPhone 11 Pro" device.
- IPhone11Pro
-
- // IPhone11Prolandscape is the "iPhone 11 Pro landscape" device.
- IPhone11Prolandscape
-
- // IPhone11ProMax is the "iPhone 11 Pro Max" device.
- IPhone11ProMax
-
- // IPhone11ProMaxlandscape is the "iPhone 11 Pro Max landscape" device.
- IPhone11ProMaxlandscape
-
- // JioPhone2 is the "JioPhone 2" device.
- JioPhone2
-
- // JioPhone2landscape is the "JioPhone 2 landscape" device.
- JioPhone2landscape
-
- // KindleFireHDX is the "Kindle Fire HDX" device.
- KindleFireHDX
-
- // KindleFireHDXlandscape is the "Kindle Fire HDX landscape" device.
- KindleFireHDXlandscape
-
- // LGOptimusL70 is the "LG Optimus L70" device.
- LGOptimusL70
-
- // LGOptimusL70landscape is the "LG Optimus L70 landscape" device.
- LGOptimusL70landscape
-
- // MicrosoftLumia550 is the "Microsoft Lumia 550" device.
- MicrosoftLumia550
-
- // MicrosoftLumia950 is the "Microsoft Lumia 950" device.
- MicrosoftLumia950
-
- // MicrosoftLumia950landscape is the "Microsoft Lumia 950 landscape" device.
- MicrosoftLumia950landscape
-
- // Nexus10 is the "Nexus 10" device.
- Nexus10
-
- // Nexus10landscape is the "Nexus 10 landscape" device.
- Nexus10landscape
-
- // Nexus4 is the "Nexus 4" device.
- Nexus4
-
- // Nexus4landscape is the "Nexus 4 landscape" device.
- Nexus4landscape
-
- // Nexus5 is the "Nexus 5" device.
- Nexus5
-
- // Nexus5landscape is the "Nexus 5 landscape" device.
- Nexus5landscape
-
- // Nexus5X is the "Nexus 5X" device.
- Nexus5X
-
- // Nexus5Xlandscape is the "Nexus 5X landscape" device.
- Nexus5Xlandscape
-
- // Nexus6 is the "Nexus 6" device.
- Nexus6
-
- // Nexus6landscape is the "Nexus 6 landscape" device.
- Nexus6landscape
-
- // Nexus6P is the "Nexus 6P" device.
- Nexus6P
-
- // Nexus6Plandscape is the "Nexus 6P landscape" device.
- Nexus6Plandscape
-
- // Nexus7 is the "Nexus 7" device.
- Nexus7
-
- // Nexus7landscape is the "Nexus 7 landscape" device.
- Nexus7landscape
-
- // NokiaLumia520 is the "Nokia Lumia 520" device.
- NokiaLumia520
-
- // NokiaLumia520landscape is the "Nokia Lumia 520 landscape" device.
- NokiaLumia520landscape
-
- // NokiaN9 is the "Nokia N9" device.
- NokiaN9
-
- // NokiaN9landscape is the "Nokia N9 landscape" device.
- NokiaN9landscape
-
- // Pixel2 is the "Pixel 2" device.
- Pixel2
-
- // Pixel2landscape is the "Pixel 2 landscape" device.
- Pixel2landscape
-
- // Pixel2XL is the "Pixel 2 XL" device.
- Pixel2XL
-
- // Pixel2XLlandscape is the "Pixel 2 XL landscape" device.
- Pixel2XLlandscape
-)
-
-// devices is the list of devices.
-var devices = [...]Info{
- {"", "", 0, 0, 0.000000, false, false, false},
- {"Blackberry PlayBook", "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", 600, 1024, 1.000000, false, true, true},
- {"Blackberry PlayBook landscape", "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", 1024, 600, 1.000000, true, true, true},
- {"BlackBerry Z30", "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+", 360, 640, 2.000000, false, true, true},
- {"BlackBerry Z30 landscape", "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+", 640, 360, 2.000000, true, true, true},
- {"Galaxy Note 3", "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 360, 640, 3.000000, false, true, true},
- {"Galaxy Note 3 landscape", "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 640, 360, 3.000000, true, true, true},
- {"Galaxy Note II", "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 360, 640, 2.000000, false, true, true},
- {"Galaxy Note II landscape", "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 640, 360, 2.000000, true, true, true},
- {"Galaxy S III", "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 360, 640, 2.000000, false, true, true},
- {"Galaxy S III landscape", "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30", 640, 360, 2.000000, true, true, true},
- {"Galaxy S5", "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 360, 640, 3.000000, false, true, true},
- {"Galaxy S5 landscape", "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 640, 360, 3.000000, true, true, true},
- {"iPad", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 768, 1024, 2.000000, false, true, true},
- {"iPad landscape", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 1024, 768, 2.000000, true, true, true},
- {"iPad Mini", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 768, 1024, 2.000000, false, true, true},
- {"iPad Mini landscape", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 1024, 768, 2.000000, true, true, true},
- {"iPad Pro", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 1024, 1366, 2.000000, false, true, true},
- {"iPad Pro landscape", "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1", 1366, 1024, 2.000000, true, true, true},
- {"iPhone 4", "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53", 320, 480, 2.000000, false, true, true},
- {"iPhone 4 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53", 480, 320, 2.000000, true, true, true},
- {"iPhone 5", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", 320, 568, 2.000000, false, true, true},
- {"iPhone 5 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", 568, 320, 2.000000, true, true, true},
- {"iPhone 6", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 375, 667, 2.000000, false, true, true},
- {"iPhone 6 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 667, 375, 2.000000, true, true, true},
- {"iPhone 6 Plus", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 414, 736, 3.000000, false, true, true},
- {"iPhone 6 Plus landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 736, 414, 3.000000, true, true, true},
- {"iPhone 7", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 375, 667, 2.000000, false, true, true},
- {"iPhone 7 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 667, 375, 2.000000, true, true, true},
- {"iPhone 7 Plus", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 414, 736, 3.000000, false, true, true},
- {"iPhone 7 Plus landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 736, 414, 3.000000, true, true, true},
- {"iPhone 8", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 375, 667, 2.000000, false, true, true},
- {"iPhone 8 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 667, 375, 2.000000, true, true, true},
- {"iPhone 8 Plus", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 414, 736, 3.000000, false, true, true},
- {"iPhone 8 Plus landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 736, 414, 3.000000, true, true, true},
- {"iPhone SE", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", 320, 568, 2.000000, false, true, true},
- {"iPhone SE landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", 568, 320, 2.000000, true, true, true},
- {"iPhone X", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 375, 812, 3.000000, false, true, true},
- {"iPhone X landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1", 812, 375, 3.000000, true, true, true},
- {"iPhone XR", "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1", 414, 896, 3.000000, false, true, true},
- {"iPhone XR landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1", 896, 414, 3.000000, true, true, true},
- {"iPhone 11", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 414, 828, 2.000000, false, true, true},
- {"iPhone 11 landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 828, 414, 2.000000, true, true, true},
- {"iPhone 11 Pro", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 375, 812, 3.000000, false, true, true},
- {"iPhone 11 Pro landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 812, 375, 3.000000, true, true, true},
- {"iPhone 11 Pro Max", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 414, 896, 3.000000, false, true, true},
- {"iPhone 11 Pro Max landscape", "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1", 896, 414, 3.000000, true, true, true},
- {"JioPhone 2", "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5", 240, 320, 1.000000, false, true, true},
- {"JioPhone 2 landscape", "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5", 320, 240, 1.000000, true, true, true},
- {"Kindle Fire HDX", "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true", 800, 1280, 2.000000, false, true, true},
- {"Kindle Fire HDX landscape", "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true", 1280, 800, 2.000000, true, true, true},
- {"LG Optimus L70", "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36", 384, 640, 1.250000, false, true, true},
- {"LG Optimus L70 landscape", "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36", 640, 384, 1.250000, true, true, true},
- {"Microsoft Lumia 550", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", 640, 360, 2.000000, false, true, true},
- {"Microsoft Lumia 950", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", 360, 640, 4.000000, false, true, true},
- {"Microsoft Lumia 950 landscape", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263", 640, 360, 4.000000, true, true, true},
- {"Nexus 10", "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", 800, 1280, 2.000000, false, true, true},
- {"Nexus 10 landscape", "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", 1280, 800, 2.000000, true, true, true},
- {"Nexus 4", "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 384, 640, 2.000000, false, true, true},
- {"Nexus 4 landscape", "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 640, 384, 2.000000, true, true, true},
- {"Nexus 5", "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 360, 640, 3.000000, false, true, true},
- {"Nexus 5 landscape", "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 640, 360, 3.000000, true, true, true},
- {"Nexus 5X", "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 412, 732, 2.625000, false, true, true},
- {"Nexus 5X landscape", "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 732, 412, 2.625000, true, true, true},
- {"Nexus 6", "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 412, 732, 3.500000, false, true, true},
- {"Nexus 6 landscape", "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 732, 412, 3.500000, true, true, true},
- {"Nexus 6P", "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 412, 732, 3.500000, false, true, true},
- {"Nexus 6P landscape", "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 732, 412, 3.500000, true, true, true},
- {"Nexus 7", "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", 600, 960, 2.000000, false, true, true},
- {"Nexus 7 landscape", "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36", 960, 600, 2.000000, true, true, true},
- {"Nokia Lumia 520", "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)", 320, 533, 1.500000, false, true, true},
- {"Nokia Lumia 520 landscape", "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)", 533, 320, 1.500000, true, true, true},
- {"Nokia N9", "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", 480, 854, 1.000000, false, true, true},
- {"Nokia N9 landscape", "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", 854, 480, 1.000000, true, true, true},
- {"Pixel 2", "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 411, 731, 2.625000, false, true, true},
- {"Pixel 2 landscape", "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 731, 411, 2.625000, true, true, true},
- {"Pixel 2 XL", "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 411, 823, 3.500000, false, true, true},
- {"Pixel 2 XL landscape", "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36", 823, 411, 3.500000, true, true, true},
-}
diff --git a/vendor/github.com/chromedp/chromedp/device/types.go b/vendor/github.com/chromedp/chromedp/device/types.go
deleted file mode 100644
index 2023c70b18e..00000000000
--- a/vendor/github.com/chromedp/chromedp/device/types.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Package device contains device emulation definitions for use with chromedp's
-// Emulate action.
-package device
-
-//go:generate go run gen.go
-
-// Info holds device information for use with chromedp.Emulate.
-type Info struct {
- // Name is the device name.
- Name string
-
- // UserAgent is the device user agent string.
- UserAgent string
-
- // Width is the viewport width.
- Width int64
-
- // Height is the viewport height.
- Height int64
-
- // Scale is the device viewport scale factor.
- Scale float64
-
- // Landscape indicates whether or not the device is in landscape mode or
- // not.
- Landscape bool
-
- // Mobile indicates whether it is a mobile device or not.
- Mobile bool
-
- // Touch indicates whether the device has touch enabled.
- Touch bool
-}
-
-// String satisfies fmt.Stringer.
-func (i Info) String() string {
- return i.Name
-}
-
-// Device satisfies chromedp.Device.
-func (i Info) Device() Info {
- return i
-}
-
-// infoType provides the enumerated device type.
-type infoType int
-
-// String satisfies fmt.Stringer.
-func (i infoType) String() string {
- return devices[i].String()
-}
-
-// Device satisfies chromedp.Device.
-func (i infoType) Device() Info {
- return devices[i]
-}
diff --git a/vendor/github.com/chromedp/chromedp/emulate.go b/vendor/github.com/chromedp/chromedp/emulate.go
deleted file mode 100644
index 40bcc8379d7..00000000000
--- a/vendor/github.com/chromedp/chromedp/emulate.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package chromedp
-
-import (
- "context"
- "math"
-
- "github.com/chromedp/cdproto/emulation"
- "github.com/chromedp/cdproto/page"
- "github.com/chromedp/chromedp/device"
-)
-
-// EmulateAction are actions that change the emulation settings for the
-// browser.
-type EmulateAction Action
-
-// EmulateViewport is an action to change the browser viewport.
-//
-// Wraps calls to emulation.SetDeviceMetricsOverride and emulation.SetTouchEmulationEnabled.
-//
-// Note: this has the effect of setting/forcing the screen orientation to
-// landscape, and will disable mobile and touch emulation by default. If this
-// is not the desired behavior, use the emulate viewport options
-// EmulateOrientation (or EmulateLandscape/EmulatePortrait), EmulateMobile, and
-// EmulateTouch, respectively.
-func EmulateViewport(width, height int64, opts ...EmulateViewportOption) EmulateAction {
- p1 := emulation.SetDeviceMetricsOverride(width, height, 1.0, false)
- p2 := emulation.SetTouchEmulationEnabled(false)
- for _, o := range opts {
- o(p1, p2)
- }
- return Tasks{p1, p2}
-}
-
-// EmulateViewportOption is the type for emulate viewport options.
-type EmulateViewportOption = func(*emulation.SetDeviceMetricsOverrideParams, *emulation.SetTouchEmulationEnabledParams)
-
-// EmulateScale is an emulate viewport option to set the device viewport scaling
-// factor.
-func EmulateScale(scale float64) EmulateViewportOption {
- return func(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- p1.DeviceScaleFactor = scale
- }
-}
-
-// EmulateOrientation is an emulate viewport option to set the device viewport
-// screen orientation.
-func EmulateOrientation(orientation emulation.OrientationType, angle int64) EmulateViewportOption {
- return func(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- p1.ScreenOrientation = &emulation.ScreenOrientation{
- Type: orientation,
- Angle: angle,
- }
- }
-}
-
-// EmulateLandscape is an emulate viewport option to set the device viewport
-// screen orientation in landscape primary mode and an angle of 90.
-func EmulateLandscape(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- EmulateOrientation(emulation.OrientationTypeLandscapePrimary, 90)(p1, p2)
-}
-
-// EmulatePortrait is an emulate viewport option to set the device viewport
-// screen orentation in portrait primary mode and an angle of 0.
-func EmulatePortrait(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- EmulateOrientation(emulation.OrientationTypePortraitPrimary, 0)(p1, p2)
-}
-
-// EmulateMobile is an emulate viewport option to toggle the device viewport to
-// display as a mobile device.
-func EmulateMobile(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- p1.Mobile = true
-}
-
-// EmulateTouch is an emulate viewport option to enable touch emulation.
-func EmulateTouch(p1 *emulation.SetDeviceMetricsOverrideParams, p2 *emulation.SetTouchEmulationEnabledParams) {
- p2.Enabled = true
-}
-
-// ResetViewport is an action to reset the browser viewport to the default
-// values the browser was started with.
-//
-// Note: does not modify / change the browser's emulated User-Agent, if any.
-func ResetViewport() EmulateAction {
- return EmulateViewport(0, 0, EmulatePortrait)
-}
-
-// Device is the shared interface for known device types.
-//
-// See: github.com/chromedp/chromedp/device for a set of off-the-shelf devices
-// and modes.
-type Device interface {
- // Device returns the device info.
- Device() device.Info
-}
-
-// Emulate is an action to emulate a specific device.
-//
-// See: github.com/chromedp/chromedp/device for a set of off-the-shelf devices
-// and modes.
-func Emulate(device Device) EmulateAction {
- d := device.Device()
-
- var angle int64
- orientation := emulation.OrientationTypePortraitPrimary
- if d.Landscape {
- orientation, angle = emulation.OrientationTypeLandscapePrimary, 90
- }
-
- return Tasks{
- emulation.SetUserAgentOverride(d.UserAgent),
- emulation.SetDeviceMetricsOverride(d.Width, d.Height, d.Scale, d.Mobile).
- WithScreenOrientation(&emulation.ScreenOrientation{
- Type: orientation,
- Angle: angle,
- }),
- emulation.SetTouchEmulationEnabled(d.Touch),
- }
-}
-
-// EmulateReset is an action to reset the device emulation.
-//
-// Resets the browser's viewport, screen orientation, user-agent, and
-// mobile/touch emulation settings to the original values the browser was
-// started with.
-func EmulateReset() EmulateAction {
- return Emulate(device.Reset)
-}
-
-// FullScreenshot takes a full screenshot with the specified image quality of
-// the entire browser viewport. Calls emulation.SetDeviceMetricsOverride (see
-// note below).
-//
-// Implementation liberally sourced from puppeteer.
-//
-// Note: after calling this action, reset the browser's viewport using
-// ResetViewport, EmulateReset, or page.SetDeviceMetricsOverride.
-func FullScreenshot(res *[]byte, quality int) EmulateAction {
- if res == nil {
- panic("res cannot be nil")
- }
- return ActionFunc(func(ctx context.Context) error {
- // get layout metrics
- _, _, contentSize, _, _, cssContentSize, err := page.GetLayoutMetrics().Do(ctx)
- if err != nil {
- return err
- }
- // protocol v90 changed the return parameter name (contentSize -> cssContentSize)
- if cssContentSize != nil {
- contentSize = cssContentSize
- }
- width, height := int64(math.Ceil(contentSize.Width)), int64(math.Ceil(contentSize.Height))
- // force viewport emulation
- err = emulation.SetDeviceMetricsOverride(width, height, 1, false).
- WithScreenOrientation(&emulation.ScreenOrientation{
- Type: emulation.OrientationTypePortraitPrimary,
- Angle: 0,
- }).
- Do(ctx)
- if err != nil {
- return err
- }
- // capture screenshot
- *res, err = page.CaptureScreenshot().
- WithQuality(int64(quality)).
- WithClip(&page.Viewport{
- X: contentSize.X,
- Y: contentSize.Y,
- Width: contentSize.Width,
- Height: contentSize.Height,
- Scale: 1,
- }).Do(ctx)
- if err != nil {
- return err
- }
- return nil
- })
-}
diff --git a/vendor/github.com/chromedp/chromedp/errors.go b/vendor/github.com/chromedp/chromedp/errors.go
deleted file mode 100644
index 94d763b4722..00000000000
--- a/vendor/github.com/chromedp/chromedp/errors.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package chromedp
-
-// Error is a chromedp error.
-type Error string
-
-// Error satisfies the error interface.
-func (err Error) Error() string {
- return string(err)
-}
-
-// Error types.
-const (
- // ErrInvalidWebsocketMessage is the invalid websocket message.
- ErrInvalidWebsocketMessage Error = "invalid websocket message"
-
- // ErrInvalidDimensions is the invalid dimensions error.
- ErrInvalidDimensions Error = "invalid dimensions"
-
- // ErrNoResults is the no results error.
- ErrNoResults Error = "no results"
-
- // ErrHasResults is the has results error.
- ErrHasResults Error = "has results"
-
- // ErrNotVisible is the not visible error.
- ErrNotVisible Error = "not visible"
-
- // ErrVisible is the visible error.
- ErrVisible Error = "visible"
-
- // ErrDisabled is the disabled error.
- ErrDisabled Error = "disabled"
-
- // ErrNotSelected is the not selected error.
- ErrNotSelected Error = "not selected"
-
- // ErrInvalidBoxModel is the invalid box model error.
- ErrInvalidBoxModel Error = "invalid box model"
-
- // ErrChannelClosed is the channel closed error.
- ErrChannelClosed Error = "channel closed"
-
- // ErrInvalidTarget is the invalid target error.
- ErrInvalidTarget Error = "invalid target"
-
- // ErrInvalidContext is the invalid context error.
- ErrInvalidContext Error = "invalid context"
-
- // ErrPollingTimeout is the error that the timeout reached before the pageFunction returns a truthy value.
- ErrPollingTimeout Error = "waiting for function failed: timeout"
-)
diff --git a/vendor/github.com/chromedp/chromedp/eval.go b/vendor/github.com/chromedp/chromedp/eval.go
deleted file mode 100644
index 0a6fbed5a1a..00000000000
--- a/vendor/github.com/chromedp/chromedp/eval.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package chromedp
-
-import (
- "context"
- "encoding/json"
- "fmt"
-
- "github.com/chromedp/cdproto/runtime"
-)
-
-// EvaluateAction are actions that evaluate Javascript expressions using
-// runtime.Evaluate.
-type EvaluateAction Action
-
-// Evaluate is an action to evaluate the Javascript expression, unmarshaling
-// the result of the script evaluation to res.
-//
-// When res is a type other than *[]byte, or **runtime.RemoteObject,
-// then the result of the script evaluation will be returned "by value" (ie,
-// JSON-encoded), and subsequently an attempt will be made to json.Unmarshal
-// the script result to res. It returns an error if the script result is
-// "undefined" in this case.
-//
-// Otherwise, when res is a *[]byte, the raw JSON-encoded value of the script
-// result will be placed in res. Similarly, if res is a **runtime.RemoteObject,
-// then res will be set to the low-level protocol type, and no attempt will be
-// made to convert the result. "undefined" is okay in this case.
-//
-// When res is nil, the script result will be ignored (including "undefined").
-//
-// Note: any exception encountered will be returned as an error.
-func Evaluate(expression string, res interface{}, opts ...EvaluateOption) EvaluateAction {
- return ActionFunc(func(ctx context.Context) error {
- // set up parameters
- p := runtime.Evaluate(expression)
- switch res.(type) {
- case nil, **runtime.RemoteObject:
- default:
- p = p.WithReturnByValue(true)
- }
-
- // apply opts
- for _, o := range opts {
- p = o(p)
- }
-
- // evaluate
- v, exp, err := p.Do(ctx)
- if err != nil {
- return err
- }
- if exp != nil {
- return exp
- }
-
- if res == nil {
- return nil
- }
-
- switch x := res.(type) {
- case **runtime.RemoteObject:
- *x = v
- return nil
-
- case *[]byte:
- *x = []byte(v.Value)
- return nil
- }
-
- if v.Type == "undefined" {
- // The unmarshal above would fail with the cryptic
- // "unexpected end of JSON input" error, so try to give
- // a better one here.
- return fmt.Errorf("encountered an undefined value")
- }
-
- // unmarshal
- return json.Unmarshal(v.Value, res)
- })
-}
-
-// EvaluateAsDevTools is an action that evaluates a Javascript expression as
-// Chrome DevTools would, evaluating the expression in the "console" context,
-// and making the Command Line API available to the script.
-//
-// See Evaluate for more information on how script expressions are evaluated.
-//
-// Note: this should not be used with untrusted Javascript.
-func EvaluateAsDevTools(expression string, res interface{}, opts ...EvaluateOption) EvaluateAction {
- return Evaluate(expression, res, append(opts, EvalObjectGroup("console"), EvalWithCommandLineAPI)...)
-}
-
-// EvaluateOption is the type for Javascript evaluation options.
-type EvaluateOption = func(*runtime.EvaluateParams) *runtime.EvaluateParams
-
-// EvalObjectGroup is a evaluate option to set the object group.
-func EvalObjectGroup(objectGroup string) EvaluateOption {
- return func(p *runtime.EvaluateParams) *runtime.EvaluateParams {
- return p.WithObjectGroup(objectGroup)
- }
-}
-
-// EvalWithCommandLineAPI is an evaluate option to make the DevTools Command
-// Line API available to the evaluated script.
-//
-// See Evaluate for more information on how evaluate actions work.
-//
-// Note: this should not be used with untrusted Javascript.
-func EvalWithCommandLineAPI(p *runtime.EvaluateParams) *runtime.EvaluateParams {
- return p.WithIncludeCommandLineAPI(true)
-}
-
-// EvalIgnoreExceptions is a evaluate option that will cause Javascript
-// evaluation to ignore exceptions.
-func EvalIgnoreExceptions(p *runtime.EvaluateParams) *runtime.EvaluateParams {
- return p.WithSilent(true)
-}
-
-// EvalAsValue is a evaluate option that will cause the evaluated Javascript
-// expression to encode the result of the expression as a JSON-encoded value.
-func EvalAsValue(p *runtime.EvaluateParams) *runtime.EvaluateParams {
- return p.WithReturnByValue(true)
-}
diff --git a/vendor/github.com/chromedp/chromedp/input.go b/vendor/github.com/chromedp/chromedp/input.go
deleted file mode 100644
index c808b2be292..00000000000
--- a/vendor/github.com/chromedp/chromedp/input.go
+++ /dev/null
@@ -1,208 +0,0 @@
-package chromedp
-
-import (
- "context"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/input"
- "github.com/chromedp/chromedp/kb"
-)
-
-// MouseAction are mouse input event actions
-type MouseAction Action
-
-// MouseEvent is a mouse event action to dispatch the specified mouse event
-// type at coordinates x, y.
-func MouseEvent(typ input.MouseType, x, y float64, opts ...MouseOption) MouseAction {
- p := input.DispatchMouseEvent(typ, x, y)
- // apply opts
- for _, o := range opts {
- p = o(p)
- }
- return p
-}
-
-// MouseClickXY is an action that sends a left mouse button click (ie,
-// mousePressed and mouseReleased event) to the X, Y location.
-func MouseClickXY(x, y float64, opts ...MouseOption) MouseAction {
- return ActionFunc(func(ctx context.Context) error {
- p := &input.DispatchMouseEventParams{
- Type: input.MousePressed,
- X: x,
- Y: y,
- Button: input.Left,
- ClickCount: 1,
- }
-
- // apply opts
- for _, o := range opts {
- p = o(p)
- }
-
- if err := p.Do(ctx); err != nil {
- return err
- }
-
- p.Type = input.MouseReleased
- return p.Do(ctx)
- })
-}
-
-// MouseClickNode is an action that dispatches a mouse left button click event
-// at the center of a specified node.
-//
-// Note that the window will be scrolled if the node is not within the window's
-// viewport.
-func MouseClickNode(n *cdp.Node, opts ...MouseOption) MouseAction {
- return ActionFunc(func(ctx context.Context) error {
- t := cdp.ExecutorFromContext(ctx).(*Target)
- if t == nil {
- return ErrInvalidTarget
- }
- frameID := t.enclosingFrame(n)
- t.frameMu.RLock()
- execCtx := t.execContexts[frameID]
- t.frameMu.RUnlock()
-
- var pos []float64
- err := evalInCtx(ctx, execCtx, snippet(scrollIntoViewJS, cashX(true), nil, n), &pos)
- if err != nil {
- return err
- }
-
- boxes, err := dom.GetContentQuads().WithNodeID(n.NodeID).Do(ctx)
- if err != nil {
- return err
- }
- content := boxes[0]
-
- c := len(content)
- if c%2 != 0 || c < 1 {
- return ErrInvalidDimensions
- }
-
- var x, y float64
- for i := 0; i < c; i += 2 {
- x += content[i]
- y += content[i+1]
- }
- x /= float64(c / 2)
- y /= float64(c / 2)
-
- return MouseClickXY(x, y, opts...).Do(ctx)
- })
-}
-
-// MouseOption is a mouse action option.
-type MouseOption = func(*input.DispatchMouseEventParams) *input.DispatchMouseEventParams
-
-// Button is a mouse action option to set the button to click from a string.
-func Button(btn string) MouseOption {
- return ButtonType(input.MouseButton(btn))
-}
-
-// ButtonType is a mouse action option to set the button to click.
-func ButtonType(button input.MouseButton) MouseOption {
- return func(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithButton(button)
- }
-}
-
-// ButtonLeft is a mouse action option to set the button clicked as the left
-// mouse button.
-func ButtonLeft(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithButton(input.Left)
-}
-
-// ButtonMiddle is a mouse action option to set the button clicked as the middle
-// mouse button.
-func ButtonMiddle(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithButton(input.Middle)
-}
-
-// ButtonRight is a mouse action option to set the button clicked as the right
-// mouse button.
-func ButtonRight(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithButton(input.Right)
-}
-
-// ButtonNone is a mouse action option to set the button clicked as none (used
-// for mouse movements).
-func ButtonNone(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithButton(input.None)
-}
-
-// ButtonModifiers is a mouse action option to add additional input modifiers
-// for a button click.
-func ButtonModifiers(modifiers ...input.Modifier) MouseOption {
- return func(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- for _, m := range modifiers {
- p.Modifiers |= m
- }
- return p
- }
-}
-
-// ClickCount is a mouse action option to set the click count.
-func ClickCount(n int) MouseOption {
- return func(p *input.DispatchMouseEventParams) *input.DispatchMouseEventParams {
- return p.WithClickCount(int64(n))
- }
-}
-
-// KeyAction are keyboard (key) input event actions.
-type KeyAction Action
-
-// KeyEvent is a key action that synthesizes a keyDown, char, and keyUp event
-// for each rune contained in keys along with any supplied key options.
-//
-// Only well-known, "printable" characters will have char events synthesized.
-//
-// See the SendKeys action to synthesize key events for a specific element
-// node.
-//
-// See the chromedp/kb package for implementation details and list of
-// well-known keys.
-func KeyEvent(keys string, opts ...KeyOption) KeyAction {
- return ActionFunc(func(ctx context.Context) error {
- for _, r := range keys {
- for _, k := range kb.Encode(r) {
- for _, o := range opts {
- o(k)
- }
- if err := k.Do(ctx); err != nil {
- return err
- }
- }
- }
-
- return nil
- })
-}
-
-// KeyEventNode is a key action that dispatches a key event on a element node.
-func KeyEventNode(n *cdp.Node, keys string, opts ...KeyOption) KeyAction {
- return ActionFunc(func(ctx context.Context) error {
- err := dom.Focus().WithNodeID(n.NodeID).Do(ctx)
- if err != nil {
- return err
- }
-
- return KeyEvent(keys, opts...).Do(ctx)
- })
-}
-
-// KeyOption is a key action option.
-type KeyOption = func(*input.DispatchKeyEventParams) *input.DispatchKeyEventParams
-
-// KeyModifiers is a key action option to add additional modifiers on the key
-// press.
-func KeyModifiers(modifiers ...input.Modifier) KeyOption {
- return func(p *input.DispatchKeyEventParams) *input.DispatchKeyEventParams {
- for _, m := range modifiers {
- p.Modifiers |= m
- }
- return p
- }
-}
diff --git a/vendor/github.com/chromedp/chromedp/js.go b/vendor/github.com/chromedp/chromedp/js.go
deleted file mode 100644
index 9d106221bce..00000000000
--- a/vendor/github.com/chromedp/chromedp/js.go
+++ /dev/null
@@ -1,209 +0,0 @@
-package chromedp
-
-import (
- "fmt"
-
- "github.com/chromedp/cdproto/cdp"
-)
-
-const (
- // textJS is a javascript snippet that returns the concatenated innerText of all
- // visible (ie, offsetWidth || offsetHeight || getClientRects().length ) children.
- textJS = `(function(a) {
- var s = '';
- for (var i = 0; i < a.length; i++) {
- if (a[i].offsetWidth || a[i].offsetHeight || a[i].getClientRects().length) {
- s += a[i].innerText;
- }
- }
- return s;
- })(%s)`
-
- // textContentJS is a javascript snippet that returns the concatenated textContent
- // of all children.
- textContentJS = `(function(a) {
- var s = '';
- for (var i = 0; i < a.length; i++) {
- s += a[i].textContent;
- }
- return s;
- })(%s)`
-
- // blurJS is a javscript snippet that blurs the specified element.
- blurJS = `(function(a) {
- a.blur();
- return true;
- })(%s)`
-
- // scrollIntoViewJS is a javascript snippet that scrolls the specified node
- // into the window's viewport (if needed), returning the actual window x/y
- // after execution.
- scrollIntoViewJS = `(function(a) {
- a.scrollIntoViewIfNeeded(true);
- return [window.scrollX, window.scrollY];
- })(%s)`
-
- // submitJS is a javascript snippet that will call the containing form's
- // submit function, returning true or false if the call was successful.
- submitJS = `(function(a) {
- if (a.nodeName === 'FORM') {
- HTMLFormElement.prototype.submit.call(a);
- return true;
- } else if (a.form !== null) {
- HTMLFormElement.prototype.submit.call(a.form);
- return true;
- }
- return false;
- })(%s)`
-
- // resetJS is a javascript snippet that will call the containing form's
- // reset function, returning true or false if the call was successful.
- resetJS = `(function(a) {
- if (a.nodeName === 'FORM') {
- HTMLFormElement.prototype.reset.call(a);
- return true;
- } else if (a.form !== null) {
- HTMLFormElement.prototype.reset.call(a.form);
- return true;
- }
- return false;
- })(%s)`
-
- // attributeJS is a javascript snippet that returns the attribute of a specified
- // node.
- attributeJS = `(function(a, n) {
- return a[n];
- })(%s, %q)`
-
- // setAttributeJS is a javascript snippet that sets the value of the specified
- // node, and returns the value.
- setAttributeJS = `(function(a, n, v) {
- a[n] = v;
- if (n === 'value') {
- a.dispatchEvent(new Event('input', { bubbles: true }));
- a.dispatchEvent(new Event('change', { bubbles: true }));
- }
- return a[n];
- })(%s, %q, %q)`
-
- // visibleJS is a javascript snippet that returns true or false depending on if
- // the specified node's offsetWidth, offsetHeight or getClientRects().length is
- // not null.
- visibleJS = `(function(a) {
- return Boolean( a.offsetWidth || a.offsetHeight || a.getClientRects().length );
- })(%s)`
-
- // waitForPredicatePageFunction is a javascript snippet that runs the polling in the
- // browser. It's copied from puppeteer. See
- // https://github.com/puppeteer/puppeteer/blob/669f04a7a6e96cc8353a8cb152898edbc25e7c15/src/common/DOMWorld.ts#L870-L944
- // It's modified to make mutation polling respect timeout even when there is not DOM mutation.
- waitForPredicatePageFunction = `async function waitForPredicatePageFunction(predicateBody, polling, timeout, ...args) {
- const predicate = new Function('...args', predicateBody);
- let timedOut = false;
- if (timeout)
- setTimeout(() => (timedOut = true), timeout);
- if (polling === 'raf')
- return await pollRaf();
- if (polling === 'mutation')
- return await pollMutation();
- if (typeof polling === 'number')
- return await pollInterval(polling);
- /**
- * @returns {!Promise<*>}
- */
- async function pollMutation() {
- const success = await predicate(...args);
- if (success)
- return Promise.resolve(success);
- let fulfill;
- const result = new Promise((x) => (fulfill = x));
- const observer = new MutationObserver(async () => {
- if (timedOut) {
- observer.disconnect();
- fulfill();
- }
- const success = await predicate(...args);
- if (success) {
- observer.disconnect();
- fulfill(success);
- }
- });
- observer.observe(document, {
- childList: true,
- subtree: true,
- attributes: true,
- });
- if (timeout)
- setTimeout(() => {
- observer.disconnect();
- fulfill();
- }, timeout);
- return result;
- }
- async function pollRaf() {
- let fulfill;
- const result = new Promise((x) => (fulfill = x));
- await onRaf();
- return result;
- async function onRaf() {
- if (timedOut) {
- fulfill();
- return;
- }
- const success = await predicate(...args);
- if (success)
- fulfill(success);
- else
- requestAnimationFrame(onRaf);
- }
- }
- async function pollInterval(pollInterval) {
- let fulfill;
- const result = new Promise((x) => (fulfill = x));
- await onTimeout();
- return result;
- async function onTimeout() {
- if (timedOut) {
- fulfill();
- return;
- }
- const success = await predicate(...args);
- if (success)
- fulfill(success);
- else
- setTimeout(onTimeout, pollInterval);
- }
- }
- }`
-)
-
-// snippet builds a Javascript expression snippet.
-func snippet(js string, f func(n *cdp.Node) string, sel interface{}, n *cdp.Node, v ...interface{}) string {
- switch s := sel.(type) {
- case *Selector:
- if s != nil && s.raw {
- return fmt.Sprintf(js, append([]interface{}{s.selAsString()}, v...)...)
- }
- }
- return fmt.Sprintf(js, append([]interface{}{f(n)}, v...)...)
-}
-
-// cashX returns the $x() expression using the node's full xpath value.
-func cashX(flatten bool) func(*cdp.Node) string {
- return func(n *cdp.Node) string {
- if flatten {
- return fmt.Sprintf(`$x(%q)[0]`, n.PartialXPath())
- }
- return fmt.Sprintf(`$x(%q)`, n.PartialXPath())
- }
-}
-
-// cashXNode returns the $x(/node()) expression using the node's full xpath value.
-func cashXNode(flatten bool) func(*cdp.Node) string {
- return func(n *cdp.Node) string {
- if flatten {
- return fmt.Sprintf(`$x(%q)[0]`, n.PartialXPath()+"/node()")
- }
- return fmt.Sprintf(`$x(%q)`, n.PartialXPath()+"/node()")
- }
-}
diff --git a/vendor/github.com/chromedp/chromedp/kb/kb.go b/vendor/github.com/chromedp/chromedp/kb/kb.go
deleted file mode 100644
index a8d2630401f..00000000000
--- a/vendor/github.com/chromedp/chromedp/kb/kb.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Package kb provides keyboard mappings for Chrome DOM Keys for use with input
-// events.
-package kb
-
-//go:generate go run gen.go -out keys.go -pkg kb
-
-import (
- "runtime"
- "unicode"
-
- "github.com/chromedp/cdproto/input"
-)
-
-// Key contains information for generating a key press based off the unicode
-// value.
-//
-// Example data for the following runes:
-// '\r' '\n' | ',' '<' | 'a' 'A' | '\u0a07'
-// _____________________________________________________
-type Key struct {
- // Code is the key code:
- // "Enter" | "Comma" | "KeyA" | "MediaStop"
- Code string
-
- // Key is the key value:
- // "Enter" | "," "<" | "a" "A" | "MediaStop"
- Key string
-
- // Text is the text for printable keys:
- // "\r" "\r" | "," "<" | "a" "A" | ""
- Text string
-
- // Unmodified is the unmodified text for printable keys:
- // "\r" "\r" | "," "," | "a" "a" | ""
- Unmodified string
-
- // Native is the native scan code.
- // 0x13 0x13 | 0xbc 0xbc | 0x61 0x41 | 0x00ae
- Native int64
-
- // Windows is the windows scan code.
- // 0x13 0x13 | 0xbc 0xbc | 0x61 0x41 | 0xe024
- Windows int64
-
- // Shift indicates whether or not the Shift modifier should be sent.
- // false false | false true | false true | false
- Shift bool
-
- // Print indicates whether or not the character is a printable character
- // (ie, should a "char" event be generated).
- // true true | true true | true true | false
- Print bool
-}
-
-// EncodeUnidentified encodes a keyDown, char, and keyUp sequence for an unidentified rune.
-//
-// TODO: write unit tests for non-latin/ascii unicode characters.
-func EncodeUnidentified(r rune) []*input.DispatchKeyEventParams {
- // create
- keyDown := input.DispatchKeyEventParams{
- Key: "Unidentified",
- /*NativeVirtualKeyCode: int64(r), // not sure if should be specifying the key code or not ...
- WindowsVirtualKeyCode: int64(r),*/
- }
- keyUp := keyDown
- keyDown.Type, keyUp.Type = input.KeyDown, input.KeyUp
-
- // printable, so create char event
- if unicode.IsPrint(r) {
- keyChar := keyDown
- keyChar.Type = input.KeyChar
- keyChar.Text = string(r)
- keyChar.UnmodifiedText = string(r)
-
- return []*input.DispatchKeyEventParams{&keyDown, &keyChar, &keyUp}
- }
-
- return []*input.DispatchKeyEventParams{&keyDown, &keyUp}
-}
-
-// Encode encodes a keyDown, char, and keyUp sequence for the specified rune.
-func Encode(r rune) []*input.DispatchKeyEventParams {
- // force \n -> \r
- if r == '\n' {
- r = '\r'
- }
-
- // if not known key, encode as unidentified
- v, ok := Keys[r]
- if !ok {
- return EncodeUnidentified(r)
- }
-
- // create
- keyDown := input.DispatchKeyEventParams{
- Key: v.Key,
- Code: v.Code,
- NativeVirtualKeyCode: v.Native,
- WindowsVirtualKeyCode: v.Windows,
- }
- if runtime.GOOS == "darwin" {
- keyDown.NativeVirtualKeyCode = 0
- }
- if v.Shift {
- keyDown.Modifiers |= input.ModifierShift
- }
- keyUp := keyDown
- keyDown.Type, keyUp.Type = input.KeyDown, input.KeyUp
-
- // printable, so create char event
- if v.Print {
- keyChar := keyDown
- keyChar.Type = input.KeyChar
- keyChar.Text = v.Text
- keyChar.UnmodifiedText = v.Unmodified
-
- // the virtual key code for char events for printable characters will
- // be different than the defined keycode when not shifted...
- //
- // specifically, it always sends the ascii value as the scan code,
- // which is available as the rune.
- keyChar.NativeVirtualKeyCode = int64(r)
- keyChar.WindowsVirtualKeyCode = int64(r)
-
- return []*input.DispatchKeyEventParams{&keyDown, &keyChar, &keyUp}
- }
-
- return []*input.DispatchKeyEventParams{&keyDown, &keyUp}
-}
diff --git a/vendor/github.com/chromedp/chromedp/kb/keys.go b/vendor/github.com/chromedp/chromedp/kb/keys.go
deleted file mode 100644
index 4984292eb9a..00000000000
--- a/vendor/github.com/chromedp/chromedp/kb/keys.go
+++ /dev/null
@@ -1,375 +0,0 @@
-package kb
-
-// Code generated by gen.go. DO NOT EDIT.
-
-// DOM keys.
-const (
- Backspace = "\b"
- Tab = "\t"
- Enter = "\r"
- Escape = "\u001b"
- Quote = "'"
- Backslash = "\\"
- Delete = "\u007f"
- Alt = "\u0102"
- CapsLock = "\u0104"
- Control = "\u0105"
- Fn = "\u0106"
- FnLock = "\u0107"
- Hyper = "\u0108"
- Meta = "\u0109"
- NumLock = "\u010a"
- ScrollLock = "\u010c"
- Shift = "\u010d"
- Super = "\u010e"
- ArrowDown = "\u0301"
- ArrowLeft = "\u0302"
- ArrowRight = "\u0303"
- ArrowUp = "\u0304"
- End = "\u0305"
- Home = "\u0306"
- PageDown = "\u0307"
- PageUp = "\u0308"
- Clear = "\u0401"
- Copy = "\u0402"
- Cut = "\u0404"
- Insert = "\u0407"
- Paste = "\u0408"
- Redo = "\u0409"
- Undo = "\u040a"
- Again = "\u0502"
- Cancel = "\u0504"
- ContextMenu = "\u0505"
- Find = "\u0507"
- Help = "\u0508"
- Pause = "\u0509"
- Props = "\u050b"
- Select = "\u050c"
- ZoomIn = "\u050d"
- ZoomOut = "\u050e"
- BrightnessDown = "\u0601"
- BrightnessUp = "\u0602"
- Eject = "\u0604"
- LogOff = "\u0605"
- Power = "\u0606"
- PrintScreen = "\u0608"
- WakeUp = "\u060b"
- Convert = "\u0705"
- ModeChange = "\u070b"
- NonConvert = "\u070d"
- HangulMode = "\u0711"
- HanjaMode = "\u0712"
- Hiragana = "\u0716"
- KanaMode = "\u0718"
- Katakana = "\u071a"
- ZenkakuHankaku = "\u071d"
- F1 = "\u0801"
- F2 = "\u0802"
- F3 = "\u0803"
- F4 = "\u0804"
- F5 = "\u0805"
- F6 = "\u0806"
- F7 = "\u0807"
- F8 = "\u0808"
- F9 = "\u0809"
- F10 = "\u080a"
- F11 = "\u080b"
- F12 = "\u080c"
- F13 = "\u080d"
- F14 = "\u080e"
- F15 = "\u080f"
- F16 = "\u0810"
- F17 = "\u0811"
- F18 = "\u0812"
- F19 = "\u0813"
- F20 = "\u0814"
- F21 = "\u0815"
- F22 = "\u0816"
- F23 = "\u0817"
- F24 = "\u0818"
- Close = "\u0a01"
- MailForward = "\u0a02"
- MailReply = "\u0a03"
- MailSend = "\u0a04"
- MediaPlayPause = "\u0a05"
- MediaStop = "\u0a07"
- MediaTrackNext = "\u0a08"
- MediaTrackPrevious = "\u0a09"
- New = "\u0a0a"
- Open = "\u0a0b"
- Print = "\u0a0c"
- Save = "\u0a0d"
- SpellCheck = "\u0a0e"
- AudioVolumeDown = "\u0a0f"
- AudioVolumeUp = "\u0a10"
- AudioVolumeMute = "\u0a11"
- LaunchApplication2 = "\u0b01"
- LaunchCalendar = "\u0b02"
- LaunchMail = "\u0b03"
- LaunchMediaPlayer = "\u0b04"
- LaunchMusicPlayer = "\u0b05"
- LaunchApplication1 = "\u0b06"
- LaunchScreenSaver = "\u0b07"
- LaunchSpreadsheet = "\u0b08"
- LaunchWebBrowser = "\u0b09"
- LaunchContacts = "\u0b0c"
- LaunchPhone = "\u0b0d"
- LaunchAssistant = "\u0b0e"
- BrowserBack = "\u0c01"
- BrowserFavorites = "\u0c02"
- BrowserForward = "\u0c03"
- BrowserHome = "\u0c04"
- BrowserRefresh = "\u0c05"
- BrowserSearch = "\u0c06"
- BrowserStop = "\u0c07"
- ChannelDown = "\u0d0a"
- ChannelUp = "\u0d0b"
- ClosedCaptionToggle = "\u0d12"
- Exit = "\u0d15"
- Guide = "\u0d22"
- Info = "\u0d25"
- MediaFastForward = "\u0d2c"
- MediaLast = "\u0d2d"
- MediaPause = "\u0d2e"
- MediaPlay = "\u0d2f"
- MediaRecord = "\u0d30"
- MediaRewind = "\u0d31"
- Settings = "\u0d43"
- ZoomToggle = "\u0d4e"
- AudioBassBoostToggle = "\u0e02"
- SpeechInputToggle = "\u0f02"
- AppSwitch = "\u1001"
-)
-
-// Keys is the map of unicode characters to their DOM key data.
-var Keys = map[rune]*Key{
- '\b': {"Backspace", "Backspace", "", "", 8, 8, false, false},
- '\t': {"Tab", "Tab", "", "", 9, 9, false, false},
- '\r': {"Enter", "Enter", "\r", "\r", 13, 13, false, true},
- '\u001b': {"Escape", "Escape", "", "", 27, 27, false, false},
- ' ': {"Space", " ", " ", " ", 32, 32, false, true},
- '!': {"Digit1", "!", "!", "1", 49, 49, true, true},
- '"': {"Quote", "\"", "\"", "'", 222, 222, true, true},
- '#': {"Digit3", "#", "#", "3", 51, 51, true, true},
- '$': {"Digit4", "$", "$", "4", 52, 52, true, true},
- '%': {"Digit5", "%", "%", "5", 53, 53, true, true},
- '&': {"Digit7", "&", "&", "7", 55, 55, true, true},
- '\'': {"Quote", "'", "'", "'", 222, 222, false, true},
- '(': {"Digit9", "(", "(", "9", 57, 57, true, true},
- ')': {"Digit0", ")", ")", "0", 48, 48, true, true},
- '*': {"Digit8", "*", "*", "8", 56, 56, true, true},
- '+': {"Equal", "+", "+", "=", 187, 187, true, true},
- ',': {"Comma", ",", ",", ",", 188, 188, false, true},
- '-': {"Minus", "-", "-", "-", 189, 189, false, true},
- '.': {"Period", ".", ".", ".", 190, 190, false, true},
- '/': {"Slash", "/", "/", "/", 191, 191, false, true},
- '0': {"Digit0", "0", "0", "0", 48, 48, false, true},
- '1': {"Digit1", "1", "1", "1", 49, 49, false, true},
- '2': {"Digit2", "2", "2", "2", 50, 50, false, true},
- '3': {"Digit3", "3", "3", "3", 51, 51, false, true},
- '4': {"Digit4", "4", "4", "4", 52, 52, false, true},
- '5': {"Digit5", "5", "5", "5", 53, 53, false, true},
- '6': {"Digit6", "6", "6", "6", 54, 54, false, true},
- '7': {"Digit7", "7", "7", "7", 55, 55, false, true},
- '8': {"Digit8", "8", "8", "8", 56, 56, false, true},
- '9': {"Digit9", "9", "9", "9", 57, 57, false, true},
- ':': {"Semicolon", ":", ":", ";", 186, 186, true, true},
- ';': {"Semicolon", ";", ";", ";", 186, 186, false, true},
- '<': {"Comma", "<", "<", ",", 188, 188, true, true},
- '=': {"Equal", "=", "=", "=", 187, 187, false, true},
- '>': {"Period", ">", ">", ".", 190, 190, true, true},
- '?': {"Slash", "?", "?", "/", 191, 191, true, true},
- '@': {"Digit2", "@", "@", "2", 50, 50, true, true},
- 'A': {"KeyA", "A", "A", "a", 65, 65, true, true},
- 'B': {"KeyB", "B", "B", "b", 66, 66, true, true},
- 'C': {"KeyC", "C", "C", "c", 67, 67, true, true},
- 'D': {"KeyD", "D", "D", "d", 68, 68, true, true},
- 'E': {"KeyE", "E", "E", "e", 69, 69, true, true},
- 'F': {"KeyF", "F", "F", "f", 70, 70, true, true},
- 'G': {"KeyG", "G", "G", "g", 71, 71, true, true},
- 'H': {"KeyH", "H", "H", "h", 72, 72, true, true},
- 'I': {"KeyI", "I", "I", "i", 73, 73, true, true},
- 'J': {"KeyJ", "J", "J", "j", 74, 74, true, true},
- 'K': {"KeyK", "K", "K", "k", 75, 75, true, true},
- 'L': {"KeyL", "L", "L", "l", 76, 76, true, true},
- 'M': {"KeyM", "M", "M", "m", 77, 77, true, true},
- 'N': {"KeyN", "N", "N", "n", 78, 78, true, true},
- 'O': {"KeyO", "O", "O", "o", 79, 79, true, true},
- 'P': {"KeyP", "P", "P", "p", 80, 80, true, true},
- 'Q': {"KeyQ", "Q", "Q", "q", 81, 81, true, true},
- 'R': {"KeyR", "R", "R", "r", 82, 82, true, true},
- 'S': {"KeyS", "S", "S", "s", 83, 83, true, true},
- 'T': {"KeyT", "T", "T", "t", 84, 84, true, true},
- 'U': {"KeyU", "U", "U", "u", 85, 85, true, true},
- 'V': {"KeyV", "V", "V", "v", 86, 86, true, true},
- 'W': {"KeyW", "W", "W", "w", 87, 87, true, true},
- 'X': {"KeyX", "X", "X", "x", 88, 88, true, true},
- 'Y': {"KeyY", "Y", "Y", "y", 89, 89, true, true},
- 'Z': {"KeyZ", "Z", "Z", "z", 90, 90, true, true},
- '[': {"BracketLeft", "[", "[", "[", 219, 219, false, true},
- '\\': {"Backslash", "\\", "\\", "\\", 220, 220, false, true},
- ']': {"BracketRight", "]", "]", "]", 221, 221, false, true},
- '^': {"Digit6", "^", "^", "6", 54, 54, true, true},
- '_': {"Minus", "_", "_", "-", 189, 189, true, true},
- '`': {"Backquote", "`", "`", "`", 192, 192, false, true},
- 'a': {"KeyA", "a", "a", "a", 65, 65, false, true},
- 'b': {"KeyB", "b", "b", "b", 66, 66, false, true},
- 'c': {"KeyC", "c", "c", "c", 67, 67, false, true},
- 'd': {"KeyD", "d", "d", "d", 68, 68, false, true},
- 'e': {"KeyE", "e", "e", "e", 69, 69, false, true},
- 'f': {"KeyF", "f", "f", "f", 70, 70, false, true},
- 'g': {"KeyG", "g", "g", "g", 71, 71, false, true},
- 'h': {"KeyH", "h", "h", "h", 72, 72, false, true},
- 'i': {"KeyI", "i", "i", "i", 73, 73, false, true},
- 'j': {"KeyJ", "j", "j", "j", 74, 74, false, true},
- 'k': {"KeyK", "k", "k", "k", 75, 75, false, true},
- 'l': {"KeyL", "l", "l", "l", 76, 76, false, true},
- 'm': {"KeyM", "m", "m", "m", 77, 77, false, true},
- 'n': {"KeyN", "n", "n", "n", 78, 78, false, true},
- 'o': {"KeyO", "o", "o", "o", 79, 79, false, true},
- 'p': {"KeyP", "p", "p", "p", 80, 80, false, true},
- 'q': {"KeyQ", "q", "q", "q", 81, 81, false, true},
- 'r': {"KeyR", "r", "r", "r", 82, 82, false, true},
- 's': {"KeyS", "s", "s", "s", 83, 83, false, true},
- 't': {"KeyT", "t", "t", "t", 84, 84, false, true},
- 'u': {"KeyU", "u", "u", "u", 85, 85, false, true},
- 'v': {"KeyV", "v", "v", "v", 86, 86, false, true},
- 'w': {"KeyW", "w", "w", "w", 87, 87, false, true},
- 'x': {"KeyX", "x", "x", "x", 88, 88, false, true},
- 'y': {"KeyY", "y", "y", "y", 89, 89, false, true},
- 'z': {"KeyZ", "z", "z", "z", 90, 90, false, true},
- '{': {"BracketLeft", "{", "{", "[", 219, 219, true, true},
- '|': {"Backslash", "|", "|", "\\", 220, 220, true, true},
- '}': {"BracketRight", "}", "}", "]", 221, 221, true, true},
- '~': {"Backquote", "~", "~", "`", 192, 192, true, true},
- '\u007f': {"Delete", "Delete", "", "", 46, 46, false, false},
- '¥': {"IntlYen", "¥", "¥", "¥", 220, 220, false, true},
- '\u0102': {"AltLeft", "Alt", "", "", 164, 164, false, false},
- '\u0104': {"CapsLock", "CapsLock", "", "", 20, 20, false, false},
- '\u0105': {"ControlLeft", "Control", "", "", 162, 162, false, false},
- '\u0106': {"Fn", "Fn", "", "", 0, 0, false, false},
- '\u0107': {"FnLock", "FnLock", "", "", 0, 0, false, false},
- '\u0108': {"Hyper", "Hyper", "", "", 0, 0, false, false},
- '\u0109': {"MetaLeft", "Meta", "", "", 91, 91, false, false},
- '\u010a': {"NumLock", "NumLock", "", "", 144, 144, false, false},
- '\u010c': {"ScrollLock", "ScrollLock", "", "", 145, 145, false, false},
- '\u010d': {"ShiftLeft", "Shift", "", "", 160, 160, false, false},
- '\u010e': {"Super", "Super", "", "", 0, 0, false, false},
- '\u0301': {"ArrowDown", "ArrowDown", "", "", 40, 40, false, false},
- '\u0302': {"ArrowLeft", "ArrowLeft", "", "", 37, 37, false, false},
- '\u0303': {"ArrowRight", "ArrowRight", "", "", 39, 39, false, false},
- '\u0304': {"ArrowUp", "ArrowUp", "", "", 38, 38, false, false},
- '\u0305': {"End", "End", "", "", 35, 35, false, false},
- '\u0306': {"Home", "Home", "", "", 36, 36, false, false},
- '\u0307': {"PageDown", "PageDown", "", "", 34, 34, false, false},
- '\u0308': {"PageUp", "PageUp", "", "", 33, 33, false, false},
- '\u0401': {"NumpadClear", "Clear", "", "", 12, 12, false, false},
- '\u0402': {"Copy", "Copy", "", "", 0, 0, false, false},
- '\u0404': {"Cut", "Cut", "", "", 0, 0, false, false},
- '\u0407': {"Insert", "Insert", "", "", 45, 45, false, false},
- '\u0408': {"Paste", "Paste", "", "", 0, 0, false, false},
- '\u0409': {"Redo", "Redo", "", "", 0, 0, false, false},
- '\u040a': {"Undo", "Undo", "", "", 0, 0, false, false},
- '\u0502': {"Again", "Again", "", "", 0, 0, false, false},
- '\u0504': {"Abort", "Cancel", "", "", 3, 3, false, false},
- '\u0505': {"ContextMenu", "ContextMenu", "", "", 93, 93, false, false},
- '\u0507': {"Find", "Find", "", "", 0, 0, false, false},
- '\u0508': {"Help", "Help", "", "", 47, 47, false, false},
- '\u0509': {"Pause", "Pause", "", "", 19, 19, false, false},
- '\u050b': {"Props", "Props", "", "", 0, 0, false, false},
- '\u050c': {"Select", "Select", "", "", 41, 41, false, false},
- '\u050d': {"ZoomIn", "ZoomIn", "", "", 0, 0, false, false},
- '\u050e': {"ZoomOut", "ZoomOut", "", "", 0, 0, false, false},
- '\u0601': {"BrightnessDown", "BrightnessDown", "", "", 216, 0, false, false},
- '\u0602': {"BrightnessUp", "BrightnessUp", "", "", 217, 0, false, false},
- '\u0604': {"Eject", "Eject", "", "", 0, 0, false, false},
- '\u0605': {"LogOff", "LogOff", "", "", 0, 0, false, false},
- '\u0606': {"Power", "Power", "", "", 152, 0, false, false},
- '\u0608': {"PrintScreen", "PrintScreen", "", "", 44, 44, false, false},
- '\u060b': {"WakeUp", "WakeUp", "", "", 0, 0, false, false},
- '\u0705': {"Convert", "Convert", "", "", 28, 28, false, false},
- '\u070b': {"KeyboardLayoutSelect", "ModeChange", "", "", 0, 0, false, false},
- '\u070d': {"NonConvert", "NonConvert", "", "", 29, 29, false, false},
- '\u0711': {"Lang1", "HangulMode", "", "", 21, 21, false, false},
- '\u0712': {"Lang2", "HanjaMode", "", "", 25, 25, false, false},
- '\u0716': {"Lang4", "Hiragana", "", "", 0, 0, false, false},
- '\u0718': {"KanaMode", "KanaMode", "", "", 21, 21, false, false},
- '\u071a': {"Lang3", "Katakana", "", "", 0, 0, false, false},
- '\u071d': {"Lang5", "ZenkakuHankaku", "", "", 0, 0, false, false},
- '\u0801': {"F1", "F1", "", "", 112, 112, false, false},
- '\u0802': {"F2", "F2", "", "", 113, 113, false, false},
- '\u0803': {"F3", "F3", "", "", 114, 114, false, false},
- '\u0804': {"F4", "F4", "", "", 115, 115, false, false},
- '\u0805': {"F5", "F5", "", "", 116, 116, false, false},
- '\u0806': {"F6", "F6", "", "", 117, 117, false, false},
- '\u0807': {"F7", "F7", "", "", 118, 118, false, false},
- '\u0808': {"F8", "F8", "", "", 119, 119, false, false},
- '\u0809': {"F9", "F9", "", "", 120, 120, false, false},
- '\u080a': {"F10", "F10", "", "", 121, 121, false, false},
- '\u080b': {"F11", "F11", "", "", 122, 122, false, false},
- '\u080c': {"F12", "F12", "", "", 123, 123, false, false},
- '\u080d': {"F13", "F13", "", "", 124, 124, false, false},
- '\u080e': {"F14", "F14", "", "", 125, 125, false, false},
- '\u080f': {"F15", "F15", "", "", 126, 126, false, false},
- '\u0810': {"F16", "F16", "", "", 127, 127, false, false},
- '\u0811': {"F17", "F17", "", "", 128, 128, false, false},
- '\u0812': {"F18", "F18", "", "", 129, 129, false, false},
- '\u0813': {"F19", "F19", "", "", 130, 130, false, false},
- '\u0814': {"F20", "F20", "", "", 131, 131, false, false},
- '\u0815': {"F21", "F21", "", "", 132, 132, false, false},
- '\u0816': {"F22", "F22", "", "", 133, 133, false, false},
- '\u0817': {"F23", "F23", "", "", 134, 134, false, false},
- '\u0818': {"F24", "F24", "", "", 135, 135, false, false},
- '\u0a01': {"Close", "Close", "", "", 0, 0, false, false},
- '\u0a02': {"MailForward", "MailForward", "", "", 0, 0, false, false},
- '\u0a03': {"MailReply", "MailReply", "", "", 0, 0, false, false},
- '\u0a04': {"MailSend", "MailSend", "", "", 0, 0, false, false},
- '\u0a05': {"MediaPlayPause", "MediaPlayPause", "", "", 179, 179, false, false},
- '\u0a07': {"MediaStop", "MediaStop", "", "", 178, 178, false, false},
- '\u0a08': {"MediaTrackNext", "MediaTrackNext", "", "", 176, 176, false, false},
- '\u0a09': {"MediaTrackPrevious", "MediaTrackPrevious", "", "", 177, 177, false, false},
- '\u0a0a': {"New", "New", "", "", 0, 0, false, false},
- '\u0a0b': {"Open", "Open", "", "", 43, 43, false, false},
- '\u0a0c': {"Print", "Print", "", "", 0, 0, false, false},
- '\u0a0d': {"Save", "Save", "", "", 0, 0, false, false},
- '\u0a0e': {"SpellCheck", "SpellCheck", "", "", 0, 0, false, false},
- '\u0a0f': {"AudioVolumeDown", "AudioVolumeDown", "", "", 174, 174, false, false},
- '\u0a10': {"AudioVolumeUp", "AudioVolumeUp", "", "", 175, 175, false, false},
- '\u0a11': {"AudioVolumeMute", "AudioVolumeMute", "", "", 173, 173, false, false},
- '\u0b01': {"LaunchApp2", "LaunchApplication2", "", "", 183, 183, false, false},
- '\u0b02': {"LaunchCalendar", "LaunchCalendar", "", "", 0, 0, false, false},
- '\u0b03': {"LaunchMail", "LaunchMail", "", "", 180, 180, false, false},
- '\u0b04': {"MediaSelect", "LaunchMediaPlayer", "", "", 181, 181, false, false},
- '\u0b05': {"LaunchMusicPlayer", "LaunchMusicPlayer", "", "", 0, 0, false, false},
- '\u0b06': {"LaunchApp1", "LaunchApplication1", "", "", 182, 182, false, false},
- '\u0b07': {"LaunchScreenSaver", "LaunchScreenSaver", "", "", 0, 0, false, false},
- '\u0b08': {"LaunchSpreadsheet", "LaunchSpreadsheet", "", "", 0, 0, false, false},
- '\u0b09': {"LaunchWebBrowser", "LaunchWebBrowser", "", "", 0, 0, false, false},
- '\u0b0c': {"LaunchContacts", "LaunchContacts", "", "", 0, 0, false, false},
- '\u0b0d': {"LaunchPhone", "LaunchPhone", "", "", 0, 0, false, false},
- '\u0b0e': {"LaunchAssistant", "LaunchAssistant", "", "", 153, 0, false, false},
- '\u0c01': {"BrowserBack", "BrowserBack", "", "", 166, 166, false, false},
- '\u0c02': {"BrowserFavorites", "BrowserFavorites", "", "", 171, 171, false, false},
- '\u0c03': {"BrowserForward", "BrowserForward", "", "", 167, 167, false, false},
- '\u0c04': {"BrowserHome", "BrowserHome", "", "", 172, 172, false, false},
- '\u0c05': {"BrowserRefresh", "BrowserRefresh", "", "", 168, 168, false, false},
- '\u0c06': {"BrowserSearch", "BrowserSearch", "", "", 170, 170, false, false},
- '\u0c07': {"BrowserStop", "BrowserStop", "", "", 169, 169, false, false},
- '\u0d0a': {"ChannelDown", "ChannelDown", "", "", 0, 0, false, false},
- '\u0d0b': {"ChannelUp", "ChannelUp", "", "", 0, 0, false, false},
- '\u0d12': {"ClosedCaptionToggle", "ClosedCaptionToggle", "", "", 0, 0, false, false},
- '\u0d15': {"Exit", "Exit", "", "", 0, 0, false, false},
- '\u0d22': {"Guide", "Guide", "", "", 0, 0, false, false},
- '\u0d25': {"Info", "Info", "", "", 0, 0, false, false},
- '\u0d2c': {"MediaFastForward", "MediaFastForward", "", "", 0, 0, false, false},
- '\u0d2d': {"MediaLast", "MediaLast", "", "", 0, 0, false, false},
- '\u0d2e': {"MediaPause", "MediaPause", "", "", 0, 0, false, false},
- '\u0d2f': {"MediaPlay", "MediaPlay", "", "", 0, 0, false, false},
- '\u0d30': {"MediaRecord", "MediaRecord", "", "", 0, 0, false, false},
- '\u0d31': {"MediaRewind", "MediaRewind", "", "", 0, 0, false, false},
- '\u0d43': {"LaunchControlPanel", "Settings", "", "", 154, 0, false, false},
- '\u0d4e': {"ZoomToggle", "ZoomToggle", "", "", 251, 251, false, false},
- '\u0e02': {"AudioBassBoostToggle", "AudioBassBoostToggle", "", "", 0, 0, false, false},
- '\u0f02': {"SpeechInputToggle", "SpeechInputToggle", "", "", 0, 0, false, false},
- '\u1001': {"SelectTask", "AppSwitch", "", "", 0, 0, false, false},
-}
diff --git a/vendor/github.com/chromedp/chromedp/nav.go b/vendor/github.com/chromedp/chromedp/nav.go
deleted file mode 100644
index f2e58e9f1ab..00000000000
--- a/vendor/github.com/chromedp/chromedp/nav.go
+++ /dev/null
@@ -1,131 +0,0 @@
-package chromedp
-
-import (
- "context"
- "errors"
- "fmt"
-
- "github.com/chromedp/cdproto/page"
-)
-
-// NavigateAction are actions which always trigger a page navigation, waiting
-// for the page to load.
-//
-// Note that these actions don't collect HTTP response information; for that,
-// see RunResponse.
-type NavigateAction Action
-
-// Navigate is an action that navigates the current frame.
-func Navigate(urlstr string) NavigateAction {
- return responseAction(nil, ActionFunc(func(ctx context.Context) error {
- _, _, errorText, err := page.Navigate(urlstr).Do(ctx)
- if err != nil {
- return err
- }
- if errorText != "" {
- return fmt.Errorf("page load error %s", errorText)
- }
- return nil
- }))
-}
-
-// NavigationEntries is an action that retrieves the page's navigation history
-// entries.
-func NavigationEntries(currentIndex *int64, entries *[]*page.NavigationEntry) Action {
- if currentIndex == nil || entries == nil {
- panic("currentIndex and entries cannot be nil")
- }
-
- return ActionFunc(func(ctx context.Context) error {
- var err error
- *currentIndex, *entries, err = page.GetNavigationHistory().Do(ctx)
- return err
- })
-}
-
-// NavigateToHistoryEntry is an action to navigate to the specified navigation
-// entry.
-func NavigateToHistoryEntry(entryID int64) NavigateAction {
- return responseAction(nil, page.NavigateToHistoryEntry(entryID))
-}
-
-// NavigateBack is an action that navigates the current frame backwards in its
-// history.
-func NavigateBack() NavigateAction {
- return responseAction(nil, ActionFunc(func(ctx context.Context) error {
- cur, entries, err := page.GetNavigationHistory().Do(ctx)
- if err != nil {
- return err
- }
-
- if cur <= 0 || cur > int64(len(entries)-1) {
- return errors.New("invalid navigation entry")
- }
-
- entryID := entries[cur-1].ID
- return page.NavigateToHistoryEntry(entryID).Do(ctx)
- }))
-}
-
-// NavigateForward is an action that navigates the current frame forwards in
-// its history.
-func NavigateForward() NavigateAction {
- return responseAction(nil, ActionFunc(func(ctx context.Context) error {
- cur, entries, err := page.GetNavigationHistory().Do(ctx)
- if err != nil {
- return err
- }
-
- if cur < 0 || cur >= int64(len(entries)-1) {
- return errors.New("invalid navigation entry")
- }
-
- entryID := entries[cur+1].ID
- return page.NavigateToHistoryEntry(entryID).Do(ctx)
- }))
-}
-
-// Reload is an action that reloads the current page.
-func Reload() NavigateAction {
- return responseAction(nil, page.Reload())
-}
-
-// Stop is an action that stops all navigation and pending resource retrieval.
-func Stop() Action {
- return page.StopLoading()
-}
-
-// CaptureScreenshot is an action that captures/takes a screenshot of the
-// current browser viewport.
-//
-// See the Screenshot action to take a screenshot of a specific element.
-//
-// See the 'screenshot' example in the https://github.com/chromedp/examples
-// project for an example of taking a screenshot of the entire page.
-func CaptureScreenshot(res *[]byte) Action {
- if res == nil {
- panic("res cannot be nil")
- }
-
- return ActionFunc(func(ctx context.Context) error {
- var err error
- *res, err = page.CaptureScreenshot().Do(ctx)
- return err
- })
-}
-
-// Location is an action that retrieves the document location.
-func Location(urlstr *string) Action {
- if urlstr == nil {
- panic("urlstr cannot be nil")
- }
- return EvaluateAsDevTools(`document.location.toString()`, urlstr)
-}
-
-// Title is an action that retrieves the document title.
-func Title(title *string) Action {
- if title == nil {
- panic("title cannot be nil")
- }
- return EvaluateAsDevTools(`document.title`, title)
-}
diff --git a/vendor/github.com/chromedp/chromedp/poll.go b/vendor/github.com/chromedp/chromedp/poll.go
deleted file mode 100644
index fc704df372d..00000000000
--- a/vendor/github.com/chromedp/chromedp/poll.go
+++ /dev/null
@@ -1,229 +0,0 @@
-package chromedp
-
-import (
- "context"
- "encoding/json"
- "fmt"
- "time"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// PollAction are actions that will wait for a general Javascript predicate.
-//
-// See Poll for details on building poll tasks.
-type PollAction Action
-
-// pollTask holds information pertaining to an poll task.
-//
-// See Poll for details on building poll tasks.
-type pollTask struct {
- frame *cdp.Node // the frame to evaluate the predicate, defaults to the root page
- predicate string
- polling string // the polling mode, defaults to "raf" (triggered by requestAnimationFrame)
- interval time.Duration // the interval when the poll is triggered by a timer
- timeout time.Duration // the poll timeout, defaults to 30 seconds
- args []interface{}
- res interface{}
-}
-
-// Do executes the poll task in the browser,
-// until the predicate either returns truthy value or the timeout happens.
-func (p *pollTask) Do(ctx context.Context) error {
- t := cdp.ExecutorFromContext(ctx).(*Target)
- if t == nil {
- return ErrInvalidTarget
- }
- var (
- root *cdp.Node
- execCtx runtime.ExecutionContextID
- ok bool
- )
- for !ok {
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-time.After(5 * time.Millisecond):
- }
- _, root, execCtx, ok = t.ensureFrame()
- }
-
- fromNode := p.frame
- if fromNode == nil {
- fromNode = root
- } else {
- t.frameMu.RLock()
- frameID := t.enclosingFrame(fromNode)
- execCtx = t.execContexts[frameID]
- t.frameMu.RUnlock()
- }
-
- ea := &errAppender{args: make([]*runtime.CallArgument, 0, len(p.args)+3)}
- ea.append(p.predicate)
- if p.interval > 0 {
- ea.append(p.interval.Milliseconds())
- } else {
- ea.append(p.polling)
- }
- ea.append(p.timeout.Milliseconds())
- for _, arg := range p.args {
- ea.append(arg)
- }
- if ea.err != nil {
- return ea.err
- }
-
- v, exp, err := runtime.CallFunctionOn(waitForPredicatePageFunction).
- WithExecutionContextID(execCtx).
- WithReturnByValue(false).
- WithAwaitPromise(true).
- WithUserGesture(true).
- WithArguments(ea.args).
- Do(ctx)
- if err != nil {
- return err
- }
- if exp != nil {
- return exp
- }
-
- if v.Type == "undefined" {
- return ErrPollingTimeout
- }
-
- // it's okay to discard the result.
- if p.res == nil {
- return nil
- }
-
- switch x := p.res.(type) {
- case **runtime.RemoteObject:
- *x = v
- return nil
-
- case *[]byte:
- *x = v.Value
- return nil
- default:
- return json.Unmarshal(v.Value, p.res)
- }
-}
-
-// Poll is a poll action that will wait for a general Javascript predicate.
-// It builds the predicate from a Javascript expression.
-//
-// This is a copy of puppeteer's page.waitForFunction.
-// see https://github.com/puppeteer/puppeteer/blob/v8.0.0/docs/api.md#pagewaitforfunctionpagefunction-options-args.
-// It's named Poll intentionally to avoid messing up with the Wait* query actions.
-// The behavior is not guaranteed to be compatible.
-// For example, our implementation makes the poll task not survive from a navigation,
-// and an error is raised in this case (see unit test TestPoll/NotSurviveNavigation).
-//
-// Polling Options
-//
-// The default polling mode is "raf", to constantly execute pageFunction in requestAnimationFrame callback.
-// This is the tightest polling mode which is suitable to observe styling changes.
-// The WithPollingInterval option makes it to poll the predicate with a specified interval.
-// The WithPollingMutation option makes it to poll the predicate on every DOM mutation.
-//
-// The WithPollingTimeout option specifies the maximum time to wait for the predicate returns truthy value.
-// It defaults to 30 seconds. Pass 0 to disable timeout.
-//
-// The WithPollingInFrame option specifies the frame in which to evaluate the predicate.
-// If not specified, it will be evaluated in the root page of the current tab.
-//
-// The WithPollingArgs option provides extra arguments to pass to the predicate.
-// Only apply this option when the predicate is built from a function.
-// See PollFunction.
-func Poll(expression string, res interface{}, opts ...PollOption) PollAction {
- predicate := fmt.Sprintf(`return (%s);`, expression)
- return poll(predicate, res, opts...)
-}
-
-// PollFunction is a poll action that will wait for a general Javascript predicate.
-// It builds the predicate from a Javascript function.
-//
-// See Poll for details on building poll tasks.
-func PollFunction(pageFunction string, res interface{}, opts ...PollOption) PollAction {
- predicate := fmt.Sprintf(`return (%s)(...args);`, pageFunction)
-
- return poll(predicate, res, opts...)
-}
-
-func poll(predicate string, res interface{}, opts ...PollOption) PollAction {
- p := &pollTask{
- predicate: predicate,
- polling: "raf",
- timeout: 30 * time.Second,
- res: res,
- }
-
- // apply options
- for _, o := range opts {
- o(p)
- }
- return p
-}
-
-// PollOption is an poll task option.
-type PollOption = func(task *pollTask)
-
-// WithPollingInterval makes it to poll the predicate with the specified interval.
-func WithPollingInterval(interval time.Duration) PollOption {
- return func(w *pollTask) {
- w.polling = ""
- w.interval = interval
- }
-}
-
-// WithPollingMutation makes it to poll the predicate on every DOM mutation.
-func WithPollingMutation() PollOption {
- return func(w *pollTask) {
- w.polling = "mutation"
- w.interval = 0
- }
-}
-
-// WithPollingTimeout specifies the maximum time to wait for the predicate returns truthy value.
-// It defaults to 30 seconds. Pass 0 to disable timeout.
-func WithPollingTimeout(timeout time.Duration) PollOption {
- return func(w *pollTask) {
- w.timeout = timeout
- }
-}
-
-// WithPollingInFrame specifies the frame in which to evaluate the predicate.
-// If not specified, it will be evaluated in the root page of the current tab.
-func WithPollingInFrame(frame *cdp.Node) PollOption {
- return func(w *pollTask) {
- w.frame = frame
- }
-}
-
-// WithPollingArgs provides extra arguments to pass to the predicate.
-func WithPollingArgs(args ...interface{}) PollOption {
- return func(w *pollTask) {
- w.args = args
- }
-}
-
-// errAppender is to help accumulating the arguments and simplifying error checks.
-//
-// see https://blog.golang.org/errors-are-values
-type errAppender struct {
- args []*runtime.CallArgument
- err error
-}
-
-// append method calls the json.Marshal method to marshal the value and appends it to the slice.
-// It records the first error for future reference.
-// As soon as an error occurs, the append method becomes a no-op but the error value is saved.
-func (ea *errAppender) append(v interface{}) {
- if ea.err != nil {
- return
- }
- var b []byte
- b, ea.err = json.Marshal(v)
- ea.args = append(ea.args, &runtime.CallArgument{Value: b})
-}
diff --git a/vendor/github.com/chromedp/chromedp/query.go b/vendor/github.com/chromedp/chromedp/query.go
deleted file mode 100644
index 939c1d7e961..00000000000
--- a/vendor/github.com/chromedp/chromedp/query.go
+++ /dev/null
@@ -1,1217 +0,0 @@
-package chromedp
-
-import (
- "context"
- "errors"
- "fmt"
- "math"
- "strconv"
- "strings"
- "sync"
- "time"
-
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/css"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/page"
- "github.com/chromedp/cdproto/runtime"
-)
-
-// QueryAction are element query actions that select node elements from the
-// browser's DOM for retrieval or manipulation.
-//
-// See Query for details on building element query selectors.
-type QueryAction Action
-
-// Selector holds information pertaining to an element selection query.
-//
-// See Query for information on building an element selector and relevant
-// options.
-type Selector struct {
- sel interface{}
- fromNode *cdp.Node
- exp int
- by func(context.Context, *cdp.Node) ([]cdp.NodeID, error)
- wait func(context.Context, *cdp.Frame, runtime.ExecutionContextID, ...cdp.NodeID) ([]*cdp.Node, error)
- after func(context.Context, runtime.ExecutionContextID, ...*cdp.Node) error
- raw bool
-}
-
-// Query is a query action that queries the browser for specific element
-// node(s) matching the criteria.
-//
-// Query actions that target a browser DOM element node (or nodes) make use of
-// Query, in conjunction with the After option (see below) to retrieve data or
-// to modify the element(s) selected by the query.
-//
-// For example:
-//
-// chromedp.Run(ctx, chromedp.SendKeys(`thing`, chromedp.ByID))
-//
-// The above will perform a "SendKeys" action on the first element matching a
-// browser CSS query for "#thing".
-//
-// Element selection queries work in conjunction with specific actions and form
-// the primary way of automating Tasks in the browser. They are typically
-// written in the following form:
-//
-// Action(selector[, parameter1, ...parameterN][,result][, queryOptions...])
-//
-// Where:
-//
-// Action - the action to perform
-// selector - element query selection (typically a string), that any matching node(s) will have the action applied
-// parameter[1-N] - parameter(s) needed for the individual action (if any)
-// result - pointer to a result (if any)
-// queryOptions - changes how queries are executed, or how nodes are waited for (see below)
-//
-// Query Options
-//
-// By* options specify the type of element query used By the browser to perform
-// the selection query. When not specified, element queries will use BySearch
-// (a wrapper for DOM.performSearch).
-//
-// Node* options specify node conditions that cause the query to wait until the
-// specified condition is true. When not specified, queries will use the
-// NodeReady wait condition.
-//
-// The AtLeast option alters the minimum number of nodes that must be returned
-// by the element query. If not specified, the default value is 1.
-//
-// The After option is used to specify a func that will be executed when
-// element query has returned one or more elements, and after the node condition is
-// true.
-//
-// By Options
-//
-// The BySearch (default) option enables querying for elements by plain text,
-// CSS selector or XPath query, wrapping DOM.performSearch.
-//
-// The ByID option enables querying for a single element with the matching CSS
-// ID, wrapping DOM.querySelector. ByID is similar to calling
-// document.querySelector('#' + ID) from within the browser.
-//
-// The ByQuery option enables querying for a single element using a CSS
-// selector, wrapping DOM.querySelector. ByQuery is similar to calling
-// document.querySelector() from within the browser.
-//
-// The ByQueryAll option enables querying for elements using a CSS selector,
-// wrapping DOM.querySelectorAll. ByQueryAll is similar to calling
-// document.querySelectorAll() from within the browser.
-//
-// The ByJSPath option enables querying for a single element using its "JS
-// Path" value, wrapping Runtime.evaluate. ByJSPath is similar to executing a
-// Javascript snippet that returns a element from within the browser. ByJSPath
-// should be used only with trusted element queries, as it is passed directly
-// to Runtime.evaluate, and no attempt is made to sanitize the query. Useful
-// for querying DOM elements that cannot be retrieved using other By* funcs,
-// such as ShadowDOM elements.
-//
-// Node Options
-//
-// The NodeReady (default) option causes the query to wait until all element
-// nodes matching the selector have been retrieved from the browser.
-//
-// The NodeVisible option causes the query to wait until all element nodes
-// matching the selector have been retrieved from the browser, and are visible.
-//
-// The NodeNotVisible option causes the query to wait until all element nodes
-// matching the selector have been retrieved from the browser, and are not
-// visible.
-//
-// The NodeEnabled option causes the query to wait until all element nodes
-// matching the selector have been retrieved from the browser, and are enabled
-// (ie, do not have a 'disabled' attribute).
-//
-// The NodeSelected option causes the query to wait until all element nodes
-// matching the selector have been retrieved from the browser, and are are
-// selected (ie, has a 'selected' attribute).
-//
-// The NodeNotPresent option causes the query to wait until there are no
-// element nodes matching the selector.
-func Query(sel interface{}, opts ...QueryOption) QueryAction {
- s := &Selector{
- sel: sel,
- exp: 1,
- }
-
- // apply options
- for _, o := range opts {
- o(s)
- }
-
- if s.by == nil {
- BySearch(s)
- }
-
- if s.wait == nil {
- NodeReady(s)
- }
-
- return s
-}
-
-// Do executes the selector, only finishing if the selector's by, wait, and
-// after funcs succeed, or if the context is cancelled.
-func (s *Selector) Do(ctx context.Context) error {
- t := cdp.ExecutorFromContext(ctx).(*Target)
- if t == nil {
- return ErrInvalidTarget
- }
- for {
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-time.After(5 * time.Millisecond):
- }
-
- frame, root, execCtx, ok := t.ensureFrame()
- if !ok {
- continue
- }
-
- fromNode := s.fromNode
- if fromNode == nil {
- fromNode = root
- } else {
- frameID := t.enclosingFrame(fromNode)
- t.frameMu.RLock()
- execCtx = t.execContexts[frameID]
- t.frameMu.RUnlock()
-
- // TODO: we probably want to use the nested frame
- // instead, but note that util.go stores the nested
- // frame's nodes in the root frame's Nodes map.
- // frame = t.frames[fromNode.FrameID]
- // if frame == nil {
- // return fmt.Errorf("FromNode provided does not belong to any active frame")
- // }
- }
-
- // If this is an iframe node, we want to run the query
- // on its "content document" node instead. Otherwise,
- // queries will return no results.
- if doc := fromNode.ContentDocument; doc != nil {
- fromNode = doc
- }
-
- ids, err := s.by(ctx, fromNode)
- if err != nil || len(ids) < s.exp {
- continue
- }
- nodes, err := s.wait(ctx, frame, execCtx, ids...)
- // if nodes==nil, we're not yet ready
- if nodes == nil || err != nil {
- continue
- }
- if s.after != nil {
- if err := s.after(ctx, execCtx, nodes...); err != nil {
- return err
- }
- }
- return nil
- }
-}
-
-// selAsString forces sel into a string.
-func (s *Selector) selAsString() string {
- if sel, ok := s.sel.(string); ok {
- return sel
- }
- return fmt.Sprintf("%s", s.sel)
-}
-
-// waitReady waits for the specified nodes to be ready.
-func (s *Selector) waitReady(check func(context.Context, runtime.ExecutionContextID, *cdp.Node) error) func(context.Context, *cdp.Frame, runtime.ExecutionContextID, ...cdp.NodeID) ([]*cdp.Node, error) {
- return func(ctx context.Context, cur *cdp.Frame, execCtx runtime.ExecutionContextID, ids ...cdp.NodeID) ([]*cdp.Node, error) {
- nodes := make([]*cdp.Node, len(ids))
- cur.RLock()
- for i, id := range ids {
- nodes[i] = cur.Nodes[id]
- if nodes[i] == nil {
- cur.RUnlock()
- // not yet ready
- return nil, nil
- }
- }
- cur.RUnlock()
-
- if check != nil {
- errc := make(chan error, 1)
- for _, n := range nodes {
- go func(n *cdp.Node) {
- select {
- case <-ctx.Done():
- errc <- ctx.Err()
- case errc <- check(ctx, execCtx, n):
- }
- }(n)
- }
-
- var first error
- for range nodes {
- if err := <-errc; first == nil {
- first = err
- }
- }
- close(errc)
- if first != nil {
- return nil, first
- }
- }
- return nodes, nil
- }
-}
-
-// QueryAfter is an element query action that queries the browser for selector
-// sel. Waits until the visibility conditions of the query have been met, after
-// which executes f.
-func QueryAfter(sel interface{}, f func(context.Context, runtime.ExecutionContextID, ...*cdp.Node) error, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, After(f))...)
-}
-
-// QueryOption is an element query action option.
-type QueryOption = func(*Selector)
-
-// FromNode is an element query action option where a query will be run. That
-// is, the query will only look at the node's element sub-tree. By default, or
-// when passed nil, the document's root element will be used.
-//
-// Note that, at present, BySearch and ByJSPath do not support FromNode; this
-// option is mainly useful for ByQuery selectors.
-func FromNode(node *cdp.Node) QueryOption {
- return func(s *Selector) { s.fromNode = node }
-}
-
-// ByFunc is an element query action option to set the func used to select elements.
-func ByFunc(f func(context.Context, *cdp.Node) ([]cdp.NodeID, error)) QueryOption {
- return func(s *Selector) {
- s.by = f
- }
-}
-
-// ByQuery is an element query action option to select a single element by the
-// DOM.querySelector command.
-//
-// Similar to calling document.querySelector() in the browser.
-func ByQuery(s *Selector) {
- ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
- nodeID, err := dom.QuerySelector(n.NodeID, s.selAsString()).Do(ctx)
- if err != nil {
- return nil, err
- }
-
- if nodeID == cdp.EmptyNodeID {
- return []cdp.NodeID{}, nil
- }
-
- return []cdp.NodeID{nodeID}, nil
- })(s)
-}
-
-// ByQueryAll is an element query action option to select elements by the
-// DOM.querySelectorAll command.
-//
-// Similar to calling document.querySelectorAll() in the browser.
-func ByQueryAll(s *Selector) {
- ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
- return dom.QuerySelectorAll(n.NodeID, s.selAsString()).Do(ctx)
- })(s)
-}
-
-// ByID is an element query option to select a single element by its CSS #id.
-//
-// Similar to calling document.querySelector('#' + ID) in the browser.
-func ByID(s *Selector) {
- s.sel = "#" + strings.TrimPrefix(s.selAsString(), "#")
- ByQuery(s)
-}
-
-// BySearch is an element query option to select elements by the DOM.performSearch
-// command. It matches nodes by plain text, CSS selector or XPath query.
-func BySearch(s *Selector) {
- ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
- id, count, err := dom.PerformSearch(s.selAsString()).Do(ctx)
- if err != nil {
- return nil, err
- }
-
- if count < 1 {
- return []cdp.NodeID{}, nil
- }
-
- nodes, err := dom.GetSearchResults(id, 0, count).Do(ctx)
- if err != nil {
- return nil, err
- }
-
- return nodes, nil
- })(s)
-}
-
-// ByJSPath is an element query option to select elements by the "JS Path"
-// value (as shown in the Chrome DevTools UI).
-//
-// Allows for the direct querying of DOM elements that otherwise cannot be
-// retrieved using the other By* funcs, such as ShadowDOM elements.
-//
-// Note: Do not use with an untrusted selector value, as any defined selector
-// will be passed to runtime.Evaluate.
-func ByJSPath(s *Selector) {
- s.raw = true
- ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
- // set up eval command
- p := runtime.Evaluate(s.selAsString()).
- WithAwaitPromise(true).
- WithObjectGroup("console").
- WithIncludeCommandLineAPI(true)
-
- // execute
- v, exp, err := p.Do(ctx)
- if err != nil {
- return nil, err
- }
- if exp != nil {
- return nil, exp
- }
-
- // use the ObjectID from the evaluation to get the nodeID
- nodeID, err := dom.RequestNode(v.ObjectID).Do(ctx)
- if err != nil {
- return nil, err
- }
-
- if nodeID == cdp.EmptyNodeID {
- return []cdp.NodeID{}, nil
- }
-
- return []cdp.NodeID{nodeID}, nil
- })(s)
-}
-
-// ByNodeID is an element query option to select elements by their node IDs.
-//
-// Uses DOM.requestChildNodes to retrieve elements with specific node IDs.
-//
-// Note: must be used with []cdp.NodeID.
-func ByNodeID(s *Selector) {
- ids, ok := s.sel.([]cdp.NodeID)
- if !ok {
- panic("ByNodeID can only work on []cdp.NodeID")
- }
-
- ByFunc(func(ctx context.Context, n *cdp.Node) ([]cdp.NodeID, error) {
- for _, id := range ids {
- err := dom.RequestChildNodes(id).WithPierce(true).Do(ctx)
- if err != nil {
- return nil, err
- }
- }
-
- return ids, nil
- })(s)
-}
-
-// WaitFunc is an element query option to set a custom node condition wait.
-func WaitFunc(wait func(context.Context, *cdp.Frame, runtime.ExecutionContextID, ...cdp.NodeID) ([]*cdp.Node, error)) QueryOption {
- return func(s *Selector) {
- s.wait = wait
- }
-}
-
-// NodeReady is an element query option to wait until all queried element nodes
-// have been sent by the browser.
-func NodeReady(s *Selector) {
- WaitFunc(s.waitReady(nil))(s)
-}
-
-func withContextID(id runtime.ExecutionContextID) EvaluateOption {
- return func(p *runtime.EvaluateParams) *runtime.EvaluateParams {
- return p.WithContextID(id)
- }
-}
-
-func evalInCtx(ctx context.Context, execCtx runtime.ExecutionContextID, expression string, res interface{}, opts ...EvaluateOption) error {
- allOpts := append([]EvaluateOption{withContextID(execCtx)}, opts...)
- return EvaluateAsDevTools(expression, &res, allOpts...).Do(ctx)
-}
-
-// NodeVisible is an element query option to wait until all queried element
-// nodes have been sent by the browser and are visible.
-func NodeVisible(s *Selector) {
- WaitFunc(s.waitReady(func(ctx context.Context, execCtx runtime.ExecutionContextID, n *cdp.Node) error {
- // check box model
- _, err := dom.GetBoxModel().WithNodeID(n.NodeID).Do(ctx)
- if err != nil {
- if isCouldNotComputeBoxModelError(err) {
- return ErrNotVisible
- }
-
- return err
- }
-
- // check visibility
- var res bool
- err = evalInCtx(ctx, execCtx, snippet(visibleJS, cashX(true), s, n), &res, withContextID(execCtx))
- if err != nil {
- return err
- }
- if !res {
- return ErrNotVisible
- }
- return nil
- }))(s)
-}
-
-// NodeNotVisible is an element query option to wait until all queried element
-// nodes have been sent by the browser and are not visible.
-func NodeNotVisible(s *Selector) {
- WaitFunc(s.waitReady(func(ctx context.Context, execCtx runtime.ExecutionContextID, n *cdp.Node) error {
- // check box model
- _, err := dom.GetBoxModel().WithNodeID(n.NodeID).Do(ctx)
- if err != nil {
- if isCouldNotComputeBoxModelError(err) {
- return nil
- }
-
- return err
- }
-
- // check visibility
- var res bool
- err = evalInCtx(ctx, execCtx, snippet(visibleJS, cashX(true), s, n), &res)
- if err != nil {
- return err
- }
- if res {
- return ErrVisible
- }
- return nil
- }))(s)
-}
-
-// NodeEnabled is an element query option to wait until all queried element
-// nodes have been sent by the browser and are enabled (ie, do not have a
-// 'disabled' attribute).
-func NodeEnabled(s *Selector) {
- WaitFunc(s.waitReady(func(ctx context.Context, execCtx runtime.ExecutionContextID, n *cdp.Node) error {
- n.RLock()
- defer n.RUnlock()
-
- for i := 0; i < len(n.Attributes); i += 2 {
- if n.Attributes[i] == "disabled" {
- return ErrDisabled
- }
- }
-
- return nil
- }))(s)
-}
-
-// NodeSelected is an element query option to wait until all queried element
-// nodes have been sent by the browser and are selected (ie, has 'selected'
-// attribute).
-func NodeSelected(s *Selector) {
- WaitFunc(s.waitReady(func(ctx context.Context, execCtx runtime.ExecutionContextID, n *cdp.Node) error {
- n.RLock()
- defer n.RUnlock()
-
- for i := 0; i < len(n.Attributes); i += 2 {
- if n.Attributes[i] == "selected" {
- return nil
- }
- }
-
- return ErrNotSelected
- }))(s)
-}
-
-// NodeNotPresent is an element query option to wait until no elements are
-// present that match the query.
-//
-// Note: forces the expected number of element nodes to be 0.
-func NodeNotPresent(s *Selector) {
- s.exp = 0
- WaitFunc(func(ctx context.Context, cur *cdp.Frame, execCtx runtime.ExecutionContextID, ids ...cdp.NodeID) ([]*cdp.Node, error) {
- if len(ids) != 0 {
- return nil, ErrHasResults
- }
- return []*cdp.Node{}, nil
- })(s)
-}
-
-// AtLeast is an element query option to set a minimum number of elements that
-// must be returned by the query.
-//
-// By default, a query will have a value of 1.
-func AtLeast(n int) QueryOption {
- return func(s *Selector) {
- s.exp = n
- }
-}
-
-// After is an element query option that sets a func to execute after the
-// matched nodes have been returned by the browser, and after the node
-// condition is true.
-func After(f func(context.Context, runtime.ExecutionContextID, ...*cdp.Node) error) QueryOption {
- return func(s *Selector) {
- s.after = f
- }
-}
-
-// WaitReady is an element query action that waits until the element matching
-// the selector is ready (ie, has been "loaded").
-func WaitReady(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, opts...)
-}
-
-// WaitVisible is an element query action that waits until the element matching
-// the selector is visible.
-func WaitVisible(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, NodeVisible)...)
-}
-
-// WaitNotVisible is an element query action that waits until the element
-// matching the selector is not visible.
-func WaitNotVisible(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, NodeNotVisible)...)
-}
-
-// WaitEnabled is an element query action that waits until the element matching
-// the selector is enabled (ie, does not have attribute 'disabled').
-func WaitEnabled(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, NodeEnabled)...)
-}
-
-// WaitSelected is an element query action that waits until the element
-// matching the selector is selected (ie, has attribute 'selected').
-func WaitSelected(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, NodeSelected)...)
-}
-
-// WaitNotPresent is an element query action that waits until no elements are
-// present matching the selector.
-func WaitNotPresent(sel interface{}, opts ...QueryOption) QueryAction {
- return Query(sel, append(opts, NodeNotPresent)...)
-}
-
-// Nodes is an element query action that retrieves the document element nodes
-// matching the selector.
-func Nodes(sel interface{}, nodes *[]*cdp.Node, opts ...QueryOption) QueryAction {
- if nodes == nil {
- panic("nodes cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, n ...*cdp.Node) error {
- *nodes = n
- return nil
- }, opts...)
-}
-
-// NodeIDs is an element query action that retrieves the element node IDs matching the
-// selector.
-func NodeIDs(sel interface{}, ids *[]cdp.NodeID, opts ...QueryOption) QueryAction {
- if ids == nil {
- panic("nodes cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- nodeIDs := make([]cdp.NodeID, len(nodes))
- for i, n := range nodes {
- nodeIDs[i] = n.NodeID
- }
-
- *ids = nodeIDs
-
- return nil
- }, opts...)
-}
-
-// Focus is an element query action that focuses the first element node matching the
-// selector.
-func Focus(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return dom.Focus().WithNodeID(nodes[0].NodeID).Do(ctx)
- }, opts...)
-}
-
-// Blur is an element query action that unfocuses (blurs) the first element node
-// matching the selector.
-func Blur(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var res bool
- err := evalInCtx(ctx, execCtx, snippet(blurJS, cashX(true), sel, nodes[0]), &res)
- if err != nil {
- return err
- }
-
- if !res {
- return fmt.Errorf("could not blur node %d", nodes[0].NodeID)
- }
-
- return nil
- }, opts...)
-}
-
-// Dimensions is an element query action that retrieves the box model dimensions for the
-// first element node matching the selector.
-func Dimensions(sel interface{}, model **dom.BoxModel, opts ...QueryOption) QueryAction {
- if model == nil {
- panic("model cannot be nil")
- }
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
- var err error
- *model, err = dom.GetBoxModel().WithNodeID(nodes[0].NodeID).Do(ctx)
- return err
- }, opts...)
-}
-
-// Text is an element query action that retrieves the visible text of the first element
-// node matching the selector.
-func Text(sel interface{}, text *string, opts ...QueryOption) QueryAction {
- if text == nil {
- panic("text cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return evalInCtx(ctx, execCtx, snippet(textJS, cashX(false), sel, nodes[0]), text)
- }, opts...)
-}
-
-// TextContent is an element query action that retrieves the text content of the first element
-// node matching the selector.
-func TextContent(sel interface{}, text *string, opts ...QueryOption) QueryAction {
- if text == nil {
- panic("text cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return evalInCtx(ctx, execCtx, snippet(textContentJS, cashX(false), sel, nodes[0]), text)
- }, opts...)
-}
-
-// Clear is an element query action that clears the values of any input/textarea element
-// nodes matching the selector.
-func Clear(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- for _, n := range nodes {
- if n.NodeType != cdp.NodeTypeElement || (n.NodeName != "INPUT" && n.NodeName != "TEXTAREA") {
- return fmt.Errorf("selector %q matched node %d with name %s", sel, n.NodeID, strings.ToLower(n.NodeName))
- }
- }
-
- errs := make([]error, len(nodes))
- var wg sync.WaitGroup
- for i, n := range nodes {
- wg.Add(1)
- go func(i int, n *cdp.Node) {
- defer wg.Done()
-
- var a Action
- if n.NodeName == "INPUT" {
- a = dom.SetAttributeValue(n.NodeID, "value", "")
- } else {
- // find textarea's child #text node
- var textID cdp.NodeID
- var found bool
- for _, c := range n.Children {
- if c.NodeType == cdp.NodeTypeText {
- textID = c.NodeID
- found = true
- break
- }
- }
-
- if !found {
- errs[i] = fmt.Errorf("textarea node %d does not have child #text node", n.NodeID)
- return
- }
-
- a = dom.SetNodeValue(textID, "")
- }
- errs[i] = a.Do(ctx)
- }(i, n)
- }
- wg.Wait()
-
- for _, err := range errs {
- if err != nil {
- return err
- }
- }
-
- return nil
- }, opts...)
-}
-
-// Value is an element query action that retrieves the Javascript value field of the
-// first element node matching the selector.
-//
-// Useful for retrieving an element's Javascript value, namely form, input,
-// textarea, select, or any other element with a '.value' field.
-func Value(sel interface{}, value *string, opts ...QueryOption) QueryAction {
- if value == nil {
- panic("value cannot be nil")
- }
-
- return JavascriptAttribute(sel, "value", value, opts...)
-}
-
-// SetValue is an element query action that sets the Javascript value of the first
-// element node matching the selector.
-//
-// Useful for setting an element's Javascript value, namely form, input,
-// textarea, select, or other element with a '.value' field.
-func SetValue(sel interface{}, value string, opts ...QueryOption) QueryAction {
- return SetJavascriptAttribute(sel, "value", value, opts...)
-}
-
-// Attributes is an element query action that retrieves the element attributes for the
-// first element node matching the selector.
-func Attributes(sel interface{}, attributes *map[string]string, opts ...QueryOption) QueryAction {
- if attributes == nil {
- panic("attributes cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- nodes[0].RLock()
- defer nodes[0].RUnlock()
-
- m := make(map[string]string)
- attrs := nodes[0].Attributes
- for i := 0; i < len(attrs); i += 2 {
- m[attrs[i]] = attrs[i+1]
- }
-
- *attributes = m
-
- return nil
- }, opts...)
-}
-
-// AttributesAll is an element query action that retrieves the element attributes for
-// all element nodes matching the selector.
-//
-// Note: this should be used with the ByQueryAll query option.
-func AttributesAll(sel interface{}, attributes *[]map[string]string, opts ...QueryOption) QueryAction {
- if attributes == nil {
- panic("attributes cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- for _, node := range nodes {
- node.RLock()
- m := make(map[string]string)
- attrs := node.Attributes
- for i := 0; i < len(attrs); i += 2 {
- m[attrs[i]] = attrs[i+1]
- }
- *attributes = append(*attributes, m)
- node.RUnlock()
- }
- return nil
- }, opts...)
-}
-
-// SetAttributes is an element query action that sets the element attributes for the
-// first element node matching the selector.
-func SetAttributes(sel interface{}, attributes map[string]string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return errors.New("expected at least one element")
- }
-
- i, attrs := 0, make([]string, len(attributes))
- for k, v := range attributes {
- attrs[i] = fmt.Sprintf(`%s=%s`, k, strconv.Quote(v))
- i++
- }
-
- return dom.SetAttributesAsText(nodes[0].NodeID, strings.Join(attrs, " ")).Do(ctx)
- }, opts...)
-}
-
-// AttributeValue is an element query action that retrieves the element attribute value
-// for the first element node matching the selector.
-func AttributeValue(sel interface{}, name string, value *string, ok *bool, opts ...QueryOption) QueryAction {
- if value == nil {
- panic("value cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return errors.New("expected at least one element")
- }
-
- nodes[0].RLock()
- defer nodes[0].RUnlock()
-
- attrs := nodes[0].Attributes
- for i := 0; i < len(attrs); i += 2 {
- if attrs[i] == name {
- *value = attrs[i+1]
- if ok != nil {
- *ok = true
- }
- return nil
- }
- }
-
- if ok != nil {
- *ok = false
- }
-
- return nil
- }, opts...)
-}
-
-// SetAttributeValue is an element query action that sets the element attribute with
-// name to value for the first element node matching the selector.
-func SetAttributeValue(sel interface{}, name, value string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return dom.SetAttributeValue(nodes[0].NodeID, name, value).Do(ctx)
- }, opts...)
-}
-
-// RemoveAttribute is an element query action that removes the element attribute with
-// name from the first element node matching the selector.
-func RemoveAttribute(sel interface{}, name string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return dom.RemoveAttribute(nodes[0].NodeID, name).Do(ctx)
- }, opts...)
-}
-
-// JavascriptAttribute is an element query action that retrieves the Javascript
-// attribute for the first element node matching the selector.
-func JavascriptAttribute(sel interface{}, name string, res interface{}, opts ...QueryOption) QueryAction {
- if res == nil {
- panic("res cannot be nil")
- }
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- if err := evalInCtx(ctx, execCtx,
- snippet(attributeJS, cashX(true), sel, nodes[0], name), res,
- ); err != nil {
- return fmt.Errorf("could not retrieve attribute %q: %w", name, err)
- }
- return nil
- }, opts...)
-}
-
-// SetJavascriptAttribute is an element query action that sets the Javascript attribute
-// for the first element node matching the selector.
-func SetJavascriptAttribute(sel interface{}, name, value string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var res string
- err := evalInCtx(ctx, execCtx, snippet(setAttributeJS, cashX(true), sel, nodes[0], name, value), &res)
- if err != nil {
- return err
- }
- if res != value {
- return fmt.Errorf("could not set value on node %d", nodes[0].NodeID)
- }
-
- return nil
- }, opts...)
-}
-
-// OuterHTML is an element query action that retrieves the outer html of the first
-// element node matching the selector.
-func OuterHTML(sel interface{}, html *string, opts ...QueryOption) QueryAction {
- if html == nil {
- panic("html cannot be nil")
- }
- return JavascriptAttribute(sel, "outerHTML", html, opts...)
-}
-
-// InnerHTML is an element query action that retrieves the inner html of the first
-// element node matching the selector.
-func InnerHTML(sel interface{}, html *string, opts ...QueryOption) QueryAction {
- if html == nil {
- panic("html cannot be nil")
- }
- return JavascriptAttribute(sel, "innerHTML", html, opts...)
-}
-
-// Click is an element query action that sends a mouse click event to the first element
-// node matching the selector.
-func Click(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return MouseClickNode(nodes[0]).Do(ctx)
- }, append(opts, NodeVisible)...)
-}
-
-// DoubleClick is an element query action that sends a mouse double click event to the
-// first element node matching the selector.
-func DoubleClick(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return MouseClickNode(nodes[0], ClickCount(2)).Do(ctx)
- }, append(opts, NodeVisible)...)
-}
-
-// SendKeys is an element query action that synthesizes the key up, char, and down
-// events as needed for the runes in v, sending them to the first element node
-// matching the selector.
-//
-// For a complete example on how to use SendKeys, see
-// https://github.com/chromedp/examples/tree/master/keys.
-//
-// Note: when the element query matches a input[type="file"] node, then
-// dom.SetFileInputFiles is used to set the upload path of the input node to v.
-func SendKeys(sel interface{}, v string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- n := nodes[0]
-
- // grab type attribute from node
- typ, attrs := "", n.Attributes
- n.RLock()
- for i := 0; i < len(attrs); i += 2 {
- if attrs[i] == "type" {
- typ = attrs[i+1]
- }
- }
- n.RUnlock()
-
- // when working with input[type="file"], call dom.SetFileInputFiles
- if n.NodeName == "INPUT" && typ == "file" {
- return dom.SetFileInputFiles([]string{v}).WithNodeID(n.NodeID).Do(ctx)
- }
-
- return KeyEventNode(n, v).Do(ctx)
- }, append(opts, NodeVisible)...)
-}
-
-// SetUploadFiles is an element query action that sets the files to upload (ie, for a
-// input[type="file"] node) for the first element node matching the selector.
-func SetUploadFiles(sel interface{}, files []string, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- return dom.SetFileInputFiles(files).WithNodeID(nodes[0].NodeID).Do(ctx)
- }, opts...)
-}
-
-// Screenshot is an element query action that takes a screenshot of the first element
-// node matching the selector.
-//
-// See CaptureScreenshot for capturing a screenshot of the browser viewport.
-//
-// See the 'screenshot' example in the https://github.com/chromedp/examples
-// project for an example of taking a screenshot of the entire page.
-func Screenshot(sel interface{}, picbuf *[]byte, opts ...QueryOption) QueryAction {
- if picbuf == nil {
- panic("picbuf cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- // get box model
- box, err := dom.GetBoxModel().WithNodeID(nodes[0].NodeID).Do(ctx)
- if err != nil {
- return err
- }
- if len(box.Margin) != 8 {
- return ErrInvalidBoxModel
- }
-
- // take screenshot of the box
- buf, err := page.CaptureScreenshot().
- WithFormat(page.CaptureScreenshotFormatPng).
- WithClip(&page.Viewport{
- // Round the dimensions, as otherwise we might
- // lose one pixel in either dimension.
- X: math.Round(box.Margin[0]),
- Y: math.Round(box.Margin[1]),
- Width: math.Round(box.Margin[4] - box.Margin[0]),
- Height: math.Round(box.Margin[5] - box.Margin[1]),
- // This seems to be necessary? Seems to do the
- // right thing regardless of DPI.
- Scale: 1.0,
- }).Do(ctx)
- if err != nil {
- return err
- }
-
- *picbuf = buf
- return nil
- }, append(opts, NodeVisible)...)
-}
-
-// Submit is an element query action that submits the parent form of the first element
-// node matching the selector.
-func Submit(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var res bool
- err := evalInCtx(ctx, execCtx, snippet(submitJS, cashX(true), sel, nodes[0]), &res)
- if err != nil {
- return err
- }
-
- if !res {
- return fmt.Errorf("could not call submit on node %d", nodes[0].NodeID)
- }
-
- return nil
- }, opts...)
-}
-
-// Reset is an element query action that resets the parent form of the first element
-// node matching the selector.
-func Reset(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var res bool
- err := evalInCtx(ctx, execCtx, snippet(resetJS, cashX(true), sel, nodes[0]), &res)
- if err != nil {
- return err
- }
-
- if !res {
- return fmt.Errorf("could not call reset on node %d", nodes[0].NodeID)
- }
-
- return nil
- }, opts...)
-}
-
-// ComputedStyle is an element query action that retrieves the computed style of the
-// first element node matching the selector.
-func ComputedStyle(sel interface{}, style *[]*css.ComputedStyleProperty, opts ...QueryOption) QueryAction {
- if style == nil {
- panic("style cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- computed, err := css.GetComputedStyleForNode(nodes[0].NodeID).Do(ctx)
- if err != nil {
- return err
- }
-
- *style = computed
-
- return nil
- }, opts...)
-}
-
-// MatchedStyle is an element query action that retrieves the matched style information
-// for the first element node matching the selector.
-func MatchedStyle(sel interface{}, style **css.GetMatchedStylesForNodeReturns, opts ...QueryOption) QueryAction {
- if style == nil {
- panic("style cannot be nil")
- }
-
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var err error
- ret := &css.GetMatchedStylesForNodeReturns{}
- ret.InlineStyle, ret.AttributesStyle, ret.MatchedCSSRules,
- ret.PseudoElements, ret.Inherited, ret.CSSKeyframesRules,
- err = css.GetMatchedStylesForNode(nodes[0].NodeID).Do(ctx)
- if err != nil {
- return err
- }
-
- *style = ret
-
- return nil
- }, opts...)
-}
-
-// ScrollIntoView is an element query action that scrolls the window to the
-// first element node matching the selector.
-func ScrollIntoView(sel interface{}, opts ...QueryOption) QueryAction {
- return QueryAfter(sel, func(ctx context.Context, execCtx runtime.ExecutionContextID, nodes ...*cdp.Node) error {
- if len(nodes) < 1 {
- return fmt.Errorf("selector %q did not return any nodes", sel)
- }
-
- var pos []float64
- err := evalInCtx(ctx, execCtx, snippet(scrollIntoViewJS, cashX(true), sel, nodes[0]), &pos)
- if err != nil {
- return err
- }
-
- if pos == nil {
- return fmt.Errorf("could not scroll into node %d", nodes[0].NodeID)
- }
-
- return nil
- }, opts...)
-}
diff --git a/vendor/github.com/chromedp/chromedp/target.go b/vendor/github.com/chromedp/chromedp/target.go
deleted file mode 100644
index 001f2687875..00000000000
--- a/vendor/github.com/chromedp/chromedp/target.go
+++ /dev/null
@@ -1,428 +0,0 @@
-package chromedp
-
-import (
- "context"
- "encoding/json"
- "errors"
- "sync"
- "sync/atomic"
-
- "github.com/mailru/easyjson"
-
- "github.com/chromedp/cdproto"
- "github.com/chromedp/cdproto/cdp"
- "github.com/chromedp/cdproto/dom"
- "github.com/chromedp/cdproto/page"
- "github.com/chromedp/cdproto/runtime"
- "github.com/chromedp/cdproto/target"
-)
-
-// Target manages a Chrome DevTools Protocol target.
-type Target struct {
- browser *Browser
- SessionID target.SessionID
- TargetID target.ID
-
- listenersMu sync.Mutex
- listeners []cancelableListener
-
- messageQueue chan *cdproto.Message
-
- // frameMu protects both frames and cur.
- frameMu sync.RWMutex
- // frames is the set of encountered frames.
- frames map[cdp.FrameID]*cdp.Frame
- execContexts map[cdp.FrameID]runtime.ExecutionContextID
- // cur is the current top level frame.
- cur cdp.FrameID
-
- // logging funcs
- logf, errf func(string, ...interface{})
-
- // Indicates if the target is a worker target.
- isWorker bool
-}
-
-func (t *Target) enclosingFrame(node *cdp.Node) cdp.FrameID {
- t.frameMu.RLock()
- top := t.frames[t.cur]
- t.frameMu.RUnlock()
- top.RLock()
- defer top.RUnlock()
- for {
- if node == nil {
- // Avoid crashing. This can happen if we're using an old
- // node that has been replaced, for example.
- return ""
- }
- if node.FrameID != "" {
- break
- }
- node = top.Nodes[node.ParentID]
- }
- return node.FrameID
-}
-
-// ensureFrame ensures the top frame of this target is loaded and returns the top frame,
-// the root node and the ExecutionContextID of this top frame; otherwise, it will return
-// false as its last return value.
-func (t *Target) ensureFrame() (*cdp.Frame, *cdp.Node, runtime.ExecutionContextID, bool) {
- t.frameMu.RLock()
- frame := t.frames[t.cur]
- execCtx := t.execContexts[t.cur]
- t.frameMu.RUnlock()
-
- // the frame hasn't loaded yet.
- if frame == nil || execCtx == 0 {
- return nil, nil, 0, false
- }
-
- frame.RLock()
- root := frame.Root
- frame.RUnlock()
-
- if root == nil {
- // not root node yet?
- return nil, nil, 0, false
- }
- return frame, root, execCtx, true
-}
-
-func (t *Target) run(ctx context.Context) {
- type eventValue struct {
- method cdproto.MethodType
- value interface{}
- }
- // syncEventQueue is used to handle events synchronously within Target.
- // TODO: If this queue gets full, the goroutine below could get stuck on
- // a send, and response callbacks would never run, resulting in a
- // deadlock. Can we fix this without potentially using lots of memory?
- syncEventQueue := make(chan eventValue, 4096)
-
- // This goroutine receives events from the browser, calls listeners, and
- // then passes the events onto the main goroutine for the target handler
- // to update itself.
- go func() {
- for {
- select {
- case <-ctx.Done():
- return
-
- case msg := <-t.messageQueue:
- if msg.ID != 0 {
- t.listenersMu.Lock()
- t.listeners = runListeners(t.listeners, msg)
- t.listenersMu.Unlock()
- continue
- }
- ev, err := cdproto.UnmarshalMessage(msg)
- if err != nil {
- if _, ok := err.(cdp.ErrUnknownCommandOrEvent); ok {
- // This is most likely an event received from an older
- // Chrome which a newer cdproto doesn't have, as it is
- // deprecated. Ignore that error.
- continue
- }
- t.errf("could not unmarshal event: %v", err)
- continue
- }
- t.listenersMu.Lock()
- t.listeners = runListeners(t.listeners, ev)
- t.listenersMu.Unlock()
-
- switch msg.Method.Domain() {
- case "Runtime", "Page", "DOM":
- select {
- case <-ctx.Done():
- return
- case syncEventQueue <- eventValue{msg.Method, ev}:
- }
- }
- }
- }
- }()
-
- for {
- select {
- case <-ctx.Done():
- return
- case ev := <-syncEventQueue:
- switch ev.method.Domain() {
- case "Runtime":
- t.runtimeEvent(ev.value)
- case "Page":
- t.pageEvent(ev.value)
- case "DOM":
- t.domEvent(ctx, ev.value)
- }
- }
- }
-}
-
-func (t *Target) Execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
- if method == target.CommandCloseTarget {
- return errors.New("to close the target, cancel its context or use chromedp.Cancel")
- }
-
- id := atomic.AddInt64(&t.browser.next, 1)
- lctx, cancel := context.WithCancel(ctx)
- ch := make(chan *cdproto.Message, 1)
- fn := func(ev interface{}) {
- if msg, ok := ev.(*cdproto.Message); ok && msg.ID == id {
- select {
- case <-ctx.Done():
- case ch <- msg:
- }
- cancel()
- }
- }
- t.listenersMu.Lock()
- t.listeners = append(t.listeners, cancelableListener{lctx, fn})
- t.listenersMu.Unlock()
-
- // send command
- var buf []byte
- if params != nil {
- var err error
- buf, err = easyjson.Marshal(params)
- if err != nil {
- return err
- }
- }
- cmd := &cdproto.Message{
- ID: id,
- SessionID: t.SessionID,
- Method: cdproto.MethodType(method),
- Params: buf,
- }
- select {
- case <-ctx.Done():
- return ctx.Err()
- case t.browser.cmdQueue <- cmd:
- }
-
- // wait for result
- select {
- case <-ctx.Done():
- return ctx.Err()
- case msg := <-ch:
- switch {
- case msg == nil:
- return ErrChannelClosed
- case msg.Error != nil:
- return msg.Error
- case res != nil:
- return easyjson.Unmarshal(msg.Result, res)
- }
- }
- return nil
-}
-
-// runtimeEvent handles incoming runtime events.
-func (t *Target) runtimeEvent(ev interface{}) {
- switch ev := ev.(type) {
- case *runtime.EventExecutionContextCreated:
- var aux struct {
- FrameID cdp.FrameID
- }
- if len(ev.Context.AuxData) == 0 {
- break
- }
- if err := json.Unmarshal(ev.Context.AuxData, &aux); err != nil {
- t.errf("could not decode executionContextCreated auxData %q: %v", ev.Context.AuxData, err)
- break
- }
- if aux.FrameID != "" {
- t.frameMu.Lock()
- t.execContexts[aux.FrameID] = ev.Context.ID
- t.frameMu.Unlock()
- }
- case *runtime.EventExecutionContextDestroyed:
- t.frameMu.Lock()
- for frameID, ctxID := range t.execContexts {
- if ctxID == ev.ExecutionContextID {
- delete(t.execContexts, frameID)
- }
- }
- t.frameMu.Unlock()
- case *runtime.EventExecutionContextsCleared:
- t.frameMu.Lock()
- for frameID := range t.execContexts {
- delete(t.execContexts, frameID)
- }
- t.frameMu.Unlock()
- }
-}
-
-// documentUpdated handles the document updated event, retrieving the document
-// root for the root frame.
-func (t *Target) documentUpdated(ctx context.Context) {
- t.frameMu.RLock()
- f := t.frames[t.cur]
- t.frameMu.RUnlock()
- if f == nil {
- // TODO: This seems to happen on CI, when running the tests
- // under the headless-shell Docker image. Figure out why.
- t.errf("received DOM.documentUpdated when there's no top-level frame")
- return
- }
- f.Lock()
- defer f.Unlock()
-
- // invalidate nodes
- if f.Root != nil {
- close(f.Root.Invalidated)
- }
-
- f.Nodes = make(map[cdp.NodeID]*cdp.Node)
- var err error
- f.Root, err = dom.GetDocument().Do(cdp.WithExecutor(ctx, t))
- if err == context.Canceled {
- return // TODO: perhaps not necessary, but useful to keep the tests less noisy
- }
- if err != nil {
- t.errf("could not retrieve document root for %s: %v", f.ID, err)
- return
- }
- f.Root.Invalidated = make(chan struct{})
- walk(f.Nodes, f.Root)
-}
-
-// pageEvent handles incoming page events.
-func (t *Target) pageEvent(ev interface{}) {
- var id cdp.FrameID
- var op frameOp
-
- switch e := ev.(type) {
- case *page.EventFrameNavigated:
- t.frameMu.Lock()
- t.frames[e.Frame.ID] = e.Frame
- if e.Frame.ParentID == "" {
- // This frame is only the new top-level frame if it has
- // no parent.
- t.cur = e.Frame.ID
- }
- t.frameMu.Unlock()
- return
-
- case *page.EventFrameAttached:
- id, op = e.FrameID, frameAttached(e.ParentFrameID)
-
- case *page.EventFrameDetached:
- id, op = e.FrameID, frameDetached
-
- case *page.EventFrameStartedLoading:
- id, op = e.FrameID, frameStartedLoading
-
- case *page.EventFrameStoppedLoading:
- id, op = e.FrameID, frameStoppedLoading
-
- // ignored events
- case *page.EventCompilationCacheProduced,
- *page.EventDocumentOpened,
- *page.EventDomContentEventFired,
- *page.EventFileChooserOpened,
- *page.EventFrameRequestedNavigation,
- *page.EventFrameResized,
- *page.EventInterstitialHidden,
- *page.EventInterstitialShown,
- *page.EventJavascriptDialogClosed,
- *page.EventJavascriptDialogOpening,
- *page.EventLifecycleEvent,
- *page.EventLoadEventFired,
- *page.EventNavigatedWithinDocument,
- *page.EventScreencastFrame,
- *page.EventScreencastVisibilityChanged,
- *page.EventWindowOpen:
- return
-
- default:
- t.errf("unhandled page event %T", ev)
- return
- }
-
- t.frameMu.Lock()
- f := t.frames[id]
- if f == nil {
- // This can happen if a frame is attached or starts loading
- // before it's ever navigated to. We won't have all the frame
- // details just yet, but that's okay.
- f = &cdp.Frame{ID: id}
- t.frames[id] = f
- }
- t.frameMu.Unlock()
-
- f.Lock()
- op(f)
- f.Unlock()
-}
-
-// domEvent handles incoming DOM events.
-func (t *Target) domEvent(ctx context.Context, ev interface{}) {
- f := t.frames[t.cur]
- var id cdp.NodeID
- var op nodeOp
-
- switch e := ev.(type) {
- case *dom.EventDocumentUpdated:
- t.documentUpdated(ctx)
- return
-
- case *dom.EventSetChildNodes:
- id, op = e.ParentID, setChildNodes(f.Nodes, e.Nodes)
-
- case *dom.EventAttributeModified:
- id, op = e.NodeID, attributeModified(e.Name, e.Value)
-
- case *dom.EventAttributeRemoved:
- id, op = e.NodeID, attributeRemoved(e.Name)
-
- case *dom.EventInlineStyleInvalidated:
- if len(e.NodeIds) == 0 {
- return
- }
-
- id, op = e.NodeIds[0], inlineStyleInvalidated(e.NodeIds[1:])
-
- case *dom.EventCharacterDataModified:
- id, op = e.NodeID, characterDataModified(e.CharacterData)
-
- case *dom.EventChildNodeCountUpdated:
- id, op = e.NodeID, childNodeCountUpdated(e.ChildNodeCount)
-
- case *dom.EventChildNodeInserted:
- id, op = e.ParentNodeID, childNodeInserted(f.Nodes, e.PreviousNodeID, e.Node)
-
- case *dom.EventChildNodeRemoved:
- id, op = e.ParentNodeID, childNodeRemoved(f.Nodes, e.NodeID)
-
- case *dom.EventShadowRootPushed:
- id, op = e.HostID, shadowRootPushed(f.Nodes, e.Root)
-
- case *dom.EventShadowRootPopped:
- id, op = e.HostID, shadowRootPopped(f.Nodes, e.RootID)
-
- case *dom.EventPseudoElementAdded:
- id, op = e.ParentID, pseudoElementAdded(f.Nodes, e.PseudoElement)
-
- case *dom.EventPseudoElementRemoved:
- id, op = e.ParentID, pseudoElementRemoved(f.Nodes, e.PseudoElementID)
-
- case *dom.EventDistributedNodesUpdated:
- id, op = e.InsertionPointID, distributedNodesUpdated(e.DistributedNodes)
-
- default:
- t.errf("unhandled node event %T", ev)
- return
- }
-
- n, ok := f.Nodes[id]
- if !ok {
- // Node ID has been invalidated. Nothing to do.
- return
- }
-
- f.Lock()
- op(n)
- f.Unlock()
-}
diff --git a/vendor/github.com/chromedp/chromedp/util.go b/vendor/github.com/chromedp/chromedp/util.go
deleted file mode 100644
index 2e56aca9fb5..00000000000
--- a/vendor/github.com/chromedp/chromedp/util.go
+++ /dev/null
@@ -1,370 +0,0 @@
-package chromedp
-
-import (
- "encoding/json"
- "net"
- "net/http"
- "net/url"
- "strings"
-
- "github.com/chromedp/cdproto"
- "github.com/chromedp/cdproto/cdp"
-)
-
-// forceIP tries to force the host component in urlstr to be an IP address.
-//
-// Since Chrome 66+, Chrome DevTools Protocol clients connecting to a browser
-// must send the "Host:" header as either an IP address, or "localhost".
-func forceIP(urlstr string) string {
- u, err := url.Parse(urlstr)
- if err != nil {
- return urlstr
- }
- host, port, err := net.SplitHostPort(u.Host)
- if err != nil {
- return urlstr
- }
- addr, err := net.ResolveIPAddr("ip", host)
- if err != nil {
- return urlstr
- }
- u.Host = net.JoinHostPort(addr.IP.String(), port)
- return u.String()
-}
-
-// detectURL detects the websocket debugger URL if the provided URL is not a
-// valid websocket debugger URL.
-//
-// A valid websocket debugger URL is something like:
-// ws://127.0.0.1:9222/devtools/browser/...
-// The original URL with the following formats are accepted:
-// * ws://127.0.0.1:9222/
-// * http://127.0.0.1:9222/
-func detectURL(urlstr string) string {
- if strings.Contains(urlstr, "/devtools/browser/") {
- return urlstr
- }
-
- // replace the scheme and path to construct the URL like:
- // http://127.0.0.1:9222/json/version
- u, err := url.Parse(urlstr)
- if err != nil {
- return urlstr
- }
- u.Scheme = "http"
- u.Path = "/json/version"
-
- // to get "webSocketDebuggerUrl" in the response
- resp, err := http.Get(forceIP(u.String()))
- if err != nil {
- return urlstr
- }
- defer resp.Body.Close()
-
- var result map[string]interface{}
- if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
- return urlstr
- }
- // the browser will construct the debugger URL using the "host" header of the /json/version request.
- // for example, run headless-shell in a container: docker run -d -p 9000:9222 chromedp/headless-shell:latest
- // then: curl http://127.0.0.1:9000/json/version
- // and the debugger URL will be something like: ws://127.0.0.1:9000/devtools/browser/...
- wsURL := result["webSocketDebuggerUrl"].(string)
- return wsURL
-}
-
-func runListeners(list []cancelableListener, ev interface{}) []cancelableListener {
- for i := 0; i < len(list); {
- listener := list[i]
- select {
- case <-listener.ctx.Done():
- list = append(list[:i], list[i+1:]...)
- continue
- default:
- listener.fn(ev)
- i++
- }
- }
- return list
-}
-
-// frameOp is a frame manipulation operation.
-type frameOp func(*cdp.Frame)
-
-func frameAttached(id cdp.FrameID) frameOp {
- return func(f *cdp.Frame) {
- f.ParentID = id
- setFrameState(f, cdp.FrameAttached)
- }
-}
-
-func frameDetached(f *cdp.Frame) {
- f.ParentID = cdp.EmptyFrameID
- clearFrameState(f, cdp.FrameAttached)
-}
-
-func frameStartedLoading(f *cdp.Frame) {
- setFrameState(f, cdp.FrameLoading)
-}
-
-func frameStoppedLoading(f *cdp.Frame) {
- clearFrameState(f, cdp.FrameLoading)
-}
-
-func frameScheduledNavigation(f *cdp.Frame) {
- setFrameState(f, cdp.FrameScheduledNavigation)
-}
-
-func frameClearedScheduledNavigation(f *cdp.Frame) {
- clearFrameState(f, cdp.FrameScheduledNavigation)
-}
-
-// setFrameState sets the frame state via bitwise or (|).
-func setFrameState(f *cdp.Frame, fs cdp.FrameState) {
- f.State |= fs
-}
-
-// clearFrameState clears the frame state via bit clear (&^).
-func clearFrameState(f *cdp.Frame, fs cdp.FrameState) {
- f.State &^= fs
-}
-
-// nodeOp is a node manipulation operation.
-type nodeOp func(*cdp.Node)
-
-func walk(m map[cdp.NodeID]*cdp.Node, n *cdp.Node) {
- n.RLock()
- defer n.RUnlock()
- m[n.NodeID] = n
-
- for _, c := range n.Children {
- c.Lock()
- c.Parent = n
- c.Invalidated = n.Invalidated
- c.Unlock()
-
- walk(m, c)
- }
-
- for _, c := range n.ShadowRoots {
- c.Lock()
- c.Parent = n
- c.Invalidated = n.Invalidated
- c.Unlock()
-
- walk(m, c)
- }
-
- for _, c := range n.PseudoElements {
- c.Lock()
- c.Parent = n
- c.Invalidated = n.Invalidated
- c.Unlock()
-
- walk(m, c)
- }
-
- for _, c := range []*cdp.Node{n.ContentDocument, n.TemplateContent} {
- if c == nil {
- continue
- }
-
- c.Lock()
- c.Parent = n
- c.Invalidated = n.Invalidated
- c.Unlock()
-
- walk(m, c)
- }
-}
-
-func setChildNodes(m map[cdp.NodeID]*cdp.Node, nodes []*cdp.Node) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- n.Children = nodes
- n.Unlock()
-
- walk(m, n)
- }
-}
-
-func attributeModified(name, value string) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- var found bool
- var i int
- for ; i < len(n.Attributes); i += 2 {
- if n.Attributes[i] == name {
- found = true
- break
- }
- }
-
- if found {
- n.Attributes[i] = name
- n.Attributes[i+1] = value
- } else {
- n.Attributes = append(n.Attributes, name, value)
- }
- }
-}
-
-func attributeRemoved(name string) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- var a []string
- for i := 0; i < len(n.Attributes); i += 2 {
- if n.Attributes[i] == name {
- continue
- }
- a = append(a, n.Attributes[i], n.Attributes[i+1])
- }
- n.Attributes = a
- }
-}
-
-func inlineStyleInvalidated(ids []cdp.NodeID) nodeOp {
- return func(n *cdp.Node) {
- }
-}
-
-func characterDataModified(characterData string) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.Value = characterData
- }
-}
-
-func childNodeCountUpdated(count int64) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.ChildNodeCount = count
- }
-}
-
-func childNodeInserted(m map[cdp.NodeID]*cdp.Node, prevID cdp.NodeID, c *cdp.Node) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- n.Children = insertNode(n.Children, prevID, c)
- n.Unlock()
-
- walk(m, n)
- }
-}
-
-func childNodeRemoved(m map[cdp.NodeID]*cdp.Node, id cdp.NodeID) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.Children = removeNode(n.Children, id)
- delete(m, id)
- }
-}
-
-func shadowRootPushed(m map[cdp.NodeID]*cdp.Node, c *cdp.Node) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- n.ShadowRoots = append(n.ShadowRoots, c)
- n.Unlock()
-
- walk(m, n)
- }
-}
-
-func shadowRootPopped(m map[cdp.NodeID]*cdp.Node, id cdp.NodeID) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.ShadowRoots = removeNode(n.ShadowRoots, id)
- delete(m, id)
- }
-}
-
-func pseudoElementAdded(m map[cdp.NodeID]*cdp.Node, c *cdp.Node) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- n.PseudoElements = append(n.PseudoElements, c)
- n.Unlock()
-
- walk(m, n)
- }
-}
-
-func pseudoElementRemoved(m map[cdp.NodeID]*cdp.Node, id cdp.NodeID) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.PseudoElements = removeNode(n.PseudoElements, id)
- delete(m, id)
- }
-}
-
-func distributedNodesUpdated(nodes []*cdp.BackendNode) nodeOp {
- return func(n *cdp.Node) {
- n.Lock()
- defer n.Unlock()
-
- n.DistributedNodes = nodes
- }
-}
-
-func insertNode(n []*cdp.Node, prevID cdp.NodeID, c *cdp.Node) []*cdp.Node {
- var i int
- var found bool
- for ; i < len(n); i++ {
- if n[i].NodeID == prevID {
- found = true
- break
- }
- }
-
- if !found {
- return append([]*cdp.Node{c}, n...)
- }
-
- i++
- n = append(n, nil)
- copy(n[i+1:], n[i:])
- n[i] = c
-
- return n
-}
-
-func removeNode(n []*cdp.Node, id cdp.NodeID) []*cdp.Node {
- if len(n) == 0 {
- return n
- }
-
- var found bool
- var i int
- for ; i < len(n); i++ {
- if n[i].NodeID == id {
- found = true
- break
- }
- }
-
- if !found {
- return n
- }
-
- return append(n[:i], n[i+1:]...)
-}
-
-// isCouldNotComputeBoxModelError unwraps err as a MessageError and determines
-// if it is a compute box model error.
-func isCouldNotComputeBoxModelError(err error) bool {
- e, ok := err.(*cdproto.Error)
- return ok && e.Code == -32000 && e.Message == "Could not compute box model."
-}
diff --git a/vendor/github.com/chromedp/sysutil/.travis.yml b/vendor/github.com/chromedp/sysutil/.travis.yml
deleted file mode 100644
index aea88dca636..00000000000
--- a/vendor/github.com/chromedp/sysutil/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-dist: bionic
-language: go
-go:
- - 1.13.x
-script:
- - go test -v -coverprofile=coverage.out
diff --git a/vendor/github.com/chromedp/sysutil/LICENSE b/vendor/github.com/chromedp/sysutil/LICENSE
deleted file mode 100644
index 8e2e6c25e32..00000000000
--- a/vendor/github.com/chromedp/sysutil/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016-2017 Kenneth Shaw
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/chromedp/sysutil/README.md b/vendor/github.com/chromedp/sysutil/README.md
deleted file mode 100644
index 578d0f40e26..00000000000
--- a/vendor/github.com/chromedp/sysutil/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# About sysutil
-
-Package sysutil provides some utilities for working with cross platform
-systems.
-
-Inspired by the Go version of Sigar, but written to be "idiomatic" Go.
diff --git a/vendor/github.com/chromedp/sysutil/sysutil.go b/vendor/github.com/chromedp/sysutil/sysutil.go
deleted file mode 100644
index 856a0c6722a..00000000000
--- a/vendor/github.com/chromedp/sysutil/sysutil.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package sysutil
-
-import "time"
-
-var btime time.Time
-
-// BootTime returns the time the system was started.
-func BootTime() time.Time {
- return btime
-}
-
-// Uptime returns the duration the system has been up.
-func Uptime() time.Duration {
- return time.Now().Sub(btime)
-}
diff --git a/vendor/github.com/chromedp/sysutil/sysutil_bsd.go b/vendor/github.com/chromedp/sysutil/sysutil_bsd.go
deleted file mode 100644
index 0c00c7fecf4..00000000000
--- a/vendor/github.com/chromedp/sysutil/sysutil_bsd.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// +build darwin freebsd openbsd netbsd
-
-package sysutil
-
-import (
- "bytes"
- "encoding/binary"
- "syscall"
- "time"
-)
-
-func init() {
- // get boot time
- res, err := syscall.Sysctl("kern.boottime")
- if err != nil {
- btime = time.Now()
- return
- }
- // decode
- var t timeval
- if err = binary.Read(bytes.NewBuffer([]byte(res)), binary.LittleEndian, &t); err != nil {
- btime = time.Now()
- return
- }
- btime = time.Unix(int64(t.Sec), int64(t.Usec))
-}
diff --git a/vendor/github.com/chromedp/sysutil/sysutil_linux.go b/vendor/github.com/chromedp/sysutil/sysutil_linux.go
deleted file mode 100644
index 66fd321ff71..00000000000
--- a/vendor/github.com/chromedp/sysutil/sysutil_linux.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// +build linux
-
-package sysutil
-
-import (
- "bytes"
- "io/ioutil"
- "strconv"
- "time"
-)
-
-var (
- btimePrefix = []byte("btime ")
- lineEnd = []byte("\n")
-)
-
-func init() {
- buf, err := ioutil.ReadFile("/proc/stat")
- if err != nil {
- btime = time.Now()
- return
- }
- for _, line := range bytes.SplitN(buf, lineEnd, -1) {
- if bytes.HasPrefix(line, btimePrefix) {
- t, err := strconv.ParseInt(string(line[len(btimePrefix):]), 10, 64)
- if err != nil {
- btime = time.Now()
- return
- }
- btime = time.Unix(t, 0)
- break
- }
- }
-}
diff --git a/vendor/github.com/chromedp/sysutil/sysutil_other.go b/vendor/github.com/chromedp/sysutil/sysutil_other.go
deleted file mode 100644
index 25e5b78c138..00000000000
--- a/vendor/github.com/chromedp/sysutil/sysutil_other.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build !linux,!windows,!darwin,!freebsd,!openbsd,!netbsd
-
-package sysutil
-
-import "time"
-
-func init() {
- btime = time.Now()
-}
diff --git a/vendor/github.com/chromedp/sysutil/sysutil_windows.go b/vendor/github.com/chromedp/sysutil/sysutil_windows.go
deleted file mode 100644
index 6fb88c1ed7a..00000000000
--- a/vendor/github.com/chromedp/sysutil/sysutil_windows.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// +build windows
-
-package sysutil
-
-import (
- "syscall"
- "time"
-)
-
-var (
- kernel32DLL = syscall.MustLoadDLL("kernel32")
- procGetTickCount64 = kernel32DLL.MustFindProc("GetTickCount64")
-)
-
-func init() {
- res, _, err := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
- if err != 0 {
- btime = time.Now()
- return
- }
- btime = time.Now().Add(time.Duration(-res) * time.Millisecond)
-}
diff --git a/vendor/github.com/chromedp/sysutil/timeval.go b/vendor/github.com/chromedp/sysutil/timeval.go
deleted file mode 100644
index 14a0a4adcd1..00000000000
--- a/vendor/github.com/chromedp/sysutil/timeval.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build openbsd netbsd
-
-package sysutil
-
-import (
- "syscall"
-)
-
-type timeval syscall.Timeval
diff --git a/vendor/github.com/chromedp/sysutil/timeval32.go b/vendor/github.com/chromedp/sysutil/timeval32.go
deleted file mode 100644
index 17ad8d27963..00000000000
--- a/vendor/github.com/chromedp/sysutil/timeval32.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build darwin freebsd
-
-package sysutil
-
-type timeval struct {
- Sec int32
- Usec int32
-}
diff --git a/vendor/github.com/corona10/goimagehash/.gitignore b/vendor/github.com/corona10/goimagehash/.gitignore
deleted file mode 100644
index a1338d68517..00000000000
--- a/vendor/github.com/corona10/goimagehash/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-# Binaries for programs and plugins
-*.exe
-*.dll
-*.so
-*.dylib
-
-# Test binary, build with `go test -c`
-*.test
-
-# Output of the go coverage tool, specifically when used with LiteIDE
-*.out
-
-# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
-.glide/
diff --git a/vendor/github.com/corona10/goimagehash/AUTHORS.md b/vendor/github.com/corona10/goimagehash/AUTHORS.md
deleted file mode 100644
index 832d2331f8e..00000000000
--- a/vendor/github.com/corona10/goimagehash/AUTHORS.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## AUTHORS
-- [Dominik Honnef](https://github.com/dominikh) dominik@honnef.co
-- [Dong-hee Na](https://github.com/corona10/) donghee.na92@gmail.com
-- [Gustavo Brunoro](https://github.com/brunoro/) git@hitnail.net
-- [Alex Higashino](https://github.com/TokyoWolFrog/) TokyoWolFrog@mayxyou.com
\ No newline at end of file
diff --git a/vendor/github.com/corona10/goimagehash/CODEOWNERS b/vendor/github.com/corona10/goimagehash/CODEOWNERS
deleted file mode 100644
index 4da23f70669..00000000000
--- a/vendor/github.com/corona10/goimagehash/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-*.go @corona10
diff --git a/vendor/github.com/corona10/goimagehash/Gopkg.lock b/vendor/github.com/corona10/goimagehash/Gopkg.lock
deleted file mode 100644
index c51994eb624..00000000000
--- a/vendor/github.com/corona10/goimagehash/Gopkg.lock
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- branch = "master"
- digest = "1:34534b73e925d20cc72cf202f8b482fdcbe3a1b113e19375f31aadabd0f0f97d"
- name = "github.com/nfnt/resize"
- packages = ["."]
- pruneopts = "UT"
- revision = "83c6a9932646f83e3267f353373d47347b6036b2"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- input-imports = ["github.com/nfnt/resize"]
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/corona10/goimagehash/Gopkg.toml b/vendor/github.com/corona10/goimagehash/Gopkg.toml
deleted file mode 100644
index 7d0d6d5e7be..00000000000
--- a/vendor/github.com/corona10/goimagehash/Gopkg.toml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Gopkg.toml example
-#
-# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-#
-# [prune]
-# non-go = false
-# go-tests = true
-# unused-packages = true
-
-
-[[constraint]]
- branch = "master"
- name = "github.com/nfnt/resize"
-
-[prune]
- go-tests = true
- unused-packages = true
diff --git a/vendor/github.com/corona10/goimagehash/LICENSE b/vendor/github.com/corona10/goimagehash/LICENSE
deleted file mode 100644
index 37b5a96098e..00000000000
--- a/vendor/github.com/corona10/goimagehash/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-BSD 2-Clause License
-
-Copyright (c) 2017, Dong-hee Na
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/corona10/goimagehash/README.md b/vendor/github.com/corona10/goimagehash/README.md
deleted file mode 100644
index 07bab1435d0..00000000000
--- a/vendor/github.com/corona10/goimagehash/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-![GitHub Action](https://github.com/corona10/goimagehash/workflows/goimagehash%20workflow/badge.svg)
-[![GoDoc](https://godoc.org/github.com/corona10/goimagehash?status.svg)](https://godoc.org/github.com/corona10/goimagehash)
-[![Go Report Card](https://goreportcard.com/badge/github.com/corona10/goimagehash)](https://goreportcard.com/report/github.com/corona10/goimagehash)
-
-# goimagehash
-> Inspired by [imagehash](https://github.com/JohannesBuchner/imagehash)
-
-A image hashing library written in Go. ImageHash supports:
-* [Average hashing](http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html)
-* [Difference hashing](http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html)
-* [Perception hashing](http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html)
-* [Wavelet hashing](https://fullstackml.com/wavelet-image-hash-in-python-3504fdd282b5) [TODO]
-
-## Installation
-```
-go get github.com/corona10/goimagehash
-```
-## Special thanks to
-* [Haeun Kim](https://github.com/haeungun/)
-
-## Usage
-
-``` Go
-func main() {
- file1, _ := os.Open("sample1.jpg")
- file2, _ := os.Open("sample2.jpg")
- defer file1.Close()
- defer file2.Close()
-
- img1, _ := jpeg.Decode(file1)
- img2, _ := jpeg.Decode(file2)
- hash1, _ := goimagehash.AverageHash(img1)
- hash2, _ := goimagehash.AverageHash(img2)
- distance, _ := hash1.Distance(hash2)
- fmt.Printf("Distance between images: %v\n", distance)
-
- hash1, _ = goimagehash.DifferenceHash(img1)
- hash2, _ = goimagehash.DifferenceHash(img2)
- distance, _ = hash1.Distance(hash2)
- fmt.Printf("Distance between images: %v\n", distance)
- width, height := 8, 8
- hash3, _ = goimagehash.ExtAverageHash(img1, width, height)
- hash4, _ = goimagehash.ExtAverageHash(img2, width, height)
- distance, _ = hash3.Distance(hash4)
- fmt.Printf("Distance between images: %v\n", distance)
- fmt.Printf("hash3 bit size: %v\n", hash3.Bits())
- fmt.Printf("hash4 bit size: %v\n", hash4.Bits())
-
- var b bytes.Buffer
- foo := bufio.NewWriter(&b)
- _ = hash4.Dump(foo)
- foo.Flush()
- bar := bufio.NewReader(&b)
- hash5, _ := goimagehash.LoadExtImageHash(bar)
-}
-```
-
-## Release Note
-### v1.0.3
-- Add workflow for GithubAction
-- Fix typo on the GoDoc for LoadImageHash
-
-### v1.0.2
-- go.mod is now used for install goimagehash
-
-### v1.0.1
-- Perception/ExtPerception hash creation times are reduced
-
-### v1.0.0
-**IMPORTANT**
-goimagehash v1.0.0 does not have compatible with the before version for future features
-
-- More flexible extended hash APIs are provided ([ExtAverageHash](https://godoc.org/github.com/corona10/goimagehash#ExtAverageHash), [ExtPerceptionHash](https://godoc.org/github.com/corona10/goimagehash#ExtPerceptionHash), [ExtDifferenceHash](https://godoc.org/github.com/corona10/goimagehash#ExtDifferenceHash))
-- New serialization APIs are provided([ImageHash.Dump](https://godoc.org/github.com/corona10/goimagehash#ImageHash.Dump), [ExtImageHash.Dump](https://godoc.org/github.com/corona10/goimagehash#ExtImageHash.Dump))
-- [ExtImageHashFromString](https://godoc.org/github.com/corona10/goimagehash#ExtImageHashFromString), [ImageHashFromString](https://godoc.org/github.com/corona10/goimagehash#ImageHashFromString) is deprecated and will be removed
-- New deserialization APIs are provided([LoadImageHash](https://godoc.org/github.com/corona10/goimagehash#LoadImageHash), [LoadExtImageHash](https://godoc.org/github.com/corona10/goimagehash#LoadExtImageHash))
-- Bits APIs are provided to measure actual bit size of hash
-
-### v0.3.0
-- Support DifferenceHashExtend.
-- Support AverageHashExtend.
-- Support PerceptionHashExtend by @TokyoWolFrog.
-
-### v0.2.0
-- Perception Hash is updated.
-- Fix a critical bug of finding median value.
-
-### v0.1.0
-- Support Average hashing
-- Support Difference hashing
-- Support Perception hashing
-- Use bits.OnesCount64 for computing Hamming distance by @dominikh
-- Support hex serialization methods to ImageHash by @brunoro
diff --git a/vendor/github.com/corona10/goimagehash/doc.go b/vendor/github.com/corona10/goimagehash/doc.go
deleted file mode 100644
index 39e655de001..00000000000
--- a/vendor/github.com/corona10/goimagehash/doc.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimagehash
diff --git a/vendor/github.com/corona10/goimagehash/etcs/doc.go b/vendor/github.com/corona10/goimagehash/etcs/doc.go
deleted file mode 100644
index 0c1485dbce7..00000000000
--- a/vendor/github.com/corona10/goimagehash/etcs/doc.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package etcs
diff --git a/vendor/github.com/corona10/goimagehash/etcs/utils.go b/vendor/github.com/corona10/goimagehash/etcs/utils.go
deleted file mode 100644
index 795c75fa67c..00000000000
--- a/vendor/github.com/corona10/goimagehash/etcs/utils.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package etcs
-
-// MeanOfPixels function returns a mean of pixels.
-func MeanOfPixels(pixels []float64) float64 {
- m := 0.0
- lens := len(pixels)
- if lens == 0 {
- return 0
- }
-
- for _, p := range pixels {
- m += p
- }
-
- return m / float64(lens)
-}
-
-// MedianOfPixels function returns a median value of pixels.
-// It uses quick selection algorithm.
-func MedianOfPixels(pixels []float64) float64 {
- tmp := make([]float64, len(pixels))
- copy(tmp, pixels)
- l := len(tmp)
- pos := l / 2
- v := quickSelectMedian(tmp, 0, l-1, pos)
- return v
-}
-
-func quickSelectMedian(sequence []float64, low int, hi int, k int) float64 {
- if low == hi {
- return sequence[k]
- }
-
- for low < hi {
- pivot := low/2 + hi/2
- pivotValue := sequence[pivot]
- storeIdx := low
- sequence[pivot], sequence[hi] = sequence[hi], sequence[pivot]
- for i := low; i < hi; i++ {
- if sequence[i] < pivotValue {
- sequence[storeIdx], sequence[i] = sequence[i], sequence[storeIdx]
- storeIdx++
- }
- }
- sequence[hi], sequence[storeIdx] = sequence[storeIdx], sequence[hi]
- if k <= storeIdx {
- hi = storeIdx
- } else {
- low = storeIdx + 1
- }
- }
-
- if len(sequence)%2 == 0 {
- return sequence[k-1]/2 + sequence[k]/2
- }
- return sequence[k]
-}
diff --git a/vendor/github.com/corona10/goimagehash/hashcompute.go b/vendor/github.com/corona10/goimagehash/hashcompute.go
deleted file mode 100644
index 9b1fcbfe374..00000000000
--- a/vendor/github.com/corona10/goimagehash/hashcompute.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimagehash
-
-import (
- "errors"
- "image"
-
- "github.com/corona10/goimagehash/etcs"
- "github.com/corona10/goimagehash/transforms"
- "github.com/nfnt/resize"
-)
-
-// AverageHash fuction returns a hash computation of average hash.
-// Implementation follows
-// http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
-func AverageHash(img image.Image) (*ImageHash, error) {
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
-
- // Create 64bits hash.
- ahash := NewImageHash(0, AHash)
- resized := resize.Resize(8, 8, img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
- flattens := transforms.FlattenPixels(pixels, 8, 8)
- avg := etcs.MeanOfPixels(flattens)
-
- for idx, p := range flattens {
- if p > avg {
- ahash.leftShiftSet(len(flattens) - idx - 1)
- }
- }
-
- return ahash, nil
-}
-
-// DifferenceHash function returns a hash computation of difference hash.
-// Implementation follows
-// http://www.hackerfactor.com/blog/?/archives/529-Kind-of-Like-That.html
-func DifferenceHash(img image.Image) (*ImageHash, error) {
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
-
- dhash := NewImageHash(0, DHash)
- resized := resize.Resize(9, 8, img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
- idx := 0
- for i := 0; i < len(pixels); i++ {
- for j := 0; j < len(pixels[i])-1; j++ {
- if pixels[i][j] < pixels[i][j+1] {
- dhash.leftShiftSet(64 - idx - 1)
- }
- idx++
- }
- }
-
- return dhash, nil
-}
-
-// PerceptionHash function returns a hash computation of phash.
-// Implementation follows
-// http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
-func PerceptionHash(img image.Image) (*ImageHash, error) {
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
-
- phash := NewImageHash(0, PHash)
- resized := resize.Resize(64, 64, img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
- dct := transforms.DCT2D(pixels, 64, 64)
- flattens := transforms.FlattenPixels(dct, 8, 8)
- median := etcs.MedianOfPixels(flattens)
-
- for idx, p := range flattens {
- if p > median {
- phash.leftShiftSet(len(flattens) - idx - 1)
- }
- }
- return phash, nil
-}
-
-// ExtPerceptionHash function returns phash of which the size can be set larger than uint64
-// Some variable name refer to https://github.com/JohannesBuchner/imagehash/blob/master/imagehash/__init__.py
-// Support 64bits phash (width=8, height=8) and 256bits phash (width=16, height=16)
-// Important: width * height should be the power of 2
-func ExtPerceptionHash(img image.Image, width, height int) (*ExtImageHash, error) {
- imgSize := width * height
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
- if imgSize <= 0 || imgSize&(imgSize-1) != 0 {
- return nil, errors.New("width * height should be power of 2")
- }
- var phash []uint64
- resized := resize.Resize(uint(imgSize), uint(imgSize), img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
- dct := transforms.DCT2D(pixels, imgSize, imgSize)
- flattens := transforms.FlattenPixels(dct, width, height)
- median := etcs.MedianOfPixels(flattens)
-
- lenOfUnit := 64
- if imgSize%lenOfUnit == 0 {
- phash = make([]uint64, imgSize/lenOfUnit)
- } else {
- phash = make([]uint64, imgSize/lenOfUnit+1)
- }
- for idx, p := range flattens {
- indexOfArray := idx / lenOfUnit
- indexOfBit := lenOfUnit - idx%lenOfUnit - 1
- if p > median {
- phash[indexOfArray] |= 1 << uint(indexOfBit)
- }
- }
- return NewExtImageHash(phash, PHash, imgSize), nil
-}
-
-// ExtAverageHash function returns ahash of which the size can be set larger than uint64
-// Support 64bits ahash (width=8, height=8) and 256bits ahash (width=16, height=16)
-func ExtAverageHash(img image.Image, width, height int) (*ExtImageHash, error) {
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
- var ahash []uint64
- imgSize := width * height
-
- resized := resize.Resize(uint(width), uint(height), img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
- flattens := transforms.FlattenPixels(pixels, width, height)
- avg := etcs.MeanOfPixels(flattens)
-
- lenOfUnit := 64
- if imgSize%lenOfUnit == 0 {
- ahash = make([]uint64, imgSize/lenOfUnit)
- } else {
- ahash = make([]uint64, imgSize/lenOfUnit+1)
- }
- for idx, p := range flattens {
- indexOfArray := idx / lenOfUnit
- indexOfBit := lenOfUnit - idx%lenOfUnit - 1
- if p > avg {
- ahash[indexOfArray] |= 1 << uint(indexOfBit)
- }
- }
- return NewExtImageHash(ahash, AHash, imgSize), nil
-}
-
-// ExtDifferenceHash function returns dhash of which the size can be set larger than uint64
-// Support 64bits dhash (width=8, height=8) and 256bits dhash (width=16, height=16)
-func ExtDifferenceHash(img image.Image, width, height int) (*ExtImageHash, error) {
- if img == nil {
- return nil, errors.New("Image object can not be nil")
- }
-
- var dhash []uint64
- imgSize := width * height
-
- resized := resize.Resize(uint(width)+1, uint(height), img, resize.Bilinear)
- pixels := transforms.Rgb2Gray(resized)
-
- lenOfUnit := 64
- if imgSize%lenOfUnit == 0 {
- dhash = make([]uint64, imgSize/lenOfUnit)
- } else {
- dhash = make([]uint64, imgSize/lenOfUnit+1)
- }
- idx := 0
- for i := 0; i < len(pixels); i++ {
- for j := 0; j < len(pixels[i])-1; j++ {
- indexOfArray := idx / lenOfUnit
- indexOfBit := lenOfUnit - idx%lenOfUnit - 1
- if pixels[i][j] < pixels[i][j+1] {
- dhash[indexOfArray] |= 1 << uint(indexOfBit)
- }
- idx++
- }
- }
- return NewExtImageHash(dhash, DHash, imgSize), nil
-}
diff --git a/vendor/github.com/corona10/goimagehash/imagehash.go b/vendor/github.com/corona10/goimagehash/imagehash.go
deleted file mode 100644
index 9cc384a4e48..00000000000
--- a/vendor/github.com/corona10/goimagehash/imagehash.go
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimagehash
-
-import (
- "encoding/binary"
- "encoding/gob"
- "encoding/hex"
- "errors"
- "fmt"
- "io"
-)
-
-// Kind describes the kinds of hash.
-type Kind int
-
-// ImageHash is a struct of hash computation.
-type ImageHash struct {
- hash uint64
- kind Kind
-}
-
-// ExtImageHash is a struct of big hash computation.
-type ExtImageHash struct {
- hash []uint64
- kind Kind
- bits int
-}
-
-const (
- // Unknown is a enum value of the unknown hash.
- Unknown Kind = iota
- // AHash is a enum value of the average hash.
- AHash
- //PHash is a enum value of the perceptual hash.
- PHash
- // DHash is a enum value of the difference hash.
- DHash
- // WHash is a enum value of the wavelet hash.
- WHash
-)
-
-// NewImageHash function creates a new image hash.
-func NewImageHash(hash uint64, kind Kind) *ImageHash {
- return &ImageHash{hash: hash, kind: kind}
-}
-
-// Bits method returns an actual hash bit size
-func (h *ImageHash) Bits() int {
- return 64
-}
-
-// Distance method returns a distance between two hashes.
-func (h *ImageHash) Distance(other *ImageHash) (int, error) {
- if h.GetKind() != other.GetKind() {
- return -1, errors.New("Image hashes's kind should be identical")
- }
-
- lhash := h.GetHash()
- rhash := other.GetHash()
-
- hamming := lhash ^ rhash
- return popcnt(hamming), nil
-}
-
-// GetHash method returns a 64bits hash value.
-func (h *ImageHash) GetHash() uint64 {
- return h.hash
-}
-
-// GetKind method returns a kind of image hash.
-func (h *ImageHash) GetKind() Kind {
- return h.kind
-}
-
-func (h *ImageHash) leftShiftSet(idx int) {
- h.hash |= 1 << uint(idx)
-}
-
-const strFmt = "%1s:%016x"
-
-// Dump method writes a binary serialization into w io.Writer.
-func (h *ImageHash) Dump(w io.Writer) error {
- type D struct {
- Hash uint64
- Kind Kind
- }
- enc := gob.NewEncoder(w)
- err := enc.Encode(D{Hash: h.hash, Kind: h.kind})
- if err != nil {
- return err
- }
- return nil
-}
-
-// LoadImageHash method loads a ImageHash from io.Reader.
-func LoadImageHash(b io.Reader) (*ImageHash, error) {
- type E struct {
- Hash uint64
- Kind Kind
- }
- var e E
- dec := gob.NewDecoder(b)
- err := dec.Decode(&e)
- if err != nil {
- return nil, err
- }
- return &ImageHash{hash: e.Hash, kind: e.Kind}, nil
-}
-
-// ImageHashFromString returns an image hash from a hex representation
-//
-// Deprecated: Use goimagehash.LoadImageHash instead.
-func ImageHashFromString(s string) (*ImageHash, error) {
- var kindStr string
- var hash uint64
- _, err := fmt.Sscanf(s, strFmt, &kindStr, &hash)
- if err != nil {
- return nil, errors.New("Couldn't parse string " + s)
- }
-
- kind := Unknown
- switch kindStr {
- case "a":
- kind = AHash
- case "p":
- kind = PHash
- case "d":
- kind = DHash
- case "w":
- kind = WHash
- }
- return NewImageHash(hash, kind), nil
-}
-
-// ToString returns a hex representation of the hash
-func (h *ImageHash) ToString() string {
- kindStr := ""
- switch h.kind {
- case AHash:
- kindStr = "a"
- case PHash:
- kindStr = "p"
- case DHash:
- kindStr = "d"
- case WHash:
- kindStr = "w"
- }
- return fmt.Sprintf(strFmt, kindStr, h.hash)
-}
-
-// NewExtImageHash function creates a new big hash
-func NewExtImageHash(hash []uint64, kind Kind, bits int) *ExtImageHash {
- return &ExtImageHash{hash: hash, kind: kind, bits: bits}
-}
-
-// Bits method returns an actual hash bit size
-func (h *ExtImageHash) Bits() int {
- return h.bits
-}
-
-// Distance method returns a distance between two big hashes
-func (h *ExtImageHash) Distance(other *ExtImageHash) (int, error) {
- if h.GetKind() != other.GetKind() {
- return -1, errors.New("Extended Image hashes's kind should be identical")
- }
-
- if h.Bits() != other.Bits() {
- msg := fmt.Sprintf("Extended image hash should has an identical bit size but got %v vs %v", h.Bits(), other.Bits())
- return -1, errors.New(msg)
- }
-
- lHash := h.GetHash()
- rHash := other.GetHash()
- if len(lHash) != len(rHash) {
- return -1, errors.New("Extended Image hashes's size should be identical")
- }
-
- distance := 0
- for idx, lh := range lHash {
- rh := rHash[idx]
- hamming := lh ^ rh
- distance += popcnt(hamming)
- }
- return distance, nil
-}
-
-// GetHash method returns a big hash value
-func (h *ExtImageHash) GetHash() []uint64 {
- return h.hash
-}
-
-// GetKind method returns a kind of big hash
-func (h *ExtImageHash) GetKind() Kind {
- return h.kind
-}
-
-// Dump method writes a binary serialization into w io.Writer.
-func (h *ExtImageHash) Dump(w io.Writer) error {
- type D struct {
- Hash []uint64
- Kind Kind
- Bits int
- }
- enc := gob.NewEncoder(w)
- err := enc.Encode(D{Hash: h.hash, Kind: h.kind, Bits: h.bits})
- if err != nil {
- return err
- }
- return nil
-}
-
-// LoadExtImageHash method loads a ExtImageHash from io.Reader.
-func LoadExtImageHash(b io.Reader) (*ExtImageHash, error) {
- type E struct {
- Hash []uint64
- Kind Kind
- Bits int
- }
- var e E
- dec := gob.NewDecoder(b)
- err := dec.Decode(&e)
- if err != nil {
- return nil, err
- }
- return &ExtImageHash{hash: e.Hash, kind: e.Kind, bits: e.Bits}, nil
-}
-
-const extStrFmt = "%1s:%s"
-
-// ExtImageHashFromString returns a big hash from a hex representation
-//
-// Deprecated: Use goimagehash.LoadExtImageHash instead.
-func ExtImageHashFromString(s string) (*ExtImageHash, error) {
- var kindStr string
- var hashStr string
- _, err := fmt.Sscanf(s, extStrFmt, &kindStr, &hashStr)
- if err != nil {
- return nil, errors.New("Couldn't parse string " + s)
- }
-
- hexBytes, err := hex.DecodeString(hashStr)
- if err != nil {
- return nil, err
- }
-
- var hash []uint64
- lenOfByte := 8
- for i := 0; i < len(hexBytes)/lenOfByte; i++ {
- startIndex := i * lenOfByte
- endIndex := startIndex + lenOfByte
- hashUint64 := binary.BigEndian.Uint64(hexBytes[startIndex:endIndex])
- hash = append(hash, hashUint64)
- }
-
- kind := Unknown
- switch kindStr {
- case "a":
- kind = AHash
- case "p":
- kind = PHash
- case "d":
- kind = DHash
- case "w":
- kind = WHash
- }
- return NewExtImageHash(hash, kind, len(hash)*64), nil
-}
-
-// ToString returns a hex representation of big hash
-func (h *ExtImageHash) ToString() string {
- var hexBytes []byte
- for _, hash := range h.hash {
- hashBytes := make([]byte, 8)
- binary.BigEndian.PutUint64(hashBytes, hash)
- hexBytes = append(hexBytes, hashBytes...)
- }
- hexStr := hex.EncodeToString(hexBytes)
-
- kindStr := ""
- switch h.kind {
- case AHash:
- kindStr = "a"
- case PHash:
- kindStr = "p"
- case DHash:
- kindStr = "d"
- case WHash:
- kindStr = "w"
- }
- return fmt.Sprintf(extStrFmt, kindStr, hexStr)
-}
diff --git a/vendor/github.com/corona10/goimagehash/imagehash18.go b/vendor/github.com/corona10/goimagehash/imagehash18.go
deleted file mode 100644
index e8d3fd62a13..00000000000
--- a/vendor/github.com/corona10/goimagehash/imagehash18.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build !go1.9
-
-package goimagehash
-
-func popcnt(x uint64) int {
- diff := 0
- for x != 0 {
- diff += int(x & 1)
- x >>= 1
- }
-
- return diff
-}
diff --git a/vendor/github.com/corona10/goimagehash/imagehash19.go b/vendor/github.com/corona10/goimagehash/imagehash19.go
deleted file mode 100644
index c1d47be3627..00000000000
--- a/vendor/github.com/corona10/goimagehash/imagehash19.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build go1.9
-
-package goimagehash
-
-import (
- "math/bits"
-)
-
-func popcnt(x uint64) int { return bits.OnesCount64(x) }
diff --git a/vendor/github.com/corona10/goimagehash/transforms/dct.go b/vendor/github.com/corona10/goimagehash/transforms/dct.go
deleted file mode 100644
index b0976a3bc8c..00000000000
--- a/vendor/github.com/corona10/goimagehash/transforms/dct.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package transforms
-
-import (
- "math"
- "sync"
-)
-
-// DCT1D function returns result of DCT-II.
-// DCT type II, unscaled. Algorithm by Byeong Gi Lee, 1984.
-func DCT1D(input []float64) []float64 {
- temp := make([]float64, len(input))
- forwardTransform(input, temp, len(input))
- return input
-}
-
-func forwardTransform(input, temp []float64, Len int) {
- if Len == 1 {
- return
- }
-
- halfLen := Len / 2
- for i := 0; i < halfLen; i++ {
- x, y := input[i], input[Len-1-i]
- temp[i] = x + y
- temp[i+halfLen] = (x - y) / (math.Cos((float64(i)+0.5)*math.Pi/float64(Len)) * 2)
- }
- forwardTransform(temp, input, halfLen)
- forwardTransform(temp[halfLen:], input, halfLen)
- for i := 0; i < halfLen-1; i++ {
- input[i*2+0] = temp[i]
- input[i*2+1] = temp[i+halfLen] + temp[i+halfLen+1]
- }
- input[Len-2], input[Len-1] = temp[halfLen-1], temp[Len-1]
-}
-
-// DCT2D function returns a result of DCT2D by using the seperable property.
-func DCT2D(input [][]float64, w int, h int) [][]float64 {
- output := make([][]float64, h)
- for i := range output {
- output[i] = make([]float64, w)
- }
-
- wg := new(sync.WaitGroup)
- for i := 0; i < h; i++ {
- wg.Add(1)
- go func(i int) {
- cols := DCT1D(input[i])
- output[i] = cols
- wg.Done()
- }(i)
- }
-
- wg.Wait()
- for i := 0; i < w; i++ {
- wg.Add(1)
- in := make([]float64, h)
- go func(i int) {
- for j := 0; j < h; j++ {
- in[j] = output[j][i]
- }
- rows := DCT1D(in)
- for j := 0; j < len(rows); j++ {
- output[j][i] = rows[j]
- }
- wg.Done()
- }(i)
- }
-
- wg.Wait()
- return output
-}
diff --git a/vendor/github.com/corona10/goimagehash/transforms/doc.go b/vendor/github.com/corona10/goimagehash/transforms/doc.go
deleted file mode 100644
index 01bd0e8396f..00000000000
--- a/vendor/github.com/corona10/goimagehash/transforms/doc.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package transforms
diff --git a/vendor/github.com/corona10/goimagehash/transforms/pixels.go b/vendor/github.com/corona10/goimagehash/transforms/pixels.go
deleted file mode 100644
index 378e1b5593d..00000000000
--- a/vendor/github.com/corona10/goimagehash/transforms/pixels.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2017 The goimagehash Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package transforms
-
-import (
- "image"
-)
-
-// Rgb2Gray function converts RGB to a gray scale array.
-func Rgb2Gray(colorImg image.Image) [][]float64 {
- bounds := colorImg.Bounds()
- w, h := bounds.Max.X-bounds.Min.X, bounds.Max.Y-bounds.Min.Y
- pixels := make([][]float64, h)
-
- for i := range pixels {
- pixels[i] = make([]float64, w)
- for j := range pixels[i] {
- color := colorImg.At(j, i)
- r, g, b, _ := color.RGBA()
- lum := 0.299*float64(r/257) + 0.587*float64(g/257) + 0.114*float64(b/256)
- pixels[i][j] = lum
- }
- }
-
- return pixels
-}
-
-// FlattenPixels function flattens 2d array into 1d array.
-func FlattenPixels(pixels [][]float64, x int, y int) []float64 {
- flattens := make([]float64, x*y)
- for i := 0; i < y; i++ {
- for j := 0; j < x; j++ {
- flattens[y*i+j] = pixels[i][j]
- }
- }
- return flattens
-}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
deleted file mode 100644
index 1cade6cef6a..00000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Brian Goff
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
deleted file mode 100644
index b4800567345..00000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package md2man
-
-import (
- "github.com/russross/blackfriday/v2"
-)
-
-// Render converts a markdown document into a roff formatted document.
-func Render(doc []byte) []byte {
- renderer := NewRoffRenderer()
-
- return blackfriday.Run(doc,
- []blackfriday.Option{blackfriday.WithRenderer(renderer),
- blackfriday.WithExtensions(renderer.GetExtensions())}...)
-}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
deleted file mode 100644
index be2b3436062..00000000000
--- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
+++ /dev/null
@@ -1,336 +0,0 @@
-package md2man
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
-
- "github.com/russross/blackfriday/v2"
-)
-
-// roffRenderer implements the blackfriday.Renderer interface for creating
-// roff format (manpages) from markdown text
-type roffRenderer struct {
- extensions blackfriday.Extensions
- listCounters []int
- firstHeader bool
- firstDD bool
- listDepth int
-}
-
-const (
- titleHeader = ".TH "
- topLevelHeader = "\n\n.SH "
- secondLevelHdr = "\n.SH "
- otherHeader = "\n.SS "
- crTag = "\n"
- emphTag = "\\fI"
- emphCloseTag = "\\fP"
- strongTag = "\\fB"
- strongCloseTag = "\\fP"
- breakTag = "\n.br\n"
- paraTag = "\n.PP\n"
- hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
- linkTag = "\n\\[la]"
- linkCloseTag = "\\[ra]"
- codespanTag = "\\fB\\fC"
- codespanCloseTag = "\\fR"
- codeTag = "\n.PP\n.RS\n\n.nf\n"
- codeCloseTag = "\n.fi\n.RE\n"
- quoteTag = "\n.PP\n.RS\n"
- quoteCloseTag = "\n.RE\n"
- listTag = "\n.RS\n"
- listCloseTag = "\n.RE\n"
- dtTag = "\n.TP\n"
- dd2Tag = "\n"
- tableStart = "\n.TS\nallbox;\n"
- tableEnd = ".TE\n"
- tableCellStart = "T{\n"
- tableCellEnd = "\nT}\n"
-)
-
-// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
-// from markdown
-func NewRoffRenderer() *roffRenderer { // nolint: golint
- var extensions blackfriday.Extensions
-
- extensions |= blackfriday.NoIntraEmphasis
- extensions |= blackfriday.Tables
- extensions |= blackfriday.FencedCode
- extensions |= blackfriday.SpaceHeadings
- extensions |= blackfriday.Footnotes
- extensions |= blackfriday.Titleblock
- extensions |= blackfriday.DefinitionLists
- return &roffRenderer{
- extensions: extensions,
- }
-}
-
-// GetExtensions returns the list of extensions used by this renderer implementation
-func (r *roffRenderer) GetExtensions() blackfriday.Extensions {
- return r.extensions
-}
-
-// RenderHeader handles outputting the header at document start
-func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
- // disable hyphenation
- out(w, ".nh\n")
-}
-
-// RenderFooter handles outputting the footer at the document end; the roff
-// renderer has no footer information
-func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node) {
-}
-
-// RenderNode is called for each node in a markdown document; based on the node
-// type the equivalent roff output is sent to the writer
-func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
-
- var walkAction = blackfriday.GoToNext
-
- switch node.Type {
- case blackfriday.Text:
- escapeSpecialChars(w, node.Literal)
- case blackfriday.Softbreak:
- out(w, crTag)
- case blackfriday.Hardbreak:
- out(w, breakTag)
- case blackfriday.Emph:
- if entering {
- out(w, emphTag)
- } else {
- out(w, emphCloseTag)
- }
- case blackfriday.Strong:
- if entering {
- out(w, strongTag)
- } else {
- out(w, strongCloseTag)
- }
- case blackfriday.Link:
- if !entering {
- out(w, linkTag+string(node.LinkData.Destination)+linkCloseTag)
- }
- case blackfriday.Image:
- // ignore images
- walkAction = blackfriday.SkipChildren
- case blackfriday.Code:
- out(w, codespanTag)
- escapeSpecialChars(w, node.Literal)
- out(w, codespanCloseTag)
- case blackfriday.Document:
- break
- case blackfriday.Paragraph:
- // roff .PP markers break lists
- if r.listDepth > 0 {
- return blackfriday.GoToNext
- }
- if entering {
- out(w, paraTag)
- } else {
- out(w, crTag)
- }
- case blackfriday.BlockQuote:
- if entering {
- out(w, quoteTag)
- } else {
- out(w, quoteCloseTag)
- }
- case blackfriday.Heading:
- r.handleHeading(w, node, entering)
- case blackfriday.HorizontalRule:
- out(w, hruleTag)
- case blackfriday.List:
- r.handleList(w, node, entering)
- case blackfriday.Item:
- r.handleItem(w, node, entering)
- case blackfriday.CodeBlock:
- out(w, codeTag)
- escapeSpecialChars(w, node.Literal)
- out(w, codeCloseTag)
- case blackfriday.Table:
- r.handleTable(w, node, entering)
- case blackfriday.TableHead:
- case blackfriday.TableBody:
- case blackfriday.TableRow:
- // no action as cell entries do all the nroff formatting
- return blackfriday.GoToNext
- case blackfriday.TableCell:
- r.handleTableCell(w, node, entering)
- case blackfriday.HTMLSpan:
- // ignore other HTML tags
- default:
- fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
- }
- return walkAction
-}
-
-func (r *roffRenderer) handleHeading(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- switch node.Level {
- case 1:
- if !r.firstHeader {
- out(w, titleHeader)
- r.firstHeader = true
- break
- }
- out(w, topLevelHeader)
- case 2:
- out(w, secondLevelHdr)
- default:
- out(w, otherHeader)
- }
- }
-}
-
-func (r *roffRenderer) handleList(w io.Writer, node *blackfriday.Node, entering bool) {
- openTag := listTag
- closeTag := listCloseTag
- if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
- // tags for definition lists handled within Item node
- openTag = ""
- closeTag = ""
- }
- if entering {
- r.listDepth++
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- r.listCounters = append(r.listCounters, 1)
- }
- out(w, openTag)
- } else {
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- r.listCounters = r.listCounters[:len(r.listCounters)-1]
- }
- out(w, closeTag)
- r.listDepth--
- }
-}
-
-func (r *roffRenderer) handleItem(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
- out(w, fmt.Sprintf(".IP \"%3d.\" 5\n", r.listCounters[len(r.listCounters)-1]))
- r.listCounters[len(r.listCounters)-1]++
- } else if node.ListFlags&blackfriday.ListTypeTerm != 0 {
- // DT (definition term): line just before DD (see below).
- out(w, dtTag)
- r.firstDD = true
- } else if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
- // DD (definition description): line that starts with ": ".
- //
- // We have to distinguish between the first DD and the
- // subsequent ones, as there should be no vertical
- // whitespace between the DT and the first DD.
- if r.firstDD {
- r.firstDD = false
- } else {
- out(w, dd2Tag)
- }
- } else {
- out(w, ".IP \\(bu 2\n")
- }
- } else {
- out(w, "\n")
- }
-}
-
-func (r *roffRenderer) handleTable(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- out(w, tableStart)
- // call walker to count cells (and rows?) so format section can be produced
- columns := countColumns(node)
- out(w, strings.Repeat("l ", columns)+"\n")
- out(w, strings.Repeat("l ", columns)+".\n")
- } else {
- out(w, tableEnd)
- }
-}
-
-func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, entering bool) {
- if entering {
- var start string
- if node.Prev != nil && node.Prev.Type == blackfriday.TableCell {
- start = "\t"
- }
- if node.IsHeader {
- start += codespanTag
- } else if nodeLiteralSize(node) > 30 {
- start += tableCellStart
- }
- out(w, start)
- } else {
- var end string
- if node.IsHeader {
- end = codespanCloseTag
- } else if nodeLiteralSize(node) > 30 {
- end = tableCellEnd
- }
- if node.Next == nil && end != tableCellEnd {
- // Last cell: need to carriage return if we are at the end of the
- // header row and content isn't wrapped in a "tablecell"
- end += crTag
- }
- out(w, end)
- }
-}
-
-func nodeLiteralSize(node *blackfriday.Node) int {
- total := 0
- for n := node.FirstChild; n != nil; n = n.FirstChild {
- total += len(n.Literal)
- }
- return total
-}
-
-// because roff format requires knowing the column count before outputting any table
-// data we need to walk a table tree and count the columns
-func countColumns(node *blackfriday.Node) int {
- var columns int
-
- node.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
- switch node.Type {
- case blackfriday.TableRow:
- if !entering {
- return blackfriday.Terminate
- }
- case blackfriday.TableCell:
- if entering {
- columns++
- }
- default:
- }
- return blackfriday.GoToNext
- })
- return columns
-}
-
-func out(w io.Writer, output string) {
- io.WriteString(w, output) // nolint: errcheck
-}
-
-func escapeSpecialChars(w io.Writer, text []byte) {
- for i := 0; i < len(text); i++ {
- // escape initial apostrophe or period
- if len(text) >= 1 && (text[0] == '\'' || text[0] == '.') {
- out(w, "\\&")
- }
-
- // directly copy normal characters
- org := i
-
- for i < len(text) && text[i] != '\\' {
- i++
- }
- if i > org {
- w.Write(text[org:i]) // nolint: errcheck
- }
-
- // escape a character
- if i >= len(text) {
- break
- }
-
- w.Write([]byte{'\\', text[i]}) // nolint: errcheck
- }
-}
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
deleted file mode 100644
index bc52e96f2b0..00000000000
--- a/vendor/github.com/davecgh/go-spew/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-ISC License
-
-Copyright (c) 2012-2016 Dave Collins
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
deleted file mode 100644
index 792994785e3..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine, compiled by GopherJS, and
-// "-tags safe" is not added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// Go versions prior to 1.4 are disabled because they use a different layout
-// for interfaces which make the implementation of unsafeReflectValue more complex.
-// +build !js,!appengine,!safe,!disableunsafe,go1.4
-
-package spew
-
-import (
- "reflect"
- "unsafe"
-)
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = false
-
- // ptrSize is the size of a pointer on the current arch.
- ptrSize = unsafe.Sizeof((*byte)(nil))
-)
-
-type flag uintptr
-
-var (
- // flagRO indicates whether the value field of a reflect.Value
- // is read-only.
- flagRO flag
-
- // flagAddr indicates whether the address of the reflect.Value's
- // value may be taken.
- flagAddr flag
-)
-
-// flagKindMask holds the bits that make up the kind
-// part of the flags field. In all the supported versions,
-// it is in the lower 5 bits.
-const flagKindMask = flag(0x1f)
-
-// Different versions of Go have used different
-// bit layouts for the flags type. This table
-// records the known combinations.
-var okFlags = []struct {
- ro, addr flag
-}{{
- // From Go 1.4 to 1.5
- ro: 1 << 5,
- addr: 1 << 7,
-}, {
- // Up to Go tip.
- ro: 1<<5 | 1<<6,
- addr: 1 << 8,
-}}
-
-var flagValOffset = func() uintptr {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
- }
- return field.Offset
-}()
-
-// flagField returns a pointer to the flag field of a reflect.Value.
-func flagField(v *reflect.Value) *flag {
- return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))
-}
-
-// unsafeReflectValue converts the passed reflect.Value into a one that bypasses
-// the typical safety restrictions preventing access to unaddressable and
-// unexported data. It works by digging the raw pointer to the underlying
-// value out of the protected value and generating a new unprotected (unsafe)
-// reflect.Value to it.
-//
-// This allows us to check for implementations of the Stringer and error
-// interfaces to be used for pretty printing ordinarily unaddressable and
-// inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- if !v.IsValid() || (v.CanInterface() && v.CanAddr()) {
- return v
- }
- flagFieldPtr := flagField(&v)
- *flagFieldPtr &^= flagRO
- *flagFieldPtr |= flagAddr
- return v
-}
-
-// Sanity checks against future reflect package changes
-// to the type or semantics of the Value.flag field.
-func init() {
- field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
- if !ok {
- panic("reflect.Value has no flag field")
- }
- if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {
- panic("reflect.Value flag field has changed kind")
- }
- type t0 int
- var t struct {
- A t0
- // t0 will have flagEmbedRO set.
- t0
- // a will have flagStickyRO set
- a t0
- }
- vA := reflect.ValueOf(t).FieldByName("A")
- va := reflect.ValueOf(t).FieldByName("a")
- vt0 := reflect.ValueOf(t).FieldByName("t0")
-
- // Infer flagRO from the difference between the flags
- // for the (otherwise identical) fields in t.
- flagPublic := *flagField(&vA)
- flagWithRO := *flagField(&va) | *flagField(&vt0)
- flagRO = flagPublic ^ flagWithRO
-
- // Infer flagAddr from the difference between a value
- // taken from a pointer and not.
- vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A")
- flagNoPtr := *flagField(&vA)
- flagPtr := *flagField(&vPtrA)
- flagAddr = flagNoPtr ^ flagPtr
-
- // Check that the inferred flags tally with one of the known versions.
- for _, f := range okFlags {
- if flagRO == f.ro && flagAddr == f.addr {
- return
- }
- }
- panic("reflect.Value read-only flag has changed semantics")
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
deleted file mode 100644
index 205c28d68c4..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015-2016 Dave Collins
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is running on Google App Engine, compiled by GopherJS, or
-// "-tags safe" is added to the go build command line. The "disableunsafe"
-// tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe !go1.4
-
-package spew
-
-import "reflect"
-
-const (
- // UnsafeDisabled is a build-time constant which specifies whether or
- // not access to the unsafe package is available.
- UnsafeDisabled = true
-)
-
-// unsafeReflectValue typically converts the passed reflect.Value into a one
-// that bypasses the typical safety restrictions preventing access to
-// unaddressable and unexported data. However, doing this relies on access to
-// the unsafe package. This is a stub version which simply returns the passed
-// reflect.Value when the unsafe package is not available.
-func unsafeReflectValue(v reflect.Value) reflect.Value {
- return v
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
deleted file mode 100644
index 1be8ce94576..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "sort"
- "strconv"
-)
-
-// Some constants in the form of bytes to avoid string overhead. This mirrors
-// the technique used in the fmt package.
-var (
- panicBytes = []byte("(PANIC=")
- plusBytes = []byte("+")
- iBytes = []byte("i")
- trueBytes = []byte("true")
- falseBytes = []byte("false")
- interfaceBytes = []byte("(interface {})")
- commaNewlineBytes = []byte(",\n")
- newlineBytes = []byte("\n")
- openBraceBytes = []byte("{")
- openBraceNewlineBytes = []byte("{\n")
- closeBraceBytes = []byte("}")
- asteriskBytes = []byte("*")
- colonBytes = []byte(":")
- colonSpaceBytes = []byte(": ")
- openParenBytes = []byte("(")
- closeParenBytes = []byte(")")
- spaceBytes = []byte(" ")
- pointerChainBytes = []byte("->")
- nilAngleBytes = []byte("")
- maxNewlineBytes = []byte("\n")
- maxShortBytes = []byte("")
- circularBytes = []byte("")
- circularShortBytes = []byte("")
- invalidAngleBytes = []byte("")
- openBracketBytes = []byte("[")
- closeBracketBytes = []byte("]")
- percentBytes = []byte("%")
- precisionBytes = []byte(".")
- openAngleBytes = []byte("<")
- closeAngleBytes = []byte(">")
- openMapBytes = []byte("map[")
- closeMapBytes = []byte("]")
- lenEqualsBytes = []byte("len=")
- capEqualsBytes = []byte("cap=")
-)
-
-// hexDigits is used to map a decimal value to a hex digit.
-var hexDigits = "0123456789abcdef"
-
-// catchPanic handles any panics that might occur during the handleMethods
-// calls.
-func catchPanic(w io.Writer, v reflect.Value) {
- if err := recover(); err != nil {
- w.Write(panicBytes)
- fmt.Fprintf(w, "%v", err)
- w.Write(closeParenBytes)
- }
-}
-
-// handleMethods attempts to call the Error and String methods on the underlying
-// type the passed reflect.Value represents and outputes the result to Writer w.
-//
-// It handles panics in any called methods by catching and displaying the error
-// as the formatted value.
-func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) {
- // We need an interface to check if the type implements the error or
- // Stringer interface. However, the reflect package won't give us an
- // interface on certain things like unexported struct fields in order
- // to enforce visibility rules. We use unsafe, when it's available,
- // to bypass these restrictions since this package does not mutate the
- // values.
- if !v.CanInterface() {
- if UnsafeDisabled {
- return false
- }
-
- v = unsafeReflectValue(v)
- }
-
- // Choose whether or not to do error and Stringer interface lookups against
- // the base type or a pointer to the base type depending on settings.
- // Technically calling one of these methods with a pointer receiver can
- // mutate the value, however, types which choose to satisify an error or
- // Stringer interface with a pointer receiver should not be mutating their
- // state inside these interface methods.
- if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() {
- v = unsafeReflectValue(v)
- }
- if v.CanAddr() {
- v = v.Addr()
- }
-
- // Is it an error or Stringer?
- switch iface := v.Interface().(type) {
- case error:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.Error()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
-
- w.Write([]byte(iface.Error()))
- return true
-
- case fmt.Stringer:
- defer catchPanic(w, v)
- if cs.ContinueOnMethod {
- w.Write(openParenBytes)
- w.Write([]byte(iface.String()))
- w.Write(closeParenBytes)
- w.Write(spaceBytes)
- return false
- }
- w.Write([]byte(iface.String()))
- return true
- }
- return false
-}
-
-// printBool outputs a boolean value as true or false to Writer w.
-func printBool(w io.Writer, val bool) {
- if val {
- w.Write(trueBytes)
- } else {
- w.Write(falseBytes)
- }
-}
-
-// printInt outputs a signed integer value to Writer w.
-func printInt(w io.Writer, val int64, base int) {
- w.Write([]byte(strconv.FormatInt(val, base)))
-}
-
-// printUint outputs an unsigned integer value to Writer w.
-func printUint(w io.Writer, val uint64, base int) {
- w.Write([]byte(strconv.FormatUint(val, base)))
-}
-
-// printFloat outputs a floating point value using the specified precision,
-// which is expected to be 32 or 64bit, to Writer w.
-func printFloat(w io.Writer, val float64, precision int) {
- w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision)))
-}
-
-// printComplex outputs a complex value using the specified float precision
-// for the real and imaginary parts to Writer w.
-func printComplex(w io.Writer, c complex128, floatPrecision int) {
- r := real(c)
- w.Write(openParenBytes)
- w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision)))
- i := imag(c)
- if i >= 0 {
- w.Write(plusBytes)
- }
- w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision)))
- w.Write(iBytes)
- w.Write(closeParenBytes)
-}
-
-// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'
-// prefix to Writer w.
-func printHexPtr(w io.Writer, p uintptr) {
- // Null pointer.
- num := uint64(p)
- if num == 0 {
- w.Write(nilAngleBytes)
- return
- }
-
- // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix
- buf := make([]byte, 18)
-
- // It's simpler to construct the hex string right to left.
- base := uint64(16)
- i := len(buf) - 1
- for num >= base {
- buf[i] = hexDigits[num%base]
- num /= base
- i--
- }
- buf[i] = hexDigits[num]
-
- // Add '0x' prefix.
- i--
- buf[i] = 'x'
- i--
- buf[i] = '0'
-
- // Strip unused leading bytes.
- buf = buf[i:]
- w.Write(buf)
-}
-
-// valuesSorter implements sort.Interface to allow a slice of reflect.Value
-// elements to be sorted.
-type valuesSorter struct {
- values []reflect.Value
- strings []string // either nil or same len and values
- cs *ConfigState
-}
-
-// newValuesSorter initializes a valuesSorter instance, which holds a set of
-// surrogate keys on which the data should be sorted. It uses flags in
-// ConfigState to decide if and how to populate those surrogate keys.
-func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface {
- vs := &valuesSorter{values: values, cs: cs}
- if canSortSimply(vs.values[0].Kind()) {
- return vs
- }
- if !cs.DisableMethods {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- b := bytes.Buffer{}
- if !handleMethods(cs, &b, vs.values[i]) {
- vs.strings = nil
- break
- }
- vs.strings[i] = b.String()
- }
- }
- if vs.strings == nil && cs.SpewKeys {
- vs.strings = make([]string, len(values))
- for i := range vs.values {
- vs.strings[i] = Sprintf("%#v", vs.values[i].Interface())
- }
- }
- return vs
-}
-
-// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted
-// directly, or whether it should be considered for sorting by surrogate keys
-// (if the ConfigState allows it).
-func canSortSimply(kind reflect.Kind) bool {
- // This switch parallels valueSortLess, except for the default case.
- switch kind {
- case reflect.Bool:
- return true
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return true
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return true
- case reflect.Float32, reflect.Float64:
- return true
- case reflect.String:
- return true
- case reflect.Uintptr:
- return true
- case reflect.Array:
- return true
- }
- return false
-}
-
-// Len returns the number of values in the slice. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Len() int {
- return len(s.values)
-}
-
-// Swap swaps the values at the passed indices. It is part of the
-// sort.Interface implementation.
-func (s *valuesSorter) Swap(i, j int) {
- s.values[i], s.values[j] = s.values[j], s.values[i]
- if s.strings != nil {
- s.strings[i], s.strings[j] = s.strings[j], s.strings[i]
- }
-}
-
-// valueSortLess returns whether the first value should sort before the second
-// value. It is used by valueSorter.Less as part of the sort.Interface
-// implementation.
-func valueSortLess(a, b reflect.Value) bool {
- switch a.Kind() {
- case reflect.Bool:
- return !a.Bool() && b.Bool()
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- return a.Int() < b.Int()
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- return a.Uint() < b.Uint()
- case reflect.Float32, reflect.Float64:
- return a.Float() < b.Float()
- case reflect.String:
- return a.String() < b.String()
- case reflect.Uintptr:
- return a.Uint() < b.Uint()
- case reflect.Array:
- // Compare the contents of both arrays.
- l := a.Len()
- for i := 0; i < l; i++ {
- av := a.Index(i)
- bv := b.Index(i)
- if av.Interface() == bv.Interface() {
- continue
- }
- return valueSortLess(av, bv)
- }
- }
- return a.String() < b.String()
-}
-
-// Less returns whether the value at index i should sort before the
-// value at index j. It is part of the sort.Interface implementation.
-func (s *valuesSorter) Less(i, j int) bool {
- if s.strings == nil {
- return valueSortLess(s.values[i], s.values[j])
- }
- return s.strings[i] < s.strings[j]
-}
-
-// sortValues is a sort function that handles both native types and any type that
-// can be converted to error or Stringer. Other inputs are sorted according to
-// their Value.String() value to ensure display stability.
-func sortValues(values []reflect.Value, cs *ConfigState) {
- if len(values) == 0 {
- return
- }
- sort.Sort(newValuesSorter(values, cs))
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go
deleted file mode 100644
index 2e3d22f3120..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/config.go
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
-)
-
-// ConfigState houses the configuration options used by spew to format and
-// display values. There is a global instance, Config, that is used to control
-// all top-level Formatter and Dump functionality. Each ConfigState instance
-// provides methods equivalent to the top-level functions.
-//
-// The zero value for ConfigState provides no indentation. You would typically
-// want to set it to a space or a tab.
-//
-// Alternatively, you can use NewDefaultConfig to get a ConfigState instance
-// with default settings. See the documentation of NewDefaultConfig for default
-// values.
-type ConfigState struct {
- // Indent specifies the string to use for each indentation level. The
- // global config instance that all top-level functions use set this to a
- // single space by default. If you would like more indentation, you might
- // set this to a tab with "\t" or perhaps two spaces with " ".
- Indent string
-
- // MaxDepth controls the maximum number of levels to descend into nested
- // data structures. The default, 0, means there is no limit.
- //
- // NOTE: Circular data structures are properly detected, so it is not
- // necessary to set this value unless you specifically want to limit deeply
- // nested data structures.
- MaxDepth int
-
- // DisableMethods specifies whether or not error and Stringer interfaces are
- // invoked for types that implement them.
- DisableMethods bool
-
- // DisablePointerMethods specifies whether or not to check for and invoke
- // error and Stringer interfaces on types which only accept a pointer
- // receiver when the current type is not a pointer.
- //
- // NOTE: This might be an unsafe action since calling one of these methods
- // with a pointer receiver could technically mutate the value, however,
- // in practice, types which choose to satisify an error or Stringer
- // interface with a pointer receiver should not be mutating their state
- // inside these interface methods. As a result, this option relies on
- // access to the unsafe package, so it will not have any effect when
- // running in environments without access to the unsafe package such as
- // Google App Engine or with the "safe" build tag specified.
- DisablePointerMethods bool
-
- // DisablePointerAddresses specifies whether to disable the printing of
- // pointer addresses. This is useful when diffing data structures in tests.
- DisablePointerAddresses bool
-
- // DisableCapacities specifies whether to disable the printing of capacities
- // for arrays, slices, maps and channels. This is useful when diffing
- // data structures in tests.
- DisableCapacities bool
-
- // ContinueOnMethod specifies whether or not recursion should continue once
- // a custom error or Stringer interface is invoked. The default, false,
- // means it will print the results of invoking the custom error or Stringer
- // interface and return immediately instead of continuing to recurse into
- // the internals of the data type.
- //
- // NOTE: This flag does not have any effect if method invocation is disabled
- // via the DisableMethods or DisablePointerMethods options.
- ContinueOnMethod bool
-
- // SortKeys specifies map keys should be sorted before being printed. Use
- // this to have a more deterministic, diffable output. Note that only
- // native types (bool, int, uint, floats, uintptr and string) and types
- // that support the error or Stringer interfaces (if methods are
- // enabled) are supported, with other types sorted according to the
- // reflect.Value.String() output which guarantees display stability.
- SortKeys bool
-
- // SpewKeys specifies that, as a last resort attempt, map keys should
- // be spewed to strings and sorted by those strings. This is only
- // considered if SortKeys is true.
- SpewKeys bool
-}
-
-// Config is the active configuration of the top-level functions.
-// The configuration can be changed by modifying the contents of spew.Config.
-var Config = ConfigState{Indent: " "}
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the formatted string as a value that satisfies error. See NewFormatter
-// for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, c.convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, c.convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, c.convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a Formatter interface returned by c.NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, c.convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Print(a ...interface{}) (n int, err error) {
- return fmt.Print(c.convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, c.convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Println(a ...interface{}) (n int, err error) {
- return fmt.Println(c.convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprint(a ...interface{}) string {
- return fmt.Sprint(c.convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a Formatter interface returned by c.NewFormatter. It returns
-// the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, c.convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a Formatter interface returned by c.NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))
-func (c *ConfigState) Sprintln(a ...interface{}) string {
- return fmt.Sprintln(c.convertArgs(a)...)
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-c.Printf, c.Println, or c.Printf.
-*/
-func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(c, v)
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {
- fdump(c, w, a...)
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by modifying the public members
-of c. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func (c *ConfigState) Dump(a ...interface{}) {
- fdump(c, os.Stdout, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func (c *ConfigState) Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(c, &buf, a...)
- return buf.String()
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a spew Formatter interface using
-// the ConfigState associated with s.
-func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = newFormatter(c, arg)
- }
- return formatters
-}
-
-// NewDefaultConfig returns a ConfigState with the following default settings.
-//
-// Indent: " "
-// MaxDepth: 0
-// DisableMethods: false
-// DisablePointerMethods: false
-// ContinueOnMethod: false
-// SortKeys: false
-func NewDefaultConfig() *ConfigState {
- return &ConfigState{Indent: " "}
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go
deleted file mode 100644
index aacaac6f1e1..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
-Package spew implements a deep pretty printer for Go data structures to aid in
-debugging.
-
-A quick overview of the additional features spew provides over the built-in
-printing facilities for Go data types are as follows:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output (only when using
- Dump style)
-
-There are two different approaches spew allows for dumping Go data structures:
-
- * Dump style which prints with newlines, customizable indentation,
- and additional debug information such as types and all pointer addresses
- used to indirect to the final value
- * A custom Formatter interface that integrates cleanly with the standard fmt
- package and replaces %v, %+v, %#v, and %#+v to provide inline printing
- similar to the default %v while providing the additional functionality
- outlined above and passing unsupported format verbs such as %x and %q
- along to fmt
-
-Quick Start
-
-This section demonstrates how to quickly get started with spew. See the
-sections below for further details on formatting and configuration options.
-
-To dump a variable with full newlines, indentation, type, and pointer
-information use Dump, Fdump, or Sdump:
- spew.Dump(myVar1, myVar2, ...)
- spew.Fdump(someWriter, myVar1, myVar2, ...)
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Alternatively, if you would prefer to use format strings with a compacted inline
-printing style, use the convenience wrappers Printf, Fprintf, etc with
-%v (most compact), %+v (adds pointer addresses), %#v (adds types), or
-%#+v (adds types and pointer addresses):
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-Configuration Options
-
-Configuration of spew is handled by fields in the ConfigState type. For
-convenience, all of the top-level functions use a global state available
-via the spew.Config global.
-
-It is also possible to create a ConfigState instance that provides methods
-equivalent to the top-level functions. This allows concurrent configuration
-options. See the ConfigState documentation for more details.
-
-The following configuration options are available:
- * Indent
- String to use for each indentation level for Dump functions.
- It is a single space by default. A popular alternative is "\t".
-
- * MaxDepth
- Maximum number of levels to descend into nested data structures.
- There is no limit by default.
-
- * DisableMethods
- Disables invocation of error and Stringer interface methods.
- Method invocation is enabled by default.
-
- * DisablePointerMethods
- Disables invocation of error and Stringer interface methods on types
- which only accept pointer receivers from non-pointer variables.
- Pointer method invocation is enabled by default.
-
- * DisablePointerAddresses
- DisablePointerAddresses specifies whether to disable the printing of
- pointer addresses. This is useful when diffing data structures in tests.
-
- * DisableCapacities
- DisableCapacities specifies whether to disable the printing of
- capacities for arrays, slices, maps and channels. This is useful when
- diffing data structures in tests.
-
- * ContinueOnMethod
- Enables recursion into types after invoking error and Stringer interface
- methods. Recursion after method invocation is disabled by default.
-
- * SortKeys
- Specifies map keys should be sorted before being printed. Use
- this to have a more deterministic, diffable output. Note that
- only native types (bool, int, uint, floats, uintptr and string)
- and types which implement error or Stringer interfaces are
- supported with other types sorted according to the
- reflect.Value.String() output which guarantees display
- stability. Natural map order is used by default.
-
- * SpewKeys
- Specifies that, as a last resort attempt, map keys should be
- spewed to strings and sorted by those strings. This is only
- considered if SortKeys is true.
-
-Dump Usage
-
-Simply call spew.Dump with a list of variables you want to dump:
-
- spew.Dump(myVar1, myVar2, ...)
-
-You may also call spew.Fdump if you would prefer to output to an arbitrary
-io.Writer. For example, to dump to standard error:
-
- spew.Fdump(os.Stderr, myVar1, myVar2, ...)
-
-A third option is to call spew.Sdump to get the formatted output as a string:
-
- str := spew.Sdump(myVar1, myVar2, ...)
-
-Sample Dump Output
-
-See the Dump example for details on the setup of the types and variables being
-shown here.
-
- (main.Foo) {
- unexportedField: (*main.Bar)(0xf84002e210)({
- flag: (main.Flag) flagTwo,
- data: (uintptr)
- }),
- ExportedField: (map[interface {}]interface {}) (len=1) {
- (string) (len=3) "one": (bool) true
- }
- }
-
-Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C
-command as shown.
- ([]uint8) (len=32 cap=32) {
- 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
- 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
- 00000020 31 32 |12|
- }
-
-Custom Formatter
-
-Spew provides a custom formatter that implements the fmt.Formatter interface
-so that it integrates cleanly with standard fmt package printing functions. The
-formatter is useful for inline printing of smaller data types similar to the
-standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Custom Formatter Usage
-
-The simplest way to make use of the spew custom formatter is to call one of the
-convenience functions such as spew.Printf, spew.Println, or spew.Printf. The
-functions have syntax you are most likely already familiar with:
-
- spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
- spew.Println(myVar, myVar2)
- spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
- spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
-
-See the Index for the full list convenience functions.
-
-Sample Formatter Output
-
-Double pointer to a uint8:
- %v: <**>5
- %+v: <**>(0xf8400420d0->0xf8400420c8)5
- %#v: (**uint8)5
- %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
-
-Pointer to circular struct with a uint8 field and a pointer to itself:
- %v: <*>{1 <*>}
- %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)}
- %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)}
- %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)}
-
-See the Printf example for details on the setup of variables being shown
-here.
-
-Errors
-
-Since it is possible for custom Stringer/error interfaces to panic, spew
-detects them and handles them internally by printing the panic information
-inline with the output. Since spew is intended to provide deep pretty printing
-capabilities on structures, it intentionally does not return any errors.
-*/
-package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
deleted file mode 100644
index f78d89fc1f6..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "encoding/hex"
- "fmt"
- "io"
- "os"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-)
-
-var (
- // uint8Type is a reflect.Type representing a uint8. It is used to
- // convert cgo types to uint8 slices for hexdumping.
- uint8Type = reflect.TypeOf(uint8(0))
-
- // cCharRE is a regular expression that matches a cgo char.
- // It is used to detect character arrays to hexdump them.
- cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`)
-
- // cUnsignedCharRE is a regular expression that matches a cgo unsigned
- // char. It is used to detect unsigned character arrays to hexdump
- // them.
- cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`)
-
- // cUint8tCharRE is a regular expression that matches a cgo uint8_t.
- // It is used to detect uint8_t arrays to hexdump them.
- cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`)
-)
-
-// dumpState contains information about the state of a dump operation.
-type dumpState struct {
- w io.Writer
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- ignoreNextIndent bool
- cs *ConfigState
-}
-
-// indent performs indentation according to the depth level and cs.Indent
-// option.
-func (d *dumpState) indent() {
- if d.ignoreNextIndent {
- d.ignoreNextIndent = false
- return
- }
- d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth))
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (d *dumpState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface && !v.IsNil() {
- v = v.Elem()
- }
- return v
-}
-
-// dumpPtr handles formatting of pointers by indirecting them as necessary.
-func (d *dumpState) dumpPtr(v reflect.Value) {
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range d.pointers {
- if depth >= d.depth {
- delete(d.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by dereferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := d.pointers[addr]; ok && pd < d.depth {
- cycleFound = true
- indirects--
- break
- }
- d.pointers[addr] = d.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type information.
- d.w.Write(openParenBytes)
- d.w.Write(bytes.Repeat(asteriskBytes, indirects))
- d.w.Write([]byte(ve.Type().String()))
- d.w.Write(closeParenBytes)
-
- // Display pointer information.
- if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
- d.w.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- d.w.Write(pointerChainBytes)
- }
- printHexPtr(d.w, addr)
- }
- d.w.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- d.w.Write(openParenBytes)
- switch {
- case nilFound:
- d.w.Write(nilAngleBytes)
-
- case cycleFound:
- d.w.Write(circularBytes)
-
- default:
- d.ignoreNextType = true
- d.dump(ve)
- }
- d.w.Write(closeParenBytes)
-}
-
-// dumpSlice handles formatting of arrays and slices. Byte (uint8 under
-// reflection) arrays and slices are dumped in hexdump -C fashion.
-func (d *dumpState) dumpSlice(v reflect.Value) {
- // Determine whether this type should be hex dumped or not. Also,
- // for types which should be hexdumped, try to use the underlying data
- // first, then fall back to trying to convert them to a uint8 slice.
- var buf []uint8
- doConvert := false
- doHexDump := false
- numEntries := v.Len()
- if numEntries > 0 {
- vt := v.Index(0).Type()
- vts := vt.String()
- switch {
- // C types that need to be converted.
- case cCharRE.MatchString(vts):
- fallthrough
- case cUnsignedCharRE.MatchString(vts):
- fallthrough
- case cUint8tCharRE.MatchString(vts):
- doConvert = true
-
- // Try to use existing uint8 slices and fall back to converting
- // and copying if that fails.
- case vt.Kind() == reflect.Uint8:
- // We need an addressable interface to convert the type
- // to a byte slice. However, the reflect package won't
- // give us an interface on certain things like
- // unexported struct fields in order to enforce
- // visibility rules. We use unsafe, when available, to
- // bypass these restrictions since this package does not
- // mutate the values.
- vs := v
- if !vs.CanInterface() || !vs.CanAddr() {
- vs = unsafeReflectValue(vs)
- }
- if !UnsafeDisabled {
- vs = vs.Slice(0, numEntries)
-
- // Use the existing uint8 slice if it can be
- // type asserted.
- iface := vs.Interface()
- if slice, ok := iface.([]uint8); ok {
- buf = slice
- doHexDump = true
- break
- }
- }
-
- // The underlying data needs to be converted if it can't
- // be type asserted to a uint8 slice.
- doConvert = true
- }
-
- // Copy and convert the underlying type if needed.
- if doConvert && vt.ConvertibleTo(uint8Type) {
- // Convert and copy each element into a uint8 byte
- // slice.
- buf = make([]uint8, numEntries)
- for i := 0; i < numEntries; i++ {
- vv := v.Index(i)
- buf[i] = uint8(vv.Convert(uint8Type).Uint())
- }
- doHexDump = true
- }
- }
-
- // Hexdump the entire slice as needed.
- if doHexDump {
- indent := strings.Repeat(d.cs.Indent, d.depth)
- str := indent + hex.Dump(buf)
- str = strings.Replace(str, "\n", "\n"+indent, -1)
- str = strings.TrimRight(str, d.cs.Indent)
- d.w.Write([]byte(str))
- return
- }
-
- // Recursively call dump for each item.
- for i := 0; i < numEntries; i++ {
- d.dump(d.unpackValue(v.Index(i)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
-}
-
-// dump is the main workhorse for dumping a value. It uses the passed reflect
-// value to figure out what kind of object we are dealing with and formats it
-// appropriately. It is a recursive function, however circular data structures
-// are detected and handled properly.
-func (d *dumpState) dump(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- d.w.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- d.indent()
- d.dumpPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !d.ignoreNextType {
- d.indent()
- d.w.Write(openParenBytes)
- d.w.Write([]byte(v.Type().String()))
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
- d.ignoreNextType = false
-
- // Display length and capacity if the built-in len and cap functions
- // work with the value's kind and the len/cap itself is non-zero.
- valueLen, valueCap := 0, 0
- switch v.Kind() {
- case reflect.Array, reflect.Slice, reflect.Chan:
- valueLen, valueCap = v.Len(), v.Cap()
- case reflect.Map, reflect.String:
- valueLen = v.Len()
- }
- if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
- d.w.Write(openParenBytes)
- if valueLen != 0 {
- d.w.Write(lenEqualsBytes)
- printInt(d.w, int64(valueLen), 10)
- }
- if !d.cs.DisableCapacities && valueCap != 0 {
- if valueLen != 0 {
- d.w.Write(spaceBytes)
- }
- d.w.Write(capEqualsBytes)
- printInt(d.w, int64(valueCap), 10)
- }
- d.w.Write(closeParenBytes)
- d.w.Write(spaceBytes)
- }
-
- // Call Stringer/error interfaces if they exist and the handle methods flag
- // is enabled
- if !d.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(d.cs, d.w, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(d.w, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(d.w, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(d.w, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(d.w, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(d.w, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(d.w, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(d.w, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- d.dumpSlice(v)
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.String:
- d.w.Write([]byte(strconv.Quote(v.String())))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- d.w.Write(nilAngleBytes)
- break
- }
-
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- numEntries := v.Len()
- keys := v.MapKeys()
- if d.cs.SortKeys {
- sortValues(keys, d.cs)
- }
- for i, key := range keys {
- d.dump(d.unpackValue(key))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.MapIndex(key)))
- if i < (numEntries - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Struct:
- d.w.Write(openBraceNewlineBytes)
- d.depth++
- if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) {
- d.indent()
- d.w.Write(maxNewlineBytes)
- } else {
- vt := v.Type()
- numFields := v.NumField()
- for i := 0; i < numFields; i++ {
- d.indent()
- vtf := vt.Field(i)
- d.w.Write([]byte(vtf.Name))
- d.w.Write(colonSpaceBytes)
- d.ignoreNextIndent = true
- d.dump(d.unpackValue(v.Field(i)))
- if i < (numFields - 1) {
- d.w.Write(commaNewlineBytes)
- } else {
- d.w.Write(newlineBytes)
- }
- }
- }
- d.depth--
- d.indent()
- d.w.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(d.w, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(d.w, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it in case any new
- // types are added.
- default:
- if v.CanInterface() {
- fmt.Fprintf(d.w, "%v", v.Interface())
- } else {
- fmt.Fprintf(d.w, "%v", v.String())
- }
- }
-}
-
-// fdump is a helper function to consolidate the logic from the various public
-// methods which take varying writers and config states.
-func fdump(cs *ConfigState, w io.Writer, a ...interface{}) {
- for _, arg := range a {
- if arg == nil {
- w.Write(interfaceBytes)
- w.Write(spaceBytes)
- w.Write(nilAngleBytes)
- w.Write(newlineBytes)
- continue
- }
-
- d := dumpState{w: w, cs: cs}
- d.pointers = make(map[uintptr]int)
- d.dump(reflect.ValueOf(arg))
- d.w.Write(newlineBytes)
- }
-}
-
-// Fdump formats and displays the passed arguments to io.Writer w. It formats
-// exactly the same as Dump.
-func Fdump(w io.Writer, a ...interface{}) {
- fdump(&Config, w, a...)
-}
-
-// Sdump returns a string with the passed arguments formatted exactly the same
-// as Dump.
-func Sdump(a ...interface{}) string {
- var buf bytes.Buffer
- fdump(&Config, &buf, a...)
- return buf.String()
-}
-
-/*
-Dump displays the passed parameters to standard out with newlines, customizable
-indentation, and additional debug information such as complete types and all
-pointer addresses used to indirect to the final value. It provides the
-following features over the built-in printing facilities provided by the fmt
-package:
-
- * Pointers are dereferenced and followed
- * Circular data structures are detected and handled properly
- * Custom Stringer/error interfaces are optionally invoked, including
- on unexported types
- * Custom types which only implement the Stringer/error interfaces via
- a pointer receiver are optionally invoked when passing non-pointer
- variables
- * Byte arrays and slices are dumped like the hexdump -C command which
- includes offsets, byte values in hex, and ASCII output
-
-The configuration options are controlled by an exported package global,
-spew.Config. See ConfigState for options documentation.
-
-See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
-get the formatted result as a string.
-*/
-func Dump(a ...interface{}) {
- fdump(&Config, os.Stdout, a...)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
deleted file mode 100644
index b04edb7d7ac..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strconv"
- "strings"
-)
-
-// supportedFlags is a list of all the character flags supported by fmt package.
-const supportedFlags = "0-+# "
-
-// formatState implements the fmt.Formatter interface and contains information
-// about the state of a formatting operation. The NewFormatter function can
-// be used to get a new Formatter which can be used directly as arguments
-// in standard fmt package printing calls.
-type formatState struct {
- value interface{}
- fs fmt.State
- depth int
- pointers map[uintptr]int
- ignoreNextType bool
- cs *ConfigState
-}
-
-// buildDefaultFormat recreates the original format string without precision
-// and width information to pass in to fmt.Sprintf in the case of an
-// unrecognized type. Unless new types are added to the language, this
-// function won't ever be called.
-func (f *formatState) buildDefaultFormat() (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- buf.WriteRune('v')
-
- format = buf.String()
- return format
-}
-
-// constructOrigFormat recreates the original format string including precision
-// and width information to pass along to the standard fmt package. This allows
-// automatic deferral of all format strings this package doesn't support.
-func (f *formatState) constructOrigFormat(verb rune) (format string) {
- buf := bytes.NewBuffer(percentBytes)
-
- for _, flag := range supportedFlags {
- if f.fs.Flag(int(flag)) {
- buf.WriteRune(flag)
- }
- }
-
- if width, ok := f.fs.Width(); ok {
- buf.WriteString(strconv.Itoa(width))
- }
-
- if precision, ok := f.fs.Precision(); ok {
- buf.Write(precisionBytes)
- buf.WriteString(strconv.Itoa(precision))
- }
-
- buf.WriteRune(verb)
-
- format = buf.String()
- return format
-}
-
-// unpackValue returns values inside of non-nil interfaces when possible and
-// ensures that types for values which have been unpacked from an interface
-// are displayed when the show types flag is also set.
-// This is useful for data types like structs, arrays, slices, and maps which
-// can contain varying types packed inside an interface.
-func (f *formatState) unpackValue(v reflect.Value) reflect.Value {
- if v.Kind() == reflect.Interface {
- f.ignoreNextType = false
- if !v.IsNil() {
- v = v.Elem()
- }
- }
- return v
-}
-
-// formatPtr handles formatting of pointers by indirecting them as necessary.
-func (f *formatState) formatPtr(v reflect.Value) {
- // Display nil if top level pointer is nil.
- showTypes := f.fs.Flag('#')
- if v.IsNil() && (!showTypes || f.ignoreNextType) {
- f.fs.Write(nilAngleBytes)
- return
- }
-
- // Remove pointers at or below the current depth from map used to detect
- // circular refs.
- for k, depth := range f.pointers {
- if depth >= f.depth {
- delete(f.pointers, k)
- }
- }
-
- // Keep list of all dereferenced pointers to possibly show later.
- pointerChain := make([]uintptr, 0)
-
- // Figure out how many levels of indirection there are by derferencing
- // pointers and unpacking interfaces down the chain while detecting circular
- // references.
- nilFound := false
- cycleFound := false
- indirects := 0
- ve := v
- for ve.Kind() == reflect.Ptr {
- if ve.IsNil() {
- nilFound = true
- break
- }
- indirects++
- addr := ve.Pointer()
- pointerChain = append(pointerChain, addr)
- if pd, ok := f.pointers[addr]; ok && pd < f.depth {
- cycleFound = true
- indirects--
- break
- }
- f.pointers[addr] = f.depth
-
- ve = ve.Elem()
- if ve.Kind() == reflect.Interface {
- if ve.IsNil() {
- nilFound = true
- break
- }
- ve = ve.Elem()
- }
- }
-
- // Display type or indirection level depending on flags.
- if showTypes && !f.ignoreNextType {
- f.fs.Write(openParenBytes)
- f.fs.Write(bytes.Repeat(asteriskBytes, indirects))
- f.fs.Write([]byte(ve.Type().String()))
- f.fs.Write(closeParenBytes)
- } else {
- if nilFound || cycleFound {
- indirects += strings.Count(ve.Type().String(), "*")
- }
- f.fs.Write(openAngleBytes)
- f.fs.Write([]byte(strings.Repeat("*", indirects)))
- f.fs.Write(closeAngleBytes)
- }
-
- // Display pointer information depending on flags.
- if f.fs.Flag('+') && (len(pointerChain) > 0) {
- f.fs.Write(openParenBytes)
- for i, addr := range pointerChain {
- if i > 0 {
- f.fs.Write(pointerChainBytes)
- }
- printHexPtr(f.fs, addr)
- }
- f.fs.Write(closeParenBytes)
- }
-
- // Display dereferenced value.
- switch {
- case nilFound:
- f.fs.Write(nilAngleBytes)
-
- case cycleFound:
- f.fs.Write(circularShortBytes)
-
- default:
- f.ignoreNextType = true
- f.format(ve)
- }
-}
-
-// format is the main workhorse for providing the Formatter interface. It
-// uses the passed reflect value to figure out what kind of object we are
-// dealing with and formats it appropriately. It is a recursive function,
-// however circular data structures are detected and handled properly.
-func (f *formatState) format(v reflect.Value) {
- // Handle invalid reflect values immediately.
- kind := v.Kind()
- if kind == reflect.Invalid {
- f.fs.Write(invalidAngleBytes)
- return
- }
-
- // Handle pointers specially.
- if kind == reflect.Ptr {
- f.formatPtr(v)
- return
- }
-
- // Print type information unless already handled elsewhere.
- if !f.ignoreNextType && f.fs.Flag('#') {
- f.fs.Write(openParenBytes)
- f.fs.Write([]byte(v.Type().String()))
- f.fs.Write(closeParenBytes)
- }
- f.ignoreNextType = false
-
- // Call Stringer/error interfaces if they exist and the handle methods
- // flag is enabled.
- if !f.cs.DisableMethods {
- if (kind != reflect.Invalid) && (kind != reflect.Interface) {
- if handled := handleMethods(f.cs, f.fs, v); handled {
- return
- }
- }
- }
-
- switch kind {
- case reflect.Invalid:
- // Do nothing. We should never get here since invalid has already
- // been handled above.
-
- case reflect.Bool:
- printBool(f.fs, v.Bool())
-
- case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
- printInt(f.fs, v.Int(), 10)
-
- case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint:
- printUint(f.fs, v.Uint(), 10)
-
- case reflect.Float32:
- printFloat(f.fs, v.Float(), 32)
-
- case reflect.Float64:
- printFloat(f.fs, v.Float(), 64)
-
- case reflect.Complex64:
- printComplex(f.fs, v.Complex(), 32)
-
- case reflect.Complex128:
- printComplex(f.fs, v.Complex(), 64)
-
- case reflect.Slice:
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
- fallthrough
-
- case reflect.Array:
- f.fs.Write(openBracketBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- numEntries := v.Len()
- for i := 0; i < numEntries; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(v.Index(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBracketBytes)
-
- case reflect.String:
- f.fs.Write([]byte(v.String()))
-
- case reflect.Interface:
- // The only time we should get here is for nil interfaces due to
- // unpackValue calls.
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- }
-
- case reflect.Ptr:
- // Do nothing. We should never get here since pointers have already
- // been handled above.
-
- case reflect.Map:
- // nil maps should be indicated as different than empty maps
- if v.IsNil() {
- f.fs.Write(nilAngleBytes)
- break
- }
-
- f.fs.Write(openMapBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- keys := v.MapKeys()
- if f.cs.SortKeys {
- sortValues(keys, f.cs)
- }
- for i, key := range keys {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- f.ignoreNextType = true
- f.format(f.unpackValue(key))
- f.fs.Write(colonBytes)
- f.ignoreNextType = true
- f.format(f.unpackValue(v.MapIndex(key)))
- }
- }
- f.depth--
- f.fs.Write(closeMapBytes)
-
- case reflect.Struct:
- numFields := v.NumField()
- f.fs.Write(openBraceBytes)
- f.depth++
- if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) {
- f.fs.Write(maxShortBytes)
- } else {
- vt := v.Type()
- for i := 0; i < numFields; i++ {
- if i > 0 {
- f.fs.Write(spaceBytes)
- }
- vtf := vt.Field(i)
- if f.fs.Flag('+') || f.fs.Flag('#') {
- f.fs.Write([]byte(vtf.Name))
- f.fs.Write(colonBytes)
- }
- f.format(f.unpackValue(v.Field(i)))
- }
- }
- f.depth--
- f.fs.Write(closeBraceBytes)
-
- case reflect.Uintptr:
- printHexPtr(f.fs, uintptr(v.Uint()))
-
- case reflect.UnsafePointer, reflect.Chan, reflect.Func:
- printHexPtr(f.fs, v.Pointer())
-
- // There were not any other types at the time this code was written, but
- // fall back to letting the default fmt package handle it if any get added.
- default:
- format := f.buildDefaultFormat()
- if v.CanInterface() {
- fmt.Fprintf(f.fs, format, v.Interface())
- } else {
- fmt.Fprintf(f.fs, format, v.String())
- }
- }
-}
-
-// Format satisfies the fmt.Formatter interface. See NewFormatter for usage
-// details.
-func (f *formatState) Format(fs fmt.State, verb rune) {
- f.fs = fs
-
- // Use standard formatting for verbs that are not v.
- if verb != 'v' {
- format := f.constructOrigFormat(verb)
- fmt.Fprintf(fs, format, f.value)
- return
- }
-
- if f.value == nil {
- if fs.Flag('#') {
- fs.Write(interfaceBytes)
- }
- fs.Write(nilAngleBytes)
- return
- }
-
- f.format(reflect.ValueOf(f.value))
-}
-
-// newFormatter is a helper function to consolidate the logic from the various
-// public methods which take varying config states.
-func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter {
- fs := &formatState{value: v, cs: cs}
- fs.pointers = make(map[uintptr]int)
- return fs
-}
-
-/*
-NewFormatter returns a custom formatter that satisfies the fmt.Formatter
-interface. As a result, it integrates cleanly with standard fmt package
-printing functions. The formatter is useful for inline printing of smaller data
-types similar to the standard %v format specifier.
-
-The custom formatter only responds to the %v (most compact), %+v (adds pointer
-addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb
-combinations. Any other verbs such as %x and %q will be sent to the the
-standard fmt package for formatting. In addition, the custom formatter ignores
-the width and precision arguments (however they will still work on the format
-specifiers not handled by the custom formatter).
-
-Typically this function shouldn't be called directly. It is much easier to make
-use of the custom formatter by calling one of the convenience functions such as
-Printf, Println, or Fprintf.
-*/
-func NewFormatter(v interface{}) fmt.Formatter {
- return newFormatter(&Config, v)
-}
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go
deleted file mode 100644
index 32c0e338825..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2013-2016 Dave Collins
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-package spew
-
-import (
- "fmt"
- "io"
-)
-
-// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the formatted string as a value that satisfies error. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Errorf(format string, a ...interface{}) (err error) {
- return fmt.Errorf(format, convertArgs(a)...)
-}
-
-// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprint(w, convertArgs(a)...)
-}
-
-// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- return fmt.Fprintf(w, format, convertArgs(a)...)
-}
-
-// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
-// passed with a default Formatter interface returned by NewFormatter. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b))
-func Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- return fmt.Fprintln(w, convertArgs(a)...)
-}
-
-// Print is a wrapper for fmt.Print that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b))
-func Print(a ...interface{}) (n int, err error) {
- return fmt.Print(convertArgs(a)...)
-}
-
-// Printf is a wrapper for fmt.Printf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Printf(format string, a ...interface{}) (n int, err error) {
- return fmt.Printf(format, convertArgs(a)...)
-}
-
-// Println is a wrapper for fmt.Println that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the number of bytes written and any write error encountered. See
-// NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b))
-func Println(a ...interface{}) (n int, err error) {
- return fmt.Println(convertArgs(a)...)
-}
-
-// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprint(a ...interface{}) string {
- return fmt.Sprint(convertArgs(a)...)
-}
-
-// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
-// passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintf(format string, a ...interface{}) string {
- return fmt.Sprintf(format, convertArgs(a)...)
-}
-
-// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
-// were passed with a default Formatter interface returned by NewFormatter. It
-// returns the resulting string. See NewFormatter for formatting details.
-//
-// This function is shorthand for the following syntax:
-//
-// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b))
-func Sprintln(a ...interface{}) string {
- return fmt.Sprintln(convertArgs(a)...)
-}
-
-// convertArgs accepts a slice of arguments and returns a slice of the same
-// length with each argument converted to a default spew Formatter interface.
-func convertArgs(args []interface{}) (formatters []interface{}) {
- formatters = make([]interface{}, len(args))
- for index, arg := range args {
- formatters[index] = NewFormatter(arg)
- }
- return formatters
-}
diff --git a/vendor/github.com/disintegration/imaging/.travis.yml b/vendor/github.com/disintegration/imaging/.travis.yml
deleted file mode 100644
index 1d4bdd5c035..00000000000
--- a/vendor/github.com/disintegration/imaging/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: go
-go:
- - "1.7.x"
- - "1.8.x"
- - "1.9.x"
- - "1.10.x"
- - "1.11.x"
-
-before_install:
- - go get github.com/mattn/goveralls
-
-script:
- - go test -v -race -cover
- - $GOPATH/bin/goveralls -service=travis-ci
diff --git a/vendor/github.com/disintegration/imaging/LICENSE b/vendor/github.com/disintegration/imaging/LICENSE
deleted file mode 100644
index a4144a9d2f1..00000000000
--- a/vendor/github.com/disintegration/imaging/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2012 Grigory Dryapak
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/disintegration/imaging/README.md b/vendor/github.com/disintegration/imaging/README.md
deleted file mode 100644
index f7d6fb4d646..00000000000
--- a/vendor/github.com/disintegration/imaging/README.md
+++ /dev/null
@@ -1,197 +0,0 @@
-# Imaging
-
-[![GoDoc](https://godoc.org/github.com/disintegration/imaging?status.svg)](https://godoc.org/github.com/disintegration/imaging)
-[![Build Status](https://travis-ci.org/disintegration/imaging.svg?branch=master)](https://travis-ci.org/disintegration/imaging)
-[![Coverage Status](https://coveralls.io/repos/github/disintegration/imaging/badge.svg?branch=master&service=github)](https://coveralls.io/github/disintegration/imaging?branch=master)
-[![Go Report Card](https://goreportcard.com/badge/github.com/disintegration/imaging)](https://goreportcard.com/report/github.com/disintegration/imaging)
-
-Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.).
-
-All the image processing functions provided by the package accept any image type that implements `image.Image` interface
-as an input, and return a new image of `*image.NRGBA` type (32bit RGBA colors, non-premultiplied alpha).
-
-## Installation
-
- go get -u github.com/disintegration/imaging
-
-## Documentation
-
-http://godoc.org/github.com/disintegration/imaging
-
-## Usage examples
-
-A few usage examples can be found below. See the documentation for the full list of supported functions.
-
-### Image resizing
-
-```go
-// Resize srcImage to size = 128x128px using the Lanczos filter.
-dstImage128 := imaging.Resize(srcImage, 128, 128, imaging.Lanczos)
-
-// Resize srcImage to width = 800px preserving the aspect ratio.
-dstImage800 := imaging.Resize(srcImage, 800, 0, imaging.Lanczos)
-
-// Scale down srcImage to fit the 800x600px bounding box.
-dstImageFit := imaging.Fit(srcImage, 800, 600, imaging.Lanczos)
-
-// Resize and crop the srcImage to fill the 100x100px area.
-dstImageFill := imaging.Fill(srcImage, 100, 100, imaging.Center, imaging.Lanczos)
-```
-
-Imaging supports image resizing using various resampling filters. The most notable ones:
-- `Lanczos` - A high-quality resampling filter for photographic images yielding sharp results.
-- `CatmullRom` - A sharp cubic filter that is faster than Lanczos filter while providing similar results.
-- `MitchellNetravali` - A cubic filter that produces smoother results with less ringing artifacts than CatmullRom.
-- `Linear` - Bilinear resampling filter, produces smooth output. Faster than cubic filters.
-- `Box` - Simple and fast averaging filter appropriate for downscaling. When upscaling it's similar to NearestNeighbor.
-- `NearestNeighbor` - Fastest resampling filter, no antialiasing.
-
-The full list of supported filters: NearestNeighbor, Box, Linear, Hermite, MitchellNetravali, CatmullRom, BSpline, Gaussian, Lanczos, Hann, Hamming, Blackman, Bartlett, Welch, Cosine. Custom filters can be created using ResampleFilter struct.
-
-**Resampling filters comparison**
-
-Original image:
-
-![srcImage](testdata/branches.png)
-
-The same image resized from 600x400px to 150x100px using different resampling filters.
-From faster (lower quality) to slower (higher quality):
-
-Filter | Resize result
---------------------------|---------------------------------------------
-`imaging.NearestNeighbor` | ![dstImage](testdata/out_resize_nearest.png)
-`imaging.Linear` | ![dstImage](testdata/out_resize_linear.png)
-`imaging.CatmullRom` | ![dstImage](testdata/out_resize_catrom.png)
-`imaging.Lanczos` | ![dstImage](testdata/out_resize_lanczos.png)
-
-
-### Gaussian Blur
-
-```go
-dstImage := imaging.Blur(srcImage, 0.5)
-```
-
-Sigma parameter allows to control the strength of the blurring effect.
-
-Original image | Sigma = 0.5 | Sigma = 1.5
------------------------------------|----------------------------------------|---------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_blur_0.5.png) | ![dstImage](testdata/out_blur_1.5.png)
-
-### Sharpening
-
-```go
-dstImage := imaging.Sharpen(srcImage, 0.5)
-```
-
-`Sharpen` uses gaussian function internally. Sigma parameter allows to control the strength of the sharpening effect.
-
-Original image | Sigma = 0.5 | Sigma = 1.5
------------------------------------|-------------------------------------------|------------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_sharpen_0.5.png) | ![dstImage](testdata/out_sharpen_1.5.png)
-
-### Gamma correction
-
-```go
-dstImage := imaging.AdjustGamma(srcImage, 0.75)
-```
-
-Original image | Gamma = 0.75 | Gamma = 1.25
------------------------------------|------------------------------------------|-----------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_gamma_0.75.png) | ![dstImage](testdata/out_gamma_1.25.png)
-
-### Contrast adjustment
-
-```go
-dstImage := imaging.AdjustContrast(srcImage, 20)
-```
-
-Original image | Contrast = 15 | Contrast = -15
------------------------------------|--------------------------------------------|-------------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_contrast_p15.png) | ![dstImage](testdata/out_contrast_m15.png)
-
-### Brightness adjustment
-
-```go
-dstImage := imaging.AdjustBrightness(srcImage, 20)
-```
-
-Original image | Brightness = 10 | Brightness = -10
------------------------------------|----------------------------------------------|---------------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_brightness_p10.png) | ![dstImage](testdata/out_brightness_m10.png)
-
-### Saturation adjustment
-
-```go
-dstImage := imaging.AdjustSaturation(srcImage, 20)
-```
-
-Original image | Saturation = 30 | Saturation = -30
------------------------------------|----------------------------------------------|---------------------------------------------
-![srcImage](testdata/flowers_small.png) | ![dstImage](testdata/out_saturation_p30.png) | ![dstImage](testdata/out_saturation_m30.png)
-
-## Example code
-
-```go
-package main
-
-import (
- "image"
- "image/color"
- "log"
-
- "github.com/disintegration/imaging"
-)
-
-func main() {
- // Open a test image.
- src, err := imaging.Open("testdata/flowers.png")
- if err != nil {
- log.Fatalf("failed to open image: %v", err)
- }
-
- // Crop the original image to 300x300px size using the center anchor.
- src = imaging.CropAnchor(src, 300, 300, imaging.Center)
-
- // Resize the cropped image to width = 200px preserving the aspect ratio.
- src = imaging.Resize(src, 200, 0, imaging.Lanczos)
-
- // Create a blurred version of the image.
- img1 := imaging.Blur(src, 5)
-
- // Create a grayscale version of the image with higher contrast and sharpness.
- img2 := imaging.Grayscale(src)
- img2 = imaging.AdjustContrast(img2, 20)
- img2 = imaging.Sharpen(img2, 2)
-
- // Create an inverted version of the image.
- img3 := imaging.Invert(src)
-
- // Create an embossed version of the image using a convolution filter.
- img4 := imaging.Convolve3x3(
- src,
- [9]float64{
- -1, -1, 0,
- -1, 1, 1,
- 0, 1, 1,
- },
- nil,
- )
-
- // Create a new image and paste the four produced images into it.
- dst := imaging.New(400, 400, color.NRGBA{0, 0, 0, 0})
- dst = imaging.Paste(dst, img1, image.Pt(0, 0))
- dst = imaging.Paste(dst, img2, image.Pt(0, 200))
- dst = imaging.Paste(dst, img3, image.Pt(200, 0))
- dst = imaging.Paste(dst, img4, image.Pt(200, 200))
-
- // Save the resulting image as JPEG.
- err = imaging.Save(dst, "testdata/out_example.jpg")
- if err != nil {
- log.Fatalf("failed to save image: %v", err)
- }
-}
-```
-
-Output:
-
-![dstImage](testdata/out_example.jpg)
diff --git a/vendor/github.com/disintegration/imaging/adjust.go b/vendor/github.com/disintegration/imaging/adjust.go
deleted file mode 100644
index 9e628ffced5..00000000000
--- a/vendor/github.com/disintegration/imaging/adjust.go
+++ /dev/null
@@ -1,252 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "math"
-)
-
-// Grayscale produces a grayscale version of the image.
-func Grayscale(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- parallel(0, src.h, func(ys <-chan int) {
- for y := range ys {
- i := y * dst.Stride
- src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
- for x := 0; x < src.w; x++ {
- d := dst.Pix[i : i+3 : i+3]
- r := d[0]
- g := d[1]
- b := d[2]
- f := 0.299*float64(r) + 0.587*float64(g) + 0.114*float64(b)
- y := uint8(f + 0.5)
- d[0] = y
- d[1] = y
- d[2] = y
- i += 4
- }
- }
- })
- return dst
-}
-
-// Invert produces an inverted (negated) version of the image.
-func Invert(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- parallel(0, src.h, func(ys <-chan int) {
- for y := range ys {
- i := y * dst.Stride
- src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
- for x := 0; x < src.w; x++ {
- d := dst.Pix[i : i+3 : i+3]
- d[0] = 255 - d[0]
- d[1] = 255 - d[1]
- d[2] = 255 - d[2]
- i += 4
- }
- }
- })
- return dst
-}
-
-// AdjustSaturation changes the saturation of the image using the percentage parameter and returns the adjusted image.
-// The percentage must be in the range (-100, 100).
-// The percentage = 0 gives the original image.
-// The percentage = 100 gives the image with the saturation value doubled for each pixel.
-// The percentage = -100 gives the image with the saturation value zeroed for each pixel (grayscale).
-//
-// Examples:
-// dstImage = imaging.AdjustSaturation(srcImage, 25) // Increase image saturation by 25%.
-// dstImage = imaging.AdjustSaturation(srcImage, -10) // Decrease image saturation by 10%.
-//
-func AdjustSaturation(img image.Image, percentage float64) *image.NRGBA {
- percentage = math.Min(math.Max(percentage, -100), 100)
- multiplier := 1 + percentage/100
-
- return AdjustFunc(img, func(c color.NRGBA) color.NRGBA {
- h, s, l := rgbToHSL(c.R, c.G, c.B)
- s *= multiplier
- if s > 1 {
- s = 1
- }
- r, g, b := hslToRGB(h, s, l)
- return color.NRGBA{r, g, b, c.A}
- })
-}
-
-// AdjustContrast changes the contrast of the image using the percentage parameter and returns the adjusted image.
-// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
-// The percentage = -100 gives solid gray image.
-//
-// Examples:
-//
-// dstImage = imaging.AdjustContrast(srcImage, -10) // Decrease image contrast by 10%.
-// dstImage = imaging.AdjustContrast(srcImage, 20) // Increase image contrast by 20%.
-//
-func AdjustContrast(img image.Image, percentage float64) *image.NRGBA {
- percentage = math.Min(math.Max(percentage, -100.0), 100.0)
- lut := make([]uint8, 256)
-
- v := (100.0 + percentage) / 100.0
- for i := 0; i < 256; i++ {
- if 0 <= v && v <= 1 {
- lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*v) * 255.0)
- } else if 1 < v && v < 2 {
- lut[i] = clamp((0.5 + (float64(i)/255.0-0.5)*(1/(2.0-v))) * 255.0)
- } else {
- lut[i] = uint8(float64(i)/255.0+0.5) * 255
- }
- }
-
- return adjustLUT(img, lut)
-}
-
-// AdjustBrightness changes the brightness of the image using the percentage parameter and returns the adjusted image.
-// The percentage must be in range (-100, 100). The percentage = 0 gives the original image.
-// The percentage = -100 gives solid black image. The percentage = 100 gives solid white image.
-//
-// Examples:
-//
-// dstImage = imaging.AdjustBrightness(srcImage, -15) // Decrease image brightness by 15%.
-// dstImage = imaging.AdjustBrightness(srcImage, 10) // Increase image brightness by 10%.
-//
-func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA {
- percentage = math.Min(math.Max(percentage, -100.0), 100.0)
- lut := make([]uint8, 256)
-
- shift := 255.0 * percentage / 100.0
- for i := 0; i < 256; i++ {
- lut[i] = clamp(float64(i) + shift)
- }
-
- return adjustLUT(img, lut)
-}
-
-// AdjustGamma performs a gamma correction on the image and returns the adjusted image.
-// Gamma parameter must be positive. Gamma = 1.0 gives the original image.
-// Gamma less than 1.0 darkens the image and gamma greater than 1.0 lightens it.
-//
-// Example:
-//
-// dstImage = imaging.AdjustGamma(srcImage, 0.7)
-//
-func AdjustGamma(img image.Image, gamma float64) *image.NRGBA {
- e := 1.0 / math.Max(gamma, 0.0001)
- lut := make([]uint8, 256)
-
- for i := 0; i < 256; i++ {
- lut[i] = clamp(math.Pow(float64(i)/255.0, e) * 255.0)
- }
-
- return adjustLUT(img, lut)
-}
-
-// AdjustSigmoid changes the contrast of the image using a sigmoidal function and returns the adjusted image.
-// It's a non-linear contrast change useful for photo adjustments as it preserves highlight and shadow detail.
-// The midpoint parameter is the midpoint of contrast that must be between 0 and 1, typically 0.5.
-// The factor parameter indicates how much to increase or decrease the contrast, typically in range (-10, 10).
-// If the factor parameter is positive the image contrast is increased otherwise the contrast is decreased.
-//
-// Examples:
-//
-// dstImage = imaging.AdjustSigmoid(srcImage, 0.5, 3.0) // Increase the contrast.
-// dstImage = imaging.AdjustSigmoid(srcImage, 0.5, -3.0) // Decrease the contrast.
-//
-func AdjustSigmoid(img image.Image, midpoint, factor float64) *image.NRGBA {
- if factor == 0 {
- return Clone(img)
- }
-
- lut := make([]uint8, 256)
- a := math.Min(math.Max(midpoint, 0.0), 1.0)
- b := math.Abs(factor)
- sig0 := sigmoid(a, b, 0)
- sig1 := sigmoid(a, b, 1)
- e := 1.0e-6
-
- if factor > 0 {
- for i := 0; i < 256; i++ {
- x := float64(i) / 255.0
- sigX := sigmoid(a, b, x)
- f := (sigX - sig0) / (sig1 - sig0)
- lut[i] = clamp(f * 255.0)
- }
- } else {
- for i := 0; i < 256; i++ {
- x := float64(i) / 255.0
- arg := math.Min(math.Max((sig1-sig0)*x+sig0, e), 1.0-e)
- f := a - math.Log(1.0/arg-1.0)/b
- lut[i] = clamp(f * 255.0)
- }
- }
-
- return adjustLUT(img, lut)
-}
-
-func sigmoid(a, b, x float64) float64 {
- return 1 / (1 + math.Exp(b*(a-x)))
-}
-
-// adjustLUT applies the given lookup table to the colors of the image.
-func adjustLUT(img image.Image, lut []uint8) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- lut = lut[0:256]
- parallel(0, src.h, func(ys <-chan int) {
- for y := range ys {
- i := y * dst.Stride
- src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
- for x := 0; x < src.w; x++ {
- d := dst.Pix[i : i+3 : i+3]
- d[0] = lut[d[0]]
- d[1] = lut[d[1]]
- d[2] = lut[d[2]]
- i += 4
- }
- }
- })
- return dst
-}
-
-// AdjustFunc applies the fn function to each pixel of the img image and returns the adjusted image.
-//
-// Example:
-//
-// dstImage = imaging.AdjustFunc(
-// srcImage,
-// func(c color.NRGBA) color.NRGBA {
-// // Shift the red channel by 16.
-// r := int(c.R) + 16
-// if r > 255 {
-// r = 255
-// }
-// return color.NRGBA{uint8(r), c.G, c.B, c.A}
-// }
-// )
-//
-func AdjustFunc(img image.Image, fn func(c color.NRGBA) color.NRGBA) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- parallel(0, src.h, func(ys <-chan int) {
- for y := range ys {
- i := y * dst.Stride
- src.scan(0, y, src.w, y+1, dst.Pix[i:i+src.w*4])
- for x := 0; x < src.w; x++ {
- d := dst.Pix[i : i+4 : i+4]
- r := d[0]
- g := d[1]
- b := d[2]
- a := d[3]
- c := fn(color.NRGBA{r, g, b, a})
- d[0] = c.R
- d[1] = c.G
- d[2] = c.B
- d[3] = c.A
- i += 4
- }
- }
- })
- return dst
-}
diff --git a/vendor/github.com/disintegration/imaging/convolution.go b/vendor/github.com/disintegration/imaging/convolution.go
deleted file mode 100644
index 11eddc16234..00000000000
--- a/vendor/github.com/disintegration/imaging/convolution.go
+++ /dev/null
@@ -1,148 +0,0 @@
-package imaging
-
-import (
- "image"
-)
-
-// ConvolveOptions are convolution parameters.
-type ConvolveOptions struct {
- // If Normalize is true the kernel is normalized before convolution.
- Normalize bool
-
- // If Abs is true the absolute value of each color channel is taken after convolution.
- Abs bool
-
- // Bias is added to each color channel value after convolution.
- Bias int
-}
-
-// Convolve3x3 convolves the image with the specified 3x3 convolution kernel.
-// Default parameters are used if a nil *ConvolveOptions is passed.
-func Convolve3x3(img image.Image, kernel [9]float64, options *ConvolveOptions) *image.NRGBA {
- return convolve(img, kernel[:], options)
-}
-
-// Convolve5x5 convolves the image with the specified 5x5 convolution kernel.
-// Default parameters are used if a nil *ConvolveOptions is passed.
-func Convolve5x5(img image.Image, kernel [25]float64, options *ConvolveOptions) *image.NRGBA {
- return convolve(img, kernel[:], options)
-}
-
-func convolve(img image.Image, kernel []float64, options *ConvolveOptions) *image.NRGBA {
- src := toNRGBA(img)
- w := src.Bounds().Max.X
- h := src.Bounds().Max.Y
- dst := image.NewNRGBA(image.Rect(0, 0, w, h))
-
- if w < 1 || h < 1 {
- return dst
- }
-
- if options == nil {
- options = &ConvolveOptions{}
- }
-
- if options.Normalize {
- normalizeKernel(kernel)
- }
-
- type coef struct {
- x, y int
- k float64
- }
- var coefs []coef
- var m int
-
- switch len(kernel) {
- case 9:
- m = 1
- case 25:
- m = 2
- }
-
- i := 0
- for y := -m; y <= m; y++ {
- for x := -m; x <= m; x++ {
- if kernel[i] != 0 {
- coefs = append(coefs, coef{x: x, y: y, k: kernel[i]})
- }
- i++
- }
- }
-
- parallel(0, h, func(ys <-chan int) {
- for y := range ys {
- for x := 0; x < w; x++ {
- var r, g, b float64
- for _, c := range coefs {
- ix := x + c.x
- if ix < 0 {
- ix = 0
- } else if ix >= w {
- ix = w - 1
- }
-
- iy := y + c.y
- if iy < 0 {
- iy = 0
- } else if iy >= h {
- iy = h - 1
- }
-
- off := iy*src.Stride + ix*4
- s := src.Pix[off : off+3 : off+3]
- r += float64(s[0]) * c.k
- g += float64(s[1]) * c.k
- b += float64(s[2]) * c.k
- }
-
- if options.Abs {
- if r < 0 {
- r = -r
- }
- if g < 0 {
- g = -g
- }
- if b < 0 {
- b = -b
- }
- }
-
- if options.Bias != 0 {
- r += float64(options.Bias)
- g += float64(options.Bias)
- b += float64(options.Bias)
- }
-
- srcOff := y*src.Stride + x*4
- dstOff := y*dst.Stride + x*4
- d := dst.Pix[dstOff : dstOff+4 : dstOff+4]
- d[0] = clamp(r)
- d[1] = clamp(g)
- d[2] = clamp(b)
- d[3] = src.Pix[srcOff+3]
- }
- }
- })
-
- return dst
-}
-
-func normalizeKernel(kernel []float64) {
- var sum, sumpos float64
- for i := range kernel {
- sum += kernel[i]
- if kernel[i] > 0 {
- sumpos += kernel[i]
- }
- }
- if sum != 0 {
- for i := range kernel {
- kernel[i] /= sum
- }
- } else if sumpos != 0 {
- for i := range kernel {
- kernel[i] /= sumpos
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/doc.go b/vendor/github.com/disintegration/imaging/doc.go
deleted file mode 100644
index c98c91250d5..00000000000
--- a/vendor/github.com/disintegration/imaging/doc.go
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-Package imaging provides basic image processing functions (resize, rotate, crop, brightness/contrast adjustments, etc.).
-
-All the image processing functions provided by the package accept any image type that implements image.Image interface
-as an input, and return a new image of *image.NRGBA type (32bit RGBA colors, non-premultiplied alpha).
-*/
-package imaging
diff --git a/vendor/github.com/disintegration/imaging/effects.go b/vendor/github.com/disintegration/imaging/effects.go
deleted file mode 100644
index 47316b701cf..00000000000
--- a/vendor/github.com/disintegration/imaging/effects.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package imaging
-
-import (
- "image"
- "math"
-)
-
-func gaussianBlurKernel(x, sigma float64) float64 {
- return math.Exp(-(x*x)/(2*sigma*sigma)) / (sigma * math.Sqrt(2*math.Pi))
-}
-
-// Blur produces a blurred version of the image using a Gaussian function.
-// Sigma parameter must be positive and indicates how much the image will be blurred.
-//
-// Example:
-//
-// dstImage := imaging.Blur(srcImage, 3.5)
-//
-func Blur(img image.Image, sigma float64) *image.NRGBA {
- if sigma <= 0 {
- return Clone(img)
- }
-
- radius := int(math.Ceil(sigma * 3.0))
- kernel := make([]float64, radius+1)
-
- for i := 0; i <= radius; i++ {
- kernel[i] = gaussianBlurKernel(float64(i), sigma)
- }
-
- return blurVertical(blurHorizontal(img, kernel), kernel)
-}
-
-func blurHorizontal(img image.Image, kernel []float64) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- radius := len(kernel) - 1
-
- parallel(0, src.h, func(ys <-chan int) {
- scanLine := make([]uint8, src.w*4)
- scanLineF := make([]float64, len(scanLine))
- for y := range ys {
- src.scan(0, y, src.w, y+1, scanLine)
- for i, v := range scanLine {
- scanLineF[i] = float64(v)
- }
- for x := 0; x < src.w; x++ {
- min := x - radius
- if min < 0 {
- min = 0
- }
- max := x + radius
- if max > src.w-1 {
- max = src.w - 1
- }
- var r, g, b, a, wsum float64
- for ix := min; ix <= max; ix++ {
- i := ix * 4
- weight := kernel[absint(x-ix)]
- wsum += weight
- s := scanLineF[i : i+4 : i+4]
- wa := s[3] * weight
- r += s[0] * wa
- g += s[1] * wa
- b += s[2] * wa
- a += wa
- }
- if a != 0 {
- aInv := 1 / a
- j := y*dst.Stride + x*4
- d := dst.Pix[j : j+4 : j+4]
- d[0] = clamp(r * aInv)
- d[1] = clamp(g * aInv)
- d[2] = clamp(b * aInv)
- d[3] = clamp(a / wsum)
- }
- }
- }
- })
-
- return dst
-}
-
-func blurVertical(img image.Image, kernel []float64) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- radius := len(kernel) - 1
-
- parallel(0, src.w, func(xs <-chan int) {
- scanLine := make([]uint8, src.h*4)
- scanLineF := make([]float64, len(scanLine))
- for x := range xs {
- src.scan(x, 0, x+1, src.h, scanLine)
- for i, v := range scanLine {
- scanLineF[i] = float64(v)
- }
- for y := 0; y < src.h; y++ {
- min := y - radius
- if min < 0 {
- min = 0
- }
- max := y + radius
- if max > src.h-1 {
- max = src.h - 1
- }
- var r, g, b, a, wsum float64
- for iy := min; iy <= max; iy++ {
- i := iy * 4
- weight := kernel[absint(y-iy)]
- wsum += weight
- s := scanLineF[i : i+4 : i+4]
- wa := s[3] * weight
- r += s[0] * wa
- g += s[1] * wa
- b += s[2] * wa
- a += wa
- }
- if a != 0 {
- aInv := 1 / a
- j := y*dst.Stride + x*4
- d := dst.Pix[j : j+4 : j+4]
- d[0] = clamp(r * aInv)
- d[1] = clamp(g * aInv)
- d[2] = clamp(b * aInv)
- d[3] = clamp(a / wsum)
- }
- }
- }
- })
-
- return dst
-}
-
-// Sharpen produces a sharpened version of the image.
-// Sigma parameter must be positive and indicates how much the image will be sharpened.
-//
-// Example:
-//
-// dstImage := imaging.Sharpen(srcImage, 3.5)
-//
-func Sharpen(img image.Image, sigma float64) *image.NRGBA {
- if sigma <= 0 {
- return Clone(img)
- }
-
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- blurred := Blur(img, sigma)
-
- parallel(0, src.h, func(ys <-chan int) {
- scanLine := make([]uint8, src.w*4)
- for y := range ys {
- src.scan(0, y, src.w, y+1, scanLine)
- j := y * dst.Stride
- for i := 0; i < src.w*4; i++ {
- val := int(scanLine[i])<<1 - int(blurred.Pix[j])
- if val < 0 {
- val = 0
- } else if val > 0xff {
- val = 0xff
- }
- dst.Pix[j] = uint8(val)
- j++
- }
- }
- })
-
- return dst
-}
diff --git a/vendor/github.com/disintegration/imaging/histogram.go b/vendor/github.com/disintegration/imaging/histogram.go
deleted file mode 100644
index c547fe82223..00000000000
--- a/vendor/github.com/disintegration/imaging/histogram.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package imaging
-
-import (
- "image"
- "sync"
-)
-
-// Histogram returns a normalized histogram of an image.
-//
-// Resulting histogram is represented as an array of 256 floats, where
-// histogram[i] is a probability of a pixel being of a particular luminance i.
-func Histogram(img image.Image) [256]float64 {
- var mu sync.Mutex
- var histogram [256]float64
- var total float64
-
- src := newScanner(img)
- if src.w == 0 || src.h == 0 {
- return histogram
- }
-
- parallel(0, src.h, func(ys <-chan int) {
- var tmpHistogram [256]float64
- var tmpTotal float64
- scanLine := make([]uint8, src.w*4)
- for y := range ys {
- src.scan(0, y, src.w, y+1, scanLine)
- i := 0
- for x := 0; x < src.w; x++ {
- s := scanLine[i : i+3 : i+3]
- r := s[0]
- g := s[1]
- b := s[2]
- y := 0.299*float32(r) + 0.587*float32(g) + 0.114*float32(b)
- tmpHistogram[int(y+0.5)]++
- tmpTotal++
- i += 4
- }
- }
- mu.Lock()
- for i := 0; i < 256; i++ {
- histogram[i] += tmpHistogram[i]
- }
- total += tmpTotal
- mu.Unlock()
- })
-
- for i := 0; i < 256; i++ {
- histogram[i] = histogram[i] / total
- }
- return histogram
-}
diff --git a/vendor/github.com/disintegration/imaging/io.go b/vendor/github.com/disintegration/imaging/io.go
deleted file mode 100644
index f6c6da86ba4..00000000000
--- a/vendor/github.com/disintegration/imaging/io.go
+++ /dev/null
@@ -1,444 +0,0 @@
-package imaging
-
-import (
- "encoding/binary"
- "errors"
- "image"
- "image/draw"
- "image/gif"
- "image/jpeg"
- "image/png"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
-
- "golang.org/x/image/bmp"
- "golang.org/x/image/tiff"
-)
-
-type fileSystem interface {
- Create(string) (io.WriteCloser, error)
- Open(string) (io.ReadCloser, error)
-}
-
-type localFS struct{}
-
-func (localFS) Create(name string) (io.WriteCloser, error) { return os.Create(name) }
-func (localFS) Open(name string) (io.ReadCloser, error) { return os.Open(name) }
-
-var fs fileSystem = localFS{}
-
-type decodeConfig struct {
- autoOrientation bool
-}
-
-var defaultDecodeConfig = decodeConfig{
- autoOrientation: false,
-}
-
-// DecodeOption sets an optional parameter for the Decode and Open functions.
-type DecodeOption func(*decodeConfig)
-
-// AutoOrientation returns a DecodeOption that sets the auto-orientation mode.
-// If auto-orientation is enabled, the image will be transformed after decoding
-// according to the EXIF orientation tag (if present). By default it's disabled.
-func AutoOrientation(enabled bool) DecodeOption {
- return func(c *decodeConfig) {
- c.autoOrientation = enabled
- }
-}
-
-// Decode reads an image from r.
-func Decode(r io.Reader, opts ...DecodeOption) (image.Image, error) {
- cfg := defaultDecodeConfig
- for _, option := range opts {
- option(&cfg)
- }
-
- if !cfg.autoOrientation {
- img, _, err := image.Decode(r)
- return img, err
- }
-
- var orient orientation
- pr, pw := io.Pipe()
- r = io.TeeReader(r, pw)
- done := make(chan struct{})
- go func() {
- defer close(done)
- orient = readOrientation(pr)
- io.Copy(ioutil.Discard, pr)
- }()
-
- img, _, err := image.Decode(r)
- pw.Close()
- <-done
- if err != nil {
- return nil, err
- }
-
- return fixOrientation(img, orient), nil
-}
-
-// Open loads an image from file.
-//
-// Examples:
-//
-// // Load an image from file.
-// img, err := imaging.Open("test.jpg")
-//
-// // Load an image and transform it depending on the EXIF orientation tag (if present).
-// img, err := imaging.Open("test.jpg", imaging.AutoOrientation(true))
-//
-func Open(filename string, opts ...DecodeOption) (image.Image, error) {
- file, err := fs.Open(filename)
- if err != nil {
- return nil, err
- }
- defer file.Close()
- return Decode(file, opts...)
-}
-
-// Format is an image file format.
-type Format int
-
-// Image file formats.
-const (
- JPEG Format = iota
- PNG
- GIF
- TIFF
- BMP
-)
-
-var formatExts = map[string]Format{
- "jpg": JPEG,
- "jpeg": JPEG,
- "png": PNG,
- "gif": GIF,
- "tif": TIFF,
- "tiff": TIFF,
- "bmp": BMP,
-}
-
-var formatNames = map[Format]string{
- JPEG: "JPEG",
- PNG: "PNG",
- GIF: "GIF",
- TIFF: "TIFF",
- BMP: "BMP",
-}
-
-func (f Format) String() string {
- return formatNames[f]
-}
-
-// ErrUnsupportedFormat means the given image format is not supported.
-var ErrUnsupportedFormat = errors.New("imaging: unsupported image format")
-
-// FormatFromExtension parses image format from filename extension:
-// "jpg" (or "jpeg"), "png", "gif", "tif" (or "tiff") and "bmp" are supported.
-func FormatFromExtension(ext string) (Format, error) {
- if f, ok := formatExts[strings.ToLower(strings.TrimPrefix(ext, "."))]; ok {
- return f, nil
- }
- return -1, ErrUnsupportedFormat
-}
-
-// FormatFromFilename parses image format from filename:
-// "jpg" (or "jpeg"), "png", "gif", "tif" (or "tiff") and "bmp" are supported.
-func FormatFromFilename(filename string) (Format, error) {
- ext := filepath.Ext(filename)
- return FormatFromExtension(ext)
-}
-
-type encodeConfig struct {
- jpegQuality int
- gifNumColors int
- gifQuantizer draw.Quantizer
- gifDrawer draw.Drawer
- pngCompressionLevel png.CompressionLevel
-}
-
-var defaultEncodeConfig = encodeConfig{
- jpegQuality: 95,
- gifNumColors: 256,
- gifQuantizer: nil,
- gifDrawer: nil,
- pngCompressionLevel: png.DefaultCompression,
-}
-
-// EncodeOption sets an optional parameter for the Encode and Save functions.
-type EncodeOption func(*encodeConfig)
-
-// JPEGQuality returns an EncodeOption that sets the output JPEG quality.
-// Quality ranges from 1 to 100 inclusive, higher is better. Default is 95.
-func JPEGQuality(quality int) EncodeOption {
- return func(c *encodeConfig) {
- c.jpegQuality = quality
- }
-}
-
-// GIFNumColors returns an EncodeOption that sets the maximum number of colors
-// used in the GIF-encoded image. It ranges from 1 to 256. Default is 256.
-func GIFNumColors(numColors int) EncodeOption {
- return func(c *encodeConfig) {
- c.gifNumColors = numColors
- }
-}
-
-// GIFQuantizer returns an EncodeOption that sets the quantizer that is used to produce
-// a palette of the GIF-encoded image.
-func GIFQuantizer(quantizer draw.Quantizer) EncodeOption {
- return func(c *encodeConfig) {
- c.gifQuantizer = quantizer
- }
-}
-
-// GIFDrawer returns an EncodeOption that sets the drawer that is used to convert
-// the source image to the desired palette of the GIF-encoded image.
-func GIFDrawer(drawer draw.Drawer) EncodeOption {
- return func(c *encodeConfig) {
- c.gifDrawer = drawer
- }
-}
-
-// PNGCompressionLevel returns an EncodeOption that sets the compression level
-// of the PNG-encoded image. Default is png.DefaultCompression.
-func PNGCompressionLevel(level png.CompressionLevel) EncodeOption {
- return func(c *encodeConfig) {
- c.pngCompressionLevel = level
- }
-}
-
-// Encode writes the image img to w in the specified format (JPEG, PNG, GIF, TIFF or BMP).
-func Encode(w io.Writer, img image.Image, format Format, opts ...EncodeOption) error {
- cfg := defaultEncodeConfig
- for _, option := range opts {
- option(&cfg)
- }
-
- switch format {
- case JPEG:
- if nrgba, ok := img.(*image.NRGBA); ok && nrgba.Opaque() {
- rgba := &image.RGBA{
- Pix: nrgba.Pix,
- Stride: nrgba.Stride,
- Rect: nrgba.Rect,
- }
- return jpeg.Encode(w, rgba, &jpeg.Options{Quality: cfg.jpegQuality})
- }
- return jpeg.Encode(w, img, &jpeg.Options{Quality: cfg.jpegQuality})
-
- case PNG:
- encoder := png.Encoder{CompressionLevel: cfg.pngCompressionLevel}
- return encoder.Encode(w, img)
-
- case GIF:
- return gif.Encode(w, img, &gif.Options{
- NumColors: cfg.gifNumColors,
- Quantizer: cfg.gifQuantizer,
- Drawer: cfg.gifDrawer,
- })
-
- case TIFF:
- return tiff.Encode(w, img, &tiff.Options{Compression: tiff.Deflate, Predictor: true})
-
- case BMP:
- return bmp.Encode(w, img)
- }
-
- return ErrUnsupportedFormat
-}
-
-// Save saves the image to file with the specified filename.
-// The format is determined from the filename extension:
-// "jpg" (or "jpeg"), "png", "gif", "tif" (or "tiff") and "bmp" are supported.
-//
-// Examples:
-//
-// // Save the image as PNG.
-// err := imaging.Save(img, "out.png")
-//
-// // Save the image as JPEG with optional quality parameter set to 80.
-// err := imaging.Save(img, "out.jpg", imaging.JPEGQuality(80))
-//
-func Save(img image.Image, filename string, opts ...EncodeOption) (err error) {
- f, err := FormatFromFilename(filename)
- if err != nil {
- return err
- }
- file, err := fs.Create(filename)
- if err != nil {
- return err
- }
- err = Encode(file, img, f, opts...)
- errc := file.Close()
- if err == nil {
- err = errc
- }
- return err
-}
-
-// orientation is an EXIF flag that specifies the transformation
-// that should be applied to image to display it correctly.
-type orientation int
-
-const (
- orientationUnspecified = 0
- orientationNormal = 1
- orientationFlipH = 2
- orientationRotate180 = 3
- orientationFlipV = 4
- orientationTranspose = 5
- orientationRotate270 = 6
- orientationTransverse = 7
- orientationRotate90 = 8
-)
-
-// readOrientation tries to read the orientation EXIF flag from image data in r.
-// If the EXIF data block is not found or the orientation flag is not found
-// or any other error occures while reading the data, it returns the
-// orientationUnspecified (0) value.
-func readOrientation(r io.Reader) orientation {
- const (
- markerSOI = 0xffd8
- markerAPP1 = 0xffe1
- exifHeader = 0x45786966
- byteOrderBE = 0x4d4d
- byteOrderLE = 0x4949
- orientationTag = 0x0112
- )
-
- // Check if JPEG SOI marker is present.
- var soi uint16
- if err := binary.Read(r, binary.BigEndian, &soi); err != nil {
- return orientationUnspecified
- }
- if soi != markerSOI {
- return orientationUnspecified // Missing JPEG SOI marker.
- }
-
- // Find JPEG APP1 marker.
- for {
- var marker, size uint16
- if err := binary.Read(r, binary.BigEndian, &marker); err != nil {
- return orientationUnspecified
- }
- if err := binary.Read(r, binary.BigEndian, &size); err != nil {
- return orientationUnspecified
- }
- if marker>>8 != 0xff {
- return orientationUnspecified // Invalid JPEG marker.
- }
- if marker == markerAPP1 {
- break
- }
- if size < 2 {
- return orientationUnspecified // Invalid block size.
- }
- if _, err := io.CopyN(ioutil.Discard, r, int64(size-2)); err != nil {
- return orientationUnspecified
- }
- }
-
- // Check if EXIF header is present.
- var header uint32
- if err := binary.Read(r, binary.BigEndian, &header); err != nil {
- return orientationUnspecified
- }
- if header != exifHeader {
- return orientationUnspecified
- }
- if _, err := io.CopyN(ioutil.Discard, r, 2); err != nil {
- return orientationUnspecified
- }
-
- // Read byte order information.
- var (
- byteOrderTag uint16
- byteOrder binary.ByteOrder
- )
- if err := binary.Read(r, binary.BigEndian, &byteOrderTag); err != nil {
- return orientationUnspecified
- }
- switch byteOrderTag {
- case byteOrderBE:
- byteOrder = binary.BigEndian
- case byteOrderLE:
- byteOrder = binary.LittleEndian
- default:
- return orientationUnspecified // Invalid byte order flag.
- }
- if _, err := io.CopyN(ioutil.Discard, r, 2); err != nil {
- return orientationUnspecified
- }
-
- // Skip the EXIF offset.
- var offset uint32
- if err := binary.Read(r, byteOrder, &offset); err != nil {
- return orientationUnspecified
- }
- if offset < 8 {
- return orientationUnspecified // Invalid offset value.
- }
- if _, err := io.CopyN(ioutil.Discard, r, int64(offset-8)); err != nil {
- return orientationUnspecified
- }
-
- // Read the number of tags.
- var numTags uint16
- if err := binary.Read(r, byteOrder, &numTags); err != nil {
- return orientationUnspecified
- }
-
- // Find the orientation tag.
- for i := 0; i < int(numTags); i++ {
- var tag uint16
- if err := binary.Read(r, byteOrder, &tag); err != nil {
- return orientationUnspecified
- }
- if tag != orientationTag {
- if _, err := io.CopyN(ioutil.Discard, r, 10); err != nil {
- return orientationUnspecified
- }
- continue
- }
- if _, err := io.CopyN(ioutil.Discard, r, 6); err != nil {
- return orientationUnspecified
- }
- var val uint16
- if err := binary.Read(r, byteOrder, &val); err != nil {
- return orientationUnspecified
- }
- if val < 1 || val > 8 {
- return orientationUnspecified // Invalid tag value.
- }
- return orientation(val)
- }
- return orientationUnspecified // Missing orientation tag.
-}
-
-// fixOrientation applies a transform to img corresponding to the given orientation flag.
-func fixOrientation(img image.Image, o orientation) image.Image {
- switch o {
- case orientationNormal:
- case orientationFlipH:
- img = FlipH(img)
- case orientationFlipV:
- img = FlipV(img)
- case orientationRotate90:
- img = Rotate90(img)
- case orientationRotate180:
- img = Rotate180(img)
- case orientationRotate270:
- img = Rotate270(img)
- case orientationTranspose:
- img = Transpose(img)
- case orientationTransverse:
- img = Transverse(img)
- }
- return img
-}
diff --git a/vendor/github.com/disintegration/imaging/resize.go b/vendor/github.com/disintegration/imaging/resize.go
deleted file mode 100644
index 706435e3dce..00000000000
--- a/vendor/github.com/disintegration/imaging/resize.go
+++ /dev/null
@@ -1,595 +0,0 @@
-package imaging
-
-import (
- "image"
- "math"
-)
-
-type indexWeight struct {
- index int
- weight float64
-}
-
-func precomputeWeights(dstSize, srcSize int, filter ResampleFilter) [][]indexWeight {
- du := float64(srcSize) / float64(dstSize)
- scale := du
- if scale < 1.0 {
- scale = 1.0
- }
- ru := math.Ceil(scale * filter.Support)
-
- out := make([][]indexWeight, dstSize)
- tmp := make([]indexWeight, 0, dstSize*int(ru+2)*2)
-
- for v := 0; v < dstSize; v++ {
- fu := (float64(v)+0.5)*du - 0.5
-
- begin := int(math.Ceil(fu - ru))
- if begin < 0 {
- begin = 0
- }
- end := int(math.Floor(fu + ru))
- if end > srcSize-1 {
- end = srcSize - 1
- }
-
- var sum float64
- for u := begin; u <= end; u++ {
- w := filter.Kernel((float64(u) - fu) / scale)
- if w != 0 {
- sum += w
- tmp = append(tmp, indexWeight{index: u, weight: w})
- }
- }
- if sum != 0 {
- for i := range tmp {
- tmp[i].weight /= sum
- }
- }
-
- out[v] = tmp
- tmp = tmp[len(tmp):]
- }
-
- return out
-}
-
-// Resize resizes the image to the specified width and height using the specified resampling
-// filter and returns the transformed image. If one of width or height is 0, the image aspect
-// ratio is preserved.
-//
-// Example:
-//
-// dstImage := imaging.Resize(srcImage, 800, 600, imaging.Lanczos)
-//
-func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA {
- dstW, dstH := width, height
- if dstW < 0 || dstH < 0 {
- return &image.NRGBA{}
- }
- if dstW == 0 && dstH == 0 {
- return &image.NRGBA{}
- }
-
- srcW := img.Bounds().Dx()
- srcH := img.Bounds().Dy()
- if srcW <= 0 || srcH <= 0 {
- return &image.NRGBA{}
- }
-
- // If new width or height is 0 then preserve aspect ratio, minimum 1px.
- if dstW == 0 {
- tmpW := float64(dstH) * float64(srcW) / float64(srcH)
- dstW = int(math.Max(1.0, math.Floor(tmpW+0.5)))
- }
- if dstH == 0 {
- tmpH := float64(dstW) * float64(srcH) / float64(srcW)
- dstH = int(math.Max(1.0, math.Floor(tmpH+0.5)))
- }
-
- if filter.Support <= 0 {
- // Nearest-neighbor special case.
- return resizeNearest(img, dstW, dstH)
- }
-
- if srcW != dstW && srcH != dstH {
- return resizeVertical(resizeHorizontal(img, dstW, filter), dstH, filter)
- }
- if srcW != dstW {
- return resizeHorizontal(img, dstW, filter)
- }
- if srcH != dstH {
- return resizeVertical(img, dstH, filter)
- }
- return Clone(img)
-}
-
-func resizeHorizontal(img image.Image, width int, filter ResampleFilter) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, width, src.h))
- weights := precomputeWeights(width, src.w, filter)
- parallel(0, src.h, func(ys <-chan int) {
- scanLine := make([]uint8, src.w*4)
- for y := range ys {
- src.scan(0, y, src.w, y+1, scanLine)
- j0 := y * dst.Stride
- for x := range weights {
- var r, g, b, a float64
- for _, w := range weights[x] {
- i := w.index * 4
- s := scanLine[i : i+4 : i+4]
- aw := float64(s[3]) * w.weight
- r += float64(s[0]) * aw
- g += float64(s[1]) * aw
- b += float64(s[2]) * aw
- a += aw
- }
- if a != 0 {
- aInv := 1 / a
- j := j0 + x*4
- d := dst.Pix[j : j+4 : j+4]
- d[0] = clamp(r * aInv)
- d[1] = clamp(g * aInv)
- d[2] = clamp(b * aInv)
- d[3] = clamp(a)
- }
- }
- }
- })
- return dst
-}
-
-func resizeVertical(img image.Image, height int, filter ResampleFilter) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, height))
- weights := precomputeWeights(height, src.h, filter)
- parallel(0, src.w, func(xs <-chan int) {
- scanLine := make([]uint8, src.h*4)
- for x := range xs {
- src.scan(x, 0, x+1, src.h, scanLine)
- for y := range weights {
- var r, g, b, a float64
- for _, w := range weights[y] {
- i := w.index * 4
- s := scanLine[i : i+4 : i+4]
- aw := float64(s[3]) * w.weight
- r += float64(s[0]) * aw
- g += float64(s[1]) * aw
- b += float64(s[2]) * aw
- a += aw
- }
- if a != 0 {
- aInv := 1 / a
- j := y*dst.Stride + x*4
- d := dst.Pix[j : j+4 : j+4]
- d[0] = clamp(r * aInv)
- d[1] = clamp(g * aInv)
- d[2] = clamp(b * aInv)
- d[3] = clamp(a)
- }
- }
- }
- })
- return dst
-}
-
-// resizeNearest is a fast nearest-neighbor resize, no filtering.
-func resizeNearest(img image.Image, width, height int) *image.NRGBA {
- dst := image.NewNRGBA(image.Rect(0, 0, width, height))
- dx := float64(img.Bounds().Dx()) / float64(width)
- dy := float64(img.Bounds().Dy()) / float64(height)
-
- if dx > 1 && dy > 1 {
- src := newScanner(img)
- parallel(0, height, func(ys <-chan int) {
- for y := range ys {
- srcY := int((float64(y) + 0.5) * dy)
- dstOff := y * dst.Stride
- for x := 0; x < width; x++ {
- srcX := int((float64(x) + 0.5) * dx)
- src.scan(srcX, srcY, srcX+1, srcY+1, dst.Pix[dstOff:dstOff+4])
- dstOff += 4
- }
- }
- })
- } else {
- src := toNRGBA(img)
- parallel(0, height, func(ys <-chan int) {
- for y := range ys {
- srcY := int((float64(y) + 0.5) * dy)
- srcOff0 := srcY * src.Stride
- dstOff := y * dst.Stride
- for x := 0; x < width; x++ {
- srcX := int((float64(x) + 0.5) * dx)
- srcOff := srcOff0 + srcX*4
- copy(dst.Pix[dstOff:dstOff+4], src.Pix[srcOff:srcOff+4])
- dstOff += 4
- }
- }
- })
- }
-
- return dst
-}
-
-// Fit scales down the image using the specified resample filter to fit the specified
-// maximum width and height and returns the transformed image.
-//
-// Example:
-//
-// dstImage := imaging.Fit(srcImage, 800, 600, imaging.Lanczos)
-//
-func Fit(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA {
- maxW, maxH := width, height
-
- if maxW <= 0 || maxH <= 0 {
- return &image.NRGBA{}
- }
-
- srcBounds := img.Bounds()
- srcW := srcBounds.Dx()
- srcH := srcBounds.Dy()
-
- if srcW <= 0 || srcH <= 0 {
- return &image.NRGBA{}
- }
-
- if srcW <= maxW && srcH <= maxH {
- return Clone(img)
- }
-
- srcAspectRatio := float64(srcW) / float64(srcH)
- maxAspectRatio := float64(maxW) / float64(maxH)
-
- var newW, newH int
- if srcAspectRatio > maxAspectRatio {
- newW = maxW
- newH = int(float64(newW) / srcAspectRatio)
- } else {
- newH = maxH
- newW = int(float64(newH) * srcAspectRatio)
- }
-
- return Resize(img, newW, newH, filter)
-}
-
-// Fill creates an image with the specified dimensions and fills it with the scaled source image.
-// To achieve the correct aspect ratio without stretching, the source image will be cropped.
-//
-// Example:
-//
-// dstImage := imaging.Fill(srcImage, 800, 600, imaging.Center, imaging.Lanczos)
-//
-func Fill(img image.Image, width, height int, anchor Anchor, filter ResampleFilter) *image.NRGBA {
- dstW, dstH := width, height
-
- if dstW <= 0 || dstH <= 0 {
- return &image.NRGBA{}
- }
-
- srcBounds := img.Bounds()
- srcW := srcBounds.Dx()
- srcH := srcBounds.Dy()
-
- if srcW <= 0 || srcH <= 0 {
- return &image.NRGBA{}
- }
-
- if srcW == dstW && srcH == dstH {
- return Clone(img)
- }
-
- if srcW >= 100 && srcH >= 100 {
- return cropAndResize(img, dstW, dstH, anchor, filter)
- }
- return resizeAndCrop(img, dstW, dstH, anchor, filter)
-}
-
-// cropAndResize crops the image to the smallest possible size that has the required aspect ratio using
-// the given anchor point, then scales it to the specified dimensions and returns the transformed image.
-//
-// This is generally faster than resizing first, but may result in inaccuracies when used on small source images.
-func cropAndResize(img image.Image, width, height int, anchor Anchor, filter ResampleFilter) *image.NRGBA {
- dstW, dstH := width, height
-
- srcBounds := img.Bounds()
- srcW := srcBounds.Dx()
- srcH := srcBounds.Dy()
- srcAspectRatio := float64(srcW) / float64(srcH)
- dstAspectRatio := float64(dstW) / float64(dstH)
-
- var tmp *image.NRGBA
- if srcAspectRatio < dstAspectRatio {
- cropH := float64(srcW) * float64(dstH) / float64(dstW)
- tmp = CropAnchor(img, srcW, int(math.Max(1, cropH)+0.5), anchor)
- } else {
- cropW := float64(srcH) * float64(dstW) / float64(dstH)
- tmp = CropAnchor(img, int(math.Max(1, cropW)+0.5), srcH, anchor)
- }
-
- return Resize(tmp, dstW, dstH, filter)
-}
-
-// resizeAndCrop resizes the image to the smallest possible size that will cover the specified dimensions,
-// crops the resized image to the specified dimensions using the given anchor point and returns
-// the transformed image.
-func resizeAndCrop(img image.Image, width, height int, anchor Anchor, filter ResampleFilter) *image.NRGBA {
- dstW, dstH := width, height
-
- srcBounds := img.Bounds()
- srcW := srcBounds.Dx()
- srcH := srcBounds.Dy()
- srcAspectRatio := float64(srcW) / float64(srcH)
- dstAspectRatio := float64(dstW) / float64(dstH)
-
- var tmp *image.NRGBA
- if srcAspectRatio < dstAspectRatio {
- tmp = Resize(img, dstW, 0, filter)
- } else {
- tmp = Resize(img, 0, dstH, filter)
- }
-
- return CropAnchor(tmp, dstW, dstH, anchor)
-}
-
-// Thumbnail scales the image up or down using the specified resample filter, crops it
-// to the specified width and hight and returns the transformed image.
-//
-// Example:
-//
-// dstImage := imaging.Thumbnail(srcImage, 100, 100, imaging.Lanczos)
-//
-func Thumbnail(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA {
- return Fill(img, width, height, Center, filter)
-}
-
-// ResampleFilter specifies a resampling filter to be used for image resizing.
-//
-// General filter recommendations:
-//
-// - Lanczos
-// A high-quality resampling filter for photographic images yielding sharp results.
-//
-// - CatmullRom
-// A sharp cubic filter that is faster than Lanczos filter while providing similar results.
-//
-// - MitchellNetravali
-// A cubic filter that produces smoother results with less ringing artifacts than CatmullRom.
-//
-// - Linear
-// Bilinear resampling filter, produces a smooth output. Faster than cubic filters.
-//
-// - Box
-// Simple and fast averaging filter appropriate for downscaling.
-// When upscaling it's similar to NearestNeighbor.
-//
-// - NearestNeighbor
-// Fastest resampling filter, no antialiasing.
-//
-type ResampleFilter struct {
- Support float64
- Kernel func(float64) float64
-}
-
-// NearestNeighbor is a nearest-neighbor filter (no anti-aliasing).
-var NearestNeighbor ResampleFilter
-
-// Box filter (averaging pixels).
-var Box ResampleFilter
-
-// Linear filter.
-var Linear ResampleFilter
-
-// Hermite cubic spline filter (BC-spline; B=0; C=0).
-var Hermite ResampleFilter
-
-// MitchellNetravali is Mitchell-Netravali cubic filter (BC-spline; B=1/3; C=1/3).
-var MitchellNetravali ResampleFilter
-
-// CatmullRom is a Catmull-Rom - sharp cubic filter (BC-spline; B=0; C=0.5).
-var CatmullRom ResampleFilter
-
-// BSpline is a smooth cubic filter (BC-spline; B=1; C=0).
-var BSpline ResampleFilter
-
-// Gaussian is a Gaussian blurring filter.
-var Gaussian ResampleFilter
-
-// Bartlett is a Bartlett-windowed sinc filter (3 lobes).
-var Bartlett ResampleFilter
-
-// Lanczos filter (3 lobes).
-var Lanczos ResampleFilter
-
-// Hann is a Hann-windowed sinc filter (3 lobes).
-var Hann ResampleFilter
-
-// Hamming is a Hamming-windowed sinc filter (3 lobes).
-var Hamming ResampleFilter
-
-// Blackman is a Blackman-windowed sinc filter (3 lobes).
-var Blackman ResampleFilter
-
-// Welch is a Welch-windowed sinc filter (parabolic window, 3 lobes).
-var Welch ResampleFilter
-
-// Cosine is a Cosine-windowed sinc filter (3 lobes).
-var Cosine ResampleFilter
-
-func bcspline(x, b, c float64) float64 {
- var y float64
- x = math.Abs(x)
- if x < 1.0 {
- y = ((12-9*b-6*c)*x*x*x + (-18+12*b+6*c)*x*x + (6 - 2*b)) / 6
- } else if x < 2.0 {
- y = ((-b-6*c)*x*x*x + (6*b+30*c)*x*x + (-12*b-48*c)*x + (8*b + 24*c)) / 6
- }
- return y
-}
-
-func sinc(x float64) float64 {
- if x == 0 {
- return 1
- }
- return math.Sin(math.Pi*x) / (math.Pi * x)
-}
-
-func init() {
- NearestNeighbor = ResampleFilter{
- Support: 0.0, // special case - not applying the filter
- }
-
- Box = ResampleFilter{
- Support: 0.5,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x <= 0.5 {
- return 1.0
- }
- return 0
- },
- }
-
- Linear = ResampleFilter{
- Support: 1.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 1.0 {
- return 1.0 - x
- }
- return 0
- },
- }
-
- Hermite = ResampleFilter{
- Support: 1.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 1.0 {
- return bcspline(x, 0.0, 0.0)
- }
- return 0
- },
- }
-
- MitchellNetravali = ResampleFilter{
- Support: 2.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 2.0 {
- return bcspline(x, 1.0/3.0, 1.0/3.0)
- }
- return 0
- },
- }
-
- CatmullRom = ResampleFilter{
- Support: 2.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 2.0 {
- return bcspline(x, 0.0, 0.5)
- }
- return 0
- },
- }
-
- BSpline = ResampleFilter{
- Support: 2.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 2.0 {
- return bcspline(x, 1.0, 0.0)
- }
- return 0
- },
- }
-
- Gaussian = ResampleFilter{
- Support: 2.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 2.0 {
- return math.Exp(-2 * x * x)
- }
- return 0
- },
- }
-
- Bartlett = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * (3.0 - x) / 3.0
- }
- return 0
- },
- }
-
- Lanczos = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * sinc(x/3.0)
- }
- return 0
- },
- }
-
- Hann = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * (0.5 + 0.5*math.Cos(math.Pi*x/3.0))
- }
- return 0
- },
- }
-
- Hamming = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * (0.54 + 0.46*math.Cos(math.Pi*x/3.0))
- }
- return 0
- },
- }
-
- Blackman = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * (0.42 - 0.5*math.Cos(math.Pi*x/3.0+math.Pi) + 0.08*math.Cos(2.0*math.Pi*x/3.0))
- }
- return 0
- },
- }
-
- Welch = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * (1.0 - (x * x / 9.0))
- }
- return 0
- },
- }
-
- Cosine = ResampleFilter{
- Support: 3.0,
- Kernel: func(x float64) float64 {
- x = math.Abs(x)
- if x < 3.0 {
- return sinc(x) * math.Cos((math.Pi/2.0)*(x/3.0))
- }
- return 0
- },
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/scanner.go b/vendor/github.com/disintegration/imaging/scanner.go
deleted file mode 100644
index 37d92cef886..00000000000
--- a/vendor/github.com/disintegration/imaging/scanner.go
+++ /dev/null
@@ -1,285 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
-)
-
-type scanner struct {
- image image.Image
- w, h int
- palette []color.NRGBA
-}
-
-func newScanner(img image.Image) *scanner {
- s := &scanner{
- image: img,
- w: img.Bounds().Dx(),
- h: img.Bounds().Dy(),
- }
- if img, ok := img.(*image.Paletted); ok {
- s.palette = make([]color.NRGBA, len(img.Palette))
- for i := 0; i < len(img.Palette); i++ {
- s.palette[i] = color.NRGBAModel.Convert(img.Palette[i]).(color.NRGBA)
- }
- }
- return s
-}
-
-// scan scans the given rectangular region of the image into dst.
-func (s *scanner) scan(x1, y1, x2, y2 int, dst []uint8) {
- switch img := s.image.(type) {
- case *image.NRGBA:
- size := (x2 - x1) * 4
- j := 0
- i := y1*img.Stride + x1*4
- if size == 4 {
- for y := y1; y < y2; y++ {
- d := dst[j : j+4 : j+4]
- s := img.Pix[i : i+4 : i+4]
- d[0] = s[0]
- d[1] = s[1]
- d[2] = s[2]
- d[3] = s[3]
- j += size
- i += img.Stride
- }
- } else {
- for y := y1; y < y2; y++ {
- copy(dst[j:j+size], img.Pix[i:i+size])
- j += size
- i += img.Stride
- }
- }
-
- case *image.NRGBA64:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1*8
- for x := x1; x < x2; x++ {
- s := img.Pix[i : i+8 : i+8]
- d := dst[j : j+4 : j+4]
- d[0] = s[0]
- d[1] = s[2]
- d[2] = s[4]
- d[3] = s[6]
- j += 4
- i += 8
- }
- }
-
- case *image.RGBA:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1*4
- for x := x1; x < x2; x++ {
- d := dst[j : j+4 : j+4]
- a := img.Pix[i+3]
- switch a {
- case 0:
- d[0] = 0
- d[1] = 0
- d[2] = 0
- d[3] = a
- case 0xff:
- s := img.Pix[i : i+4 : i+4]
- d[0] = s[0]
- d[1] = s[1]
- d[2] = s[2]
- d[3] = a
- default:
- s := img.Pix[i : i+4 : i+4]
- r16 := uint16(s[0])
- g16 := uint16(s[1])
- b16 := uint16(s[2])
- a16 := uint16(a)
- d[0] = uint8(r16 * 0xff / a16)
- d[1] = uint8(g16 * 0xff / a16)
- d[2] = uint8(b16 * 0xff / a16)
- d[3] = a
- }
- j += 4
- i += 4
- }
- }
-
- case *image.RGBA64:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1*8
- for x := x1; x < x2; x++ {
- s := img.Pix[i : i+8 : i+8]
- d := dst[j : j+4 : j+4]
- a := s[6]
- switch a {
- case 0:
- d[0] = 0
- d[1] = 0
- d[2] = 0
- case 0xff:
- d[0] = s[0]
- d[1] = s[2]
- d[2] = s[4]
- default:
- r32 := uint32(s[0])<<8 | uint32(s[1])
- g32 := uint32(s[2])<<8 | uint32(s[3])
- b32 := uint32(s[4])<<8 | uint32(s[5])
- a32 := uint32(s[6])<<8 | uint32(s[7])
- d[0] = uint8((r32 * 0xffff / a32) >> 8)
- d[1] = uint8((g32 * 0xffff / a32) >> 8)
- d[2] = uint8((b32 * 0xffff / a32) >> 8)
- }
- d[3] = a
- j += 4
- i += 8
- }
- }
-
- case *image.Gray:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1
- for x := x1; x < x2; x++ {
- c := img.Pix[i]
- d := dst[j : j+4 : j+4]
- d[0] = c
- d[1] = c
- d[2] = c
- d[3] = 0xff
- j += 4
- i++
- }
- }
-
- case *image.Gray16:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1*2
- for x := x1; x < x2; x++ {
- c := img.Pix[i]
- d := dst[j : j+4 : j+4]
- d[0] = c
- d[1] = c
- d[2] = c
- d[3] = 0xff
- j += 4
- i += 2
- }
- }
-
- case *image.YCbCr:
- j := 0
- x1 += img.Rect.Min.X
- x2 += img.Rect.Min.X
- y1 += img.Rect.Min.Y
- y2 += img.Rect.Min.Y
-
- hy := img.Rect.Min.Y / 2
- hx := img.Rect.Min.X / 2
- for y := y1; y < y2; y++ {
- iy := (y-img.Rect.Min.Y)*img.YStride + (x1 - img.Rect.Min.X)
-
- var yBase int
- switch img.SubsampleRatio {
- case image.YCbCrSubsampleRatio444, image.YCbCrSubsampleRatio422:
- yBase = (y - img.Rect.Min.Y) * img.CStride
- case image.YCbCrSubsampleRatio420, image.YCbCrSubsampleRatio440:
- yBase = (y/2 - hy) * img.CStride
- }
-
- for x := x1; x < x2; x++ {
- var ic int
- switch img.SubsampleRatio {
- case image.YCbCrSubsampleRatio444, image.YCbCrSubsampleRatio440:
- ic = yBase + (x - img.Rect.Min.X)
- case image.YCbCrSubsampleRatio422, image.YCbCrSubsampleRatio420:
- ic = yBase + (x/2 - hx)
- default:
- ic = img.COffset(x, y)
- }
-
- yy1 := int32(img.Y[iy]) * 0x10101
- cb1 := int32(img.Cb[ic]) - 128
- cr1 := int32(img.Cr[ic]) - 128
-
- r := yy1 + 91881*cr1
- if uint32(r)&0xff000000 == 0 {
- r >>= 16
- } else {
- r = ^(r >> 31)
- }
-
- g := yy1 - 22554*cb1 - 46802*cr1
- if uint32(g)&0xff000000 == 0 {
- g >>= 16
- } else {
- g = ^(g >> 31)
- }
-
- b := yy1 + 116130*cb1
- if uint32(b)&0xff000000 == 0 {
- b >>= 16
- } else {
- b = ^(b >> 31)
- }
-
- d := dst[j : j+4 : j+4]
- d[0] = uint8(r)
- d[1] = uint8(g)
- d[2] = uint8(b)
- d[3] = 0xff
-
- iy++
- j += 4
- }
- }
-
- case *image.Paletted:
- j := 0
- for y := y1; y < y2; y++ {
- i := y*img.Stride + x1
- for x := x1; x < x2; x++ {
- c := s.palette[img.Pix[i]]
- d := dst[j : j+4 : j+4]
- d[0] = c.R
- d[1] = c.G
- d[2] = c.B
- d[3] = c.A
- j += 4
- i++
- }
- }
-
- default:
- j := 0
- b := s.image.Bounds()
- x1 += b.Min.X
- x2 += b.Min.X
- y1 += b.Min.Y
- y2 += b.Min.Y
- for y := y1; y < y2; y++ {
- for x := x1; x < x2; x++ {
- r16, g16, b16, a16 := s.image.At(x, y).RGBA()
- d := dst[j : j+4 : j+4]
- switch a16 {
- case 0xffff:
- d[0] = uint8(r16 >> 8)
- d[1] = uint8(g16 >> 8)
- d[2] = uint8(b16 >> 8)
- d[3] = 0xff
- case 0:
- d[0] = 0
- d[1] = 0
- d[2] = 0
- d[3] = 0
- default:
- d[0] = uint8(((r16 * 0xffff) / a16) >> 8)
- d[1] = uint8(((g16 * 0xffff) / a16) >> 8)
- d[2] = uint8(((b16 * 0xffff) / a16) >> 8)
- d[3] = uint8(a16 >> 8)
- }
- j += 4
- }
- }
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/tools.go b/vendor/github.com/disintegration/imaging/tools.go
deleted file mode 100644
index 0ec19a039cc..00000000000
--- a/vendor/github.com/disintegration/imaging/tools.go
+++ /dev/null
@@ -1,249 +0,0 @@
-package imaging
-
-import (
- "bytes"
- "image"
- "image/color"
- "math"
-)
-
-// New creates a new image with the specified width and height, and fills it with the specified color.
-func New(width, height int, fillColor color.Color) *image.NRGBA {
- if width <= 0 || height <= 0 {
- return &image.NRGBA{}
- }
-
- c := color.NRGBAModel.Convert(fillColor).(color.NRGBA)
- if (c == color.NRGBA{0, 0, 0, 0}) {
- return image.NewNRGBA(image.Rect(0, 0, width, height))
- }
-
- return &image.NRGBA{
- Pix: bytes.Repeat([]byte{c.R, c.G, c.B, c.A}, width*height),
- Stride: 4 * width,
- Rect: image.Rect(0, 0, width, height),
- }
-}
-
-// Clone returns a copy of the given image.
-func Clone(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, src.w, src.h))
- size := src.w * 4
- parallel(0, src.h, func(ys <-chan int) {
- for y := range ys {
- i := y * dst.Stride
- src.scan(0, y, src.w, y+1, dst.Pix[i:i+size])
- }
- })
- return dst
-}
-
-// Anchor is the anchor point for image alignment.
-type Anchor int
-
-// Anchor point positions.
-const (
- Center Anchor = iota
- TopLeft
- Top
- TopRight
- Left
- Right
- BottomLeft
- Bottom
- BottomRight
-)
-
-func anchorPt(b image.Rectangle, w, h int, anchor Anchor) image.Point {
- var x, y int
- switch anchor {
- case TopLeft:
- x = b.Min.X
- y = b.Min.Y
- case Top:
- x = b.Min.X + (b.Dx()-w)/2
- y = b.Min.Y
- case TopRight:
- x = b.Max.X - w
- y = b.Min.Y
- case Left:
- x = b.Min.X
- y = b.Min.Y + (b.Dy()-h)/2
- case Right:
- x = b.Max.X - w
- y = b.Min.Y + (b.Dy()-h)/2
- case BottomLeft:
- x = b.Min.X
- y = b.Max.Y - h
- case Bottom:
- x = b.Min.X + (b.Dx()-w)/2
- y = b.Max.Y - h
- case BottomRight:
- x = b.Max.X - w
- y = b.Max.Y - h
- default:
- x = b.Min.X + (b.Dx()-w)/2
- y = b.Min.Y + (b.Dy()-h)/2
- }
- return image.Pt(x, y)
-}
-
-// Crop cuts out a rectangular region with the specified bounds
-// from the image and returns the cropped image.
-func Crop(img image.Image, rect image.Rectangle) *image.NRGBA {
- r := rect.Intersect(img.Bounds()).Sub(img.Bounds().Min)
- if r.Empty() {
- return &image.NRGBA{}
- }
- src := newScanner(img)
- dst := image.NewNRGBA(image.Rect(0, 0, r.Dx(), r.Dy()))
- rowSize := r.Dx() * 4
- parallel(r.Min.Y, r.Max.Y, func(ys <-chan int) {
- for y := range ys {
- i := (y - r.Min.Y) * dst.Stride
- src.scan(r.Min.X, y, r.Max.X, y+1, dst.Pix[i:i+rowSize])
- }
- })
- return dst
-}
-
-// CropAnchor cuts out a rectangular region with the specified size
-// from the image using the specified anchor point and returns the cropped image.
-func CropAnchor(img image.Image, width, height int, anchor Anchor) *image.NRGBA {
- srcBounds := img.Bounds()
- pt := anchorPt(srcBounds, width, height, anchor)
- r := image.Rect(0, 0, width, height).Add(pt)
- b := srcBounds.Intersect(r)
- return Crop(img, b)
-}
-
-// CropCenter cuts out a rectangular region with the specified size
-// from the center of the image and returns the cropped image.
-func CropCenter(img image.Image, width, height int) *image.NRGBA {
- return CropAnchor(img, width, height, Center)
-}
-
-// Paste pastes the img image to the background image at the specified position and returns the combined image.
-func Paste(background, img image.Image, pos image.Point) *image.NRGBA {
- dst := Clone(background)
- pos = pos.Sub(background.Bounds().Min)
- pasteRect := image.Rectangle{Min: pos, Max: pos.Add(img.Bounds().Size())}
- interRect := pasteRect.Intersect(dst.Bounds())
- if interRect.Empty() {
- return dst
- }
- src := newScanner(img)
- parallel(interRect.Min.Y, interRect.Max.Y, func(ys <-chan int) {
- for y := range ys {
- x1 := interRect.Min.X - pasteRect.Min.X
- x2 := interRect.Max.X - pasteRect.Min.X
- y1 := y - pasteRect.Min.Y
- y2 := y1 + 1
- i1 := y*dst.Stride + interRect.Min.X*4
- i2 := i1 + interRect.Dx()*4
- src.scan(x1, y1, x2, y2, dst.Pix[i1:i2])
- }
- })
- return dst
-}
-
-// PasteCenter pastes the img image to the center of the background image and returns the combined image.
-func PasteCenter(background, img image.Image) *image.NRGBA {
- bgBounds := background.Bounds()
- bgW := bgBounds.Dx()
- bgH := bgBounds.Dy()
- bgMinX := bgBounds.Min.X
- bgMinY := bgBounds.Min.Y
-
- centerX := bgMinX + bgW/2
- centerY := bgMinY + bgH/2
-
- x0 := centerX - img.Bounds().Dx()/2
- y0 := centerY - img.Bounds().Dy()/2
-
- return Paste(background, img, image.Pt(x0, y0))
-}
-
-// Overlay draws the img image over the background image at given position
-// and returns the combined image. Opacity parameter is the opacity of the img
-// image layer, used to compose the images, it must be from 0.0 to 1.0.
-//
-// Examples:
-//
-// // Draw spriteImage over backgroundImage at the given position (x=50, y=50).
-// dstImage := imaging.Overlay(backgroundImage, spriteImage, image.Pt(50, 50), 1.0)
-//
-// // Blend two opaque images of the same size.
-// dstImage := imaging.Overlay(imageOne, imageTwo, image.Pt(0, 0), 0.5)
-//
-func Overlay(background, img image.Image, pos image.Point, opacity float64) *image.NRGBA {
- opacity = math.Min(math.Max(opacity, 0.0), 1.0) // Ensure 0.0 <= opacity <= 1.0.
- dst := Clone(background)
- pos = pos.Sub(background.Bounds().Min)
- pasteRect := image.Rectangle{Min: pos, Max: pos.Add(img.Bounds().Size())}
- interRect := pasteRect.Intersect(dst.Bounds())
- if interRect.Empty() {
- return dst
- }
- src := newScanner(img)
- parallel(interRect.Min.Y, interRect.Max.Y, func(ys <-chan int) {
- scanLine := make([]uint8, interRect.Dx()*4)
- for y := range ys {
- x1 := interRect.Min.X - pasteRect.Min.X
- x2 := interRect.Max.X - pasteRect.Min.X
- y1 := y - pasteRect.Min.Y
- y2 := y1 + 1
- src.scan(x1, y1, x2, y2, scanLine)
- i := y*dst.Stride + interRect.Min.X*4
- j := 0
- for x := interRect.Min.X; x < interRect.Max.X; x++ {
- d := dst.Pix[i : i+4 : i+4]
- r1 := float64(d[0])
- g1 := float64(d[1])
- b1 := float64(d[2])
- a1 := float64(d[3])
-
- s := scanLine[j : j+4 : j+4]
- r2 := float64(s[0])
- g2 := float64(s[1])
- b2 := float64(s[2])
- a2 := float64(s[3])
-
- coef2 := opacity * a2 / 255
- coef1 := (1 - coef2) * a1 / 255
- coefSum := coef1 + coef2
- coef1 /= coefSum
- coef2 /= coefSum
-
- d[0] = uint8(r1*coef1 + r2*coef2)
- d[1] = uint8(g1*coef1 + g2*coef2)
- d[2] = uint8(b1*coef1 + b2*coef2)
- d[3] = uint8(math.Min(a1+a2*opacity*(255-a1)/255, 255))
-
- i += 4
- j += 4
- }
- }
- })
- return dst
-}
-
-// OverlayCenter overlays the img image to the center of the background image and
-// returns the combined image. Opacity parameter is the opacity of the img
-// image layer, used to compose the images, it must be from 0.0 to 1.0.
-func OverlayCenter(background, img image.Image, opacity float64) *image.NRGBA {
- bgBounds := background.Bounds()
- bgW := bgBounds.Dx()
- bgH := bgBounds.Dy()
- bgMinX := bgBounds.Min.X
- bgMinY := bgBounds.Min.Y
-
- centerX := bgMinX + bgW/2
- centerY := bgMinY + bgH/2
-
- x0 := centerX - img.Bounds().Dx()/2
- y0 := centerY - img.Bounds().Dy()/2
-
- return Overlay(background, img, image.Point{x0, y0}, opacity)
-}
diff --git a/vendor/github.com/disintegration/imaging/transform.go b/vendor/github.com/disintegration/imaging/transform.go
deleted file mode 100644
index fe4a92f9d4d..00000000000
--- a/vendor/github.com/disintegration/imaging/transform.go
+++ /dev/null
@@ -1,268 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "math"
-)
-
-// FlipH flips the image horizontally (from left to right) and returns the transformed image.
-func FlipH(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.w
- dstH := src.h
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcY := dstY
- src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
- reverse(dst.Pix[i : i+rowSize])
- }
- })
- return dst
-}
-
-// FlipV flips the image vertically (from top to bottom) and returns the transformed image.
-func FlipV(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.w
- dstH := src.h
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcY := dstH - dstY - 1
- src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
- }
- })
- return dst
-}
-
-// Transpose flips the image horizontally and rotates 90 degrees counter-clockwise.
-func Transpose(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.h
- dstH := src.w
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcX := dstY
- src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
- }
- })
- return dst
-}
-
-// Transverse flips the image vertically and rotates 90 degrees counter-clockwise.
-func Transverse(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.h
- dstH := src.w
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcX := dstH - dstY - 1
- src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
- reverse(dst.Pix[i : i+rowSize])
- }
- })
- return dst
-}
-
-// Rotate90 rotates the image 90 degrees counter-clockwise and returns the transformed image.
-func Rotate90(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.h
- dstH := src.w
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcX := dstH - dstY - 1
- src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
- }
- })
- return dst
-}
-
-// Rotate180 rotates the image 180 degrees counter-clockwise and returns the transformed image.
-func Rotate180(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.w
- dstH := src.h
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcY := dstH - dstY - 1
- src.scan(0, srcY, src.w, srcY+1, dst.Pix[i:i+rowSize])
- reverse(dst.Pix[i : i+rowSize])
- }
- })
- return dst
-}
-
-// Rotate270 rotates the image 270 degrees counter-clockwise and returns the transformed image.
-func Rotate270(img image.Image) *image.NRGBA {
- src := newScanner(img)
- dstW := src.h
- dstH := src.w
- rowSize := dstW * 4
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- i := dstY * dst.Stride
- srcX := dstY
- src.scan(srcX, 0, srcX+1, src.h, dst.Pix[i:i+rowSize])
- reverse(dst.Pix[i : i+rowSize])
- }
- })
- return dst
-}
-
-// Rotate rotates an image by the given angle counter-clockwise .
-// The angle parameter is the rotation angle in degrees.
-// The bgColor parameter specifies the color of the uncovered zone after the rotation.
-func Rotate(img image.Image, angle float64, bgColor color.Color) *image.NRGBA {
- angle = angle - math.Floor(angle/360)*360
-
- switch angle {
- case 0:
- return Clone(img)
- case 90:
- return Rotate90(img)
- case 180:
- return Rotate180(img)
- case 270:
- return Rotate270(img)
- }
-
- src := toNRGBA(img)
- srcW := src.Bounds().Max.X
- srcH := src.Bounds().Max.Y
- dstW, dstH := rotatedSize(srcW, srcH, angle)
- dst := image.NewNRGBA(image.Rect(0, 0, dstW, dstH))
-
- if dstW <= 0 || dstH <= 0 {
- return dst
- }
-
- srcXOff := float64(srcW)/2 - 0.5
- srcYOff := float64(srcH)/2 - 0.5
- dstXOff := float64(dstW)/2 - 0.5
- dstYOff := float64(dstH)/2 - 0.5
-
- bgColorNRGBA := color.NRGBAModel.Convert(bgColor).(color.NRGBA)
- sin, cos := math.Sincos(math.Pi * angle / 180)
-
- parallel(0, dstH, func(ys <-chan int) {
- for dstY := range ys {
- for dstX := 0; dstX < dstW; dstX++ {
- xf, yf := rotatePoint(float64(dstX)-dstXOff, float64(dstY)-dstYOff, sin, cos)
- xf, yf = xf+srcXOff, yf+srcYOff
- interpolatePoint(dst, dstX, dstY, src, xf, yf, bgColorNRGBA)
- }
- }
- })
-
- return dst
-}
-
-func rotatePoint(x, y, sin, cos float64) (float64, float64) {
- return x*cos - y*sin, x*sin + y*cos
-}
-
-func rotatedSize(w, h int, angle float64) (int, int) {
- if w <= 0 || h <= 0 {
- return 0, 0
- }
-
- sin, cos := math.Sincos(math.Pi * angle / 180)
- x1, y1 := rotatePoint(float64(w-1), 0, sin, cos)
- x2, y2 := rotatePoint(float64(w-1), float64(h-1), sin, cos)
- x3, y3 := rotatePoint(0, float64(h-1), sin, cos)
-
- minx := math.Min(x1, math.Min(x2, math.Min(x3, 0)))
- maxx := math.Max(x1, math.Max(x2, math.Max(x3, 0)))
- miny := math.Min(y1, math.Min(y2, math.Min(y3, 0)))
- maxy := math.Max(y1, math.Max(y2, math.Max(y3, 0)))
-
- neww := maxx - minx + 1
- if neww-math.Floor(neww) > 0.1 {
- neww++
- }
- newh := maxy - miny + 1
- if newh-math.Floor(newh) > 0.1 {
- newh++
- }
-
- return int(neww), int(newh)
-}
-
-func interpolatePoint(dst *image.NRGBA, dstX, dstY int, src *image.NRGBA, xf, yf float64, bgColor color.NRGBA) {
- j := dstY*dst.Stride + dstX*4
- d := dst.Pix[j : j+4 : j+4]
-
- x0 := int(math.Floor(xf))
- y0 := int(math.Floor(yf))
- bounds := src.Bounds()
- if !image.Pt(x0, y0).In(image.Rect(bounds.Min.X-1, bounds.Min.Y-1, bounds.Max.X, bounds.Max.Y)) {
- d[0] = bgColor.R
- d[1] = bgColor.G
- d[2] = bgColor.B
- d[3] = bgColor.A
- return
- }
-
- xq := xf - float64(x0)
- yq := yf - float64(y0)
- points := [4]image.Point{
- {x0, y0},
- {x0 + 1, y0},
- {x0, y0 + 1},
- {x0 + 1, y0 + 1},
- }
- weights := [4]float64{
- (1 - xq) * (1 - yq),
- xq * (1 - yq),
- (1 - xq) * yq,
- xq * yq,
- }
-
- var r, g, b, a float64
- for i := 0; i < 4; i++ {
- p := points[i]
- w := weights[i]
- if p.In(bounds) {
- i := p.Y*src.Stride + p.X*4
- s := src.Pix[i : i+4 : i+4]
- wa := float64(s[3]) * w
- r += float64(s[0]) * wa
- g += float64(s[1]) * wa
- b += float64(s[2]) * wa
- a += wa
- } else {
- wa := float64(bgColor.A) * w
- r += float64(bgColor.R) * wa
- g += float64(bgColor.G) * wa
- b += float64(bgColor.B) * wa
- a += wa
- }
- }
- if a != 0 {
- aInv := 1 / a
- d[0] = clamp(r * aInv)
- d[1] = clamp(g * aInv)
- d[2] = clamp(b * aInv)
- d[3] = clamp(a)
- }
-}
diff --git a/vendor/github.com/disintegration/imaging/utils.go b/vendor/github.com/disintegration/imaging/utils.go
deleted file mode 100644
index 6c7af1a5188..00000000000
--- a/vendor/github.com/disintegration/imaging/utils.go
+++ /dev/null
@@ -1,167 +0,0 @@
-package imaging
-
-import (
- "image"
- "math"
- "runtime"
- "sync"
-)
-
-// parallel processes the data in separate goroutines.
-func parallel(start, stop int, fn func(<-chan int)) {
- count := stop - start
- if count < 1 {
- return
- }
-
- procs := runtime.GOMAXPROCS(0)
- if procs > count {
- procs = count
- }
-
- c := make(chan int, count)
- for i := start; i < stop; i++ {
- c <- i
- }
- close(c)
-
- var wg sync.WaitGroup
- for i := 0; i < procs; i++ {
- wg.Add(1)
- go func() {
- defer wg.Done()
- fn(c)
- }()
- }
- wg.Wait()
-}
-
-// absint returns the absolute value of i.
-func absint(i int) int {
- if i < 0 {
- return -i
- }
- return i
-}
-
-// clamp rounds and clamps float64 value to fit into uint8.
-func clamp(x float64) uint8 {
- v := int64(x + 0.5)
- if v > 255 {
- return 255
- }
- if v > 0 {
- return uint8(v)
- }
- return 0
-}
-
-func reverse(pix []uint8) {
- if len(pix) <= 4 {
- return
- }
- i := 0
- j := len(pix) - 4
- for i < j {
- pi := pix[i : i+4 : i+4]
- pj := pix[j : j+4 : j+4]
- pi[0], pj[0] = pj[0], pi[0]
- pi[1], pj[1] = pj[1], pi[1]
- pi[2], pj[2] = pj[2], pi[2]
- pi[3], pj[3] = pj[3], pi[3]
- i += 4
- j -= 4
- }
-}
-
-func toNRGBA(img image.Image) *image.NRGBA {
- if img, ok := img.(*image.NRGBA); ok {
- return &image.NRGBA{
- Pix: img.Pix,
- Stride: img.Stride,
- Rect: img.Rect.Sub(img.Rect.Min),
- }
- }
- return Clone(img)
-}
-
-// rgbToHSL converts a color from RGB to HSL.
-func rgbToHSL(r, g, b uint8) (float64, float64, float64) {
- rr := float64(r) / 255
- gg := float64(g) / 255
- bb := float64(b) / 255
-
- max := math.Max(rr, math.Max(gg, bb))
- min := math.Min(rr, math.Min(gg, bb))
-
- l := (max + min) / 2
-
- if max == min {
- return 0, 0, l
- }
-
- var h, s float64
- d := max - min
- if l > 0.5 {
- s = d / (2 - max - min)
- } else {
- s = d / (max + min)
- }
-
- switch max {
- case rr:
- h = (gg - bb) / d
- if g < b {
- h += 6
- }
- case gg:
- h = (bb-rr)/d + 2
- case bb:
- h = (rr-gg)/d + 4
- }
- h /= 6
-
- return h, s, l
-}
-
-// hslToRGB converts a color from HSL to RGB.
-func hslToRGB(h, s, l float64) (uint8, uint8, uint8) {
- var r, g, b float64
- if s == 0 {
- v := clamp(l * 255)
- return v, v, v
- }
-
- var q float64
- if l < 0.5 {
- q = l * (1 + s)
- } else {
- q = l + s - l*s
- }
- p := 2*l - q
-
- r = hueToRGB(p, q, h+1/3.0)
- g = hueToRGB(p, q, h)
- b = hueToRGB(p, q, h-1/3.0)
-
- return clamp(r * 255), clamp(g * 255), clamp(b * 255)
-}
-
-func hueToRGB(p, q, t float64) float64 {
- if t < 0 {
- t++
- }
- if t > 1 {
- t--
- }
- if t < 1/6.0 {
- return p + (q-p)*6*t
- }
- if t < 1/2.0 {
- return q
- }
- if t < 2/3.0 {
- return p + (q-p)*(2/3.0-t)*6
- }
- return p
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/.gitignore b/vendor/github.com/doug-martin/goqu/v9/.gitignore
deleted file mode 100644
index d884bf35249..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.idea
-src
-*.iml
-coverage.*
\ No newline at end of file
diff --git a/vendor/github.com/doug-martin/goqu/v9/.golangci.yml b/vendor/github.com/doug-martin/goqu/v9/.golangci.yml
deleted file mode 100644
index 01a93ea366a..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/.golangci.yml
+++ /dev/null
@@ -1,140 +0,0 @@
-linters-settings:
- funlen:
- lines: 140
- statements: 50
- gci:
- local-prefixes: github.com/golangci/golangci-lint
- goconst:
- min-len: 2
- min-occurrences: 2
- gocritic:
- enabled-tags:
- - diagnostic
- - experimental
- - opinionated
- - performance
- - style
- disabled-checks:
- - dupImport # https://github.com/go-critic/go-critic/issues/845
- - ifElseChain
- - octalLiteral
- - whyNoLint
- - wrapperFunc
- - sqlQuery # used by tests
- gocyclo:
- min-complexity: 20
- goimports:
- local-prefixes: github.com/golangci/golangci-lint
- golint:
- min-confidence: 0
- gomnd:
- settings:
- mnd:
- # don't include the "operation" and "assign"
- checks: argument,case,condition,return
- govet:
- check-shadowing: true
- settings:
- printf:
- funcs:
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
- lll:
- line-length: 140
- maligned:
- suggest-new: true
- misspell:
- locale: US
- nolintlint:
- allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
- allow-unused: false # report any unused nolint directives
- require-explanation: false # don't require an explanation for nolint directives
- require-specific: false # don't require nolint directives to be specific about which linter is being skipped
- exhaustive:
- default-signifies-exhaustive: true
-
-linters:
- # please, do not use `enable-all`: it's deprecated and will be removed soon.
- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
- disable-all: true
- enable:
- - asciicheck
- - bodyclose
- - deadcode
- - depguard
- - dogsled
- - errcheck
- - exportloopref
- - exhaustive
- - errcheck
- - errorlint
- - funlen
- - forbidigo
- - forcetypeassert
- - goconst
- - gocritic
- - gocyclo
- - gofmt
- - goimports
- - golint
- - gomnd
- - goprintffuncname
- - gosec
- - gosimple
- - govet
- - ifshort
- - ineffassign
- - lll
- - makezero
- - misspell
- - nakedret
- - nilerr
- - noctx
- - nolintlint
- - prealloc
- - predeclared
- - rowserrcheck
- - staticcheck
- - structcheck
- - stylecheck
- - testpackage
- - typecheck
- - unconvert
- - unparam
- - unused
- - varcheck
- - whitespace
-
- # don't enable:
- # - gochecknoglobals
- # - gocognit
- # - godot
- # - godox
- # - goerr113
- # - interfacer
- # - maligned
- # - nestif
- # - revive
- # - wsl
- # - wrapcheck
-
-issues:
- # Excluding configuration per-path, per-linter, per-text and per-source
- exclude-rules:
- - path: _test\.go
- linters:
- - gomnd
-
- # https://github.com/go-critic/go-critic/issues/926
- - linters:
- - gocritic
- text: "unnecessaryDefer:"
-
-run:
- skip-dirs:
- - test/testdata_etc
- - internal/cache
- - internal/renameio
- - internal/robustio
\ No newline at end of file
diff --git a/vendor/github.com/doug-martin/goqu/v9/CODE_OF_CONDUCT.md b/vendor/github.com/doug-martin/goqu/v9/CODE_OF_CONDUCT.md
deleted file mode 100644
index fbab7764de1..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at doug@dougamartin.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/doug-martin/goqu/v9/CONTRIBUTING.md b/vendor/github.com/doug-martin/goqu/v9/CONTRIBUTING.md
deleted file mode 100644
index 659e0f27d36..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-## Contributions
-
-I am always welcoming contributions of any type. Please open an issue or create a PR if you find an issue with any of the following.
-
-* An issue with Documentation
-* You found the documentation lacking in some way
-
-If you have an issue with the package please include the following
-
-* The dialect you are using
-* A description of the problem
-* A short example of how to reproduce (if applicable)
-
-Without those basics it can be difficult to reproduce your issue locally. You may be asked for more information but that is a good starting point.
-
-### New Features
-
-New features and/or enhancements are great and I encourage you to either submit a PR or create an issue. In both cases include the following as the need/requirement may not be readily apparent.
-
-1. The use case
-2. A short example
-
-If you are issuing a PR also also include the following
-
-1. Tests - otherwise the PR will not be merged
-2. Documentation - otherwise the PR will not be merged
-3. Examples - [If applicable] see example_test.go for examples
-
-If you find an issue you want to work on please comment on it letting other people know you are looking at it and I will assign the issue to you.
-
-If want to work on an issue but dont know where to start just leave a comment and I'll be more than happy to point you in the right direction.
diff --git a/vendor/github.com/doug-martin/goqu/v9/HISTORY.md b/vendor/github.com/doug-martin/goqu/v9/HISTORY.md
deleted file mode 100644
index 04e0ce16960..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/HISTORY.md
+++ /dev/null
@@ -1,404 +0,0 @@
-# v9.18.0
-* [FEATURE] Add support for aliasing insert datasets to support upsert alias [#306](https://github.com/doug-martin/goqu/pull/306) - [@XIELongDragon](https://github.com/XIELongDragon)
-* [FEATURE] Add support for aliasing BooleanExpressions [#307](https://github.com/doug-martin/goqu/pull/307) - [@XIELongDragon](https://github.com/XIELongDragon)
-
-# v9.17.0
-* [FEATURE] Add support bitwise operations [#303](https://github.com/doug-martin/goqu/pull/303) - [@XIELongDragon](https://github.com/XIELongDragon)
-* [FEATURE] Add support for specifying tables to be locked in ForUpdate, ForNoKeyUpdate, ForKeyShare, ForShare [#299](https://github.com/doug-martin/goqu/pull/299) - [@jbub](https://github.com/jbub)
-
-# v9.16.0
-* [FEATURE] Allow ordering by case expression [#282](https://github.com/doug-martin/goqu/issues/282), [#292](https://github.com/doug-martin/goqu/pull/292)
-
-# v9.15.1
-* [FIX] Field indexes in the columnMap getting overridden [290](https://github.com/doug-martin/goqu/issues/290), [#291](https://github.com/doug-martin/goqu/pull/291)
-
-# v9.15.0
-* [FEATURE] Add SetDefaultPrepared which controls query value interpolation [#288](https://github.com/doug-martin/goqu/pull/288) - [@Deiz](https://github.com/Deiz)
-
-# v9.14.0
-* [FEATURE] GroupByAppend to the SelectDataset and SelectClauses [#276](https://github.com/doug-martin/goqu/pull/276), [#287](https://github.com/doug-martin/goqu/pull/287) - [@ashishkf](https://github.com/ashishkf)
-* [FEATURE] Allow untagged fields to be ignored [#285](https://github.com/doug-martin/goqu/pull/285) - [@Deiz](https://github.com/Deiz)
-* [FIX] Nil valuer [#277](https://github.com/doug-martin/goqu/pull/277) - [@benzolium](https://github.com/benzolium), [@Diggs](https://github.com/Diggs)
-* [FIX] Fix old import URL in doc comments [#286](https://github.com/doug-martin/goqu/pull/286) - [@maito1201](https://github.com/maito1201)
-
-# v9.13.0
-
-* [ADDED] ScanStructs, ScanVals to Scanner interface [#273](https://github.com/doug-martin/goqu/issues/273) - [@vlanse](https://github.com/vlanse)
-
-# v9.12.0
-
-* Update golangci-lint and updates for all associated linters
-* Update dependencies
- * github.com/DATA-DOG/go-sqlmock v1.3.3 -> v1.5.0
- * github.com/denisenkom/go-mssqldb v0.0.0-20200206145737-bbfc9a55622e -> v0.10.0
- * github.com/go-sql-driver/mysql v1.4.1 -> v1.6.0
- * github.com/lib/pq v1.2.0 -> v1.10.1
- * github.com/mattn/go-sqlite3 v1.11.0 -> v1.14.7
- * github.com/stretchr/testify -> v1.4.0 -> v1.7.0
-
-
-# v9.11.1
-
-* [FIXED] Avoid mutation of join slice for separate datasets when joins slice capacity is not yet reached [#261](https://github.com/doug-martin/goqu/pull/261) - [@fhaifler](https://github.com/fhaifler)
-
-# v9.11.0
-
-* [FIXED] Use valid 'IS' operator for sqlserver dialect [#240](https://github.com/doug-martin/goqu/pull/240), [#239](https://github.com/doug-martin/goqu/pull/229) - [@vlanse](https://github.com/vlanse)
-* [ADDED] Implement Orderable interface for SQL Functions [#251](https://github.com/doug-martin/goqu/pull/251) - [@GlebBeloded](https://github.com/GlebBeloded)
-* [ADDED] Support for table hint in multi-table MySQL DELETE queries [#252](https://github.com/doug-martin/goqu/pull/252) - [@vlanse](https://github.com/vlanse)
-
-# v9.10.0
-
-* [FIXED] SELECT inherits dialect from INSERT in INSERT FROM SELECT. [#229](https://github.com/doug-martin/goqu/pull/229), [#223](https://github.com/doug-martin/goqu/issues/223) - [@vlanse](https://github.com/vlanse)
-* [FIXED] SQLServer dialect: support prepared statements with TOP. [#230](https://github.com/doug-martin/goqu/pull/230), [#225](https://github.com/doug-martin/goqu/issues/225) - [@vlanse](https://github.com/vlanse)
-* [ADDED] IsPrepared to SQLExpression interface. [#231](https://github.com/doug-martin/goqu/pull/231) - [@vlanse](https://github.com/vlanse)
-
-# v9.9.0
-
-* [FIXED] SQLite do not add FOR UPDATE in SELECT. [#218](https://github.com/doug-martin/goqu/pull/218) - [@vlanse](https://github.com/vlanse)
-* [ADDED] Support for INSERT ON CONFLICT in SQLite. [#218](https://github.com/doug-martin/goqu/pull/218) - [@vlanse](https://github.com/vlanse)
-
-# v9.8.0
-
-* [ADDED] Support for ANY and ALL operators. [#196](https://github.com/doug-martin/goqu/issues/196)
-* [ADDED] Support for CASE statements [#193](https://github.com/doug-martin/goqu/issues/193)
-* [ADDED] Support for getting column identifiers from AliasExpressions. [#203](https://github.com/doug-martin/goqu/issues/203)
-
-# v9.7.1
-
-* Fix all formatting for golangci-lint
-* Move to golangci-lint github action
-
-# v9.7.0
-
-* [ADDED] Support for sqlserver dialect [#197](https://github.com/doug-martin/goqu/issues/197),[#205](https://github.com/doug-martin/goqu/issues/205) - [@vlanse](https://github.com/vlanse)
-
-# v9.6.0
-
-* [ADDED] Support for Lateral queries [#182](https://github.com/doug-martin/goqu/issues/182)
-
-# v9.5.1
-
-* [FIXED] WITH clause without a RETURNING clause will panic [#177](https://github.com/doug-martin/goqu/issues/177)
-* [FIXED] SQlite dialect escapes single quotes wrong, leads to SQL syntax error [#178](https://github.com/doug-martin/goqu/issues/178)
-* [FIXED] Fix ReturnsColumns() nil pointer panic [#181](https://github.com/doug-martin/goqu/issues/181) - [@yeaha](https://github.com/yeaha)
-* [FIXED] SelectDataset From with Error [#183](https://github.com/doug-martin/goqu/issues/183)
-* [FIXED] Unable to execute union with order by expression [#185](https://github.com/doug-martin/goqu/issues/185)
-
-# v9.5.0
-
-* [ADDED] Ability to use regexp like, ilike, notlike, and notilike without a regexp [#172](https://github.com/doug-martin/goqu/issues/172)
-
-# v9.4.0
-
-* [ADDED] Ability to scan into struct fields from multiple tables [#160](https://github.com/doug-martin/goqu/issues/160)
-
-# v9.3.0
-
-* [ADDED] Using Update, Insert, or Delete datasets in sub selects and CTEs [#164](https://github.com/doug-martin/goqu/issues/164)
-
-# v9.2.0
-
-* [ADDED] exec.Scanner: New exposed scanner supports iterative scanning [#157](https://github.com/doug-martin/goqu/pull/157) - [@akarl](https://github.com/akarl)
-
-# v9.1.0
-
-* [FIXED] ExampleDoUpdate does't work in postgres [#156](https://github.com/doug-martin/goqu/issues/156)
-* [FIXED] Issue with timezone being lost [#163](https://github.com/doug-martin/goqu/issues/163)
-
-# v9.0.1
-
-* [FIXED] Issue where `NULL`, `TRUE` and `FALSE` are interpolated when using an `IS` clause. [#165](https://github.com/doug-martin/goqu/issues/165)
-
-# v9.0.0
-
-* Changed `NULL`, `TRUE`, `FALSE` to not be interpolated when creating prepared statements. [#132](https://github.com/doug-martin/goqu/pull/132), [#158](https://github.com/doug-martin/goqu/pull/158) - [@marshallmcmullen](https://github.com/marshallmcmullen)
-* Updated dependencies
- * `github.com/lib/pq v1.1.1 -> v1.2.0`
- * `github.com/mattn/go-sqlite3 v1.10.0 -> v1.11.0`
- * `github.com/stretchr/testify v1.3.0 -> v1.4.0`
-
-## v8.6.0
-
-* [ADDED] `SetError()` and `Error()` to all datasets. [#152](https://github.com/doug-martin/goqu/pull/152) and [#150](https://github.com/doug-martin/goqu/pull/150) - [@marshallmcmullen](https://github.com/marshallmcmullen)
-
-## v8.5.0
-
-* [ADDED] Window Function support [#128](https://github.com/doug-martin/goqu/issues/128) - [@Xuyuanp](https://github.com/Xuyuanp)
-
-## v8.4.1
-
-* [FIXED] Returning func be able to handle nil [#140](https://github.com/doug-martin/goqu/issues/140)
-
-## v8.4.0
-
-* Created new `sqlgen` module to encapsulate sql generation
- * Broke SQLDialect inti new SQL generators for each statement type.
-* Test refactor
- * Moved to a test case pattern to allow for quickly adding new test cases.
-
-## v8.3.2
-
-* [FIXED] Data race during query factory initialization [#133](https://github.com/doug-martin/goqu/issues/133) and [#136](https://github.com/doug-martin/goqu/issues/136) - [@o1egl](https://github.com/o1egl)
-
-## v8.3.1
-
-* [FIXED] InsertDataset.WithDialect return old dataset [#126](https://github.com/doug-martin/goqu/issues/126) - [@chen56](https://github.com/chen56)
-* Test clean up and more testing pattern consistency
- * Changed to use assertion methods off of suite
- * Updated Equals assertions to have expected output first
-* Increase overall test coverage.
-
-## v8.3.0
-
-* [Added] Support for `DISTINCT ON` clauses [#119](https://github.com/doug-martin/goqu/issues/119)
-
-## v8.2.2
-
-* [FIX] Scanner errors on pointers to primitive values [#122](https://github.com/doug-martin/goqu/issues/122)
-
-## v8.2.1
-
-* [FIX] Return an error when an empty identifier is encountered [#115](https://github.com/doug-martin/goqu/issues/115)
-
-## v8.2.0
-
-* [FIX] Fix reflection errors related to nil pointers and unexported fields [#118](https://github.com/doug-martin/goqu/issues/118)
- * Unexported fields are ignored when creating a columnMap
- * Nil embedded pointers will no longer cause a panic
- * Fields on nil embedded pointers will be ignored when creating update or insert statements.
-* [ADDED] You can now ingore embedded structs and their fields by using `db:"-"` tag on the embedded struct.
-
-## v8.1.0
-
-* [ADDED] Support column DEFAULT when inserting/updating via struct [#27](https://github.com/doug-martin/goqu/issues/27)
-
-## v8.0.1
-
-* [ADDED] Multi table update support for `mysql` and `postgres` [#60](https://github.com/doug-martin/goqu/issues/60)
-* [ADDED] `goqu.V` so values can be used on the LHS of expressions [#104](https://github.com/doug-martin/goqu/issues/104)
-
-## v8.0.0
-
-A major change the the API was made in `v8` to seperate concerns between the different SQL statement types.
-
-**Why the change?**
-
-1. There were feature requests that could not be cleanly implemented with everything in a single dataset.
-2. Too much functionality was encapsulated in a single datastructure.
- * It was unclear what methods could be used for each SQL statement type.
- * Changing a feature for one statement type had the possiblity of breaking another statement type.
- * Test coverage was decent but was almost solely concerned about SELECT statements, breaking them up allowed for focused testing on each statement type.
- * Most the SQL generation methods (`ToInsertSQL`, `ToUpdateSQL` etc.) took arguments which lead to an ugly API that was not uniform for each statement type, and proved to be inflexible.
-
-**What Changed**
-
-There are now five dataset types, `SelectDataset`, `InsertDataset`, `UpdateDataset`, `DeleteDataset` and `TruncateDataset`
-
-Each dataset type has its own entry point.
-
-* `goqu.From`, `Database#From`, `DialectWrapper#From` - Create SELECT
-* `goqu.Insert`, `Database#Insert`, `DialectWrapper#Insert` - Create INSERT
-* `goqu.Update`, `Database#db.Update`, `DialectWrapper#Update` - Create UPDATE
-* `goqu.Delete`, `Database#Delete`, `DialectWrapper#Delete` - Create DELETE
-* `goqu.Truncate`, `Database#Truncate`, `DialectWrapper#Truncate` - Create TRUNCATE
-
-`ToInsertSQL`, `ToUpdateSQL`, `ToDeleteSQL`, and `ToTruncateSQL` (and variations of them) methods have been removed from the `SelectDataset`. Instead use the `ToSQL` methods on each dataset type.
-
-Each dataset type will have an `Executor` and `ToSQL` method so a common interface can be created for each type.
-
-
-## v7.4.0
-
-* [FIXED] literalTime use t.UTC() , This behavior is different from the original sql.DB [#106](https://github.com/doug-martin/goqu/issues/106) - [chen56](https://github.com/chen56)
-* [ADDED] Add new method WithTx for Database [#108](https://github.com/doug-martin/goqu/issues/108) - [Xuyuanp](https://github.com/Xuyuanp)
-
-## v7.3.1
-
-* [ADDED] Exposed `goqu.NewTx` to allow creating a goqu tx directly from a `sql.Tx` instead of using `goqu.Database#Begin` [#95](https://github.com/doug-martin/goqu/issues/95)
-* [ADDED] `goqu.Database.BeginTx` [#98](https://github.com/doug-martin/goqu/issues/98)
-
-## v7.3.0
-
-* [ADDED] UPDATE and INSERT should use struct Field name if db tag is not specified [#57](https://github.com/doug-martin/goqu/issues/57)
-* [CHANGE] Changed goqu.Database to accept a SQLDatabase interface to allow using goqu.Database with other libraries such as `sqlx` [#95](https://github.com/doug-martin/goqu/issues/95)
-
-## v7.2.0
-
-* [FIXED] Sqlite3 does not accept SELECT * UNION (SELECT *) [#79](https://github.com/doug-martin/goqu/issues/79)
-* [FIXED] Where(Ex{}) causes panics [mysql] [#49](https://github.com/doug-martin/goqu/issues/49)
-* [ADDED] Support for OrderPrepend [#61](https://github.com/doug-martin/goqu/issues/61)
-* [DOCS] Added new section about loading a dialect and using it to build SQL [#44](https://github.com/doug-martin/goqu/issues/44)
-
-## v7.1.0
-
-* [FIXED] Embedded pointers with property names that duplicate parent struct properties. [#23](https://github.com/doug-martin/goqu/issues/23)
-* [FIXED] Can't scan values using []byte or []string [#90](https://github.com/doug-martin/goqu/issues/90)
- * When a slice that is `*sql.RawBytes`, `*[]byte` or `sql.Scanner` no errors will be returned.
-
-## v7.0.1
-
-* Fix issue where structs with pointer fields where not set properly [#86](https://github.com/doug-martin/goqu/pull/86) and [#89](https://github.com/doug-martin/goqu/pull/89) - [@efureev](https://github.com/efureev)
-
-## v7.0.0
-
-**Linting**
-* Add linting checks and fixed errors
- * Renamed all snake_case variables to be camelCase.
- * Fixed examples to always map to a defined method
-* Renamed `adapters` to `dialect` to more closely match their intended purpose.
-
-**API Changes**
-* Updated all sql generations methods to from `Sql` to `SQL`
- * `ToSql` -> `ToSQL`
- * `ToInsertSql` -> `ToInsertSQL`
- * `ToUpdateSql` -> `ToUpdateSQL`
- * `ToDeleteSql` -> `ToDeleteSQL`
- * `ToTruncateSql` -> `ToTruncateSQL`
-* Abstracted out `dialect_options` from the adapter to make the dialect self contained.
- * This also removed the dataset<->adapter co dependency making the dialect self contained.
-* Refactored the `goqu.I` method.
- * Added new `goqu.S`, `goqu.T` and `goqu.C` methods to clarify why type of identifier you are using.
- * `goqu.I` should only be used when you have a qualified identifier (e.g. `goqu.I("my_schema.my_table.my_col")
-* Added new `goqu.Dialect` method to make using `goqu` as an SQL builder easier.
-
-**Internal Changes**
-* Pulled expressions into their own package
- * Broke up expressions.go into multiple files to make working with and defining them easier.
- * Moved the user facing methods into the main `goqu` to keep the same API as before.
-* Added more examples
-* Moved non-user facing structs and interfaces to internal modules to clean up API.
-* Increased test coverage.
-
-
-## v6.1.0
-
-* Handle nil *time.Time Literal [#73](https://github.com/doug-martin/goqu/pull/73) and [#52](https://github.com/doug-martin/goqu/pull/52) - [@RoarkeRandall](https://github.com/RoarkeRandall) and [@quetz](https://github.com/quetz)
-* Add ability to change column rename function [#66](https://github.com/doug-martin/goqu/pull/66) - [@blainehansen](https://github.com/blainehansen)
-
-## v6.0.0
-
-* Updated go support to `1.10`, `1.11` and `1.12`
-* Change testify dependency from c2fo/testify back to stretchr/testify.
-* Add support for "FOR UPDATE" and "SKIP LOCKED" [#62](https://github.com/doug-martin/goqu/pull/62) - [@btubbs](https://github.com/btubbs)
-* Changed to use go modules
-
-## v5.0.0
-
-* Drop go 1.6 support, supported versions are `1.8`, `1.9` and latest
-* Add context support [#64](https://github.com/doug-martin/goqu/pull/64) - [@cmoad](https://github.com/cmoad)
-
-## v4.2.0
-
-* Add support for ON CONFLICT when using a dataset [#55](https://github.com/doug-martin/goqu/pull/55) - [@bobrnor](https://github.com/bobrnor)
-
-## v4.1.0
-
-* Support for defining WITH clauses for Common Table Expressions (CTE) [#39](https://github.com/doug-martin/goqu/pull/39) - [@Oscil8](https://github.com/Oscil8)
-
-## v4.0
-
-* Prepared(true) issues when using IS NULL comparisson operation [#33](https://github.com/doug-martin/goqu/pull/33) - [@danielfbm](https://github.com/danielfbm)
-
-## v3.3
-
-* Add `upsert` support via `InsertIgnore` and `InsertConflict` methods - [#25](https://github.com/doug-martin/goqu/pull/28) - [@aheuermann](https://github.com/aheuermann)
-* Adding vendor dependencies and updating tests to run in docker containers [#29](https://github.com/doug-martin/goqu/pull/29) - [@aheuermann](https://github.com/aheuermann)
-
-## v3.2
-
-* Add range clauses ([NOT] BETWEEN) support - [#25](https://github.com/doug-martin/goqu/pull/25) - [@denisvm](https://github.com/denisvm)
-* Readmefix [#26](https://github.com/doug-martin/goqu/pull/26) - [@tiagopotencia](https://github.com/tiagopotencia)
-
-## v3.1.3
-
-* Bugfix for chained Where() [#20](https://github.com/doug-martin/goqu/pull/20) - [@Emreu](https://github.com/Emreu)
-
-
-## v3.1.2
-
-* Fixing ScanStruct issue with embedded pointers in crud_exec [#20](https://github.com/doug-martin/goqu/pull/20) - [@ruzz311](https://github.com/ruzz311)
-
-## v3.1.1
-
-* Fixing race condition with struct_map_cache in crud_exec [#18](https://github.com/doug-martin/goqu/pull/18) - [@andymoon](https://github.com/andymoon), [@aheuermann](https://github.com/aheuermann)
-
-## v3.1.0
-
-* Version 3.1 [#14](https://github.com/doug-martin/goqu/pull/14) - [@andymoon](https://github.com/andymoon)
- * Fix an issue with a nil pointer access on the inserts and updates.
- * Allowing ScanStructs to take a struct with an embedded pointer to a struct.
- * Change to check if struct is Anonymous when recursing through an embedded struct.
- * Updated to use the latest version of github.com/DATA-DOG/go-sqlmock.
-
-## v3.0.1
-
-* Add literal bytes and update to c2fo testify [#15](https://github.com/doug-martin/goqu/pull/15) - [@TechnotronicOz](https://github.com/TechnotronicOz)
-
-## v3.0.0
-
-* Added support for embedded structs when inserting or updating. [#13](https://github.com/doug-martin/goqu/pull/13) - [@andymoon](https://github.com/andymoon)
-
-## v2.0.3
-
-* Fixed issue with transient columns and the auto select of columns.
-
-## v2.0.2
-
-* Changed references to "github.com/doug-martin/goqu" to "gopkg.in/doug-martin/goqu.v2"
-
-## v2.0.1
-
-* Fixed issue when `ScanStruct(s)` was used with `SelectDistinct` and caused a panic.
-
-## v2.0.0
-
-* When scanning a struct or slice of structs, the struct(s) will be parsed for the column names to select. [#9](https://github.com/doug-martin/goqu/pull/9) - [@technotronicoz](https://github.com/TechnotronicOz)
-
-## v1.0.0
-
-* You can now passed an IdentiferExpression to `As` [#8](https://github.com/doug-martin/goqu/pull/8) - [@croachrose](https://github.com/croachrose)
-* Added info about installation through [gopkg.in](http://labix.org/gopkg.in)
-
-## v0.3.1
-
-* Fixed issue setting Logger when starting a new transaction.
-
-## v0.3.0
-
-* Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)`
- * Also changed to have common return values `string, []interface{}, error)`
-* Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. [#7](https://github.com/doug-martin/goqu/issues/7)
-* Updated Docs
- * More examples
-* Increased test coverage.
-
-## v0.2.0
-
-* Changed `CrudExec` to not wrap driver errors in a GoquError [#2](https://github.com/doug-martin/goqu/issues/2)
-* Added ability to use a dataset in an `Ex` map or `Eq` expression without having to use `In` [#3](https://github.com/doug-martin/goqu/issues/3)
- * `db.From("test").Where(goqu.Ex{"a": db.From("test").Select("b")})`
-* Updated readme with links to [`DefaultAdapter`](https://godoc.org/github.com/doug-martin/goqu#DefaultAdapter)
-
-## v0.1.1
-
-* Added SQLite3 adapter [#1](https://github.com/doug-martin/goqu/pull/1) - [@mattn](https://github.com/mattn)
-
-## v0.1.0
-
-* Added:
- * [`Ex`](https://godoc.org/github.com/doug-martin/goqu#Ex)
- * [`ExOr`](https://godoc.org/github.com/doug-martin/goqu#ExOr)
- * [`Op`](https://godoc.org/github.com/doug-martin/goqu#Op)
-* More tests and examples
-* Added CONTRIBUTING.md
-* Added LICENSE information
-* Removed godoc introduction in favor of just maintaining the README.
-
-## v0.0.2
-
-* Fixed issue with goqu.New not returning a pointer to a Database
-
-## v0.0.1
-
-* Initial release
diff --git a/vendor/github.com/doug-martin/goqu/v9/LICENSE b/vendor/github.com/doug-martin/goqu/v9/LICENSE
deleted file mode 100644
index a21ac62a332..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Doug Martin
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/doug-martin/goqu/v9/Makefile b/vendor/github.com/doug-martin/goqu/v9/Makefile
deleted file mode 100644
index 38aa8958dcc..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-#phony dependency task that does nothing
-#"make executable" does not run if there is a ./executable directory, unless the task has a dependency
-phony:
-
-lint:
- docker run --rm -v ${CURDIR}:/app -w /app golangci/golangci-lint:v1.23.8 golangci-lint run -v
diff --git a/vendor/github.com/doug-martin/goqu/v9/README.md b/vendor/github.com/doug-martin/goqu/v9/README.md
deleted file mode 100644
index 1f470fdb961..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/README.md
+++ /dev/null
@@ -1,310 +0,0 @@
-```
- __ _ ___ __ _ _ _
- / _` |/ _ \ / _` | | | |
-| (_| | (_) | (_| | |_| |
- \__, |\___/ \__, |\__,_|
- |___/ |_|
-```
-[![GitHub tag](https://img.shields.io/github/tag/doug-martin/goqu.svg?style=flat)](https://github.com/doug-martin/goqu/releases)
-[![Test](https://github.com/doug-martin/goqu/workflows/Test/badge.svg?branch=master&event=push)](https://github.com/doug-martin/goqu/actions?query=workflow%3ATest+and+branch%3Amaster+)
-[![Go Reference](https://pkg.go.dev/badge/github.com/doug-martin/goqu/v9.svg)](https://pkg.go.dev/github.com/doug-martin/goqu/v9)
-[![codecov](https://codecov.io/gh/doug-martin/goqu/branch/master/graph/badge.svg)](https://codecov.io/gh/doug-martin/goqu)
-[![Go Report Card](https://goreportcard.com/badge/github.com/doug-martin/goqu/v9)](https://goreportcard.com/report/github.com/doug-martin/goqu/v9)
-
-`goqu` is an expressive SQL builder and executor
-
-If you are upgrading from an older version please read the [Migrating Between Versions](./docs/version_migration.md) docs.
-
-
-## Installation
-
-If using go modules.
-
-```sh
-go get -u github.com/doug-martin/goqu/v9
-```
-
-If you are not using go modules...
-
-**NOTE** You should still be able to use this package if you are using go version `>v1.10` but, you will need to drop the version from the package. `import "github.com/doug-martin/goqu/v9` -> `import "github.com/doug-martin/goqu"`
-
-```sh
-go get -u github.com/doug-martin/goqu
-```
-
-### [Migrating Between Versions](./docs/version_migration.md)
-
-## Features
-
-`goqu` comes with many features but here are a few of the more notable ones
-
-* Query Builder
-* Parameter interpolation (e.g `SELECT * FROM "items" WHERE "id" = ?` -> `SELECT * FROM "items" WHERE "id" = 1`)
-* Built from the ground up with multiple dialects in mind
-* Insert, Multi Insert, Update, and Delete support
-* Scanning of rows to struct[s] or primitive value[s]
-
-While goqu may support the scanning of rows into structs it is not intended to be used as an ORM if you are looking for common ORM features like associations,
-or hooks I would recommend looking at some of the great ORM libraries such as:
-
-* [gorm](https://github.com/jinzhu/gorm)
-* [hood](https://github.com/eaigner/hood)
-
-## Why?
-
-We tried a few other sql builders but each was a thin wrapper around sql fragments that we found error prone. `goqu` was built with the following goals in mind:
-
-* Make the generation of SQL easy and enjoyable
-* Create an expressive DSL that would find common errors with SQL at compile time.
-* Provide a DSL that accounts for the common SQL expressions, NOT every nuance for each database.
-* Provide developers the ability to:
- * Use SQL when desired
- * Easily scan results into primitive values and structs
- * Use the native sql.Db methods when desired
-
-## Docs
-
-* [Dialect](./docs/dialect.md) - Introduction to different dialects (`mysql`, `postgres`, `sqlite3`, `sqlserver` etc)
-* [Expressions](./docs/expressions.md) - Introduction to `goqu` expressions and common examples.
-* [Select Dataset](./docs/selecting.md) - Docs and examples about creating and executing SELECT sql statements.
-* [Insert Dataset](./docs/inserting.md) - Docs and examples about creating and executing INSERT sql statements.
-* [Update Dataset](./docs/updating.md) - Docs and examples about creating and executing UPDATE sql statements.
-* [Delete Dataset](./docs/deleting.md) - Docs and examples about creating and executing DELETE sql statements.
-* [Prepared Statements](./docs/interpolation.md) - Docs about interpolation and prepared statements in `goqu`.
-* [Database](./docs/database.md) - Docs and examples of using a Database to execute queries in `goqu`
-* [Working with time.Time](./docs/time.md) - Docs on how to use alternate time locations.
-
-## Quick Examples
-
-### Select
-
-See the [select dataset](./docs/selecting.md) docs for more in depth examples
-
-```go
-sql, _, _ := goqu.From("test").ToSQL()
-fmt.Println(sql)
-```
-
-Output:
-
-```
-SELECT * FROM "test"
-```
-
-```go
-sql, _, _ := goqu.From("test").Where(goqu.Ex{
- "d": []string{"a", "b", "c"},
-}).ToSQL()
-fmt.Println(sql)
-```
-
-Output:
-
-```
-SELECT * FROM "test" WHERE ("d" IN ('a', 'b', 'c'))
-```
-
-### Insert
-
-See the [insert dataset](./docs/inserting.md) docs for more in depth examples
-
-```go
-ds := goqu.Insert("user").
- Cols("first_name", "last_name").
- Vals(
- goqu.Vals{"Greg", "Farley"},
- goqu.Vals{"Jimmy", "Stewart"},
- goqu.Vals{"Jeff", "Jeffers"},
- )
-insertSQL, args, _ := ds.ToSQL()
-fmt.Println(insertSQL, args)
-```
-
-Output:
-```sql
-INSERT INTO "user" ("first_name", "last_name") VALUES ('Greg', 'Farley'), ('Jimmy', 'Stewart'), ('Jeff', 'Jeffers') []
-```
-
-```go
-ds := goqu.Insert("user").Rows(
- goqu.Record{"first_name": "Greg", "last_name": "Farley"},
- goqu.Record{"first_name": "Jimmy", "last_name": "Stewart"},
- goqu.Record{"first_name": "Jeff", "last_name": "Jeffers"},
-)
-insertSQL, args, _ := ds.ToSQL()
-fmt.Println(insertSQL, args)
-```
-
-Output:
-```
-INSERT INTO "user" ("first_name", "last_name") VALUES ('Greg', 'Farley'), ('Jimmy', 'Stewart'), ('Jeff', 'Jeffers') []
-```
-
-
-```go
-type User struct {
- FirstName string `db:"first_name"`
- LastName string `db:"last_name"`
-}
-ds := goqu.Insert("user").Rows(
- User{FirstName: "Greg", LastName: "Farley"},
- User{FirstName: "Jimmy", LastName: "Stewart"},
- User{FirstName: "Jeff", LastName: "Jeffers"},
-)
-insertSQL, args, _ := ds.ToSQL()
-fmt.Println(insertSQL, args)
-```
-
-Output:
-```
-INSERT INTO "user" ("first_name", "last_name") VALUES ('Greg', 'Farley'), ('Jimmy', 'Stewart'), ('Jeff', 'Jeffers') []
-```
-
-```go
-ds := goqu.Insert("user").Prepared(true).
- FromQuery(goqu.From("other_table"))
-insertSQL, args, _ := ds.ToSQL()
-fmt.Println(insertSQL, args)
-```
-
-Output:
-```
-INSERT INTO "user" SELECT * FROM "other_table" []
-```
-
-```go
-ds := goqu.Insert("user").Prepared(true).
- Cols("first_name", "last_name").
- FromQuery(goqu.From("other_table").Select("fn", "ln"))
-insertSQL, args, _ := ds.ToSQL()
-fmt.Println(insertSQL, args)
-```
-
-Output:
-```
-INSERT INTO "user" ("first_name", "last_name") SELECT "fn", "ln" FROM "other_table" []
-```
-
-### Update
-
-See the [update dataset](./docs/updating.md) docs for more in depth examples
-
-```go
-sql, args, _ := goqu.Update("items").Set(
- goqu.Record{"name": "Test", "address": "111 Test Addr"},
-).ToSQL()
-fmt.Println(sql, args)
-```
-
-Output:
-```
-UPDATE "items" SET "address"='111 Test Addr',"name"='Test' []
-```
-
-```go
-type item struct {
- Address string `db:"address"`
- Name string `db:"name" goqu:"skipupdate"`
-}
-sql, args, _ := goqu.Update("items").Set(
- item{Name: "Test", Address: "111 Test Addr"},
-).ToSQL()
-fmt.Println(sql, args)
-```
-
-Output:
-```
-UPDATE "items" SET "address"='111 Test Addr' []
-```
-
-```go
-sql, _, _ := goqu.Update("test").
- Set(goqu.Record{"foo": "bar"}).
- Where(goqu.Ex{
- "a": goqu.Op{"gt": 10}
- }).ToSQL()
-fmt.Println(sql)
-```
-
-Output:
-```
-UPDATE "test" SET "foo"='bar' WHERE ("a" > 10)
-```
-
-### Delete
-
-See the [delete dataset](./docs/deleting.md) docs for more in depth examples
-
-```go
-ds := goqu.Delete("items")
-
-sql, args, _ := ds.ToSQL()
-fmt.Println(sql, args)
-```
-
-```go
-sql, _, _ := goqu.Delete("test").Where(goqu.Ex{
- "c": nil
- }).ToSQL()
-fmt.Println(sql)
-```
-
-Output:
-```
-DELETE FROM "test" WHERE ("c" IS NULL)
-```
-
-
-## Contributions
-
-I am always welcoming contributions of any type. Please open an issue or create a PR if you find an issue with any of the following.
-
-* An issue with Documentation
-* You found the documentation lacking in some way
-
-If you have an issue with the package please include the following
-
-* The dialect you are using
-* A description of the problem
-* A short example of how to reproduce (if applicable)
-
-Without those basics it can be difficult to reproduce your issue locally. You may be asked for more information but that is a good starting point.
-
-### New Features
-
-New features and/or enhancements are great and I encourage you to either submit a PR or create an issue. In both cases include the following as the need/requirement may not be readily apparent.
-
-1. The use case
-2. A short example
-
-If you are issuing a PR also include the following
-
-1. Tests - otherwise the PR will not be merged
-2. Documentation - otherwise the PR will not be merged
-3. Examples - [If applicable] see example_test.go for examples
-
-If you find an issue you want to work on please comment on it letting other people know you are looking at it and I will assign the issue to you.
-
-If want to work on an issue but dont know where to start just leave a comment and I'll be more than happy to point you in the right direction.
-
-### Running tests
-The test suite requires a postgres, mysql and sqlserver databases. You can override the connection strings with the [`MYSQL_URI`, `PG_URI`, `SQLSERVER_URI` environment variables](https://github.com/doug-martin/goqu/blob/2fe3349/docker-compose.yml#L26)*
-
-```sh
-go test -v -race ./...
-```
-
-You can also run the tests in a container using [docker-compose](https://docs.docker.com/compose/).
-
-```sh
-MYSQL_VERSION=8 POSTGRES_VERSION=13.4 SQLSERVER_VERSION=2017-CU8-ubuntu GO_VERSION=latest docker-compose run goqu
-```
-
-## License
-
-`goqu` is released under the [MIT License](http://www.opensource.org/licenses/MIT).
-
-
-
-
-
diff --git a/vendor/github.com/doug-martin/goqu/v9/_config.yml b/vendor/github.com/doug-martin/goqu/v9/_config.yml
deleted file mode 100644
index c4192631f25..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/_config.yml
+++ /dev/null
@@ -1 +0,0 @@
-theme: jekyll-theme-cayman
\ No newline at end of file
diff --git a/vendor/github.com/doug-martin/goqu/v9/codecov.yml b/vendor/github.com/doug-martin/goqu/v9/codecov.yml
deleted file mode 100644
index a3d9cd50b8d..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/codecov.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-ignore:
- - "**/mocks/**" # glob accepted
- - "mocks/**" # glob accepted
\ No newline at end of file
diff --git a/vendor/github.com/doug-martin/goqu/v9/database.go b/vendor/github.com/doug-martin/goqu/v9/database.go
deleted file mode 100644
index 3dce8d5c78b..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/database.go
+++ /dev/null
@@ -1,648 +0,0 @@
-package goqu
-
-import (
- "context"
- "database/sql"
- "sync"
-
- "github.com/doug-martin/goqu/v9/exec"
-)
-
-type (
- Logger interface {
- Printf(format string, v ...interface{})
- }
- // Interface for sql.DB, an interface is used so you can use with other
- // libraries such as sqlx instead of the native sql.DB
- SQLDatabase interface {
- Begin() (*sql.Tx, error)
- BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- }
- // This struct is the wrapper for a Db. The struct delegates most calls to either an Exec instance or to the Db
- // passed into the constructor.
- Database struct {
- logger Logger
- dialect string
- // nolint: stylecheck // keep for backwards compatibility
- Db SQLDatabase
- qf exec.QueryFactory
- qfOnce sync.Once
- }
-)
-
-// This is the common entry point into goqu.
-//
-// dialect: This is the adapter dialect, you should see your database adapter for the string to use. Built in adapters
-// can be found at https://github.com/doug-martin/goqu/tree/master/adapters
-//
-// db: A sql.Db to use for querying the database
-// import (
-// "database/sql"
-// "fmt"
-// "github.com/doug-martin/goqu/v9"
-// _ "github.com/doug-martin/goqu/v9/dialect/postgres"
-// _ "github.com/lib/pq"
-// )
-//
-// func main() {
-// sqlDb, err := sql.Open("postgres", "user=postgres dbname=goqupostgres sslmode=disable ")
-// if err != nil {
-// panic(err.Error())
-// }
-// db := goqu.New("postgres", sqlDb)
-// }
-// The most commonly used Database method is From, which creates a new Dataset that uses the correct adapter and
-// supports queries.
-// var ids []uint32
-// if err := db.From("items").Where(goqu.I("id").Gt(10)).Pluck("id", &ids); err != nil {
-// panic(err.Error())
-// }
-// fmt.Printf("%+v", ids)
-func newDatabase(dialect string, db SQLDatabase) *Database {
- return &Database{
- logger: nil,
- dialect: dialect,
- Db: db,
- qf: nil,
- qfOnce: sync.Once{},
- }
-}
-
-// returns this databases dialect
-func (d *Database) Dialect() string {
- return d.dialect
-}
-
-// Starts a new Transaction.
-func (d *Database) Begin() (*TxDatabase, error) {
- sqlTx, err := d.Db.Begin()
- if err != nil {
- return nil, err
- }
- tx := NewTx(d.dialect, sqlTx)
- tx.Logger(d.logger)
- return tx, nil
-}
-
-// Starts a new Transaction. See sql.DB#BeginTx for option description
-func (d *Database) BeginTx(ctx context.Context, opts *sql.TxOptions) (*TxDatabase, error) {
- sqlTx, err := d.Db.BeginTx(ctx, opts)
- if err != nil {
- return nil, err
- }
- tx := NewTx(d.dialect, sqlTx)
- tx.Logger(d.logger)
- return tx, nil
-}
-
-// WithTx starts a new transaction and executes it in Wrap method
-func (d *Database) WithTx(fn func(*TxDatabase) error) error {
- tx, err := d.Begin()
- if err != nil {
- return err
- }
- return tx.Wrap(func() error { return fn(tx) })
-}
-
-// Creates a new Dataset that uses the correct adapter and supports queries.
-// var ids []uint32
-// if err := db.From("items").Where(goqu.I("id").Gt(10)).Pluck("id", &ids); err != nil {
-// panic(err.Error())
-// }
-// fmt.Printf("%+v", ids)
-//
-// from...: Sources for you dataset, could be table names (strings), a goqu.Literal or another goqu.Dataset
-func (d *Database) From(from ...interface{}) *SelectDataset {
- return newDataset(d.dialect, d.queryFactory()).From(from...)
-}
-
-func (d *Database) Select(cols ...interface{}) *SelectDataset {
- return newDataset(d.dialect, d.queryFactory()).Select(cols...)
-}
-
-func (d *Database) Update(table interface{}) *UpdateDataset {
- return newUpdateDataset(d.dialect, d.queryFactory()).Table(table)
-}
-
-func (d *Database) Insert(table interface{}) *InsertDataset {
- return newInsertDataset(d.dialect, d.queryFactory()).Into(table)
-}
-
-func (d *Database) Delete(table interface{}) *DeleteDataset {
- return newDeleteDataset(d.dialect, d.queryFactory()).From(table)
-}
-
-func (d *Database) Truncate(table ...interface{}) *TruncateDataset {
- return newTruncateDataset(d.dialect, d.queryFactory()).Table(table...)
-}
-
-// Sets the logger for to use when logging queries
-func (d *Database) Logger(logger Logger) {
- d.logger = logger
-}
-
-// Logs a given operation with the specified sql and arguments
-func (d *Database) Trace(op, sqlString string, args ...interface{}) {
- if d.logger != nil {
- if sqlString != "" {
- if len(args) != 0 {
- d.logger.Printf("[goqu] %s [query:=`%s` args:=%+v]", op, sqlString, args)
- } else {
- d.logger.Printf("[goqu] %s [query:=`%s`]", op, sqlString)
- }
- } else {
- d.logger.Printf("[goqu] %s", op)
- }
- }
-}
-
-// Uses the db to Execute the query with arguments and return the sql.Result
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) Exec(query string, args ...interface{}) (sql.Result, error) {
- return d.ExecContext(context.Background(), query, args...)
-}
-
-// Uses the db to Execute the query with arguments and return the sql.Result
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) {
- d.Trace("EXEC", query, args...)
- return d.Db.ExecContext(ctx, query, args...)
-}
-
-// Can be used to prepare a query.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, args, err := db.From("items").Where(goqu.I("id").Gt(10)).ToSQL(true)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// stmt, err := db.Prepare(sql)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer stmt.Close()
-// rows, err := stmt.Query(args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer rows.Close()
-// for rows.Next(){
-// //scan your rows
-// }
-// if rows.Err() != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-//
-// query: The SQL statement to prepare.
-func (d *Database) Prepare(query string) (*sql.Stmt, error) {
- return d.PrepareContext(context.Background(), query)
-}
-
-// Can be used to prepare a query.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, args, err := db.From("items").Where(goqu.I("id").Gt(10)).ToSQL(true)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// stmt, err := db.Prepare(sql)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer stmt.Close()
-// rows, err := stmt.QueryContext(ctx, args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer rows.Close()
-// for rows.Next(){
-// //scan your rows
-// }
-// if rows.Err() != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-//
-// query: The SQL statement to prepare.
-func (d *Database) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) {
- d.Trace("PREPARE", query)
- return d.Db.PrepareContext(ctx, query)
-}
-
-// Used to query for multiple rows.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, err := db.From("items").Where(goqu.I("id").Gt(10)).ToSQL()
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// rows, err := stmt.Query(args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer rows.Close()
-// for rows.Next(){
-// //scan your rows
-// }
-// if rows.Err() != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) Query(query string, args ...interface{}) (*sql.Rows, error) {
- return d.QueryContext(context.Background(), query, args...)
-}
-
-// Used to query for multiple rows.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, err := db.From("items").Where(goqu.I("id").Gt(10)).ToSQL()
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// rows, err := stmt.QueryContext(ctx, args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// defer rows.Close()
-// for rows.Next(){
-// //scan your rows
-// }
-// if rows.Err() != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) {
- d.Trace("QUERY", query, args...)
- return d.Db.QueryContext(ctx, query, args...)
-}
-
-// Used to query for a single row.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, err := db.From("items").Where(goqu.I("id").Gt(10)).Limit(1).ToSQL()
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// rows, err := stmt.QueryRow(args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// //scan your row
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) QueryRow(query string, args ...interface{}) *sql.Row {
- return d.QueryRowContext(context.Background(), query, args...)
-}
-
-// Used to query for a single row.
-//
-// You can use this in tandem with a dataset by doing the following.
-// sql, err := db.From("items").Where(goqu.I("id").Gt(10)).Limit(1).ToSQL()
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// rows, err := stmt.QueryRowContext(ctx, args)
-// if err != nil{
-// panic(err.Error()) //you could gracefully handle the error also
-// }
-// //scan your row
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row {
- d.Trace("QUERY ROW", query, args...)
- return d.Db.QueryRowContext(ctx, query, args...)
-}
-
-func (d *Database) queryFactory() exec.QueryFactory {
- d.qfOnce.Do(func() {
- d.qf = exec.NewQueryFactory(d)
- })
- return d.qf
-}
-
-// Queries the database using the supplied query, and args and uses CrudExec.ScanStructs to scan the results into a
-// slice of structs
-//
-// i: A pointer to a slice of structs
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanStructs(i interface{}, query string, args ...interface{}) error {
- return d.ScanStructsContext(context.Background(), i, query, args...)
-}
-
-// Queries the database using the supplied context, query, and args and uses CrudExec.ScanStructsContext to scan the
-// results into a slice of structs
-//
-// i: A pointer to a slice of structs
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanStructsContext(ctx context.Context, i interface{}, query string, args ...interface{}) error {
- return d.queryFactory().FromSQL(query, args...).ScanStructsContext(ctx, i)
-}
-
-// Queries the database using the supplied query, and args and uses CrudExec.ScanStruct to scan the results into a
-// struct
-//
-// i: A pointer to a struct
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanStruct(i interface{}, query string, args ...interface{}) (bool, error) {
- return d.ScanStructContext(context.Background(), i, query, args...)
-}
-
-// Queries the database using the supplied context, query, and args and uses CrudExec.ScanStructContext to scan the
-// results into a struct
-//
-// i: A pointer to a struct
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanStructContext(ctx context.Context, i interface{}, query string, args ...interface{}) (bool, error) {
- return d.queryFactory().FromSQL(query, args...).ScanStructContext(ctx, i)
-}
-
-// Queries the database using the supplied query, and args and uses CrudExec.ScanVals to scan the results into a slice
-// of primitive values
-//
-// i: A pointer to a slice of primitive values
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanVals(i interface{}, query string, args ...interface{}) error {
- return d.ScanValsContext(context.Background(), i, query, args...)
-}
-
-// Queries the database using the supplied context, query, and args and uses CrudExec.ScanValsContext to scan the
-// results into a slice of primitive values
-//
-// i: A pointer to a slice of primitive values
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanValsContext(ctx context.Context, i interface{}, query string, args ...interface{}) error {
- return d.queryFactory().FromSQL(query, args...).ScanValsContext(ctx, i)
-}
-
-// Queries the database using the supplied query, and args and uses CrudExec.ScanVal to scan the results into a
-// primitive value
-//
-// i: A pointer to a primitive value
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanVal(i interface{}, query string, args ...interface{}) (bool, error) {
- return d.ScanValContext(context.Background(), i, query, args...)
-}
-
-// Queries the database using the supplied context, query, and args and uses CrudExec.ScanValContext to scan the
-// results into a primitive value
-//
-// i: A pointer to a primitive value
-//
-// query: The SQL to execute
-//
-// args...: for any placeholder parameters in the query
-func (d *Database) ScanValContext(ctx context.Context, i interface{}, query string, args ...interface{}) (bool, error) {
- return d.queryFactory().FromSQL(query, args...).ScanValContext(ctx, i)
-}
-
-// A wrapper around a sql.Tx and works the same way as Database
-type (
- // Interface for sql.Tx, an interface is used so you can use with other
- // libraries such as sqlx instead of the native sql.DB
- SQLTx interface {
- ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- Commit() error
- Rollback() error
- }
- TxDatabase struct {
- logger Logger
- dialect string
- Tx SQLTx
- qf exec.QueryFactory
- qfOnce sync.Once
- }
-)
-
-// Creates a new TxDatabase
-func NewTx(dialect string, tx SQLTx) *TxDatabase {
- return &TxDatabase{dialect: dialect, Tx: tx}
-}
-
-// returns this databases dialect
-func (td *TxDatabase) Dialect() string {
- return td.dialect
-}
-
-// Creates a new Dataset for querying a Database.
-func (td *TxDatabase) From(cols ...interface{}) *SelectDataset {
- return newDataset(td.dialect, td.queryFactory()).From(cols...)
-}
-
-func (td *TxDatabase) Select(cols ...interface{}) *SelectDataset {
- return newDataset(td.dialect, td.queryFactory()).Select(cols...)
-}
-
-func (td *TxDatabase) Update(table interface{}) *UpdateDataset {
- return newUpdateDataset(td.dialect, td.queryFactory()).Table(table)
-}
-
-func (td *TxDatabase) Insert(table interface{}) *InsertDataset {
- return newInsertDataset(td.dialect, td.queryFactory()).Into(table)
-}
-
-func (td *TxDatabase) Delete(table interface{}) *DeleteDataset {
- return newDeleteDataset(td.dialect, td.queryFactory()).From(table)
-}
-
-func (td *TxDatabase) Truncate(table ...interface{}) *TruncateDataset {
- return newTruncateDataset(td.dialect, td.queryFactory()).Table(table...)
-}
-
-// Sets the logger
-func (td *TxDatabase) Logger(logger Logger) {
- td.logger = logger
-}
-
-func (td *TxDatabase) Trace(op, sqlString string, args ...interface{}) {
- if td.logger != nil {
- if sqlString != "" {
- if len(args) != 0 {
- td.logger.Printf("[goqu - transaction] %s [query:=`%s` args:=%+v] ", op, sqlString, args)
- } else {
- td.logger.Printf("[goqu - transaction] %s [query:=`%s`] ", op, sqlString)
- }
- } else {
- td.logger.Printf("[goqu - transaction] %s", op)
- }
- }
-}
-
-// See Database#Exec
-func (td *TxDatabase) Exec(query string, args ...interface{}) (sql.Result, error) {
- return td.ExecContext(context.Background(), query, args...)
-}
-
-// See Database#ExecContext
-func (td *TxDatabase) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) {
- td.Trace("EXEC", query, args...)
- return td.Tx.ExecContext(ctx, query, args...)
-}
-
-// See Database#Prepare
-func (td *TxDatabase) Prepare(query string) (*sql.Stmt, error) {
- return td.PrepareContext(context.Background(), query)
-}
-
-// See Database#PrepareContext
-func (td *TxDatabase) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) {
- td.Trace("PREPARE", query)
- return td.Tx.PrepareContext(ctx, query)
-}
-
-// See Database#Query
-func (td *TxDatabase) Query(query string, args ...interface{}) (*sql.Rows, error) {
- return td.QueryContext(context.Background(), query, args...)
-}
-
-// See Database#QueryContext
-func (td *TxDatabase) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) {
- td.Trace("QUERY", query, args...)
- return td.Tx.QueryContext(ctx, query, args...)
-}
-
-// See Database#QueryRow
-func (td *TxDatabase) QueryRow(query string, args ...interface{}) *sql.Row {
- return td.QueryRowContext(context.Background(), query, args...)
-}
-
-// See Database#QueryRowContext
-func (td *TxDatabase) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row {
- td.Trace("QUERY ROW", query, args...)
- return td.Tx.QueryRowContext(ctx, query, args...)
-}
-
-func (td *TxDatabase) queryFactory() exec.QueryFactory {
- td.qfOnce.Do(func() {
- td.qf = exec.NewQueryFactory(td)
- })
- return td.qf
-}
-
-// See Database#ScanStructs
-func (td *TxDatabase) ScanStructs(i interface{}, query string, args ...interface{}) error {
- return td.ScanStructsContext(context.Background(), i, query, args...)
-}
-
-// See Database#ScanStructsContext
-func (td *TxDatabase) ScanStructsContext(ctx context.Context, i interface{}, query string, args ...interface{}) error {
- return td.queryFactory().FromSQL(query, args...).ScanStructsContext(ctx, i)
-}
-
-// See Database#ScanStruct
-func (td *TxDatabase) ScanStruct(i interface{}, query string, args ...interface{}) (bool, error) {
- return td.ScanStructContext(context.Background(), i, query, args...)
-}
-
-// See Database#ScanStructContext
-func (td *TxDatabase) ScanStructContext(ctx context.Context, i interface{}, query string, args ...interface{}) (bool, error) {
- return td.queryFactory().FromSQL(query, args...).ScanStructContext(ctx, i)
-}
-
-// See Database#ScanVals
-func (td *TxDatabase) ScanVals(i interface{}, query string, args ...interface{}) error {
- return td.ScanValsContext(context.Background(), i, query, args...)
-}
-
-// See Database#ScanValsContext
-func (td *TxDatabase) ScanValsContext(ctx context.Context, i interface{}, query string, args ...interface{}) error {
- return td.queryFactory().FromSQL(query, args...).ScanValsContext(ctx, i)
-}
-
-// See Database#ScanVal
-func (td *TxDatabase) ScanVal(i interface{}, query string, args ...interface{}) (bool, error) {
- return td.ScanValContext(context.Background(), i, query, args...)
-}
-
-// See Database#ScanValContext
-func (td *TxDatabase) ScanValContext(ctx context.Context, i interface{}, query string, args ...interface{}) (bool, error) {
- return td.queryFactory().FromSQL(query, args...).ScanValContext(ctx, i)
-}
-
-// COMMIT the transaction
-func (td *TxDatabase) Commit() error {
- td.Trace("COMMIT", "")
- return td.Tx.Commit()
-}
-
-// ROLLBACK the transaction
-func (td *TxDatabase) Rollback() error {
- td.Trace("ROLLBACK", "")
- return td.Tx.Rollback()
-}
-
-// A helper method that will automatically COMMIT or ROLLBACK once the supplied function is done executing
-//
-// tx, err := db.Begin()
-// if err != nil{
-// panic(err.Error()) // you could gracefully handle the error also
-// }
-// if err := tx.Wrap(func() error{
-// if _, err := tx.From("test").Insert(Record{"a":1, "b": "b"}).Exec(){
-// // this error will be the return error from the Wrap call
-// return err
-// }
-// return nil
-// }); err != nil{
-// panic(err.Error()) // you could gracefully handle the error also
-// }
-func (td *TxDatabase) Wrap(fn func() error) (err error) {
- defer func() {
- if p := recover(); p != nil {
- _ = td.Rollback()
- panic(p)
- }
- if err != nil {
- if rollbackErr := td.Rollback(); rollbackErr != nil {
- err = rollbackErr
- }
- } else {
- if commitErr := td.Commit(); commitErr != nil {
- err = commitErr
- }
- }
- }()
- return fn()
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/delete_dataset.go b/vendor/github.com/doug-martin/goqu/v9/delete_dataset.go
deleted file mode 100644
index 320925a9732..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/delete_dataset.go
+++ /dev/null
@@ -1,244 +0,0 @@
-package goqu
-
-import (
- "github.com/doug-martin/goqu/v9/exec"
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-var ErrBadFromArgument = errors.New("unsupported DeleteDataset#From argument, a string or identifier expression is required")
-
-type DeleteDataset struct {
- dialect SQLDialect
- clauses exp.DeleteClauses
- isPrepared prepared
- queryFactory exec.QueryFactory
- err error
-}
-
-// used internally by database to create a database with a specific adapter
-func newDeleteDataset(d string, queryFactory exec.QueryFactory) *DeleteDataset {
- return &DeleteDataset{
- clauses: exp.NewDeleteClauses(),
- dialect: GetDialect(d),
- queryFactory: queryFactory,
- isPrepared: preparedNoPreference,
- err: nil,
- }
-}
-
-func Delete(table interface{}) *DeleteDataset {
- return newDeleteDataset("default", nil).From(table)
-}
-
-func (dd *DeleteDataset) Expression() exp.Expression {
- return dd
-}
-
-// Clones the dataset
-func (dd *DeleteDataset) Clone() exp.Expression {
- return dd.copy(dd.clauses)
-}
-
-// Set the parameter interpolation behavior. See examples
-//
-// prepared: If true the dataset WILL NOT interpolate the parameters.
-func (dd *DeleteDataset) Prepared(prepared bool) *DeleteDataset {
- ret := dd.copy(dd.clauses)
- ret.isPrepared = preparedFromBool(prepared)
- return ret
-}
-
-// Returns true if Prepared(true) has been called on this dataset
-func (dd *DeleteDataset) IsPrepared() bool {
- return dd.isPrepared.Bool()
-}
-
-// Sets the adapter used to serialize values and create the SQL statement
-func (dd *DeleteDataset) WithDialect(dl string) *DeleteDataset {
- ds := dd.copy(dd.GetClauses())
- ds.dialect = GetDialect(dl)
- return ds
-}
-
-// Returns the current SQLDialect on the dataset
-func (dd *DeleteDataset) Dialect() SQLDialect {
- return dd.dialect
-}
-
-// Set the dialect for this dataset.
-func (dd *DeleteDataset) SetDialect(dialect SQLDialect) *DeleteDataset {
- cd := dd.copy(dd.GetClauses())
- cd.dialect = dialect
- return cd
-}
-
-// Returns the current clauses on the dataset.
-func (dd *DeleteDataset) GetClauses() exp.DeleteClauses {
- return dd.clauses
-}
-
-// used interally to copy the dataset
-func (dd *DeleteDataset) copy(clauses exp.DeleteClauses) *DeleteDataset {
- return &DeleteDataset{
- dialect: dd.dialect,
- clauses: clauses,
- isPrepared: dd.isPrepared,
- queryFactory: dd.queryFactory,
- err: dd.err,
- }
-}
-
-// Creates a WITH clause for a common table expression (CTE).
-//
-// The name will be available to SELECT from in the associated query; and can optionally
-// contain a list of column names "name(col1, col2, col3)".
-//
-// The name will refer to the results of the specified subquery.
-func (dd *DeleteDataset) With(name string, subquery exp.Expression) *DeleteDataset {
- return dd.copy(dd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(false, name, subquery)))
-}
-
-// Creates a WITH RECURSIVE clause for a common table expression (CTE)
-//
-// The name will be available to SELECT from in the associated query; and must
-// contain a list of column names "name(col1, col2, col3)" for a recursive clause.
-//
-// The name will refer to the results of the specified subquery. The subquery for
-// a recursive query will always end with a UNION or UNION ALL with a clause that
-// refers to the CTE by name.
-func (dd *DeleteDataset) WithRecursive(name string, subquery exp.Expression) *DeleteDataset {
- return dd.copy(dd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(true, name, subquery)))
-}
-
-// Adds a FROM clause. This return a new dataset with the original sources replaced. See examples.
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Dataset: Will be added as a sub select. If the Dataset is not aliased it will automatically be aliased
-// LiteralExpression: (See Literal) Will use the literal SQL
-func (dd *DeleteDataset) From(table interface{}) *DeleteDataset {
- switch t := table.(type) {
- case exp.IdentifierExpression:
- return dd.copy(dd.clauses.SetFrom(t))
- case string:
- return dd.copy(dd.clauses.SetFrom(exp.ParseIdentifier(t)))
- default:
- panic(ErrBadFromArgument)
- }
-}
-
-// Adds a WHERE clause. See examples.
-func (dd *DeleteDataset) Where(expressions ...exp.Expression) *DeleteDataset {
- return dd.copy(dd.clauses.WhereAppend(expressions...))
-}
-
-// Removes the WHERE clause. See examples.
-func (dd *DeleteDataset) ClearWhere() *DeleteDataset {
- return dd.copy(dd.clauses.ClearWhere())
-}
-
-// Adds a ORDER clause. If the ORDER is currently set it replaces it. See examples.
-func (dd *DeleteDataset) Order(order ...exp.OrderedExpression) *DeleteDataset {
- return dd.copy(dd.clauses.SetOrder(order...))
-}
-
-// Adds a more columns to the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (dd *DeleteDataset) OrderAppend(order ...exp.OrderedExpression) *DeleteDataset {
- return dd.copy(dd.clauses.OrderAppend(order...))
-}
-
-// Adds a more columns to the beginning of the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (dd *DeleteDataset) OrderPrepend(order ...exp.OrderedExpression) *DeleteDataset {
- return dd.copy(dd.clauses.OrderPrepend(order...))
-}
-
-// Removes the ORDER BY clause. See examples.
-func (dd *DeleteDataset) ClearOrder() *DeleteDataset {
- return dd.copy(dd.clauses.ClearOrder())
-}
-
-// Adds a LIMIT clause. If the LIMIT is currently set it replaces it. See examples.
-func (dd *DeleteDataset) Limit(limit uint) *DeleteDataset {
- if limit > 0 {
- return dd.copy(dd.clauses.SetLimit(limit))
- }
- return dd.copy(dd.clauses.ClearLimit())
-}
-
-// Adds a LIMIT ALL clause. If the LIMIT is currently set it replaces it. See examples.
-func (dd *DeleteDataset) LimitAll() *DeleteDataset {
- return dd.copy(dd.clauses.SetLimit(L("ALL")))
-}
-
-// Removes the LIMIT clause.
-func (dd *DeleteDataset) ClearLimit() *DeleteDataset {
- return dd.copy(dd.clauses.ClearLimit())
-}
-
-// Adds a RETURNING clause to the dataset if the adapter supports it.
-func (dd *DeleteDataset) Returning(returning ...interface{}) *DeleteDataset {
- return dd.copy(dd.clauses.SetReturning(exp.NewColumnListExpression(returning...)))
-}
-
-// Get any error that has been set or nil if no error has been set.
-func (dd *DeleteDataset) Error() error {
- return dd.err
-}
-
-// Set an error on the dataset if one has not already been set. This error will be returned by a future call to Error
-// or as part of ToSQL. This can be used by end users to record errors while building up queries without having to
-// track those separately.
-func (dd *DeleteDataset) SetError(err error) *DeleteDataset {
- if dd.err == nil {
- dd.err = err
- }
-
- return dd
-}
-
-// Generates a DELETE sql statement, if Prepared has been called with true then the parameters will not be interpolated.
-// See examples.
-//
-// Errors:
-// * There is an error generating the SQL
-func (dd *DeleteDataset) ToSQL() (sql string, params []interface{}, err error) {
- return dd.deleteSQLBuilder().ToSQL()
-}
-
-// Appends this Dataset's DELETE statement to the SQLBuilder
-// This is used internally when using deletes in CTEs
-func (dd *DeleteDataset) AppendSQL(b sb.SQLBuilder) {
- if dd.err != nil {
- b.SetError(dd.err)
- return
- }
- dd.dialect.ToDeleteSQL(b, dd.GetClauses())
-}
-
-func (dd *DeleteDataset) GetAs() exp.IdentifierExpression {
- return nil
-}
-
-func (dd *DeleteDataset) ReturnsColumns() bool {
- return dd.clauses.HasReturning()
-}
-
-// Creates an QueryExecutor to execute the query.
-// db.Delete("test").Exec()
-//
-// See Dataset#ToUpdateSQL for arguments
-func (dd *DeleteDataset) Executor() exec.QueryExecutor {
- return dd.queryFactory.FromSQLBuilder(dd.deleteSQLBuilder())
-}
-
-func (dd *DeleteDataset) deleteSQLBuilder() sb.SQLBuilder {
- buf := sb.NewSQLBuilder(dd.isPrepared.Bool())
- if dd.err != nil {
- return buf.SetError(dd.err)
- }
- dd.dialect.ToDeleteSQL(buf, dd.clauses)
- return buf
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/dialect/sqlite3/sqlite3.go b/vendor/github.com/doug-martin/goqu/v9/dialect/sqlite3/sqlite3.go
deleted file mode 100644
index 40ddb2a5d6d..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/dialect/sqlite3/sqlite3.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package sqlite3
-
-import (
- "time"
-
- "github.com/doug-martin/goqu/v9"
- "github.com/doug-martin/goqu/v9/exp"
-)
-
-func DialectOptions() *goqu.SQLDialectOptions {
- opts := goqu.DefaultDialectOptions()
-
- opts.SupportsReturn = false
- opts.SupportsOrderByOnUpdate = true
- opts.SupportsLimitOnUpdate = true
- opts.SupportsOrderByOnDelete = true
- opts.SupportsLimitOnDelete = true
- opts.SupportsConflictUpdateWhere = false
- opts.SupportsInsertIgnoreSyntax = true
- opts.SupportsConflictTarget = true
- opts.SupportsMultipleUpdateTables = false
- opts.WrapCompoundsInParens = false
- opts.SupportsDistinctOn = false
- opts.SupportsWindowFunction = false
- opts.SupportsLateral = false
-
- opts.PlaceHolderFragment = []byte("?")
- opts.IncludePlaceholderNum = false
- opts.QuoteRune = '`'
- opts.DefaultValuesFragment = []byte("")
- opts.True = []byte("1")
- opts.False = []byte("0")
- opts.TimeFormat = time.RFC3339Nano
- opts.BooleanOperatorLookup = map[exp.BooleanOperation][]byte{
- exp.EqOp: []byte("="),
- exp.NeqOp: []byte("!="),
- exp.GtOp: []byte(">"),
- exp.GteOp: []byte(">="),
- exp.LtOp: []byte("<"),
- exp.LteOp: []byte("<="),
- exp.InOp: []byte("IN"),
- exp.NotInOp: []byte("NOT IN"),
- exp.IsOp: []byte("IS"),
- exp.IsNotOp: []byte("IS NOT"),
- exp.LikeOp: []byte("LIKE"),
- exp.NotLikeOp: []byte("NOT LIKE"),
- exp.ILikeOp: []byte("LIKE"),
- exp.NotILikeOp: []byte("NOT LIKE"),
- exp.RegexpLikeOp: []byte("REGEXP"),
- exp.RegexpNotLikeOp: []byte("NOT REGEXP"),
- exp.RegexpILikeOp: []byte("REGEXP"),
- exp.RegexpNotILikeOp: []byte("NOT REGEXP"),
- }
- opts.UseLiteralIsBools = false
- opts.BitwiseOperatorLookup = map[exp.BitwiseOperation][]byte{
- exp.BitwiseOrOp: []byte("|"),
- exp.BitwiseAndOp: []byte("&"),
- exp.BitwiseLeftShiftOp: []byte("<<"),
- exp.BitwiseRightShiftOp: []byte(">>"),
- }
- opts.EscapedRunes = map[rune][]byte{
- '\'': []byte("''"),
- }
- opts.InsertIgnoreClause = []byte("INSERT OR IGNORE INTO ")
- opts.ConflictFragment = []byte(" ON CONFLICT ")
- opts.ConflictDoUpdateFragment = []byte(" DO UPDATE SET ")
- opts.ConflictDoNothingFragment = []byte(" DO NOTHING ")
- opts.ForUpdateFragment = []byte("")
- opts.OfFragment = []byte("")
- opts.NowaitFragment = []byte("")
- return opts
-}
-
-func init() {
- goqu.RegisterDialect("sqlite3", DialectOptions())
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/docker-compose.yml b/vendor/github.com/doug-martin/goqu/v9/docker-compose.yml
deleted file mode 100644
index 3dd0c57dc13..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/docker-compose.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-version: "2"
-
-services:
- postgres:
- image: "postgres:${POSTGRES_VERSION}"
- environment:
- - "POSTGRES_USER=postgres"
- - "POSTGRES_DB=goqupostgres"
- - "POSTGRES_HOST_AUTH_METHOD=trust"
- expose:
- - "5432"
- ports:
- - "5432:5432"
-
- mysql:
- image: "mysql:${MYSQL_VERSION}"
- environment:
- - "MYSQL_DATABASE=goqumysql"
- - "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- expose:
- - "3306"
- ports:
- - "3306:3306"
-
- sqlserver:
- image: "mcr.microsoft.com/mssql/server:${SQLSERVER_VERSION}"
- environment:
- - "ACCEPT_EULA=Y"
- - "SA_PASSWORD=qwe123QWE"
- expose:
- - "1433"
- ports:
- - "1433:1433"
-
- goqu:
- image: "golang:${GO_VERSION}"
- command: ["./wait-for-it.sh", "postgres:5432", "--", "./wait-for-it.sh", "mysql:3306", "--", "go test -v -race ./..."]
- working_dir: /go/src/github.com/doug-martin/goqu
- volumes:
- - "./:/go/src/github.com/doug-martin/goqu"
- environment:
- MYSQL_URI: 'root@tcp(mysql:3306)/goqumysql?parseTime=true'
- PG_URI: 'postgres://postgres:@postgres:5432/goqupostgres?sslmode=disable'
- SQLSERVER_URI: 'sqlserver://sa:qwe123QWE@sqlserver:1433?database=master&connection+timeout=30'
- depends_on:
- - postgres
- - mysql
- - sqlserver
- goqu-coverage:
- image: "golang:${GO_VERSION}"
- command: ["./wait-for-it.sh", "postgres:5432", "--", "./wait-for-it.sh", "mysql:3306", "--", "./go.test.sh"]
- working_dir: /go/src/github.com/doug-martin/goqu
- volumes:
- - "./:/go/src/github.com/doug-martin/goqu"
- environment:
- MYSQL_URI: 'root@tcp(mysql:3306)/goqumysql?parseTime=true'
- PG_URI: 'postgres://postgres:@postgres:5432/goqupostgres?sslmode=disable'
- SQLSERVER_URI: 'sqlserver://sa:qwe123QWE@sqlserver:1433?database=master&connection+timeout=30'
- depends_on:
- - postgres
- - mysql
- - sqlserver
diff --git a/vendor/github.com/doug-martin/goqu/v9/exec/query_executor.go b/vendor/github.com/doug-martin/goqu/v9/exec/query_executor.go
deleted file mode 100644
index ce460dff280..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exec/query_executor.go
+++ /dev/null
@@ -1,247 +0,0 @@
-package exec
-
-import (
- "context"
- gsql "database/sql"
- "reflect"
-
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type (
- QueryExecutor struct {
- de DbExecutor
- err error
- query string
- args []interface{}
- }
-)
-
-var (
- errUnsupportedScanStructType = errors.New("type must be a pointer to a struct when scanning into a struct")
- errUnsupportedScanStructsType = errors.New("type must be a pointer to a slice when scanning into structs")
- errUnsupportedScanValsType = errors.New("type must be a pointer to a slice when scanning into vals")
- errScanValPointer = errors.New("type must be a pointer when scanning into val")
- errScanValNonSlice = errors.New("type cannot be a pointer to a slice when scanning into val")
-)
-
-func newQueryExecutor(de DbExecutor, err error, query string, args ...interface{}) QueryExecutor {
- return QueryExecutor{de: de, err: err, query: query, args: args}
-}
-
-func (q QueryExecutor) ToSQL() (sql string, args []interface{}, err error) {
- return q.query, q.args, q.err
-}
-
-func (q QueryExecutor) Exec() (gsql.Result, error) {
- return q.ExecContext(context.Background())
-}
-
-func (q QueryExecutor) ExecContext(ctx context.Context) (gsql.Result, error) {
- if q.err != nil {
- return nil, q.err
- }
- return q.de.ExecContext(ctx, q.query, q.args...)
-}
-
-func (q QueryExecutor) Query() (*gsql.Rows, error) {
- return q.QueryContext(context.Background())
-}
-
-func (q QueryExecutor) QueryContext(ctx context.Context) (*gsql.Rows, error) {
- if q.err != nil {
- return nil, q.err
- }
- return q.de.QueryContext(ctx, q.query, q.args...)
-}
-
-// This will execute the SQL and append results to the slice
-// var myStructs []MyStruct
-// if err := db.From("test").ScanStructs(&myStructs); err != nil{
-// panic(err.Error()
-// }
-// //use your structs
-//
-//
-// i: A pointer to a slice of structs.
-func (q QueryExecutor) ScanStructs(i interface{}) error {
- return q.ScanStructsContext(context.Background(), i)
-}
-
-// This will execute the SQL and append results to the slice
-// var myStructs []MyStruct
-// if err := db.From("test").ScanStructsContext(ctx, &myStructs); err != nil{
-// panic(err.Error()
-// }
-// //use your structs
-//
-//
-// i: A pointer to a slice of structs.
-func (q QueryExecutor) ScanStructsContext(ctx context.Context, i interface{}) error {
- scanner, err := q.ScannerContext(ctx)
- if err != nil {
- return err
- }
- defer func() { _ = scanner.Close() }()
- return scanner.ScanStructs(i)
-}
-
-// This will execute the SQL and fill out the struct with the fields returned.
-// This method returns a boolean value that is false if no record was found
-// var myStruct MyStruct
-// found, err := db.From("test").Limit(1).ScanStruct(&myStruct)
-// if err != nil{
-// panic(err.Error()
-// }
-// if !found{
-// fmt.Println("NOT FOUND")
-// }
-//
-// i: A pointer to a struct
-func (q QueryExecutor) ScanStruct(i interface{}) (bool, error) {
- return q.ScanStructContext(context.Background(), i)
-}
-
-// This will execute the SQL and fill out the struct with the fields returned.
-// This method returns a boolean value that is false if no record was found
-// var myStruct MyStruct
-// found, err := db.From("test").Limit(1).ScanStructContext(ctx, &myStruct)
-// if err != nil{
-// panic(err.Error()
-// }
-// if !found{
-// fmt.Println("NOT FOUND")
-// }
-//
-// i: A pointer to a struct
-func (q QueryExecutor) ScanStructContext(ctx context.Context, i interface{}) (bool, error) {
- val := reflect.ValueOf(i)
- if !util.IsPointer(val.Kind()) {
- return false, errUnsupportedScanStructType
- }
- val = reflect.Indirect(val)
- if !util.IsStruct(val.Kind()) {
- return false, errUnsupportedScanStructType
- }
-
- scanner, err := q.ScannerContext(ctx)
- if err != nil {
- return false, err
- }
-
- defer func() { _ = scanner.Close() }()
-
- if scanner.Next() {
- err = scanner.ScanStruct(i)
- if err != nil {
- return false, err
- }
-
- return true, scanner.Err()
- }
-
- return false, scanner.Err()
-}
-
-// This will execute the SQL and append results to the slice.
-// var ids []uint32
-// if err := db.From("test").Select("id").ScanVals(&ids); err != nil{
-// panic(err.Error()
-// }
-//
-// i: Takes a pointer to a slice of primitive values.
-func (q QueryExecutor) ScanVals(i interface{}) error {
- return q.ScanValsContext(context.Background(), i)
-}
-
-// This will execute the SQL and append results to the slice.
-// var ids []uint32
-// if err := db.From("test").Select("id").ScanValsContext(ctx, &ids); err != nil{
-// panic(err.Error()
-// }
-//
-// i: Takes a pointer to a slice of primitive values.
-func (q QueryExecutor) ScanValsContext(ctx context.Context, i interface{}) error {
- scanner, err := q.ScannerContext(ctx)
- if err != nil {
- return err
- }
- defer func() { _ = scanner.Close() }()
- return scanner.ScanVals(i)
-}
-
-// This will execute the SQL and set the value of the primitive. This method will return false if no record is found.
-// var id uint32
-// found, err := db.From("test").Select("id").Limit(1).ScanVal(&id)
-// if err != nil{
-// panic(err.Error()
-// }
-// if !found{
-// fmt.Println("NOT FOUND")
-// }
-//
-// i: Takes a pointer to a primitive value.
-func (q QueryExecutor) ScanVal(i interface{}) (bool, error) {
- return q.ScanValContext(context.Background(), i)
-}
-
-// This will execute the SQL and set the value of the primitive. This method will return false if no record is found.
-// var id uint32
-// found, err := db.From("test").Select("id").Limit(1).ScanValContext(ctx, &id)
-// if err != nil{
-// panic(err.Error()
-// }
-// if !found{
-// fmt.Println("NOT FOUND")
-// }
-//
-// i: Takes a pointer to a primitive value.
-func (q QueryExecutor) ScanValContext(ctx context.Context, i interface{}) (bool, error) {
- val := reflect.ValueOf(i)
- if !util.IsPointer(val.Kind()) {
- return false, errScanValPointer
- }
- val = reflect.Indirect(val)
- if util.IsSlice(val.Kind()) {
- switch i.(type) {
- case *gsql.RawBytes: // do nothing
- case *[]byte: // do nothing
- case gsql.Scanner: // do nothing
- default:
- return false, errScanValNonSlice
- }
- }
-
- scanner, err := q.ScannerContext(ctx)
- if err != nil {
- return false, err
- }
-
- defer func() { _ = scanner.Close() }()
-
- if scanner.Next() {
- err = scanner.ScanVal(i)
- if err != nil {
- return false, err
- }
-
- return true, scanner.Err()
- }
-
- return false, scanner.Err()
-}
-
-// Scanner will return a Scanner that can be used for manually scanning rows.
-func (q QueryExecutor) Scanner() (Scanner, error) {
- return q.ScannerContext(context.Background())
-}
-
-// ScannerContext will return a Scanner that can be used for manually scanning rows.
-func (q QueryExecutor) ScannerContext(ctx context.Context) (Scanner, error) {
- rows, err := q.QueryContext(ctx)
- if err != nil {
- return nil, err
- }
- return NewScanner(rows), nil
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exec/query_factory.go b/vendor/github.com/doug-martin/goqu/v9/exec/query_factory.go
deleted file mode 100644
index 6ae517d6a11..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exec/query_factory.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package exec
-
-import (
- "context"
- "database/sql"
-
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // nolint:stylecheck // keep name for backwards compatibility
- DbExecutor interface {
- ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- }
- QueryFactory interface {
- FromSQL(sql string, args ...interface{}) QueryExecutor
- FromSQLBuilder(b sb.SQLBuilder) QueryExecutor
- }
- querySupport struct {
- de DbExecutor
- }
-)
-
-func NewQueryFactory(de DbExecutor) QueryFactory {
- return &querySupport{de}
-}
-
-func (qs *querySupport) FromSQL(query string, args ...interface{}) QueryExecutor {
- return newQueryExecutor(qs.de, nil, query, args...)
-}
-
-func (qs *querySupport) FromSQLBuilder(b sb.SQLBuilder) QueryExecutor {
- query, args, err := b.ToSQL()
- return newQueryExecutor(qs.de, err, query, args...)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exec/scanner.go b/vendor/github.com/doug-martin/goqu/v9/exec/scanner.go
deleted file mode 100644
index c05411b9ffc..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exec/scanner.go
+++ /dev/null
@@ -1,168 +0,0 @@
-package exec
-
-import (
- "database/sql"
- "reflect"
-
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type (
- // Scanner knows how to scan sql.Rows into structs.
- Scanner interface {
- Next() bool
- ScanStruct(i interface{}) error
- ScanStructs(i interface{}) error
- ScanVal(i interface{}) error
- ScanVals(i interface{}) error
- Close() error
- Err() error
- }
-
- scanner struct {
- rows *sql.Rows
- columnMap util.ColumnMap
- columns []string
- }
-)
-
-func unableToFindFieldError(col string) error {
- return errors.New(`unable to find corresponding field to column "%s" returned by query`, col)
-}
-
-// NewScanner returns a scanner that can be used for scanning rows into structs.
-func NewScanner(rows *sql.Rows) Scanner {
- return &scanner{rows: rows}
-}
-
-// Next prepares the next row for Scanning. See sql.Rows#Next for more
-// information.
-func (s *scanner) Next() bool {
- return s.rows.Next()
-}
-
-// Err returns the error, if any that was encountered during iteration. See
-// sql.Rows#Err for more information.
-func (s *scanner) Err() error {
- return s.rows.Err()
-}
-
-// ScanStruct will scan the current row into i.
-func (s *scanner) ScanStruct(i interface{}) error {
- // Setup columnMap and columns, but only once.
- if s.columnMap == nil || s.columns == nil {
- cm, err := util.GetColumnMap(i)
- if err != nil {
- return err
- }
-
- cols, err := s.rows.Columns()
- if err != nil {
- return err
- }
-
- s.columnMap = cm
- s.columns = cols
- }
-
- scans := make([]interface{}, 0, len(s.columns))
- for _, col := range s.columns {
- data, ok := s.columnMap[col]
- switch {
- case !ok:
- return unableToFindFieldError(col)
- default:
- scans = append(scans, reflect.New(data.GoType).Interface())
- }
- }
-
- if err := s.rows.Scan(scans...); err != nil {
- return err
- }
-
- record := exp.Record{}
- for index, col := range s.columns {
- record[col] = scans[index]
- }
-
- util.AssignStructVals(i, record, s.columnMap)
-
- return s.Err()
-}
-
-// ScanStructs scans results in slice of structs
-func (s *scanner) ScanStructs(i interface{}) error {
- val, err := checkScanStructsTarget(i)
- if err != nil {
- return err
- }
- return s.scanIntoSlice(val, func(i interface{}) error {
- return s.ScanStruct(i)
- })
-}
-
-// ScanVal will scan the current row and column into i.
-func (s *scanner) ScanVal(i interface{}) error {
- if err := s.rows.Scan(i); err != nil {
- return err
- }
-
- return s.Err()
-}
-
-// ScanStructs scans results in slice of values
-func (s *scanner) ScanVals(i interface{}) error {
- val, err := checkScanValsTarget(i)
- if err != nil {
- return err
- }
- return s.scanIntoSlice(val, func(i interface{}) error {
- return s.ScanVal(i)
- })
-}
-
-// Close closes the Rows, preventing further enumeration. See sql.Rows#Close
-// for more info.
-func (s *scanner) Close() error {
- return s.rows.Close()
-}
-
-func (s *scanner) scanIntoSlice(val reflect.Value, it func(i interface{}) error) error {
- elemType := util.GetSliceElementType(val)
-
- for s.Next() {
- row := reflect.New(elemType)
- if rowErr := it(row.Interface()); rowErr != nil {
- return rowErr
- }
- util.AppendSliceElement(val, row)
- }
-
- return s.Err()
-}
-
-func checkScanStructsTarget(i interface{}) (reflect.Value, error) {
- val := reflect.ValueOf(i)
- if !util.IsPointer(val.Kind()) {
- return val, errUnsupportedScanStructsType
- }
- val = reflect.Indirect(val)
- if !util.IsSlice(val.Kind()) {
- return val, errUnsupportedScanStructsType
- }
- return val, nil
-}
-
-func checkScanValsTarget(i interface{}) (reflect.Value, error) {
- val := reflect.ValueOf(i)
- if !util.IsPointer(val.Kind()) {
- return val, errUnsupportedScanValsType
- }
- val = reflect.Indirect(val)
- if !util.IsSlice(val.Kind()) {
- return val, errUnsupportedScanValsType
- }
- return val, nil
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/alias.go b/vendor/github.com/doug-martin/goqu/v9/exp/alias.go
deleted file mode 100644
index 2640627b8b3..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/alias.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package exp
-
-import "fmt"
-
-type (
- aliasExpression struct {
- aliased Expression
- alias IdentifierExpression
- }
-)
-
-// Creates a new AliasedExpression for the Expression and alias
-func NewAliasExpression(exp Expression, alias interface{}) AliasedExpression {
- switch v := alias.(type) {
- case string:
- return aliasExpression{aliased: exp, alias: ParseIdentifier(v)}
- case IdentifierExpression:
- return aliasExpression{aliased: exp, alias: v}
- default:
- panic(fmt.Sprintf("Cannot create alias from %+v", v))
- }
-}
-
-func (ae aliasExpression) Clone() Expression {
- return NewAliasExpression(ae.aliased, ae.alias.Clone())
-}
-
-func (ae aliasExpression) Expression() Expression {
- return ae
-}
-
-func (ae aliasExpression) Aliased() Expression {
- return ae.aliased
-}
-
-func (ae aliasExpression) GetAs() IdentifierExpression {
- return ae.alias
-}
-
-// Returns a new IdentifierExpression with the specified schema
-func (ae aliasExpression) Schema(schema string) IdentifierExpression {
- return ae.alias.Schema(schema)
-}
-
-// Returns a new IdentifierExpression with the specified table
-func (ae aliasExpression) Table(table string) IdentifierExpression {
- return ae.alias.Table(table)
-}
-
-// Returns a new IdentifierExpression with the specified column
-func (ae aliasExpression) Col(col interface{}) IdentifierExpression {
- return ae.alias.Col(col)
-}
-
-// Returns a new IdentifierExpression with the column set to *
-// I("my_table").As("t").All() //"t".*
-func (ae aliasExpression) All() IdentifierExpression {
- return ae.alias.All()
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/bitwise.go b/vendor/github.com/doug-martin/goqu/v9/exp/bitwise.go
deleted file mode 100644
index eede5a2f952..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/bitwise.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package exp
-
-type bitwise struct {
- lhs Expression
- rhs interface{}
- op BitwiseOperation
-}
-
-func NewBitwiseExpression(op BitwiseOperation, lhs Expression, rhs interface{}) BitwiseExpression {
- return bitwise{op: op, lhs: lhs, rhs: rhs}
-}
-
-func (b bitwise) Clone() Expression {
- return NewBitwiseExpression(b.op, b.lhs.Clone(), b.rhs)
-}
-
-func (b bitwise) RHS() interface{} {
- return b.rhs
-}
-
-func (b bitwise) LHS() Expression {
- return b.lhs
-}
-
-func (b bitwise) Op() BitwiseOperation {
- return b.op
-}
-
-func (b bitwise) Expression() Expression { return b }
-func (b bitwise) As(val interface{}) AliasedExpression { return NewAliasExpression(b, val) }
-func (b bitwise) Eq(val interface{}) BooleanExpression { return eq(b, val) }
-func (b bitwise) Neq(val interface{}) BooleanExpression { return neq(b, val) }
-func (b bitwise) Gt(val interface{}) BooleanExpression { return gt(b, val) }
-func (b bitwise) Gte(val interface{}) BooleanExpression { return gte(b, val) }
-func (b bitwise) Lt(val interface{}) BooleanExpression { return lt(b, val) }
-func (b bitwise) Lte(val interface{}) BooleanExpression { return lte(b, val) }
-func (b bitwise) Asc() OrderedExpression { return asc(b) }
-func (b bitwise) Desc() OrderedExpression { return desc(b) }
-func (b bitwise) Like(i interface{}) BooleanExpression { return like(b, i) }
-func (b bitwise) NotLike(i interface{}) BooleanExpression { return notLike(b, i) }
-func (b bitwise) ILike(i interface{}) BooleanExpression { return iLike(b, i) }
-func (b bitwise) NotILike(i interface{}) BooleanExpression { return notILike(b, i) }
-func (b bitwise) RegexpLike(val interface{}) BooleanExpression { return regexpLike(b, val) }
-func (b bitwise) RegexpNotLike(val interface{}) BooleanExpression { return regexpNotLike(b, val) }
-func (b bitwise) RegexpILike(val interface{}) BooleanExpression { return regexpILike(b, val) }
-func (b bitwise) RegexpNotILike(val interface{}) BooleanExpression { return regexpNotILike(b, val) }
-func (b bitwise) In(i ...interface{}) BooleanExpression { return in(b, i...) }
-func (b bitwise) NotIn(i ...interface{}) BooleanExpression { return notIn(b, i...) }
-func (b bitwise) Is(i interface{}) BooleanExpression { return is(b, i) }
-func (b bitwise) IsNot(i interface{}) BooleanExpression { return isNot(b, i) }
-func (b bitwise) IsNull() BooleanExpression { return is(b, nil) }
-func (b bitwise) IsNotNull() BooleanExpression { return isNot(b, nil) }
-func (b bitwise) IsTrue() BooleanExpression { return is(b, true) }
-func (b bitwise) IsNotTrue() BooleanExpression { return isNot(b, true) }
-func (b bitwise) IsFalse() BooleanExpression { return is(b, false) }
-func (b bitwise) IsNotFalse() BooleanExpression { return isNot(b, false) }
-func (b bitwise) Distinct() SQLFunctionExpression { return NewSQLFunctionExpression("DISTINCT", b) }
-func (b bitwise) Between(val RangeVal) RangeExpression { return between(b, val) }
-func (b bitwise) NotBetween(val RangeVal) RangeExpression { return notBetween(b, val) }
-
-// used internally to create a Bitwise Inversion BitwiseExpression
-func bitwiseInversion(rhs Expression) BitwiseExpression {
- return NewBitwiseExpression(BitwiseInversionOp, nil, rhs)
-}
-
-// used internally to create a Bitwise OR BitwiseExpression
-func bitwiseOr(lhs Expression, rhs interface{}) BitwiseExpression {
- return NewBitwiseExpression(BitwiseOrOp, lhs, rhs)
-}
-
-// used internally to create a Bitwise AND BitwiseExpression
-func bitwiseAnd(lhs Expression, rhs interface{}) BitwiseExpression {
- return NewBitwiseExpression(BitwiseAndOp, lhs, rhs)
-}
-
-// used internally to create a Bitwise XOR BitwiseExpression
-func bitwiseXor(lhs Expression, rhs interface{}) BitwiseExpression {
- return NewBitwiseExpression(BitwiseXorOp, lhs, rhs)
-}
-
-// used internally to create a Bitwise LEFT SHIFT BitwiseExpression
-func bitwiseLeftShift(lhs Expression, rhs interface{}) BitwiseExpression {
- return NewBitwiseExpression(BitwiseLeftShiftOp, lhs, rhs)
-}
-
-// used internally to create a Bitwise RIGHT SHIFT BitwiseExpression
-func bitwiseRightShift(lhs Expression, rhs interface{}) BitwiseExpression {
- return NewBitwiseExpression(BitwiseRightShiftOp, lhs, rhs)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/bool.go b/vendor/github.com/doug-martin/goqu/v9/exp/bool.go
deleted file mode 100644
index a38f356ff18..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/bool.go
+++ /dev/null
@@ -1,185 +0,0 @@
-package exp
-
-import (
- "reflect"
- "regexp"
-)
-
-type boolean struct {
- lhs Expression
- rhs interface{}
- op BooleanOperation
-}
-
-func NewBooleanExpression(op BooleanOperation, lhs Expression, rhs interface{}) BooleanExpression {
- return boolean{op: op, lhs: lhs, rhs: rhs}
-}
-
-func (b boolean) Clone() Expression {
- return NewBooleanExpression(b.op, b.lhs.Clone(), b.rhs)
-}
-
-func (b boolean) Expression() Expression {
- return b
-}
-
-func (b boolean) RHS() interface{} {
- return b.rhs
-}
-
-func (b boolean) LHS() Expression {
- return b.lhs
-}
-
-func (b boolean) Op() BooleanOperation {
- return b.op
-}
-
-func (b boolean) As(val interface{}) AliasedExpression {
- return NewAliasExpression(b, val)
-}
-
-// used internally to create an equality BooleanExpression
-func eq(lhs Expression, rhs interface{}) BooleanExpression {
- return checkBoolExpType(EqOp, lhs, rhs, false)
-}
-
-// used internally to create an in-equality BooleanExpression
-func neq(lhs Expression, rhs interface{}) BooleanExpression {
- return checkBoolExpType(EqOp, lhs, rhs, true)
-}
-
-// used internally to create an gt comparison BooleanExpression
-func gt(lhs Expression, rhs interface{}) BooleanExpression {
- return NewBooleanExpression(GtOp, lhs, rhs)
-}
-
-// used internally to create an gte comparison BooleanExpression
-func gte(lhs Expression, rhs interface{}) BooleanExpression {
- return NewBooleanExpression(GteOp, lhs, rhs)
-}
-
-// used internally to create an lt comparison BooleanExpression
-func lt(lhs Expression, rhs interface{}) BooleanExpression {
- return NewBooleanExpression(LtOp, lhs, rhs)
-}
-
-// used internally to create an lte comparison BooleanExpression
-func lte(lhs Expression, rhs interface{}) BooleanExpression {
- return NewBooleanExpression(LteOp, lhs, rhs)
-}
-
-// used internally to create an IN BooleanExpression
-func in(lhs Expression, vals ...interface{}) BooleanExpression {
- if len(vals) == 1 && reflect.Indirect(reflect.ValueOf(vals[0])).Kind() == reflect.Slice {
- return NewBooleanExpression(InOp, lhs, vals[0])
- }
- return NewBooleanExpression(InOp, lhs, vals)
-}
-
-// used internally to create a NOT IN BooleanExpression
-func notIn(lhs Expression, vals ...interface{}) BooleanExpression {
- if len(vals) == 1 && reflect.Indirect(reflect.ValueOf(vals[0])).Kind() == reflect.Slice {
- return NewBooleanExpression(NotInOp, lhs, vals[0])
- }
- return NewBooleanExpression(NotInOp, lhs, vals)
-}
-
-// used internally to create an IS BooleanExpression
-func is(lhs Expression, val interface{}) BooleanExpression {
- return checkBoolExpType(IsOp, lhs, val, false)
-}
-
-// used internally to create an IS NOT BooleanExpression
-func isNot(lhs Expression, val interface{}) BooleanExpression {
- return checkBoolExpType(IsOp, lhs, val, true)
-}
-
-// used internally to create a LIKE BooleanExpression
-func like(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(LikeOp, lhs, val, false)
-}
-
-// used internally to create an ILIKE BooleanExpression
-func iLike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(ILikeOp, lhs, val, false)
-}
-
-// used internally to create a NOT LIKE BooleanExpression
-func notLike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(LikeOp, lhs, val, true)
-}
-
-// used internally to create a NOT ILIKE BooleanExpression
-func notILike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(ILikeOp, lhs, val, true)
-}
-
-// used internally to create a LIKE BooleanExpression
-func regexpLike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(RegexpLikeOp, lhs, val, false)
-}
-
-// used internally to create an ILIKE BooleanExpression
-func regexpILike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(RegexpILikeOp, lhs, val, false)
-}
-
-// used internally to create a NOT LIKE BooleanExpression
-func regexpNotLike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(RegexpLikeOp, lhs, val, true)
-}
-
-// used internally to create a NOT ILIKE BooleanExpression
-func regexpNotILike(lhs Expression, val interface{}) BooleanExpression {
- return checkLikeExp(RegexpILikeOp, lhs, val, true)
-}
-
-// checks an like rhs to create the proper like expression for strings or regexps
-func checkLikeExp(op BooleanOperation, lhs Expression, val interface{}, invert bool) BooleanExpression {
- rhs := val
-
- if t, ok := val.(*regexp.Regexp); ok {
- if op == LikeOp {
- op = RegexpLikeOp
- } else if op == ILikeOp {
- op = RegexpILikeOp
- }
- rhs = t.String()
- }
- if invert {
- op = operatorInversions[op]
- }
- return NewBooleanExpression(op, lhs, rhs)
-}
-
-// checks a boolean operation normalizing the operation based on the RHS (e.g. "a" = true vs "a" IS TRUE
-func checkBoolExpType(op BooleanOperation, lhs Expression, rhs interface{}, invert bool) BooleanExpression {
- if rhs == nil {
- op = IsOp
- } else {
- switch reflect.Indirect(reflect.ValueOf(rhs)).Kind() {
- case reflect.Bool:
- op = IsOp
- case reflect.Slice:
- // if its a slice of bytes dont treat as an IN
- if _, ok := rhs.([]byte); !ok {
- op = InOp
- }
- case reflect.Struct:
- switch rhs.(type) {
- case SQLExpression:
- op = InOp
- case AppendableExpression:
- op = InOp
- case *regexp.Regexp:
- return checkLikeExp(LikeOp, lhs, rhs, invert)
- }
- default:
- }
- }
- if invert {
- op = operatorInversions[op]
- }
- return NewBooleanExpression(op, lhs, rhs)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/case.go b/vendor/github.com/doug-martin/goqu/v9/exp/case.go
deleted file mode 100644
index d20800a388a..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/case.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package exp
-
-type (
- caseElse struct {
- result interface{}
- }
- caseWhen struct {
- caseElse
- condition interface{}
- }
- caseExpression struct {
- value interface{}
- whens []CaseWhen
- elseCondition CaseElse
- }
-)
-
-func NewCaseElse(result interface{}) CaseElse {
- return caseElse{result: result}
-}
-
-func (ce caseElse) Result() interface{} {
- return ce.result
-}
-
-func NewCaseWhen(condition, result interface{}) CaseWhen {
- return caseWhen{caseElse: caseElse{result: result}, condition: condition}
-}
-
-func (cw caseWhen) Condition() interface{} {
- return cw.condition
-}
-
-func NewCaseExpression() CaseExpression {
- return caseExpression{value: nil, whens: []CaseWhen{}, elseCondition: nil}
-}
-
-func (c caseExpression) Expression() Expression {
- return c
-}
-
-func (c caseExpression) Clone() Expression {
- return caseExpression{value: c.value, whens: c.whens, elseCondition: c.elseCondition}
-}
-
-func (c caseExpression) As(alias interface{}) AliasedExpression {
- return NewAliasExpression(c, alias)
-}
-
-func (c caseExpression) GetValue() interface{} {
- return c.value
-}
-
-func (c caseExpression) GetWhens() []CaseWhen {
- return c.whens
-}
-
-func (c caseExpression) GetElse() CaseElse {
- return c.elseCondition
-}
-
-func (c caseExpression) Value(value interface{}) CaseExpression {
- c.value = value
- return c
-}
-
-func (c caseExpression) When(condition, result interface{}) CaseExpression {
- c.whens = append(c.whens, NewCaseWhen(condition, result))
- return c
-}
-
-func (c caseExpression) Else(result interface{}) CaseExpression {
- c.elseCondition = NewCaseElse(result)
- return c
-}
-
-func (c caseExpression) Asc() OrderedExpression { return asc(c) }
-func (c caseExpression) Desc() OrderedExpression { return desc(c) }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/cast.go b/vendor/github.com/doug-martin/goqu/v9/exp/cast.go
deleted file mode 100644
index d881e26b28f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/cast.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package exp
-
-type cast struct {
- casted Expression
- t LiteralExpression
-}
-
-// Creates a new Casted expression
-// Cast(I("a"), "NUMERIC") -> CAST("a" AS NUMERIC)
-func NewCastExpression(e Expression, t string) CastExpression {
- return cast{casted: e, t: NewLiteralExpression(t)}
-}
-
-func (c cast) Casted() Expression {
- return c.casted
-}
-
-func (c cast) Type() LiteralExpression {
- return c.t
-}
-
-func (c cast) Clone() Expression {
- return cast{casted: c.casted.Clone(), t: c.t}
-}
-
-func (c cast) Expression() Expression { return c }
-func (c cast) As(val interface{}) AliasedExpression { return NewAliasExpression(c, val) }
-func (c cast) Eq(val interface{}) BooleanExpression { return eq(c, val) }
-func (c cast) Neq(val interface{}) BooleanExpression { return neq(c, val) }
-func (c cast) Gt(val interface{}) BooleanExpression { return gt(c, val) }
-func (c cast) Gte(val interface{}) BooleanExpression { return gte(c, val) }
-func (c cast) Lt(val interface{}) BooleanExpression { return lt(c, val) }
-func (c cast) Lte(val interface{}) BooleanExpression { return lte(c, val) }
-func (c cast) Asc() OrderedExpression { return asc(c) }
-func (c cast) Desc() OrderedExpression { return desc(c) }
-func (c cast) Like(i interface{}) BooleanExpression { return like(c, i) }
-func (c cast) NotLike(i interface{}) BooleanExpression { return notLike(c, i) }
-func (c cast) ILike(i interface{}) BooleanExpression { return iLike(c, i) }
-func (c cast) NotILike(i interface{}) BooleanExpression { return notILike(c, i) }
-func (c cast) RegexpLike(val interface{}) BooleanExpression { return regexpLike(c, val) }
-func (c cast) RegexpNotLike(val interface{}) BooleanExpression { return regexpNotLike(c, val) }
-func (c cast) RegexpILike(val interface{}) BooleanExpression { return regexpILike(c, val) }
-func (c cast) RegexpNotILike(val interface{}) BooleanExpression { return regexpNotILike(c, val) }
-func (c cast) In(i ...interface{}) BooleanExpression { return in(c, i...) }
-func (c cast) NotIn(i ...interface{}) BooleanExpression { return notIn(c, i...) }
-func (c cast) Is(i interface{}) BooleanExpression { return is(c, i) }
-func (c cast) IsNot(i interface{}) BooleanExpression { return isNot(c, i) }
-func (c cast) IsNull() BooleanExpression { return is(c, nil) }
-func (c cast) IsNotNull() BooleanExpression { return isNot(c, nil) }
-func (c cast) IsTrue() BooleanExpression { return is(c, true) }
-func (c cast) IsNotTrue() BooleanExpression { return isNot(c, true) }
-func (c cast) IsFalse() BooleanExpression { return is(c, false) }
-func (c cast) IsNotFalse() BooleanExpression { return isNot(c, false) }
-func (c cast) Distinct() SQLFunctionExpression { return NewSQLFunctionExpression("DISTINCT", c) }
-func (c cast) Between(val RangeVal) RangeExpression { return between(c, val) }
-func (c cast) NotBetween(val RangeVal) RangeExpression { return notBetween(c, val) }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/col.go b/vendor/github.com/doug-martin/goqu/v9/exp/col.go
deleted file mode 100644
index 04296917709..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/col.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package exp
-
-import (
- "fmt"
- "reflect"
-
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type columnList struct {
- columns []Expression
-}
-
-func NewColumnListExpression(vals ...interface{}) ColumnListExpression {
- cols := []Expression{}
- for _, val := range vals {
- switch t := val.(type) {
- case nil: // do nothing
- case string:
- cols = append(cols, ParseIdentifier(t))
- case ColumnListExpression:
- cols = append(cols, t.Columns()...)
- case Expression:
- cols = append(cols, t)
- default:
- _, valKind := util.GetTypeInfo(val, reflect.Indirect(reflect.ValueOf(val)))
-
- if valKind == reflect.Struct {
- cm, err := util.GetColumnMap(val)
- if err != nil {
- panic(err.Error())
- }
- structCols := cm.Cols()
- for _, col := range structCols {
- i := ParseIdentifier(col)
- var sc Expression = i
- if i.IsQualified() {
- sc = i.As(NewIdentifierExpression("", "", col))
- }
- cols = append(cols, sc)
- }
- } else {
- panic(fmt.Sprintf("Cannot created expression from %+v", val))
- }
- }
- }
- return columnList{columns: cols}
-}
-
-func NewOrderedColumnList(vals ...OrderedExpression) ColumnListExpression {
- exps := make([]interface{}, 0, len(vals))
- for _, col := range vals {
- exps = append(exps, col.Expression())
- }
- return NewColumnListExpression(exps...)
-}
-
-func (cl columnList) Clone() Expression {
- newExps := make([]Expression, 0, len(cl.columns))
- for _, exp := range cl.columns {
- newExps = append(newExps, exp.Clone())
- }
- return columnList{columns: newExps}
-}
-
-func (cl columnList) Expression() Expression {
- return cl
-}
-
-func (cl columnList) IsEmpty() bool {
- return len(cl.columns) == 0
-}
-
-func (cl columnList) Columns() []Expression {
- return cl.columns
-}
-
-func (cl columnList) Append(cols ...Expression) ColumnListExpression {
- ret := columnList{}
- exps := append(ret.columns, cl.columns...)
- exps = append(exps, cols...)
- ret.columns = exps
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/compound.go b/vendor/github.com/doug-martin/goqu/v9/exp/compound.go
deleted file mode 100644
index d631991f071..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/compound.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package exp
-
-type compound struct {
- t CompoundType
- rhs AppendableExpression
-}
-
-func NewCompoundExpression(ct CompoundType, rhs AppendableExpression) CompoundExpression {
- return compound{t: ct, rhs: rhs}
-}
-
-func (c compound) Expression() Expression { return c }
-
-func (c compound) Clone() Expression {
- return compound{t: c.t, rhs: c.rhs.Clone().(AppendableExpression)}
-}
-
-func (c compound) Type() CompoundType { return c.t }
-func (c compound) RHS() AppendableExpression { return c.rhs }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/conflict.go b/vendor/github.com/doug-martin/goqu/v9/exp/conflict.go
deleted file mode 100644
index 4c7c5ead001..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/conflict.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package exp
-
-type (
- doNothingConflict struct{}
- // ConflictUpdate is the struct that represents the UPDATE fragment of an
- // INSERT ... ON CONFLICT/ON DUPLICATE KEY DO UPDATE statement
- conflictUpdate struct {
- target string
- update interface{}
- whereClause ExpressionList
- }
-)
-
-// Creates a conflict struct to be passed to InsertConflict to ignore constraint errors
-// InsertConflict(DoNothing(),...) -> INSERT INTO ... ON CONFLICT DO NOTHING
-func NewDoNothingConflictExpression() ConflictExpression {
- return &doNothingConflict{}
-}
-
-func (c doNothingConflict) Expression() Expression {
- return c
-}
-
-func (c doNothingConflict) Clone() Expression {
- return c
-}
-
-func (c doNothingConflict) Action() ConflictAction {
- return DoNothingConflictAction
-}
-
-// Creates a ConflictUpdate struct to be passed to InsertConflict
-// Represents a ON CONFLICT DO UPDATE portion of an INSERT statement (ON DUPLICATE KEY UPDATE for mysql)
-//
-// InsertConflict(DoUpdate("target_column", update),...) ->
-// INSERT INTO ... ON CONFLICT DO UPDATE SET a=b
-// InsertConflict(DoUpdate("target_column", update).Where(Ex{"a": 1},...) ->
-// INSERT INTO ... ON CONFLICT DO UPDATE SET a=b WHERE a=1
-func NewDoUpdateConflictExpression(target string, update interface{}) ConflictUpdateExpression {
- return &conflictUpdate{target: target, update: update}
-}
-
-func (c conflictUpdate) Expression() Expression {
- return c
-}
-
-func (c conflictUpdate) Clone() Expression {
- return &conflictUpdate{
- target: c.target,
- update: c.update,
- whereClause: c.whereClause.Clone().(ExpressionList),
- }
-}
-
-func (c conflictUpdate) Action() ConflictAction {
- return DoUpdateConflictAction
-}
-
-// Returns the target conflict column. Only necessary for Postgres.
-// Will return an error for mysql/sqlite. Will also return an error if missing from a postgres ConflictUpdate.
-func (c conflictUpdate) TargetColumn() string {
- return c.target
-}
-
-// Returns the Updates which represent the ON CONFLICT DO UPDATE portion of an insert statement. If nil,
-// there are no updates.
-func (c conflictUpdate) Update() interface{} {
- return c.update
-}
-
-// Append to the existing Where clause for an ON CONFLICT DO UPDATE ... WHERE ...
-// InsertConflict(DoNothing(),...) -> INSERT INTO ... ON CONFLICT DO NOTHING
-func (c *conflictUpdate) Where(expressions ...Expression) ConflictUpdateExpression {
- if c.whereClause == nil {
- c.whereClause = NewExpressionList(AndType, expressions...)
- } else {
- c.whereClause = c.whereClause.Append(expressions...)
- }
- return c
-}
-
-// Append to the existing Where clause for an ON CONFLICT DO UPDATE ... WHERE ...
-// InsertConflict(DoNothing(),...) -> INSERT INTO ... ON CONFLICT DO NOTHING
-func (c *conflictUpdate) WhereClause() ExpressionList {
- return c.whereClause
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/cte.go b/vendor/github.com/doug-martin/goqu/v9/exp/cte.go
deleted file mode 100644
index 4282d0b6bf6..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/cte.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package exp
-
-type commonExpr struct {
- recursive bool
- name LiteralExpression
- subQuery Expression
-}
-
-// Creates a new WITH common table expression for a SQLExpression, typically Datasets'. This function is used
-// internally by Dataset when a CTE is added to another Dataset
-func NewCommonTableExpression(recursive bool, name string, subQuery Expression) CommonTableExpression {
- return commonExpr{recursive: recursive, name: NewLiteralExpression(name), subQuery: subQuery}
-}
-
-func (ce commonExpr) Expression() Expression { return ce }
-
-func (ce commonExpr) Clone() Expression {
- return commonExpr{recursive: ce.recursive, name: ce.name, subQuery: ce.subQuery.Clone().(SQLExpression)}
-}
-
-func (ce commonExpr) IsRecursive() bool { return ce.recursive }
-func (ce commonExpr) Name() LiteralExpression { return ce.name }
-func (ce commonExpr) SubQuery() Expression { return ce.subQuery }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/delete_clauses.go b/vendor/github.com/doug-martin/goqu/v9/exp/delete_clauses.go
deleted file mode 100644
index 25af851f33b..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/delete_clauses.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package exp
-
-type (
- DeleteClauses interface {
- HasFrom() bool
- clone() *deleteClauses
-
- CommonTables() []CommonTableExpression
- CommonTablesAppend(cte CommonTableExpression) DeleteClauses
-
- From() IdentifierExpression
- SetFrom(table IdentifierExpression) DeleteClauses
-
- Where() ExpressionList
- ClearWhere() DeleteClauses
- WhereAppend(expressions ...Expression) DeleteClauses
-
- Order() ColumnListExpression
- HasOrder() bool
- ClearOrder() DeleteClauses
- SetOrder(oes ...OrderedExpression) DeleteClauses
- OrderAppend(...OrderedExpression) DeleteClauses
- OrderPrepend(...OrderedExpression) DeleteClauses
-
- Limit() interface{}
- HasLimit() bool
- ClearLimit() DeleteClauses
- SetLimit(limit interface{}) DeleteClauses
-
- Returning() ColumnListExpression
- HasReturning() bool
- SetReturning(cl ColumnListExpression) DeleteClauses
- }
- deleteClauses struct {
- commonTables []CommonTableExpression
- from IdentifierExpression
- where ExpressionList
- order ColumnListExpression
- limit interface{}
- returning ColumnListExpression
- }
-)
-
-func NewDeleteClauses() DeleteClauses {
- return &deleteClauses{}
-}
-
-func (dc *deleteClauses) HasFrom() bool {
- return dc.from != nil
-}
-
-func (dc *deleteClauses) clone() *deleteClauses {
- return &deleteClauses{
- commonTables: dc.commonTables,
- from: dc.from,
-
- where: dc.where,
- order: dc.order,
- limit: dc.limit,
- returning: dc.returning,
- }
-}
-
-func (dc *deleteClauses) CommonTables() []CommonTableExpression {
- return dc.commonTables
-}
-
-func (dc *deleteClauses) CommonTablesAppend(cte CommonTableExpression) DeleteClauses {
- ret := dc.clone()
- ret.commonTables = append(ret.commonTables, cte)
- return ret
-}
-
-func (dc *deleteClauses) From() IdentifierExpression {
- return dc.from
-}
-
-func (dc *deleteClauses) SetFrom(table IdentifierExpression) DeleteClauses {
- ret := dc.clone()
- ret.from = table
- return ret
-}
-
-func (dc *deleteClauses) Where() ExpressionList {
- return dc.where
-}
-
-func (dc *deleteClauses) ClearWhere() DeleteClauses {
- ret := dc.clone()
- ret.where = nil
- return ret
-}
-
-func (dc *deleteClauses) WhereAppend(expressions ...Expression) DeleteClauses {
- if len(expressions) == 0 {
- return dc
- }
- ret := dc.clone()
- if ret.where == nil {
- ret.where = NewExpressionList(AndType, expressions...)
- } else {
- ret.where = ret.where.Append(expressions...)
- }
- return ret
-}
-
-func (dc *deleteClauses) Order() ColumnListExpression {
- return dc.order
-}
-
-func (dc *deleteClauses) HasOrder() bool {
- return dc.order != nil
-}
-
-func (dc *deleteClauses) ClearOrder() DeleteClauses {
- ret := dc.clone()
- ret.order = nil
- return ret
-}
-
-func (dc *deleteClauses) SetOrder(oes ...OrderedExpression) DeleteClauses {
- ret := dc.clone()
- ret.order = NewOrderedColumnList(oes...)
- return ret
-}
-
-func (dc *deleteClauses) OrderAppend(oes ...OrderedExpression) DeleteClauses {
- if dc.order == nil {
- return dc.SetOrder(oes...)
- }
- ret := dc.clone()
- ret.order = ret.order.Append(NewOrderedColumnList(oes...).Columns()...)
- return ret
-}
-
-func (dc *deleteClauses) OrderPrepend(oes ...OrderedExpression) DeleteClauses {
- if dc.order == nil {
- return dc.SetOrder(oes...)
- }
- ret := dc.clone()
- ret.order = NewOrderedColumnList(oes...).Append(ret.order.Columns()...)
- return ret
-}
-
-func (dc *deleteClauses) Limit() interface{} {
- return dc.limit
-}
-
-func (dc *deleteClauses) HasLimit() bool {
- return dc.limit != nil
-}
-
-func (dc *deleteClauses) ClearLimit() DeleteClauses {
- ret := dc.clone()
- ret.limit = nil
- return ret
-}
-
-func (dc *deleteClauses) SetLimit(limit interface{}) DeleteClauses {
- ret := dc.clone()
- ret.limit = limit
- return ret
-}
-
-func (dc *deleteClauses) Returning() ColumnListExpression {
- return dc.returning
-}
-
-func (dc *deleteClauses) HasReturning() bool {
- return dc.returning != nil && !dc.returning.IsEmpty()
-}
-
-func (dc *deleteClauses) SetReturning(cl ColumnListExpression) DeleteClauses {
- ret := dc.clone()
- ret.returning = cl
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/exp.go b/vendor/github.com/doug-martin/goqu/v9/exp/exp.go
deleted file mode 100644
index 240a96a62b5..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/exp.go
+++ /dev/null
@@ -1,734 +0,0 @@
-package exp
-
-import (
- "fmt"
-
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-// Behaviors
-type (
-
- // Interface that an expression should implement if it can be aliased.
- Aliaseable interface {
- // Returns an AliasedExpression
- // I("col").As("other_col") //"col" AS "other_col"
- // I("col").As(I("other_col")) //"col" AS "other_col"
- As(interface{}) AliasedExpression
- }
-
- // Interface that an expression should implement if it can be casted to another SQL type .
- Castable interface {
- // Casts an expression to the specified type
- // I("a").Cast("numeric")//CAST("a" AS numeric)
- Cast(val string) CastExpression
- }
-
- Inable interface {
- // Creates a Boolean expression for IN clauses
- // I("col").In([]string{"a", "b", "c"}) //("col" IN ('a', 'b', 'c'))
- In(...interface{}) BooleanExpression
- // Creates a Boolean expression for NOT IN clauses
- // I("col").NotIn([]string{"a", "b", "c"}) //("col" NOT IN ('a', 'b', 'c'))
- NotIn(...interface{}) BooleanExpression
- }
-
- Isable interface {
- // Creates an Boolean expression IS clauses
- // ds.Where(I("a").Is(nil)) //("a" IS NULL)
- // ds.Where(I("a").Is(true)) //("a" IS TRUE)
- // ds.Where(I("a").Is(false)) //("a" IS FALSE)
- Is(interface{}) BooleanExpression
- // Creates an Boolean expression IS NOT clauses
- // ds.Where(I("a").IsNot(nil)) //("a" IS NOT NULL)
- // ds.Where(I("a").IsNot(true)) //("a" IS NOT TRUE)
- // ds.Where(I("a").IsNot(false)) //("a" IS NOT FALSE)
- IsNot(interface{}) BooleanExpression
- // Shortcut for Is(nil)
- IsNull() BooleanExpression
- // Shortcut for IsNot(nil)
- IsNotNull() BooleanExpression
- // Shortcut for Is(true)
- IsTrue() BooleanExpression
- // Shortcut for IsNot(true)
- IsNotTrue() BooleanExpression
- // Shortcut for Is(false)
- IsFalse() BooleanExpression
- // Shortcut for IsNot(false)
- IsNotFalse() BooleanExpression
- }
-
- Likeable interface {
- // Creates an Boolean expression for LIKE clauses
- // ds.Where(I("a").Like("a%")) //("a" LIKE 'a%')
- Like(interface{}) BooleanExpression
- // Creates an Boolean expression for NOT LIKE clauses
- // ds.Where(I("a").NotLike("a%")) //("a" NOT LIKE 'a%')
- NotLike(interface{}) BooleanExpression
- // Creates an Boolean expression for case insensitive LIKE clauses
- // ds.Where(I("a").ILike("a%")) //("a" ILIKE 'a%')
- ILike(interface{}) BooleanExpression
- // Creates an Boolean expression for case insensitive NOT LIKE clauses
- // ds.Where(I("a").NotILike("a%")) //("a" NOT ILIKE 'a%')
- NotILike(interface{}) BooleanExpression
-
- // Creates an Boolean expression for REGEXP LIKE clauses
- // ds.Where(I("a").RegexpLike("a%")) //("a" ~ 'a%')
- RegexpLike(interface{}) BooleanExpression
- // Creates an Boolean expression for REGEXP NOT LIKE clauses
- // ds.Where(I("a").RegexpNotLike("a%")) //("a" !~ 'a%')
- RegexpNotLike(interface{}) BooleanExpression
- // Creates an Boolean expression for case insensitive REGEXP ILIKE clauses
- // ds.Where(I("a").RegexpILike("a%")) //("a" ~* 'a%')
- RegexpILike(interface{}) BooleanExpression
- // Creates an Boolean expression for case insensitive REGEXP NOT ILIKE clauses
- // ds.Where(I("a").RegexpNotILike("a%")) //("a" !~* 'a%')
- RegexpNotILike(interface{}) BooleanExpression
- }
-
- // Interface that an expression should implement if it can be compared with other values.
- Comparable interface {
- // Creates a Boolean expression comparing equality
- // I("col").Eq(1) //("col" = 1)
- Eq(interface{}) BooleanExpression
- // Creates a Boolean expression comparing in-equality
- // I("col").Neq(1) //("col" != 1)
- Neq(interface{}) BooleanExpression
- // Creates a Boolean expression for greater than comparisons
- // I("col").Gt(1) //("col" > 1)
- Gt(interface{}) BooleanExpression
- // Creates a Boolean expression for greater than or equal to than comparisons
- // I("col").Gte(1) //("col" >= 1)
- Gte(interface{}) BooleanExpression
- // Creates a Boolean expression for less than comparisons
- // I("col").Lt(1) //("col" < 1)
- Lt(interface{}) BooleanExpression
- // Creates a Boolean expression for less than or equal to comparisons
- // I("col").Lte(1) //("col" <= 1)
- Lte(interface{}) BooleanExpression
- }
-
- // Interface that an expression should implement if it can be used in a DISTINCT epxression.
- Distinctable interface {
- // Creates a DISTINCT clause
- // I("a").Distinct() //DISTINCT("a")
- Distinct() SQLFunctionExpression
- }
-
- // Interface that an expression should implement if it can be ORDERED.
- Orderable interface {
- // Creates an Ordered Expression for sql ASC order
- // ds.Order(I("a").Asc()) //ORDER BY "a" ASC
- Asc() OrderedExpression
- // Creates an Ordered Expression for sql DESC order
- // ds.Order(I("a").Desc()) //ORDER BY "a" DESC
- Desc() OrderedExpression
- }
-
- Rangeable interface {
- // Creates a Range expression for between comparisons
- // I("col").Between(RangeVal{Start:1, End:10}) //("col" BETWEEN 1 AND 10)
- Between(RangeVal) RangeExpression
- // Creates a Range expression for between comparisons
- // I("col").NotBetween(RangeVal{Start:1, End:10}) //("col" NOT BETWEEN 1 AND 10)
- NotBetween(RangeVal) RangeExpression
- }
-
- Updateable interface {
- // Used internally by update sql
- Set(interface{}) UpdateExpression
- }
-
- Bitwiseable interface {
- // Creates a Bit Operation Expresion for sql ~
- // I("col").BitiInversion() // (~ "col")
- BitwiseInversion() BitwiseExpression
- // Creates a Bit Operation Expresion for sql |
- // I("col").BitOr(1) // ("col" | 1)
- BitwiseOr(interface{}) BitwiseExpression
- // Creates a Bit Operation Expresion for sql &
- // I("col").BitAnd(1) // ("col" & 1)
- BitwiseAnd(interface{}) BitwiseExpression
- // Creates a Bit Operation Expresion for sql ^
- // I("col").BitXor(1) // ("col" ^ 1)
- BitwiseXor(interface{}) BitwiseExpression
- // Creates a Bit Operation Expresion for sql <<
- // I("col").BitLeftShift(1) // ("col" << 1)
- BitwiseLeftShift(interface{}) BitwiseExpression
- // Creates a Bit Operation Expresion for sql >>
- // I("col").BitRighttShift(1) // ("col" >> 1)
- BitwiseRightShift(interface{}) BitwiseExpression
- }
-)
-
-type (
- Vals []interface{}
- // Parent of all expression types
- Expression interface {
- Clone() Expression
- Expression() Expression
- }
- // An Expression that generates its own sql (e.g Dataset)
- SQLExpression interface {
- Expression
- ToSQL() (string, []interface{}, error)
- IsPrepared() bool
- }
-
- AppendableExpression interface {
- Expression
- AppendSQL(b sb.SQLBuilder)
- // Returns the alias value as an identiier expression
- GetAs() IdentifierExpression
-
- // Returns true if this expression returns columns.
- // Used to determine if a Select, Update, Insert, or Delete query returns columns
- ReturnsColumns() bool
- }
- // Expression for Aliased expressions
- // I("a").As("b") -> "a" AS "b"
- // SUM("a").As(I("a_sum")) -> SUM("a") AS "a_sum"
- AliasedExpression interface {
- Expression
- // Returns the Epxression being aliased
- Aliased() Expression
- // Returns the alias value as an identiier expression
- GetAs() IdentifierExpression
-
- // Returns a new IdentifierExpression with the specified schema
- Schema(string) IdentifierExpression
- // Returns a new IdentifierExpression with the specified table
- Table(string) IdentifierExpression
- // Returns a new IdentifierExpression with the specified column
- Col(interface{}) IdentifierExpression
- // Returns a new IdentifierExpression with the column set to *
- // I("my_table").All() //"my_table".*
- All() IdentifierExpression
- }
-
- BooleanOperation int
- BooleanExpression interface {
- Expression
- Aliaseable
- // Returns the operator for the expression
- Op() BooleanOperation
- // The left hand side of the expression (e.g. I("a")
- LHS() Expression
- // The right hand side of the expression could be a primitive value, dataset, or expression
- RHS() interface{}
- }
-
- BitwiseOperation int
- BitwiseExpression interface {
- Expression
- Aliaseable
- Comparable
- Isable
- Inable
- Likeable
- Rangeable
- Orderable
- Distinctable
- // Returns the operator for the expression
- Op() BitwiseOperation
- // The left hand side of the expression (e.g. I("a")
- LHS() Expression
- // The right hand side of the expression could be a primitive value, dataset, or expression
- RHS() interface{}
- }
-
- // An Expression that represents another Expression casted to a SQL type
- CastExpression interface {
- Expression
- Aliaseable
- Comparable
- Inable
- Isable
- Likeable
- Orderable
- Distinctable
- Rangeable
- // The exression being casted
- Casted() Expression
- // The the SQL type to cast the expression to
- Type() LiteralExpression
- }
- // A list of columns. Typically used internally by Select, Order, From
- ColumnListExpression interface {
- Expression
- // Returns the list of columns
- Columns() []Expression
- // Returns true if the column list is empty
- IsEmpty() bool
- // Returns a new ColumnListExpression with the columns appended.
- Append(...Expression) ColumnListExpression
- }
- CompoundType int
- CompoundExpression interface {
- Expression
- Type() CompoundType
- RHS() AppendableExpression
- }
- // An Expression that the ON CONFLICT/ON DUPLICATE KEY portion of an INSERT statement
- ConflictAction int
- ConflictExpression interface {
- Expression
- Action() ConflictAction
- }
- ConflictUpdateExpression interface {
- ConflictExpression
- TargetColumn() string
- Where(expressions ...Expression) ConflictUpdateExpression
- WhereClause() ExpressionList
- Update() interface{}
- }
- CommonTableExpression interface {
- Expression
- IsRecursive() bool
- // Returns the alias name for the extracted expression
- Name() LiteralExpression
- // Returns the Expression being extracted
- SubQuery() Expression
- }
- ExpressionListType int
- // A list of expressions that should be joined together
- // And(I("a").Eq(10), I("b").Eq(11)) //(("a" = 10) AND ("b" = 11))
- // Or(I("a").Eq(10), I("b").Eq(11)) //(("a" = 10) OR ("b" = 11))
- ExpressionList interface {
- Expression
- // Returns type (e.g. OR, AND)
- Type() ExpressionListType
- // Slice of expressions that should be joined together
- Expressions() []Expression
- // Returns a new expression list with the given expressions appended to the current Expressions list
- Append(...Expression) ExpressionList
-
- IsEmpty() bool
- }
- // An Identifier that can contain schema, table and column identifiers
- IdentifierExpression interface {
- Expression
- Aliaseable
- Comparable
- Inable
- Isable
- Likeable
- Rangeable
- Orderable
- Updateable
- Distinctable
- Castable
- Bitwiseable
- // returns true if this identifier has more more than on part (Schema, Table or Col)
- // "schema" -> true //cant qualify anymore
- // "schema.table" -> true
- // "table" -> false
- // "schema"."table"."col" -> true
- // "table"."col" -> true
- // "col" -> false
- IsQualified() bool
- // Returns a new IdentifierExpression with the specified schema
- Schema(string) IdentifierExpression
- // Returns the current schema
- GetSchema() string
- // Returns a new IdentifierExpression with the specified table
- Table(string) IdentifierExpression
- // Returns the current table
- GetTable() string
- // Returns a new IdentifierExpression with the specified column
- Col(interface{}) IdentifierExpression
- // Returns the current column
- GetCol() interface{}
- // Returns a new IdentifierExpression with the column set to *
- // I("my_table").All() //"my_table".*
- All() IdentifierExpression
-
- // Returns true if schema table and identifier are all zero values.
- IsEmpty() bool
- }
- InsertExpression interface {
- Expression
- IsEmpty() bool
- IsInsertFrom() bool
- From() AppendableExpression
- Cols() ColumnListExpression
- SetCols(cols ColumnListExpression) InsertExpression
- Vals() [][]interface{}
- SetVals([][]interface{}) InsertExpression
- }
-
- JoinType int
- JoinExpression interface {
- Expression
- JoinType() JoinType
- IsConditioned() bool
- Table() Expression
- }
- // Parent type for join expressions
- ConditionedJoinExpression interface {
- JoinExpression
- Condition() JoinCondition
- IsConditionEmpty() bool
- }
- LateralExpression interface {
- Expression
- Aliaseable
- Table() AppendableExpression
- }
-
- // Expression for representing "literal" sql.
- // L("col = 1") -> col = 1)
- // L("? = ?", I("col"), 1) -> "col" = 1
- LiteralExpression interface {
- Expression
- Aliaseable
- Comparable
- Isable
- Inable
- Likeable
- Rangeable
- Orderable
- Bitwiseable
- // Returns the literal sql
- Literal() string
- // Arguments to be replaced within the sql
- Args() []interface{}
- }
-
- NullSortType int
- SortDirection int
- // An expression for specifying sort order and options
- OrderedExpression interface {
- Expression
- // The expression being sorted
- SortExpression() Expression
- // Sort direction (e.g. ASC, DESC)
- IsAsc() bool
- // If the adapter supports it null sort type (e.g. NULLS FIRST, NULLS LAST)
- NullSortType() NullSortType
- // Returns a new OrderedExpression with NullSortType set to NULLS_FIRST
- NullsFirst() OrderedExpression
- // Returns a new OrderedExpression with NullSortType set to NULLS_LAST
- NullsLast() OrderedExpression
- }
-
- RangeOperation int
- RangeExpression interface {
- Expression
- // Returns the operator for the expression
- Op() RangeOperation
- // The left hand side of the expression (e.g. I("a")
- LHS() Expression
- // The right hand side of the expression could be a primitive value, dataset, or expression
- RHS() RangeVal
- }
- RangeVal interface {
- Start() interface{}
- End() interface{}
- }
-
- Windowable interface {
- Over(WindowExpression) SQLWindowFunctionExpression
- OverName(IdentifierExpression) SQLWindowFunctionExpression
- }
-
- // Expression for representing a SQLFunction(e.g. COUNT, SUM, MIN, MAX...)
- SQLFunctionExpression interface {
- Expression
- Aliaseable
- Rangeable
- Comparable
- Orderable
- Isable
- Inable
- Likeable
- Windowable
- // The function name
- Name() string
- // Arguments to be passed to the function
- Args() []interface{}
- }
-
- UpdateExpression interface {
- Col() IdentifierExpression
- Val() interface{}
- }
-
- SQLWindowFunctionExpression interface {
- Expression
- Aliaseable
- Rangeable
- Comparable
- Orderable
- Isable
- Inable
- Likeable
- Func() SQLFunctionExpression
-
- Window() WindowExpression
- WindowName() IdentifierExpression
-
- HasWindow() bool
- HasWindowName() bool
- }
-
- WindowExpression interface {
- Expression
-
- Name() IdentifierExpression
- HasName() bool
-
- Parent() IdentifierExpression
- HasParent() bool
- PartitionCols() ColumnListExpression
- HasPartitionBy() bool
- OrderCols() ColumnListExpression
- HasOrder() bool
-
- Inherit(parent string) WindowExpression
- PartitionBy(cols ...interface{}) WindowExpression
- OrderBy(cols ...interface{}) WindowExpression
- }
- CaseElse interface {
- Result() interface{}
- }
- CaseWhen interface {
- Condition() interface{}
- Result() interface{}
- }
- CaseExpression interface {
- Expression
- Aliaseable
- Orderable
- GetValue() interface{}
- GetWhens() []CaseWhen
- GetElse() CaseElse
- Value(val interface{}) CaseExpression
- When(condition, result interface{}) CaseExpression
- Else(result interface{}) CaseExpression
- }
-)
-
-const (
- UnionCompoundType CompoundType = iota
- UnionAllCompoundType
- IntersectCompoundType
- IntersectAllCompoundType
-
- DoNothingConflictAction ConflictAction = iota
- DoUpdateConflictAction
-
- AndType ExpressionListType = iota
- OrType
-
- InnerJoinType JoinType = iota
- FullOuterJoinType
- RightOuterJoinType
- LeftOuterJoinType
- FullJoinType
- RightJoinType
- LeftJoinType
- NaturalJoinType
- NaturalLeftJoinType
- NaturalRightJoinType
- NaturalFullJoinType
- CrossJoinType
-
- UsingJoinCondType JoinConditionType = iota
- OnJoinCondType
-
- // Default null sort type with no null sort order
- NoNullsSortType NullSortType = iota
- // NULLS FIRST
- NullsFirstSortType
- // NULLS LAST
- NullsLastSortType
- // ASC
- AscDir SortDirection = iota
- // DESC
- DescSortDir
-
- // BETWEEN
- BetweenOp RangeOperation = iota
- // NOT BETWEEN
- NotBetweenOp
-
- // =
- EqOp BooleanOperation = iota
- // != or <>
- NeqOp
- // IS
- IsOp
- // IS NOT
- IsNotOp
- // >
- GtOp
- // >=
- GteOp
- // <
- LtOp
- // <=
- LteOp
- // IN
- InOp
- // NOT IN
- NotInOp
- // LIKE, LIKE BINARY...
- LikeOp
- // NOT LIKE, NOT LIKE BINARY...
- NotLikeOp
- // ILIKE, LIKE
- ILikeOp
- // NOT ILIKE, NOT LIKE
- NotILikeOp
- // ~, REGEXP BINARY
- RegexpLikeOp
- // !~, NOT REGEXP BINARY
- RegexpNotLikeOp
- // ~*, REGEXP
- RegexpILikeOp
- // !~*, NOT REGEXP
- RegexpNotILikeOp
-
- betweenStr = "between"
-
- BitwiseInversionOp BitwiseOperation = iota
- BitwiseOrOp
- BitwiseAndOp
- BitwiseXorOp
- BitwiseLeftShiftOp
- BitwiseRightShiftOp
-)
-
-var (
- ConditionedJoinTypes = map[JoinType]bool{
- InnerJoinType: true,
- FullOuterJoinType: true,
- RightOuterJoinType: true,
- LeftOuterJoinType: true,
- FullJoinType: true,
- RightJoinType: true,
- LeftJoinType: true,
- }
- // used internally for inverting operators
- operatorInversions = map[BooleanOperation]BooleanOperation{
- IsOp: IsNotOp,
- EqOp: NeqOp,
- GtOp: LteOp,
- GteOp: LtOp,
- LtOp: GteOp,
- LteOp: GtOp,
- InOp: NotInOp,
- LikeOp: NotLikeOp,
- ILikeOp: NotILikeOp,
- RegexpLikeOp: RegexpNotLikeOp,
- RegexpILikeOp: RegexpNotILikeOp,
- IsNotOp: IsOp,
- NeqOp: EqOp,
- NotInOp: InOp,
- NotLikeOp: LikeOp,
- NotILikeOp: ILikeOp,
- RegexpNotLikeOp: RegexpLikeOp,
- RegexpNotILikeOp: RegexpILikeOp,
- }
-)
-
-func (bo BooleanOperation) String() string {
- switch bo {
- case EqOp:
- return "eq"
- case NeqOp:
- return "neq"
- case IsOp:
- return "is"
- case IsNotOp:
- return "isnot"
- case GtOp:
- return "gt"
- case GteOp:
- return "gte"
- case LtOp:
- return "lt"
- case LteOp:
- return "lte"
- case InOp:
- return "in"
- case NotInOp:
- return "notin"
- case LikeOp:
- return "like"
- case NotLikeOp:
- return "notlike"
- case ILikeOp:
- return "ilike"
- case NotILikeOp:
- return "notilike"
- case RegexpLikeOp:
- return "regexplike"
- case RegexpNotLikeOp:
- return "regexpnotlike"
- case RegexpILikeOp:
- return "regexpilike"
- case RegexpNotILikeOp:
- return "regexpnotilike"
- }
- return fmt.Sprintf("%d", bo)
-}
-
-func (bi BitwiseOperation) String() string {
- switch bi {
- case BitwiseInversionOp:
- return "Inversion"
- case BitwiseOrOp:
- return "OR"
- case BitwiseAndOp:
- return "AND"
- case BitwiseXorOp:
- return "XOR"
- case BitwiseLeftShiftOp:
- return "Left Shift"
- case BitwiseRightShiftOp:
- return "Right Shift"
- }
- return fmt.Sprintf("%d", bi)
-}
-
-func (ro RangeOperation) String() string {
- switch ro {
- case BetweenOp:
- return betweenStr
- case NotBetweenOp:
- return "not between"
- }
- return fmt.Sprintf("%d", ro)
-}
-
-func (jt JoinType) String() string {
- switch jt {
- case InnerJoinType:
- return "InnerJoinType"
- case FullOuterJoinType:
- return "FullOuterJoinType"
- case RightOuterJoinType:
- return "RightOuterJoinType"
- case LeftOuterJoinType:
- return "LeftOuterJoinType"
- case FullJoinType:
- return "FullJoinType"
- case RightJoinType:
- return "RightJoinType"
- case LeftJoinType:
- return "LeftJoinType"
- case NaturalJoinType:
- return "NaturalJoinType"
- case NaturalLeftJoinType:
- return "NaturalLeftJoinType"
- case NaturalRightJoinType:
- return "NaturalRightJoinType"
- case NaturalFullJoinType:
- return "NaturalFullJoinType"
- case CrossJoinType:
- return "CrossJoinType"
- }
- return fmt.Sprintf("%d", jt)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/exp_list.go b/vendor/github.com/doug-martin/goqu/v9/exp/exp_list.go
deleted file mode 100644
index ff2bbc967ed..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/exp_list.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package exp
-
-type (
- expressionList struct {
- operator ExpressionListType
- expressions []Expression
- }
-)
-
-// A list of expressions that should be ORed together
-// Or(I("a").Eq(10), I("b").Eq(11)) //(("a" = 10) OR ("b" = 11))
-func NewExpressionList(operator ExpressionListType, expressions ...Expression) ExpressionList {
- el := expressionList{operator: operator}
- exps := make([]Expression, 0, len(el.expressions))
- for _, e := range expressions {
- switch t := e.(type) {
- case ExpressionList:
- if !t.IsEmpty() {
- exps = append(exps, e)
- }
- case Ex:
- if len(t) > 0 {
- exps = append(exps, e)
- }
- case ExOr:
- if len(t) > 0 {
- exps = append(exps, e)
- }
- default:
- exps = append(exps, e)
- }
- }
- el.expressions = exps
- return el
-}
-
-func (el expressionList) Clone() Expression {
- newExps := make([]Expression, 0, len(el.expressions))
- for _, exp := range el.expressions {
- newExps = append(newExps, exp.Clone())
- }
- return expressionList{operator: el.operator, expressions: newExps}
-}
-
-func (el expressionList) Expression() Expression {
- return el
-}
-
-func (el expressionList) IsEmpty() bool {
- return len(el.expressions) == 0
-}
-
-func (el expressionList) Type() ExpressionListType {
- return el.operator
-}
-
-func (el expressionList) Expressions() []Expression {
- return el.expressions
-}
-
-func (el expressionList) Append(expressions ...Expression) ExpressionList {
- exps := make([]Expression, 0, len(el.expressions)+len(expressions))
- exps = append(exps, el.expressions...)
- exps = append(exps, expressions...)
- return NewExpressionList(el.operator, exps...)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/exp_map.go b/vendor/github.com/doug-martin/goqu/v9/exp/exp_map.go
deleted file mode 100644
index 3fea06b10b2..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/exp_map.go
+++ /dev/null
@@ -1,164 +0,0 @@
-package exp
-
-import (
- "sort"
- "strings"
-
- "github.com/doug-martin/goqu/v9/internal/errors"
-)
-
-type (
- // A map of expressions to be ANDed together where the keys are string that will be used as Identifiers and values
- // will be used in a boolean operation.
- // The Ex map can be used in tandem with Op map to create more complex expression such as LIKE, GT, LT...
- // See examples.
- Ex map[string]interface{}
- // A map of expressions to be ORed together where the keys are string that will be used as Identifiers and values
- // will be used in a boolean operation.
- // The Ex map can be used in tandem with Op map to create more complex expression such as LIKE, GT, LT...
- // See examples.
- ExOr map[string]interface{}
- // Used in tandem with the Ex map to create complex comparisons such as LIKE, GT, LT... See examples
- Op map[string]interface{}
-)
-
-func (e Ex) Expression() Expression {
- return e
-}
-
-func (e Ex) Clone() Expression {
- ret := Ex{}
- for key, val := range e {
- ret[key] = val
- }
- return ret
-}
-
-func (e Ex) IsEmpty() bool {
- return len(e) == 0
-}
-
-func (e Ex) ToExpressions() (ExpressionList, error) {
- return mapToExpressionList(e, AndType)
-}
-
-func (eo ExOr) Expression() Expression {
- return eo
-}
-
-func (eo ExOr) Clone() Expression {
- ret := ExOr{}
- for key, val := range eo {
- ret[key] = val
- }
- return ret
-}
-
-func (eo ExOr) IsEmpty() bool {
- return len(eo) == 0
-}
-
-func (eo ExOr) ToExpressions() (ExpressionList, error) {
- return mapToExpressionList(eo, OrType)
-}
-
-func getExMapKeys(ex map[string]interface{}) []string {
- keys := make([]string, 0, len(ex))
- for key := range ex {
- keys = append(keys, key)
- }
- sort.Strings(keys)
- return keys
-}
-
-func mapToExpressionList(ex map[string]interface{}, eType ExpressionListType) (ExpressionList, error) {
- keys := getExMapKeys(ex)
- ret := make([]Expression, 0, len(keys))
- for _, key := range keys {
- lhs := ParseIdentifier(key)
- rhs := ex[key]
- var exp Expression
- if op, ok := rhs.(Op); ok {
- ors, err := createOredExpressionFromMap(lhs, op)
- if err != nil {
- return nil, err
- }
- exp = NewExpressionList(OrType, ors...)
- } else {
- exp = lhs.Eq(rhs)
- }
- ret = append(ret, exp)
- }
- if eType == OrType {
- return NewExpressionList(OrType, ret...), nil
- }
- return NewExpressionList(AndType, ret...), nil
-}
-
-func createOredExpressionFromMap(lhs IdentifierExpression, op Op) ([]Expression, error) {
- opKeys := getExMapKeys(op)
- ors := make([]Expression, 0, len(opKeys))
- for _, opKey := range opKeys {
- if exp, err := createExpressionFromOp(lhs, opKey, op); err != nil {
- return nil, err
- } else if exp != nil {
- ors = append(ors, exp)
- }
- }
- return ors, nil
-}
-
-// nolint:gocyclo // not complex just long
-func createExpressionFromOp(lhs IdentifierExpression, opKey string, op Op) (exp Expression, err error) {
- switch strings.ToLower(opKey) {
- case EqOp.String():
- exp = lhs.Eq(op[opKey])
- case NeqOp.String():
- exp = lhs.Neq(op[opKey])
- case IsOp.String():
- exp = lhs.Is(op[opKey])
- case IsNotOp.String():
- exp = lhs.IsNot(op[opKey])
- case GtOp.String():
- exp = lhs.Gt(op[opKey])
- case GteOp.String():
- exp = lhs.Gte(op[opKey])
- case LtOp.String():
- exp = lhs.Lt(op[opKey])
- case LteOp.String():
- exp = lhs.Lte(op[opKey])
- case InOp.String():
- exp = lhs.In(op[opKey])
- case NotInOp.String():
- exp = lhs.NotIn(op[opKey])
- case LikeOp.String():
- exp = lhs.Like(op[opKey])
- case NotLikeOp.String():
- exp = lhs.NotLike(op[opKey])
- case ILikeOp.String():
- exp = lhs.ILike(op[opKey])
- case NotILikeOp.String():
- exp = lhs.NotILike(op[opKey])
- case RegexpLikeOp.String():
- exp = lhs.RegexpLike(op[opKey])
- case RegexpNotLikeOp.String():
- exp = lhs.RegexpNotLike(op[opKey])
- case RegexpILikeOp.String():
- exp = lhs.RegexpILike(op[opKey])
- case RegexpNotILikeOp.String():
- exp = lhs.RegexpNotILike(op[opKey])
- case betweenStr:
- rangeVal, ok := op[opKey].(RangeVal)
- if ok {
- exp = lhs.Between(rangeVal)
- }
- case "notbetween":
- rangeVal, ok := op[opKey].(RangeVal)
- if ok {
- exp = lhs.NotBetween(rangeVal)
- }
- default:
- err = errors.New("unsupported expression type %s", opKey)
- }
- return exp, err
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/func.go b/vendor/github.com/doug-martin/goqu/v9/exp/func.go
deleted file mode 100644
index 0ab8cfd9495..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/func.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package exp
-
-type (
- sqlFunctionExpression struct {
- name string
- args []interface{}
- }
-)
-
-// Creates a new SQLFunctionExpression with the given name and arguments
-func NewSQLFunctionExpression(name string, args ...interface{}) SQLFunctionExpression {
- return sqlFunctionExpression{name: name, args: args}
-}
-
-func (sfe sqlFunctionExpression) Clone() Expression {
- return sqlFunctionExpression{name: sfe.name, args: sfe.args}
-}
-
-func (sfe sqlFunctionExpression) Expression() Expression { return sfe }
-
-func (sfe sqlFunctionExpression) Args() []interface{} { return sfe.args }
-
-func (sfe sqlFunctionExpression) Name() string { return sfe.name }
-
-func (sfe sqlFunctionExpression) As(val interface{}) AliasedExpression {
- return NewAliasExpression(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) Eq(val interface{}) BooleanExpression { return eq(sfe, val) }
-func (sfe sqlFunctionExpression) Neq(val interface{}) BooleanExpression { return neq(sfe, val) }
-
-func (sfe sqlFunctionExpression) Gt(val interface{}) BooleanExpression { return gt(sfe, val) }
-func (sfe sqlFunctionExpression) Gte(val interface{}) BooleanExpression { return gte(sfe, val) }
-func (sfe sqlFunctionExpression) Lt(val interface{}) BooleanExpression { return lt(sfe, val) }
-func (sfe sqlFunctionExpression) Lte(val interface{}) BooleanExpression { return lte(sfe, val) }
-
-func (sfe sqlFunctionExpression) Between(val RangeVal) RangeExpression { return between(sfe, val) }
-
-func (sfe sqlFunctionExpression) NotBetween(val RangeVal) RangeExpression {
- return notBetween(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) Like(val interface{}) BooleanExpression { return like(sfe, val) }
-func (sfe sqlFunctionExpression) NotLike(val interface{}) BooleanExpression { return notLike(sfe, val) }
-func (sfe sqlFunctionExpression) ILike(val interface{}) BooleanExpression { return iLike(sfe, val) }
-
-func (sfe sqlFunctionExpression) NotILike(val interface{}) BooleanExpression {
- return notILike(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) RegexpLike(val interface{}) BooleanExpression {
- return regexpLike(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) RegexpNotLike(val interface{}) BooleanExpression {
- return regexpNotLike(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) RegexpILike(val interface{}) BooleanExpression {
- return regexpILike(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) RegexpNotILike(val interface{}) BooleanExpression {
- return regexpNotILike(sfe, val)
-}
-
-func (sfe sqlFunctionExpression) In(vals ...interface{}) BooleanExpression { return in(sfe, vals...) }
-func (sfe sqlFunctionExpression) NotIn(vals ...interface{}) BooleanExpression {
- return notIn(sfe, vals...)
-}
-func (sfe sqlFunctionExpression) Is(val interface{}) BooleanExpression { return is(sfe, val) }
-func (sfe sqlFunctionExpression) IsNot(val interface{}) BooleanExpression { return isNot(sfe, val) }
-func (sfe sqlFunctionExpression) IsNull() BooleanExpression { return is(sfe, nil) }
-func (sfe sqlFunctionExpression) IsNotNull() BooleanExpression { return isNot(sfe, nil) }
-func (sfe sqlFunctionExpression) IsTrue() BooleanExpression { return is(sfe, true) }
-func (sfe sqlFunctionExpression) IsNotTrue() BooleanExpression { return isNot(sfe, true) }
-func (sfe sqlFunctionExpression) IsFalse() BooleanExpression { return is(sfe, false) }
-func (sfe sqlFunctionExpression) IsNotFalse() BooleanExpression { return isNot(sfe, false) }
-
-func (sfe sqlFunctionExpression) Over(we WindowExpression) SQLWindowFunctionExpression {
- return NewSQLWindowFunctionExpression(sfe, nil, we)
-}
-
-func (sfe sqlFunctionExpression) OverName(windowName IdentifierExpression) SQLWindowFunctionExpression {
- return NewSQLWindowFunctionExpression(sfe, windowName, nil)
-}
-
-func (sfe sqlFunctionExpression) Asc() OrderedExpression { return asc(sfe) }
-func (sfe sqlFunctionExpression) Desc() OrderedExpression { return desc(sfe) }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/ident.go b/vendor/github.com/doug-martin/goqu/v9/exp/ident.go
deleted file mode 100644
index aebbbd5a9bc..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/ident.go
+++ /dev/null
@@ -1,213 +0,0 @@
-package exp
-
-import (
- "strings"
-)
-
-type (
- identifier struct {
- schema string
- table string
- col interface{}
- }
-)
-
-var (
- tableAndColumnParts = 2
- schemaTableAndColumnIdentifierParts = 3
-)
-
-func ParseIdentifier(ident string) IdentifierExpression {
- parts := strings.Split(ident, ".")
- switch len(parts) {
- case tableAndColumnParts:
- return NewIdentifierExpression("", parts[0], parts[1])
- case schemaTableAndColumnIdentifierParts:
- return NewIdentifierExpression(parts[0], parts[1], parts[2])
- }
- return NewIdentifierExpression("", "", ident)
-}
-
-func NewIdentifierExpression(schema, table string, col interface{}) IdentifierExpression {
- return identifier{}.Schema(schema).Table(table).Col(col)
-}
-
-func (i identifier) clone() identifier {
- return identifier{schema: i.schema, table: i.table, col: i.col}
-}
-
-func (i identifier) Clone() Expression {
- return i.clone()
-}
-
-func (i identifier) IsQualified() bool {
- schema, table, col := i.schema, i.table, i.col
- switch c := col.(type) {
- case string:
- if c != "" {
- return len(table) > 0 || len(schema) > 0
- }
- default:
- if c != nil {
- return len(table) > 0 || len(schema) > 0
- }
- }
- if len(table) > 0 {
- return len(schema) > 0
- }
- return false
-}
-
-// Sets the table on the current identifier
-// I("col").Table("table") -> "table"."col" //postgres
-// I("col").Table("table") -> `table`.`col` //mysql
-// I("col").Table("table") -> `table`.`col` //sqlite3
-func (i identifier) Table(table string) IdentifierExpression {
- i.table = table
- return i
-}
-
-func (i identifier) GetTable() string {
- return i.table
-}
-
-// Sets the table on the current identifier
-// I("table").Schema("schema") -> "schema"."table" //postgres
-// I("col").Schema("table") -> `schema`.`table` //mysql
-// I("col").Schema("table") -> `schema`.`table` //sqlite3
-func (i identifier) Schema(schema string) IdentifierExpression {
- i.schema = schema
- return i
-}
-
-func (i identifier) GetSchema() string {
- return i.schema
-}
-
-// Sets the table on the current identifier
-// I("table").Col("col") -> "table"."col" //postgres
-// I("table").Schema("col") -> `table`.`col` //mysql
-// I("table").Schema("col") -> `table`.`col` //sqlite3
-func (i identifier) Col(col interface{}) IdentifierExpression {
- if col == "*" {
- i.col = Star()
- } else {
- i.col = col
- }
- return i
-}
-
-func (i identifier) Expression() Expression { return i }
-
-// Qualifies the epression with a * literal (e.g. "table".*)
-func (i identifier) All() IdentifierExpression { return i.Col("*") }
-
-func (i identifier) IsEmpty() bool {
- isEmpty := i.schema == "" && i.table == ""
- if isEmpty {
- switch t := i.col.(type) {
- case nil:
- return true
- case string:
- return t == ""
- default:
- return false
- }
- }
- return isEmpty
-}
-
-// Gets the column identifier
-func (i identifier) GetCol() interface{} { return i.col }
-
-// Used within updates to set a column value
-func (i identifier) Set(val interface{}) UpdateExpression { return set(i, val) }
-
-// Alias an identifier (e.g "my_col" AS "other_col")
-func (i identifier) As(val interface{}) AliasedExpression {
- if v, ok := val.(string); ok {
- ident := ParseIdentifier(v)
- if i.col != nil && i.col != "" {
- return NewAliasExpression(i, ident)
- }
- aliasCol := ident.GetCol()
- if i.table != "" {
- return NewAliasExpression(i, NewIdentifierExpression("", aliasCol.(string), nil))
- } else if i.schema != "" {
- return NewAliasExpression(i, NewIdentifierExpression(aliasCol.(string), "", nil))
- }
- }
- return NewAliasExpression(i, val)
-}
-
-// Returns a BooleanExpression for equality (e.g "my_col" = 1)
-func (i identifier) Eq(val interface{}) BooleanExpression { return eq(i, val) }
-
-// Returns a BooleanExpression for in equality (e.g "my_col" != 1)
-func (i identifier) Neq(val interface{}) BooleanExpression { return neq(i, val) }
-
-// Returns a BooleanExpression for checking that a identifier is greater than another value (e.g "my_col" > 1)
-func (i identifier) Gt(val interface{}) BooleanExpression { return gt(i, val) }
-
-// Returns a BooleanExpression for checking that a identifier is greater than or equal to another value
-// (e.g "my_col" >= 1)
-func (i identifier) Gte(val interface{}) BooleanExpression { return gte(i, val) }
-
-// Returns a BooleanExpression for checking that a identifier is less than another value (e.g "my_col" < 1)
-func (i identifier) Lt(val interface{}) BooleanExpression { return lt(i, val) }
-
-// Returns a BooleanExpression for checking that a identifier is less than or equal to another value
-// (e.g "my_col" <= 1)
-func (i identifier) Lte(val interface{}) BooleanExpression { return lte(i, val) }
-
-// Returns a BooleanExpression for bit inversion (e.g ~ "my_col")
-func (i identifier) BitwiseInversion() BitwiseExpression { return bitwiseInversion(i) }
-
-// Returns a BooleanExpression for bit OR (e.g "my_col" | 1)
-func (i identifier) BitwiseOr(val interface{}) BitwiseExpression { return bitwiseOr(i, val) }
-
-// Returns a BooleanExpression for bit AND (e.g "my_col" & 1)
-func (i identifier) BitwiseAnd(val interface{}) BitwiseExpression { return bitwiseAnd(i, val) }
-
-// Returns a BooleanExpression for bit XOR (e.g "my_col" ^ 1)
-func (i identifier) BitwiseXor(val interface{}) BitwiseExpression { return bitwiseXor(i, val) }
-
-// Returns a BooleanExpression for bit LEFT shift (e.g "my_col" << 1)
-func (i identifier) BitwiseLeftShift(val interface{}) BitwiseExpression {
- return bitwiseLeftShift(i, val)
-}
-
-// Returns a BooleanExpression for bit RIGHT shift (e.g "my_col" >> 1)
-func (i identifier) BitwiseRightShift(val interface{}) BitwiseExpression {
- return bitwiseRightShift(i, val)
-}
-
-// Returns a BooleanExpression for checking that a identifier is in a list of values or (e.g "my_col" > 1)
-func (i identifier) In(vals ...interface{}) BooleanExpression { return in(i, vals...) }
-func (i identifier) NotIn(vals ...interface{}) BooleanExpression { return notIn(i, vals...) }
-func (i identifier) Like(val interface{}) BooleanExpression { return like(i, val) }
-func (i identifier) NotLike(val interface{}) BooleanExpression { return notLike(i, val) }
-func (i identifier) ILike(val interface{}) BooleanExpression { return iLike(i, val) }
-func (i identifier) NotILike(val interface{}) BooleanExpression { return notILike(i, val) }
-func (i identifier) RegexpLike(val interface{}) BooleanExpression { return regexpLike(i, val) }
-func (i identifier) RegexpNotLike(val interface{}) BooleanExpression { return regexpNotLike(i, val) }
-func (i identifier) RegexpILike(val interface{}) BooleanExpression { return regexpILike(i, val) }
-func (i identifier) RegexpNotILike(val interface{}) BooleanExpression { return regexpNotILike(i, val) }
-func (i identifier) Is(val interface{}) BooleanExpression { return is(i, val) }
-func (i identifier) IsNot(val interface{}) BooleanExpression { return isNot(i, val) }
-func (i identifier) IsNull() BooleanExpression { return is(i, nil) }
-func (i identifier) IsNotNull() BooleanExpression { return isNot(i, nil) }
-func (i identifier) IsTrue() BooleanExpression { return is(i, true) }
-func (i identifier) IsNotTrue() BooleanExpression { return isNot(i, true) }
-func (i identifier) IsFalse() BooleanExpression { return is(i, false) }
-func (i identifier) IsNotFalse() BooleanExpression { return isNot(i, false) }
-func (i identifier) Asc() OrderedExpression { return asc(i) }
-func (i identifier) Desc() OrderedExpression { return desc(i) }
-func (i identifier) Distinct() SQLFunctionExpression { return NewSQLFunctionExpression("DISTINCT", i) }
-func (i identifier) Cast(t string) CastExpression { return NewCastExpression(i, t) }
-
-// Returns a RangeExpression for checking that a identifier is between two values (e.g "my_col" BETWEEN 1 AND 10)
-func (i identifier) Between(val RangeVal) RangeExpression { return between(i, val) }
-
-// Returns a RangeExpression for checking that a identifier is between two values (e.g "my_col" BETWEEN 1 AND 10)
-func (i identifier) NotBetween(val RangeVal) RangeExpression { return notBetween(i, val) }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/insert.go b/vendor/github.com/doug-martin/goqu/v9/exp/insert.go
deleted file mode 100644
index 7f58b3cd0bd..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/insert.go
+++ /dev/null
@@ -1,163 +0,0 @@
-package exp
-
-import (
- "reflect"
- "sort"
-
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type (
- insert struct {
- from AppendableExpression
- cols ColumnListExpression
- vals [][]interface{}
- }
-)
-
-func NewInsertExpression(rows ...interface{}) (insertExpression InsertExpression, err error) {
- switch len(rows) {
- case 0:
- return new(insert), nil
- case 1:
- val := reflect.ValueOf(rows[0])
- if val.Kind() == reflect.Slice {
- vals := make([]interface{}, 0, val.Len())
- for i := 0; i < val.Len(); i++ {
- vals = append(vals, val.Index(i).Interface())
- }
- return NewInsertExpression(vals...)
- }
- if ae, ok := rows[0].(AppendableExpression); ok {
- return &insert{from: ae}, nil
- }
- }
- return newInsert(rows...)
-}
-
-func (i *insert) Expression() Expression {
- return i
-}
-
-func (i *insert) Clone() Expression {
- return i.clone()
-}
-
-func (i *insert) clone() *insert {
- return &insert{from: i.from, cols: i.cols, vals: i.vals}
-}
-
-func (i *insert) IsEmpty() bool {
- return i.from == nil && (i.cols == nil || i.cols.IsEmpty())
-}
-
-func (i *insert) IsInsertFrom() bool {
- return i.from != nil
-}
-
-func (i *insert) From() AppendableExpression {
- return i.from
-}
-
-func (i *insert) Cols() ColumnListExpression {
- return i.cols
-}
-
-func (i *insert) SetCols(cols ColumnListExpression) InsertExpression {
- ci := i.clone()
- ci.cols = cols
- return ci
-}
-
-func (i *insert) Vals() [][]interface{} {
- return i.vals
-}
-
-func (i *insert) SetVals(vals [][]interface{}) InsertExpression {
- ci := i.clone()
- ci.vals = vals
- return ci
-}
-
-// parses the rows gathering and sorting unique columns and values for each record
-func newInsert(rows ...interface{}) (insertExp InsertExpression, err error) {
- var mapKeys util.ValueSlice
- rowValue := reflect.Indirect(reflect.ValueOf(rows[0]))
- rowType := rowValue.Type()
- rowKind := rowValue.Kind()
- if rowKind == reflect.Struct {
- return createStructSliceInsert(rows...)
- }
- vals := make([][]interface{}, 0, len(rows))
- var columns ColumnListExpression
- for _, row := range rows {
- if rowType != reflect.Indirect(reflect.ValueOf(row)).Type() {
- return nil, errors.New(
- "rows must be all the same type expected %+v got %+v",
- rowType,
- reflect.Indirect(reflect.ValueOf(row)).Type(),
- )
- }
- newRowValue := reflect.Indirect(reflect.ValueOf(row))
- switch rowKind {
- case reflect.Map:
- if columns == nil {
- mapKeys = util.ValueSlice(newRowValue.MapKeys())
- sort.Sort(mapKeys)
- colKeys := make([]interface{}, 0, len(mapKeys))
- for _, key := range mapKeys {
- colKeys = append(colKeys, key.Interface())
- }
- columns = NewColumnListExpression(colKeys...)
- }
- newMapKeys := util.ValueSlice(newRowValue.MapKeys())
- if len(newMapKeys) != len(mapKeys) {
- return nil, errors.New("rows with different value length expected %d got %d", len(mapKeys), len(newMapKeys))
- }
- if !mapKeys.Equal(newMapKeys) {
- return nil, errors.New("rows with different keys expected %s got %s", mapKeys.String(), newMapKeys.String())
- }
- rowVals := make([]interface{}, 0, len(mapKeys))
- for _, key := range mapKeys {
- rowVals = append(rowVals, newRowValue.MapIndex(key).Interface())
- }
- vals = append(vals, rowVals)
- default:
- return nil, errors.New(
- "unsupported insert must be map, goqu.Record, or struct type got: %T",
- row,
- )
- }
- }
- return &insert{cols: columns, vals: vals}, nil
-}
-
-func createStructSliceInsert(rows ...interface{}) (insertExp InsertExpression, err error) {
- rowValue := reflect.Indirect(reflect.ValueOf(rows[0]))
- rowType := rowValue.Type()
- recordRows := make([]interface{}, 0, len(rows))
- for _, row := range rows {
- if rowType != reflect.Indirect(reflect.ValueOf(row)).Type() {
- return nil, errors.New(
- "rows must be all the same type expected %+v got %+v",
- rowType,
- reflect.Indirect(reflect.ValueOf(row)).Type(),
- )
- }
- newRowValue := reflect.Indirect(reflect.ValueOf(row))
- record, err := getFieldsValuesFromStruct(newRowValue)
- if err != nil {
- return nil, err
- }
- recordRows = append(recordRows, record)
- }
- return newInsert(recordRows...)
-}
-
-func getFieldsValuesFromStruct(value reflect.Value) (row Record, err error) {
- if value.IsValid() {
- return NewRecordFromStruct(value.Interface(), true, false)
- }
- return
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/insert_clauses.go b/vendor/github.com/doug-martin/goqu/v9/exp/insert_clauses.go
deleted file mode 100644
index ac7a330d3d0..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/insert_clauses.go
+++ /dev/null
@@ -1,205 +0,0 @@
-package exp
-
-type (
- InsertClauses interface {
- CommonTables() []CommonTableExpression
- CommonTablesAppend(cte CommonTableExpression) InsertClauses
-
- HasInto() bool
- clone() *insertClauses
-
- Cols() ColumnListExpression
- HasCols() bool
- ColsAppend(cols ColumnListExpression) InsertClauses
- SetCols(cols ColumnListExpression) InsertClauses
-
- Into() Expression
- SetInto(cl Expression) InsertClauses
-
- Returning() ColumnListExpression
- HasReturning() bool
- SetReturning(cl ColumnListExpression) InsertClauses
-
- From() AppendableExpression
- HasFrom() bool
- SetFrom(ae AppendableExpression) InsertClauses
-
- Rows() []interface{}
- HasRows() bool
- SetRows(rows []interface{}) InsertClauses
-
- HasAlias() bool
- Alias() IdentifierExpression
- SetAlias(ie IdentifierExpression) InsertClauses
-
- Vals() [][]interface{}
- HasVals() bool
- SetVals(vals [][]interface{}) InsertClauses
- ValsAppend(vals [][]interface{}) InsertClauses
-
- OnConflict() ConflictExpression
- SetOnConflict(expression ConflictExpression) InsertClauses
- }
- insertClauses struct {
- commonTables []CommonTableExpression
- cols ColumnListExpression
- into Expression
- returning ColumnListExpression
- alias IdentifierExpression
- rows []interface{}
- values [][]interface{}
- from AppendableExpression
- conflict ConflictExpression
- }
-)
-
-func NewInsertClauses() InsertClauses {
- return &insertClauses{}
-}
-
-func (ic *insertClauses) HasInto() bool {
- return ic.into != nil
-}
-
-func (ic *insertClauses) clone() *insertClauses {
- return &insertClauses{
- commonTables: ic.commonTables,
- cols: ic.cols,
- into: ic.into,
- returning: ic.returning,
- alias: ic.alias,
- rows: ic.rows,
- values: ic.values,
- from: ic.from,
- conflict: ic.conflict,
- }
-}
-
-func (ic *insertClauses) CommonTables() []CommonTableExpression {
- return ic.commonTables
-}
-
-func (ic *insertClauses) CommonTablesAppend(cte CommonTableExpression) InsertClauses {
- ret := ic.clone()
- ret.commonTables = append(ret.commonTables, cte)
- return ret
-}
-
-func (ic *insertClauses) Cols() ColumnListExpression {
- return ic.cols
-}
-
-func (ic *insertClauses) HasCols() bool {
- return ic.cols != nil && !ic.cols.IsEmpty()
-}
-
-func (ic *insertClauses) ColsAppend(cl ColumnListExpression) InsertClauses {
- ret := ic.clone()
- ret.cols = ret.cols.Append(cl.Columns()...)
- return ret
-}
-
-func (ic *insertClauses) SetCols(cl ColumnListExpression) InsertClauses {
- ret := ic.clone()
- ret.cols = cl
- return ret
-}
-
-func (ic *insertClauses) Into() Expression {
- return ic.into
-}
-
-func (ic *insertClauses) SetInto(into Expression) InsertClauses {
- ret := ic.clone()
- ret.into = into
- return ret
-}
-
-func (ic *insertClauses) Returning() ColumnListExpression {
- return ic.returning
-}
-
-func (ic *insertClauses) HasReturning() bool {
- return ic.returning != nil && !ic.returning.IsEmpty()
-}
-
-func (ic *insertClauses) HasAlias() bool {
- return ic.alias != nil
-}
-
-func (ic *insertClauses) Alias() IdentifierExpression {
- return ic.alias
-}
-
-func (ic *insertClauses) SetAlias(ie IdentifierExpression) InsertClauses {
- ret := ic.clone()
- ret.alias = ie
- return ret
-}
-
-func (ic *insertClauses) SetReturning(cl ColumnListExpression) InsertClauses {
- ret := ic.clone()
- ret.returning = cl
- return ret
-}
-
-func (ic *insertClauses) From() AppendableExpression {
- return ic.from
-}
-
-func (ic *insertClauses) HasFrom() bool {
- return ic.from != nil
-}
-
-func (ic *insertClauses) SetFrom(ae AppendableExpression) InsertClauses {
- ret := ic.clone()
- ret.from = ae
- return ret
-}
-
-func (ic *insertClauses) Rows() []interface{} {
- return ic.rows
-}
-
-func (ic *insertClauses) HasRows() bool {
- return ic.rows != nil && len(ic.rows) > 0
-}
-
-func (ic *insertClauses) SetRows(rows []interface{}) InsertClauses {
- ret := ic.clone()
- ret.rows = rows
- return ret
-}
-
-func (ic *insertClauses) Vals() [][]interface{} {
- return ic.values
-}
-
-func (ic *insertClauses) HasVals() bool {
- return ic.values != nil && len(ic.values) > 0
-}
-
-func (ic *insertClauses) SetVals(vals [][]interface{}) InsertClauses {
- ret := ic.clone()
- ret.values = vals
- return ret
-}
-
-func (ic *insertClauses) ValsAppend(vals [][]interface{}) InsertClauses {
- ret := ic.clone()
- newVals := make([][]interface{}, 0, len(ic.values)+len(vals))
- newVals = append(newVals, ic.values...)
- newVals = append(newVals, vals...)
- ret.values = newVals
- return ret
-}
-
-func (ic *insertClauses) OnConflict() ConflictExpression {
- return ic.conflict
-}
-
-func (ic *insertClauses) SetOnConflict(expression ConflictExpression) InsertClauses {
- ret := ic.clone()
- ret.conflict = expression
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/join.go b/vendor/github.com/doug-martin/goqu/v9/exp/join.go
deleted file mode 100644
index 722858ed77f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/join.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package exp
-
-type (
- joinExpression struct {
- isConditioned bool
- // The JoinType
- joinType JoinType
- // The table expressions (e.g. LEFT JOIN "my_table", ON (....))
- table Expression
- }
- // Container for all joins within a dataset
- conditionedJoin struct {
- joinExpression
- // The condition to join (e.g. USING("a", "b"), ON("my_table"."fkey" = "other_table"."id")
- condition JoinCondition
- }
- JoinExpressions []JoinExpression
-)
-
-func NewUnConditionedJoinExpression(joinType JoinType, table Expression) JoinExpression {
- return joinExpression{
- joinType: joinType,
- table: table,
- isConditioned: false,
- }
-}
-
-func (je joinExpression) Clone() Expression {
- return je
-}
-
-func (je joinExpression) Expression() Expression {
- return je
-}
-
-func (je joinExpression) IsConditioned() bool {
- return je.isConditioned
-}
-
-func (je joinExpression) JoinType() JoinType {
- return je.joinType
-}
-
-func (je joinExpression) Table() Expression {
- return je.table
-}
-
-func NewConditionedJoinExpression(joinType JoinType, table Expression, condition JoinCondition) ConditionedJoinExpression {
- return conditionedJoin{
- joinExpression: joinExpression{
- joinType: joinType,
- table: table,
- isConditioned: true,
- },
- condition: condition,
- }
-}
-
-func (je conditionedJoin) Clone() Expression {
- return je
-}
-
-func (je conditionedJoin) Expression() Expression {
- return je
-}
-
-func (je conditionedJoin) Condition() JoinCondition {
- return je.condition
-}
-
-func (je conditionedJoin) IsConditionEmpty() bool {
- return je.condition == nil || je.condition.IsEmpty()
-}
-
-func (jes JoinExpressions) Clone() JoinExpressions {
- ret := make(JoinExpressions, 0, len(jes))
- for _, jc := range jes {
- ret = append(ret, jc.Clone().(JoinExpression))
- }
- return ret
-}
-
-type (
- JoinConditionType int
- JoinCondition interface {
- Type() JoinConditionType
- IsEmpty() bool
- }
- JoinOnCondition interface {
- JoinCondition
- On() ExpressionList
- }
- JoinUsingCondition interface {
- JoinCondition
- Using() ColumnListExpression
- }
- joinOnCondition struct {
- on ExpressionList
- }
-
- joinUsingCondition struct {
- using ColumnListExpression
- }
-)
-
-// Creates a new ON clause to be used within a join
-// ds.Join(I("my_table"), On(I("my_table.fkey").Eq(I("other_table.id")))
-func NewJoinOnCondition(expressions ...Expression) JoinCondition {
- return joinOnCondition{on: NewExpressionList(AndType, expressions...)}
-}
-
-func (joc joinOnCondition) Type() JoinConditionType {
- return OnJoinCondType
-}
-
-func (joc joinOnCondition) On() ExpressionList {
- return joc.on
-}
-
-func (joc joinOnCondition) IsEmpty() bool {
- return len(joc.on.Expressions()) == 0
-}
-
-// Creates a new USING clause to be used within a join
-func NewJoinUsingCondition(expressions ...interface{}) JoinCondition {
- return joinUsingCondition{using: NewColumnListExpression(expressions...)}
-}
-
-func (juc joinUsingCondition) Type() JoinConditionType {
- return UsingJoinCondType
-}
-
-func (juc joinUsingCondition) Using() ColumnListExpression {
- return juc.using
-}
-
-func (juc joinUsingCondition) IsEmpty() bool {
- return len(juc.using.Columns()) == 0
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/lateral.go b/vendor/github.com/doug-martin/goqu/v9/exp/lateral.go
deleted file mode 100644
index a3cd01314d9..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/lateral.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package exp
-
-type (
- lateral struct {
- table AppendableExpression
- }
-)
-
-// Creates a new SQL lateral expression
-// L(From("test")) -> LATERAL (SELECT * FROM "tests")
-func NewLateralExpression(table AppendableExpression) LateralExpression {
- return lateral{table: table}
-}
-
-func (l lateral) Clone() Expression {
- return NewLateralExpression(l.table)
-}
-
-func (l lateral) Table() AppendableExpression {
- return l.table
-}
-
-func (l lateral) Expression() Expression { return l }
-func (l lateral) As(val interface{}) AliasedExpression { return NewAliasExpression(l, val) }
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/literal.go b/vendor/github.com/doug-martin/goqu/v9/exp/literal.go
deleted file mode 100644
index da087751bfb..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/literal.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package exp
-
-type (
- literal struct {
- literal string
- args []interface{}
- }
-)
-
-// Creates a new SQL literal with the provided arguments.
-// L("a = 1") -> a = 1
-// You can also you placeholders. All placeholders within a Literal are represented by '?'
-// L("a = ?", "b") -> a = 'b'
-// Literals can also contain placeholders for other expressions
-// L("(? AND ?) OR (?)", I("a").Eq(1), I("b").Eq("b"), I("c").In([]string{"a", "b", "c"}))
-func NewLiteralExpression(sql string, args ...interface{}) LiteralExpression {
- return literal{literal: sql, args: args}
-}
-
-// Returns a literal for the '*' operator
-func Star() LiteralExpression {
- return NewLiteralExpression("*")
-}
-
-// Returns a literal for the 'DEFAULT'
-func Default() LiteralExpression {
- return NewLiteralExpression("DEFAULT")
-}
-
-func (l literal) Clone() Expression {
- return NewLiteralExpression(l.literal, l.args...)
-}
-
-func (l literal) Literal() string {
- return l.literal
-}
-
-func (l literal) Args() []interface{} {
- return l.args
-}
-
-func (l literal) Expression() Expression { return l }
-func (l literal) As(val interface{}) AliasedExpression { return NewAliasExpression(l, val) }
-func (l literal) Eq(val interface{}) BooleanExpression { return eq(l, val) }
-func (l literal) Neq(val interface{}) BooleanExpression { return neq(l, val) }
-func (l literal) Gt(val interface{}) BooleanExpression { return gt(l, val) }
-func (l literal) Gte(val interface{}) BooleanExpression { return gte(l, val) }
-func (l literal) Lt(val interface{}) BooleanExpression { return lt(l, val) }
-func (l literal) Lte(val interface{}) BooleanExpression { return lte(l, val) }
-func (l literal) Asc() OrderedExpression { return asc(l) }
-func (l literal) Desc() OrderedExpression { return desc(l) }
-func (l literal) Between(val RangeVal) RangeExpression { return between(l, val) }
-func (l literal) NotBetween(val RangeVal) RangeExpression { return notBetween(l, val) }
-func (l literal) Like(val interface{}) BooleanExpression { return like(l, val) }
-func (l literal) NotLike(val interface{}) BooleanExpression { return notLike(l, val) }
-func (l literal) ILike(val interface{}) BooleanExpression { return iLike(l, val) }
-func (l literal) NotILike(val interface{}) BooleanExpression { return notILike(l, val) }
-func (l literal) RegexpLike(val interface{}) BooleanExpression { return regexpLike(l, val) }
-func (l literal) RegexpNotLike(val interface{}) BooleanExpression { return regexpNotLike(l, val) }
-func (l literal) RegexpILike(val interface{}) BooleanExpression { return regexpILike(l, val) }
-func (l literal) RegexpNotILike(val interface{}) BooleanExpression { return regexpNotILike(l, val) }
-func (l literal) In(vals ...interface{}) BooleanExpression { return in(l, vals...) }
-func (l literal) NotIn(vals ...interface{}) BooleanExpression { return notIn(l, vals...) }
-func (l literal) Is(val interface{}) BooleanExpression { return is(l, val) }
-func (l literal) IsNot(val interface{}) BooleanExpression { return isNot(l, val) }
-func (l literal) IsNull() BooleanExpression { return is(l, nil) }
-func (l literal) IsNotNull() BooleanExpression { return isNot(l, nil) }
-func (l literal) IsTrue() BooleanExpression { return is(l, true) }
-func (l literal) IsNotTrue() BooleanExpression { return isNot(l, true) }
-func (l literal) IsFalse() BooleanExpression { return is(l, false) }
-func (l literal) IsNotFalse() BooleanExpression { return isNot(l, false) }
-
-func (l literal) BitwiseInversion() BitwiseExpression { return bitwiseInversion(l) }
-func (l literal) BitwiseOr(val interface{}) BitwiseExpression { return bitwiseOr(l, val) }
-func (l literal) BitwiseAnd(val interface{}) BitwiseExpression { return bitwiseAnd(l, val) }
-func (l literal) BitwiseXor(val interface{}) BitwiseExpression { return bitwiseXor(l, val) }
-func (l literal) BitwiseLeftShift(val interface{}) BitwiseExpression { return bitwiseLeftShift(l, val) }
-func (l literal) BitwiseRightShift(val interface{}) BitwiseExpression {
- return bitwiseRightShift(l, val)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/lock.go b/vendor/github.com/doug-martin/goqu/v9/exp/lock.go
deleted file mode 100644
index 9b8bf72e33f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/lock.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package exp
-
-type (
- LockStrength int
- WaitOption int
- Lock interface {
- Strength() LockStrength
- WaitOption() WaitOption
- Of() []IdentifierExpression
- }
- lock struct {
- strength LockStrength
- waitOption WaitOption
- of []IdentifierExpression
- }
-)
-
-const (
- ForNolock LockStrength = iota
- ForUpdate
- ForNoKeyUpdate
- ForShare
- ForKeyShare
-
- Wait WaitOption = iota
- NoWait
- SkipLocked
-)
-
-func NewLock(strength LockStrength, option WaitOption, of ...IdentifierExpression) Lock {
- return lock{
- strength: strength,
- waitOption: option,
- of: of,
- }
-}
-
-func (l lock) Strength() LockStrength {
- return l.strength
-}
-
-func (l lock) WaitOption() WaitOption {
- return l.waitOption
-}
-
-func (l lock) Of() []IdentifierExpression {
- return l.of
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/order.go b/vendor/github.com/doug-martin/goqu/v9/exp/order.go
deleted file mode 100644
index 640f1f66537..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/order.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package exp
-
-type (
- orderedExpression struct {
- sortExpression Expression
- direction SortDirection
- nullSortType NullSortType
- }
-)
-
-// used internally to create a new SORT_ASC OrderedExpression
-func asc(exp Expression) OrderedExpression {
- return NewOrderedExpression(exp, AscDir, NoNullsSortType)
-}
-
-// used internally to create a new SORT_DESC OrderedExpression
-func desc(exp Expression) OrderedExpression {
- return NewOrderedExpression(exp, DescSortDir, NoNullsSortType)
-}
-
-// used internally to create a new SORT_ASC OrderedExpression
-func NewOrderedExpression(exp Expression, direction SortDirection, sortType NullSortType) OrderedExpression {
- return orderedExpression{sortExpression: exp, direction: direction, nullSortType: sortType}
-}
-
-func (oe orderedExpression) Clone() Expression {
- return NewOrderedExpression(oe.sortExpression, oe.direction, oe.nullSortType)
-}
-
-func (oe orderedExpression) Expression() Expression {
- return oe
-}
-
-func (oe orderedExpression) SortExpression() Expression {
- return oe.sortExpression
-}
-
-func (oe orderedExpression) IsAsc() bool {
- return oe.direction == AscDir
-}
-
-func (oe orderedExpression) NullSortType() NullSortType {
- return oe.nullSortType
-}
-
-func (oe orderedExpression) NullsFirst() OrderedExpression {
- return NewOrderedExpression(oe.sortExpression, oe.direction, NullsFirstSortType)
-}
-
-func (oe orderedExpression) NullsLast() OrderedExpression {
- return NewOrderedExpression(oe.sortExpression, oe.direction, NullsLastSortType)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/range.go b/vendor/github.com/doug-martin/goqu/v9/exp/range.go
deleted file mode 100644
index be167eed149..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/range.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package exp
-
-type (
- ranged struct {
- lhs Expression
- rhs RangeVal
- op RangeOperation
- }
- rangeVal struct {
- start interface{}
- end interface{}
- }
-)
-
-// used internally to create an BETWEEN comparison RangeExpression
-func between(lhs Expression, rhs RangeVal) RangeExpression {
- return NewRangeExpression(BetweenOp, lhs, rhs)
-}
-
-// used internally to create an NOT BETWEEN comparison RangeExpression
-func notBetween(lhs Expression, rhs RangeVal) RangeExpression {
- return NewRangeExpression(NotBetweenOp, lhs, rhs)
-}
-
-func NewRangeExpression(op RangeOperation, lhs Expression, rhs RangeVal) RangeExpression {
- return ranged{op: op, lhs: lhs, rhs: rhs}
-}
-
-func (r ranged) Clone() Expression {
- return NewRangeExpression(r.op, r.lhs.Clone(), r.rhs)
-}
-
-func (r ranged) Expression() Expression {
- return r
-}
-
-func (r ranged) RHS() RangeVal {
- return r.rhs
-}
-
-func (r ranged) LHS() Expression {
- return r.lhs
-}
-
-func (r ranged) Op() RangeOperation {
- return r.op
-}
-
-// Creates a new Range to be used with a Between expression
-// exp.C("col").Between(exp.Range(1, 10))
-func NewRangeVal(start, end interface{}) RangeVal {
- return rangeVal{start: start, end: end}
-}
-
-func (rv rangeVal) Start() interface{} {
- return rv.start
-}
-
-func (rv rangeVal) End() interface{} {
- return rv.end
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/record.go b/vendor/github.com/doug-martin/goqu/v9/exp/record.go
deleted file mode 100644
index 80b99ae03a8..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/record.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package exp
-
-import (
- "reflect"
- "sort"
-
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-// Alternative to writing map[string]interface{}. Can be used for Inserts, Updates or Deletes
-type Record map[string]interface{}
-
-func (r Record) Cols() []string {
- cols := make([]string, 0, len(r))
- for col := range r {
- cols = append(cols, col)
- }
- sort.Strings(cols)
- return cols
-}
-
-func NewRecordFromStruct(i interface{}, forInsert, forUpdate bool) (r Record, err error) {
- value := reflect.ValueOf(i)
- if value.IsValid() {
- cm, err := util.GetColumnMap(value.Interface())
- if err != nil {
- return nil, err
- }
- cols := cm.Cols()
- r = make(map[string]interface{}, len(cols))
- for _, col := range cols {
- f := cm[col]
- if !shouldSkipField(f, forInsert, forUpdate) {
- if ok, fieldVal := getFieldValue(value, f); ok {
- r[f.ColumnName] = fieldVal
- }
- }
- }
- }
- return
-}
-
-func shouldSkipField(f util.ColumnData, forInsert, forUpdate bool) bool {
- shouldSkipInsert := forInsert && !f.ShouldInsert
- shouldSkipUpdate := forUpdate && !f.ShouldUpdate
- return shouldSkipInsert || shouldSkipUpdate
-}
-
-func getFieldValue(val reflect.Value, f util.ColumnData) (ok bool, fieldVal interface{}) {
- if v, isAvailable := util.SafeGetFieldByIndex(val, f.FieldIndex); !isAvailable {
- return false, nil
- } else if f.DefaultIfEmpty && util.IsEmptyValue(v) {
- return true, Default()
- } else if v.IsValid() {
- return true, v.Interface()
- } else {
- return true, reflect.Zero(f.GoType).Interface()
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/select_clauses.go b/vendor/github.com/doug-martin/goqu/v9/exp/select_clauses.go
deleted file mode 100644
index f802a88b757..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/select_clauses.go
+++ /dev/null
@@ -1,379 +0,0 @@
-package exp
-
-type (
- SelectClauses interface {
- HasSources() bool
- IsDefaultSelect() bool
- clone() *selectClauses
-
- Select() ColumnListExpression
- SelectAppend(cl ColumnListExpression) SelectClauses
- SetSelect(cl ColumnListExpression) SelectClauses
-
- Distinct() ColumnListExpression
- SetDistinct(cle ColumnListExpression) SelectClauses
-
- From() ColumnListExpression
- SetFrom(cl ColumnListExpression) SelectClauses
-
- HasAlias() bool
- Alias() IdentifierExpression
- SetAlias(ie IdentifierExpression) SelectClauses
-
- Joins() JoinExpressions
- JoinsAppend(jc JoinExpression) SelectClauses
-
- Where() ExpressionList
- ClearWhere() SelectClauses
- WhereAppend(expressions ...Expression) SelectClauses
-
- Having() ExpressionList
- ClearHaving() SelectClauses
- HavingAppend(expressions ...Expression) SelectClauses
-
- Order() ColumnListExpression
- HasOrder() bool
- ClearOrder() SelectClauses
- SetOrder(oes ...OrderedExpression) SelectClauses
- OrderAppend(...OrderedExpression) SelectClauses
- OrderPrepend(...OrderedExpression) SelectClauses
-
- GroupBy() ColumnListExpression
- SetGroupBy(cl ColumnListExpression) SelectClauses
- GroupByAppend(cl ColumnListExpression) SelectClauses
-
- Limit() interface{}
- HasLimit() bool
- ClearLimit() SelectClauses
- SetLimit(limit interface{}) SelectClauses
-
- Offset() uint
- ClearOffset() SelectClauses
- SetOffset(offset uint) SelectClauses
-
- Compounds() []CompoundExpression
- CompoundsAppend(ce CompoundExpression) SelectClauses
-
- Lock() Lock
- SetLock(l Lock) SelectClauses
-
- CommonTables() []CommonTableExpression
- CommonTablesAppend(cte CommonTableExpression) SelectClauses
-
- Windows() []WindowExpression
- SetWindows(ws []WindowExpression) SelectClauses
- WindowsAppend(ws ...WindowExpression) SelectClauses
- ClearWindows() SelectClauses
- }
- selectClauses struct {
- commonTables []CommonTableExpression
- selectColumns ColumnListExpression
- distinct ColumnListExpression
- from ColumnListExpression
- joins JoinExpressions
- where ExpressionList
- alias IdentifierExpression
- groupBy ColumnListExpression
- having ExpressionList
- order ColumnListExpression
- limit interface{}
- offset uint
- compounds []CompoundExpression
- lock Lock
- windows []WindowExpression
- }
-)
-
-func NewSelectClauses() SelectClauses {
- return &selectClauses{
- selectColumns: NewColumnListExpression(Star()),
- }
-}
-
-func (c *selectClauses) HasSources() bool {
- return c.from != nil && len(c.from.Columns()) > 0
-}
-
-func (c *selectClauses) IsDefaultSelect() bool {
- ret := false
- if c.selectColumns != nil {
- selects := c.selectColumns.Columns()
- if len(selects) == 1 {
- if l, ok := selects[0].(LiteralExpression); ok && l.Literal() == "*" {
- ret = true
- }
- }
- }
- return ret
-}
-
-func (c *selectClauses) clone() *selectClauses {
- return &selectClauses{
- commonTables: c.commonTables,
- selectColumns: c.selectColumns,
- distinct: c.distinct,
- from: c.from,
- joins: c.joins[0:len(c.joins):len(c.joins)],
- where: c.where,
- alias: c.alias,
- groupBy: c.groupBy,
- having: c.having,
- order: c.order,
- limit: c.limit,
- offset: c.offset,
- compounds: c.compounds,
- lock: c.lock,
- windows: c.windows,
- }
-}
-
-func (c *selectClauses) CommonTables() []CommonTableExpression {
- return c.commonTables
-}
-
-func (c *selectClauses) CommonTablesAppend(cte CommonTableExpression) SelectClauses {
- ret := c.clone()
- ret.commonTables = append(ret.commonTables, cte)
- return ret
-}
-
-func (c *selectClauses) Select() ColumnListExpression {
- return c.selectColumns
-}
-
-func (c *selectClauses) SelectAppend(cl ColumnListExpression) SelectClauses {
- ret := c.clone()
- ret.selectColumns = ret.selectColumns.Append(cl.Columns()...)
- return ret
-}
-
-func (c *selectClauses) SetSelect(cl ColumnListExpression) SelectClauses {
- ret := c.clone()
- ret.selectColumns = cl
- return ret
-}
-
-func (c *selectClauses) Distinct() ColumnListExpression {
- return c.distinct
-}
-
-func (c *selectClauses) SetDistinct(cle ColumnListExpression) SelectClauses {
- ret := c.clone()
- ret.distinct = cle
- return ret
-}
-
-func (c *selectClauses) From() ColumnListExpression {
- return c.from
-}
-
-func (c *selectClauses) SetFrom(cl ColumnListExpression) SelectClauses {
- ret := c.clone()
- ret.from = cl
- return ret
-}
-
-func (c *selectClauses) HasAlias() bool {
- return c.alias != nil
-}
-
-func (c *selectClauses) Alias() IdentifierExpression {
- return c.alias
-}
-
-func (c *selectClauses) SetAlias(ie IdentifierExpression) SelectClauses {
- ret := c.clone()
- ret.alias = ie
- return ret
-}
-
-func (c *selectClauses) Joins() JoinExpressions {
- return c.joins
-}
-
-func (c *selectClauses) JoinsAppend(jc JoinExpression) SelectClauses {
- ret := c.clone()
- ret.joins = append(ret.joins, jc)
- return ret
-}
-
-func (c *selectClauses) Where() ExpressionList {
- return c.where
-}
-
-func (c *selectClauses) ClearWhere() SelectClauses {
- ret := c.clone()
- ret.where = nil
- return ret
-}
-
-func (c *selectClauses) WhereAppend(expressions ...Expression) SelectClauses {
- if len(expressions) == 0 {
- return c
- }
- ret := c.clone()
- if ret.where == nil {
- ret.where = NewExpressionList(AndType, expressions...)
- } else {
- ret.where = ret.where.Append(expressions...)
- }
- return ret
-}
-
-func (c *selectClauses) Having() ExpressionList {
- return c.having
-}
-
-func (c *selectClauses) ClearHaving() SelectClauses {
- ret := c.clone()
- ret.having = nil
- return ret
-}
-
-func (c *selectClauses) HavingAppend(expressions ...Expression) SelectClauses {
- if len(expressions) == 0 {
- return c
- }
- ret := c.clone()
- if ret.having == nil {
- ret.having = NewExpressionList(AndType, expressions...)
- } else {
- ret.having = ret.having.Append(expressions...)
- }
- return ret
-}
-
-func (c *selectClauses) Lock() Lock {
- return c.lock
-}
-
-func (c *selectClauses) SetLock(l Lock) SelectClauses {
- ret := c.clone()
- ret.lock = l
- return ret
-}
-
-func (c *selectClauses) Order() ColumnListExpression {
- return c.order
-}
-
-func (c *selectClauses) HasOrder() bool {
- return c.order != nil
-}
-
-func (c *selectClauses) ClearOrder() SelectClauses {
- ret := c.clone()
- ret.order = nil
- return ret
-}
-
-func (c *selectClauses) SetOrder(oes ...OrderedExpression) SelectClauses {
- ret := c.clone()
- ret.order = NewOrderedColumnList(oes...)
- return ret
-}
-
-func (c *selectClauses) OrderAppend(oes ...OrderedExpression) SelectClauses {
- if c.order == nil {
- return c.SetOrder(oes...)
- }
- ret := c.clone()
- ret.order = ret.order.Append(NewOrderedColumnList(oes...).Columns()...)
- return ret
-}
-
-func (c *selectClauses) OrderPrepend(oes ...OrderedExpression) SelectClauses {
- if c.order == nil {
- return c.SetOrder(oes...)
- }
- ret := c.clone()
- ret.order = NewOrderedColumnList(oes...).Append(ret.order.Columns()...)
- return ret
-}
-
-func (c *selectClauses) GroupBy() ColumnListExpression {
- return c.groupBy
-}
-
-func (c *selectClauses) GroupByAppend(cl ColumnListExpression) SelectClauses {
- if c.groupBy == nil {
- return c.SetGroupBy(cl)
- }
- ret := c.clone()
- ret.groupBy = ret.groupBy.Append(cl.Columns()...)
- return ret
-}
-
-func (c *selectClauses) SetGroupBy(cl ColumnListExpression) SelectClauses {
- ret := c.clone()
- ret.groupBy = cl
- return ret
-}
-
-func (c *selectClauses) Limit() interface{} {
- return c.limit
-}
-
-func (c *selectClauses) HasLimit() bool {
- return c.limit != nil
-}
-
-func (c *selectClauses) ClearLimit() SelectClauses {
- ret := c.clone()
- ret.limit = nil
- return ret
-}
-
-func (c *selectClauses) SetLimit(limit interface{}) SelectClauses {
- ret := c.clone()
- ret.limit = limit
- return ret
-}
-
-func (c *selectClauses) Offset() uint {
- return c.offset
-}
-
-func (c *selectClauses) ClearOffset() SelectClauses {
- ret := c.clone()
- ret.offset = 0
- return ret
-}
-
-func (c *selectClauses) SetOffset(offset uint) SelectClauses {
- ret := c.clone()
- ret.offset = offset
- return ret
-}
-
-func (c *selectClauses) Compounds() []CompoundExpression {
- return c.compounds
-}
-
-func (c *selectClauses) CompoundsAppend(ce CompoundExpression) SelectClauses {
- ret := c.clone()
- ret.compounds = append(ret.compounds, ce)
- return ret
-}
-
-func (c *selectClauses) Windows() []WindowExpression {
- return c.windows
-}
-
-func (c *selectClauses) SetWindows(ws []WindowExpression) SelectClauses {
- ret := c.clone()
- ret.windows = ws
- return ret
-}
-
-func (c *selectClauses) WindowsAppend(ws ...WindowExpression) SelectClauses {
- ret := c.clone()
- ret.windows = append(ret.windows, ws...)
- return ret
-}
-
-func (c *selectClauses) ClearWindows() SelectClauses {
- ret := c.clone()
- ret.windows = nil
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/truncate.go b/vendor/github.com/doug-martin/goqu/v9/exp/truncate.go
deleted file mode 100644
index 1486a003667..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/truncate.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package exp
-
-// Options to use when generating a TRUNCATE statement
-type TruncateOptions struct {
- // Set to true to add CASCADE to the TRUNCATE statement
- Cascade bool
- // Set to true to add RESTRICT to the TRUNCATE statement
- Restrict bool
- // Set to true to specify IDENTITY options, (e.g. RESTART, CONTINUE) to the TRUNCATE statement
- Identity string
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/truncate_clauses.go b/vendor/github.com/doug-martin/goqu/v9/exp/truncate_clauses.go
deleted file mode 100644
index 2b3bd8b5999..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/truncate_clauses.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package exp
-
-type (
- TruncateClauses interface {
- HasTable() bool
- clone() *truncateClauses
-
- Table() ColumnListExpression
- SetTable(tables ColumnListExpression) TruncateClauses
-
- Options() TruncateOptions
- SetOptions(opts TruncateOptions) TruncateClauses
- }
- truncateClauses struct {
- tables ColumnListExpression
- options TruncateOptions
- }
-)
-
-func NewTruncateClauses() TruncateClauses {
- return &truncateClauses{}
-}
-
-func (tc *truncateClauses) HasTable() bool {
- return tc.tables != nil
-}
-
-func (tc *truncateClauses) clone() *truncateClauses {
- return &truncateClauses{
- tables: tc.tables,
- }
-}
-
-func (tc *truncateClauses) Table() ColumnListExpression {
- return tc.tables
-}
-func (tc *truncateClauses) SetTable(tables ColumnListExpression) TruncateClauses {
- ret := tc.clone()
- ret.tables = tables
- return ret
-}
-
-func (tc *truncateClauses) Options() TruncateOptions {
- return tc.options
-}
-func (tc *truncateClauses) SetOptions(opts TruncateOptions) TruncateClauses {
- ret := tc.clone()
- ret.options = opts
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/update.go b/vendor/github.com/doug-martin/goqu/v9/exp/update.go
deleted file mode 100644
index da9b1987713..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/update.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package exp
-
-import (
- "reflect"
- "sort"
-
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type (
- update struct {
- col IdentifierExpression
- val interface{}
- }
-)
-
-func set(col IdentifierExpression, val interface{}) UpdateExpression {
- return update{col: col, val: val}
-}
-
-func NewUpdateExpressions(update interface{}) (updates []UpdateExpression, err error) {
- if u, ok := update.(UpdateExpression); ok {
- updates = append(updates, u)
- return updates, nil
- }
- updateValue := reflect.Indirect(reflect.ValueOf(update))
- switch updateValue.Kind() {
- case reflect.Map:
- keys := util.ValueSlice(updateValue.MapKeys())
- sort.Sort(keys)
- for _, key := range keys {
- updates = append(updates, ParseIdentifier(key.String()).Set(updateValue.MapIndex(key).Interface()))
- }
- case reflect.Struct:
- return getUpdateExpressionsStruct(updateValue)
- default:
- return nil, errors.New("unsupported update interface type %+v", updateValue.Type())
- }
- return updates, nil
-}
-
-func getUpdateExpressionsStruct(value reflect.Value) (updates []UpdateExpression, err error) {
- r, err := NewRecordFromStruct(value.Interface(), false, true)
- if err != nil {
- return updates, err
- }
- cols := r.Cols()
- for _, col := range cols {
- updates = append(updates, ParseIdentifier(col).Set(r[col]))
- }
- return updates, nil
-}
-
-func (u update) Expression() Expression {
- return u
-}
-
-func (u update) Clone() Expression {
- return update{col: u.col.Clone().(IdentifierExpression), val: u.val}
-}
-
-func (u update) Col() IdentifierExpression {
- return u.col
-}
-
-func (u update) Val() interface{} {
- return u.val
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/update_clauses.go b/vendor/github.com/doug-martin/goqu/v9/exp/update_clauses.go
deleted file mode 100644
index 562ca8dc146..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/update_clauses.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package exp
-
-type (
- UpdateClauses interface {
- HasTable() bool
- clone() *updateClauses
-
- CommonTables() []CommonTableExpression
- CommonTablesAppend(cte CommonTableExpression) UpdateClauses
-
- Table() Expression
- SetTable(table Expression) UpdateClauses
-
- SetValues() interface{}
- HasSetValues() bool
- SetSetValues(values interface{}) UpdateClauses
-
- From() ColumnListExpression
- HasFrom() bool
- SetFrom(tables ColumnListExpression) UpdateClauses
-
- Where() ExpressionList
- ClearWhere() UpdateClauses
- WhereAppend(expressions ...Expression) UpdateClauses
-
- Order() ColumnListExpression
- HasOrder() bool
- ClearOrder() UpdateClauses
- SetOrder(oes ...OrderedExpression) UpdateClauses
- OrderAppend(...OrderedExpression) UpdateClauses
- OrderPrepend(...OrderedExpression) UpdateClauses
-
- Limit() interface{}
- HasLimit() bool
- ClearLimit() UpdateClauses
- SetLimit(limit interface{}) UpdateClauses
-
- Returning() ColumnListExpression
- HasReturning() bool
- SetReturning(cl ColumnListExpression) UpdateClauses
- }
- updateClauses struct {
- commonTables []CommonTableExpression
- table Expression
- setValues interface{}
- from ColumnListExpression
- where ExpressionList
- order ColumnListExpression
- limit interface{}
- returning ColumnListExpression
- }
-)
-
-func NewUpdateClauses() UpdateClauses {
- return &updateClauses{}
-}
-
-func (uc *updateClauses) HasTable() bool {
- return uc.table != nil
-}
-
-func (uc *updateClauses) clone() *updateClauses {
- return &updateClauses{
- commonTables: uc.commonTables,
- table: uc.table,
- setValues: uc.setValues,
- from: uc.from,
- where: uc.where,
- order: uc.order,
- limit: uc.limit,
- returning: uc.returning,
- }
-}
-
-func (uc *updateClauses) CommonTables() []CommonTableExpression {
- return uc.commonTables
-}
-
-func (uc *updateClauses) CommonTablesAppend(cte CommonTableExpression) UpdateClauses {
- ret := uc.clone()
- ret.commonTables = append(ret.commonTables, cte)
- return ret
-}
-
-func (uc *updateClauses) Table() Expression {
- return uc.table
-}
-
-func (uc *updateClauses) SetTable(table Expression) UpdateClauses {
- ret := uc.clone()
- ret.table = table
- return ret
-}
-
-func (uc *updateClauses) SetValues() interface{} {
- return uc.setValues
-}
-
-func (uc *updateClauses) HasSetValues() bool {
- return uc.setValues != nil
-}
-
-func (uc *updateClauses) SetSetValues(values interface{}) UpdateClauses {
- ret := uc.clone()
- ret.setValues = values
- return ret
-}
-
-func (uc *updateClauses) From() ColumnListExpression {
- return uc.from
-}
-
-func (uc *updateClauses) HasFrom() bool {
- return uc.from != nil && !uc.from.IsEmpty()
-}
-
-func (uc *updateClauses) SetFrom(from ColumnListExpression) UpdateClauses {
- ret := uc.clone()
- ret.from = from
- return ret
-}
-
-func (uc *updateClauses) Where() ExpressionList {
- return uc.where
-}
-
-func (uc *updateClauses) ClearWhere() UpdateClauses {
- ret := uc.clone()
- ret.where = nil
- return ret
-}
-
-func (uc *updateClauses) WhereAppend(expressions ...Expression) UpdateClauses {
- if len(expressions) == 0 {
- return uc
- }
- ret := uc.clone()
- if ret.where == nil {
- ret.where = NewExpressionList(AndType, expressions...)
- } else {
- ret.where = ret.where.Append(expressions...)
- }
- return ret
-}
-
-func (uc *updateClauses) Order() ColumnListExpression {
- return uc.order
-}
-
-func (uc *updateClauses) HasOrder() bool {
- return uc.order != nil
-}
-
-func (uc *updateClauses) ClearOrder() UpdateClauses {
- ret := uc.clone()
- ret.order = nil
- return ret
-}
-
-func (uc *updateClauses) SetOrder(oes ...OrderedExpression) UpdateClauses {
- ret := uc.clone()
- ret.order = NewOrderedColumnList(oes...)
- return ret
-}
-
-func (uc *updateClauses) OrderAppend(oes ...OrderedExpression) UpdateClauses {
- if uc.order == nil {
- return uc.SetOrder(oes...)
- }
- ret := uc.clone()
- ret.order = ret.order.Append(NewOrderedColumnList(oes...).Columns()...)
- return ret
-}
-
-func (uc *updateClauses) OrderPrepend(oes ...OrderedExpression) UpdateClauses {
- if uc.order == nil {
- return uc.SetOrder(oes...)
- }
- ret := uc.clone()
- ret.order = NewOrderedColumnList(oes...).Append(ret.order.Columns()...)
- return ret
-}
-
-func (uc *updateClauses) Limit() interface{} {
- return uc.limit
-}
-
-func (uc *updateClauses) HasLimit() bool {
- return uc.limit != nil
-}
-
-func (uc *updateClauses) ClearLimit() UpdateClauses {
- ret := uc.clone()
- ret.limit = nil
- return ret
-}
-
-func (uc *updateClauses) SetLimit(limit interface{}) UpdateClauses {
- ret := uc.clone()
- ret.limit = limit
- return ret
-}
-
-func (uc *updateClauses) Returning() ColumnListExpression {
- return uc.returning
-}
-
-func (uc *updateClauses) HasReturning() bool {
- return uc.returning != nil && !uc.returning.IsEmpty()
-}
-
-func (uc *updateClauses) SetReturning(cl ColumnListExpression) UpdateClauses {
- ret := uc.clone()
- ret.returning = cl
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/window.go b/vendor/github.com/doug-martin/goqu/v9/exp/window.go
deleted file mode 100644
index a33178a0392..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/window.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package exp
-
-type sqlWindowExpression struct {
- name IdentifierExpression
- parent IdentifierExpression
- partitionCols ColumnListExpression
- orderCols ColumnListExpression
-}
-
-func NewWindowExpression(window, parent IdentifierExpression, partitionCols, orderCols ColumnListExpression) WindowExpression {
- if partitionCols == nil {
- partitionCols = NewColumnListExpression()
- }
- if orderCols == nil {
- orderCols = NewColumnListExpression()
- }
- return sqlWindowExpression{
- name: window,
- parent: parent,
- partitionCols: partitionCols,
- orderCols: orderCols,
- }
-}
-
-func (we sqlWindowExpression) clone() sqlWindowExpression {
- return sqlWindowExpression{
- name: we.name,
- parent: we.parent,
- partitionCols: we.partitionCols.Clone().(ColumnListExpression),
- orderCols: we.orderCols.Clone().(ColumnListExpression),
- }
-}
-
-func (we sqlWindowExpression) Clone() Expression {
- return we.clone()
-}
-
-func (we sqlWindowExpression) Expression() Expression {
- return we
-}
-
-func (we sqlWindowExpression) Name() IdentifierExpression {
- return we.name
-}
-
-func (we sqlWindowExpression) HasName() bool {
- return we.name != nil
-}
-
-func (we sqlWindowExpression) Parent() IdentifierExpression {
- return we.parent
-}
-
-func (we sqlWindowExpression) HasParent() bool {
- return we.parent != nil
-}
-
-func (we sqlWindowExpression) PartitionCols() ColumnListExpression {
- return we.partitionCols
-}
-
-func (we sqlWindowExpression) HasPartitionBy() bool {
- return we.partitionCols != nil && !we.partitionCols.IsEmpty()
-}
-
-func (we sqlWindowExpression) OrderCols() ColumnListExpression {
- return we.orderCols
-}
-
-func (we sqlWindowExpression) HasOrder() bool {
- return we.orderCols != nil && !we.orderCols.IsEmpty()
-}
-
-func (we sqlWindowExpression) PartitionBy(cols ...interface{}) WindowExpression {
- ret := we.clone()
- ret.partitionCols = NewColumnListExpression(cols...)
- return ret
-}
-
-func (we sqlWindowExpression) OrderBy(cols ...interface{}) WindowExpression {
- ret := we.clone()
- ret.orderCols = NewColumnListExpression(cols...)
- return ret
-}
-
-func (we sqlWindowExpression) Inherit(parent string) WindowExpression {
- ret := we.clone()
- ret.parent = ParseIdentifier(parent)
- return ret
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/exp/window_func.go b/vendor/github.com/doug-martin/goqu/v9/exp/window_func.go
deleted file mode 100644
index d5ae5531a9b..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/exp/window_func.go
+++ /dev/null
@@ -1,124 +0,0 @@
-package exp
-
-type sqlWindowFunctionExpression struct {
- fn SQLFunctionExpression
- windowName IdentifierExpression
- window WindowExpression
-}
-
-func NewSQLWindowFunctionExpression(
- fn SQLFunctionExpression,
- windowName IdentifierExpression,
- window WindowExpression) SQLWindowFunctionExpression {
- return sqlWindowFunctionExpression{
- fn: fn,
- windowName: windowName,
- window: window,
- }
-}
-
-func (swfe sqlWindowFunctionExpression) clone() sqlWindowFunctionExpression {
- return sqlWindowFunctionExpression{
- fn: swfe.fn.Clone().(SQLFunctionExpression),
- windowName: swfe.windowName,
- window: swfe.window,
- }
-}
-
-func (swfe sqlWindowFunctionExpression) Clone() Expression {
- return swfe.clone()
-}
-
-func (swfe sqlWindowFunctionExpression) Expression() Expression {
- return swfe
-}
-
-func (swfe sqlWindowFunctionExpression) As(val interface{}) AliasedExpression {
- return NewAliasExpression(swfe, val)
-}
-func (swfe sqlWindowFunctionExpression) Eq(val interface{}) BooleanExpression { return eq(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Neq(val interface{}) BooleanExpression { return neq(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Gt(val interface{}) BooleanExpression { return gt(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Gte(val interface{}) BooleanExpression { return gte(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Lt(val interface{}) BooleanExpression { return lt(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Lte(val interface{}) BooleanExpression { return lte(swfe, val) }
-func (swfe sqlWindowFunctionExpression) Between(val RangeVal) RangeExpression {
- return between(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) NotBetween(val RangeVal) RangeExpression {
- return notBetween(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) Like(val interface{}) BooleanExpression {
- return like(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) NotLike(val interface{}) BooleanExpression {
- return notLike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) ILike(val interface{}) BooleanExpression {
- return iLike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) NotILike(val interface{}) BooleanExpression {
- return notILike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) RegexpLike(val interface{}) BooleanExpression {
- return regexpLike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) RegexpNotLike(val interface{}) BooleanExpression {
- return regexpNotLike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) RegexpILike(val interface{}) BooleanExpression {
- return regexpILike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) RegexpNotILike(val interface{}) BooleanExpression {
- return regexpNotILike(swfe, val)
-}
-
-func (swfe sqlWindowFunctionExpression) In(vals ...interface{}) BooleanExpression {
- return in(swfe, vals...)
-}
-
-func (swfe sqlWindowFunctionExpression) NotIn(vals ...interface{}) BooleanExpression {
- return notIn(swfe, vals...)
-}
-func (swfe sqlWindowFunctionExpression) Is(val interface{}) BooleanExpression { return is(swfe, val) }
-func (swfe sqlWindowFunctionExpression) IsNot(val interface{}) BooleanExpression {
- return isNot(swfe, val)
-}
-func (swfe sqlWindowFunctionExpression) IsNull() BooleanExpression { return is(swfe, nil) }
-func (swfe sqlWindowFunctionExpression) IsNotNull() BooleanExpression { return isNot(swfe, nil) }
-func (swfe sqlWindowFunctionExpression) IsTrue() BooleanExpression { return is(swfe, true) }
-func (swfe sqlWindowFunctionExpression) IsNotTrue() BooleanExpression { return isNot(swfe, true) }
-func (swfe sqlWindowFunctionExpression) IsFalse() BooleanExpression { return is(swfe, false) }
-func (swfe sqlWindowFunctionExpression) IsNotFalse() BooleanExpression { return isNot(swfe, false) }
-
-func (swfe sqlWindowFunctionExpression) Asc() OrderedExpression { return asc(swfe) }
-func (swfe sqlWindowFunctionExpression) Desc() OrderedExpression { return desc(swfe) }
-
-func (swfe sqlWindowFunctionExpression) Func() SQLFunctionExpression {
- return swfe.fn
-}
-
-func (swfe sqlWindowFunctionExpression) Window() WindowExpression {
- return swfe.window
-}
-
-func (swfe sqlWindowFunctionExpression) WindowName() IdentifierExpression {
- return swfe.windowName
-}
-
-func (swfe sqlWindowFunctionExpression) HasWindow() bool {
- return swfe.window != nil
-}
-
-func (swfe sqlWindowFunctionExpression) HasWindowName() bool {
- return swfe.windowName != nil
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/expressions.go b/vendor/github.com/doug-martin/goqu/v9/expressions.go
deleted file mode 100644
index 5e5ef86f8b4..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/expressions.go
+++ /dev/null
@@ -1,303 +0,0 @@
-package goqu
-
-import (
- "github.com/doug-martin/goqu/v9/exp"
-)
-
-type (
- Expression = exp.Expression
- Ex = exp.Ex
- ExOr = exp.ExOr
- Op = exp.Op
- Record = exp.Record
- Vals = exp.Vals
- // Options to use when generating a TRUNCATE statement
- TruncateOptions = exp.TruncateOptions
-)
-
-// emptyWindow is an empty WINDOW clause without name
-var emptyWindow = exp.NewWindowExpression(nil, nil, nil, nil)
-
-const (
- Wait = exp.Wait
- NoWait = exp.NoWait
- SkipLocked = exp.SkipLocked
-)
-
-// Creates a new Casted expression
-// Cast(I("a"), "NUMERIC") -> CAST("a" AS NUMERIC)
-func Cast(e exp.Expression, t string) exp.CastExpression {
- return exp.NewCastExpression(e, t)
-}
-
-// Creates a conflict struct to be passed to InsertConflict to ignore constraint errors
-// InsertConflict(DoNothing(),...) -> INSERT INTO ... ON CONFLICT DO NOTHING
-func DoNothing() exp.ConflictExpression {
- return exp.NewDoNothingConflictExpression()
-}
-
-// Creates a ConflictUpdate struct to be passed to InsertConflict
-// Represents a ON CONFLICT DO UPDATE portion of an INSERT statement (ON DUPLICATE KEY UPDATE for mysql)
-//
-// InsertConflict(DoUpdate("target_column", update),...) ->
-// INSERT INTO ... ON CONFLICT DO UPDATE SET a=b
-// InsertConflict(DoUpdate("target_column", update).Where(Ex{"a": 1},...) ->
-// INSERT INTO ... ON CONFLICT DO UPDATE SET a=b WHERE a=1
-func DoUpdate(target string, update interface{}) exp.ConflictUpdateExpression {
- return exp.NewDoUpdateConflictExpression(target, update)
-}
-
-// A list of expressions that should be ORed together
-// Or(I("a").Eq(10), I("b").Eq(11)) //(("a" = 10) OR ("b" = 11))
-func Or(expressions ...exp.Expression) exp.ExpressionList {
- return exp.NewExpressionList(exp.OrType, expressions...)
-}
-
-// A list of expressions that should be ANDed together
-// And(I("a").Eq(10), I("b").Eq(11)) //(("a" = 10) AND ("b" = 11))
-func And(expressions ...exp.Expression) exp.ExpressionList {
- return exp.NewExpressionList(exp.AndType, expressions...)
-}
-
-// Creates a new SQLFunctionExpression with the given name and arguments
-func Func(name string, args ...interface{}) exp.SQLFunctionExpression {
- return exp.NewSQLFunctionExpression(name, args...)
-}
-
-// used internally to normalize the column name if passed in as a string it should be turned into an identifier
-func newIdentifierFunc(name string, col interface{}) exp.SQLFunctionExpression {
- if s, ok := col.(string); ok {
- col = I(s)
- }
- return Func(name, col)
-}
-
-// Creates a new DISTINCT sql function
-// DISTINCT("a") -> DISTINCT("a")
-// DISTINCT(I("a")) -> DISTINCT("a")
-func DISTINCT(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("DISTINCT", col) }
-
-// Creates a new COUNT sql function
-// COUNT("a") -> COUNT("a")
-// COUNT("*") -> COUNT("*")
-// COUNT(I("a")) -> COUNT("a")
-func COUNT(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("COUNT", col) }
-
-// Creates a new MIN sql function
-// MIN("a") -> MIN("a")
-// MIN(I("a")) -> MIN("a")
-func MIN(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("MIN", col) }
-
-// Creates a new MAX sql function
-// MAX("a") -> MAX("a")
-// MAX(I("a")) -> MAX("a")
-func MAX(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("MAX", col) }
-
-// Creates a new AVG sql function
-// AVG("a") -> AVG("a")
-// AVG(I("a")) -> AVG("a")
-func AVG(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("AVG", col) }
-
-// Creates a new FIRST sql function
-// FIRST("a") -> FIRST("a")
-// FIRST(I("a")) -> FIRST("a")
-func FIRST(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("FIRST", col) }
-
-// Creates a new LAST sql function
-// LAST("a") -> LAST("a")
-// LAST(I("a")) -> LAST("a")
-func LAST(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("LAST", col) }
-
-// Creates a new SUM sql function
-// SUM("a") -> SUM("a")
-// SUM(I("a")) -> SUM("a")
-func SUM(col interface{}) exp.SQLFunctionExpression { return newIdentifierFunc("SUM", col) }
-
-// Creates a new COALESCE sql function
-// COALESCE(I("a"), "a") -> COALESCE("a", 'a')
-// COALESCE(I("a"), I("b"), nil) -> COALESCE("a", "b", NULL)
-func COALESCE(vals ...interface{}) exp.SQLFunctionExpression {
- return Func("COALESCE", vals...)
-}
-
-//nolint:stylecheck,golint // sql function name
-func ROW_NUMBER() exp.SQLFunctionExpression {
- return Func("ROW_NUMBER")
-}
-
-func RANK() exp.SQLFunctionExpression {
- return Func("RANK")
-}
-
-//nolint:stylecheck,golint // sql function name
-func DENSE_RANK() exp.SQLFunctionExpression {
- return Func("DENSE_RANK")
-}
-
-//nolint:stylecheck,golint // sql function name
-func PERCENT_RANK() exp.SQLFunctionExpression {
- return Func("PERCENT_RANK")
-}
-
-//nolint:stylecheck,golint //sql function name
-func CUME_DIST() exp.SQLFunctionExpression {
- return Func("CUME_DIST")
-}
-
-func NTILE(n int) exp.SQLFunctionExpression {
- return Func("NTILE", n)
-}
-
-//nolint:stylecheck,golint //sql function name
-func FIRST_VALUE(val interface{}) exp.SQLFunctionExpression {
- return newIdentifierFunc("FIRST_VALUE", val)
-}
-
-//nolint:stylecheck,golint //sql function name
-func LAST_VALUE(val interface{}) exp.SQLFunctionExpression {
- return newIdentifierFunc("LAST_VALUE", val)
-}
-
-//nolint:stylecheck,golint //sql function name
-func NTH_VALUE(val interface{}, nth int) exp.SQLFunctionExpression {
- if s, ok := val.(string); ok {
- val = I(s)
- }
- return Func("NTH_VALUE", val, nth)
-}
-
-// Creates a new Identifier, the generated sql will use adapter specific quoting or '"' by default, this ensures case
-// sensitivity and in certain databases allows for special characters, (e.g. "curr-table", "my table").
-//
-// The identifier will be split by '.'
-//
-// Table and Column example
-// I("table.column") -> "table"."column" //A Column and table
-// Schema table and column
-// I("schema.table.column") -> "schema"."table"."column"
-// Table with star
-// I("table.*") -> "table".*
-func I(ident string) exp.IdentifierExpression {
- return exp.ParseIdentifier(ident)
-}
-
-// Creates a new Column Identifier, the generated sql will use adapter specific quoting or '"' by default, this ensures case
-// sensitivity and in certain databases allows for special characters, (e.g. "curr-table", "my table").
-// An Identifier can represent a one or a combination of schema, table, and/or column.
-// C("column") -> "column" //A Column
-// C("column").Table("table") -> "table"."column" //A Column and table
-// C("column").Table("table").Schema("schema") //Schema table and column
-// C("*") //Also handles the * operator
-func C(col string) exp.IdentifierExpression {
- return exp.NewIdentifierExpression("", "", col)
-}
-
-// Creates a new Schema Identifier, the generated sql will use adapter specific quoting or '"' by default, this ensures case
-// sensitivity and in certain databases allows for special characters, (e.g. "curr-schema", "my schema").
-// S("schema") -> "schema" //A Schema
-// S("schema").Table("table") -> "schema"."table" //A Schema and table
-// S("schema").Table("table").Col("col") //Schema table and column
-// S("schema").Table("table").Col("*") //Schema table and all columns
-func S(schema string) exp.IdentifierExpression {
- return exp.NewIdentifierExpression(schema, "", "")
-}
-
-// Creates a new Table Identifier, the generated sql will use adapter specific quoting or '"' by default, this ensures case
-// sensitivity and in certain databases allows for special characters, (e.g. "curr-table", "my table").
-// T("table") -> "table" //A Column
-// T("table").Col("col") -> "table"."column" //A Column and table
-// T("table").Schema("schema").Col("col) -> "schema"."table"."column" //Schema table and column
-// T("table").Schema("schema").Col("*") -> "schema"."table".* //Also handles the * operator
-func T(table string) exp.IdentifierExpression {
- return exp.NewIdentifierExpression("", table, "")
-}
-
-// Create a new WINDOW clause
-// W() -> ()
-// W().PartitionBy("a") -> (PARTITION BY "a")
-// W().PartitionBy("a").OrderBy("b") -> (PARTITION BY "a" ORDER BY "b")
-// W().PartitionBy("a").OrderBy("b").Inherit("w1") -> ("w1" PARTITION BY "a" ORDER BY "b")
-// W().PartitionBy("a").OrderBy(I("b").Desc()).Inherit("w1") -> ("w1" PARTITION BY "a" ORDER BY "b" DESC)
-// W("w") -> "w" AS ()
-// W("w", "w1") -> "w" AS ("w1")
-// W("w").Inherit("w1") -> "w" AS ("w1")
-// W("w").PartitionBy("a") -> "w" AS (PARTITION BY "a")
-// W("w", "w1").PartitionBy("a") -> "w" AS ("w1" PARTITION BY "a")
-// W("w", "w1").PartitionBy("a").OrderBy("b") -> "w" AS ("w1" PARTITION BY "a" ORDER BY "b")
-func W(ws ...string) exp.WindowExpression {
- switch len(ws) {
- case 0:
- return emptyWindow
- case 1:
- return exp.NewWindowExpression(I(ws[0]), nil, nil, nil)
- default:
- return exp.NewWindowExpression(I(ws[0]), I(ws[1]), nil, nil)
- }
-}
-
-// Creates a new ON clause to be used within a join
-// ds.Join(goqu.T("my_table"), goqu.On(
-// goqu.I("my_table.fkey").Eq(goqu.I("other_table.id")),
-// ))
-func On(expressions ...exp.Expression) exp.JoinCondition {
- return exp.NewJoinOnCondition(expressions...)
-}
-
-// Creates a new USING clause to be used within a join
-// ds.Join(goqu.T("my_table"), goqu.Using("fkey"))
-func Using(columns ...interface{}) exp.JoinCondition {
- return exp.NewJoinUsingCondition(columns...)
-}
-
-// Creates a new SQL literal with the provided arguments.
-// L("a = 1") -> a = 1
-// You can also you placeholders. All placeholders within a Literal are represented by '?'
-// L("a = ?", "b") -> a = 'b'
-// Literals can also contain placeholders for other expressions
-// L("(? AND ?) OR (?)", I("a").Eq(1), I("b").Eq("b"), I("c").In([]string{"a", "b", "c"}))
-func L(sql string, args ...interface{}) exp.LiteralExpression {
- return Literal(sql, args...)
-}
-
-// Alias for goqu.L
-func Literal(sql string, args ...interface{}) exp.LiteralExpression {
- return exp.NewLiteralExpression(sql, args...)
-}
-
-// Create a new SQL value ( alias for goqu.L("?", val) ). The prrimary use case for this would be in selects.
-// See examples.
-func V(val interface{}) exp.LiteralExpression {
- return exp.NewLiteralExpression("?", val)
-}
-
-// Creates a new Range to be used with a Between expression
-// exp.C("col").Between(exp.Range(1, 10))
-func Range(start, end interface{}) exp.RangeVal {
- return exp.NewRangeVal(start, end)
-}
-
-// Creates a literal *
-func Star() exp.LiteralExpression { return exp.Star() }
-
-// Returns a literal for DEFAULT sql keyword
-func Default() exp.LiteralExpression {
- return exp.Default()
-}
-
-func Lateral(table exp.AppendableExpression) exp.LateralExpression {
- return exp.NewLateralExpression(table)
-}
-
-// Create a new ANY comparison
-func Any(val interface{}) exp.SQLFunctionExpression {
- return Func("ANY ", val)
-}
-
-// Create a new ALL comparison
-func All(val interface{}) exp.SQLFunctionExpression {
- return Func("ALL ", val)
-}
-
-func Case() exp.CaseExpression {
- return exp.NewCaseExpression()
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/go.test.sh b/vendor/github.com/doug-martin/goqu/v9/go.test.sh
deleted file mode 100644
index 4d7be372eac..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/go.test.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-echo "" > coverage.txt
-
-go test -race -coverprofile=coverage.txt -coverpkg=./... ./...
\ No newline at end of file
diff --git a/vendor/github.com/doug-martin/goqu/v9/goqu.go b/vendor/github.com/doug-martin/goqu/v9/goqu.go
deleted file mode 100644
index a2c0ec285a6..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/goqu.go
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-goqu an idiomatch SQL builder, and query package.
-
- __ _ ___ __ _ _ _
- / _` |/ _ \ / _` | | | |
- | (_| | (_) | (_| | |_| |
- \__, |\___/ \__, |\__,_|
- |___/ |_|
-
-
-Please see https://github.com/doug-martin/goqu for an introduction to goqu.
-*/
-package goqu
-
-import (
- "time"
-
- "github.com/doug-martin/goqu/v9/internal/util"
- "github.com/doug-martin/goqu/v9/sqlgen"
-)
-
-type DialectWrapper struct {
- dialect string
-}
-
-// Creates a new DialectWrapper to create goqu.Datasets or goqu.Databases with the specified dialect.
-func Dialect(dialect string) DialectWrapper {
- return DialectWrapper{dialect: dialect}
-}
-
-// Create a new dataset for creating SELECT sql statements
-func (dw DialectWrapper) From(table ...interface{}) *SelectDataset {
- return From(table...).WithDialect(dw.dialect)
-}
-
-// Create a new dataset for creating SELECT sql statements
-func (dw DialectWrapper) Select(cols ...interface{}) *SelectDataset {
- return newDataset(dw.dialect, nil).Select(cols...)
-}
-
-// Create a new dataset for creating UPDATE sql statements
-func (dw DialectWrapper) Update(table interface{}) *UpdateDataset {
- return Update(table).WithDialect(dw.dialect)
-}
-
-// Create a new dataset for creating INSERT sql statements
-func (dw DialectWrapper) Insert(table interface{}) *InsertDataset {
- return Insert(table).WithDialect(dw.dialect)
-}
-
-// Create a new dataset for creating DELETE sql statements
-func (dw DialectWrapper) Delete(table interface{}) *DeleteDataset {
- return Delete(table).WithDialect(dw.dialect)
-}
-
-// Create a new dataset for creating TRUNCATE sql statements
-func (dw DialectWrapper) Truncate(table ...interface{}) *TruncateDataset {
- return Truncate(table...).WithDialect(dw.dialect)
-}
-
-func (dw DialectWrapper) DB(db SQLDatabase) *Database {
- return newDatabase(dw.dialect, db)
-}
-
-func New(dialect string, db SQLDatabase) *Database {
- return newDatabase(dialect, db)
-}
-
-// Set the behavior when encountering struct fields that do not have a db tag.
-// By default this is false; if set to true any field without a db tag will not
-// be targeted by Select or Scan operations.
-func SetIgnoreUntaggedFields(ignore bool) {
- util.SetIgnoreUntaggedFields(ignore)
-}
-
-// Set the column rename function. This is used for struct fields that do not have a db tag to specify the column name
-// By default all struct fields that do not have a db tag will be converted lowercase
-func SetColumnRenameFunction(renameFunc func(string) string) {
- util.SetColumnRenameFunction(renameFunc)
-}
-
-// Set the location to use when interpolating time.Time instances. See https://golang.org/pkg/time/#LoadLocation
-// NOTE: This has no effect when using prepared statements.
-func SetTimeLocation(loc *time.Location) {
- sqlgen.SetTimeLocation(loc)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/insert_dataset.go b/vendor/github.com/doug-martin/goqu/v9/insert_dataset.go
deleted file mode 100644
index 5404ee82caa..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/insert_dataset.go
+++ /dev/null
@@ -1,271 +0,0 @@
-package goqu
-
-import (
- "fmt"
-
- "github.com/doug-martin/goqu/v9/exec"
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type InsertDataset struct {
- dialect SQLDialect
- clauses exp.InsertClauses
- isPrepared prepared
- queryFactory exec.QueryFactory
- err error
-}
-
-var ErrUnsupportedIntoType = errors.New("unsupported table type, a string or identifier expression is required")
-
-// used internally by database to create a database with a specific adapter
-func newInsertDataset(d string, queryFactory exec.QueryFactory) *InsertDataset {
- return &InsertDataset{
- clauses: exp.NewInsertClauses(),
- dialect: GetDialect(d),
- queryFactory: queryFactory,
- }
-}
-
-// Creates a new InsertDataset for the provided table. Using this method will only allow you
-// to create SQL user Database#From to create an InsertDataset with query capabilities
-func Insert(table interface{}) *InsertDataset {
- return newInsertDataset("default", nil).Into(table)
-}
-
-// Set the parameter interpolation behavior. See examples
-//
-// prepared: If true the dataset WILL NOT interpolate the parameters.
-func (id *InsertDataset) Prepared(prepared bool) *InsertDataset {
- ret := id.copy(id.clauses)
- ret.isPrepared = preparedFromBool(prepared)
- return ret
-}
-
-func (id *InsertDataset) IsPrepared() bool {
- return id.isPrepared.Bool()
-}
-
-// Sets the adapter used to serialize values and create the SQL statement
-func (id *InsertDataset) WithDialect(dl string) *InsertDataset {
- ds := id.copy(id.GetClauses())
- ds.dialect = GetDialect(dl)
- return ds
-}
-
-// Returns the current adapter on the dataset
-func (id *InsertDataset) Dialect() SQLDialect {
- return id.dialect
-}
-
-// Returns the current adapter on the dataset
-func (id *InsertDataset) SetDialect(dialect SQLDialect) *InsertDataset {
- cd := id.copy(id.GetClauses())
- cd.dialect = dialect
- return cd
-}
-
-func (id *InsertDataset) Expression() exp.Expression {
- return id
-}
-
-// Clones the dataset
-func (id *InsertDataset) Clone() exp.Expression {
- return id.copy(id.clauses)
-}
-
-// Returns the current clauses on the dataset.
-func (id *InsertDataset) GetClauses() exp.InsertClauses {
- return id.clauses
-}
-
-// used interally to copy the dataset
-func (id *InsertDataset) copy(clauses exp.InsertClauses) *InsertDataset {
- return &InsertDataset{
- dialect: id.dialect,
- clauses: clauses,
- isPrepared: id.isPrepared,
- queryFactory: id.queryFactory,
- err: id.err,
- }
-}
-
-// Creates a WITH clause for a common table expression (CTE).
-//
-// The name will be available to SELECT from in the associated query; and can optionally
-// contain a list of column names "name(col1, col2, col3)".
-//
-// The name will refer to the results of the specified subquery.
-func (id *InsertDataset) With(name string, subquery exp.Expression) *InsertDataset {
- return id.copy(id.clauses.CommonTablesAppend(exp.NewCommonTableExpression(false, name, subquery)))
-}
-
-// Creates a WITH RECURSIVE clause for a common table expression (CTE)
-//
-// The name will be available to SELECT from in the associated query; and must
-// contain a list of column names "name(col1, col2, col3)" for a recursive clause.
-//
-// The name will refer to the results of the specified subquery. The subquery for
-// a recursive query will always end with a UNION or UNION ALL with a clause that
-// refers to the CTE by name.
-func (id *InsertDataset) WithRecursive(name string, subquery exp.Expression) *InsertDataset {
- return id.copy(id.clauses.CommonTablesAppend(exp.NewCommonTableExpression(true, name, subquery)))
-}
-
-// Sets the table to insert INTO. This return a new dataset with the original table replaced. See examples.
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Expression: Any valid expression (IdentifierExpression, AliasedExpression, Literal, etc.)
-func (id *InsertDataset) Into(into interface{}) *InsertDataset {
- switch t := into.(type) {
- case exp.Expression:
- return id.copy(id.clauses.SetInto(t))
- case string:
- return id.copy(id.clauses.SetInto(exp.ParseIdentifier(t)))
- default:
- panic(ErrUnsupportedIntoType)
- }
-}
-
-// Sets the Columns to insert into
-func (id *InsertDataset) Cols(cols ...interface{}) *InsertDataset {
- return id.copy(id.clauses.SetCols(exp.NewColumnListExpression(cols...)))
-}
-
-// Clears the Columns to insert into
-func (id *InsertDataset) ClearCols() *InsertDataset {
- return id.copy(id.clauses.SetCols(nil))
-}
-
-// Adds columns to the current list of columns clause. See examples
-func (id *InsertDataset) ColsAppend(cols ...interface{}) *InsertDataset {
- return id.copy(id.clauses.ColsAppend(exp.NewColumnListExpression(cols...)))
-}
-
-// Adds a subquery to the insert. See examples.
-func (id *InsertDataset) FromQuery(from exp.AppendableExpression) *InsertDataset {
- if sds, ok := from.(*SelectDataset); ok {
- if sds.dialect != GetDialect("default") && id.Dialect() != sds.dialect {
- panic(
- fmt.Errorf(
- "incompatible dialects for INSERT (%q) and SELECT (%q)",
- id.dialect.Dialect(), sds.dialect.Dialect(),
- ),
- )
- }
- sds.dialect = id.dialect
- }
- return id.copy(id.clauses.SetFrom(from))
-}
-
-// Manually set values to insert See examples.
-func (id *InsertDataset) Vals(vals ...[]interface{}) *InsertDataset {
- return id.copy(id.clauses.ValsAppend(vals))
-}
-
-// Clears the values. See examples.
-func (id *InsertDataset) ClearVals() *InsertDataset {
- return id.copy(id.clauses.SetVals(nil))
-}
-
-// Insert rows. Rows can be a map, goqu.Record or struct. See examples.
-func (id *InsertDataset) Rows(rows ...interface{}) *InsertDataset {
- return id.copy(id.clauses.SetRows(rows))
-}
-
-// Clears the rows for this insert dataset. See examples.
-func (id *InsertDataset) ClearRows() *InsertDataset {
- return id.copy(id.clauses.SetRows(nil))
-}
-
-// Adds a RETURNING clause to the dataset if the adapter supports it See examples.
-func (id *InsertDataset) Returning(returning ...interface{}) *InsertDataset {
- return id.copy(id.clauses.SetReturning(exp.NewColumnListExpression(returning...)))
-}
-
-// Adds an (ON CONFLICT/ON DUPLICATE KEY) clause to the dataset if the dialect supports it. See examples.
-func (id *InsertDataset) OnConflict(conflict exp.ConflictExpression) *InsertDataset {
- return id.copy(id.clauses.SetOnConflict(conflict))
-}
-
-// Clears the on conflict clause. See example
-func (id *InsertDataset) ClearOnConflict() *InsertDataset {
- return id.OnConflict(nil)
-}
-
-// Get any error that has been set or nil if no error has been set.
-func (id *InsertDataset) Error() error {
- return id.err
-}
-
-// Set an error on the dataset if one has not already been set. This error will be returned by a future call to Error
-// or as part of ToSQL. This can be used by end users to record errors while building up queries without having to
-// track those separately.
-func (id *InsertDataset) SetError(err error) *InsertDataset {
- if id.err == nil {
- id.err = err
- }
-
- return id
-}
-
-// Generates the default INSERT statement. If Prepared has been called with true then the statement will not be
-// interpolated. See examples. When using structs you may specify a column to be skipped in the insert, (e.g. id) by
-// specifying a goqu tag with `skipinsert`
-// type Item struct{
-// Id uint32 `db:"id" goqu:"skipinsert"`
-// Name string `db:"name"`
-// }
-//
-// rows: variable number arguments of either map[string]interface, Record, struct, or a single slice argument of the
-// accepted types.
-//
-// Errors:
-// * There is no INTO clause
-// * Different row types passed in, all rows must be of the same type
-// * Maps with different numbers of K/V pairs
-// * Rows of different lengths, (i.e. (Record{"name": "a"}, Record{"name": "a", "age": 10})
-// * Error generating SQL
-func (id *InsertDataset) ToSQL() (sql string, params []interface{}, err error) {
- return id.insertSQLBuilder().ToSQL()
-}
-
-// Appends this Dataset's INSERT statement to the SQLBuilder
-// This is used internally when using inserts in CTEs
-func (id *InsertDataset) AppendSQL(b sb.SQLBuilder) {
- if id.err != nil {
- b.SetError(id.err)
- return
- }
- id.dialect.ToInsertSQL(b, id.GetClauses())
-}
-
-func (id *InsertDataset) GetAs() exp.IdentifierExpression {
- return id.clauses.Alias()
-}
-
-// Sets the alias for this dataset. This is typically used when using a Dataset as MySQL upsert
-func (id *InsertDataset) As(alias string) *InsertDataset {
- return id.copy(id.clauses.SetAlias(T(alias)))
-}
-
-func (id *InsertDataset) ReturnsColumns() bool {
- return id.clauses.HasReturning()
-}
-
-// Generates the INSERT sql, and returns an QueryExecutor struct with the sql set to the INSERT statement
-// db.Insert("test").Rows(Record{"name":"Bob"}).Executor().Exec()
-//
-func (id *InsertDataset) Executor() exec.QueryExecutor {
- return id.queryFactory.FromSQLBuilder(id.insertSQLBuilder())
-}
-
-func (id *InsertDataset) insertSQLBuilder() sb.SQLBuilder {
- buf := sb.NewSQLBuilder(id.isPrepared.Bool())
- if id.err != nil {
- return buf.SetError(id.err)
- }
- id.dialect.ToInsertSQL(buf, id.clauses)
- return buf
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/errors/error.go b/vendor/github.com/doug-martin/goqu/v9/internal/errors/error.go
deleted file mode 100644
index d0cb8072f33..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/errors/error.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package errors
-
-import "fmt"
-
-type Error struct {
- err string
-}
-
-func New(message string, args ...interface{}) error {
- return Error{err: "goqu: " + fmt.Sprintf(message, args...)}
-}
-
-func NewEncodeError(t interface{}) error {
- return Error{err: "goqu_encode_error: " + fmt.Sprintf("Unable to encode value %+v", t)}
-}
-
-func (e Error) Error() string {
- return e.err
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/sb/sql_builder.go b/vendor/github.com/doug-martin/goqu/v9/internal/sb/sql_builder.go
deleted file mode 100644
index e60e4572b49..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/sb/sql_builder.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package sb
-
-import (
- "bytes"
-)
-
-// Builder that is composed of a bytes.Buffer. It is used internally and by adapters to build SQL statements
-type (
- SQLBuilder interface {
- Error() error
- SetError(err error) SQLBuilder
- WriteArg(i ...interface{}) SQLBuilder
- Write(p []byte) SQLBuilder
- WriteStrings(ss ...string) SQLBuilder
- WriteRunes(r ...rune) SQLBuilder
- IsPrepared() bool
- CurrentArgPosition() int
- ToSQL() (sql string, args []interface{}, err error)
- }
- sqlBuilder struct {
- buf *bytes.Buffer
- // True if the sql should not be interpolated
- isPrepared bool
- // Current Number of arguments, used by adapters that need positional placeholders
- currentArgPosition int
- args []interface{}
- err error
- }
-)
-
-func NewSQLBuilder(isPrepared bool) SQLBuilder {
- return &sqlBuilder{
- buf: &bytes.Buffer{},
- isPrepared: isPrepared,
- args: make([]interface{}, 0),
- currentArgPosition: 1,
- }
-}
-
-func (b *sqlBuilder) Error() error {
- return b.err
-}
-
-func (b *sqlBuilder) SetError(err error) SQLBuilder {
- if b.err == nil {
- b.err = err
- }
- return b
-}
-
-func (b *sqlBuilder) Write(bs []byte) SQLBuilder {
- if b.err == nil {
- b.buf.Write(bs)
- }
- return b
-}
-
-func (b *sqlBuilder) WriteStrings(ss ...string) SQLBuilder {
- if b.err == nil {
- for _, s := range ss {
- b.buf.WriteString(s)
- }
- }
- return b
-}
-
-func (b *sqlBuilder) WriteRunes(rs ...rune) SQLBuilder {
- if b.err == nil {
- for _, r := range rs {
- b.buf.WriteRune(r)
- }
- }
- return b
-}
-
-// Returns true if the sql is a prepared statement
-func (b *sqlBuilder) IsPrepared() bool {
- return b.isPrepared
-}
-
-// Returns true if the sql is a prepared statement
-func (b *sqlBuilder) CurrentArgPosition() int {
- return b.currentArgPosition
-}
-
-// Adds an argument to the builder, used when IsPrepared is false
-func (b *sqlBuilder) WriteArg(i ...interface{}) SQLBuilder {
- if b.err == nil {
- b.currentArgPosition += len(i)
- b.args = append(b.args, i...)
- }
- return b
-}
-
-// Returns the sql string, and arguments.
-func (b *sqlBuilder) ToSQL() (sql string, args []interface{}, err error) {
- if b.err != nil {
- return sql, args, b.err
- }
- return b.buf.String(), b.args, nil
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/tag/tags.go b/vendor/github.com/doug-martin/goqu/v9/internal/tag/tags.go
deleted file mode 100644
index 03652e9e403..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/tag/tags.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package tag
-
-import (
- "reflect"
- "strings"
-)
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type Options string
-
-func New(tagName string, st reflect.StructTag) Options {
- return Options(st.Get(tagName))
-}
-
-func (o Options) Values() []string {
- if string(o) == "" {
- return []string{}
- }
- return strings.Split(string(o), ",")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o Options) Contains(optionName string) bool {
- if o.IsEmpty() {
- return false
- }
- values := o.Values()
- for _, s := range values {
- if s == optionName {
- return true
- }
- }
- return false
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o Options) Equals(val string) bool {
- if len(o) == 0 {
- return false
- }
- return string(o) == val
-}
-
-func (o Options) IsEmpty() bool {
- return len(o) == 0
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/util/column_map.go b/vendor/github.com/doug-martin/goqu/v9/internal/util/column_map.go
deleted file mode 100644
index b82693419a9..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/util/column_map.go
+++ /dev/null
@@ -1,130 +0,0 @@
-package util
-
-import (
- "reflect"
- "sort"
- "strings"
-
- "github.com/doug-martin/goqu/v9/internal/tag"
-)
-
-type (
- ColumnData struct {
- ColumnName string
- FieldIndex []int
- ShouldInsert bool
- ShouldUpdate bool
- DefaultIfEmpty bool
- GoType reflect.Type
- }
- ColumnMap map[string]ColumnData
-)
-
-func newColumnMap(t reflect.Type, fieldIndex []int, prefixes []string) ColumnMap {
- cm, n := ColumnMap{}, t.NumField()
- var subColMaps []ColumnMap
- for i := 0; i < n; i++ {
- f := t.Field(i)
- if f.Anonymous && (f.Type.Kind() == reflect.Struct || f.Type.Kind() == reflect.Ptr) {
- goquTag := tag.New("db", f.Tag)
- if !goquTag.Contains("-") {
- subColMaps = append(subColMaps, getStructColumnMap(&f, fieldIndex, goquTag.Values(), prefixes))
- }
- } else if f.PkgPath == "" {
- dbTag := tag.New("db", f.Tag)
- // if PkgPath is empty then it is an exported field
- columnName := getColumnName(&f, dbTag)
- if !shouldIgnoreField(dbTag) {
- if !implementsScanner(f.Type) {
- subCm := getStructColumnMap(&f, fieldIndex, []string{columnName}, prefixes)
- if len(subCm) != 0 {
- subColMaps = append(subColMaps, subCm)
- continue
- }
- }
- goquTag := tag.New("goqu", f.Tag)
- columnName = strings.Join(append(prefixes, columnName), ".")
- cm[columnName] = newColumnData(&f, columnName, fieldIndex, goquTag)
- }
- }
- }
- return cm.Merge(subColMaps)
-}
-
-func (cm ColumnMap) Cols() []string {
- structCols := make([]string, 0, len(cm))
- for key := range cm {
- structCols = append(structCols, key)
- }
- sort.Strings(structCols)
- return structCols
-}
-
-func (cm ColumnMap) Merge(colMaps []ColumnMap) ColumnMap {
- for _, subCm := range colMaps {
- for key, val := range subCm {
- if _, ok := cm[key]; !ok {
- cm[key] = val
- }
- }
- }
- return cm
-}
-
-func implementsScanner(t reflect.Type) bool {
- if IsPointer(t.Kind()) {
- t = t.Elem()
- }
- if reflect.PtrTo(t).Implements(scannerType) {
- return true
- }
- if !IsStruct(t.Kind()) {
- return true
- }
-
- return false
-}
-
-func newColumnData(f *reflect.StructField, columnName string, fieldIndex []int, goquTag tag.Options) ColumnData {
- return ColumnData{
- ColumnName: columnName,
- ShouldInsert: !goquTag.Contains(skipInsertTagName),
- ShouldUpdate: !goquTag.Contains(skipUpdateTagName),
- DefaultIfEmpty: goquTag.Contains(defaultIfEmptyTagName),
- FieldIndex: concatFieldIndexes(fieldIndex, f.Index),
- GoType: f.Type,
- }
-}
-
-func getStructColumnMap(f *reflect.StructField, fieldIndex []int, fieldNames, prefixes []string) ColumnMap {
- subFieldIndexes := concatFieldIndexes(fieldIndex, f.Index)
- subPrefixes := append(prefixes, fieldNames...)
- if f.Type.Kind() == reflect.Ptr {
- return newColumnMap(f.Type.Elem(), subFieldIndexes, subPrefixes)
- }
- return newColumnMap(f.Type, subFieldIndexes, subPrefixes)
-}
-
-func getColumnName(f *reflect.StructField, dbTag tag.Options) string {
- if dbTag.IsEmpty() {
- return columnRenameFunction(f.Name)
- }
- return dbTag.Values()[0]
-}
-
-func shouldIgnoreField(dbTag tag.Options) bool {
- if dbTag.Equals("-") {
- return true
- } else if dbTag.IsEmpty() && ignoreUntaggedFields {
- return true
- }
-
- return false
-}
-
-// safely concat two fieldIndex slices into one.
-func concatFieldIndexes(fieldIndexPath, fieldIndex []int) []int {
- fieldIndexes := make([]int, 0, len(fieldIndexPath)+len(fieldIndex))
- fieldIndexes = append(fieldIndexes, fieldIndexPath...)
- return append(fieldIndexes, fieldIndex...)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/util/reflect.go b/vendor/github.com/doug-martin/goqu/v9/internal/util/reflect.go
deleted file mode 100644
index bc18b8bd5f8..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/util/reflect.go
+++ /dev/null
@@ -1,220 +0,0 @@
-package util
-
-import (
- "database/sql"
- "reflect"
- "strings"
- "sync"
-
- "github.com/doug-martin/goqu/v9/internal/errors"
-)
-
-const (
- skipUpdateTagName = "skipupdate"
- skipInsertTagName = "skipinsert"
- defaultIfEmptyTagName = "defaultifempty"
-)
-
-var scannerType = reflect.TypeOf((*sql.Scanner)(nil)).Elem()
-
-func IsUint(k reflect.Kind) bool {
- return (k == reflect.Uint) ||
- (k == reflect.Uint8) ||
- (k == reflect.Uint16) ||
- (k == reflect.Uint32) ||
- (k == reflect.Uint64)
-}
-
-func IsInt(k reflect.Kind) bool {
- return (k == reflect.Int) ||
- (k == reflect.Int8) ||
- (k == reflect.Int16) ||
- (k == reflect.Int32) ||
- (k == reflect.Int64)
-}
-
-func IsFloat(k reflect.Kind) bool {
- return (k == reflect.Float32) ||
- (k == reflect.Float64)
-}
-
-func IsString(k reflect.Kind) bool {
- return k == reflect.String
-}
-
-func IsBool(k reflect.Kind) bool {
- return k == reflect.Bool
-}
-
-func IsSlice(k reflect.Kind) bool {
- return k == reflect.Slice
-}
-
-func IsStruct(k reflect.Kind) bool {
- return k == reflect.Struct
-}
-
-func IsInvalid(k reflect.Kind) bool {
- return k == reflect.Invalid
-}
-
-func IsPointer(k reflect.Kind) bool {
- return k == reflect.Ptr
-}
-
-func IsEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- return v.Len() == 0
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- return v.IsNil()
- case reflect.Invalid:
- return true
- default:
- return false
- }
-}
-
-var (
- structMapCache = make(map[interface{}]ColumnMap)
- structMapCacheLock = sync.Mutex{}
-)
-
-var (
- DefaultColumnRenameFunction = strings.ToLower
- columnRenameFunction = DefaultColumnRenameFunction
- ignoreUntaggedFields = false
-)
-
-func SetIgnoreUntaggedFields(ignore bool) {
- // If the value here is changing, reset the struct map cache
- if ignore != ignoreUntaggedFields {
- ignoreUntaggedFields = ignore
-
- structMapCacheLock.Lock()
- defer structMapCacheLock.Unlock()
-
- structMapCache = make(map[interface{}]ColumnMap)
- }
-}
-
-func SetColumnRenameFunction(newFunction func(string) string) {
- columnRenameFunction = newFunction
-}
-
-// GetSliceElementType returns the type for a slices elements.
-func GetSliceElementType(val reflect.Value) reflect.Type {
- elemType := val.Type().Elem()
- if elemType.Kind() == reflect.Ptr {
- elemType = elemType.Elem()
- }
-
- return elemType
-}
-
-// AppendSliceElement will append val to slice. Handles slice of pointers and
-// not pointers. Val needs to be a pointer.
-func AppendSliceElement(slice, val reflect.Value) {
- if slice.Type().Elem().Kind() == reflect.Ptr {
- slice.Set(reflect.Append(slice, val))
- } else {
- slice.Set(reflect.Append(slice, reflect.Indirect(val)))
- }
-}
-
-func GetTypeInfo(i interface{}, val reflect.Value) (reflect.Type, reflect.Kind) {
- var t reflect.Type
- valKind := val.Kind()
- if valKind == reflect.Slice {
- if reflect.ValueOf(i).Kind() == reflect.Ptr {
- t = reflect.TypeOf(i).Elem().Elem()
- } else {
- t = reflect.TypeOf(i).Elem()
- }
- if t.Kind() == reflect.Ptr {
- t = t.Elem()
- }
- valKind = t.Kind()
- } else {
- t = val.Type()
- }
- return t, valKind
-}
-
-func SafeGetFieldByIndex(v reflect.Value, fieldIndex []int) (result reflect.Value, isAvailable bool) {
- switch len(fieldIndex) {
- case 0:
- return v, true
- case 1:
- return v.FieldByIndex(fieldIndex), true
- default:
- if f := reflect.Indirect(v.Field(fieldIndex[0])); f.IsValid() {
- return SafeGetFieldByIndex(f, fieldIndex[1:])
- }
- }
- return reflect.ValueOf(nil), false
-}
-
-func SafeSetFieldByIndex(v reflect.Value, fieldIndex []int, src interface{}) (result reflect.Value) {
- v = reflect.Indirect(v)
- switch len(fieldIndex) {
- case 0:
- return v
- case 1:
- f := v.FieldByIndex(fieldIndex)
- srcVal := reflect.ValueOf(src)
- f.Set(reflect.Indirect(srcVal))
- default:
- f := v.Field(fieldIndex[0])
- switch f.Kind() {
- case reflect.Ptr:
- s := f
- if f.IsNil() || !f.IsValid() {
- s = reflect.New(f.Type().Elem())
- f.Set(s)
- }
- SafeSetFieldByIndex(reflect.Indirect(s), fieldIndex[1:], src)
- case reflect.Struct:
- SafeSetFieldByIndex(f, fieldIndex[1:], src)
- default: // use the original value
- }
- }
- return v
-}
-
-type rowData = map[string]interface{}
-
-// AssignStructVals will assign the data from rd to i.
-func AssignStructVals(i interface{}, rd rowData, cm ColumnMap) {
- val := reflect.Indirect(reflect.ValueOf(i))
-
- for name, data := range cm {
- src, ok := rd[name]
- if ok {
- SafeSetFieldByIndex(val, data.FieldIndex, src)
- }
- }
-}
-
-func GetColumnMap(i interface{}) (ColumnMap, error) {
- val := reflect.Indirect(reflect.ValueOf(i))
- t, valKind := GetTypeInfo(i, val)
- if valKind != reflect.Struct {
- return nil, errors.New("cannot scan into this type: %v", t) // #nosec
- }
-
- structMapCacheLock.Lock()
- defer structMapCacheLock.Unlock()
- if _, ok := structMapCache[t]; !ok {
- structMapCache[t] = newColumnMap(t, []int{}, []string{})
- }
- return structMapCache[t], nil
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/internal/util/value_slice.go b/vendor/github.com/doug-martin/goqu/v9/internal/util/value_slice.go
deleted file mode 100644
index b013ed5ee1f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/internal/util/value_slice.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package util
-
-import (
- "fmt"
- "reflect"
- "sort"
- "strings"
-)
-
-type ValueSlice []reflect.Value
-
-func (vs ValueSlice) Len() int { return len(vs) }
-func (vs ValueSlice) Less(i, j int) bool { return vs[i].String() < vs[j].String() }
-func (vs ValueSlice) Swap(i, j int) { vs[i], vs[j] = vs[j], vs[i] }
-
-func (vs ValueSlice) Equal(other ValueSlice) bool {
- sort.Sort(other)
- for i, key := range vs {
- if other[i].String() != key.String() {
- return false
- }
- }
- return true
-}
-
-func (vs ValueSlice) String() string {
- vals := make([]string, vs.Len())
- for i, key := range vs {
- vals[i] = fmt.Sprintf(`"%s"`, key.String())
- }
- sort.Strings(vals)
- return fmt.Sprintf("[%s]", strings.Join(vals, ","))
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/prepared.go b/vendor/github.com/doug-martin/goqu/v9/prepared.go
deleted file mode 100644
index 796ce98e925..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/prepared.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package goqu
-
-var (
- // defaultPrepared is controlled by SetDefaultPrepared
- defaultPrepared bool
-)
-
-type prepared int
-
-const (
- // zero value that defers to defaultPrepared
- preparedNoPreference prepared = iota
-
- // explicitly enabled via Prepared(true) on a dataset
- preparedEnabled
-
- // explicitly disabled via Prepared(false) on a dataset
- preparedDisabled
-)
-
-// Bool converts the ternary prepared state into a boolean. If the prepared
-// state is preparedNoPreference, the value depends on the last value that
-// SetDefaultPrepared was called with which is false by default.
-func (p prepared) Bool() bool {
- if p == preparedNoPreference {
- return defaultPrepared
- } else if p == preparedEnabled {
- return true
- }
-
- return false
-}
-
-// preparedFromBool converts a bool from e.g. Prepared(true) into a prepared
-// const.
-func preparedFromBool(prepared bool) prepared {
- if prepared {
- return preparedEnabled
- }
-
- return preparedDisabled
-}
-
-// SetDefaultPrepared controls the default Prepared state of all datasets. If
-// set to true, any new dataset will use prepared queries by default.
-func SetDefaultPrepared(prepared bool) {
- defaultPrepared = prepared
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/select_dataset.go b/vendor/github.com/doug-martin/goqu/v9/select_dataset.go
deleted file mode 100644
index 775c387df43..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/select_dataset.go
+++ /dev/null
@@ -1,695 +0,0 @@
-package goqu
-
-import (
- "context"
- "fmt"
-
- "github.com/doug-martin/goqu/v9/exec"
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-// Dataset for creating and/or executing SELECT SQL statements.
-type SelectDataset struct {
- dialect SQLDialect
- clauses exp.SelectClauses
- isPrepared prepared
- queryFactory exec.QueryFactory
- err error
-}
-
-var ErrQueryFactoryNotFoundError = errors.New(
- "unable to execute query did you use goqu.Database#From to create the dataset",
-)
-
-// used internally by database to create a database with a specific adapter
-func newDataset(d string, queryFactory exec.QueryFactory) *SelectDataset {
- return &SelectDataset{
- clauses: exp.NewSelectClauses(),
- dialect: GetDialect(d),
- queryFactory: queryFactory,
- }
-}
-
-func From(table ...interface{}) *SelectDataset {
- return newDataset("default", nil).From(table...)
-}
-
-func Select(cols ...interface{}) *SelectDataset {
- return newDataset("default", nil).Select(cols...)
-}
-
-// Sets the adapter used to serialize values and create the SQL statement
-func (sd *SelectDataset) WithDialect(dl string) *SelectDataset {
- ds := sd.copy(sd.GetClauses())
- ds.dialect = GetDialect(dl)
- return ds
-}
-
-// Set the parameter interpolation behavior. See examples
-//
-// prepared: If true the dataset WILL NOT interpolate the parameters.
-func (sd *SelectDataset) Prepared(prepared bool) *SelectDataset {
- ret := sd.copy(sd.clauses)
- ret.isPrepared = preparedFromBool(prepared)
- return ret
-}
-
-func (sd *SelectDataset) IsPrepared() bool {
- return sd.isPrepared.Bool()
-}
-
-// Returns the current adapter on the dataset
-func (sd *SelectDataset) Dialect() SQLDialect {
- return sd.dialect
-}
-
-// Returns the current adapter on the dataset
-func (sd *SelectDataset) SetDialect(dialect SQLDialect) *SelectDataset {
- cd := sd.copy(sd.GetClauses())
- cd.dialect = dialect
- return cd
-}
-
-func (sd *SelectDataset) Expression() exp.Expression {
- return sd
-}
-
-// Clones the dataset
-func (sd *SelectDataset) Clone() exp.Expression {
- return sd.copy(sd.clauses)
-}
-
-// Returns the current clauses on the dataset.
-func (sd *SelectDataset) GetClauses() exp.SelectClauses {
- return sd.clauses
-}
-
-// used interally to copy the dataset
-func (sd *SelectDataset) copy(clauses exp.SelectClauses) *SelectDataset {
- return &SelectDataset{
- dialect: sd.dialect,
- clauses: clauses,
- isPrepared: sd.isPrepared,
- queryFactory: sd.queryFactory,
- err: sd.err,
- }
-}
-
-// Creates a new UpdateDataset using the FROM of this dataset. This method will also copy over the `WITH`, `WHERE`,
-// `ORDER , and `LIMIT`
-func (sd *SelectDataset) Update() *UpdateDataset {
- u := newUpdateDataset(sd.dialect.Dialect(), sd.queryFactory).
- Prepared(sd.isPrepared.Bool())
- if sd.clauses.HasSources() {
- u = u.Table(sd.GetClauses().From().Columns()[0])
- }
- c := u.clauses
- for _, ce := range sd.clauses.CommonTables() {
- c = c.CommonTablesAppend(ce)
- }
- if sd.clauses.Where() != nil {
- c = c.WhereAppend(sd.clauses.Where())
- }
- if sd.clauses.HasLimit() {
- c = c.SetLimit(sd.clauses.Limit())
- }
- if sd.clauses.HasOrder() {
- for _, oe := range sd.clauses.Order().Columns() {
- c = c.OrderAppend(oe.(exp.OrderedExpression))
- }
- }
- u.clauses = c
- return u
-}
-
-// Creates a new InsertDataset using the FROM of this dataset. This method will also copy over the `WITH` clause to the
-// insert.
-func (sd *SelectDataset) Insert() *InsertDataset {
- i := newInsertDataset(sd.dialect.Dialect(), sd.queryFactory).
- Prepared(sd.isPrepared.Bool())
- if sd.clauses.HasSources() {
- i = i.Into(sd.GetClauses().From().Columns()[0])
- }
- c := i.clauses
- for _, ce := range sd.clauses.CommonTables() {
- c = c.CommonTablesAppend(ce)
- }
- i.clauses = c
- return i
-}
-
-// Creates a new DeleteDataset using the FROM of this dataset. This method will also copy over the `WITH`, `WHERE`,
-// `ORDER , and `LIMIT`
-func (sd *SelectDataset) Delete() *DeleteDataset {
- d := newDeleteDataset(sd.dialect.Dialect(), sd.queryFactory).
- Prepared(sd.isPrepared.Bool())
- if sd.clauses.HasSources() {
- d = d.From(sd.clauses.From().Columns()[0])
- }
- c := d.clauses
- for _, ce := range sd.clauses.CommonTables() {
- c = c.CommonTablesAppend(ce)
- }
- if sd.clauses.Where() != nil {
- c = c.WhereAppend(sd.clauses.Where())
- }
- if sd.clauses.HasLimit() {
- c = c.SetLimit(sd.clauses.Limit())
- }
- if sd.clauses.HasOrder() {
- for _, oe := range sd.clauses.Order().Columns() {
- c = c.OrderAppend(oe.(exp.OrderedExpression))
- }
- }
- d.clauses = c
- return d
-}
-
-// Creates a new TruncateDataset using the FROM of this dataset.
-func (sd *SelectDataset) Truncate() *TruncateDataset {
- td := newTruncateDataset(sd.dialect.Dialect(), sd.queryFactory)
- if sd.clauses.HasSources() {
- td = td.Table(sd.clauses.From())
- }
- return td
-}
-
-// Creates a WITH clause for a common table expression (CTE).
-//
-// The name will be available to SELECT from in the associated query; and can optionally
-// contain a list of column names "name(col1, col2, col3)".
-//
-// The name will refer to the results of the specified subquery.
-func (sd *SelectDataset) With(name string, subquery exp.Expression) *SelectDataset {
- return sd.copy(sd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(false, name, subquery)))
-}
-
-// Creates a WITH RECURSIVE clause for a common table expression (CTE)
-//
-// The name will be available to SELECT from in the associated query; and must
-// contain a list of column names "name(col1, col2, col3)" for a recursive clause.
-//
-// The name will refer to the results of the specified subquery. The subquery for
-// a recursive query will always end with a UNION or UNION ALL with a clause that
-// refers to the CTE by name.
-func (sd *SelectDataset) WithRecursive(name string, subquery exp.Expression) *SelectDataset {
- return sd.copy(sd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(true, name, subquery)))
-}
-
-// Adds columns to the SELECT clause. See examples
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Dataset: Will use the SQL generated from that Dataset. If the dataset is aliased it will use that alias as the
-// column name.
-// LiteralExpression: (See Literal) Will use the literal SQL
-// SQLFunction: (See Func, MIN, MAX, COUNT....)
-// Struct: If passing in an instance of a struct, we will parse the struct for the column names to select.
-// See examples
-func (sd *SelectDataset) Select(selects ...interface{}) *SelectDataset {
- if len(selects) == 0 {
- return sd.ClearSelect()
- }
- return sd.copy(sd.clauses.SetSelect(exp.NewColumnListExpression(selects...)))
-}
-
-// Adds columns to the SELECT DISTINCT clause. See examples
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Dataset: Will use the SQL generated from that Dataset. If the dataset is aliased it will use that alias as the
-// column name.
-// LiteralExpression: (See Literal) Will use the literal SQL
-// SQLFunction: (See Func, MIN, MAX, COUNT....)
-// Struct: If passing in an instance of a struct, we will parse the struct for the column names to select.
-// See examples
-// Deprecated: Use Distinct() instead.
-func (sd *SelectDataset) SelectDistinct(selects ...interface{}) *SelectDataset {
- if len(selects) == 0 {
- cleared := sd.ClearSelect()
- return cleared.copy(cleared.clauses.SetDistinct(nil))
- }
- return sd.copy(sd.clauses.SetSelect(exp.NewColumnListExpression(selects...)).SetDistinct(exp.NewColumnListExpression()))
-}
-
-// Resets to SELECT *. If the SelectDistinct or Distinct was used the returned Dataset will have the the dataset set to SELECT *.
-// See examples.
-func (sd *SelectDataset) ClearSelect() *SelectDataset {
- return sd.copy(sd.clauses.SetSelect(exp.NewColumnListExpression(exp.Star())).SetDistinct(nil))
-}
-
-// Adds columns to the SELECT clause. See examples
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Dataset: Will use the SQL generated from that Dataset. If the dataset is aliased it will use that alias as the
-// column name.
-// LiteralExpression: (See Literal) Will use the literal SQL
-// SQLFunction: (See Func, MIN, MAX, COUNT....)
-func (sd *SelectDataset) SelectAppend(selects ...interface{}) *SelectDataset {
- return sd.copy(sd.clauses.SelectAppend(exp.NewColumnListExpression(selects...)))
-}
-
-func (sd *SelectDataset) Distinct(on ...interface{}) *SelectDataset {
- return sd.copy(sd.clauses.SetDistinct(exp.NewColumnListExpression(on...)))
-}
-
-// Adds a FROM clause. This return a new dataset with the original sources replaced. See examples.
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// Dataset: Will be added as a sub select. If the Dataset is not aliased it will automatically be aliased
-// LiteralExpression: (See Literal) Will use the literal SQL
-func (sd *SelectDataset) From(from ...interface{}) *SelectDataset {
- var sources []interface{}
- numSources := 0
- for _, source := range from {
- if ds, ok := source.(*SelectDataset); ok && !ds.clauses.HasAlias() {
- numSources++
- sources = append(sources, ds.As(fmt.Sprintf("t%d", numSources)))
- } else {
- sources = append(sources, source)
- }
- }
- return sd.copy(sd.clauses.SetFrom(exp.NewColumnListExpression(sources...)))
-}
-
-// Returns a new Dataset with the current one as an source. If the current Dataset is not aliased (See Dataset#As) then
-// it will automatically be aliased. See examples.
-func (sd *SelectDataset) FromSelf() *SelectDataset {
- return sd.copy(exp.NewSelectClauses()).From(sd)
-}
-
-// Alias to InnerJoin. See examples.
-func (sd *SelectDataset) Join(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.InnerJoin(table, condition)
-}
-
-// Adds an INNER JOIN clause. See examples.
-func (sd *SelectDataset) InnerJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.InnerJoinType, table, condition))
-}
-
-// Adds a FULL OUTER JOIN clause. See examples.
-func (sd *SelectDataset) FullOuterJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.FullOuterJoinType, table, condition))
-}
-
-// Adds a RIGHT OUTER JOIN clause. See examples.
-func (sd *SelectDataset) RightOuterJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.RightOuterJoinType, table, condition))
-}
-
-// Adds a LEFT OUTER JOIN clause. See examples.
-func (sd *SelectDataset) LeftOuterJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.LeftOuterJoinType, table, condition))
-}
-
-// Adds a FULL JOIN clause. See examples.
-func (sd *SelectDataset) FullJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.FullJoinType, table, condition))
-}
-
-// Adds a RIGHT JOIN clause. See examples.
-func (sd *SelectDataset) RightJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.RightJoinType, table, condition))
-}
-
-// Adds a LEFT JOIN clause. See examples.
-func (sd *SelectDataset) LeftJoin(table exp.Expression, condition exp.JoinCondition) *SelectDataset {
- return sd.joinTable(exp.NewConditionedJoinExpression(exp.LeftJoinType, table, condition))
-}
-
-// Adds a NATURAL JOIN clause. See examples.
-func (sd *SelectDataset) NaturalJoin(table exp.Expression) *SelectDataset {
- return sd.joinTable(exp.NewUnConditionedJoinExpression(exp.NaturalJoinType, table))
-}
-
-// Adds a NATURAL LEFT JOIN clause. See examples.
-func (sd *SelectDataset) NaturalLeftJoin(table exp.Expression) *SelectDataset {
- return sd.joinTable(exp.NewUnConditionedJoinExpression(exp.NaturalLeftJoinType, table))
-}
-
-// Adds a NATURAL RIGHT JOIN clause. See examples.
-func (sd *SelectDataset) NaturalRightJoin(table exp.Expression) *SelectDataset {
- return sd.joinTable(exp.NewUnConditionedJoinExpression(exp.NaturalRightJoinType, table))
-}
-
-// Adds a NATURAL FULL JOIN clause. See examples.
-func (sd *SelectDataset) NaturalFullJoin(table exp.Expression) *SelectDataset {
- return sd.joinTable(exp.NewUnConditionedJoinExpression(exp.NaturalFullJoinType, table))
-}
-
-// Adds a CROSS JOIN clause. See examples.
-func (sd *SelectDataset) CrossJoin(table exp.Expression) *SelectDataset {
- return sd.joinTable(exp.NewUnConditionedJoinExpression(exp.CrossJoinType, table))
-}
-
-// Joins this Datasets table with another
-func (sd *SelectDataset) joinTable(join exp.JoinExpression) *SelectDataset {
- return sd.copy(sd.clauses.JoinsAppend(join))
-}
-
-// Adds a WHERE clause. See examples.
-func (sd *SelectDataset) Where(expressions ...exp.Expression) *SelectDataset {
- return sd.copy(sd.clauses.WhereAppend(expressions...))
-}
-
-// Removes the WHERE clause. See examples.
-func (sd *SelectDataset) ClearWhere() *SelectDataset {
- return sd.copy(sd.clauses.ClearWhere())
-}
-
-// Adds a FOR UPDATE clause. See examples.
-func (sd *SelectDataset) ForUpdate(waitOption exp.WaitOption, of ...exp.IdentifierExpression) *SelectDataset {
- return sd.withLock(exp.ForUpdate, waitOption, of...)
-}
-
-// Adds a FOR NO KEY UPDATE clause. See examples.
-func (sd *SelectDataset) ForNoKeyUpdate(waitOption exp.WaitOption, of ...exp.IdentifierExpression) *SelectDataset {
- return sd.withLock(exp.ForNoKeyUpdate, waitOption, of...)
-}
-
-// Adds a FOR KEY SHARE clause. See examples.
-func (sd *SelectDataset) ForKeyShare(waitOption exp.WaitOption, of ...exp.IdentifierExpression) *SelectDataset {
- return sd.withLock(exp.ForKeyShare, waitOption, of...)
-}
-
-// Adds a FOR SHARE clause. See examples.
-func (sd *SelectDataset) ForShare(waitOption exp.WaitOption, of ...exp.IdentifierExpression) *SelectDataset {
- return sd.withLock(exp.ForShare, waitOption, of...)
-}
-
-func (sd *SelectDataset) withLock(strength exp.LockStrength, option exp.WaitOption, of ...exp.IdentifierExpression) *SelectDataset {
- return sd.copy(sd.clauses.SetLock(exp.NewLock(strength, option, of...)))
-}
-
-// Adds a GROUP BY clause. See examples.
-func (sd *SelectDataset) GroupBy(groupBy ...interface{}) *SelectDataset {
- return sd.copy(sd.clauses.SetGroupBy(exp.NewColumnListExpression(groupBy...)))
-}
-
-// Adds more columns to the current GROUP BY clause. See examples.
-func (sd *SelectDataset) GroupByAppend(groupBy ...interface{}) *SelectDataset {
- return sd.copy(sd.clauses.GroupByAppend(exp.NewColumnListExpression(groupBy...)))
-}
-
-// Adds a HAVING clause. See examples.
-func (sd *SelectDataset) Having(expressions ...exp.Expression) *SelectDataset {
- return sd.copy(sd.clauses.HavingAppend(expressions...))
-}
-
-// Adds a ORDER clause. If the ORDER is currently set it replaces it. See examples.
-func (sd *SelectDataset) Order(order ...exp.OrderedExpression) *SelectDataset {
- return sd.copy(sd.clauses.SetOrder(order...))
-}
-
-// Adds a more columns to the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (sd *SelectDataset) OrderAppend(order ...exp.OrderedExpression) *SelectDataset {
- return sd.copy(sd.clauses.OrderAppend(order...))
-}
-
-// Adds a more columns to the beginning of the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (sd *SelectDataset) OrderPrepend(order ...exp.OrderedExpression) *SelectDataset {
- return sd.copy(sd.clauses.OrderPrepend(order...))
-}
-
-// Removes the ORDER BY clause. See examples.
-func (sd *SelectDataset) ClearOrder() *SelectDataset {
- return sd.copy(sd.clauses.ClearOrder())
-}
-
-// Adds a LIMIT clause. If the LIMIT is currently set it replaces it. See examples.
-func (sd *SelectDataset) Limit(limit uint) *SelectDataset {
- if limit > 0 {
- return sd.copy(sd.clauses.SetLimit(limit))
- }
- return sd.copy(sd.clauses.ClearLimit())
-}
-
-// Adds a LIMIT ALL clause. If the LIMIT is currently set it replaces it. See examples.
-func (sd *SelectDataset) LimitAll() *SelectDataset {
- return sd.copy(sd.clauses.SetLimit(L("ALL")))
-}
-
-// Removes the LIMIT clause.
-func (sd *SelectDataset) ClearLimit() *SelectDataset {
- return sd.copy(sd.clauses.ClearLimit())
-}
-
-// Adds an OFFSET clause. If the OFFSET is currently set it replaces it. See examples.
-func (sd *SelectDataset) Offset(offset uint) *SelectDataset {
- return sd.copy(sd.clauses.SetOffset(offset))
-}
-
-// Removes the OFFSET clause from the Dataset
-func (sd *SelectDataset) ClearOffset() *SelectDataset {
- return sd.copy(sd.clauses.ClearOffset())
-}
-
-// Creates an UNION statement with another dataset.
-// If this or the other dataset has a limit or offset it will use that dataset as a subselect in the FROM clause.
-// See examples.
-func (sd *SelectDataset) Union(other *SelectDataset) *SelectDataset {
- return sd.withCompound(exp.UnionCompoundType, other.CompoundFromSelf())
-}
-
-// Creates an UNION ALL statement with another dataset.
-// If this or the other dataset has a limit or offset it will use that dataset as a subselect in the FROM clause.
-// See examples.
-func (sd *SelectDataset) UnionAll(other *SelectDataset) *SelectDataset {
- return sd.withCompound(exp.UnionAllCompoundType, other.CompoundFromSelf())
-}
-
-// Creates an INTERSECT statement with another dataset.
-// If this or the other dataset has a limit or offset it will use that dataset as a subselect in the FROM clause.
-// See examples.
-func (sd *SelectDataset) Intersect(other *SelectDataset) *SelectDataset {
- return sd.withCompound(exp.IntersectCompoundType, other.CompoundFromSelf())
-}
-
-// Creates an INTERSECT ALL statement with another dataset.
-// If this or the other dataset has a limit or offset it will use that dataset as a subselect in the FROM clause.
-// See examples.
-func (sd *SelectDataset) IntersectAll(other *SelectDataset) *SelectDataset {
- return sd.withCompound(exp.IntersectAllCompoundType, other.CompoundFromSelf())
-}
-
-func (sd *SelectDataset) withCompound(ct exp.CompoundType, other exp.AppendableExpression) *SelectDataset {
- ce := exp.NewCompoundExpression(ct, other)
- ret := sd.CompoundFromSelf()
- ret.clauses = ret.clauses.CompoundsAppend(ce)
- return ret
-}
-
-// Used internally to determine if the dataset needs to use iteself as a source.
-// If the dataset has an order or limit it will select from itself
-func (sd *SelectDataset) CompoundFromSelf() *SelectDataset {
- if sd.clauses.HasOrder() || sd.clauses.HasLimit() {
- return sd.FromSelf()
- }
- return sd.copy(sd.clauses)
-}
-
-// Sets the alias for this dataset. This is typically used when using a Dataset as a subselect. See examples.
-func (sd *SelectDataset) As(alias string) *SelectDataset {
- return sd.copy(sd.clauses.SetAlias(T(alias)))
-}
-
-// Returns the alias value as an identiier expression
-func (sd *SelectDataset) GetAs() exp.IdentifierExpression {
- return sd.clauses.Alias()
-}
-
-// Sets the WINDOW clauses
-func (sd *SelectDataset) Window(ws ...exp.WindowExpression) *SelectDataset {
- return sd.copy(sd.clauses.SetWindows(ws))
-}
-
-// Sets the WINDOW clauses
-func (sd *SelectDataset) WindowAppend(ws ...exp.WindowExpression) *SelectDataset {
- return sd.copy(sd.clauses.WindowsAppend(ws...))
-}
-
-// Sets the WINDOW clauses
-func (sd *SelectDataset) ClearWindow() *SelectDataset {
- return sd.copy(sd.clauses.ClearWindows())
-}
-
-// Get any error that has been set or nil if no error has been set.
-func (sd *SelectDataset) Error() error {
- return sd.err
-}
-
-// Set an error on the dataset if one has not already been set. This error will be returned by a future call to Error
-// or as part of ToSQL. This can be used by end users to record errors while building up queries without having to
-// track those separately.
-func (sd *SelectDataset) SetError(err error) *SelectDataset {
- if sd.err == nil {
- sd.err = err
- }
-
- return sd
-}
-
-// Generates a SELECT sql statement, if Prepared has been called with true then the parameters will not be interpolated.
-// See examples.
-//
-// Errors:
-// * There is an error generating the SQL
-func (sd *SelectDataset) ToSQL() (sql string, params []interface{}, err error) {
- return sd.selectSQLBuilder().ToSQL()
-}
-
-// Generates the SELECT sql, and returns an Exec struct with the sql set to the SELECT statement
-// db.From("test").Select("col").Executor()
-//
-// See Dataset#ToUpdateSQL for arguments
-func (sd *SelectDataset) Executor() exec.QueryExecutor {
- return sd.queryFactory.FromSQLBuilder(sd.selectSQLBuilder())
-}
-
-// Appends this Dataset's SELECT statement to the SQLBuilder
-// This is used internally for sub-selects by the dialect
-func (sd *SelectDataset) AppendSQL(b sb.SQLBuilder) {
- if sd.err != nil {
- b.SetError(sd.err)
- return
- }
- sd.dialect.ToSelectSQL(b, sd.GetClauses())
-}
-
-func (sd *SelectDataset) ReturnsColumns() bool {
- return true
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanStructs to scan the results into a slice of structs.
-//
-// ScanStructs will only select the columns that can be scanned in to the struct unless you have explicitly selected
-// certain columns. See examples.
-//
-// i: A pointer to a slice of structs
-func (sd *SelectDataset) ScanStructs(i interface{}) error {
- return sd.ScanStructsContext(context.Background(), i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanStructsContext to scan the results into a slice of
-// structs.
-//
-// ScanStructsContext will only select the columns that can be scanned in to the struct unless you have explicitly
-// selected certain columns. See examples.
-//
-// i: A pointer to a slice of structs
-func (sd *SelectDataset) ScanStructsContext(ctx context.Context, i interface{}) error {
- if sd.queryFactory == nil {
- return ErrQueryFactoryNotFoundError
- }
- ds := sd
- if sd.GetClauses().IsDefaultSelect() {
- ds = sd.Select(i)
- }
- return ds.Executor().ScanStructsContext(ctx, i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanStruct to scan the result into a slice of structs
-//
-// ScanStruct will only select the columns that can be scanned in to the struct unless you have explicitly selected
-// certain columns. See examples.
-//
-// i: A pointer to a structs
-func (sd *SelectDataset) ScanStruct(i interface{}) (bool, error) {
- return sd.ScanStructContext(context.Background(), i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanStructContext to scan the result into a slice of structs
-//
-// ScanStructContext will only select the columns that can be scanned in to the struct unless you have explicitly
-// selected certain columns. See examples.
-//
-// i: A pointer to a structs
-func (sd *SelectDataset) ScanStructContext(ctx context.Context, i interface{}) (bool, error) {
- if sd.queryFactory == nil {
- return false, ErrQueryFactoryNotFoundError
- }
- ds := sd
- if sd.GetClauses().IsDefaultSelect() {
- ds = sd.Select(i)
- }
- return ds.Limit(1).Executor().ScanStructContext(ctx, i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanVals to scan the results into a slice of primitive values
-//
-// i: A pointer to a slice of primitive values
-func (sd *SelectDataset) ScanVals(i interface{}) error {
- return sd.ScanValsContext(context.Background(), i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanValsContext to scan the results into a slice of primitive
-// values
-//
-// i: A pointer to a slice of primitive values
-func (sd *SelectDataset) ScanValsContext(ctx context.Context, i interface{}) error {
- if sd.queryFactory == nil {
- return ErrQueryFactoryNotFoundError
- }
- return sd.Executor().ScanValsContext(ctx, i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanVal to scan the result into a primitive value
-//
-// i: A pointer to a primitive value
-func (sd *SelectDataset) ScanVal(i interface{}) (bool, error) {
- return sd.ScanValContext(context.Background(), i)
-}
-
-// Generates the SELECT sql for this dataset and uses Exec#ScanValContext to scan the result into a primitive value
-//
-// i: A pointer to a primitive value
-func (sd *SelectDataset) ScanValContext(ctx context.Context, i interface{}) (bool, error) {
- if sd.queryFactory == nil {
- return false, ErrQueryFactoryNotFoundError
- }
- return sd.Limit(1).Executor().ScanValContext(ctx, i)
-}
-
-// Generates the SELECT COUNT(*) sql for this dataset and uses Exec#ScanVal to scan the result into an int64.
-func (sd *SelectDataset) Count() (int64, error) {
- return sd.CountContext(context.Background())
-}
-
-// Generates the SELECT COUNT(*) sql for this dataset and uses Exec#ScanValContext to scan the result into an int64.
-func (sd *SelectDataset) CountContext(ctx context.Context) (int64, error) {
- var count int64
- _, err := sd.Select(COUNT(Star()).As("count")).ScanValContext(ctx, &count)
- return count, err
-}
-
-// Generates the SELECT sql only selecting the passed in column and uses Exec#ScanVals to scan the result into a slice
-// of primitive values.
-//
-// i: A slice of primitive values
-//
-// col: The column to select when generative the SQL
-func (sd *SelectDataset) Pluck(i interface{}, col string) error {
- return sd.PluckContext(context.Background(), i, col)
-}
-
-// Generates the SELECT sql only selecting the passed in column and uses Exec#ScanValsContext to scan the result into a
-// slice of primitive values.
-//
-// i: A slice of primitive values
-//
-// col: The column to select when generative the SQL
-func (sd *SelectDataset) PluckContext(ctx context.Context, i interface{}, col string) error {
- return sd.Select(col).ScanValsContext(ctx, i)
-}
-
-func (sd *SelectDataset) selectSQLBuilder() sb.SQLBuilder {
- buf := sb.NewSQLBuilder(sd.isPrepared.Bool())
- if sd.err != nil {
- return buf.SetError(sd.err)
- }
- sd.dialect.ToSelectSQL(buf, sd.GetClauses())
- return buf
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sql_dialect.go b/vendor/github.com/doug-martin/goqu/v9/sql_dialect.go
deleted file mode 100644
index 79682741162..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sql_dialect.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package goqu
-
-import (
- "strings"
- "sync"
-
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/sb"
- "github.com/doug-martin/goqu/v9/sqlgen"
-)
-
-type (
- SQLDialectOptions = sqlgen.SQLDialectOptions
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- SQLDialect interface {
- Dialect() string
- ToSelectSQL(b sb.SQLBuilder, clauses exp.SelectClauses)
- ToUpdateSQL(b sb.SQLBuilder, clauses exp.UpdateClauses)
- ToInsertSQL(b sb.SQLBuilder, clauses exp.InsertClauses)
- ToDeleteSQL(b sb.SQLBuilder, clauses exp.DeleteClauses)
- ToTruncateSQL(b sb.SQLBuilder, clauses exp.TruncateClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- sqlDialect struct {
- dialect string
- dialectOptions *SQLDialectOptions
- selectGen sqlgen.SelectSQLGenerator
- updateGen sqlgen.UpdateSQLGenerator
- insertGen sqlgen.InsertSQLGenerator
- deleteGen sqlgen.DeleteSQLGenerator
- truncateGen sqlgen.TruncateSQLGenerator
- }
-)
-
-var (
- dialects = make(map[string]SQLDialect)
- DefaultDialectOptions = sqlgen.DefaultDialectOptions
- dialectsMu sync.RWMutex
-)
-
-func init() {
- RegisterDialect("default", DefaultDialectOptions())
-}
-
-func RegisterDialect(name string, do *SQLDialectOptions) {
- dialectsMu.Lock()
- defer dialectsMu.Unlock()
- lowerName := strings.ToLower(name)
- dialects[lowerName] = newDialect(lowerName, do)
-}
-
-func DeregisterDialect(name string) {
- dialectsMu.Lock()
- defer dialectsMu.Unlock()
- delete(dialects, strings.ToLower(name))
-}
-
-func GetDialect(name string) SQLDialect {
- name = strings.ToLower(name)
- if d, ok := dialects[name]; ok {
- return d
- }
- return newDialect("default", DefaultDialectOptions())
-}
-
-func newDialect(dialect string, do *SQLDialectOptions) SQLDialect {
- return &sqlDialect{
- dialect: dialect,
- dialectOptions: do,
- selectGen: sqlgen.NewSelectSQLGenerator(dialect, do),
- updateGen: sqlgen.NewUpdateSQLGenerator(dialect, do),
- insertGen: sqlgen.NewInsertSQLGenerator(dialect, do),
- deleteGen: sqlgen.NewDeleteSQLGenerator(dialect, do),
- truncateGen: sqlgen.NewTruncateSQLGenerator(dialect, do),
- }
-}
-
-func (d *sqlDialect) Dialect() string {
- return d.dialect
-}
-
-func (d *sqlDialect) ToSelectSQL(b sb.SQLBuilder, clauses exp.SelectClauses) {
- d.selectGen.Generate(b, clauses)
-}
-
-func (d *sqlDialect) ToUpdateSQL(b sb.SQLBuilder, clauses exp.UpdateClauses) {
- d.updateGen.Generate(b, clauses)
-}
-
-func (d *sqlDialect) ToInsertSQL(b sb.SQLBuilder, clauses exp.InsertClauses) {
- d.insertGen.Generate(b, clauses)
-}
-
-func (d *sqlDialect) ToDeleteSQL(b sb.SQLBuilder, clauses exp.DeleteClauses) {
- d.deleteGen.Generate(b, clauses)
-}
-
-func (d *sqlDialect) ToTruncateSQL(b sb.SQLBuilder, clauses exp.TruncateClauses) {
- d.truncateGen.Generate(b, clauses)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/common_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/common_sql_generator.go
deleted file mode 100644
index b54a87019b3..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/common_sql_generator.go
+++ /dev/null
@@ -1,155 +0,0 @@
-package sqlgen
-
-import (
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-var ErrNoUpdatedValuesProvided = errors.New("no update values provided")
-
-func ErrCTENotSupported(dialect string) error {
- return errors.New("dialect does not support CTE WITH clause [dialect=%s]", dialect)
-}
-
-func ErrRecursiveCTENotSupported(dialect string) error {
- return errors.New("dialect does not support CTE WITH RECURSIVE clause [dialect=%s]", dialect)
-}
-
-func ErrReturnNotSupported(dialect string) error {
- return errors.New("dialect does not support RETURNING clause [dialect=%s]", dialect)
-}
-
-func ErrNotSupportedFragment(sqlType string, f SQLFragmentType) error {
- return errors.New("unsupported %s SQL fragment %s", sqlType, f)
-}
-
-type (
- CommonSQLGenerator interface {
- Dialect() string
- DialectOptions() *SQLDialectOptions
- ExpressionSQLGenerator() ExpressionSQLGenerator
- ReturningSQL(b sb.SQLBuilder, returns exp.ColumnListExpression)
- FromSQL(b sb.SQLBuilder, from exp.ColumnListExpression)
- SourcesSQL(b sb.SQLBuilder, from exp.ColumnListExpression)
- WhereSQL(b sb.SQLBuilder, where exp.ExpressionList)
- OrderSQL(b sb.SQLBuilder, order exp.ColumnListExpression)
- OrderWithOffsetFetchSQL(b sb.SQLBuilder, order exp.ColumnListExpression, offset uint, limit interface{})
- LimitSQL(b sb.SQLBuilder, limit interface{})
- UpdateExpressionSQL(b sb.SQLBuilder, updates ...exp.UpdateExpression)
- }
- commonSQLGenerator struct {
- dialect string
- esg ExpressionSQLGenerator
- dialectOptions *SQLDialectOptions
- }
-)
-
-func NewCommonSQLGenerator(dialect string, do *SQLDialectOptions) CommonSQLGenerator {
- return &commonSQLGenerator{dialect: dialect, esg: NewExpressionSQLGenerator(dialect, do), dialectOptions: do}
-}
-
-func (csg *commonSQLGenerator) Dialect() string {
- return csg.dialect
-}
-
-func (csg *commonSQLGenerator) DialectOptions() *SQLDialectOptions {
- return csg.dialectOptions
-}
-
-func (csg *commonSQLGenerator) ExpressionSQLGenerator() ExpressionSQLGenerator {
- return csg.esg
-}
-
-func (csg *commonSQLGenerator) ReturningSQL(b sb.SQLBuilder, returns exp.ColumnListExpression) {
- if returns != nil && len(returns.Columns()) > 0 {
- if csg.dialectOptions.SupportsReturn {
- b.Write(csg.dialectOptions.ReturningFragment)
- csg.esg.Generate(b, returns)
- } else {
- b.SetError(ErrReturnNotSupported(csg.dialect))
- }
- }
-}
-
-// Adds the FROM clause and tables to an sql statement
-func (csg *commonSQLGenerator) FromSQL(b sb.SQLBuilder, from exp.ColumnListExpression) {
- if from != nil && !from.IsEmpty() {
- b.Write(csg.dialectOptions.FromFragment)
- csg.SourcesSQL(b, from)
- }
-}
-
-// Adds the generates the SQL for a column list
-func (csg *commonSQLGenerator) SourcesSQL(b sb.SQLBuilder, from exp.ColumnListExpression) {
- b.WriteRunes(csg.dialectOptions.SpaceRune)
- csg.esg.Generate(b, from)
-}
-
-// Generates the WHERE clause for an SQL statement
-func (csg *commonSQLGenerator) WhereSQL(b sb.SQLBuilder, where exp.ExpressionList) {
- if where != nil && !where.IsEmpty() {
- b.Write(csg.dialectOptions.WhereFragment)
- csg.esg.Generate(b, where)
- }
-}
-
-// Generates the ORDER BY clause for an SQL statement
-func (csg *commonSQLGenerator) OrderSQL(b sb.SQLBuilder, order exp.ColumnListExpression) {
- if order != nil && len(order.Columns()) > 0 {
- b.Write(csg.dialectOptions.OrderByFragment)
- csg.esg.Generate(b, order)
- }
-}
-
-func (csg *commonSQLGenerator) OrderWithOffsetFetchSQL(
- b sb.SQLBuilder,
- order exp.ColumnListExpression,
- offset uint,
- limit interface{},
-) {
- if order == nil {
- return
- }
-
- csg.OrderSQL(b, order)
- if offset > 0 {
- b.Write(csg.dialectOptions.OffsetFragment)
- csg.esg.Generate(b, offset)
- b.Write([]byte(" ROWS"))
-
- if limit != nil {
- b.Write(csg.dialectOptions.FetchFragment)
- csg.esg.Generate(b, limit)
- b.Write([]byte(" ROWS ONLY"))
- }
- }
-}
-
-// Generates the LIMIT clause for an SQL statement
-func (csg *commonSQLGenerator) LimitSQL(b sb.SQLBuilder, limit interface{}) {
- if limit != nil {
- b.Write(csg.dialectOptions.LimitFragment)
- if csg.dialectOptions.SurroundLimitWithParentheses {
- b.WriteRunes(csg.dialectOptions.LeftParenRune)
- }
- csg.esg.Generate(b, limit)
- if csg.dialectOptions.SurroundLimitWithParentheses {
- b.WriteRunes(csg.dialectOptions.RightParenRune)
- }
- }
-}
-
-func (csg *commonSQLGenerator) UpdateExpressionSQL(b sb.SQLBuilder, updates ...exp.UpdateExpression) {
- if len(updates) == 0 {
- b.SetError(ErrNoUpdatedValuesProvided)
- return
- }
- updateLen := len(updates)
- for i, update := range updates {
- csg.esg.Generate(b, update)
- if i < updateLen-1 {
- b.WriteRunes(csg.dialectOptions.CommaRune)
- }
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/delete_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/delete_sql_generator.go
deleted file mode 100644
index 107708a2881..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/delete_sql_generator.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package sqlgen
-
-import (
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- DeleteSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, clauses exp.DeleteClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- deleteSQLGenerator struct {
- CommonSQLGenerator
- }
-)
-
-var ErrNoSourceForDelete = errors.New("no source found when generating delete sql")
-
-func NewDeleteSQLGenerator(dialect string, do *SQLDialectOptions) DeleteSQLGenerator {
- return &deleteSQLGenerator{NewCommonSQLGenerator(dialect, do)}
-}
-
-func (dsg *deleteSQLGenerator) Generate(b sb.SQLBuilder, clauses exp.DeleteClauses) {
- if !clauses.HasFrom() {
- b.SetError(ErrNoSourceForDelete)
- return
- }
- for _, f := range dsg.DialectOptions().DeleteSQLOrder {
- if b.Error() != nil {
- return
- }
- switch f {
- case CommonTableSQLFragment:
- dsg.ExpressionSQLGenerator().Generate(b, clauses.CommonTables())
- case DeleteBeginSQLFragment:
- dsg.DeleteBeginSQL(
- b, exp.NewColumnListExpression(clauses.From()), !(clauses.HasLimit() || clauses.HasOrder()),
- )
- case FromSQLFragment:
- dsg.FromSQL(b, exp.NewColumnListExpression(clauses.From()))
- case WhereSQLFragment:
- dsg.WhereSQL(b, clauses.Where())
- case OrderSQLFragment:
- if dsg.DialectOptions().SupportsOrderByOnDelete {
- dsg.OrderSQL(b, clauses.Order())
- }
- case LimitSQLFragment:
- if dsg.DialectOptions().SupportsLimitOnDelete {
- dsg.LimitSQL(b, clauses.Limit())
- }
- case ReturningSQLFragment:
- dsg.ReturningSQL(b, clauses.Returning())
- default:
- b.SetError(ErrNotSupportedFragment("DELETE", f))
- }
- }
-}
-
-// Adds the correct fragment to being an DELETE statement
-func (dsg *deleteSQLGenerator) DeleteBeginSQL(b sb.SQLBuilder, from exp.ColumnListExpression, multiTable bool) {
- b.Write(dsg.DialectOptions().DeleteClause)
- if multiTable && dsg.DialectOptions().SupportsDeleteTableHint {
- dsg.SourcesSQL(b, from)
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/expression_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/expression_sql_generator.go
deleted file mode 100644
index 82ce15c58a4..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/expression_sql_generator.go
+++ /dev/null
@@ -1,733 +0,0 @@
-package sqlgen
-
-import (
- "database/sql/driver"
- "reflect"
- "strconv"
- "time"
- "unicode/utf8"
-
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
- "github.com/doug-martin/goqu/v9/internal/util"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- ExpressionSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, val interface{})
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- expressionSQLGenerator struct {
- dialect string
- dialectOptions *SQLDialectOptions
- }
-)
-
-var (
- replacementRune = '?'
- TrueLiteral = exp.NewLiteralExpression("TRUE")
- FalseLiteral = exp.NewLiteralExpression("FALSE")
-
- ErrEmptyIdentifier = errors.New(
- `a empty identifier was encountered, please specify a "schema", "table" or "column"`,
- )
- ErrUnexpectedNamedWindow = errors.New(`unexpected named window function`)
- ErrEmptyCaseWhens = errors.New(`when conditions not found for case statement`)
-)
-
-func errUnsupportedExpressionType(e exp.Expression) error {
- return errors.New("unsupported expression type %T", e)
-}
-
-func errUnsupportedIdentifierExpression(t interface{}) error {
- return errors.New("unexpected col type must be string or LiteralExpression received %T", t)
-}
-
-func errUnsupportedBooleanExpressionOperator(op exp.BooleanOperation) error {
- return errors.New("boolean operator '%+v' not supported", op)
-}
-
-func errUnsupportedBitwiseExpressionOperator(op exp.BitwiseOperation) error {
- return errors.New("bitwise operator '%+v' not supported", op)
-}
-
-func errUnsupportedRangeExpressionOperator(op exp.RangeOperation) error {
- return errors.New("range operator %+v not supported", op)
-}
-
-func errLateralNotSupported(dialect string) error {
- return errors.New("dialect does not support lateral expressions [dialect=%s]", dialect)
-}
-
-func NewExpressionSQLGenerator(dialect string, do *SQLDialectOptions) ExpressionSQLGenerator {
- return &expressionSQLGenerator{dialect: dialect, dialectOptions: do}
-}
-
-func (esg *expressionSQLGenerator) Dialect() string {
- return esg.dialect
-}
-
-var valuerReflectType = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
-
-func (esg *expressionSQLGenerator) Generate(b sb.SQLBuilder, val interface{}) {
- if b.Error() != nil {
- return
- }
- if val == nil {
- esg.literalNil(b)
- return
- }
- switch v := val.(type) {
- case exp.Expression:
- esg.expressionSQL(b, v)
- case int:
- esg.literalInt(b, int64(v))
- case int32:
- esg.literalInt(b, int64(v))
- case int64:
- esg.literalInt(b, v)
- case float32:
- esg.literalFloat(b, float64(v))
- case float64:
- esg.literalFloat(b, v)
- case string:
- esg.literalString(b, v)
- case bool:
- esg.literalBool(b, v)
- case time.Time:
- esg.literalTime(b, v)
- case *time.Time:
- if v == nil {
- esg.literalNil(b)
- return
- }
- esg.literalTime(b, *v)
- case driver.Valuer:
- // See https://github.com/golang/go/commit/0ce1d79a6a771f7449ec493b993ed2a720917870
- if rv := reflect.ValueOf(val); rv.Kind() == reflect.Ptr &&
- rv.IsNil() &&
- rv.Type().Elem().Implements(valuerReflectType) {
- esg.literalNil(b)
- return
- }
- dVal, err := v.Value()
- if err != nil {
- b.SetError(err)
- return
- }
- esg.Generate(b, dVal)
- default:
- esg.reflectSQL(b, val)
- }
-}
-
-func (esg *expressionSQLGenerator) reflectSQL(b sb.SQLBuilder, val interface{}) {
- v := reflect.Indirect(reflect.ValueOf(val))
- valKind := v.Kind()
- switch {
- case util.IsInvalid(valKind):
- esg.literalNil(b)
- case util.IsSlice(valKind):
- switch t := val.(type) {
- case []byte:
- esg.literalBytes(b, t)
- case []exp.CommonTableExpression:
- esg.commonTablesSliceSQL(b, t)
- default:
- esg.sliceValueSQL(b, v)
- }
- case util.IsInt(valKind):
- esg.Generate(b, v.Int())
- case util.IsUint(valKind):
- esg.Generate(b, int64(v.Uint()))
- case util.IsFloat(valKind):
- esg.Generate(b, v.Float())
- case util.IsString(valKind):
- esg.Generate(b, v.String())
- case util.IsBool(valKind):
- esg.Generate(b, v.Bool())
- default:
- b.SetError(errors.NewEncodeError(val))
- }
-}
-
-// nolint:gocyclo // not complex just long
-func (esg *expressionSQLGenerator) expressionSQL(b sb.SQLBuilder, expression exp.Expression) {
- switch e := expression.(type) {
- case exp.ColumnListExpression:
- esg.columnListSQL(b, e)
- case exp.ExpressionList:
- esg.expressionListSQL(b, e)
- case exp.LiteralExpression:
- esg.literalExpressionSQL(b, e)
- case exp.IdentifierExpression:
- esg.identifierExpressionSQL(b, e)
- case exp.LateralExpression:
- esg.lateralExpressionSQL(b, e)
- case exp.AliasedExpression:
- esg.aliasedExpressionSQL(b, e)
- case exp.BooleanExpression:
- esg.booleanExpressionSQL(b, e)
- case exp.BitwiseExpression:
- esg.bitwiseExpressionSQL(b, e)
- case exp.RangeExpression:
- esg.rangeExpressionSQL(b, e)
- case exp.OrderedExpression:
- esg.orderedExpressionSQL(b, e)
- case exp.UpdateExpression:
- esg.updateExpressionSQL(b, e)
- case exp.SQLFunctionExpression:
- esg.sqlFunctionExpressionSQL(b, e)
- case exp.SQLWindowFunctionExpression:
- esg.sqlWindowFunctionExpression(b, e)
- case exp.WindowExpression:
- esg.windowExpressionSQL(b, e)
- case exp.CastExpression:
- esg.castExpressionSQL(b, e)
- case exp.AppendableExpression:
- esg.appendableExpressionSQL(b, e)
- case exp.CommonTableExpression:
- esg.commonTableExpressionSQL(b, e)
- case exp.CompoundExpression:
- esg.compoundExpressionSQL(b, e)
- case exp.CaseExpression:
- esg.caseExpressionSQL(b, e)
- case exp.Ex:
- esg.expressionMapSQL(b, e)
- case exp.ExOr:
- esg.expressionOrMapSQL(b, e)
- default:
- b.SetError(errUnsupportedExpressionType(e))
- }
-}
-
-// Generates a placeholder (e.g. ?, $1)
-func (esg *expressionSQLGenerator) placeHolderSQL(b sb.SQLBuilder, i interface{}) {
- b.Write(esg.dialectOptions.PlaceHolderFragment)
- if esg.dialectOptions.IncludePlaceholderNum {
- b.WriteStrings(strconv.FormatInt(int64(b.CurrentArgPosition()), 10))
- }
- b.WriteArg(i)
-}
-
-// Generates creates the sql for a sub select on a Dataset
-func (esg *expressionSQLGenerator) appendableExpressionSQL(b sb.SQLBuilder, a exp.AppendableExpression) {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- a.AppendSQL(b)
- b.WriteRunes(esg.dialectOptions.RightParenRune)
- if a.GetAs() != nil {
- b.Write(esg.dialectOptions.AsFragment)
- esg.Generate(b, a.GetAs())
- }
-}
-
-// Quotes an identifier (e.g. "col", "table"."col"
-func (esg *expressionSQLGenerator) identifierExpressionSQL(b sb.SQLBuilder, ident exp.IdentifierExpression) {
- if ident.IsEmpty() {
- b.SetError(ErrEmptyIdentifier)
- return
- }
- schema, table, col := ident.GetSchema(), ident.GetTable(), ident.GetCol()
- if schema != esg.dialectOptions.EmptyString {
- b.WriteRunes(esg.dialectOptions.QuoteRune).
- WriteStrings(schema).
- WriteRunes(esg.dialectOptions.QuoteRune)
- }
- if table != esg.dialectOptions.EmptyString {
- if schema != esg.dialectOptions.EmptyString {
- b.WriteRunes(esg.dialectOptions.PeriodRune)
- }
- b.WriteRunes(esg.dialectOptions.QuoteRune).
- WriteStrings(table).
- WriteRunes(esg.dialectOptions.QuoteRune)
- }
- switch t := col.(type) {
- case nil:
- case string:
- if col != esg.dialectOptions.EmptyString {
- if table != esg.dialectOptions.EmptyString || schema != esg.dialectOptions.EmptyString {
- b.WriteRunes(esg.dialectOptions.PeriodRune)
- }
- b.WriteRunes(esg.dialectOptions.QuoteRune).
- WriteStrings(t).
- WriteRunes(esg.dialectOptions.QuoteRune)
- }
- case exp.LiteralExpression:
- if table != esg.dialectOptions.EmptyString || schema != esg.dialectOptions.EmptyString {
- b.WriteRunes(esg.dialectOptions.PeriodRune)
- }
- esg.Generate(b, t)
- default:
- b.SetError(errUnsupportedIdentifierExpression(col))
- }
-}
-
-func (esg *expressionSQLGenerator) lateralExpressionSQL(b sb.SQLBuilder, le exp.LateralExpression) {
- if !esg.dialectOptions.SupportsLateral {
- b.SetError(errLateralNotSupported(esg.dialect))
- return
- }
- b.Write(esg.dialectOptions.LateralFragment)
- esg.Generate(b, le.Table())
-}
-
-// Generates SQL NULL value
-func (esg *expressionSQLGenerator) literalNil(b sb.SQLBuilder) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, nil)
- return
- }
- b.Write(esg.dialectOptions.Null)
-}
-
-// Generates SQL bool literal, (e.g. TRUE, FALSE, mysql 1, 0, sqlite3 1, 0)
-func (esg *expressionSQLGenerator) literalBool(b sb.SQLBuilder, bl bool) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, bl)
- return
- }
- if bl {
- b.Write(esg.dialectOptions.True)
- } else {
- b.Write(esg.dialectOptions.False)
- }
-}
-
-// Generates SQL for a time.Time value
-func (esg *expressionSQLGenerator) literalTime(b sb.SQLBuilder, t time.Time) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, t)
- return
- }
- esg.Generate(b, t.In(timeLocation).Format(esg.dialectOptions.TimeFormat))
-}
-
-// Generates SQL for a Float Value
-func (esg *expressionSQLGenerator) literalFloat(b sb.SQLBuilder, f float64) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, f)
- return
- }
- b.WriteStrings(strconv.FormatFloat(f, 'f', -1, 64))
-}
-
-// Generates SQL for an int value
-func (esg *expressionSQLGenerator) literalInt(b sb.SQLBuilder, i int64) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, i)
- return
- }
- b.WriteStrings(strconv.FormatInt(i, 10))
-}
-
-// Generates SQL for a string
-func (esg *expressionSQLGenerator) literalString(b sb.SQLBuilder, s string) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, s)
- return
- }
- b.WriteRunes(esg.dialectOptions.StringQuote)
- for _, char := range s {
- if e, ok := esg.dialectOptions.EscapedRunes[char]; ok {
- b.Write(e)
- } else {
- b.WriteRunes(char)
- }
- }
-
- b.WriteRunes(esg.dialectOptions.StringQuote)
-}
-
-// Generates SQL for a slice of bytes
-func (esg *expressionSQLGenerator) literalBytes(b sb.SQLBuilder, bs []byte) {
- if b.IsPrepared() {
- esg.placeHolderSQL(b, bs)
- return
- }
- b.WriteRunes(esg.dialectOptions.StringQuote)
- i := 0
- for len(bs) > 0 {
- char, l := utf8.DecodeRune(bs)
- if e, ok := esg.dialectOptions.EscapedRunes[char]; ok {
- b.Write(e)
- } else {
- b.WriteRunes(char)
- }
- i++
- bs = bs[l:]
- }
- b.WriteRunes(esg.dialectOptions.StringQuote)
-}
-
-// Generates SQL for a slice of values (e.g. []int64{1,2,3,4} -> (1,2,3,4)
-func (esg *expressionSQLGenerator) sliceValueSQL(b sb.SQLBuilder, slice reflect.Value) {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- for i, l := 0, slice.Len(); i < l; i++ {
- esg.Generate(b, slice.Index(i).Interface())
- if i < l-1 {
- b.WriteRunes(esg.dialectOptions.CommaRune, esg.dialectOptions.SpaceRune)
- }
- }
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for an AliasedExpression (e.g. I("a").As("b") -> "a" AS "b")
-func (esg *expressionSQLGenerator) aliasedExpressionSQL(b sb.SQLBuilder, aliased exp.AliasedExpression) {
- esg.Generate(b, aliased.Aliased())
- b.Write(esg.dialectOptions.AsFragment)
- esg.Generate(b, aliased.GetAs())
-}
-
-// Generates SQL for a BooleanExpresion (e.g. I("a").Eq(2) -> "a" = 2)
-func (esg *expressionSQLGenerator) booleanExpressionSQL(b sb.SQLBuilder, operator exp.BooleanExpression) {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- esg.Generate(b, operator.LHS())
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- operatorOp := operator.Op()
- if val, ok := esg.dialectOptions.BooleanOperatorLookup[operatorOp]; ok {
- b.Write(val)
- } else {
- b.SetError(errUnsupportedBooleanExpressionOperator(operatorOp))
- return
- }
- rhs := operator.RHS()
-
- if (operatorOp == exp.IsOp || operatorOp == exp.IsNotOp) && rhs != nil && !esg.dialectOptions.BooleanDataTypeSupported {
- b.SetError(errors.New("boolean data type is not supported by dialect %q", esg.dialect))
- return
- }
-
- if (operatorOp == exp.IsOp || operatorOp == exp.IsNotOp) && esg.dialectOptions.UseLiteralIsBools {
- // these values must be interpolated because preparing them generates invalid SQL
- switch rhs {
- case true:
- rhs = TrueLiteral
- case false:
- rhs = FalseLiteral
- case nil:
- rhs = exp.NewLiteralExpression(string(esg.dialectOptions.Null))
- }
- }
- b.WriteRunes(esg.dialectOptions.SpaceRune)
-
- if (operatorOp == exp.IsOp || operatorOp == exp.IsNotOp) && rhs == nil && !esg.dialectOptions.BooleanDataTypeSupported {
- // e.g. for SQL server dialect which does not support "IS @p1" for "IS NULL"
- b.Write(esg.dialectOptions.Null)
- } else {
- esg.Generate(b, rhs)
- }
-
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for a BitwiseExpresion (e.g. I("a").BitwiseOr(2) - > "a" | 2)
-func (esg *expressionSQLGenerator) bitwiseExpressionSQL(b sb.SQLBuilder, operator exp.BitwiseExpression) {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
-
- if operator.LHS() != nil {
- esg.Generate(b, operator.LHS())
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- }
-
- operatorOp := operator.Op()
- if val, ok := esg.dialectOptions.BitwiseOperatorLookup[operatorOp]; ok {
- b.Write(val)
- } else {
- b.SetError(errUnsupportedBitwiseExpressionOperator(operatorOp))
- return
- }
-
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- esg.Generate(b, operator.RHS())
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for a RangeExpresion (e.g. I("a").Between(RangeVal{Start:2,End:5}) -> "a" BETWEEN 2 AND 5)
-func (esg *expressionSQLGenerator) rangeExpressionSQL(b sb.SQLBuilder, operator exp.RangeExpression) {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- esg.Generate(b, operator.LHS())
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- operatorOp := operator.Op()
- if val, ok := esg.dialectOptions.RangeOperatorLookup[operatorOp]; ok {
- b.Write(val)
- } else {
- b.SetError(errUnsupportedRangeExpressionOperator(operatorOp))
- return
- }
- rhs := operator.RHS()
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- esg.Generate(b, rhs.Start())
- b.Write(esg.dialectOptions.AndFragment)
- esg.Generate(b, rhs.End())
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for an OrderedExpression (e.g. I("a").Asc() -> "a" ASC)
-func (esg *expressionSQLGenerator) orderedExpressionSQL(b sb.SQLBuilder, order exp.OrderedExpression) {
- esg.Generate(b, order.SortExpression())
- if order.IsAsc() {
- b.Write(esg.dialectOptions.AscFragment)
- } else {
- b.Write(esg.dialectOptions.DescFragment)
- }
- switch order.NullSortType() {
- case exp.NoNullsSortType:
- return
- case exp.NullsFirstSortType:
- b.Write(esg.dialectOptions.NullsFirstFragment)
- case exp.NullsLastSortType:
- b.Write(esg.dialectOptions.NullsLastFragment)
- }
-}
-
-// Generates SQL for an ExpressionList (e.g. And(I("a").Eq("a"), I("b").Eq("b")) -> (("a" = 'a') AND ("b" = 'b')))
-func (esg *expressionSQLGenerator) expressionListSQL(b sb.SQLBuilder, expressionList exp.ExpressionList) {
- if expressionList.IsEmpty() {
- return
- }
- var op []byte
- if expressionList.Type() == exp.AndType {
- op = esg.dialectOptions.AndFragment
- } else {
- op = esg.dialectOptions.OrFragment
- }
- exps := expressionList.Expressions()
- expLen := len(exps) - 1
- if expLen > 0 {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- } else {
- esg.Generate(b, exps[0])
- return
- }
- for i, e := range exps {
- esg.Generate(b, e)
- if i < expLen {
- b.Write(op)
- }
- }
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for a ColumnListExpression
-func (esg *expressionSQLGenerator) columnListSQL(b sb.SQLBuilder, columnList exp.ColumnListExpression) {
- cols := columnList.Columns()
- colLen := len(cols)
- for i, col := range cols {
- esg.Generate(b, col)
- if i < colLen-1 {
- b.WriteRunes(esg.dialectOptions.CommaRune, esg.dialectOptions.SpaceRune)
- }
- }
-}
-
-// Generates SQL for an UpdateEpxresion
-func (esg *expressionSQLGenerator) updateExpressionSQL(b sb.SQLBuilder, update exp.UpdateExpression) {
- esg.Generate(b, update.Col())
- b.WriteRunes(esg.dialectOptions.SetOperatorRune)
- esg.Generate(b, update.Val())
-}
-
-// Generates SQL for a LiteralExpression
-// L("a + b") -> a + b
-// L("a = ?", 1) -> a = 1
-func (esg *expressionSQLGenerator) literalExpressionSQL(b sb.SQLBuilder, literal exp.LiteralExpression) {
- l := literal.Literal()
- args := literal.Args()
- if argsLen := len(args); argsLen > 0 {
- currIndex := 0
- for _, char := range l {
- if char == replacementRune && currIndex < argsLen {
- esg.Generate(b, args[currIndex])
- currIndex++
- } else {
- b.WriteRunes(char)
- }
- }
- return
- }
- b.WriteStrings(l)
-}
-
-// Generates SQL for a SQLFunctionExpression
-// COUNT(I("a")) -> COUNT("a")
-func (esg *expressionSQLGenerator) sqlFunctionExpressionSQL(b sb.SQLBuilder, sqlFunc exp.SQLFunctionExpression) {
- b.WriteStrings(sqlFunc.Name())
- esg.Generate(b, sqlFunc.Args())
-}
-
-func (esg *expressionSQLGenerator) sqlWindowFunctionExpression(b sb.SQLBuilder, sqlWinFunc exp.SQLWindowFunctionExpression) {
- if !esg.dialectOptions.SupportsWindowFunction {
- b.SetError(ErrWindowNotSupported(esg.dialect))
- return
- }
- esg.Generate(b, sqlWinFunc.Func())
- b.Write(esg.dialectOptions.WindowOverFragment)
- switch {
- case sqlWinFunc.HasWindowName():
- esg.Generate(b, sqlWinFunc.WindowName())
- case sqlWinFunc.HasWindow():
- if sqlWinFunc.Window().HasName() {
- b.SetError(ErrUnexpectedNamedWindow)
- return
- }
- esg.Generate(b, sqlWinFunc.Window())
- default:
- esg.Generate(b, exp.NewWindowExpression(nil, nil, nil, nil))
- }
-}
-
-func (esg *expressionSQLGenerator) windowExpressionSQL(b sb.SQLBuilder, we exp.WindowExpression) {
- if !esg.dialectOptions.SupportsWindowFunction {
- b.SetError(ErrWindowNotSupported(esg.dialect))
- return
- }
- if we.HasName() {
- esg.Generate(b, we.Name())
- b.Write(esg.dialectOptions.AsFragment)
- }
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
-
- hasPartition := we.HasPartitionBy()
- hasOrder := we.HasOrder()
-
- if we.HasParent() {
- esg.Generate(b, we.Parent())
- if hasPartition || hasOrder {
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- }
- }
-
- if hasPartition {
- b.Write(esg.dialectOptions.WindowPartitionByFragment)
- esg.Generate(b, we.PartitionCols())
- if hasOrder {
- b.WriteRunes(esg.dialectOptions.SpaceRune)
- }
- }
- if hasOrder {
- b.Write(esg.dialectOptions.WindowOrderByFragment)
- esg.Generate(b, we.OrderCols())
- }
-
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates SQL for a CastExpression
-// I("a").Cast("NUMERIC") -> CAST("a" AS NUMERIC)
-func (esg *expressionSQLGenerator) castExpressionSQL(b sb.SQLBuilder, cast exp.CastExpression) {
- b.Write(esg.dialectOptions.CastFragment).WriteRunes(esg.dialectOptions.LeftParenRune)
- esg.Generate(b, cast.Casted())
- b.Write(esg.dialectOptions.AsFragment)
- esg.Generate(b, cast.Type())
- b.WriteRunes(esg.dialectOptions.RightParenRune)
-}
-
-// Generates the sql for the WITH clauses for common table expressions (CTE)
-func (esg *expressionSQLGenerator) commonTablesSliceSQL(b sb.SQLBuilder, ctes []exp.CommonTableExpression) {
- l := len(ctes)
- if l == 0 {
- return
- }
- if !esg.dialectOptions.SupportsWithCTE {
- b.SetError(ErrCTENotSupported(esg.dialect))
- return
- }
- b.Write(esg.dialectOptions.WithFragment)
- anyRecursive := false
- for _, cte := range ctes {
- anyRecursive = anyRecursive || cte.IsRecursive()
- }
- if anyRecursive {
- if !esg.dialectOptions.SupportsWithCTERecursive {
- b.SetError(ErrRecursiveCTENotSupported(esg.dialect))
- return
- }
- b.Write(esg.dialectOptions.RecursiveFragment)
- }
- for i, cte := range ctes {
- esg.Generate(b, cte)
- if i < l-1 {
- b.WriteRunes(esg.dialectOptions.CommaRune, esg.dialectOptions.SpaceRune)
- }
- }
- b.WriteRunes(esg.dialectOptions.SpaceRune)
-}
-
-// Generates SQL for a CommonTableExpression
-func (esg *expressionSQLGenerator) commonTableExpressionSQL(b sb.SQLBuilder, cte exp.CommonTableExpression) {
- esg.Generate(b, cte.Name())
- b.Write(esg.dialectOptions.AsFragment)
- esg.Generate(b, cte.SubQuery())
-}
-
-// Generates SQL for a CompoundExpression
-func (esg *expressionSQLGenerator) compoundExpressionSQL(b sb.SQLBuilder, compound exp.CompoundExpression) {
- switch compound.Type() {
- case exp.UnionCompoundType:
- b.Write(esg.dialectOptions.UnionFragment)
- case exp.UnionAllCompoundType:
- b.Write(esg.dialectOptions.UnionAllFragment)
- case exp.IntersectCompoundType:
- b.Write(esg.dialectOptions.IntersectFragment)
- case exp.IntersectAllCompoundType:
- b.Write(esg.dialectOptions.IntersectAllFragment)
- }
- if esg.dialectOptions.WrapCompoundsInParens {
- b.WriteRunes(esg.dialectOptions.LeftParenRune)
- compound.RHS().AppendSQL(b)
- b.WriteRunes(esg.dialectOptions.RightParenRune)
- } else {
- compound.RHS().AppendSQL(b)
- }
-}
-
-// Generates SQL for a CaseExpression
-func (esg *expressionSQLGenerator) caseExpressionSQL(b sb.SQLBuilder, caseExpression exp.CaseExpression) {
- caseVal := caseExpression.GetValue()
- whens := caseExpression.GetWhens()
- elseResult := caseExpression.GetElse()
-
- if len(whens) == 0 {
- b.SetError(ErrEmptyCaseWhens)
- return
- }
- b.Write(esg.dialectOptions.CaseFragment)
- if caseVal != nil {
- esg.Generate(b, caseVal)
- }
- for _, when := range whens {
- b.Write(esg.dialectOptions.WhenFragment)
- esg.Generate(b, when.Condition())
- b.Write(esg.dialectOptions.ThenFragment)
- esg.Generate(b, when.Result())
- }
- if elseResult != nil {
- b.Write(esg.dialectOptions.ElseFragment)
- esg.Generate(b, elseResult.Result())
- }
- b.Write(esg.dialectOptions.EndFragment)
-}
-
-func (esg *expressionSQLGenerator) expressionMapSQL(b sb.SQLBuilder, ex exp.Ex) {
- expressionList, err := ex.ToExpressions()
- if err != nil {
- b.SetError(err)
- return
- }
- esg.Generate(b, expressionList)
-}
-
-func (esg *expressionSQLGenerator) expressionOrMapSQL(b sb.SQLBuilder, ex exp.ExOr) {
- expressionList, err := ex.ToExpressions()
- if err != nil {
- b.SetError(err)
- return
- }
- esg.Generate(b, expressionList)
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/insert_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/insert_sql_generator.go
deleted file mode 100644
index 1c6105b939f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/insert_sql_generator.go
+++ /dev/null
@@ -1,203 +0,0 @@
-package sqlgen
-
-import (
- "strings"
-
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- InsertSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, clauses exp.InsertClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- insertSQLGenerator struct {
- CommonSQLGenerator
- }
-)
-
-var (
- ErrConflictUpdateValuesRequired = errors.New("values are required for on conflict update expression")
- ErrNoSourceForInsert = errors.New("no source found when generating insert sql")
-)
-
-func errMisMatchedRowLength(expectedL, actualL int) error {
- return errors.New("rows with different value length expected %d got %d", expectedL, actualL)
-}
-
-func errUpsertWithWhereNotSupported(dialect string) error {
- return errors.New("dialect does not support upsert with where clause [dialect=%s]", dialect)
-}
-
-func NewInsertSQLGenerator(dialect string, do *SQLDialectOptions) InsertSQLGenerator {
- return &insertSQLGenerator{NewCommonSQLGenerator(dialect, do)}
-}
-
-func (isg *insertSQLGenerator) Generate(
- b sb.SQLBuilder,
- clauses exp.InsertClauses,
-) {
- if !clauses.HasInto() {
- b.SetError(ErrNoSourceForInsert)
- return
- }
- for _, f := range isg.DialectOptions().InsertSQLOrder {
- if b.Error() != nil {
- return
- }
- switch f {
- case CommonTableSQLFragment:
- isg.ExpressionSQLGenerator().Generate(b, clauses.CommonTables())
- case InsertBeingSQLFragment:
- isg.InsertBeginSQL(b, clauses.OnConflict())
- case IntoSQLFragment:
- b.WriteRunes(isg.DialectOptions().SpaceRune)
- isg.ExpressionSQLGenerator().Generate(b, clauses.Into())
- case InsertSQLFragment:
- isg.InsertSQL(b, clauses)
- case ReturningSQLFragment:
- isg.ReturningSQL(b, clauses.Returning())
- default:
- b.SetError(ErrNotSupportedFragment("INSERT", f))
- }
- }
-}
-
-// Adds the correct fragment to being an INSERT statement
-func (isg *insertSQLGenerator) InsertBeginSQL(b sb.SQLBuilder, o exp.ConflictExpression) {
- if isg.DialectOptions().SupportsInsertIgnoreSyntax && o != nil {
- b.Write(isg.DialectOptions().InsertIgnoreClause)
- } else {
- b.Write(isg.DialectOptions().InsertClause)
- }
-}
-
-// Adds the columns list to an insert statement
-func (isg *insertSQLGenerator) InsertSQL(b sb.SQLBuilder, ic exp.InsertClauses) {
- switch {
- case ic.HasRows():
- ie, err := exp.NewInsertExpression(ic.Rows()...)
- if err != nil {
- b.SetError(err)
- return
- }
- isg.InsertExpressionSQL(b, ie)
- case ic.HasCols() && ic.HasVals():
- isg.insertColumnsSQL(b, ic.Cols())
- isg.insertValuesSQL(b, ic.Vals())
- case ic.HasCols() && ic.HasFrom():
- isg.insertColumnsSQL(b, ic.Cols())
- isg.insertFromSQL(b, ic.From())
- case ic.HasFrom():
- isg.insertFromSQL(b, ic.From())
- default:
- isg.defaultValuesSQL(b)
- }
- if ic.HasAlias() {
- b.Write(isg.DialectOptions().AsFragment)
- isg.ExpressionSQLGenerator().Generate(b, ic.Alias())
- }
- isg.onConflictSQL(b, ic.OnConflict())
-}
-
-func (isg *insertSQLGenerator) InsertExpressionSQL(b sb.SQLBuilder, ie exp.InsertExpression) {
- switch {
- case ie.IsInsertFrom():
- isg.insertFromSQL(b, ie.From())
- case ie.IsEmpty():
- isg.defaultValuesSQL(b)
- default:
- isg.insertColumnsSQL(b, ie.Cols())
- isg.insertValuesSQL(b, ie.Vals())
- }
-}
-
-// Adds the DefaultValuesFragment to an SQL statement
-func (isg *insertSQLGenerator) defaultValuesSQL(b sb.SQLBuilder) {
- b.Write(isg.DialectOptions().DefaultValuesFragment)
-}
-
-func (isg *insertSQLGenerator) insertFromSQL(b sb.SQLBuilder, ae exp.AppendableExpression) {
- b.WriteRunes(isg.DialectOptions().SpaceRune)
- ae.AppendSQL(b)
-}
-
-// Adds the columns list to an insert statement
-func (isg *insertSQLGenerator) insertColumnsSQL(b sb.SQLBuilder, cols exp.ColumnListExpression) {
- b.WriteRunes(isg.DialectOptions().SpaceRune, isg.DialectOptions().LeftParenRune)
- isg.ExpressionSQLGenerator().Generate(b, cols)
- b.WriteRunes(isg.DialectOptions().RightParenRune)
-}
-
-// Adds the values clause to an SQL statement
-func (isg *insertSQLGenerator) insertValuesSQL(b sb.SQLBuilder, values [][]interface{}) {
- b.Write(isg.DialectOptions().ValuesFragment)
- rowLen := len(values[0])
- valueLen := len(values)
- for i, row := range values {
- if len(row) != rowLen {
- b.SetError(errMisMatchedRowLength(rowLen, len(row)))
- return
- }
- isg.ExpressionSQLGenerator().Generate(b, row)
- if i < valueLen-1 {
- b.WriteRunes(isg.DialectOptions().CommaRune, isg.DialectOptions().SpaceRune)
- }
- }
-}
-
-// Adds the DefaultValuesFragment to an SQL statement
-func (isg *insertSQLGenerator) onConflictSQL(b sb.SQLBuilder, o exp.ConflictExpression) {
- if o == nil {
- return
- }
- b.Write(isg.DialectOptions().ConflictFragment)
- switch t := o.(type) {
- case exp.ConflictUpdateExpression:
- target := t.TargetColumn()
- if isg.DialectOptions().SupportsConflictTarget && target != "" {
- wrapParens := !strings.HasPrefix(strings.ToLower(target), "on constraint")
-
- b.WriteRunes(isg.DialectOptions().SpaceRune)
- if wrapParens {
- b.WriteRunes(isg.DialectOptions().LeftParenRune).
- WriteStrings(target).
- WriteRunes(isg.DialectOptions().RightParenRune)
- } else {
- b.Write([]byte(target))
- }
- }
- isg.onConflictDoUpdateSQL(b, t)
- default:
- b.Write(isg.DialectOptions().ConflictDoNothingFragment)
- }
-}
-
-func (isg *insertSQLGenerator) onConflictDoUpdateSQL(b sb.SQLBuilder, o exp.ConflictUpdateExpression) {
- b.Write(isg.DialectOptions().ConflictDoUpdateFragment)
- update := o.Update()
- if update == nil {
- b.SetError(ErrConflictUpdateValuesRequired)
- return
- }
- ue, err := exp.NewUpdateExpressions(update)
- if err != nil {
- b.SetError(err)
- return
- }
- isg.UpdateExpressionSQL(b, ue...)
- if b.Error() == nil && o.WhereClause() != nil {
- if !isg.DialectOptions().SupportsConflictUpdateWhere {
- b.SetError(errUpsertWithWhereNotSupported(isg.Dialect()))
- return
- }
- isg.WhereSQL(b, o.WhereClause())
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/select_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/select_sql_generator.go
deleted file mode 100644
index de322910e38..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/select_sql_generator.go
+++ /dev/null
@@ -1,266 +0,0 @@
-package sqlgen
-
-import (
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- SelectSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, clauses exp.SelectClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- selectSQLGenerator struct {
- CommonSQLGenerator
- }
-)
-
-func ErrNotSupportedJoinType(j exp.JoinExpression) error {
- return errors.New("dialect does not support %v", j.JoinType())
-}
-
-func ErrJoinConditionRequired(j exp.JoinExpression) error {
- return errors.New("join condition required for conditioned join %v", j.JoinType())
-}
-
-func ErrDistinctOnNotSupported(dialect string) error {
- return errors.New("dialect does not support DISTINCT ON clause [dialect=%s]", dialect)
-}
-
-func ErrWindowNotSupported(dialect string) error {
- return errors.New("dialect does not support WINDOW clause [dialect=%s]", dialect)
-}
-
-var ErrNoWindowName = errors.New("window expresion has no valid name")
-
-func NewSelectSQLGenerator(dialect string, do *SQLDialectOptions) SelectSQLGenerator {
- return &selectSQLGenerator{NewCommonSQLGenerator(dialect, do)}
-}
-
-func (ssg *selectSQLGenerator) Generate(b sb.SQLBuilder, clauses exp.SelectClauses) {
- for _, f := range ssg.DialectOptions().SelectSQLOrder {
- if b.Error() != nil {
- return
- }
- switch f {
- case CommonTableSQLFragment:
- ssg.ExpressionSQLGenerator().Generate(b, clauses.CommonTables())
- case SelectSQLFragment:
- ssg.SelectSQL(b, clauses)
- case SelectWithLimitSQLFragment:
- ssg.SelectWithLimitSQL(b, clauses)
- case FromSQLFragment:
- ssg.FromSQL(b, clauses.From())
- case JoinSQLFragment:
- ssg.JoinSQL(b, clauses.Joins())
- case WhereSQLFragment:
- ssg.WhereSQL(b, clauses.Where())
- case GroupBySQLFragment:
- ssg.GroupBySQL(b, clauses.GroupBy())
- case HavingSQLFragment:
- ssg.HavingSQL(b, clauses.Having())
- case WindowSQLFragment:
- ssg.WindowSQL(b, clauses.Windows())
- case CompoundsSQLFragment:
- ssg.CompoundsSQL(b, clauses.Compounds())
- case OrderSQLFragment:
- ssg.OrderSQL(b, clauses.Order())
- case OrderWithOffsetFetchSQLFragment:
- ssg.OrderWithOffsetFetchSQL(b, clauses.Order(), clauses.Offset(), clauses.Limit())
- case LimitSQLFragment:
- ssg.LimitSQL(b, clauses.Limit())
- case OffsetSQLFragment:
- ssg.OffsetSQL(b, clauses.Offset())
- case ForSQLFragment:
- ssg.ForSQL(b, clauses.Lock())
- default:
- b.SetError(ErrNotSupportedFragment("SELECT", f))
- }
- }
-}
-
-func (ssg *selectSQLGenerator) selectSQLCommon(b sb.SQLBuilder, clauses exp.SelectClauses) {
- dc := clauses.Distinct()
- if dc != nil {
- b.Write(ssg.DialectOptions().DistinctFragment)
- if !dc.IsEmpty() {
- if ssg.DialectOptions().SupportsDistinctOn {
- b.Write(ssg.DialectOptions().OnFragment).WriteRunes(ssg.DialectOptions().LeftParenRune)
- ssg.ExpressionSQLGenerator().Generate(b, dc)
- b.WriteRunes(ssg.DialectOptions().RightParenRune, ssg.DialectOptions().SpaceRune)
- } else {
- b.SetError(ErrDistinctOnNotSupported(ssg.Dialect()))
- return
- }
- } else {
- b.WriteRunes(ssg.DialectOptions().SpaceRune)
- }
- }
-
- if cols := clauses.Select(); clauses.IsDefaultSelect() || len(cols.Columns()) == 0 {
- b.WriteRunes(ssg.DialectOptions().StarRune)
- } else {
- ssg.ExpressionSQLGenerator().Generate(b, cols)
- }
-}
-
-// Adds the SELECT clause and columns to a sql statement
-func (ssg *selectSQLGenerator) SelectSQL(b sb.SQLBuilder, clauses exp.SelectClauses) {
- b.Write(ssg.DialectOptions().SelectClause).WriteRunes(ssg.DialectOptions().SpaceRune)
- ssg.selectSQLCommon(b, clauses)
-}
-
-// Adds the SELECT clause along with LIMIT to a SQL statement (e.g. MSSQL dialect: SELECT TOP 10 ...)
-func (ssg *selectSQLGenerator) SelectWithLimitSQL(b sb.SQLBuilder, clauses exp.SelectClauses) {
- b.Write(ssg.DialectOptions().SelectClause).WriteRunes(ssg.DialectOptions().SpaceRune)
- if clauses.Offset() == 0 && clauses.Limit() != nil {
- ssg.LimitSQL(b, clauses.Limit())
- b.WriteRunes(ssg.DialectOptions().SpaceRune)
- }
- ssg.selectSQLCommon(b, clauses)
-}
-
-// Generates the JOIN clauses for an SQL statement
-func (ssg *selectSQLGenerator) JoinSQL(b sb.SQLBuilder, joins exp.JoinExpressions) {
- if len(joins) > 0 {
- for _, j := range joins {
- joinType, ok := ssg.DialectOptions().JoinTypeLookup[j.JoinType()]
- if !ok {
- b.SetError(ErrNotSupportedJoinType(j))
- return
- }
- b.Write(joinType)
- ssg.ExpressionSQLGenerator().Generate(b, j.Table())
- if t, ok := j.(exp.ConditionedJoinExpression); ok {
- if t.IsConditionEmpty() {
- b.SetError(ErrJoinConditionRequired(j))
- return
- }
- ssg.joinConditionSQL(b, t.Condition())
- }
- }
- }
-}
-
-// Generates the GROUP BY clause for an SQL statement
-func (ssg *selectSQLGenerator) GroupBySQL(b sb.SQLBuilder, groupBy exp.ColumnListExpression) {
- if groupBy != nil && len(groupBy.Columns()) > 0 {
- b.Write(ssg.DialectOptions().GroupByFragment)
- ssg.ExpressionSQLGenerator().Generate(b, groupBy)
- }
-}
-
-// Generates the HAVING clause for an SQL statement
-func (ssg *selectSQLGenerator) HavingSQL(b sb.SQLBuilder, having exp.ExpressionList) {
- if having != nil && len(having.Expressions()) > 0 {
- b.Write(ssg.DialectOptions().HavingFragment)
- ssg.ExpressionSQLGenerator().Generate(b, having)
- }
-}
-
-// Generates the OFFSET clause for an SQL statement
-func (ssg *selectSQLGenerator) OffsetSQL(b sb.SQLBuilder, offset uint) {
- if offset > 0 {
- b.Write(ssg.DialectOptions().OffsetFragment)
- ssg.ExpressionSQLGenerator().Generate(b, offset)
- }
-}
-
-// Generates the compound sql clause for an SQL statement (e.g. UNION, INTERSECT)
-func (ssg *selectSQLGenerator) CompoundsSQL(b sb.SQLBuilder, compounds []exp.CompoundExpression) {
- for _, compound := range compounds {
- ssg.ExpressionSQLGenerator().Generate(b, compound)
- }
-}
-
-// Generates the FOR (aka "locking") clause for an SQL statement
-func (ssg *selectSQLGenerator) ForSQL(b sb.SQLBuilder, lockingClause exp.Lock) {
- if lockingClause == nil {
- return
- }
- switch lockingClause.Strength() {
- case exp.ForNolock:
- return
- case exp.ForUpdate:
- b.Write(ssg.DialectOptions().ForUpdateFragment)
- case exp.ForNoKeyUpdate:
- b.Write(ssg.DialectOptions().ForNoKeyUpdateFragment)
- case exp.ForShare:
- b.Write(ssg.DialectOptions().ForShareFragment)
- case exp.ForKeyShare:
- b.Write(ssg.DialectOptions().ForKeyShareFragment)
- }
-
- of := lockingClause.Of()
- if ofLen := len(of); ofLen > 0 {
- if ofFragment := ssg.DialectOptions().OfFragment; len(ofFragment) > 0 {
- b.Write(ofFragment)
- for i, table := range of {
- ssg.ExpressionSQLGenerator().Generate(b, table)
- if i < ofLen-1 {
- b.WriteRunes(ssg.DialectOptions().CommaRune, ssg.DialectOptions().SpaceRune)
- }
- }
- b.WriteRunes(ssg.DialectOptions().SpaceRune)
- }
- }
-
- // the WAIT case is the default in Postgres, and is what you get if you don't specify NOWAIT or
- // SKIP LOCKED. There's no special syntax for it in PG, so we don't do anything for it here
- switch lockingClause.WaitOption() {
- case exp.Wait:
- return
- case exp.NoWait:
- b.Write(ssg.DialectOptions().NowaitFragment)
- case exp.SkipLocked:
- b.Write(ssg.DialectOptions().SkipLockedFragment)
- }
-}
-
-func (ssg *selectSQLGenerator) WindowSQL(b sb.SQLBuilder, windows []exp.WindowExpression) {
- weLen := len(windows)
- if weLen == 0 {
- return
- }
- if !ssg.DialectOptions().SupportsWindowFunction {
- b.SetError(ErrWindowNotSupported(ssg.Dialect()))
- return
- }
- b.Write(ssg.DialectOptions().WindowFragment)
- for i, we := range windows {
- if !we.HasName() {
- b.SetError(ErrNoWindowName)
- }
- ssg.ExpressionSQLGenerator().Generate(b, we)
- if i < weLen-1 {
- b.WriteRunes(ssg.DialectOptions().CommaRune, ssg.DialectOptions().SpaceRune)
- }
- }
-}
-
-func (ssg *selectSQLGenerator) joinConditionSQL(b sb.SQLBuilder, jc exp.JoinCondition) {
- switch t := jc.(type) {
- case exp.JoinOnCondition:
- ssg.joinOnConditionSQL(b, t)
- case exp.JoinUsingCondition:
- ssg.joinUsingConditionSQL(b, t)
- }
-}
-
-func (ssg *selectSQLGenerator) joinUsingConditionSQL(b sb.SQLBuilder, jc exp.JoinUsingCondition) {
- b.Write(ssg.DialectOptions().UsingFragment).
- WriteRunes(ssg.DialectOptions().LeftParenRune)
- ssg.ExpressionSQLGenerator().Generate(b, jc.Using())
- b.WriteRunes(ssg.DialectOptions().RightParenRune)
-}
-
-func (ssg *selectSQLGenerator) joinOnConditionSQL(b sb.SQLBuilder, jc exp.JoinOnCondition) {
- b.Write(ssg.DialectOptions().OnFragment)
- ssg.ExpressionSQLGenerator().Generate(b, jc.On())
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/sql_dialect_options.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/sql_dialect_options.go
deleted file mode 100644
index a0df394e410..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/sql_dialect_options.go
+++ /dev/null
@@ -1,607 +0,0 @@
-package sqlgen
-
-import (
- "fmt"
- "time"
-
- "github.com/doug-martin/goqu/v9/exp"
-)
-
-type (
- SQLFragmentType int
- SQLDialectOptions struct {
- // Set to true if the dialect supports ORDER BY expressions in DELETE statements (DEFAULT=false)
- SupportsOrderByOnDelete bool
- // Set to true if the dialect supports table hint for DELETE statements (DELETE t FROM t ...), DEFAULT=false
- SupportsDeleteTableHint bool
- // Set to true if the dialect supports ORDER BY expressions in UPDATE statements (DEFAULT=false)
- SupportsOrderByOnUpdate bool
- // Set to true if the dialect supports LIMIT expressions in DELETE statements (DEFAULT=false)
- SupportsLimitOnDelete bool
- // Set to true if the dialect supports LIMIT expressions in UPDATE statements (DEFAULT=false)
- SupportsLimitOnUpdate bool
- // Set to true if the dialect supports RETURN expressions (DEFAULT=true)
- SupportsReturn bool
- // Set to true if the dialect supports Conflict Target (DEFAULT=true)
- SupportsConflictTarget bool
- // Set to true if the dialect supports Conflict Target (DEFAULT=true)
- SupportsConflictUpdateWhere bool
- // Set to true if the dialect supports Insert Ignore syntax (DEFAULT=false)
- SupportsInsertIgnoreSyntax bool
- // Set to true if the dialect supports Common Table Expressions (DEFAULT=true)
- SupportsWithCTE bool
- // Set to true if the dialect supports recursive Common Table Expressions (DEFAULT=true)
- SupportsWithCTERecursive bool
- // Set to true if multiple tables are supported in UPDATE statement. (DEFAULT=true)
- SupportsMultipleUpdateTables bool
- // Set to true if DISTINCT ON is supported (DEFAULT=true)
- SupportsDistinctOn bool
- // Set to true if LATERAL queries are supported (DEFAULT=true)
- SupportsLateral bool
- // Set to false if the dialect does not require expressions to be wrapped in parens (DEFAULT=true)
- WrapCompoundsInParens bool
-
- // Set to true if window function are supported in SELECT statement. (DEFAULT=true)
- SupportsWindowFunction bool
-
- // Set to true if the dialect requires join tables in UPDATE to be in a FROM clause (DEFAULT=true).
- UseFromClauseForMultipleUpdateTables bool
-
- // Surround LIMIT parameter with parentheses, like in MSSQL: SELECT TOP (10) ...
- SurroundLimitWithParentheses bool
-
- // The UPDATE fragment to use when generating sql. (DEFAULT=[]byte("UPDATE"))
- UpdateClause []byte
- // The INSERT fragment to use when generating sql. (DEFAULT=[]byte("INSERT INTO"))
- InsertClause []byte
- // The INSERT IGNORE INTO fragment to use when generating sql. (DEFAULT=[]byte("INSERT IGNORE INTO"))
- InsertIgnoreClause []byte
- // The SELECT fragment to use when generating sql. (DEFAULT=[]byte("SELECT"))
- SelectClause []byte
- // The DELETE fragment to use when generating sql. (DEFAULT=[]byte("DELETE"))
- DeleteClause []byte
- // The TRUNCATE fragment to use when generating sql. (DEFAULT=[]byte("TRUNCATE"))
- TruncateClause []byte
- // The WITH fragment to use when generating sql. (DEFAULT=[]byte("WITH "))
- WithFragment []byte
- // The RECURSIVE fragment to use when generating sql (after WITH). (DEFAULT=[]byte("RECURSIVE "))
- RecursiveFragment []byte
- // The CASCADE fragment to use when generating sql. (DEFAULT=[]byte(" CASCADE"))
- CascadeFragment []byte
- // The RESTRICT fragment to use when generating sql. (DEFAULT=[]byte(" RESTRICT"))
- RestrictFragment []byte
- // The SQL fragment to use when generating insert sql and using
- // DEFAULT VALUES (e.g. postgres="DEFAULT VALUES", mysql="", sqlite3=""). (DEFAULT=[]byte(" DEFAULT VALUES"))
- DefaultValuesFragment []byte
- // The SQL fragment to use when generating insert sql and listing columns using a VALUES clause
- // (DEFAULT=[]byte(" VALUES "))
- ValuesFragment []byte
- // The SQL fragment to use when generating truncate sql and using the IDENTITY clause
- // (DEFAULT=[]byte(" IDENTITY"))
- IdentityFragment []byte
- // The SQL fragment to use when generating update sql and using the SET clause (DEFAULT=[]byte(" SET "))
- SetFragment []byte
- // The SQL DISTINCT keyword (DEFAULT=[]byte(" DISTINCT "))
- DistinctFragment []byte
- // The SQL RETURNING clause (DEFAULT=[]byte(" RETURNING "))
- ReturningFragment []byte
- // The SQL FROM clause fragment (DEFAULT=[]byte(" FROM"))
- FromFragment []byte
- // The SQL USING join clause fragment (DEFAULT=[]byte(" USING "))
- UsingFragment []byte
- // The SQL ON join clause fragment (DEFAULT=[]byte(" ON "))
- OnFragment []byte
- // The SQL WHERE clause fragment (DEFAULT=[]byte(" WHERE "))
- WhereFragment []byte
- // The SQL GROUP BY clause fragment(DEFAULT=[]byte(" GROUP BY "))
- GroupByFragment []byte
- // The SQL HAVING clause fragment(DEFAULT=[]byte(" HAVING "))
- HavingFragment []byte
- // The SQL WINDOW clause fragment(DEFAULT=[]byte(" WINDOW "))
- WindowFragment []byte
- // The SQL WINDOW clause PARTITION BY fragment(DEFAULT=[]byte("PARTITION BY "))
- WindowPartitionByFragment []byte
- // The SQL WINDOW clause ORDER BY fragment(DEFAULT=[]byte("ORDER BY "))
- WindowOrderByFragment []byte
- // The SQL WINDOW clause OVER fragment(DEFAULT=[]byte(" OVER "))
- WindowOverFragment []byte
- // The SQL ORDER BY clause fragment(DEFAULT=[]byte(" ORDER BY "))
- OrderByFragment []byte
- // The SQL FETCH fragment(DEFAULT=[]byte(" "))
- FetchFragment []byte
- // The SQL LIMIT BY clause fragment(DEFAULT=[]byte(" LIMIT "))
- LimitFragment []byte
- // The SQL OFFSET BY clause fragment(DEFAULT=[]byte(" OFFSET "))
- OffsetFragment []byte
- // The SQL FOR UPDATE fragment(DEFAULT=[]byte(" FOR UPDATE "))
- ForUpdateFragment []byte
- // The SQL FOR NO KEY UPDATE fragment(DEFAULT=[]byte(" FOR NO KEY UPDATE "))
- ForNoKeyUpdateFragment []byte
- // The SQL FOR SHARE fragment(DEFAULT=[]byte(" FOR SHARE "))
- ForShareFragment []byte
- // The SQL OF fragment(DEFAULT=[]byte("OF "))
- OfFragment []byte
- // The SQL FOR KEY SHARE fragment(DEFAULT=[]byte(" FOR KEY SHARE "))
- ForKeyShareFragment []byte
- // The SQL NOWAIT fragment(DEFAULT=[]byte("NOWAIT"))
- NowaitFragment []byte
- // The SQL SKIP LOCKED fragment(DEFAULT=[]byte("SKIP LOCKED"))
- SkipLockedFragment []byte
- // The SQL AS fragment when aliasing an Expression(DEFAULT=[]byte(" AS "))
- AsFragment []byte
- // The SQL LATERAL fragment used for LATERAL joins
- LateralFragment []byte
- // The quote rune to use when quoting identifiers(DEFAULT='"')
- QuoteRune rune
- // The NULL literal to use when interpolating nulls values (DEFAULT=[]byte("NULL"))
- Null []byte
- // The TRUE literal to use when interpolating bool true values (DEFAULT=[]byte("TRUE"))
- True []byte
- // The FALSE literal to use when interpolating bool false values (DEFAULT=[]byte("FALSE"))
- False []byte
- // The ASC fragment when specifying column order (DEFAULT=[]byte(" ASC"))
- AscFragment []byte
- // The DESC fragment when specifying column order (DEFAULT=[]byte(" DESC"))
- DescFragment []byte
- // The NULLS FIRST fragment when specifying column order (DEFAULT=[]byte(" NULLS FIRST"))
- NullsFirstFragment []byte
- // The NULLS LAST fragment when specifying column order (DEFAULT=[]byte(" NULLS LAST"))
- NullsLastFragment []byte
- // The AND keyword used when joining ExpressionLists (DEFAULT=[]byte(" AND "))
- AndFragment []byte
- // The OR keyword used when joining ExpressionLists (DEFAULT=[]byte(" OR "))
- OrFragment []byte
- // The UNION keyword used when creating compound statements (DEFAULT=[]byte(" UNION "))
- UnionFragment []byte
- // The UNION ALL keyword used when creating compound statements (DEFAULT=[]byte(" UNION ALL "))
- UnionAllFragment []byte
- // The INTERSECT keyword used when creating compound statements (DEFAULT=[]byte(" INTERSECT "))
- IntersectFragment []byte
- // The INTERSECT ALL keyword used when creating compound statements (DEFAULT=[]byte(" INTERSECT ALL "))
- IntersectAllFragment []byte
- // The CAST keyword to use when casting a value (DEFAULT=[]byte("CAST"))
- CastFragment []byte
- // The CASE keyword to use when when creating a CASE statement (DEFAULT=[]byte("CASE "))
- CaseFragment []byte
- // The WHEN keyword to use when when creating a CASE statement (DEFAULT=[]byte(" WHEN "))
- WhenFragment []byte
- // The THEN keyword to use when when creating a CASE statement (DEFAULT=[]byte(" THEN "))
- ThenFragment []byte
- // The ELSE keyword to use when when creating a CASE statement (DEFAULT=[]byte(" ELSE "))
- ElseFragment []byte
- // The End keyword to use when when creating a CASE statement (DEFAULT=[]byte(" END"))
- EndFragment []byte
- // The quote rune to use when quoting string literals (DEFAULT='\'')
- StringQuote rune
- // The operator to use when setting values in an update statement (DEFAULT='=')
- SetOperatorRune rune
- // The placeholder fragment to use when generating a non interpolated statement (DEFAULT=[]byte"?")
- PlaceHolderFragment []byte
- // Empty string (DEFAULT="")
- EmptyString string
- // Comma rune (DEFAULT=',')
- CommaRune rune
- // Space rune (DEFAULT=' ')
- SpaceRune rune
- // Left paren rune (DEFAULT='(')
- LeftParenRune rune
- // Right paren rune (DEFAULT=')')
- RightParenRune rune
- // Star rune (DEFAULT='*')
- StarRune rune
- // Period rune (DEFAULT='.')
- PeriodRune rune
- // Set to true to include positional argument numbers when creating a prepared statement (Default=false)
- IncludePlaceholderNum bool
- // The time format to use when serializing time.Time (DEFAULT=time.RFC3339Nano)
- TimeFormat string
- // A map used to look up BooleanOperations and their SQL equivalents
- // (Default= map[exp.BooleanOperation][]byte{
- // exp.EqOp: []byte("="),
- // exp.NeqOp: []byte("!="),
- // exp.GtOp: []byte(">"),
- // exp.GteOp: []byte(">="),
- // exp.LtOp: []byte("<"),
- // exp.LteOp: []byte("<="),
- // exp.InOp: []byte("IN"),
- // exp.NotInOp: []byte("NOT IN"),
- // exp.IsOp: []byte("IS"),
- // exp.IsNotOp: []byte("IS NOT"),
- // exp.LikeOp: []byte("LIKE"),
- // exp.NotLikeOp: []byte("NOT LIKE"),
- // exp.ILikeOp: []byte("ILIKE"),
- // exp.NotILikeOp: []byte("NOT ILIKE"),
- // exp.RegexpLikeOp: []byte("~"),
- // exp.RegexpNotLikeOp: []byte("!~"),
- // exp.RegexpILikeOp: []byte("~*"),
- // exp.RegexpNotILikeOp: []byte("!~*"),
- // })
- BooleanOperatorLookup map[exp.BooleanOperation][]byte
- // A map used to look up BitwiseOperations and their SQL equivalents
- // (Default=map[exp.BitwiseOperation][]byte{
- // exp.BitwiseInversionOp: []byte("~"),
- // exp.BitwiseOrOp: []byte("|"),
- // exp.BitwiseAndOp: []byte("&"),
- // exp.BitwiseXorOp: []byte("#"),
- // exp.BitwiseLeftShiftOp: []byte("<<"),
- // exp.BitwiseRightShiftOp: []byte(">>"),
- // }),
- BitwiseOperatorLookup map[exp.BitwiseOperation][]byte
- // A map used to look up RangeOperations and their SQL equivalents
- // (Default=map[exp.RangeOperation][]byte{
- // exp.BetweenOp: []byte("BETWEEN"),
- // exp.NotBetweenOp: []byte("NOT BETWEEN"),
- // })
- RangeOperatorLookup map[exp.RangeOperation][]byte
- // A map used to look up JoinTypes and their SQL equivalents
- // (Default= map[exp.JoinType][]byte{
- // exp.InnerJoinType: []byte(" INNER JOIN "),
- // exp.FullOuterJoinType: []byte(" FULL OUTER JOIN "),
- // exp.RightOuterJoinType: []byte(" RIGHT OUTER JOIN "),
- // exp.LeftOuterJoinType: []byte(" LEFT OUTER JOIN "),
- // exp.FullJoinType: []byte(" FULL JOIN "),
- // exp.RightJoinType: []byte(" RIGHT JOIN "),
- // exp.LeftJoinType: []byte(" LEFT JOIN "),
- // exp.NaturalJoinType: []byte(" NATURAL JOIN "),
- // exp.NaturalLeftJoinType: []byte(" NATURAL LEFT JOIN "),
- // exp.NaturalRightJoinType: []byte(" NATURAL RIGHT JOIN "),
- // exp.NaturalFullJoinType: []byte(" NATURAL FULL JOIN "),
- // exp.CrossJoinType: []byte(" CROSS JOIN "),
- // })
- JoinTypeLookup map[exp.JoinType][]byte
- // Whether or not boolean data type is supported
- BooleanDataTypeSupported bool
- // Whether or not to use literal TRUE or FALSE for IS statements (e.g. IS TRUE or IS 0)
- UseLiteralIsBools bool
- // EscapedRunes is a map of a rune and the corresponding escape sequence in bytes. Used when escaping text
- // types.
- // (Default= map[rune][]byte{
- // '\'': []byte("''"),
- // })
- EscapedRunes map[rune][]byte
-
- // The SQL fragment to use for CONFLICT (Default=[]byte(" ON CONFLICT"))
- ConflictFragment []byte
- // The SQL fragment to use for CONFLICT DO NOTHING (Default=[]byte(" DO NOTHING"))
- ConflictDoNothingFragment []byte
- // The SQL fragment to use for CONFLICT DO UPDATE (Default=[]byte(" DO UPDATE SET"))
- ConflictDoUpdateFragment []byte
-
- // The order of SQL fragments when creating a SELECT statement
- // (Default=[]SQLFragmentType{
- // CommonTableSQLFragment,
- // SelectSQLFragment,
- // FromSQLFragment,
- // JoinSQLFragment,
- // WhereSQLFragment,
- // GroupBySQLFragment,
- // HavingSQLFragment,
- // CompoundsSQLFragment,
- // OrderSQLFragment,
- // LimitSQLFragment,
- // OffsetSQLFragment,
- // ForSQLFragment,
- // })
- SelectSQLOrder []SQLFragmentType
-
- // The order of SQL fragments when creating an UPDATE statement
- // (Default=[]SQLFragmentType{
- // CommonTableSQLFragment,
- // UpdateBeginSQLFragment,
- // SourcesSQLFragment,
- // UpdateSQLFragment,
- // WhereSQLFragment,
- // OrderSQLFragment,
- // LimitSQLFragment,
- // ReturningSQLFragment,
- // })
- UpdateSQLOrder []SQLFragmentType
-
- // The order of SQL fragments when creating an INSERT statement
- // (Default=[]SQLFragmentType{
- // CommonTableSQLFragment,
- // InsertBeingSQLFragment,
- // SourcesSQLFragment,
- // InsertSQLFragment,
- // ReturningSQLFragment,
- // })
- InsertSQLOrder []SQLFragmentType
-
- // The order of SQL fragments when creating a DELETE statement
- // (Default=[]SQLFragmentType{
- // CommonTableSQLFragment,
- // DeleteBeginSQLFragment,
- // FromSQLFragment,
- // WhereSQLFragment,
- // OrderSQLFragment,
- // LimitSQLFragment,
- // ReturningSQLFragment,
- // })
- DeleteSQLOrder []SQLFragmentType
-
- // The order of SQL fragments when creating a TRUNCATE statement
- // (Default=[]SQLFragmentType{
- // TruncateSQLFragment,
- // })
- TruncateSQLOrder []SQLFragmentType
- }
-)
-
-const (
- CommonTableSQLFragment = iota
- SelectSQLFragment
- SelectWithLimitSQLFragment
- FromSQLFragment
- JoinSQLFragment
- WhereSQLFragment
- GroupBySQLFragment
- HavingSQLFragment
- CompoundsSQLFragment
- OrderSQLFragment
- OrderWithOffsetFetchSQLFragment
- LimitSQLFragment
- OffsetSQLFragment
- ForSQLFragment
- UpdateBeginSQLFragment
- SourcesSQLFragment
- IntoSQLFragment
- UpdateSQLFragment
- UpdateFromSQLFragment
- ReturningSQLFragment
- InsertBeingSQLFragment
- InsertSQLFragment
- DeleteBeginSQLFragment
- TruncateSQLFragment
- WindowSQLFragment
-)
-
-// nolint:gocyclo // simple type to string conversion
-func (sf SQLFragmentType) String() string {
- switch sf {
- case CommonTableSQLFragment:
- return "CommonTableSQLFragment"
- case SelectSQLFragment:
- return "SelectSQLFragment"
- case FromSQLFragment:
- return "FromSQLFragment"
- case JoinSQLFragment:
- return "JoinSQLFragment"
- case WhereSQLFragment:
- return "WhereSQLFragment"
- case GroupBySQLFragment:
- return "GroupBySQLFragment"
- case HavingSQLFragment:
- return "HavingSQLFragment"
- case CompoundsSQLFragment:
- return "CompoundsSQLFragment"
- case OrderSQLFragment:
- return "OrderSQLFragment"
- case LimitSQLFragment:
- return "LimitSQLFragment"
- case OffsetSQLFragment:
- return "OffsetSQLFragment"
- case ForSQLFragment:
- return "ForSQLFragment"
- case UpdateBeginSQLFragment:
- return "UpdateBeginSQLFragment"
- case SourcesSQLFragment:
- return "SourcesSQLFragment"
- case IntoSQLFragment:
- return "IntoSQLFragment"
- case UpdateSQLFragment:
- return "UpdateSQLFragment"
- case UpdateFromSQLFragment:
- return "UpdateFromSQLFragment"
- case ReturningSQLFragment:
- return "ReturningSQLFragment"
- case InsertBeingSQLFragment:
- return "InsertBeingSQLFragment"
- case DeleteBeginSQLFragment:
- return "DeleteBeginSQLFragment"
- case TruncateSQLFragment:
- return "TruncateSQLFragment"
- case WindowSQLFragment:
- return "WindowSQLFragment"
- }
- return fmt.Sprintf("%d", sf)
-}
-
-//nolint:funlen
-func DefaultDialectOptions() *SQLDialectOptions {
- return &SQLDialectOptions{
- SupportsOrderByOnDelete: false,
- SupportsDeleteTableHint: false,
- SupportsOrderByOnUpdate: false,
- SupportsLimitOnDelete: false,
- SupportsLimitOnUpdate: false,
- SupportsReturn: true,
- SupportsConflictUpdateWhere: true,
- SupportsInsertIgnoreSyntax: false,
- SupportsConflictTarget: true,
- SupportsWithCTE: true,
- SupportsWithCTERecursive: true,
- SupportsDistinctOn: true,
- WrapCompoundsInParens: true,
- SupportsWindowFunction: true,
- SupportsLateral: true,
-
- SupportsMultipleUpdateTables: true,
- UseFromClauseForMultipleUpdateTables: true,
-
- UpdateClause: []byte("UPDATE"),
- InsertClause: []byte("INSERT INTO"),
- InsertIgnoreClause: []byte("INSERT IGNORE INTO"),
- SelectClause: []byte("SELECT"),
- DeleteClause: []byte("DELETE"),
- TruncateClause: []byte("TRUNCATE"),
- WithFragment: []byte("WITH "),
- RecursiveFragment: []byte("RECURSIVE "),
- CascadeFragment: []byte(" CASCADE"),
- RestrictFragment: []byte(" RESTRICT"),
- DefaultValuesFragment: []byte(" DEFAULT VALUES"),
- ValuesFragment: []byte(" VALUES "),
- IdentityFragment: []byte(" IDENTITY"),
- SetFragment: []byte(" SET "),
- DistinctFragment: []byte("DISTINCT"),
- ReturningFragment: []byte(" RETURNING "),
- FromFragment: []byte(" FROM"),
- UsingFragment: []byte(" USING "),
- OnFragment: []byte(" ON "),
- WhereFragment: []byte(" WHERE "),
- GroupByFragment: []byte(" GROUP BY "),
- HavingFragment: []byte(" HAVING "),
- WindowFragment: []byte(" WINDOW "),
- WindowPartitionByFragment: []byte("PARTITION BY "),
- WindowOrderByFragment: []byte("ORDER BY "),
- WindowOverFragment: []byte(" OVER "),
- OrderByFragment: []byte(" ORDER BY "),
- FetchFragment: []byte(" "),
- LimitFragment: []byte(" LIMIT "),
- OffsetFragment: []byte(" OFFSET "),
- ForUpdateFragment: []byte(" FOR UPDATE "),
- ForNoKeyUpdateFragment: []byte(" FOR NO KEY UPDATE "),
- ForShareFragment: []byte(" FOR SHARE "),
- ForKeyShareFragment: []byte(" FOR KEY SHARE "),
- OfFragment: []byte("OF "),
- NowaitFragment: []byte("NOWAIT"),
- SkipLockedFragment: []byte("SKIP LOCKED"),
- LateralFragment: []byte("LATERAL "),
- AsFragment: []byte(" AS "),
- AscFragment: []byte(" ASC"),
- DescFragment: []byte(" DESC"),
- NullsFirstFragment: []byte(" NULLS FIRST"),
- NullsLastFragment: []byte(" NULLS LAST"),
- AndFragment: []byte(" AND "),
- OrFragment: []byte(" OR "),
- UnionFragment: []byte(" UNION "),
- UnionAllFragment: []byte(" UNION ALL "),
- IntersectFragment: []byte(" INTERSECT "),
- IntersectAllFragment: []byte(" INTERSECT ALL "),
- ConflictFragment: []byte(" ON CONFLICT"),
- ConflictDoUpdateFragment: []byte(" DO UPDATE SET "),
- ConflictDoNothingFragment: []byte(" DO NOTHING"),
- CastFragment: []byte("CAST"),
- CaseFragment: []byte("CASE "),
- WhenFragment: []byte(" WHEN "),
- ThenFragment: []byte(" THEN "),
- ElseFragment: []byte(" ELSE "),
- EndFragment: []byte(" END"),
- Null: []byte("NULL"),
- True: []byte("TRUE"),
- False: []byte("FALSE"),
-
- PlaceHolderFragment: []byte("?"),
- QuoteRune: '"',
- StringQuote: '\'',
- SetOperatorRune: '=',
- CommaRune: ',',
- SpaceRune: ' ',
- LeftParenRune: '(',
- RightParenRune: ')',
- StarRune: '*',
- PeriodRune: '.',
- EmptyString: "",
-
- BooleanOperatorLookup: map[exp.BooleanOperation][]byte{
- exp.EqOp: []byte("="),
- exp.NeqOp: []byte("!="),
- exp.GtOp: []byte(">"),
- exp.GteOp: []byte(">="),
- exp.LtOp: []byte("<"),
- exp.LteOp: []byte("<="),
- exp.InOp: []byte("IN"),
- exp.NotInOp: []byte("NOT IN"),
- exp.IsOp: []byte("IS"),
- exp.IsNotOp: []byte("IS NOT"),
- exp.LikeOp: []byte("LIKE"),
- exp.NotLikeOp: []byte("NOT LIKE"),
- exp.ILikeOp: []byte("ILIKE"),
- exp.NotILikeOp: []byte("NOT ILIKE"),
- exp.RegexpLikeOp: []byte("~"),
- exp.RegexpNotLikeOp: []byte("!~"),
- exp.RegexpILikeOp: []byte("~*"),
- exp.RegexpNotILikeOp: []byte("!~*"),
- },
- BitwiseOperatorLookup: map[exp.BitwiseOperation][]byte{
- exp.BitwiseInversionOp: []byte("~"),
- exp.BitwiseOrOp: []byte("|"),
- exp.BitwiseAndOp: []byte("&"),
- exp.BitwiseXorOp: []byte("#"),
- exp.BitwiseLeftShiftOp: []byte("<<"),
- exp.BitwiseRightShiftOp: []byte(">>"),
- },
- RangeOperatorLookup: map[exp.RangeOperation][]byte{
- exp.BetweenOp: []byte("BETWEEN"),
- exp.NotBetweenOp: []byte("NOT BETWEEN"),
- },
- JoinTypeLookup: map[exp.JoinType][]byte{
- exp.InnerJoinType: []byte(" INNER JOIN "),
- exp.FullOuterJoinType: []byte(" FULL OUTER JOIN "),
- exp.RightOuterJoinType: []byte(" RIGHT OUTER JOIN "),
- exp.LeftOuterJoinType: []byte(" LEFT OUTER JOIN "),
- exp.FullJoinType: []byte(" FULL JOIN "),
- exp.RightJoinType: []byte(" RIGHT JOIN "),
- exp.LeftJoinType: []byte(" LEFT JOIN "),
- exp.NaturalJoinType: []byte(" NATURAL JOIN "),
- exp.NaturalLeftJoinType: []byte(" NATURAL LEFT JOIN "),
- exp.NaturalRightJoinType: []byte(" NATURAL RIGHT JOIN "),
- exp.NaturalFullJoinType: []byte(" NATURAL FULL JOIN "),
- exp.CrossJoinType: []byte(" CROSS JOIN "),
- },
-
- TimeFormat: time.RFC3339Nano,
-
- BooleanDataTypeSupported: true,
- UseLiteralIsBools: true,
-
- EscapedRunes: map[rune][]byte{
- '\'': []byte("''"),
- },
-
- SelectSQLOrder: []SQLFragmentType{
- CommonTableSQLFragment,
- SelectSQLFragment,
- FromSQLFragment,
- JoinSQLFragment,
- WhereSQLFragment,
- GroupBySQLFragment,
- HavingSQLFragment,
- WindowSQLFragment,
- CompoundsSQLFragment,
- OrderSQLFragment,
- LimitSQLFragment,
- OffsetSQLFragment,
- ForSQLFragment,
- },
- UpdateSQLOrder: []SQLFragmentType{
- CommonTableSQLFragment,
- UpdateBeginSQLFragment,
- SourcesSQLFragment,
- UpdateSQLFragment,
- UpdateFromSQLFragment,
- WhereSQLFragment,
- OrderSQLFragment,
- LimitSQLFragment,
- ReturningSQLFragment,
- },
- InsertSQLOrder: []SQLFragmentType{
- CommonTableSQLFragment,
- InsertBeingSQLFragment,
- IntoSQLFragment,
- InsertSQLFragment,
- ReturningSQLFragment,
- },
- DeleteSQLOrder: []SQLFragmentType{
- CommonTableSQLFragment,
- DeleteBeginSQLFragment,
- FromSQLFragment,
- WhereSQLFragment,
- OrderSQLFragment,
- LimitSQLFragment,
- ReturningSQLFragment,
- },
- TruncateSQLOrder: []SQLFragmentType{
- TruncateSQLFragment,
- },
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/sqlgen.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/sqlgen.go
deleted file mode 100644
index 09757115bb0..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/sqlgen.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package sqlgen
-
-import "time"
-
-var timeLocation = time.UTC
-
-// Set the location to use when interpolating time.Time instances. See https://golang.org/pkg/time/#LoadLocation
-// NOTE: This has no effect when using prepared statements.
-func SetTimeLocation(loc *time.Location) {
- timeLocation = loc
-}
-
-func GetTimeLocation() *time.Location {
- return timeLocation
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/truncate_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/truncate_sql_generator.go
deleted file mode 100644
index a2a6b41bb0c..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/truncate_sql_generator.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package sqlgen
-
-import (
- "strings"
-
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- TruncateSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, clauses exp.TruncateClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- truncateSQLGenerator struct {
- CommonSQLGenerator
- }
-)
-
-var errNoSourceForTruncate = errors.New("no source found when generating truncate sql")
-
-func NewTruncateSQLGenerator(dialect string, do *SQLDialectOptions) TruncateSQLGenerator {
- return &truncateSQLGenerator{NewCommonSQLGenerator(dialect, do)}
-}
-
-func (tsg *truncateSQLGenerator) Generate(b sb.SQLBuilder, clauses exp.TruncateClauses) {
- if !clauses.HasTable() {
- b.SetError(errNoSourceForTruncate)
- return
- }
- for _, f := range tsg.DialectOptions().TruncateSQLOrder {
- if b.Error() != nil {
- return
- }
- switch f {
- case TruncateSQLFragment:
- tsg.TruncateSQL(b, clauses.Table(), clauses.Options())
- default:
- b.SetError(ErrNotSupportedFragment("TRUNCATE", f))
- }
- }
-}
-
-// Generates a TRUNCATE statement
-func (tsg *truncateSQLGenerator) TruncateSQL(b sb.SQLBuilder, from exp.ColumnListExpression, opts exp.TruncateOptions) {
- b.Write(tsg.DialectOptions().TruncateClause)
- tsg.SourcesSQL(b, from)
- if opts.Identity != tsg.DialectOptions().EmptyString {
- b.WriteRunes(tsg.DialectOptions().SpaceRune).
- WriteStrings(strings.ToUpper(opts.Identity)).
- Write(tsg.DialectOptions().IdentityFragment)
- }
- if opts.Cascade {
- b.Write(tsg.DialectOptions().CascadeFragment)
- } else if opts.Restrict {
- b.Write(tsg.DialectOptions().RestrictFragment)
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/sqlgen/update_sql_generator.go b/vendor/github.com/doug-martin/goqu/v9/sqlgen/update_sql_generator.go
deleted file mode 100644
index 3bf7b88ef5b..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/sqlgen/update_sql_generator.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package sqlgen
-
-import (
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type (
- // An adapter interface to be used by a Dataset to generate SQL for a specific dialect.
- // See DefaultAdapter for a concrete implementation and examples.
- UpdateSQLGenerator interface {
- Dialect() string
- Generate(b sb.SQLBuilder, clauses exp.UpdateClauses)
- }
- // The default adapter. This class should be used when building a new adapter. When creating a new adapter you can
- // either override methods, or more typically update default values.
- // See (github.com/doug-martin/goqu/dialect/postgres)
- updateSQLGenerator struct {
- CommonSQLGenerator
- }
-)
-
-var (
- ErrNoSourceForUpdate = errors.New("no source found when generating update sql")
- ErrNoSetValuesForUpdate = errors.New("no set values found when generating UPDATE sql")
-)
-
-func NewUpdateSQLGenerator(dialect string, do *SQLDialectOptions) UpdateSQLGenerator {
- return &updateSQLGenerator{NewCommonSQLGenerator(dialect, do)}
-}
-
-func (usg *updateSQLGenerator) Generate(b sb.SQLBuilder, clauses exp.UpdateClauses) {
- if !clauses.HasTable() {
- b.SetError(ErrNoSourceForUpdate)
- return
- }
- if !clauses.HasSetValues() {
- b.SetError(ErrNoSetValuesForUpdate)
- return
- }
- if !usg.DialectOptions().SupportsMultipleUpdateTables && clauses.HasFrom() {
- b.SetError(errors.New("%s dialect does not support multiple tables in UPDATE", usg.Dialect()))
- }
- updates, err := exp.NewUpdateExpressions(clauses.SetValues())
- if err != nil {
- b.SetError(err)
- return
- }
- for _, f := range usg.DialectOptions().UpdateSQLOrder {
- if b.Error() != nil {
- return
- }
- switch f {
- case CommonTableSQLFragment:
- usg.ExpressionSQLGenerator().Generate(b, clauses.CommonTables())
- case UpdateBeginSQLFragment:
- usg.UpdateBeginSQL(b)
- case SourcesSQLFragment:
- usg.updateTableSQL(b, clauses)
- case UpdateSQLFragment:
- usg.UpdateExpressionsSQL(b, updates...)
- case UpdateFromSQLFragment:
- usg.updateFromSQL(b, clauses.From())
- case WhereSQLFragment:
- usg.WhereSQL(b, clauses.Where())
- case OrderSQLFragment:
- if usg.DialectOptions().SupportsOrderByOnUpdate {
- usg.OrderSQL(b, clauses.Order())
- }
- case LimitSQLFragment:
- if usg.DialectOptions().SupportsLimitOnUpdate {
- usg.LimitSQL(b, clauses.Limit())
- }
- case ReturningSQLFragment:
- usg.ReturningSQL(b, clauses.Returning())
- default:
- b.SetError(ErrNotSupportedFragment("UPDATE", f))
- }
- }
-}
-
-// Adds the correct fragment to being an UPDATE statement
-func (usg *updateSQLGenerator) UpdateBeginSQL(b sb.SQLBuilder) {
- b.Write(usg.DialectOptions().UpdateClause)
-}
-
-// Adds column setters in an update SET clause
-func (usg *updateSQLGenerator) UpdateExpressionsSQL(b sb.SQLBuilder, updates ...exp.UpdateExpression) {
- b.Write(usg.DialectOptions().SetFragment)
- usg.UpdateExpressionSQL(b, updates...)
-}
-
-func (usg *updateSQLGenerator) updateTableSQL(b sb.SQLBuilder, uc exp.UpdateClauses) {
- b.WriteRunes(usg.DialectOptions().SpaceRune)
- usg.ExpressionSQLGenerator().Generate(b, uc.Table())
- if uc.HasFrom() {
- if !usg.DialectOptions().UseFromClauseForMultipleUpdateTables {
- b.WriteRunes(usg.DialectOptions().CommaRune)
- usg.ExpressionSQLGenerator().Generate(b, uc.From())
- }
- }
-}
-
-func (usg *updateSQLGenerator) updateFromSQL(b sb.SQLBuilder, ce exp.ColumnListExpression) {
- if ce == nil || ce.IsEmpty() {
- return
- }
- if usg.DialectOptions().UseFromClauseForMultipleUpdateTables {
- usg.FromSQL(b, ce)
- }
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/truncate_dataset.go b/vendor/github.com/doug-martin/goqu/v9/truncate_dataset.go
deleted file mode 100644
index fda8196bd00..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/truncate_dataset.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package goqu
-
-import (
- "github.com/doug-martin/goqu/v9/exec"
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type TruncateDataset struct {
- dialect SQLDialect
- clauses exp.TruncateClauses
- isPrepared prepared
- queryFactory exec.QueryFactory
- err error
-}
-
-// used internally by database to create a database with a specific adapter
-func newTruncateDataset(d string, queryFactory exec.QueryFactory) *TruncateDataset {
- return &TruncateDataset{
- clauses: exp.NewTruncateClauses(),
- dialect: GetDialect(d),
- queryFactory: queryFactory,
- }
-}
-
-func Truncate(table ...interface{}) *TruncateDataset {
- return newTruncateDataset("default", nil).Table(table...)
-}
-
-// Sets the adapter used to serialize values and create the SQL statement
-func (td *TruncateDataset) WithDialect(dl string) *TruncateDataset {
- ds := td.copy(td.GetClauses())
- ds.dialect = GetDialect(dl)
- return ds
-}
-
-// Set the parameter interpolation behavior. See examples
-//
-// prepared: If true the dataset WILL NOT interpolate the parameters.
-func (td *TruncateDataset) Prepared(prepared bool) *TruncateDataset {
- ret := td.copy(td.clauses)
- ret.isPrepared = preparedFromBool(prepared)
- return ret
-}
-
-func (td *TruncateDataset) IsPrepared() bool {
- return td.isPrepared.Bool()
-}
-
-// Returns the current adapter on the dataset
-func (td *TruncateDataset) Dialect() SQLDialect {
- return td.dialect
-}
-
-// Returns the current adapter on the dataset
-func (td *TruncateDataset) SetDialect(dialect SQLDialect) *TruncateDataset {
- cd := td.copy(td.GetClauses())
- cd.dialect = dialect
- return cd
-}
-
-func (td *TruncateDataset) Expression() exp.Expression {
- return td
-}
-
-// Clones the dataset
-func (td *TruncateDataset) Clone() exp.Expression {
- return td.copy(td.clauses)
-}
-
-// Returns the current clauses on the dataset.
-func (td *TruncateDataset) GetClauses() exp.TruncateClauses {
- return td.clauses
-}
-
-// used interally to copy the dataset
-func (td *TruncateDataset) copy(clauses exp.TruncateClauses) *TruncateDataset {
- return &TruncateDataset{
- dialect: td.dialect,
- clauses: clauses,
- isPrepared: td.isPrepared,
- queryFactory: td.queryFactory,
- err: td.err,
- }
-}
-
-// Adds a FROM clause. This return a new dataset with the original sources replaced. See examples.
-// You can pass in the following.
-// string: Will automatically be turned into an identifier
-// IdentifierExpression
-// LiteralExpression: (See Literal) Will use the literal SQL
-func (td *TruncateDataset) Table(table ...interface{}) *TruncateDataset {
- return td.copy(td.clauses.SetTable(exp.NewColumnListExpression(table...)))
-}
-
-// Adds a CASCADE clause
-func (td *TruncateDataset) Cascade() *TruncateDataset {
- opts := td.clauses.Options()
- opts.Cascade = true
- return td.copy(td.clauses.SetOptions(opts))
-}
-
-// Clears the CASCADE clause
-func (td *TruncateDataset) NoCascade() *TruncateDataset {
- opts := td.clauses.Options()
- opts.Cascade = false
- return td.copy(td.clauses.SetOptions(opts))
-}
-
-// Adds a RESTRICT clause
-func (td *TruncateDataset) Restrict() *TruncateDataset {
- opts := td.clauses.Options()
- opts.Restrict = true
- return td.copy(td.clauses.SetOptions(opts))
-}
-
-// Clears the RESTRICT clause
-func (td *TruncateDataset) NoRestrict() *TruncateDataset {
- opts := td.clauses.Options()
- opts.Restrict = false
- return td.copy(td.clauses.SetOptions(opts))
-}
-
-// Add a IDENTITY clause (e.g. RESTART)
-func (td *TruncateDataset) Identity(identity string) *TruncateDataset {
- opts := td.clauses.Options()
- opts.Identity = identity
- return td.copy(td.clauses.SetOptions(opts))
-}
-
-// Get any error that has been set or nil if no error has been set.
-func (td *TruncateDataset) Error() error {
- return td.err
-}
-
-// Set an error on the dataset if one has not already been set. This error will be returned by a future call to Error
-// or as part of ToSQL. This can be used by end users to record errors while building up queries without having to
-// track those separately.
-func (td *TruncateDataset) SetError(err error) *TruncateDataset {
- if td.err == nil {
- td.err = err
- }
-
- return td
-}
-
-// Generates a TRUNCATE sql statement, if Prepared has been called with true then the parameters will not be interpolated.
-// See examples.
-//
-// Errors:
-// * There is an error generating the SQL
-func (td *TruncateDataset) ToSQL() (sql string, params []interface{}, err error) {
- return td.truncateSQLBuilder().ToSQL()
-}
-
-// Generates the TRUNCATE sql, and returns an Exec struct with the sql set to the TRUNCATE statement
-// db.From("test").Truncate().Executor().Exec()
-func (td *TruncateDataset) Executor() exec.QueryExecutor {
- return td.queryFactory.FromSQLBuilder(td.truncateSQLBuilder())
-}
-
-func (td *TruncateDataset) truncateSQLBuilder() sb.SQLBuilder {
- buf := sb.NewSQLBuilder(td.isPrepared.Bool())
- if td.err != nil {
- return buf.SetError(td.err)
- }
- td.dialect.ToTruncateSQL(buf, td.clauses)
- return buf
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/update_dataset.go b/vendor/github.com/doug-martin/goqu/v9/update_dataset.go
deleted file mode 100644
index e2eaa53bb5c..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/update_dataset.go
+++ /dev/null
@@ -1,245 +0,0 @@
-package goqu
-
-import (
- "github.com/doug-martin/goqu/v9/exec"
- "github.com/doug-martin/goqu/v9/exp"
- "github.com/doug-martin/goqu/v9/internal/errors"
- "github.com/doug-martin/goqu/v9/internal/sb"
-)
-
-type UpdateDataset struct {
- dialect SQLDialect
- clauses exp.UpdateClauses
- isPrepared prepared
- queryFactory exec.QueryFactory
- err error
-}
-
-var ErrUnsupportedUpdateTableType = errors.New("unsupported table type, a string or identifier expression is required")
-
-// used internally by database to create a database with a specific adapter
-func newUpdateDataset(d string, queryFactory exec.QueryFactory) *UpdateDataset {
- return &UpdateDataset{
- clauses: exp.NewUpdateClauses(),
- dialect: GetDialect(d),
- queryFactory: queryFactory,
- }
-}
-
-func Update(table interface{}) *UpdateDataset {
- return newUpdateDataset("default", nil).Table(table)
-}
-
-// Set the parameter interpolation behavior. See examples
-//
-// prepared: If true the dataset WILL NOT interpolate the parameters.
-func (ud *UpdateDataset) Prepared(prepared bool) *UpdateDataset {
- ret := ud.copy(ud.clauses)
- ret.isPrepared = preparedFromBool(prepared)
- return ret
-}
-
-func (ud *UpdateDataset) IsPrepared() bool {
- return ud.isPrepared.Bool()
-}
-
-// Sets the adapter used to serialize values and create the SQL statement
-func (ud *UpdateDataset) WithDialect(dl string) *UpdateDataset {
- ds := ud.copy(ud.GetClauses())
- ds.dialect = GetDialect(dl)
- return ds
-}
-
-// Returns the current adapter on the dataset
-func (ud *UpdateDataset) Dialect() SQLDialect {
- return ud.dialect
-}
-
-// Returns the current adapter on the dataset
-func (ud *UpdateDataset) SetDialect(dialect SQLDialect) *UpdateDataset {
- cd := ud.copy(ud.GetClauses())
- cd.dialect = dialect
- return cd
-}
-
-func (ud *UpdateDataset) Expression() exp.Expression {
- return ud
-}
-
-// Clones the dataset
-func (ud *UpdateDataset) Clone() exp.Expression {
- return ud.copy(ud.clauses)
-}
-
-// Returns the current clauses on the dataset.
-func (ud *UpdateDataset) GetClauses() exp.UpdateClauses {
- return ud.clauses
-}
-
-// used internally to copy the dataset
-func (ud *UpdateDataset) copy(clauses exp.UpdateClauses) *UpdateDataset {
- return &UpdateDataset{
- dialect: ud.dialect,
- clauses: clauses,
- isPrepared: ud.isPrepared,
- queryFactory: ud.queryFactory,
- err: ud.err,
- }
-}
-
-// Creates a WITH clause for a common table expression (CTE).
-//
-// The name will be available to use in the UPDATE from in the associated query; and can optionally
-// contain a list of column names "name(col1, col2, col3)".
-//
-// The name will refer to the results of the specified subquery.
-func (ud *UpdateDataset) With(name string, subquery exp.Expression) *UpdateDataset {
- return ud.copy(ud.clauses.CommonTablesAppend(exp.NewCommonTableExpression(false, name, subquery)))
-}
-
-// Creates a WITH RECURSIVE clause for a common table expression (CTE)
-//
-// The name will be available to use in the UPDATE from in the associated query; and must
-// contain a list of column names "name(col1, col2, col3)" for a recursive clause.
-//
-// The name will refer to the results of the specified subquery. The subquery for
-// a recursive query will always end with a UNION or UNION ALL with a clause that
-// refers to the CTE by name.
-func (ud *UpdateDataset) WithRecursive(name string, subquery exp.Expression) *UpdateDataset {
- return ud.copy(ud.clauses.CommonTablesAppend(exp.NewCommonTableExpression(true, name, subquery)))
-}
-
-// Sets the table to update.
-func (ud *UpdateDataset) Table(table interface{}) *UpdateDataset {
- switch t := table.(type) {
- case exp.Expression:
- return ud.copy(ud.clauses.SetTable(t))
- case string:
- return ud.copy(ud.clauses.SetTable(exp.ParseIdentifier(t)))
- default:
- panic(ErrUnsupportedUpdateTableType)
- }
-}
-
-// Sets the values to use in the SET clause. See examples.
-func (ud *UpdateDataset) Set(values interface{}) *UpdateDataset {
- return ud.copy(ud.clauses.SetSetValues(values))
-}
-
-// Allows specifying other tables to reference in your update (If your dialect supports it). See examples.
-func (ud *UpdateDataset) From(tables ...interface{}) *UpdateDataset {
- return ud.copy(ud.clauses.SetFrom(exp.NewColumnListExpression(tables...)))
-}
-
-// Adds a WHERE clause. See examples.
-func (ud *UpdateDataset) Where(expressions ...exp.Expression) *UpdateDataset {
- return ud.copy(ud.clauses.WhereAppend(expressions...))
-}
-
-// Removes the WHERE clause. See examples.
-func (ud *UpdateDataset) ClearWhere() *UpdateDataset {
- return ud.copy(ud.clauses.ClearWhere())
-}
-
-// Adds a ORDER clause. If the ORDER is currently set it replaces it. See examples.
-func (ud *UpdateDataset) Order(order ...exp.OrderedExpression) *UpdateDataset {
- return ud.copy(ud.clauses.SetOrder(order...))
-}
-
-// Adds a more columns to the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (ud *UpdateDataset) OrderAppend(order ...exp.OrderedExpression) *UpdateDataset {
- return ud.copy(ud.clauses.OrderAppend(order...))
-}
-
-// Adds a more columns to the beginning of the current ORDER BY clause. If no order has be previously specified it is the same as
-// calling Order. See examples.
-func (ud *UpdateDataset) OrderPrepend(order ...exp.OrderedExpression) *UpdateDataset {
- return ud.copy(ud.clauses.OrderPrepend(order...))
-}
-
-// Removes the ORDER BY clause. See examples.
-func (ud *UpdateDataset) ClearOrder() *UpdateDataset {
- return ud.copy(ud.clauses.ClearOrder())
-}
-
-// Adds a LIMIT clause. If the LIMIT is currently set it replaces it. See examples.
-func (ud *UpdateDataset) Limit(limit uint) *UpdateDataset {
- if limit > 0 {
- return ud.copy(ud.clauses.SetLimit(limit))
- }
- return ud.copy(ud.clauses.ClearLimit())
-}
-
-// Adds a LIMIT ALL clause. If the LIMIT is currently set it replaces it. See examples.
-func (ud *UpdateDataset) LimitAll() *UpdateDataset {
- return ud.copy(ud.clauses.SetLimit(L("ALL")))
-}
-
-// Removes the LIMIT clause.
-func (ud *UpdateDataset) ClearLimit() *UpdateDataset {
- return ud.copy(ud.clauses.ClearLimit())
-}
-
-// Adds a RETURNING clause to the dataset if the adapter supports it. See examples.
-func (ud *UpdateDataset) Returning(returning ...interface{}) *UpdateDataset {
- return ud.copy(ud.clauses.SetReturning(exp.NewColumnListExpression(returning...)))
-}
-
-// Get any error that has been set or nil if no error has been set.
-func (ud *UpdateDataset) Error() error {
- return ud.err
-}
-
-// Set an error on the dataset if one has not already been set. This error will be returned by a future call to Error
-// or as part of ToSQL. This can be used by end users to record errors while building up queries without having to
-// track those separately.
-func (ud *UpdateDataset) SetError(err error) *UpdateDataset {
- if ud.err == nil {
- ud.err = err
- }
-
- return ud
-}
-
-// Generates an UPDATE sql statement, if Prepared has been called with true then the parameters will not be interpolated.
-// See examples.
-//
-// Errors:
-// * There is an error generating the SQL
-func (ud *UpdateDataset) ToSQL() (sql string, params []interface{}, err error) {
- return ud.updateSQLBuilder().ToSQL()
-}
-
-// Appends this Dataset's UPDATE statement to the SQLBuilder
-// This is used internally when using updates in CTEs
-func (ud *UpdateDataset) AppendSQL(b sb.SQLBuilder) {
- if ud.err != nil {
- b.SetError(ud.err)
- return
- }
- ud.dialect.ToUpdateSQL(b, ud.GetClauses())
-}
-
-func (ud *UpdateDataset) GetAs() exp.IdentifierExpression {
- return nil
-}
-
-func (ud *UpdateDataset) ReturnsColumns() bool {
- return ud.clauses.HasReturning()
-}
-
-// Generates the UPDATE sql, and returns an exec.QueryExecutor with the sql set to the UPDATE statement
-// db.Update("test").Set(Record{"name":"Bob", update: time.Now()}).Executor()
-func (ud *UpdateDataset) Executor() exec.QueryExecutor {
- return ud.queryFactory.FromSQLBuilder(ud.updateSQLBuilder())
-}
-
-func (ud *UpdateDataset) updateSQLBuilder() sb.SQLBuilder {
- buf := sb.NewSQLBuilder(ud.isPrepared.Bool())
- if ud.err != nil {
- return buf.SetError(ud.err)
- }
- ud.dialect.ToUpdateSQL(buf, ud.clauses)
- return buf
-}
diff --git a/vendor/github.com/doug-martin/goqu/v9/wait-for-it.sh b/vendor/github.com/doug-martin/goqu/v9/wait-for-it.sh
deleted file mode 100644
index 92cbdbb3c5f..00000000000
--- a/vendor/github.com/doug-martin/goqu/v9/wait-for-it.sh
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/env bash
-# Use this script to test if a given TCP host/port are available
-
-WAITFORIT_cmdname=${0##*/}
-
-echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
-
-usage()
-{
- cat << USAGE >&2
-Usage:
- $WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args]
- -h HOST | --host=HOST Host or IP under test
- -p PORT | --port=PORT TCP port under test
- Alternatively, you specify the host and port as host:port
- -s | --strict Only execute subcommand if the test succeeds
- -q | --quiet Don't output any status messages
- -t TIMEOUT | --timeout=TIMEOUT
- Timeout in seconds, zero for no timeout
- -- COMMAND ARGS Execute command with args after the test finishes
-USAGE
- exit 1
-}
-
-wait_for()
-{
- if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
- echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
- else
- echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout"
- fi
- WAITFORIT_start_ts=$(date +%s)
- while :
- do
- if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then
- nc -z $WAITFORIT_HOST $WAITFORIT_PORT
- WAITFORIT_result=$?
- else
- (echo > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1
- WAITFORIT_result=$?
- fi
- if [[ $WAITFORIT_result -eq 0 ]]; then
- WAITFORIT_end_ts=$(date +%s)
- echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds"
- break
- fi
- sleep 1
- done
- return $WAITFORIT_result
-}
-
-wait_for_wrapper()
-{
- # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
- if [[ $WAITFORIT_QUIET -eq 1 ]]; then
- timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
- else
- timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
- fi
- WAITFORIT_PID=$!
- trap "kill -INT -$WAITFORIT_PID" INT
- wait $WAITFORIT_PID
- WAITFORIT_RESULT=$?
- if [[ $WAITFORIT_RESULT -ne 0 ]]; then
- echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
- fi
- return $WAITFORIT_RESULT
-}
-
-# process arguments
-while [[ $# -gt 0 ]]
-do
- case "$1" in
- *:* )
- WAITFORIT_hostport=(${1//:/ })
- WAITFORIT_HOST=${WAITFORIT_hostport[0]}
- WAITFORIT_PORT=${WAITFORIT_hostport[1]}
- shift 1
- ;;
- --child)
- WAITFORIT_CHILD=1
- shift 1
- ;;
- -q | --quiet)
- WAITFORIT_QUIET=1
- shift 1
- ;;
- -s | --strict)
- WAITFORIT_STRICT=1
- shift 1
- ;;
- -h)
- WAITFORIT_HOST="$2"
- if [[ $WAITFORIT_HOST == "" ]]; then break; fi
- shift 2
- ;;
- --host=*)
- WAITFORIT_HOST="${1#*=}"
- shift 1
- ;;
- -p)
- WAITFORIT_PORT="$2"
- if [[ $WAITFORIT_PORT == "" ]]; then break; fi
- shift 2
- ;;
- --port=*)
- WAITFORIT_PORT="${1#*=}"
- shift 1
- ;;
- -t)
- WAITFORIT_TIMEOUT="$2"
- if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi
- shift 2
- ;;
- --timeout=*)
- WAITFORIT_TIMEOUT="${1#*=}"
- shift 1
- ;;
- --)
- shift
- WAITFORIT_CLI=("$@")
- break
- ;;
- --help)
- usage
- ;;
- *)
- echoerr "Unknown argument: $1"
- usage
- ;;
- esac
-done
-
-if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then
- echoerr "Error: you need to provide a host and port to test."
- usage
-fi
-
-WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
-WAITFORIT_STRICT=${WAITFORIT_STRICT:-0}
-WAITFORIT_CHILD=${WAITFORIT_CHILD:-0}
-WAITFORIT_QUIET=${WAITFORIT_QUIET:-0}
-
-# Check to see if timeout is from busybox?
-WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
-WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
-
-WAITFORIT_BUSYTIMEFLAG=""
-if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
- WAITFORIT_ISBUSY=1
- # Check if busybox timeout uses -t flag
- # (recent Alpine versions don't support -t anymore)
- if timeout &>/dev/stdout | grep -q -e '-t '; then
- WAITFORIT_BUSYTIMEFLAG="-t"
- fi
-else
- WAITFORIT_ISBUSY=0
-fi
-
-if [[ $WAITFORIT_CHILD -gt 0 ]]; then
- wait_for
- WAITFORIT_RESULT=$?
- exit $WAITFORIT_RESULT
-else
- if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
- wait_for_wrapper
- WAITFORIT_RESULT=$?
- else
- wait_for
- WAITFORIT_RESULT=$?
- fi
-fi
-
-if [[ $WAITFORIT_CLI != "" ]]; then
- if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then
- echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess"
- exit $WAITFORIT_RESULT
- fi
- exec "${WAITFORIT_CLI[@]}"
-else
- exit $WAITFORIT_RESULT
-fi
\ No newline at end of file
diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig
deleted file mode 100644
index fad895851e5..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-root = true
-
-[*.go]
-indent_style = tab
-indent_size = 4
-insert_final_newline = true
-
-[*.{yml,yaml}]
-indent_style = space
-indent_size = 2
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes
deleted file mode 100644
index 32f1001be0a..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-go.sum linguist-generated
diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore
deleted file mode 100644
index 4cd0cbaf432..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-# Setup a Global .gitignore for OS and editor generated files:
-# https://help.github.com/articles/ignoring-files
-# git config --global core.excludesfile ~/.gitignore_global
-
-.vagrant
-*.sublime-project
diff --git a/vendor/github.com/fsnotify/fsnotify/.mailmap b/vendor/github.com/fsnotify/fsnotify/.mailmap
deleted file mode 100644
index a04f2907fed..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/.mailmap
+++ /dev/null
@@ -1,2 +0,0 @@
-Chris Howey
-Nathan Youngman <4566+nathany@users.noreply.github.com>
diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS
deleted file mode 100644
index 6cbabe5ef50..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/AUTHORS
+++ /dev/null
@@ -1,62 +0,0 @@
-# Names should be added to this file as
-# Name or Organization
-# The email address is not required for organizations.
-
-# You can update this list using the following command:
-#
-# $ (head -n10 AUTHORS && git shortlog -se | sed -E 's/^\s+[0-9]+\t//') | tee AUTHORS
-
-# Please keep the list sorted.
-
-Aaron L
-Adrien Bustany
-Alexey Kazakov
-Amit Krishnan
-Anmol Sethi
-Bjørn Erik Pedersen
-Brian Goff
-Bruno Bigras
-Caleb Spare
-Case Nelson
-Chris Howey
-Christoffer Buchholz
-Daniel Wagner-Hall
-Dave Cheney
-Eric Lin
-Evan Phoenix
-Francisco Souza
-Gautam Dey
-Hari haran
-Ichinose Shogo
-Johannes Ebke
-John C Barstow
-Kelvin Fo
-Ken-ichirou MATSUZAWA
-Matt Layher
-Matthias Stone
-Nathan Youngman
-Nickolai Zeldovich
-Oliver Bristow
-Patrick
-Paul Hammond
-Pawel Knap
-Pieter Droogendijk
-Pratik Shinde
-Pursuit92
-Riku Voipio
-Rob Figueiredo
-Rodrigo Chiossi
-Slawek Ligus
-Soge Zhang
-Tiffany Jernigan
-Tilak Sharma
-Tobias Klauser
-Tom Payne
-Travis Cline
-Tudor Golubenco
-Vahe Khachikyan
-Yukang
-bronze1man
-debrando
-henrikedwards
-铁哥
diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
deleted file mode 100644
index a438fe4b4a5..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ /dev/null
@@ -1,339 +0,0 @@
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## [Unreleased]
-
-## [1.5.1] - 2021-08-24
-
-* Revert Add AddRaw to not follow symlinks
-
-## [1.5.0] - 2021-08-20
-
-* Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381)
-* Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298)
-* Windows: Follow symlinks by default like on all other systems [#289](https://github.com/fsnotify/fsnotify/pull/289)
-* CI: Use GitHub Actions for CI and cover go 1.12-1.17
- [#378](https://github.com/fsnotify/fsnotify/pull/378)
- [#381](https://github.com/fsnotify/fsnotify/pull/381)
- [#385](https://github.com/fsnotify/fsnotify/pull/385)
-* Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325)
-
-## [1.4.7] - 2018-01-09
-
-* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine)
-* Tests: Fix missing verb on format string (thanks @rchiossi)
-* Linux: Fix deadlock in Remove (thanks @aarondl)
-* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne)
-* Docs: Moved FAQ into the README (thanks @vahe)
-* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich)
-* Docs: replace references to OS X with macOS
-
-## [1.4.2] - 2016-10-10
-
-* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack)
-
-## [1.4.1] - 2016-10-04
-
-* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack)
-
-## [1.4.0] - 2016-10-01
-
-* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie)
-
-## [1.3.1] - 2016-06-28
-
-* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc)
-
-## [1.3.0] - 2016-04-19
-
-* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135)
-
-## [1.2.10] - 2016-03-02
-
-* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj)
-
-## [1.2.9] - 2016-01-13
-
-kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep)
-
-## [1.2.8] - 2015-12-17
-
-* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test)
-* inotify: fix race in test
-* enable race detection for continuous integration (Linux, Mac, Windows)
-
-## [1.2.5] - 2015-10-17
-
-* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki)
-* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken)
-* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie)
-* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion)
-
-## [1.2.1] - 2015-10-14
-
-* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx)
-
-## [1.2.0] - 2015-02-08
-
-* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD)
-* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD)
-* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59)
-
-## [1.1.1] - 2015-02-05
-
-* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD)
-
-## [1.1.0] - 2014-12-12
-
-* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43)
- * add low-level functions
- * only need to store flags on directories
- * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13)
- * done can be an unbuffered channel
- * remove calls to os.NewSyscallError
-* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher)
-* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48)
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## [1.0.4] - 2014-09-07
-
-* kqueue: add dragonfly to the build tags.
-* Rename source code files, rearrange code so exported APIs are at the top.
-* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang)
-
-## [1.0.3] - 2014-08-19
-
-* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36)
-
-## [1.0.2] - 2014-08-17
-
-* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-* [Fix] Make ./path and path equivalent. (thanks @zhsso)
-
-## [1.0.0] - 2014-08-15
-
-* [API] Remove AddWatch on Windows, use Add.
-* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30)
-* Minor updates based on feedback from golint.
-
-## dev / 2014-07-09
-
-* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify).
-* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno)
-
-## dev / 2014-07-04
-
-* kqueue: fix incorrect mutex used in Close()
-* Update example to demonstrate usage of Op.
-
-## dev / 2014-06-28
-
-* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4)
-* Fix for String() method on Event (thanks Alex Brainman)
-* Don't build on Plan 9 or Solaris (thanks @4ad)
-
-## dev / 2014-06-21
-
-* Events channel of type Event rather than *Event.
-* [internal] use syscall constants directly for inotify and kqueue.
-* [internal] kqueue: rename events to kevents and fileEvent to event.
-
-## dev / 2014-06-19
-
-* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally).
-* [internal] remove cookie from Event struct (unused).
-* [internal] Event struct has the same definition across every OS.
-* [internal] remove internal watch and removeWatch methods.
-
-## dev / 2014-06-12
-
-* [API] Renamed Watch() to Add() and RemoveWatch() to Remove().
-* [API] Pluralized channel names: Events and Errors.
-* [API] Renamed FileEvent struct to Event.
-* [API] Op constants replace methods like IsCreate().
-
-## dev / 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## dev / 2014-05-23
-
-* [API] Remove current implementation of WatchFlags.
- * current implementation doesn't take advantage of OS for efficiency
- * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes
- * no tests for the current implementation
- * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195)
-
-## [0.9.3] - 2014-12-31
-
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## [0.9.2] - 2014-08-17
-
-* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-
-## [0.9.1] - 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## [0.9.0] - 2014-01-17
-
-* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany)
-* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare)
-* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library.
-
-## [0.8.12] - 2013-11-13
-
-* [API] Remove FD_SET and friends from Linux adapter
-
-## [0.8.11] - 2013-11-02
-
-* [Doc] Add Changelog [#72][] (thanks @nathany)
-* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond)
-
-## [0.8.10] - 2013-10-19
-
-* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott)
-* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer)
-* [Doc] specify OS-specific limits in README (thanks @debrando)
-
-## [0.8.9] - 2013-09-08
-
-* [Doc] Contributing (thanks @nathany)
-* [Doc] update package path in example code [#63][] (thanks @paulhammond)
-* [Doc] GoCI badge in README (Linux only) [#60][]
-* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany)
-
-## [0.8.8] - 2013-06-17
-
-* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie)
-
-## [0.8.7] - 2013-06-03
-
-* [API] Make syscall flags internal
-* [Fix] inotify: ignore event changes
-* [Fix] race in symlink test [#45][] (reported by @srid)
-* [Fix] tests on Windows
-* lower case error messages
-
-## [0.8.6] - 2013-05-23
-
-* kqueue: Use EVT_ONLY flag on Darwin
-* [Doc] Update README with full example
-
-## [0.8.5] - 2013-05-09
-
-* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg)
-
-## [0.8.4] - 2013-04-07
-
-* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz)
-
-## [0.8.3] - 2013-03-13
-
-* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin)
-* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin)
-
-## [0.8.2] - 2013-02-07
-
-* [Doc] add Authors
-* [Fix] fix data races for map access [#29][] (thanks @fsouza)
-
-## [0.8.1] - 2013-01-09
-
-* [Fix] Windows path separators
-* [Doc] BSD License
-
-## [0.8.0] - 2012-11-09
-
-* kqueue: directory watching improvements (thanks @vmirage)
-* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto)
-* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr)
-
-## [0.7.4] - 2012-10-09
-
-* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji)
-* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig)
-* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig)
-* [Fix] kqueue: modify after recreation of file
-
-## [0.7.3] - 2012-09-27
-
-* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage)
-* [Fix] kqueue: no longer get duplicate CREATE events
-
-## [0.7.2] - 2012-09-01
-
-* kqueue: events for created directories
-
-## [0.7.1] - 2012-07-14
-
-* [Fix] for renaming files
-
-## [0.7.0] - 2012-07-02
-
-* [Feature] FSNotify flags
-* [Fix] inotify: Added file name back to event path
-
-## [0.6.0] - 2012-06-06
-
-* kqueue: watch files after directory created (thanks @tmc)
-
-## [0.5.1] - 2012-05-22
-
-* [Fix] inotify: remove all watches before Close()
-
-## [0.5.0] - 2012-05-03
-
-* [API] kqueue: return errors during watch instead of sending over channel
-* kqueue: match symlink behavior on Linux
-* inotify: add `DELETE_SELF` (requested by @taralx)
-* [Fix] kqueue: handle EINTR (reported by @robfig)
-* [Doc] Godoc example [#1][] (thanks @davecheney)
-
-## [0.4.0] - 2012-03-30
-
-* Go 1 released: build with go tool
-* [Feature] Windows support using winfsnotify
-* Windows does not have attribute change notifications
-* Roll attribute notifications into IsModify
-
-## [0.3.0] - 2012-02-19
-
-* kqueue: add files when watch directory
-
-## [0.2.0] - 2011-12-30
-
-* update to latest Go weekly code
-
-## [0.1.0] - 2011-10-19
-
-* kqueue: add watch on file creation to match inotify
-* kqueue: create file event
-* inotify: ignore `IN_IGNORED` events
-* event String()
-* linux: common FileEvent functions
-* initial commit
-
-[#79]: https://github.com/howeyc/fsnotify/pull/79
-[#77]: https://github.com/howeyc/fsnotify/pull/77
-[#72]: https://github.com/howeyc/fsnotify/issues/72
-[#71]: https://github.com/howeyc/fsnotify/issues/71
-[#70]: https://github.com/howeyc/fsnotify/issues/70
-[#63]: https://github.com/howeyc/fsnotify/issues/63
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#60]: https://github.com/howeyc/fsnotify/issues/60
-[#59]: https://github.com/howeyc/fsnotify/issues/59
-[#49]: https://github.com/howeyc/fsnotify/issues/49
-[#45]: https://github.com/howeyc/fsnotify/issues/45
-[#40]: https://github.com/howeyc/fsnotify/issues/40
-[#36]: https://github.com/howeyc/fsnotify/issues/36
-[#33]: https://github.com/howeyc/fsnotify/issues/33
-[#29]: https://github.com/howeyc/fsnotify/issues/29
-[#25]: https://github.com/howeyc/fsnotify/issues/25
-[#24]: https://github.com/howeyc/fsnotify/issues/24
-[#21]: https://github.com/howeyc/fsnotify/issues/21
diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
deleted file mode 100644
index 828a60b24ba..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Contributing
-
-## Issues
-
-* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues).
-* Please indicate the platform you are using fsnotify on.
-* A code example to reproduce the problem is appreciated.
-
-## Pull Requests
-
-### Contributor License Agreement
-
-fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual).
-
-Please indicate that you have signed the CLA in your pull request.
-
-### How fsnotify is Developed
-
-* Development is done on feature branches.
-* Tests are run on BSD, Linux, macOS and Windows.
-* Pull requests are reviewed and [applied to master][am] using [hub][].
- * Maintainers may modify or squash commits rather than asking contributors to.
-* To issue a new release, the maintainers will:
- * Update the CHANGELOG
- * Tag a version, which will become available through gopkg.in.
-
-### How to Fork
-
-For smooth sailing, always use the original import path. Installing with `go get` makes this easy.
-
-1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`)
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Ensure everything works and the tests pass (see below)
-4. Commit your changes (`git commit -am 'Add some feature'`)
-
-Contribute upstream:
-
-1. Fork fsnotify on GitHub
-2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
-3. Push to the branch (`git push fork my-new-feature`)
-4. Create a new Pull Request on GitHub
-
-This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/).
-
-### Testing
-
-fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows.
-
-Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-
-To aid in cross-platform testing there is a Vagrantfile for Linux and BSD.
-
-* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder.
-* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
-* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`.
-* When you're done, you will want to halt or destroy the Vagrant boxes.
-
-Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory.
-
-Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
-
-### Maintainers
-
-Help maintaining fsnotify is welcome. To be a maintainer:
-
-* Submit a pull request and sign the CLA as above.
-* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-
-To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][].
-
-All code changes should be internal pull requests.
-
-Releases are tagged using [Semantic Versioning](http://semver.org/).
-
-[hub]: https://github.com/github/hub
-[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs
diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE
deleted file mode 100644
index e180c8fb059..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-Copyright (c) 2012-2019 fsnotify Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md
deleted file mode 100644
index df57b1b282c..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/README.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# File system notifications for Go
-
-[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)
-
-fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:
-
-```console
-go get -u golang.org/x/sys/...
-```
-
-Cross platform: Windows, Linux, BSD and macOS.
-
-| Adapter | OS | Status |
-| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
-| inotify | Linux 2.6.27 or later, Android\* | Supported |
-| kqueue | BSD, macOS, iOS\* | Supported |
-| ReadDirectoryChangesW | Windows | Supported |
-| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
-| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
-| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) |
-| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
-| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
-
-\* Android and iOS are untested.
-
-Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
-
-## API stability
-
-fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.
-
-Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
-
-## Usage
-
-```go
-package main
-
-import (
- "log"
-
- "github.com/fsnotify/fsnotify"
-)
-
-func main() {
- watcher, err := fsnotify.NewWatcher()
- if err != nil {
- log.Fatal(err)
- }
- defer watcher.Close()
-
- done := make(chan bool)
- go func() {
- for {
- select {
- case event, ok := <-watcher.Events:
- if !ok {
- return
- }
- log.Println("event:", event)
- if event.Op&fsnotify.Write == fsnotify.Write {
- log.Println("modified file:", event.Name)
- }
- case err, ok := <-watcher.Errors:
- if !ok {
- return
- }
- log.Println("error:", err)
- }
- }
- }()
-
- err = watcher.Add("/tmp/foo")
- if err != nil {
- log.Fatal(err)
- }
- <-done
-}
-```
-
-## Contributing
-
-Please refer to [CONTRIBUTING][] before opening an issue or pull request.
-
-## Example
-
-See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
-## FAQ
-
-**When a file is moved to another directory is it still being watched?**
-
-No (it shouldn't be, unless you are watching where it was moved to).
-
-**When I watch a directory, are all subdirectories watched as well?**
-
-No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).
-
-**Do I have to watch the Error and Event channels in a separate goroutine?**
-
-As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])
-
-**Why am I receiving multiple events for the same file on OS X?**
-
-Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).
-
-**How many files can be watched at once?**
-
-There are OS-specific limits as to how many watches can be created:
-* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
-* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
-
-**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?**
-
-fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications.
-
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#18]: https://github.com/fsnotify/fsnotify/issues/18
-[#11]: https://github.com/fsnotify/fsnotify/issues/11
-[#7]: https://github.com/howeyc/fsnotify/issues/7
-
-[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md
-
-## Related Projects
-
-* [notify](https://github.com/rjeczalik/notify)
-* [fsevents](https://github.com/fsnotify/fsevents)
-
diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go
deleted file mode 100644
index b3ac3d8f55f..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/fen.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build solaris
-// +build solaris
-
-package fsnotify
-
-import (
- "errors"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return nil
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- return nil
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
deleted file mode 100644
index 0f4ee52e8aa..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !plan9
-// +build !plan9
-
-// Package fsnotify provides a platform-independent interface for file system notifications.
-package fsnotify
-
-import (
- "bytes"
- "errors"
- "fmt"
-)
-
-// Event represents a single file system notification.
-type Event struct {
- Name string // Relative path to the file or directory.
- Op Op // File operation that triggered the event.
-}
-
-// Op describes a set of file operations.
-type Op uint32
-
-// These are the generalized file operations that can trigger a notification.
-const (
- Create Op = 1 << iota
- Write
- Remove
- Rename
- Chmod
-)
-
-func (op Op) String() string {
- // Use a buffer for efficient string concatenation
- var buffer bytes.Buffer
-
- if op&Create == Create {
- buffer.WriteString("|CREATE")
- }
- if op&Remove == Remove {
- buffer.WriteString("|REMOVE")
- }
- if op&Write == Write {
- buffer.WriteString("|WRITE")
- }
- if op&Rename == Rename {
- buffer.WriteString("|RENAME")
- }
- if op&Chmod == Chmod {
- buffer.WriteString("|CHMOD")
- }
- if buffer.Len() == 0 {
- return ""
- }
- return buffer.String()[1:] // Strip leading pipe
-}
-
-// String returns a string representation of the event in the form
-// "file: REMOVE|WRITE|..."
-func (e Event) String() string {
- return fmt.Sprintf("%q: %s", e.Name, e.Op.String())
-}
-
-// Common errors that can be reported by a watcher
-var (
- ErrEventOverflow = errors.New("fsnotify queue overflow")
-)
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go
deleted file mode 100644
index eb87699b5b4..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build linux
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "sync"
- "unsafe"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- mu sync.Mutex // Map access
- fd int
- poller *fdPoller
- watches map[string]*watch // Map of inotify watches (key: path)
- paths map[int]string // Map of watched paths (key: watch descriptor)
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
- doneResp chan struct{} // Channel to respond to Close
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- // Create inotify fd
- fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC)
- if fd == -1 {
- return nil, errno
- }
- // Create epoll
- poller, err := newFdPoller(fd)
- if err != nil {
- unix.Close(fd)
- return nil, err
- }
- w := &Watcher{
- fd: fd,
- poller: poller,
- watches: make(map[string]*watch),
- paths: make(map[int]string),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- doneResp: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-func (w *Watcher) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed() {
- return nil
- }
-
- // Send 'close' signal to goroutine, and set the Watcher to closed.
- close(w.done)
-
- // Wake up goroutine
- w.poller.wake()
-
- // Wait for goroutine to close
- <-w.doneResp
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- name = filepath.Clean(name)
- if w.isClosed() {
- return errors.New("inotify instance already closed")
- }
-
- const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
- unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
- unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
-
- var flags uint32 = agnosticEvents
-
- w.mu.Lock()
- defer w.mu.Unlock()
- watchEntry := w.watches[name]
- if watchEntry != nil {
- flags |= watchEntry.flags | unix.IN_MASK_ADD
- }
- wd, errno := unix.InotifyAddWatch(w.fd, name, flags)
- if wd == -1 {
- return errno
- }
-
- if watchEntry == nil {
- w.watches[name] = &watch{wd: uint32(wd), flags: flags}
- w.paths[wd] = name
- } else {
- watchEntry.wd = uint32(wd)
- watchEntry.flags = flags
- }
-
- return nil
-}
-
-// Remove stops watching the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
-
- // Fetch the watch.
- w.mu.Lock()
- defer w.mu.Unlock()
- watch, ok := w.watches[name]
-
- // Remove it from inotify.
- if !ok {
- return fmt.Errorf("can't remove non-existent inotify watch for: %s", name)
- }
-
- // We successfully removed the watch if InotifyRmWatch doesn't return an
- // error, we need to clean up our internal state to ensure it matches
- // inotify's kernel state.
- delete(w.paths, int(watch.wd))
- delete(w.watches, name)
-
- // inotify_rm_watch will return EINVAL if the file has been deleted;
- // the inotify will already have been removed.
- // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously
- // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE
- // so that EINVAL means that the wd is being rm_watch()ed or its file removed
- // by another thread and we have not received IN_IGNORE event.
- success, errno := unix.InotifyRmWatch(w.fd, watch.wd)
- if success == -1 {
- // TODO: Perhaps it's not helpful to return an error here in every case.
- // the only two possible errors are:
- // EBADF, which happens when w.fd is not a valid file descriptor of any kind.
- // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor.
- // Watch descriptors are invalidated when they are removed explicitly or implicitly;
- // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted.
- return errno
- }
-
- return nil
-}
-
-type watch struct {
- wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
- flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
-}
-
-// readEvents reads from the inotify file descriptor, converts the
-// received events into Event objects and sends them via the Events channel
-func (w *Watcher) readEvents() {
- var (
- buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
- n int // Number of bytes read with read()
- errno error // Syscall errno
- ok bool // For poller.wait
- )
-
- defer close(w.doneResp)
- defer close(w.Errors)
- defer close(w.Events)
- defer unix.Close(w.fd)
- defer w.poller.close()
-
- for {
- // See if we have been closed.
- if w.isClosed() {
- return
- }
-
- ok, errno = w.poller.wait()
- if errno != nil {
- select {
- case w.Errors <- errno:
- case <-w.done:
- return
- }
- continue
- }
-
- if !ok {
- continue
- }
-
- n, errno = unix.Read(w.fd, buf[:])
- // If a signal interrupted execution, see if we've been asked to close, and try again.
- // http://man7.org/linux/man-pages/man7/signal.7.html :
- // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable"
- if errno == unix.EINTR {
- continue
- }
-
- // unix.Read might have been woken up by Close. If so, we're done.
- if w.isClosed() {
- return
- }
-
- if n < unix.SizeofInotifyEvent {
- var err error
- if n == 0 {
- // If EOF is received. This should really never happen.
- err = io.EOF
- } else if n < 0 {
- // If an error occurred while reading.
- err = errno
- } else {
- // Read was too short.
- err = errors.New("notify: short read in readEvents()")
- }
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- continue
- }
-
- var offset uint32
- // We don't know how many events we just read into the buffer
- // While the offset points to at least one whole event...
- for offset <= uint32(n-unix.SizeofInotifyEvent) {
- // Point "raw" to the event in the buffer
- raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
-
- mask := uint32(raw.Mask)
- nameLen := uint32(raw.Len)
-
- if mask&unix.IN_Q_OVERFLOW != 0 {
- select {
- case w.Errors <- ErrEventOverflow:
- case <-w.done:
- return
- }
- }
-
- // If the event happened to the watched directory or the watched file, the kernel
- // doesn't append the filename to the event, but we would like to always fill the
- // the "Name" field with a valid filename. We retrieve the path of the watch from
- // the "paths" map.
- w.mu.Lock()
- name, ok := w.paths[int(raw.Wd)]
- // IN_DELETE_SELF occurs when the file/directory being watched is removed.
- // This is a sign to clean up the maps, otherwise we are no longer in sync
- // with the inotify kernel state which has already deleted the watch
- // automatically.
- if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
- delete(w.paths, int(raw.Wd))
- delete(w.watches, name)
- }
- w.mu.Unlock()
-
- if nameLen > 0 {
- // Point "bytes" at the first byte of the filename
- bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen]
- // The filename is padded with NULL bytes. TrimRight() gets rid of those.
- name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
- }
-
- event := newEvent(name, mask)
-
- // Send the events that are not ignored on the events channel
- if !event.ignoreLinux(mask) {
- select {
- case w.Events <- event:
- case <-w.done:
- return
- }
- }
-
- // Move to the next event in the buffer
- offset += unix.SizeofInotifyEvent + nameLen
- }
- }
-}
-
-// Certain types of events can be "ignored" and not sent over the Events
-// channel. Such as events marked ignore by the kernel, or MODIFY events
-// against files that do not exist.
-func (e *Event) ignoreLinux(mask uint32) bool {
- // Ignore anything the inotify API says to ignore
- if mask&unix.IN_IGNORED == unix.IN_IGNORED {
- return true
- }
-
- // If the event is not a DELETE or RENAME, the file must exist.
- // Otherwise the event is ignored.
- // *Note*: this was put in place because it was seen that a MODIFY
- // event was sent after the DELETE. This ignores that MODIFY and
- // assumes a DELETE will come or has come if the file doesn't exist.
- if !(e.Op&Remove == Remove || e.Op&Rename == Rename) {
- _, statErr := os.Lstat(e.Name)
- return os.IsNotExist(statErr)
- }
- return false
-}
-
-// newEvent returns an platform-independent Event based on an inotify mask.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {
- e.Op |= Create
- }
- if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {
- e.Op |= Remove
- }
- if mask&unix.IN_MODIFY == unix.IN_MODIFY {
- e.Op |= Write
- }
- if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {
- e.Op |= Rename
- }
- if mask&unix.IN_ATTRIB == unix.IN_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
deleted file mode 100644
index e9ff9439f7f..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build linux
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
-
- "golang.org/x/sys/unix"
-)
-
-type fdPoller struct {
- fd int // File descriptor (as returned by the inotify_init() syscall)
- epfd int // Epoll file descriptor
- pipe [2]int // Pipe for waking up
-}
-
-func emptyPoller(fd int) *fdPoller {
- poller := new(fdPoller)
- poller.fd = fd
- poller.epfd = -1
- poller.pipe[0] = -1
- poller.pipe[1] = -1
- return poller
-}
-
-// Create a new inotify poller.
-// This creates an inotify handler, and an epoll handler.
-func newFdPoller(fd int) (*fdPoller, error) {
- var errno error
- poller := emptyPoller(fd)
- defer func() {
- if errno != nil {
- poller.close()
- }
- }()
- poller.fd = fd
-
- // Create epoll fd
- poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
- if poller.epfd == -1 {
- return nil, errno
- }
- // Create pipe; pipe[0] is the read end, pipe[1] the write end.
- errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC)
- if errno != nil {
- return nil, errno
- }
-
- // Register inotify fd with epoll
- event := unix.EpollEvent{
- Fd: int32(poller.fd),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event)
- if errno != nil {
- return nil, errno
- }
-
- // Register pipe fd with epoll
- event = unix.EpollEvent{
- Fd: int32(poller.pipe[0]),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event)
- if errno != nil {
- return nil, errno
- }
-
- return poller, nil
-}
-
-// Wait using epoll.
-// Returns true if something is ready to be read,
-// false if there is not.
-func (poller *fdPoller) wait() (bool, error) {
- // 3 possible events per fd, and 2 fds, makes a maximum of 6 events.
- // I don't know whether epoll_wait returns the number of events returned,
- // or the total number of events ready.
- // I decided to catch both by making the buffer one larger than the maximum.
- events := make([]unix.EpollEvent, 7)
- for {
- n, errno := unix.EpollWait(poller.epfd, events, -1)
- if n == -1 {
- if errno == unix.EINTR {
- continue
- }
- return false, errno
- }
- if n == 0 {
- // If there are no events, try again.
- continue
- }
- if n > 6 {
- // This should never happen. More events were returned than should be possible.
- return false, errors.New("epoll_wait returned more events than I know what to do with")
- }
- ready := events[:n]
- epollhup := false
- epollerr := false
- epollin := false
- for _, event := range ready {
- if event.Fd == int32(poller.fd) {
- if event.Events&unix.EPOLLHUP != 0 {
- // This should not happen, but if it does, treat it as a wakeup.
- epollhup = true
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the file descriptor, we should pretend
- // something is ready to read, and let unix.Read pick up the error.
- epollerr = true
- }
- if event.Events&unix.EPOLLIN != 0 {
- // There is data to read.
- epollin = true
- }
- }
- if event.Fd == int32(poller.pipe[0]) {
- if event.Events&unix.EPOLLHUP != 0 {
- // Write pipe descriptor was closed, by us. This means we're closing down the
- // watcher, and we should wake up.
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the pipe file descriptor.
- // This is an absolute mystery, and should never ever happen.
- return false, errors.New("Error on the pipe descriptor.")
- }
- if event.Events&unix.EPOLLIN != 0 {
- // This is a regular wakeup, so we have to clear the buffer.
- err := poller.clearWake()
- if err != nil {
- return false, err
- }
- }
- }
- }
-
- if epollhup || epollerr || epollin {
- return true, nil
- }
- return false, nil
- }
-}
-
-// Close the write end of the poller.
-func (poller *fdPoller) wake() error {
- buf := make([]byte, 1)
- n, errno := unix.Write(poller.pipe[1], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is full, poller will wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-func (poller *fdPoller) clearWake() error {
- // You have to be woken up a LOT in order to get to 100!
- buf := make([]byte, 100)
- n, errno := unix.Read(poller.pipe[0], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is empty, someone else cleared our wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-// Close all poller file descriptors, but not the one passed to it.
-func (poller *fdPoller) close() {
- if poller.pipe[1] != -1 {
- unix.Close(poller.pipe[1])
- }
- if poller.pipe[0] != -1 {
- unix.Close(poller.pipe[0])
- }
- if poller.epfd != -1 {
- unix.Close(poller.epfd)
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go
deleted file mode 100644
index 368f5b790d4..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ /dev/null
@@ -1,522 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build freebsd || openbsd || netbsd || dragonfly || darwin
-// +build freebsd openbsd netbsd dragonfly darwin
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "sync"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
-
- kq int // File descriptor (as returned by the kqueue() syscall).
-
- mu sync.Mutex // Protects access to watcher data
- watches map[string]int // Map of watched file descriptors (key: path).
- externalWatches map[string]bool // Map of watches added by user of the library.
- dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue.
- paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events.
- fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events).
- isClosed bool // Set to true when Close() is first called
-}
-
-type pathInfo struct {
- name string
- isDir bool
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- kq, err := kqueue()
- if err != nil {
- return nil, err
- }
-
- w := &Watcher{
- kq: kq,
- watches: make(map[string]int),
- dirFlags: make(map[string]uint32),
- paths: make(map[int]pathInfo),
- fileExists: make(map[string]bool),
- externalWatches: make(map[string]bool),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return nil
- }
- w.isClosed = true
-
- // copy paths to remove while locked
- var pathsToRemove = make([]string, 0, len(w.watches))
- for name := range w.watches {
- pathsToRemove = append(pathsToRemove, name)
- }
- w.mu.Unlock()
- // unlock before calling Remove, which also locks
-
- for _, name := range pathsToRemove {
- w.Remove(name)
- }
-
- // send a "quit" message to the reader goroutine
- close(w.done)
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- w.mu.Lock()
- w.externalWatches[name] = true
- w.mu.Unlock()
- _, err := w.addWatch(name, noteAllEvents)
- return err
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
- w.mu.Lock()
- watchfd, ok := w.watches[name]
- w.mu.Unlock()
- if !ok {
- return fmt.Errorf("can't remove non-existent kevent watch for: %s", name)
- }
-
- const registerRemove = unix.EV_DELETE
- if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil {
- return err
- }
-
- unix.Close(watchfd)
-
- w.mu.Lock()
- isDir := w.paths[watchfd].isDir
- delete(w.watches, name)
- delete(w.paths, watchfd)
- delete(w.dirFlags, name)
- w.mu.Unlock()
-
- // Find all watched paths that are in this directory that are not external.
- if isDir {
- var pathsToRemove []string
- w.mu.Lock()
- for _, path := range w.paths {
- wdir, _ := filepath.Split(path.name)
- if filepath.Clean(wdir) == name {
- if !w.externalWatches[path.name] {
- pathsToRemove = append(pathsToRemove, path.name)
- }
- }
- }
- w.mu.Unlock()
- for _, name := range pathsToRemove {
- // Since these are internal, not much sense in propagating error
- // to the user, as that will just confuse them with an error about
- // a path they did not explicitly watch themselves.
- w.Remove(name)
- }
- }
-
- return nil
-}
-
-// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
-const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
-
-// keventWaitTime to block on each read from kevent
-var keventWaitTime = durationToTimespec(100 * time.Millisecond)
-
-// addWatch adds name to the watched file set.
-// The flags are interpreted as described in kevent(2).
-// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks.
-func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
- var isDir bool
- // Make ./name and name equivalent
- name = filepath.Clean(name)
-
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return "", errors.New("kevent instance already closed")
- }
- watchfd, alreadyWatching := w.watches[name]
- // We already have a watch, but we can still override flags.
- if alreadyWatching {
- isDir = w.paths[watchfd].isDir
- }
- w.mu.Unlock()
-
- if !alreadyWatching {
- fi, err := os.Lstat(name)
- if err != nil {
- return "", err
- }
-
- // Don't watch sockets.
- if fi.Mode()&os.ModeSocket == os.ModeSocket {
- return "", nil
- }
-
- // Don't watch named pipes.
- if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe {
- return "", nil
- }
-
- // Follow Symlinks
- // Unfortunately, Linux can add bogus symlinks to watch list without
- // issue, and Windows can't do symlinks period (AFAIK). To maintain
- // consistency, we will act like everything is fine. There will simply
- // be no file events for broken symlinks.
- // Hence the returns of nil on errors.
- if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
- name, err = filepath.EvalSymlinks(name)
- if err != nil {
- return "", nil
- }
-
- w.mu.Lock()
- _, alreadyWatching = w.watches[name]
- w.mu.Unlock()
-
- if alreadyWatching {
- return name, nil
- }
-
- fi, err = os.Lstat(name)
- if err != nil {
- return "", nil
- }
- }
-
- watchfd, err = unix.Open(name, openMode, 0700)
- if watchfd == -1 {
- return "", err
- }
-
- isDir = fi.IsDir()
- }
-
- const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE
- if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil {
- unix.Close(watchfd)
- return "", err
- }
-
- if !alreadyWatching {
- w.mu.Lock()
- w.watches[name] = watchfd
- w.paths[watchfd] = pathInfo{name: name, isDir: isDir}
- w.mu.Unlock()
- }
-
- if isDir {
- // Watch the directory if it has not been watched before,
- // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles)
- w.mu.Lock()
-
- watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
- (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE)
- // Store flags so this watch can be updated later
- w.dirFlags[name] = flags
- w.mu.Unlock()
-
- if watchDir {
- if err := w.watchDirectoryFiles(name); err != nil {
- return "", err
- }
- }
- }
- return name, nil
-}
-
-// readEvents reads from kqueue and converts the received kevents into
-// Event values that it sends down the Events channel.
-func (w *Watcher) readEvents() {
- eventBuffer := make([]unix.Kevent_t, 10)
-
-loop:
- for {
- // See if there is a message on the "done" channel
- select {
- case <-w.done:
- break loop
- default:
- }
-
- // Get new events
- kevents, err := read(w.kq, eventBuffer, &keventWaitTime)
- // EINTR is okay, the syscall was interrupted before timeout expired.
- if err != nil && err != unix.EINTR {
- select {
- case w.Errors <- err:
- case <-w.done:
- break loop
- }
- continue
- }
-
- // Flush the events we received to the Events channel
- for len(kevents) > 0 {
- kevent := &kevents[0]
- watchfd := int(kevent.Ident)
- mask := uint32(kevent.Fflags)
- w.mu.Lock()
- path := w.paths[watchfd]
- w.mu.Unlock()
- event := newEvent(path.name, mask)
-
- if path.isDir && !(event.Op&Remove == Remove) {
- // Double check to make sure the directory exists. This can happen when
- // we do a rm -fr on a recursively watched folders and we receive a
- // modification event first but the folder has been deleted and later
- // receive the delete event
- if _, err := os.Lstat(event.Name); os.IsNotExist(err) {
- // mark is as delete event
- event.Op |= Remove
- }
- }
-
- if event.Op&Rename == Rename || event.Op&Remove == Remove {
- w.Remove(event.Name)
- w.mu.Lock()
- delete(w.fileExists, event.Name)
- w.mu.Unlock()
- }
-
- if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) {
- w.sendDirectoryChangeEvents(event.Name)
- } else {
- // Send the event on the Events channel.
- select {
- case w.Events <- event:
- case <-w.done:
- break loop
- }
- }
-
- if event.Op&Remove == Remove {
- // Look for a file that may have overwritten this.
- // For example, mv f1 f2 will delete f2, then create f2.
- if path.isDir {
- fileDir := filepath.Clean(event.Name)
- w.mu.Lock()
- _, found := w.watches[fileDir]
- w.mu.Unlock()
- if found {
- // make sure the directory exists before we watch for changes. When we
- // do a recursive watch and perform rm -fr, the parent directory might
- // have gone missing, ignore the missing directory and let the
- // upcoming delete event remove the watch from the parent directory.
- if _, err := os.Lstat(fileDir); err == nil {
- w.sendDirectoryChangeEvents(fileDir)
- }
- }
- } else {
- filePath := filepath.Clean(event.Name)
- if fileInfo, err := os.Lstat(filePath); err == nil {
- w.sendFileCreatedEventIfNew(filePath, fileInfo)
- }
- }
- }
-
- // Move to next event
- kevents = kevents[1:]
- }
- }
-
- // cleanup
- err := unix.Close(w.kq)
- if err != nil {
- // only way the previous loop breaks is if w.done was closed so we need to async send to w.Errors.
- select {
- case w.Errors <- err:
- default:
- }
- }
- close(w.Events)
- close(w.Errors)
-}
-
-// newEvent returns an platform-independent Event based on kqueue Fflags.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.NOTE_DELETE == unix.NOTE_DELETE {
- e.Op |= Remove
- }
- if mask&unix.NOTE_WRITE == unix.NOTE_WRITE {
- e.Op |= Write
- }
- if mask&unix.NOTE_RENAME == unix.NOTE_RENAME {
- e.Op |= Rename
- }
- if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-func newCreateEvent(name string) Event {
- return Event{Name: name, Op: Create}
-}
-
-// watchDirectoryFiles to mimic inotify when adding a watch on a directory
-func (w *Watcher) watchDirectoryFiles(dirPath string) error {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- return err
- }
-
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
- }
-
- return nil
-}
-
-// sendDirectoryEvents searches the directory for newly created files
-// and sends them over the event channel. This functionality is to have
-// the BSD version of fsnotify match Linux inotify which provides a
-// create event for files created in a watched directory.
-func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- }
-
- // Search for new files
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- err := w.sendFileCreatedEventIfNew(filePath, fileInfo)
-
- if err != nil {
- return
- }
- }
-}
-
-// sendFileCreatedEvent sends a create event if the file isn't already being tracked.
-func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) {
- w.mu.Lock()
- _, doesExist := w.fileExists[filePath]
- w.mu.Unlock()
- if !doesExist {
- // Send create event
- select {
- case w.Events <- newCreateEvent(filePath):
- case <-w.done:
- return
- }
- }
-
- // like watchDirectoryFiles (but without doing another ReadDir)
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
-
- return nil
-}
-
-func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) {
- if fileInfo.IsDir() {
- // mimic Linux providing delete events for subdirectories
- // but preserve the flags used if currently watching subdirectory
- w.mu.Lock()
- flags := w.dirFlags[name]
- w.mu.Unlock()
-
- flags |= unix.NOTE_DELETE | unix.NOTE_RENAME
- return w.addWatch(name, flags)
- }
-
- // watch file to mimic Linux inotify
- return w.addWatch(name, noteAllEvents)
-}
-
-// kqueue creates a new kernel event queue and returns a descriptor.
-func kqueue() (kq int, err error) {
- kq, err = unix.Kqueue()
- if kq == -1 {
- return kq, err
- }
- return kq, nil
-}
-
-// register events with the queue
-func register(kq int, fds []int, flags int, fflags uint32) error {
- changes := make([]unix.Kevent_t, len(fds))
-
- for i, fd := range fds {
- // SetKevent converts int to the platform-specific types:
- unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags)
- changes[i].Fflags = fflags
- }
-
- // register the events
- success, err := unix.Kevent(kq, changes, nil, nil)
- if success == -1 {
- return err
- }
- return nil
-}
-
-// read retrieves pending events, or waits until an event occurs.
-// A timeout of nil blocks indefinitely, while 0 polls the queue.
-func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) {
- n, err := unix.Kevent(kq, nil, events, timeout)
- if err != nil {
- return nil, err
- }
- return events[0:n], nil
-}
-
-// durationToTimespec prepares a timeout value
-func durationToTimespec(d time.Duration) unix.Timespec {
- return unix.NsecToTimespec(d.Nanoseconds())
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
deleted file mode 100644
index 36cc3845b6e..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build freebsd || openbsd || netbsd || dragonfly
-// +build freebsd openbsd netbsd dragonfly
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
deleted file mode 100644
index 98cd8476ffb..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build darwin
-// +build darwin
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-// note: this constant is not defined on BSD
-const openMode = unix.O_EVTONLY | unix.O_CLOEXEC
diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go
deleted file mode 100644
index c02b75f7c37..00000000000
--- a/vendor/github.com/fsnotify/fsnotify/windows.go
+++ /dev/null
@@ -1,562 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build windows
-// +build windows
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- isClosed bool // Set to true when Close() is first called
- mu sync.Mutex // Map access
- port syscall.Handle // Handle to completion port
- watches watchMap // Map of watches (key: i-number)
- input chan *input // Inputs to the reader are sent on this channel
- quit chan chan<- error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateIoCompletionPort", e)
- }
- w := &Watcher{
- port: port,
- watches: make(watchMap),
- input: make(chan *input, 1),
- Events: make(chan Event, 50),
- Errors: make(chan error),
- quit: make(chan chan<- error, 1),
- }
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed {
- return nil
- }
- w.isClosed = true
-
- // Send "quit" message to the reader goroutine
- ch := make(chan error)
- w.quit <- ch
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-ch
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- if w.isClosed {
- return errors.New("watcher already closed")
- }
- in := &input{
- op: opAddWatch,
- path: filepath.Clean(name),
- flags: sysFSALLEVENTS,
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- in := &input{
- op: opRemoveWatch,
- path: filepath.Clean(name),
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-const (
- // Options for AddWatch
- sysFSONESHOT = 0x80000000
- sysFSONLYDIR = 0x1000000
-
- // Events
- sysFSACCESS = 0x1
- sysFSALLEVENTS = 0xfff
- sysFSATTRIB = 0x4
- sysFSCLOSE = 0x18
- sysFSCREATE = 0x100
- sysFSDELETE = 0x200
- sysFSDELETESELF = 0x400
- sysFSMODIFY = 0x2
- sysFSMOVE = 0xc0
- sysFSMOVEDFROM = 0x40
- sysFSMOVEDTO = 0x80
- sysFSMOVESELF = 0x800
-
- // Special events
- sysFSIGNORED = 0x8000
- sysFSQOVERFLOW = 0x4000
-)
-
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO {
- e.Op |= Create
- }
- if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF {
- e.Op |= Remove
- }
- if mask&sysFSMODIFY == sysFSMODIFY {
- e.Op |= Write
- }
- if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM {
- e.Op |= Rename
- }
- if mask&sysFSATTRIB == sysFSATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-const (
- opAddWatch = iota
- opRemoveWatch
-)
-
-const (
- provisional uint64 = 1 << (32 + iota)
-)
-
-type input struct {
- op int
- path string
- flags uint32
- reply chan error
-}
-
-type inode struct {
- handle syscall.Handle
- volume uint32
- index uint64
-}
-
-type watch struct {
- ov syscall.Overlapped
- ino *inode // i-number
- path string // Directory path
- mask uint64 // Directory itself is being watched with these notify flags
- names map[string]uint64 // Map of names being watched and their notify flags
- rename string // Remembers the old name while renaming a file
- buf [4096]byte
-}
-
-type indexMap map[uint64]*watch
-type watchMap map[uint32]indexMap
-
-func (w *Watcher) wakeupReader() error {
- e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil)
- if e != nil {
- return os.NewSyscallError("PostQueuedCompletionStatus", e)
- }
- return nil
-}
-
-func getDir(pathname string) (dir string, err error) {
- attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname))
- if e != nil {
- return "", os.NewSyscallError("GetFileAttributes", e)
- }
- if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 {
- dir = pathname
- } else {
- dir, _ = filepath.Split(pathname)
- dir = filepath.Clean(dir)
- }
- return
-}
-
-func getIno(path string) (ino *inode, err error) {
- h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path),
- syscall.FILE_LIST_DIRECTORY,
- syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- nil, syscall.OPEN_EXISTING,
- syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateFile", e)
- }
- var fi syscall.ByHandleFileInformation
- if e = syscall.GetFileInformationByHandle(h, &fi); e != nil {
- syscall.CloseHandle(h)
- return nil, os.NewSyscallError("GetFileInformationByHandle", e)
- }
- ino = &inode{
- handle: h,
- volume: fi.VolumeSerialNumber,
- index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow),
- }
- return ino, nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) get(ino *inode) *watch {
- if i := m[ino.volume]; i != nil {
- return i[ino.index]
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) set(ino *inode, watch *watch) {
- i := m[ino.volume]
- if i == nil {
- i = make(indexMap)
- m[ino.volume] = i
- }
- i[ino.index] = watch
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) addWatch(pathname string, flags uint64) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- if flags&sysFSONLYDIR != 0 && pathname != dir {
- return nil
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watchEntry := w.watches.get(ino)
- w.mu.Unlock()
- if watchEntry == nil {
- if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil {
- syscall.CloseHandle(ino.handle)
- return os.NewSyscallError("CreateIoCompletionPort", e)
- }
- watchEntry = &watch{
- ino: ino,
- path: dir,
- names: make(map[string]uint64),
- }
- w.mu.Lock()
- w.watches.set(ino, watchEntry)
- w.mu.Unlock()
- flags |= provisional
- } else {
- syscall.CloseHandle(ino.handle)
- }
- if pathname == dir {
- watchEntry.mask |= flags
- } else {
- watchEntry.names[filepath.Base(pathname)] |= flags
- }
- if err = w.startRead(watchEntry); err != nil {
- return err
- }
- if pathname == dir {
- watchEntry.mask &= ^provisional
- } else {
- watchEntry.names[filepath.Base(pathname)] &= ^provisional
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) remWatch(pathname string) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watch := w.watches.get(ino)
- w.mu.Unlock()
- if watch == nil {
- return fmt.Errorf("can't remove non-existent watch for: %s", pathname)
- }
- if pathname == dir {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- watch.mask = 0
- } else {
- name := filepath.Base(pathname)
- w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- return w.startRead(watch)
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) deleteWatch(watch *watch) {
- for name, mask := range watch.names {
- if mask&provisional == 0 {
- w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED)
- }
- delete(watch.names, name)
- }
- if watch.mask != 0 {
- if watch.mask&provisional == 0 {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- }
- watch.mask = 0
- }
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) startRead(watch *watch) error {
- if e := syscall.CancelIo(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CancelIo", e)
- w.deleteWatch(watch)
- }
- mask := toWindowsFlags(watch.mask)
- for _, m := range watch.names {
- mask |= toWindowsFlags(m)
- }
- if mask == 0 {
- if e := syscall.CloseHandle(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CloseHandle", e)
- }
- w.mu.Lock()
- delete(w.watches[watch.ino.volume], watch.ino.index)
- w.mu.Unlock()
- return nil
- }
- e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
- uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)
- if e != nil {
- err := os.NewSyscallError("ReadDirectoryChanges", e)
- if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 {
- // Watched directory was probably removed
- if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- err = nil
- }
- w.deleteWatch(watch)
- w.startRead(watch)
- return err
- }
- return nil
-}
-
-// readEvents reads from the I/O completion port, converts the
-// received events into Event objects and sends them via the Events channel.
-// Entry point to the I/O thread.
-func (w *Watcher) readEvents() {
- var (
- n, key uint32
- ov *syscall.Overlapped
- )
- runtime.LockOSThread()
-
- for {
- e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE)
- watch := (*watch)(unsafe.Pointer(ov))
-
- if watch == nil {
- select {
- case ch := <-w.quit:
- w.mu.Lock()
- var indexes []indexMap
- for _, index := range w.watches {
- indexes = append(indexes, index)
- }
- w.mu.Unlock()
- for _, index := range indexes {
- for _, watch := range index {
- w.deleteWatch(watch)
- w.startRead(watch)
- }
- }
- var err error
- if e := syscall.CloseHandle(w.port); e != nil {
- err = os.NewSyscallError("CloseHandle", e)
- }
- close(w.Events)
- close(w.Errors)
- ch <- err
- return
- case in := <-w.input:
- switch in.op {
- case opAddWatch:
- in.reply <- w.addWatch(in.path, uint64(in.flags))
- case opRemoveWatch:
- in.reply <- w.remWatch(in.path)
- }
- default:
- }
- continue
- }
-
- switch e {
- case syscall.ERROR_MORE_DATA:
- if watch == nil {
- w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")
- } else {
- // The i/o succeeded but the buffer is full.
- // In theory we should be building up a full packet.
- // In practice we can get away with just carrying on.
- n = uint32(unsafe.Sizeof(watch.buf))
- }
- case syscall.ERROR_ACCESS_DENIED:
- // Watched directory was probably removed
- w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
- w.deleteWatch(watch)
- w.startRead(watch)
- continue
- case syscall.ERROR_OPERATION_ABORTED:
- // CancelIo was called on this handle
- continue
- default:
- w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e)
- continue
- case nil:
- }
-
- var offset uint32
- for {
- if n == 0 {
- w.Events <- newEvent("", sysFSQOVERFLOW)
- w.Errors <- errors.New("short read in readEvents()")
- break
- }
-
- // Point "raw" to the event in the buffer
- raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))
- name := syscall.UTF16ToString(buf[:raw.FileNameLength/2])
- fullname := filepath.Join(watch.path, name)
-
- var mask uint64
- switch raw.Action {
- case syscall.FILE_ACTION_REMOVED:
- mask = sysFSDELETESELF
- case syscall.FILE_ACTION_MODIFIED:
- mask = sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- watch.rename = name
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- if watch.names[watch.rename] != 0 {
- watch.names[name] |= watch.names[watch.rename]
- delete(watch.names, watch.rename)
- mask = sysFSMOVESELF
- }
- }
-
- sendNameEvent := func() {
- if w.sendEvent(fullname, watch.names[name]&mask) {
- if watch.names[name]&sysFSONESHOT != 0 {
- delete(watch.names, name)
- }
- }
- }
- if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME {
- sendNameEvent()
- }
- if raw.Action == syscall.FILE_ACTION_REMOVED {
- w.sendEvent(fullname, watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME {
- fullname = filepath.Join(watch.path, watch.rename)
- sendNameEvent()
- }
-
- // Move to the next event in the buffer
- if raw.NextEntryOffset == 0 {
- break
- }
- offset += raw.NextEntryOffset
-
- // Error!
- if offset >= n {
- w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.")
- break
- }
- }
-
- if err := w.startRead(watch); err != nil {
- w.Errors <- err
- }
- }
-}
-
-func (w *Watcher) sendEvent(name string, mask uint64) bool {
- if mask == 0 {
- return false
- }
- event := newEvent(name, uint32(mask))
- select {
- case ch := <-w.quit:
- w.quit <- ch
- case w.Events <- event:
- }
- return true
-}
-
-func toWindowsFlags(mask uint64) uint32 {
- var m uint32
- if mask&sysFSACCESS != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS
- }
- if mask&sysFSMODIFY != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE
- }
- if mask&sysFSATTRIB != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES
- }
- if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME
- }
- return m
-}
-
-func toFSnotifyFlags(action uint32) uint64 {
- switch action {
- case syscall.FILE_ACTION_ADDED:
- return sysFSCREATE
- case syscall.FILE_ACTION_REMOVED:
- return sysFSDELETE
- case syscall.FILE_ACTION_MODIFIED:
- return sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- return sysFSMOVEDFROM
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- return sysFSMOVEDTO
- }
- return 0
-}
diff --git a/vendor/github.com/go-chi/chi/.gitignore b/vendor/github.com/go-chi/chi/.gitignore
deleted file mode 100644
index ba22c99a99e..00000000000
--- a/vendor/github.com/go-chi/chi/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.idea
-*.sw?
-.vscode
diff --git a/vendor/github.com/go-chi/chi/.travis.yml b/vendor/github.com/go-chi/chi/.travis.yml
deleted file mode 100644
index de3287e1d8f..00000000000
--- a/vendor/github.com/go-chi/chi/.travis.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-language: go
-
-go:
- - 1.10.x
- - 1.11.x
- - 1.12.x
-
-script:
- - go get -d -t ./...
- - go vet ./...
- - go test ./...
- - >
- go_version=$(go version);
- if [ ${go_version:13:4} = "1.12" ]; then
- go get -u golang.org/x/tools/cmd/goimports;
- goimports -d -e ./ | grep '.*' && { echo; echo "Aborting due to non-empty goimports output."; exit 1; } || :;
- fi
-
diff --git a/vendor/github.com/go-chi/chi/CHANGELOG.md b/vendor/github.com/go-chi/chi/CHANGELOG.md
deleted file mode 100644
index d03e40c648a..00000000000
--- a/vendor/github.com/go-chi/chi/CHANGELOG.md
+++ /dev/null
@@ -1,139 +0,0 @@
-# Changelog
-
-## v4.0.0 (2019-01-10)
-
-- chi v4 requires Go 1.10.3+ (or Go 1.9.7+) - we have deprecated support for Go 1.7 and 1.8
-- router: respond with 404 on router with no routes (#362)
-- router: additional check to ensure wildcard is at the end of a url pattern (#333)
-- middleware: deprecate use of http.CloseNotifier (#347)
-- middleware: fix RedirectSlashes to include query params on redirect (#334)
-- History of changes: see https://github.com/go-chi/chi/compare/v3.3.4...v4.0.0
-
-
-## v3.3.4 (2019-01-07)
-
-- Minor middleware improvements. No changes to core library/router. Moving v3 into its
-- own branch as a version of chi for Go 1.7, 1.8, 1.9, 1.10, 1.11
-- History of changes: see https://github.com/go-chi/chi/compare/v3.3.3...v3.3.4
-
-
-## v3.3.3 (2018-08-27)
-
-- Minor release
-- See https://github.com/go-chi/chi/compare/v3.3.2...v3.3.3
-
-
-## v3.3.2 (2017-12-22)
-
-- Support to route trailing slashes on mounted sub-routers (#281)
-- middleware: new `ContentCharset` to check matching charsets. Thank you
- @csucu for your community contribution!
-
-
-## v3.3.1 (2017-11-20)
-
-- middleware: new `AllowContentType` handler for explicit whitelist of accepted request Content-Types
-- middleware: new `SetHeader` handler for short-hand middleware to set a response header key/value
-- Minor bug fixes
-
-
-## v3.3.0 (2017-10-10)
-
-- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method for usage
-- Deprecated LINK and UNLINK methods from the default list, please use `chi.RegisterMethod("LINK")` and `chi.RegisterMethod("UNLINK")` in an `init()` function
-
-
-## v3.2.1 (2017-08-31)
-
-- Add new `Match(rctx *Context, method, path string) bool` method to `Routes` interface
- and `Mux`. Match searches the mux's routing tree for a handler that matches the method/path
-- Add new `RouteMethod` to `*Context`
-- Add new `Routes` pointer to `*Context`
-- Add new `middleware.GetHead` to route missing HEAD requests to GET handler
-- Updated benchmarks (see README)
-
-
-## v3.1.5 (2017-08-02)
-
-- Setup golint and go vet for the project
-- As per golint, we've redefined `func ServerBaseContext(h http.Handler, baseCtx context.Context) http.Handler`
- to `func ServerBaseContext(baseCtx context.Context, h http.Handler) http.Handler`
-
-
-## v3.1.0 (2017-07-10)
-
-- Fix a few minor issues after v3 release
-- Move `docgen` sub-pkg to https://github.com/go-chi/docgen
-- Move `render` sub-pkg to https://github.com/go-chi/render
-- Add new `URLFormat` handler to chi/middleware sub-pkg to make working with url mime
- suffixes easier, ie. parsing `/articles/1.json` and `/articles/1.xml`. See comments in
- https://github.com/go-chi/chi/blob/master/middleware/url_format.go for example usage.
-
-
-## v3.0.0 (2017-06-21)
-
-- Major update to chi library with many exciting updates, but also some *breaking changes*
-- URL parameter syntax changed from `/:id` to `/{id}` for even more flexible routing, such as
- `/articles/{month}-{day}-{year}-{slug}`, `/articles/{id}`, and `/articles/{id}.{ext}` on the
- same router
-- Support for regexp for routing patterns, in the form of `/{paramKey:regExp}` for example:
- `r.Get("/articles/{name:[a-z]+}", h)` and `chi.URLParam(r, "name")`
-- Add `Method` and `MethodFunc` to `chi.Router` to allow routing definitions such as
- `r.Method("GET", "/", h)` which provides a cleaner interface for custom handlers like
- in `_examples/custom-handler`
-- Deprecating `mux#FileServer` helper function. Instead, we encourage users to create their
- own using file handler with the stdlib, see `_examples/fileserver` for an example
-- Add support for LINK/UNLINK http methods via `r.Method()` and `r.MethodFunc()`
-- Moved the chi project to its own organization, to allow chi-related community packages to
- be easily discovered and supported, at: https://github.com/go-chi
-- *NOTE:* please update your import paths to `"github.com/go-chi/chi"`
-- *NOTE:* chi v2 is still available at https://github.com/go-chi/chi/tree/v2
-
-
-## v2.1.0 (2017-03-30)
-
-- Minor improvements and update to the chi core library
-- Introduced a brand new `chi/render` sub-package to complete the story of building
- APIs to offer a pattern for managing well-defined request / response payloads. Please
- check out the updated `_examples/rest` example for how it works.
-- Added `MethodNotAllowed(h http.HandlerFunc)` to chi.Router interface
-
-
-## v2.0.0 (2017-01-06)
-
-- After many months of v2 being in an RC state with many companies and users running it in
- production, the inclusion of some improvements to the middlewares, we are very pleased to
- announce v2.0.0 of chi.
-
-
-## v2.0.0-rc1 (2016-07-26)
-
-- Huge update! chi v2 is a large refactor targetting Go 1.7+. As of Go 1.7, the popular
- community `"net/context"` package has been included in the standard library as `"context"` and
- utilized by `"net/http"` and `http.Request` to managing deadlines, cancelation signals and other
- request-scoped values. We're very excited about the new context addition and are proud to
- introduce chi v2, a minimal and powerful routing package for building large HTTP services,
- with zero external dependencies. Chi focuses on idiomatic design and encourages the use of
- stdlib HTTP handlers and middlwares.
-- chi v2 deprecates its `chi.Handler` interface and requires `http.Handler` or `http.HandlerFunc`
-- chi v2 stores URL routing parameters and patterns in the standard request context: `r.Context()`
-- chi v2 lower-level routing context is accessible by `chi.RouteContext(r.Context()) *chi.Context`,
- which provides direct access to URL routing parameters, the routing path and the matching
- routing patterns.
-- Users upgrading from chi v1 to v2, need to:
- 1. Update the old chi.Handler signature, `func(ctx context.Context, w http.ResponseWriter, r *http.Request)` to
- the standard http.Handler: `func(w http.ResponseWriter, r *http.Request)`
- 2. Use `chi.URLParam(r *http.Request, paramKey string) string`
- or `URLParamFromCtx(ctx context.Context, paramKey string) string` to access a url parameter value
-
-
-## v1.0.0 (2016-07-01)
-
-- Released chi v1 stable https://github.com/go-chi/chi/tree/v1.0.0 for Go 1.6 and older.
-
-
-## v0.9.0 (2016-03-31)
-
-- Reuse context objects via sync.Pool for zero-allocation routing [#33](https://github.com/go-chi/chi/pull/33)
-- BREAKING NOTE: due to subtle API changes, previously `chi.URLParams(ctx)["id"]` used to access url parameters
- has changed to: `chi.URLParam(ctx, "id")`
diff --git a/vendor/github.com/go-chi/chi/CONTRIBUTING.md b/vendor/github.com/go-chi/chi/CONTRIBUTING.md
deleted file mode 100644
index c0ac2dfe853..00000000000
--- a/vendor/github.com/go-chi/chi/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing
-
-## Prerequisites
-
-1. [Install Go][go-install].
-2. Download the sources and switch the working directory:
-
- ```bash
- go get -u -d github.com/go-chi/chi
- cd $GOPATH/src/github.com/go-chi/chi
- ```
-
-## Submitting a Pull Request
-
-A typical workflow is:
-
-1. [Fork the repository.][fork] [This tip maybe also helpful.][go-fork-tip]
-2. [Create a topic branch.][branch]
-3. Add tests for your change.
-4. Run `go test`. If your tests pass, return to the step 3.
-5. Implement the change and ensure the steps from the previous step pass.
-6. Run `goimports -w .`, to ensure the new code conforms to Go formatting guideline.
-7. [Add, commit and push your changes.][git-help]
-8. [Submit a pull request.][pull-req]
-
-[go-install]: https://golang.org/doc/install
-[go-fork-tip]: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
-[fork]: https://help.github.com/articles/fork-a-repo
-[branch]: http://learn.github.com/p/branching.html
-[git-help]: https://guides.github.com
-[pull-req]: https://help.github.com/articles/using-pull-requests
diff --git a/vendor/github.com/go-chi/chi/LICENSE b/vendor/github.com/go-chi/chi/LICENSE
deleted file mode 100644
index d99f02ffac5..00000000000
--- a/vendor/github.com/go-chi/chi/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015-present Peter Kieltyka (https://github.com/pkieltyka), Google Inc.
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/go-chi/chi/README.md b/vendor/github.com/go-chi/chi/README.md
deleted file mode 100644
index d36d4db53a0..00000000000
--- a/vendor/github.com/go-chi/chi/README.md
+++ /dev/null
@@ -1,438 +0,0 @@
-#
-
-
-[![GoDoc Widget]][GoDoc] [![Travis Widget]][Travis]
-
-`chi` is a lightweight, idiomatic and composable router for building Go HTTP services. It's
-especially good at helping you write large REST API services that are kept maintainable as your
-project grows and changes. `chi` is built on the new `context` package introduced in Go 1.7 to
-handle signaling, cancelation and request-scoped values across a handler chain.
-
-The focus of the project has been to seek out an elegant and comfortable design for writing
-REST API servers, written during the development of the Pressly API service that powers our
-public API service, which in turn powers all of our client-side applications.
-
-The key considerations of chi's design are: project structure, maintainability, standard http
-handlers (stdlib-only), developer productivity, and deconstructing a large system into many small
-parts. The core router `github.com/go-chi/chi` is quite small (less than 1000 LOC), but we've also
-included some useful/optional subpackages: [middleware](/middleware), [render](https://github.com/go-chi/render) and [docgen](https://github.com/go-chi/docgen). We hope you enjoy it too!
-
-## Install
-
-`go get -u github.com/go-chi/chi`
-
-
-## Features
-
-* **Lightweight** - cloc'd in ~1000 LOC for the chi router
-* **Fast** - yes, see [benchmarks](#benchmarks)
-* **100% compatible with net/http** - use any http or middleware pkg in the ecosystem that is also compatible with `net/http`
-* **Designed for modular/composable APIs** - middlewares, inline middlewares, route groups and subrouter mounting
-* **Context control** - built on new `context` package, providing value chaining, cancelations and timeouts
-* **Robust** - in production at Pressly, CloudFlare, Heroku, 99Designs, and many others (see [discussion](https://github.com/go-chi/chi/issues/91))
-* **Doc generation** - `docgen` auto-generates routing documentation from your source to JSON or Markdown
-* **No external dependencies** - plain ol' Go stdlib + net/http
-
-
-## Examples
-
-See [_examples/](https://github.com/go-chi/chi/blob/master/_examples/) for a variety of examples.
-
-
-**As easy as:**
-
-```go
-package main
-
-import (
- "net/http"
- "github.com/go-chi/chi"
-)
-
-func main() {
- r := chi.NewRouter()
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("welcome"))
- })
- http.ListenAndServe(":3000", r)
-}
-```
-
-**REST Preview:**
-
-Here is a little preview of how routing looks like with chi. Also take a look at the generated routing docs
-in JSON ([routes.json](https://github.com/go-chi/chi/blob/master/_examples/rest/routes.json)) and in
-Markdown ([routes.md](https://github.com/go-chi/chi/blob/master/_examples/rest/routes.md)).
-
-I highly recommend reading the source of the [examples](https://github.com/go-chi/chi/blob/master/_examples/) listed
-above, they will show you all the features of chi and serve as a good form of documentation.
-
-```go
-import (
- //...
- "context"
- "github.com/go-chi/chi"
- "github.com/go-chi/chi/middleware"
-)
-
-func main() {
- r := chi.NewRouter()
-
- // A good base middleware stack
- r.Use(middleware.RequestID)
- r.Use(middleware.RealIP)
- r.Use(middleware.Logger)
- r.Use(middleware.Recoverer)
-
- // Set a timeout value on the request context (ctx), that will signal
- // through ctx.Done() that the request has timed out and further
- // processing should be stopped.
- r.Use(middleware.Timeout(60 * time.Second))
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("hi"))
- })
-
- // RESTy routes for "articles" resource
- r.Route("/articles", func(r chi.Router) {
- r.With(paginate).Get("/", listArticles) // GET /articles
- r.With(paginate).Get("/{month}-{day}-{year}", listArticlesByDate) // GET /articles/01-16-2017
-
- r.Post("/", createArticle) // POST /articles
- r.Get("/search", searchArticles) // GET /articles/search
-
- // Regexp url parameters:
- r.Get("/{articleSlug:[a-z-]+}", getArticleBySlug) // GET /articles/home-is-toronto
-
- // Subrouters:
- r.Route("/{articleID}", func(r chi.Router) {
- r.Use(ArticleCtx)
- r.Get("/", getArticle) // GET /articles/123
- r.Put("/", updateArticle) // PUT /articles/123
- r.Delete("/", deleteArticle) // DELETE /articles/123
- })
- })
-
- // Mount the admin sub-router
- r.Mount("/admin", adminRouter())
-
- http.ListenAndServe(":3333", r)
-}
-
-func ArticleCtx(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- articleID := chi.URLParam(r, "articleID")
- article, err := dbGetArticle(articleID)
- if err != nil {
- http.Error(w, http.StatusText(404), 404)
- return
- }
- ctx := context.WithValue(r.Context(), "article", article)
- next.ServeHTTP(w, r.WithContext(ctx))
- })
-}
-
-func getArticle(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- article, ok := ctx.Value("article").(*Article)
- if !ok {
- http.Error(w, http.StatusText(422), 422)
- return
- }
- w.Write([]byte(fmt.Sprintf("title:%s", article.Title)))
-}
-
-// A completely separate router for administrator routes
-func adminRouter() http.Handler {
- r := chi.NewRouter()
- r.Use(AdminOnly)
- r.Get("/", adminIndex)
- r.Get("/accounts", adminListAccounts)
- return r
-}
-
-func AdminOnly(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- perm, ok := ctx.Value("acl.permission").(YourPermissionType)
- if !ok || !perm.IsAdmin() {
- http.Error(w, http.StatusText(403), 403)
- return
- }
- next.ServeHTTP(w, r)
- })
-}
-```
-
-
-## Router design
-
-chi's router is based on a kind of [Patricia Radix trie](https://en.wikipedia.org/wiki/Radix_tree).
-The router is fully compatible with `net/http`.
-
-Built on top of the tree is the `Router` interface:
-
-```go
-// Router consisting of the core routing methods used by chi's Mux,
-// using only the standard net/http.
-type Router interface {
- http.Handler
- Routes
-
- // Use appends one of more middlewares onto the Router stack.
- Use(middlewares ...func(http.Handler) http.Handler)
-
- // With adds inline middlewares for an endpoint handler.
- With(middlewares ...func(http.Handler) http.Handler) Router
-
- // Group adds a new inline-Router along the current routing
- // path, with a fresh middleware stack for the inline-Router.
- Group(fn func(r Router)) Router
-
- // Route mounts a sub-Router along a `pattern`` string.
- Route(pattern string, fn func(r Router)) Router
-
- // Mount attaches another http.Handler along ./pattern/*
- Mount(pattern string, h http.Handler)
-
- // Handle and HandleFunc adds routes for `pattern` that matches
- // all HTTP methods.
- Handle(pattern string, h http.Handler)
- HandleFunc(pattern string, h http.HandlerFunc)
-
- // Method and MethodFunc adds routes for `pattern` that matches
- // the `method` HTTP method.
- Method(method, pattern string, h http.Handler)
- MethodFunc(method, pattern string, h http.HandlerFunc)
-
- // HTTP-method routing along `pattern`
- Connect(pattern string, h http.HandlerFunc)
- Delete(pattern string, h http.HandlerFunc)
- Get(pattern string, h http.HandlerFunc)
- Head(pattern string, h http.HandlerFunc)
- Options(pattern string, h http.HandlerFunc)
- Patch(pattern string, h http.HandlerFunc)
- Post(pattern string, h http.HandlerFunc)
- Put(pattern string, h http.HandlerFunc)
- Trace(pattern string, h http.HandlerFunc)
-
- // NotFound defines a handler to respond whenever a route could
- // not be found.
- NotFound(h http.HandlerFunc)
-
- // MethodNotAllowed defines a handler to respond whenever a method is
- // not allowed.
- MethodNotAllowed(h http.HandlerFunc)
-}
-
-// Routes interface adds two methods for router traversal, which is also
-// used by the github.com/go-chi/docgen package to generate documentation for Routers.
-type Routes interface {
- // Routes returns the routing tree in an easily traversable structure.
- Routes() []Route
-
- // Middlewares returns the list of middlewares in use by the router.
- Middlewares() Middlewares
-
- // Match searches the routing tree for a handler that matches
- // the method/path - similar to routing a http request, but without
- // executing the handler thereafter.
- Match(rctx *Context, method, path string) bool
-}
-```
-
-Each routing method accepts a URL `pattern` and chain of `handlers`. The URL pattern
-supports named params (ie. `/users/{userID}`) and wildcards (ie. `/admin/*`). URL parameters
-can be fetched at runtime by calling `chi.URLParam(r, "userID")` for named parameters
-and `chi.URLParam(r, "*")` for a wildcard parameter.
-
-
-### Middleware handlers
-
-chi's middlewares are just stdlib net/http middleware handlers. There is nothing special
-about them, which means the router and all the tooling is designed to be compatible and
-friendly with any middleware in the community. This offers much better extensibility and reuse
-of packages and is at the heart of chi's purpose.
-
-Here is an example of a standard net/http middleware handler using the new request context
-available in Go. This middleware sets a hypothetical user identifier on the request
-context and calls the next handler in the chain.
-
-```go
-// HTTP middleware setting a value on the request context
-func MyMiddleware(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx := context.WithValue(r.Context(), "user", "123")
- next.ServeHTTP(w, r.WithContext(ctx))
- })
-}
-```
-
-
-### Request handlers
-
-chi uses standard net/http request handlers. This little snippet is an example of a http.Handler
-func that reads a user identifier from the request context - hypothetically, identifying
-the user sending an authenticated request, validated+set by a previous middleware handler.
-
-```go
-// HTTP handler accessing data from the request context.
-func MyRequestHandler(w http.ResponseWriter, r *http.Request) {
- user := r.Context().Value("user").(string)
- w.Write([]byte(fmt.Sprintf("hi %s", user)))
-}
-```
-
-
-### URL parameters
-
-chi's router parses and stores URL parameters right onto the request context. Here is
-an example of how to access URL params in your net/http handlers. And of course, middlewares
-are able to access the same information.
-
-```go
-// HTTP handler accessing the url routing parameters.
-func MyRequestHandler(w http.ResponseWriter, r *http.Request) {
- userID := chi.URLParam(r, "userID") // from a route like /users/{userID}
-
- ctx := r.Context()
- key := ctx.Value("key").(string)
-
- w.Write([]byte(fmt.Sprintf("hi %v, %v", userID, key)))
-}
-```
-
-
-## Middlewares
-
-chi comes equipped with an optional `middleware` package, providing a suite of standard
-`net/http` middlewares. Please note, any middleware in the ecosystem that is also compatible
-with `net/http` can be used with chi's mux.
-
-### Core middlewares
-
------------------------------------------------------------------------------------------------------------
-| chi/middleware Handler | description |
-|:----------------------|:---------------------------------------------------------------------------------
-| AllowContentType | Explicit whitelist of accepted request Content-Types |
-| Compress | Gzip compression for clients that accept compressed responses |
-| GetHead | Automatically route undefined HEAD requests to GET handlers |
-| Heartbeat | Monitoring endpoint to check the servers pulse |
-| Logger | Logs the start and end of each request with the elapsed processing time |
-| NoCache | Sets response headers to prevent clients from caching |
-| Profiler | Easily attach net/http/pprof to your routers |
-| RealIP | Sets a http.Request's RemoteAddr to either X-Forwarded-For or X-Real-IP |
-| Recoverer | Gracefully absorb panics and prints the stack trace |
-| RequestID | Injects a request ID into the context of each request |
-| RedirectSlashes | Redirect slashes on routing paths |
-| SetHeader | Short-hand middleware to set a response header key/value |
-| StripSlashes | Strip slashes on routing paths |
-| Throttle | Puts a ceiling on the number of concurrent requests |
-| Timeout | Signals to the request context when the timeout deadline is reached |
-| URLFormat | Parse extension from url and put it on request context |
-| WithValue | Short-hand middleware to set a key/value on the request context |
------------------------------------------------------------------------------------------------------------
-
-### Auxiliary middlewares & packages
-
-Please see https://github.com/go-chi for additional packages.
-
---------------------------------------------------------------------------------------------------------------------
-| package | description |
-|:---------------------------------------------------|:-------------------------------------------------------------
-| [cors](https://github.com/go-chi/cors) | Cross-origin resource sharing (CORS) |
-| [docgen](https://github.com/go-chi/docgen) | Print chi.Router routes at runtime |
-| [jwtauth](https://github.com/go-chi/jwtauth) | JWT authentication |
-| [hostrouter](https://github.com/go-chi/hostrouter) | Domain/host based request routing |
-| [httpcoala](https://github.com/go-chi/httpcoala) | HTTP request coalescer |
-| [chi-authz](https://github.com/casbin/chi-authz) | Request ACL via https://github.com/hsluoyz/casbin |
-| [phi](https://github.com/fate-lovely/phi) | Port chi to [fasthttp](https://github.com/valyala/fasthttp) |
---------------------------------------------------------------------------------------------------------------------
-
-please [submit a PR](./CONTRIBUTING.md) if you'd like to include a link to a chi-compatible middleware
-
-
-## context?
-
-`context` is a tiny pkg that provides simple interface to signal context across call stacks
-and goroutines. It was originally written by [Sameer Ajmani](https://github.com/Sajmani)
-and is available in stdlib since go1.7.
-
-Learn more at https://blog.golang.org/context
-
-and..
-* Docs: https://golang.org/pkg/context
-* Source: https://github.com/golang/go/tree/master/src/context
-
-
-## Benchmarks
-
-The benchmark suite: https://github.com/pkieltyka/go-http-routing-benchmark
-
-Results as of Jan 9, 2019 with Go 1.11.4 on Linux X1 Carbon laptop
-
-```shell
-BenchmarkChi_Param 3000000 475 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_Param5 2000000 696 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_Param20 1000000 1275 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_ParamWrite 3000000 505 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GithubStatic 3000000 508 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GithubParam 2000000 669 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GithubAll 10000 134627 ns/op 87699 B/op 609 allocs/op
-BenchmarkChi_GPlusStatic 3000000 402 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GPlusParam 3000000 500 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GPlus2Params 3000000 586 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_GPlusAll 200000 7237 ns/op 5616 B/op 39 allocs/op
-BenchmarkChi_ParseStatic 3000000 408 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_ParseParam 3000000 488 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_Parse2Params 3000000 551 ns/op 432 B/op 3 allocs/op
-BenchmarkChi_ParseAll 100000 13508 ns/op 11232 B/op 78 allocs/op
-BenchmarkChi_StaticAll 20000 81933 ns/op 67826 B/op 471 allocs/op
-```
-
-Comparison with other routers: https://gist.github.com/pkieltyka/123032f12052520aaccab752bd3e78cc
-
-NOTE: the allocs in the benchmark above are from the calls to http.Request's
-`WithContext(context.Context)` method that clones the http.Request, sets the `Context()`
-on the duplicated (alloc'd) request and returns it the new request object. This is just
-how setting context on a request in Go works.
-
-
-## Credits
-
-* Carl Jackson for https://github.com/zenazn/goji
- * Parts of chi's thinking comes from goji, and chi's middleware package
- sources from goji.
-* Armon Dadgar for https://github.com/armon/go-radix
-* Contributions: [@VojtechVitek](https://github.com/VojtechVitek)
-
-We'll be more than happy to see [your contributions](./CONTRIBUTING.md)!
-
-
-## Beyond REST
-
-chi is just a http router that lets you decompose request handling into many smaller layers.
-Many companies including Pressly.com (of course) use chi to write REST services for their public
-APIs. But, REST is just a convention for managing state via HTTP, and there's a lot of other pieces
-required to write a complete client-server system or network of microservices.
-
-Looking ahead beyond REST, I also recommend some newer works in the field coming from
-[gRPC](https://github.com/grpc/grpc-go), [NATS](https://nats.io), [go-kit](https://github.com/go-kit/kit)
-and even [graphql](https://github.com/graphql-go/graphql). They're all pretty cool with their
-own unique approaches and benefits. Specifically, I'd look at gRPC since it makes client-server
-communication feel like a single program on a single computer, no need to hand-write a client library
-and the request/response payloads are typed contracts. NATS is pretty amazing too as a super
-fast and lightweight pub-sub transport that can speak protobufs, with nice service discovery -
-an excellent combination with gRPC.
-
-
-## License
-
-Copyright (c) 2015-present [Peter Kieltyka](https://github.com/pkieltyka)
-
-Licensed under [MIT License](./LICENSE)
-
-[GoDoc]: https://godoc.org/github.com/go-chi/chi
-[GoDoc Widget]: https://godoc.org/github.com/go-chi/chi?status.svg
-[Travis]: https://travis-ci.org/go-chi/chi
-[Travis Widget]: https://travis-ci.org/go-chi/chi.svg?branch=master
diff --git a/vendor/github.com/go-chi/chi/chain.go b/vendor/github.com/go-chi/chi/chain.go
deleted file mode 100644
index 88e68461386..00000000000
--- a/vendor/github.com/go-chi/chi/chain.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package chi
-
-import "net/http"
-
-// Chain returns a Middlewares type from a slice of middleware handlers.
-func Chain(middlewares ...func(http.Handler) http.Handler) Middlewares {
- return Middlewares(middlewares)
-}
-
-// Handler builds and returns a http.Handler from the chain of middlewares,
-// with `h http.Handler` as the final handler.
-func (mws Middlewares) Handler(h http.Handler) http.Handler {
- return &ChainHandler{mws, h, chain(mws, h)}
-}
-
-// HandlerFunc builds and returns a http.Handler from the chain of middlewares,
-// with `h http.Handler` as the final handler.
-func (mws Middlewares) HandlerFunc(h http.HandlerFunc) http.Handler {
- return &ChainHandler{mws, h, chain(mws, h)}
-}
-
-// ChainHandler is a http.Handler with support for handler composition and
-// execution.
-type ChainHandler struct {
- Middlewares Middlewares
- Endpoint http.Handler
- chain http.Handler
-}
-
-func (c *ChainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- c.chain.ServeHTTP(w, r)
-}
-
-// chain builds a http.Handler composed of an inline middleware stack and endpoint
-// handler in the order they are passed.
-func chain(middlewares []func(http.Handler) http.Handler, endpoint http.Handler) http.Handler {
- // Return ahead of time if there aren't any middlewares for the chain
- if len(middlewares) == 0 {
- return endpoint
- }
-
- // Wrap the end handler with the middleware chain
- h := middlewares[len(middlewares)-1](endpoint)
- for i := len(middlewares) - 2; i >= 0; i-- {
- h = middlewares[i](h)
- }
-
- return h
-}
diff --git a/vendor/github.com/go-chi/chi/chi.go b/vendor/github.com/go-chi/chi/chi.go
deleted file mode 100644
index 9962229d0fd..00000000000
--- a/vendor/github.com/go-chi/chi/chi.go
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// Package chi is a small, idiomatic and composable router for building HTTP services.
-//
-// chi requires Go 1.7 or newer.
-//
-// Example:
-// package main
-//
-// import (
-// "net/http"
-//
-// "github.com/go-chi/chi"
-// "github.com/go-chi/chi/middleware"
-// )
-//
-// func main() {
-// r := chi.NewRouter()
-// r.Use(middleware.Logger)
-// r.Use(middleware.Recoverer)
-//
-// r.Get("/", func(w http.ResponseWriter, r *http.Request) {
-// w.Write([]byte("root."))
-// })
-//
-// http.ListenAndServe(":3333", r)
-// }
-//
-// See github.com/go-chi/chi/_examples/ for more in-depth examples.
-//
-// URL patterns allow for easy matching of path components in HTTP
-// requests. The matching components can then be accessed using
-// chi.URLParam(). All patterns must begin with a slash.
-//
-// A simple named placeholder {name} matches any sequence of characters
-// up to the next / or the end of the URL. Trailing slashes on paths must
-// be handled explicitly.
-//
-// A placeholder with a name followed by a colon allows a regular
-// expression match, for example {number:\\d+}. The regular expression
-// syntax is Go's normal regexp RE2 syntax, except that regular expressions
-// including { or } are not supported, and / will never be
-// matched. An anonymous regexp pattern is allowed, using an empty string
-// before the colon in the placeholder, such as {:\\d+}
-//
-// The special placeholder of asterisk matches the rest of the requested
-// URL. Any trailing characters in the pattern are ignored. This is the only
-// placeholder which will match / characters.
-//
-// Examples:
-// "/user/{name}" matches "/user/jsmith" but not "/user/jsmith/info" or "/user/jsmith/"
-// "/user/{name}/info" matches "/user/jsmith/info"
-// "/page/*" matches "/page/intro/latest"
-// "/page/*/index" also matches "/page/intro/latest"
-// "/date/{yyyy:\\d\\d\\d\\d}/{mm:\\d\\d}/{dd:\\d\\d}" matches "/date/2017/04/01"
-//
-package chi
-
-import "net/http"
-
-// NewRouter returns a new Mux object that implements the Router interface.
-func NewRouter() *Mux {
- return NewMux()
-}
-
-// Router consisting of the core routing methods used by chi's Mux,
-// using only the standard net/http.
-type Router interface {
- http.Handler
- Routes
-
- // Use appends one of more middlewares onto the Router stack.
- Use(middlewares ...func(http.Handler) http.Handler)
-
- // With adds inline middlewares for an endpoint handler.
- With(middlewares ...func(http.Handler) http.Handler) Router
-
- // Group adds a new inline-Router along the current routing
- // path, with a fresh middleware stack for the inline-Router.
- Group(fn func(r Router)) Router
-
- // Route mounts a sub-Router along a `pattern`` string.
- Route(pattern string, fn func(r Router)) Router
-
- // Mount attaches another http.Handler along ./pattern/*
- Mount(pattern string, h http.Handler)
-
- // Handle and HandleFunc adds routes for `pattern` that matches
- // all HTTP methods.
- Handle(pattern string, h http.Handler)
- HandleFunc(pattern string, h http.HandlerFunc)
-
- // Method and MethodFunc adds routes for `pattern` that matches
- // the `method` HTTP method.
- Method(method, pattern string, h http.Handler)
- MethodFunc(method, pattern string, h http.HandlerFunc)
-
- // HTTP-method routing along `pattern`
- Connect(pattern string, h http.HandlerFunc)
- Delete(pattern string, h http.HandlerFunc)
- Get(pattern string, h http.HandlerFunc)
- Head(pattern string, h http.HandlerFunc)
- Options(pattern string, h http.HandlerFunc)
- Patch(pattern string, h http.HandlerFunc)
- Post(pattern string, h http.HandlerFunc)
- Put(pattern string, h http.HandlerFunc)
- Trace(pattern string, h http.HandlerFunc)
-
- // NotFound defines a handler to respond whenever a route could
- // not be found.
- NotFound(h http.HandlerFunc)
-
- // MethodNotAllowed defines a handler to respond whenever a method is
- // not allowed.
- MethodNotAllowed(h http.HandlerFunc)
-}
-
-// Routes interface adds two methods for router traversal, which is also
-// used by the `docgen` subpackage to generation documentation for Routers.
-type Routes interface {
- // Routes returns the routing tree in an easily traversable structure.
- Routes() []Route
-
- // Middlewares returns the list of middlewares in use by the router.
- Middlewares() Middlewares
-
- // Match searches the routing tree for a handler that matches
- // the method/path - similar to routing a http request, but without
- // executing the handler thereafter.
- Match(rctx *Context, method, path string) bool
-}
-
-// Middlewares type is a slice of standard middleware handlers with methods
-// to compose middleware chains and http.Handler's.
-type Middlewares []func(http.Handler) http.Handler
diff --git a/vendor/github.com/go-chi/chi/context.go b/vendor/github.com/go-chi/chi/context.go
deleted file mode 100644
index 229c9cbfb0a..00000000000
--- a/vendor/github.com/go-chi/chi/context.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package chi
-
-import (
- "context"
- "net"
- "net/http"
- "strings"
-)
-
-var (
- // RouteCtxKey is the context.Context key to store the request context.
- RouteCtxKey = &contextKey{"RouteContext"}
-)
-
-// Context is the default routing context set on the root node of a
-// request context to track route patterns, URL parameters and
-// an optional routing path.
-type Context struct {
- Routes Routes
-
- // Routing path/method override used during the route search.
- // See Mux#routeHTTP method.
- RoutePath string
- RouteMethod string
-
- // Routing pattern stack throughout the lifecycle of the request,
- // across all connected routers. It is a record of all matching
- // patterns across a stack of sub-routers.
- RoutePatterns []string
-
- // URLParams are the stack of routeParams captured during the
- // routing lifecycle across a stack of sub-routers.
- URLParams RouteParams
-
- // The endpoint routing pattern that matched the request URI path
- // or `RoutePath` of the current sub-router. This value will update
- // during the lifecycle of a request passing through a stack of
- // sub-routers.
- routePattern string
-
- // Route parameters matched for the current sub-router. It is
- // intentionally unexported so it cant be tampered.
- routeParams RouteParams
-
- // methodNotAllowed hint
- methodNotAllowed bool
-}
-
-// NewRouteContext returns a new routing Context object.
-func NewRouteContext() *Context {
- return &Context{}
-}
-
-// Reset a routing context to its initial state.
-func (x *Context) Reset() {
- x.Routes = nil
- x.RoutePath = ""
- x.RouteMethod = ""
- x.RoutePatterns = x.RoutePatterns[:0]
- x.URLParams.Keys = x.URLParams.Keys[:0]
- x.URLParams.Values = x.URLParams.Values[:0]
-
- x.routePattern = ""
- x.routeParams.Keys = x.routeParams.Keys[:0]
- x.routeParams.Values = x.routeParams.Values[:0]
- x.methodNotAllowed = false
-}
-
-// URLParam returns the corresponding URL parameter value from the request
-// routing context.
-func (x *Context) URLParam(key string) string {
- for k := len(x.URLParams.Keys) - 1; k >= 0; k-- {
- if x.URLParams.Keys[k] == key {
- return x.URLParams.Values[k]
- }
- }
- return ""
-}
-
-// RoutePattern builds the routing pattern string for the particular
-// request, at the particular point during routing. This means, the value
-// will change throughout the execution of a request in a router. That is
-// why its advised to only use this value after calling the next handler.
-//
-// For example,
-//
-// func Instrument(next http.Handler) http.Handler {
-// return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-// next.ServeHTTP(w, r)
-// routePattern := chi.RouteContext(r.Context()).RoutePattern()
-// measure(w, r, routePattern)
-// })
-// }
-func (x *Context) RoutePattern() string {
- routePattern := strings.Join(x.RoutePatterns, "")
- return strings.Replace(routePattern, "/*/", "/", -1)
-}
-
-// RouteContext returns chi's routing Context object from a
-// http.Request Context.
-func RouteContext(ctx context.Context) *Context {
- return ctx.Value(RouteCtxKey).(*Context)
-}
-
-// URLParam returns the url parameter from a http.Request object.
-func URLParam(r *http.Request, key string) string {
- if rctx := RouteContext(r.Context()); rctx != nil {
- return rctx.URLParam(key)
- }
- return ""
-}
-
-// URLParamFromCtx returns the url parameter from a http.Request Context.
-func URLParamFromCtx(ctx context.Context, key string) string {
- if rctx := RouteContext(ctx); rctx != nil {
- return rctx.URLParam(key)
- }
- return ""
-}
-
-// RouteParams is a structure to track URL routing parameters efficiently.
-type RouteParams struct {
- Keys, Values []string
-}
-
-// Add will append a URL parameter to the end of the route param
-func (s *RouteParams) Add(key, value string) {
- (*s).Keys = append((*s).Keys, key)
- (*s).Values = append((*s).Values, value)
-}
-
-// ServerBaseContext wraps an http.Handler to set the request context to the
-// `baseCtx`.
-func ServerBaseContext(baseCtx context.Context, h http.Handler) http.Handler {
- fn := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- baseCtx := baseCtx
-
- // Copy over default net/http server context keys
- if v, ok := ctx.Value(http.ServerContextKey).(*http.Server); ok {
- baseCtx = context.WithValue(baseCtx, http.ServerContextKey, v)
- }
- if v, ok := ctx.Value(http.LocalAddrContextKey).(net.Addr); ok {
- baseCtx = context.WithValue(baseCtx, http.LocalAddrContextKey, v)
- }
-
- h.ServeHTTP(w, r.WithContext(baseCtx))
- })
- return fn
-}
-
-// contextKey is a value for use with context.WithValue. It's used as
-// a pointer so it fits in an interface{} without allocation. This technique
-// for defining context keys was copied from Go 1.7's new use of context in net/http.
-type contextKey struct {
- name string
-}
-
-func (k *contextKey) String() string {
- return "chi context value " + k.name
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/compress.go b/vendor/github.com/go-chi/chi/middleware/compress.go
deleted file mode 100644
index d2876d4e79b..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/compress.go
+++ /dev/null
@@ -1,275 +0,0 @@
-package middleware
-
-import (
- "bufio"
- "compress/flate"
- "compress/gzip"
- "errors"
- "io"
- "net"
- "net/http"
- "strings"
-)
-
-var encoders = map[string]EncoderFunc{}
-
-var encodingPrecedence = []string{"br", "gzip", "deflate"}
-
-func init() {
- // TODO:
- // lzma: Opera.
- // sdch: Chrome, Android. Gzip output + dictionary header.
- // br: Brotli, see https://github.com/go-chi/chi/pull/326
-
- // TODO: Exception for old MSIE browsers that can't handle non-HTML?
- // https://zoompf.com/blog/2012/02/lose-the-wait-http-compression
- SetEncoder("gzip", encoderGzip)
-
- // HTTP 1.1 "deflate" (RFC 2616) stands for DEFLATE data (RFC 1951)
- // wrapped with zlib (RFC 1950). The zlib wrapper uses Adler-32
- // checksum compared to CRC-32 used in "gzip" and thus is faster.
- //
- // But.. some old browsers (MSIE, Safari 5.1) incorrectly expect
- // raw DEFLATE data only, without the mentioned zlib wrapper.
- // Because of this major confusion, most modern browsers try it
- // both ways, first looking for zlib headers.
- // Quote by Mark Adler: http://stackoverflow.com/a/9186091/385548
- //
- // The list of browsers having problems is quite big, see:
- // http://zoompf.com/blog/2012/02/lose-the-wait-http-compression
- // https://web.archive.org/web/20120321182910/http://www.vervestudios.co/projects/compression-tests/results
- //
- // That's why we prefer gzip over deflate. It's just more reliable
- // and not significantly slower than gzip.
- SetEncoder("deflate", encoderDeflate)
-
- // NOTE: Not implemented, intentionally:
- // case "compress": // LZW. Deprecated.
- // case "bzip2": // Too slow on-the-fly.
- // case "zopfli": // Too slow on-the-fly.
- // case "xz": // Too slow on-the-fly.
-}
-
-// An EncoderFunc is a function that wraps the provided ResponseWriter with a
-// streaming compression algorithm and returns it.
-//
-// In case of failure, the function should return nil.
-type EncoderFunc func(w http.ResponseWriter, level int) io.Writer
-
-// SetEncoder can be used to set the implementation of a compression algorithm.
-//
-// The encoding should be a standardised identifier. See:
-// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
-//
-// For example, add the Brotli algortithm:
-//
-// import brotli_enc "gopkg.in/kothar/brotli-go.v0/enc"
-//
-// middleware.SetEncoder("br", func(w http.ResponseWriter, level int) io.Writer {
-// params := brotli_enc.NewBrotliParams()
-// params.SetQuality(level)
-// return brotli_enc.NewBrotliWriter(params, w)
-// })
-func SetEncoder(encoding string, fn EncoderFunc) {
- encoding = strings.ToLower(encoding)
- if encoding == "" {
- panic("the encoding can not be empty")
- }
- if fn == nil {
- panic("attempted to set a nil encoder function")
- }
- encoders[encoding] = fn
-
- var e string
- for _, v := range encodingPrecedence {
- if v == encoding {
- e = v
- }
- }
-
- if e == "" {
- encodingPrecedence = append([]string{e}, encodingPrecedence...)
- }
-}
-
-var defaultContentTypes = map[string]struct{}{
- "text/html": {},
- "text/css": {},
- "text/plain": {},
- "text/javascript": {},
- "application/javascript": {},
- "application/x-javascript": {},
- "application/json": {},
- "application/atom+xml": {},
- "application/rss+xml": {},
- "image/svg+xml": {},
-}
-
-// DefaultCompress is a middleware that compresses response
-// body of predefined content types to a data format based
-// on Accept-Encoding request header. It uses a default
-// compression level.
-func DefaultCompress(next http.Handler) http.Handler {
- return Compress(flate.DefaultCompression)(next)
-}
-
-// Compress is a middleware that compresses response
-// body of a given content types to a data format based
-// on Accept-Encoding request header. It uses a given
-// compression level.
-//
-// NOTE: make sure to set the Content-Type header on your response
-// otherwise this middleware will not compress the response body. For ex, in
-// your handler you should set w.Header().Set("Content-Type", http.DetectContentType(yourBody))
-// or set it manually.
-func Compress(level int, types ...string) func(next http.Handler) http.Handler {
- contentTypes := defaultContentTypes
- if len(types) > 0 {
- contentTypes = make(map[string]struct{}, len(types))
- for _, t := range types {
- contentTypes[t] = struct{}{}
- }
- }
-
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- encoder, encoding := selectEncoder(r.Header)
-
- cw := &compressResponseWriter{
- ResponseWriter: w,
- w: w,
- contentTypes: contentTypes,
- encoder: encoder,
- encoding: encoding,
- level: level,
- }
- defer cw.Close()
-
- next.ServeHTTP(cw, r)
- }
-
- return http.HandlerFunc(fn)
- }
-}
-
-func selectEncoder(h http.Header) (EncoderFunc, string) {
- header := h.Get("Accept-Encoding")
-
- // Parse the names of all accepted algorithms from the header.
- accepted := strings.Split(strings.ToLower(header), ",")
-
- // Find supported encoder by accepted list by precedence
- for _, name := range encodingPrecedence {
- if fn, ok := encoders[name]; ok && matchAcceptEncoding(accepted, name) {
- return fn, name
- }
- }
-
- // No encoder found to match the accepted encoding
- return nil, ""
-}
-
-func matchAcceptEncoding(accepted []string, encoding string) bool {
- for _, v := range accepted {
- if strings.Index(v, encoding) >= 0 {
- return true
- }
- }
- return false
-}
-
-type compressResponseWriter struct {
- http.ResponseWriter
- w io.Writer
- encoder EncoderFunc
- encoding string
- contentTypes map[string]struct{}
- level int
- wroteHeader bool
-}
-
-func (cw *compressResponseWriter) WriteHeader(code int) {
- if cw.wroteHeader {
- return
- }
- cw.wroteHeader = true
- defer cw.ResponseWriter.WriteHeader(code)
-
- // Already compressed data?
- if cw.Header().Get("Content-Encoding") != "" {
- return
- }
-
- // Parse the first part of the Content-Type response header.
- contentType := ""
- parts := strings.Split(cw.Header().Get("Content-Type"), ";")
- if len(parts) > 0 {
- contentType = parts[0]
- }
-
- // Is the content type compressable?
- if _, ok := cw.contentTypes[contentType]; !ok {
- return
- }
-
- if cw.encoder != nil && cw.encoding != "" {
- if wr := cw.encoder(cw.ResponseWriter, cw.level); wr != nil {
- cw.w = wr
- cw.Header().Set("Content-Encoding", cw.encoding)
-
- // The content-length after compression is unknown
- cw.Header().Del("Content-Length")
- }
- }
-}
-
-func (cw *compressResponseWriter) Write(p []byte) (int, error) {
- if !cw.wroteHeader {
- cw.WriteHeader(http.StatusOK)
- }
-
- return cw.w.Write(p)
-}
-
-func (cw *compressResponseWriter) Flush() {
- if f, ok := cw.w.(http.Flusher); ok {
- f.Flush()
- }
-}
-
-func (cw *compressResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- if hj, ok := cw.w.(http.Hijacker); ok {
- return hj.Hijack()
- }
- return nil, nil, errors.New("chi/middleware: http.Hijacker is unavailable on the writer")
-}
-
-func (cw *compressResponseWriter) Push(target string, opts *http.PushOptions) error {
- if ps, ok := cw.w.(http.Pusher); ok {
- return ps.Push(target, opts)
- }
- return errors.New("chi/middleware: http.Pusher is unavailable on the writer")
-}
-
-func (cw *compressResponseWriter) Close() error {
- if c, ok := cw.w.(io.WriteCloser); ok {
- return c.Close()
- }
- return errors.New("chi/middleware: io.WriteCloser is unavailable on the writer")
-}
-
-func encoderGzip(w http.ResponseWriter, level int) io.Writer {
- gw, err := gzip.NewWriterLevel(w, level)
- if err != nil {
- return nil
- }
- return gw
-}
-
-func encoderDeflate(w http.ResponseWriter, level int) io.Writer {
- dw, err := flate.NewWriter(w, level)
- if err != nil {
- return nil
- }
- return dw
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/content_charset.go b/vendor/github.com/go-chi/chi/middleware/content_charset.go
deleted file mode 100644
index 07b5ce6f66f..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/content_charset.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// ContentCharset generates a handler that writes a 415 Unsupported Media Type response if none of the charsets match.
-// An empty charset will allow requests with no Content-Type header or no specified charset.
-func ContentCharset(charsets ...string) func(next http.Handler) http.Handler {
- for i, c := range charsets {
- charsets[i] = strings.ToLower(c)
- }
-
- return func(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if !contentEncoding(r.Header.Get("Content-Type"), charsets...) {
- w.WriteHeader(http.StatusUnsupportedMediaType)
- return
- }
-
- next.ServeHTTP(w, r)
- })
- }
-}
-
-// Check the content encoding against a list of acceptable values.
-func contentEncoding(ce string, charsets ...string) bool {
- _, ce = split(strings.ToLower(ce), ";")
- _, ce = split(ce, "charset=")
- ce, _ = split(ce, ";")
- for _, c := range charsets {
- if ce == c {
- return true
- }
- }
-
- return false
-}
-
-// Split a string in two parts, cleaning any whitespace.
-func split(str, sep string) (string, string) {
- var a, b string
- var parts = strings.SplitN(str, sep, 2)
- a = strings.TrimSpace(parts[0])
- if len(parts) == 2 {
- b = strings.TrimSpace(parts[1])
- }
-
- return a, b
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/content_type.go b/vendor/github.com/go-chi/chi/middleware/content_type.go
deleted file mode 100644
index ee4957874f9..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/content_type.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// SetHeader is a convenience handler to set a response header key/value
-func SetHeader(key, value string) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set(key, value)
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
-
-// AllowContentType enforces a whitelist of request Content-Types otherwise responds
-// with a 415 Unsupported Media Type status.
-func AllowContentType(contentTypes ...string) func(next http.Handler) http.Handler {
- cT := []string{}
- for _, t := range contentTypes {
- cT = append(cT, strings.ToLower(t))
- }
-
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if r.ContentLength == 0 {
- // skip check for empty content body
- next.ServeHTTP(w, r)
- return
- }
-
- s := strings.ToLower(strings.TrimSpace(r.Header.Get("Content-Type")))
- if i := strings.Index(s, ";"); i > -1 {
- s = s[0:i]
- }
-
- for _, t := range cT {
- if t == s {
- next.ServeHTTP(w, r)
- return
- }
- }
-
- w.WriteHeader(http.StatusUnsupportedMediaType)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/get_head.go b/vendor/github.com/go-chi/chi/middleware/get_head.go
deleted file mode 100644
index 86068a96db1..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/get_head.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package middleware
-
-import (
- "net/http"
-
- "github.com/go-chi/chi"
-)
-
-// GetHead automatically route undefined HEAD requests to GET handlers.
-func GetHead(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- rctx := chi.RouteContext(r.Context())
- routePath := rctx.RoutePath
- if routePath == "" {
- if r.URL.RawPath != "" {
- routePath = r.URL.RawPath
- } else {
- routePath = r.URL.Path
- }
- }
-
- // Temporary routing context to look-ahead before routing the request
- tctx := chi.NewRouteContext()
-
- // Attempt to find a HEAD handler for the routing path, if not found, traverse
- // the router as through its a GET route, but proceed with the request
- // with the HEAD method.
- if !rctx.Routes.Match(tctx, "HEAD", routePath) {
- rctx.RouteMethod = "GET"
- rctx.RoutePath = routePath
- next.ServeHTTP(w, r)
- return
- }
- }
-
- next.ServeHTTP(w, r)
- })
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/heartbeat.go b/vendor/github.com/go-chi/chi/middleware/heartbeat.go
deleted file mode 100644
index fe822fb536c..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/heartbeat.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// Heartbeat endpoint middleware useful to setting up a path like
-// `/ping` that load balancers or uptime testing external services
-// can make a request before hitting any routes. It's also convenient
-// to place this above ACL middlewares as well.
-func Heartbeat(endpoint string) func(http.Handler) http.Handler {
- f := func(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "GET" && strings.EqualFold(r.URL.Path, endpoint) {
- w.Header().Set("Content-Type", "text/plain")
- w.WriteHeader(http.StatusOK)
- w.Write([]byte("."))
- return
- }
- h.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
- return f
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/logger.go b/vendor/github.com/go-chi/chi/middleware/logger.go
deleted file mode 100644
index 9f119d565f2..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/logger.go
+++ /dev/null
@@ -1,158 +0,0 @@
-package middleware
-
-import (
- "bytes"
- "context"
- "log"
- "net/http"
- "os"
- "time"
-)
-
-var (
- // LogEntryCtxKey is the context.Context key to store the request log entry.
- LogEntryCtxKey = &contextKey{"LogEntry"}
-
- // DefaultLogger is called by the Logger middleware handler to log each request.
- // Its made a package-level variable so that it can be reconfigured for custom
- // logging configurations.
- DefaultLogger = RequestLogger(&DefaultLogFormatter{Logger: log.New(os.Stdout, "", log.LstdFlags), NoColor: false})
-)
-
-// Logger is a middleware that logs the start and end of each request, along
-// with some useful data about what was requested, what the response status was,
-// and how long it took to return. When standard output is a TTY, Logger will
-// print in color, otherwise it will print in black and white. Logger prints a
-// request ID if one is provided.
-//
-// Alternatively, look at https://github.com/pressly/lg and the `lg.RequestLogger`
-// middleware pkg.
-func Logger(next http.Handler) http.Handler {
- return DefaultLogger(next)
-}
-
-// RequestLogger returns a logger handler using a custom LogFormatter.
-func RequestLogger(f LogFormatter) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- entry := f.NewLogEntry(r)
- ww := NewWrapResponseWriter(w, r.ProtoMajor)
-
- t1 := time.Now()
- defer func() {
- entry.Write(ww.Status(), ww.BytesWritten(), time.Since(t1))
- }()
-
- next.ServeHTTP(ww, WithLogEntry(r, entry))
- }
- return http.HandlerFunc(fn)
- }
-}
-
-// LogFormatter initiates the beginning of a new LogEntry per request.
-// See DefaultLogFormatter for an example implementation.
-type LogFormatter interface {
- NewLogEntry(r *http.Request) LogEntry
-}
-
-// LogEntry records the final log when a request completes.
-// See defaultLogEntry for an example implementation.
-type LogEntry interface {
- Write(status, bytes int, elapsed time.Duration)
- Panic(v interface{}, stack []byte)
-}
-
-// GetLogEntry returns the in-context LogEntry for a request.
-func GetLogEntry(r *http.Request) LogEntry {
- entry, _ := r.Context().Value(LogEntryCtxKey).(LogEntry)
- return entry
-}
-
-// WithLogEntry sets the in-context LogEntry for a request.
-func WithLogEntry(r *http.Request, entry LogEntry) *http.Request {
- r = r.WithContext(context.WithValue(r.Context(), LogEntryCtxKey, entry))
- return r
-}
-
-// LoggerInterface accepts printing to stdlib logger or compatible logger.
-type LoggerInterface interface {
- Print(v ...interface{})
-}
-
-// DefaultLogFormatter is a simple logger that implements a LogFormatter.
-type DefaultLogFormatter struct {
- Logger LoggerInterface
- NoColor bool
-}
-
-// NewLogEntry creates a new LogEntry for the request.
-func (l *DefaultLogFormatter) NewLogEntry(r *http.Request) LogEntry {
- useColor := !l.NoColor
- entry := &defaultLogEntry{
- DefaultLogFormatter: l,
- request: r,
- buf: &bytes.Buffer{},
- useColor: useColor,
- }
-
- reqID := GetReqID(r.Context())
- if reqID != "" {
- cW(entry.buf, useColor, nYellow, "[%s] ", reqID)
- }
- cW(entry.buf, useColor, nCyan, "\"")
- cW(entry.buf, useColor, bMagenta, "%s ", r.Method)
-
- scheme := "http"
- if r.TLS != nil {
- scheme = "https"
- }
- cW(entry.buf, useColor, nCyan, "%s://%s%s %s\" ", scheme, r.Host, r.RequestURI, r.Proto)
-
- entry.buf.WriteString("from ")
- entry.buf.WriteString(r.RemoteAddr)
- entry.buf.WriteString(" - ")
-
- return entry
-}
-
-type defaultLogEntry struct {
- *DefaultLogFormatter
- request *http.Request
- buf *bytes.Buffer
- useColor bool
-}
-
-func (l *defaultLogEntry) Write(status, bytes int, elapsed time.Duration) {
- switch {
- case status < 200:
- cW(l.buf, l.useColor, bBlue, "%03d", status)
- case status < 300:
- cW(l.buf, l.useColor, bGreen, "%03d", status)
- case status < 400:
- cW(l.buf, l.useColor, bCyan, "%03d", status)
- case status < 500:
- cW(l.buf, l.useColor, bYellow, "%03d", status)
- default:
- cW(l.buf, l.useColor, bRed, "%03d", status)
- }
-
- cW(l.buf, l.useColor, bBlue, " %dB", bytes)
-
- l.buf.WriteString(" in ")
- if elapsed < 500*time.Millisecond {
- cW(l.buf, l.useColor, nGreen, "%s", elapsed)
- } else if elapsed < 5*time.Second {
- cW(l.buf, l.useColor, nYellow, "%s", elapsed)
- } else {
- cW(l.buf, l.useColor, nRed, "%s", elapsed)
- }
-
- l.Logger.Print(l.buf.String())
-}
-
-func (l *defaultLogEntry) Panic(v interface{}, stack []byte) {
- panicEntry := l.NewLogEntry(l.request).(*defaultLogEntry)
- cW(panicEntry.buf, l.useColor, bRed, "panic: %+v", v)
- l.Logger.Print(panicEntry.buf.String())
- l.Logger.Print(string(stack))
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/middleware.go b/vendor/github.com/go-chi/chi/middleware/middleware.go
deleted file mode 100644
index be6a44fadd7..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/middleware.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package middleware
-
-// contextKey is a value for use with context.WithValue. It's used as
-// a pointer so it fits in an interface{} without allocation. This technique
-// for defining context keys was copied from Go 1.7's new use of context in net/http.
-type contextKey struct {
- name string
-}
-
-func (k *contextKey) String() string {
- return "chi/middleware context value " + k.name
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/nocache.go b/vendor/github.com/go-chi/chi/middleware/nocache.go
deleted file mode 100644
index 2412829e1b9..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/nocache.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "net/http"
- "time"
-)
-
-// Unix epoch time
-var epoch = time.Unix(0, 0).Format(time.RFC1123)
-
-// Taken from https://github.com/mytrile/nocache
-var noCacheHeaders = map[string]string{
- "Expires": epoch,
- "Cache-Control": "no-cache, no-store, no-transform, must-revalidate, private, max-age=0",
- "Pragma": "no-cache",
- "X-Accel-Expires": "0",
-}
-
-var etagHeaders = []string{
- "ETag",
- "If-Modified-Since",
- "If-Match",
- "If-None-Match",
- "If-Range",
- "If-Unmodified-Since",
-}
-
-// NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent
-// a router (or subrouter) from being cached by an upstream proxy and/or client.
-//
-// As per http://wiki.nginx.org/HttpProxyModule - NoCache sets:
-// Expires: Thu, 01 Jan 1970 00:00:00 UTC
-// Cache-Control: no-cache, private, max-age=0
-// X-Accel-Expires: 0
-// Pragma: no-cache (for HTTP/1.0 proxies/clients)
-func NoCache(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
-
- // Delete any ETag headers that may have been set
- for _, v := range etagHeaders {
- if r.Header.Get(v) != "" {
- r.Header.Del(v)
- }
- }
-
- // Set our NoCache headers
- for k, v := range noCacheHeaders {
- w.Header().Set(k, v)
- }
-
- h.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/profiler.go b/vendor/github.com/go-chi/chi/middleware/profiler.go
deleted file mode 100644
index 1d44b8259aa..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/profiler.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package middleware
-
-import (
- "expvar"
- "fmt"
- "net/http"
- "net/http/pprof"
-
- "github.com/go-chi/chi"
-)
-
-// Profiler is a convenient subrouter used for mounting net/http/pprof. ie.
-//
-// func MyService() http.Handler {
-// r := chi.NewRouter()
-// // ..middlewares
-// r.Mount("/debug", middleware.Profiler())
-// // ..routes
-// return r
-// }
-func Profiler() http.Handler {
- r := chi.NewRouter()
- r.Use(NoCache)
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/pprof/", 301)
- })
- r.HandleFunc("/pprof", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/", 301)
- })
-
- r.HandleFunc("/pprof/*", pprof.Index)
- r.HandleFunc("/pprof/cmdline", pprof.Cmdline)
- r.HandleFunc("/pprof/profile", pprof.Profile)
- r.HandleFunc("/pprof/symbol", pprof.Symbol)
- r.HandleFunc("/pprof/trace", pprof.Trace)
- r.HandleFunc("/vars", expVars)
-
- return r
-}
-
-// Replicated from expvar.go as not public.
-func expVars(w http.ResponseWriter, r *http.Request) {
- first := true
- w.Header().Set("Content-Type", "application/json")
- fmt.Fprintf(w, "{\n")
- expvar.Do(func(kv expvar.KeyValue) {
- if !first {
- fmt.Fprintf(w, ",\n")
- }
- first = false
- fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value)
- })
- fmt.Fprintf(w, "\n}\n")
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/realip.go b/vendor/github.com/go-chi/chi/middleware/realip.go
deleted file mode 100644
index 146c2b0a0a0..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/realip.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "net/http"
- "strings"
-)
-
-var xForwardedFor = http.CanonicalHeaderKey("X-Forwarded-For")
-var xRealIP = http.CanonicalHeaderKey("X-Real-IP")
-
-// RealIP is a middleware that sets a http.Request's RemoteAddr to the results
-// of parsing either the X-Forwarded-For header or the X-Real-IP header (in that
-// order).
-//
-// This middleware should be inserted fairly early in the middleware stack to
-// ensure that subsequent layers (e.g., request loggers) which examine the
-// RemoteAddr will see the intended value.
-//
-// You should only use this middleware if you can trust the headers passed to
-// you (in particular, the two headers this middleware uses), for example
-// because you have placed a reverse proxy like HAProxy or nginx in front of
-// chi. If your reverse proxies are configured to pass along arbitrary header
-// values from the client, or if you use this middleware without a reverse
-// proxy, malicious clients will be able to make you very sad (or, depending on
-// how you're using RemoteAddr, vulnerable to an attack of some sort).
-func RealIP(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if rip := realIP(r); rip != "" {
- r.RemoteAddr = rip
- }
- h.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
-
-func realIP(r *http.Request) string {
- var ip string
-
- if xff := r.Header.Get(xForwardedFor); xff != "" {
- i := strings.Index(xff, ", ")
- if i == -1 {
- i = len(xff)
- }
- ip = xff[:i]
- } else if xrip := r.Header.Get(xRealIP); xrip != "" {
- ip = xrip
- }
-
- return ip
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/recoverer.go b/vendor/github.com/go-chi/chi/middleware/recoverer.go
deleted file mode 100644
index 57fc3eb9da3..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/recoverer.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package middleware
-
-// The original work was derived from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "fmt"
- "net/http"
- "os"
- "runtime/debug"
-)
-
-// Recoverer is a middleware that recovers from panics, logs the panic (and a
-// backtrace), and returns a HTTP 500 (Internal Server Error) status if
-// possible. Recoverer prints a request ID if one is provided.
-//
-// Alternatively, look at https://github.com/pressly/lg middleware pkgs.
-func Recoverer(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- defer func() {
- if rvr := recover(); rvr != nil {
-
- logEntry := GetLogEntry(r)
- if logEntry != nil {
- logEntry.Panic(rvr, debug.Stack())
- } else {
- fmt.Fprintf(os.Stderr, "Panic: %+v\n", rvr)
- debug.PrintStack()
- }
-
- http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
- }
- }()
-
- next.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/request_id.go b/vendor/github.com/go-chi/chi/middleware/request_id.go
deleted file mode 100644
index 65b58f633ae..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/request_id.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "context"
- "crypto/rand"
- "encoding/base64"
- "fmt"
- "net/http"
- "os"
- "strings"
- "sync/atomic"
-)
-
-// Key to use when setting the request ID.
-type ctxKeyRequestID int
-
-// RequestIDKey is the key that holds the unique request ID in a request context.
-const RequestIDKey ctxKeyRequestID = 0
-
-var prefix string
-var reqid uint64
-
-// A quick note on the statistics here: we're trying to calculate the chance that
-// two randomly generated base62 prefixes will collide. We use the formula from
-// http://en.wikipedia.org/wiki/Birthday_problem
-//
-// P[m, n] \approx 1 - e^{-m^2/2n}
-//
-// We ballpark an upper bound for $m$ by imagining (for whatever reason) a server
-// that restarts every second over 10 years, for $m = 86400 * 365 * 10 = 315360000$
-//
-// For a $k$ character base-62 identifier, we have $n(k) = 62^k$
-//
-// Plugging this in, we find $P[m, n(10)] \approx 5.75%$, which is good enough for
-// our purposes, and is surely more than anyone would ever need in practice -- a
-// process that is rebooted a handful of times a day for a hundred years has less
-// than a millionth of a percent chance of generating two colliding IDs.
-
-func init() {
- hostname, err := os.Hostname()
- if hostname == "" || err != nil {
- hostname = "localhost"
- }
- var buf [12]byte
- var b64 string
- for len(b64) < 10 {
- rand.Read(buf[:])
- b64 = base64.StdEncoding.EncodeToString(buf[:])
- b64 = strings.NewReplacer("+", "", "/", "").Replace(b64)
- }
-
- prefix = fmt.Sprintf("%s/%s", hostname, b64[0:10])
-}
-
-// RequestID is a middleware that injects a request ID into the context of each
-// request. A request ID is a string of the form "host.example.com/random-0001",
-// where "random" is a base62 random string that uniquely identifies this go
-// process, and where the last number is an atomically incremented request
-// counter.
-func RequestID(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- requestID := r.Header.Get("X-Request-Id")
- if requestID == "" {
- myid := atomic.AddUint64(&reqid, 1)
- requestID = fmt.Sprintf("%s-%06d", prefix, myid)
- }
- ctx = context.WithValue(ctx, RequestIDKey, requestID)
- next.ServeHTTP(w, r.WithContext(ctx))
- }
- return http.HandlerFunc(fn)
-}
-
-// GetReqID returns a request ID from the given context if one is present.
-// Returns the empty string if a request ID cannot be found.
-func GetReqID(ctx context.Context) string {
- if ctx == nil {
- return ""
- }
- if reqID, ok := ctx.Value(RequestIDKey).(string); ok {
- return reqID
- }
- return ""
-}
-
-// NextRequestID generates the next request ID in the sequence.
-func NextRequestID() uint64 {
- return atomic.AddUint64(&reqid, 1)
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/strip.go b/vendor/github.com/go-chi/chi/middleware/strip.go
deleted file mode 100644
index 2b8b1842ab7..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/strip.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "net/http"
-
- "github.com/go-chi/chi"
-)
-
-// StripSlashes is a middleware that will match request paths with a trailing
-// slash, strip it from the path and continue routing through the mux, if a route
-// matches, then it will serve the handler.
-func StripSlashes(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- var path string
- rctx := chi.RouteContext(r.Context())
- if rctx.RoutePath != "" {
- path = rctx.RoutePath
- } else {
- path = r.URL.Path
- }
- if len(path) > 1 && path[len(path)-1] == '/' {
- rctx.RoutePath = path[:len(path)-1]
- }
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
-
-// RedirectSlashes is a middleware that will match request paths with a trailing
-// slash and redirect to the same path, less the trailing slash.
-//
-// NOTE: RedirectSlashes middleware is *incompatible* with http.FileServer,
-// see https://github.com/go-chi/chi/issues/343
-func RedirectSlashes(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- var path string
- rctx := chi.RouteContext(r.Context())
- if rctx.RoutePath != "" {
- path = rctx.RoutePath
- } else {
- path = r.URL.Path
- }
- if len(path) > 1 && path[len(path)-1] == '/' {
- if r.URL.RawQuery != "" {
- path = fmt.Sprintf("%s?%s", path[:len(path)-1], r.URL.RawQuery)
- } else {
- path = path[:len(path)-1]
- }
- http.Redirect(w, r, path, 301)
- return
- }
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/terminal.go b/vendor/github.com/go-chi/chi/middleware/terminal.go
deleted file mode 100644
index a5d4241002f..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/terminal.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "fmt"
- "io"
- "os"
-)
-
-var (
- // Normal colors
- nBlack = []byte{'\033', '[', '3', '0', 'm'}
- nRed = []byte{'\033', '[', '3', '1', 'm'}
- nGreen = []byte{'\033', '[', '3', '2', 'm'}
- nYellow = []byte{'\033', '[', '3', '3', 'm'}
- nBlue = []byte{'\033', '[', '3', '4', 'm'}
- nMagenta = []byte{'\033', '[', '3', '5', 'm'}
- nCyan = []byte{'\033', '[', '3', '6', 'm'}
- nWhite = []byte{'\033', '[', '3', '7', 'm'}
- // Bright colors
- bBlack = []byte{'\033', '[', '3', '0', ';', '1', 'm'}
- bRed = []byte{'\033', '[', '3', '1', ';', '1', 'm'}
- bGreen = []byte{'\033', '[', '3', '2', ';', '1', 'm'}
- bYellow = []byte{'\033', '[', '3', '3', ';', '1', 'm'}
- bBlue = []byte{'\033', '[', '3', '4', ';', '1', 'm'}
- bMagenta = []byte{'\033', '[', '3', '5', ';', '1', 'm'}
- bCyan = []byte{'\033', '[', '3', '6', ';', '1', 'm'}
- bWhite = []byte{'\033', '[', '3', '7', ';', '1', 'm'}
-
- reset = []byte{'\033', '[', '0', 'm'}
-)
-
-var isTTY bool
-
-func init() {
- // This is sort of cheating: if stdout is a character device, we assume
- // that means it's a TTY. Unfortunately, there are many non-TTY
- // character devices, but fortunately stdout is rarely set to any of
- // them.
- //
- // We could solve this properly by pulling in a dependency on
- // code.google.com/p/go.crypto/ssh/terminal, for instance, but as a
- // heuristic for whether to print in color or in black-and-white, I'd
- // really rather not.
- fi, err := os.Stdout.Stat()
- if err == nil {
- m := os.ModeDevice | os.ModeCharDevice
- isTTY = fi.Mode()&m == m
- }
-}
-
-// colorWrite
-func cW(w io.Writer, useColor bool, color []byte, s string, args ...interface{}) {
- if isTTY && useColor {
- w.Write(color)
- }
- fmt.Fprintf(w, s, args...)
- if isTTY && useColor {
- w.Write(reset)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/throttle.go b/vendor/github.com/go-chi/chi/middleware/throttle.go
deleted file mode 100644
index d935e2ce646..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/throttle.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "time"
-)
-
-const (
- errCapacityExceeded = "Server capacity exceeded."
- errTimedOut = "Timed out while waiting for a pending request to complete."
- errContextCanceled = "Context was canceled."
-)
-
-var (
- defaultBacklogTimeout = time.Second * 60
-)
-
-// Throttle is a middleware that limits number of currently processed requests
-// at a time.
-func Throttle(limit int) func(http.Handler) http.Handler {
- return ThrottleBacklog(limit, 0, defaultBacklogTimeout)
-}
-
-// ThrottleBacklog is a middleware that limits number of currently processed
-// requests at a time and provides a backlog for holding a finite number of
-// pending requests.
-func ThrottleBacklog(limit int, backlogLimit int, backlogTimeout time.Duration) func(http.Handler) http.Handler {
- if limit < 1 {
- panic("chi/middleware: Throttle expects limit > 0")
- }
-
- if backlogLimit < 0 {
- panic("chi/middleware: Throttle expects backlogLimit to be positive")
- }
-
- t := throttler{
- tokens: make(chan token, limit),
- backlogTokens: make(chan token, limit+backlogLimit),
- backlogTimeout: backlogTimeout,
- }
-
- // Filling tokens.
- for i := 0; i < limit+backlogLimit; i++ {
- if i < limit {
- t.tokens <- token{}
- }
- t.backlogTokens <- token{}
- }
-
- fn := func(h http.Handler) http.Handler {
- t.h = h
- return &t
- }
-
- return fn
-}
-
-// token represents a request that is being processed.
-type token struct{}
-
-// throttler limits number of currently processed requests at a time.
-type throttler struct {
- h http.Handler
- tokens chan token
- backlogTokens chan token
- backlogTimeout time.Duration
-}
-
-// ServeHTTP is the primary throttler request handler
-func (t *throttler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- select {
- case <-ctx.Done():
- http.Error(w, errContextCanceled, http.StatusServiceUnavailable)
- return
- case btok := <-t.backlogTokens:
- timer := time.NewTimer(t.backlogTimeout)
-
- defer func() {
- t.backlogTokens <- btok
- }()
-
- select {
- case <-timer.C:
- http.Error(w, errTimedOut, http.StatusServiceUnavailable)
- return
- case <-ctx.Done():
- http.Error(w, errContextCanceled, http.StatusServiceUnavailable)
- return
- case tok := <-t.tokens:
- defer func() {
- t.tokens <- tok
- }()
- t.h.ServeHTTP(w, r)
- }
- return
- default:
- http.Error(w, errCapacityExceeded, http.StatusServiceUnavailable)
- return
- }
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/timeout.go b/vendor/github.com/go-chi/chi/middleware/timeout.go
deleted file mode 100644
index 8e373536cf0..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/timeout.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
- "time"
-)
-
-// Timeout is a middleware that cancels ctx after a given timeout and return
-// a 504 Gateway Timeout error to the client.
-//
-// It's required that you select the ctx.Done() channel to check for the signal
-// if the context has reached its deadline and return, otherwise the timeout
-// signal will be just ignored.
-//
-// ie. a route/handler may look like:
-//
-// r.Get("/long", func(w http.ResponseWriter, r *http.Request) {
-// ctx := r.Context()
-// processTime := time.Duration(rand.Intn(4)+1) * time.Second
-//
-// select {
-// case <-ctx.Done():
-// return
-//
-// case <-time.After(processTime):
-// // The above channel simulates some hard work.
-// }
-//
-// w.Write([]byte("done"))
-// })
-//
-func Timeout(timeout time.Duration) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx, cancel := context.WithTimeout(r.Context(), timeout)
- defer func() {
- cancel()
- if ctx.Err() == context.DeadlineExceeded {
- w.WriteHeader(http.StatusGatewayTimeout)
- }
- }()
-
- r = r.WithContext(ctx)
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/url_format.go b/vendor/github.com/go-chi/chi/middleware/url_format.go
deleted file mode 100644
index 5749e4f32b3..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/url_format.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
- "strings"
-
- "github.com/go-chi/chi"
-)
-
-var (
- // URLFormatCtxKey is the context.Context key to store the URL format data
- // for a request.
- URLFormatCtxKey = &contextKey{"URLFormat"}
-)
-
-// URLFormat is a middleware that parses the url extension from a request path and stores it
-// on the context as a string under the key `middleware.URLFormatCtxKey`. The middleware will
-// trim the suffix from the routing path and continue routing.
-//
-// Routers should not include a url parameter for the suffix when using this middleware.
-//
-// Sample usage.. for url paths: `/articles/1`, `/articles/1.json` and `/articles/1.xml`
-//
-// func routes() http.Handler {
-// r := chi.NewRouter()
-// r.Use(middleware.URLFormat)
-//
-// r.Get("/articles/{id}", ListArticles)
-//
-// return r
-// }
-//
-// func ListArticles(w http.ResponseWriter, r *http.Request) {
-// urlFormat, _ := r.Context().Value(middleware.URLFormatCtxKey).(string)
-//
-// switch urlFormat {
-// case "json":
-// render.JSON(w, r, articles)
-// case "xml:"
-// render.XML(w, r, articles)
-// default:
-// render.JSON(w, r, articles)
-// }
-// }
-//
-func URLFormat(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
-
- var format string
- path := r.URL.Path
-
- if strings.Index(path, ".") > 0 {
- base := strings.LastIndex(path, "/")
- idx := strings.Index(path[base:], ".")
-
- if idx > 0 {
- idx += base
- format = path[idx+1:]
-
- rctx := chi.RouteContext(r.Context())
- rctx.RoutePath = path[:idx]
- }
- }
-
- r = r.WithContext(context.WithValue(ctx, URLFormatCtxKey, format))
-
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/value.go b/vendor/github.com/go-chi/chi/middleware/value.go
deleted file mode 100644
index fbbd0393fb9..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/value.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
-)
-
-// WithValue is a middleware that sets a given key/value in a context chain.
-func WithValue(key interface{}, val interface{}) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- r = r.WithContext(context.WithValue(r.Context(), key, val))
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/middleware/wrap_writer.go b/vendor/github.com/go-chi/chi/middleware/wrap_writer.go
deleted file mode 100644
index 5e5594f8d5a..00000000000
--- a/vendor/github.com/go-chi/chi/middleware/wrap_writer.go
+++ /dev/null
@@ -1,183 +0,0 @@
-package middleware
-
-// The original work was derived from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
-)
-
-// NewWrapResponseWriter wraps an http.ResponseWriter, returning a proxy that allows you to
-// hook into various parts of the response process.
-func NewWrapResponseWriter(w http.ResponseWriter, protoMajor int) WrapResponseWriter {
- _, fl := w.(http.Flusher)
-
- bw := basicWriter{ResponseWriter: w}
-
- if protoMajor == 2 {
- _, ps := w.(http.Pusher)
- if fl && ps {
- return &http2FancyWriter{bw}
- }
- } else {
- _, hj := w.(http.Hijacker)
- _, rf := w.(io.ReaderFrom)
- if fl && hj && rf {
- return &httpFancyWriter{bw}
- }
- }
- if fl {
- return &flushWriter{bw}
- }
-
- return &bw
-}
-
-// WrapResponseWriter is a proxy around an http.ResponseWriter that allows you to hook
-// into various parts of the response process.
-type WrapResponseWriter interface {
- http.ResponseWriter
- // Status returns the HTTP status of the request, or 0 if one has not
- // yet been sent.
- Status() int
- // BytesWritten returns the total number of bytes sent to the client.
- BytesWritten() int
- // Tee causes the response body to be written to the given io.Writer in
- // addition to proxying the writes through. Only one io.Writer can be
- // tee'd to at once: setting a second one will overwrite the first.
- // Writes will be sent to the proxy before being written to this
- // io.Writer. It is illegal for the tee'd writer to be modified
- // concurrently with writes.
- Tee(io.Writer)
- // Unwrap returns the original proxied target.
- Unwrap() http.ResponseWriter
-}
-
-// basicWriter wraps a http.ResponseWriter that implements the minimal
-// http.ResponseWriter interface.
-type basicWriter struct {
- http.ResponseWriter
- wroteHeader bool
- code int
- bytes int
- tee io.Writer
-}
-
-func (b *basicWriter) WriteHeader(code int) {
- if !b.wroteHeader {
- b.code = code
- b.wroteHeader = true
- b.ResponseWriter.WriteHeader(code)
- }
-}
-
-func (b *basicWriter) Write(buf []byte) (int, error) {
- b.WriteHeader(http.StatusOK)
- n, err := b.ResponseWriter.Write(buf)
- if b.tee != nil {
- _, err2 := b.tee.Write(buf[:n])
- // Prefer errors generated by the proxied writer.
- if err == nil {
- err = err2
- }
- }
- b.bytes += n
- return n, err
-}
-
-func (b *basicWriter) maybeWriteHeader() {
- if !b.wroteHeader {
- b.WriteHeader(http.StatusOK)
- }
-}
-
-func (b *basicWriter) Status() int {
- return b.code
-}
-
-func (b *basicWriter) BytesWritten() int {
- return b.bytes
-}
-
-func (b *basicWriter) Tee(w io.Writer) {
- b.tee = w
-}
-
-func (b *basicWriter) Unwrap() http.ResponseWriter {
- return b.ResponseWriter
-}
-
-type flushWriter struct {
- basicWriter
-}
-
-func (f *flushWriter) Flush() {
- f.wroteHeader = true
-
- fl := f.basicWriter.ResponseWriter.(http.Flusher)
- fl.Flush()
-}
-
-var _ http.Flusher = &flushWriter{}
-
-// httpFancyWriter is a HTTP writer that additionally satisfies
-// http.Flusher, http.Hijacker, and io.ReaderFrom. It exists for the common case
-// of wrapping the http.ResponseWriter that package http gives you, in order to
-// make the proxied object support the full method set of the proxied object.
-type httpFancyWriter struct {
- basicWriter
-}
-
-func (f *httpFancyWriter) Flush() {
- f.wroteHeader = true
-
- fl := f.basicWriter.ResponseWriter.(http.Flusher)
- fl.Flush()
-}
-
-func (f *httpFancyWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- hj := f.basicWriter.ResponseWriter.(http.Hijacker)
- return hj.Hijack()
-}
-
-func (f *http2FancyWriter) Push(target string, opts *http.PushOptions) error {
- return f.basicWriter.ResponseWriter.(http.Pusher).Push(target, opts)
-}
-
-func (f *httpFancyWriter) ReadFrom(r io.Reader) (int64, error) {
- if f.basicWriter.tee != nil {
- n, err := io.Copy(&f.basicWriter, r)
- f.basicWriter.bytes += int(n)
- return n, err
- }
- rf := f.basicWriter.ResponseWriter.(io.ReaderFrom)
- f.basicWriter.maybeWriteHeader()
- n, err := rf.ReadFrom(r)
- f.basicWriter.bytes += int(n)
- return n, err
-}
-
-var _ http.Flusher = &httpFancyWriter{}
-var _ http.Hijacker = &httpFancyWriter{}
-var _ http.Pusher = &http2FancyWriter{}
-var _ io.ReaderFrom = &httpFancyWriter{}
-
-// http2FancyWriter is a HTTP2 writer that additionally satisfies
-// http.Flusher, and io.ReaderFrom. It exists for the common case
-// of wrapping the http.ResponseWriter that package http gives you, in order to
-// make the proxied object support the full method set of the proxied object.
-type http2FancyWriter struct {
- basicWriter
-}
-
-func (f *http2FancyWriter) Flush() {
- f.wroteHeader = true
-
- fl := f.basicWriter.ResponseWriter.(http.Flusher)
- fl.Flush()
-}
-
-var _ http.Flusher = &http2FancyWriter{}
diff --git a/vendor/github.com/go-chi/chi/mux.go b/vendor/github.com/go-chi/chi/mux.go
deleted file mode 100644
index e553287e48f..00000000000
--- a/vendor/github.com/go-chi/chi/mux.go
+++ /dev/null
@@ -1,460 +0,0 @@
-package chi
-
-import (
- "context"
- "fmt"
- "net/http"
- "strings"
- "sync"
-)
-
-var _ Router = &Mux{}
-
-// Mux is a simple HTTP route multiplexer that parses a request path,
-// records any URL params, and executes an end handler. It implements
-// the http.Handler interface and is friendly with the standard library.
-//
-// Mux is designed to be fast, minimal and offer a powerful API for building
-// modular and composable HTTP services with a large set of handlers. It's
-// particularly useful for writing large REST API services that break a handler
-// into many smaller parts composed of middlewares and end handlers.
-type Mux struct {
- // The radix trie router
- tree *node
-
- // The middleware stack
- middlewares []func(http.Handler) http.Handler
-
- // Controls the behaviour of middleware chain generation when a mux
- // is registered as an inline group inside another mux.
- inline bool
- parent *Mux
-
- // The computed mux handler made of the chained middleware stack and
- // the tree router
- handler http.Handler
-
- // Routing context pool
- pool *sync.Pool
-
- // Custom route not found handler
- notFoundHandler http.HandlerFunc
-
- // Custom method not allowed handler
- methodNotAllowedHandler http.HandlerFunc
-}
-
-// NewMux returns a newly initialized Mux object that implements the Router
-// interface.
-func NewMux() *Mux {
- mux := &Mux{tree: &node{}, pool: &sync.Pool{}}
- mux.pool.New = func() interface{} {
- return NewRouteContext()
- }
- return mux
-}
-
-// ServeHTTP is the single method of the http.Handler interface that makes
-// Mux interoperable with the standard library. It uses a sync.Pool to get and
-// reuse routing contexts for each request.
-func (mx *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- // Ensure the mux has some routes defined on the mux
- if mx.handler == nil {
- mx.NotFoundHandler().ServeHTTP(w, r)
- return
- }
-
- // Check if a routing context already exists from a parent router.
- rctx, _ := r.Context().Value(RouteCtxKey).(*Context)
- if rctx != nil {
- mx.handler.ServeHTTP(w, r)
- return
- }
-
- // Fetch a RouteContext object from the sync pool, and call the computed
- // mx.handler that is comprised of mx.middlewares + mx.routeHTTP.
- // Once the request is finished, reset the routing context and put it back
- // into the pool for reuse from another request.
- rctx = mx.pool.Get().(*Context)
- rctx.Reset()
- rctx.Routes = mx
- r = r.WithContext(context.WithValue(r.Context(), RouteCtxKey, rctx))
- mx.handler.ServeHTTP(w, r)
- mx.pool.Put(rctx)
-}
-
-// Use appends a middleware handler to the Mux middleware stack.
-//
-// The middleware stack for any Mux will execute before searching for a matching
-// route to a specific handler, which provides opportunity to respond early,
-// change the course of the request execution, or set request-scoped values for
-// the next http.Handler.
-func (mx *Mux) Use(middlewares ...func(http.Handler) http.Handler) {
- if mx.handler != nil {
- panic("chi: all middlewares must be defined before routes on a mux")
- }
- mx.middlewares = append(mx.middlewares, middlewares...)
-}
-
-// Handle adds the route `pattern` that matches any http method to
-// execute the `handler` http.Handler.
-func (mx *Mux) Handle(pattern string, handler http.Handler) {
- mx.handle(mALL, pattern, handler)
-}
-
-// HandleFunc adds the route `pattern` that matches any http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) HandleFunc(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mALL, pattern, handlerFn)
-}
-
-// Method adds the route `pattern` that matches `method` http method to
-// execute the `handler` http.Handler.
-func (mx *Mux) Method(method, pattern string, handler http.Handler) {
- m, ok := methodMap[strings.ToUpper(method)]
- if !ok {
- panic(fmt.Sprintf("chi: '%s' http method is not supported.", method))
- }
- mx.handle(m, pattern, handler)
-}
-
-// MethodFunc adds the route `pattern` that matches `method` http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) MethodFunc(method, pattern string, handlerFn http.HandlerFunc) {
- mx.Method(method, pattern, handlerFn)
-}
-
-// Connect adds the route `pattern` that matches a CONNECT http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Connect(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mCONNECT, pattern, handlerFn)
-}
-
-// Delete adds the route `pattern` that matches a DELETE http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Delete(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mDELETE, pattern, handlerFn)
-}
-
-// Get adds the route `pattern` that matches a GET http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Get(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mGET, pattern, handlerFn)
-}
-
-// Head adds the route `pattern` that matches a HEAD http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Head(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mHEAD, pattern, handlerFn)
-}
-
-// Options adds the route `pattern` that matches a OPTIONS http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Options(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mOPTIONS, pattern, handlerFn)
-}
-
-// Patch adds the route `pattern` that matches a PATCH http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Patch(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPATCH, pattern, handlerFn)
-}
-
-// Post adds the route `pattern` that matches a POST http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Post(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPOST, pattern, handlerFn)
-}
-
-// Put adds the route `pattern` that matches a PUT http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Put(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPUT, pattern, handlerFn)
-}
-
-// Trace adds the route `pattern` that matches a TRACE http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Trace(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mTRACE, pattern, handlerFn)
-}
-
-// NotFound sets a custom http.HandlerFunc for routing paths that could
-// not be found. The default 404 handler is `http.NotFound`.
-func (mx *Mux) NotFound(handlerFn http.HandlerFunc) {
- // Build NotFound handler chain
- m := mx
- hFn := handlerFn
- if mx.inline && mx.parent != nil {
- m = mx.parent
- hFn = Chain(mx.middlewares...).HandlerFunc(hFn).ServeHTTP
- }
-
- // Update the notFoundHandler from this point forward
- m.notFoundHandler = hFn
- m.updateSubRoutes(func(subMux *Mux) {
- if subMux.notFoundHandler == nil {
- subMux.NotFound(hFn)
- }
- })
-}
-
-// MethodNotAllowed sets a custom http.HandlerFunc for routing paths where the
-// method is unresolved. The default handler returns a 405 with an empty body.
-func (mx *Mux) MethodNotAllowed(handlerFn http.HandlerFunc) {
- // Build MethodNotAllowed handler chain
- m := mx
- hFn := handlerFn
- if mx.inline && mx.parent != nil {
- m = mx.parent
- hFn = Chain(mx.middlewares...).HandlerFunc(hFn).ServeHTTP
- }
-
- // Update the methodNotAllowedHandler from this point forward
- m.methodNotAllowedHandler = hFn
- m.updateSubRoutes(func(subMux *Mux) {
- if subMux.methodNotAllowedHandler == nil {
- subMux.MethodNotAllowed(hFn)
- }
- })
-}
-
-// With adds inline middlewares for an endpoint handler.
-func (mx *Mux) With(middlewares ...func(http.Handler) http.Handler) Router {
- // Similarly as in handle(), we must build the mux handler once further
- // middleware registration isn't allowed for this stack, like now.
- if !mx.inline && mx.handler == nil {
- mx.buildRouteHandler()
- }
-
- // Copy middlewares from parent inline muxs
- var mws Middlewares
- if mx.inline {
- mws = make(Middlewares, len(mx.middlewares))
- copy(mws, mx.middlewares)
- }
- mws = append(mws, middlewares...)
-
- im := &Mux{pool: mx.pool, inline: true, parent: mx, tree: mx.tree, middlewares: mws}
-
- return im
-}
-
-// Group creates a new inline-Mux with a fresh middleware stack. It's useful
-// for a group of handlers along the same routing path that use an additional
-// set of middlewares. See _examples/.
-func (mx *Mux) Group(fn func(r Router)) Router {
- im := mx.With().(*Mux)
- if fn != nil {
- fn(im)
- }
- return im
-}
-
-// Route creates a new Mux with a fresh middleware stack and mounts it
-// along the `pattern` as a subrouter. Effectively, this is a short-hand
-// call to Mount. See _examples/.
-func (mx *Mux) Route(pattern string, fn func(r Router)) Router {
- subRouter := NewRouter()
- if fn != nil {
- fn(subRouter)
- }
- mx.Mount(pattern, subRouter)
- return subRouter
-}
-
-// Mount attaches another http.Handler or chi Router as a subrouter along a routing
-// path. It's very useful to split up a large API as many independent routers and
-// compose them as a single service using Mount. See _examples/.
-//
-// Note that Mount() simply sets a wildcard along the `pattern` that will continue
-// routing at the `handler`, which in most cases is another chi.Router. As a result,
-// if you define two Mount() routes on the exact same pattern the mount will panic.
-func (mx *Mux) Mount(pattern string, handler http.Handler) {
- // Provide runtime safety for ensuring a pattern isn't mounted on an existing
- // routing pattern.
- if mx.tree.findPattern(pattern+"*") || mx.tree.findPattern(pattern+"/*") {
- panic(fmt.Sprintf("chi: attempting to Mount() a handler on an existing path, '%s'", pattern))
- }
-
- // Assign sub-Router's with the parent not found & method not allowed handler if not specified.
- subr, ok := handler.(*Mux)
- if ok && subr.notFoundHandler == nil && mx.notFoundHandler != nil {
- subr.NotFound(mx.notFoundHandler)
- }
- if ok && subr.methodNotAllowedHandler == nil && mx.methodNotAllowedHandler != nil {
- subr.MethodNotAllowed(mx.methodNotAllowedHandler)
- }
-
- // Wrap the sub-router in a handlerFunc to scope the request path for routing.
- mountHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- rctx := RouteContext(r.Context())
- rctx.RoutePath = mx.nextRoutePath(rctx)
- handler.ServeHTTP(w, r)
- })
-
- if pattern == "" || pattern[len(pattern)-1] != '/' {
- mx.handle(mALL|mSTUB, pattern, mountHandler)
- mx.handle(mALL|mSTUB, pattern+"/", mountHandler)
- pattern += "/"
- }
-
- method := mALL
- subroutes, _ := handler.(Routes)
- if subroutes != nil {
- method |= mSTUB
- }
- n := mx.handle(method, pattern+"*", mountHandler)
-
- if subroutes != nil {
- n.subroutes = subroutes
- }
-}
-
-// Routes returns a slice of routing information from the tree,
-// useful for traversing available routes of a router.
-func (mx *Mux) Routes() []Route {
- return mx.tree.routes()
-}
-
-// Middlewares returns a slice of middleware handler functions.
-func (mx *Mux) Middlewares() Middlewares {
- return mx.middlewares
-}
-
-// Match searches the routing tree for a handler that matches the method/path.
-// It's similar to routing a http request, but without executing the handler
-// thereafter.
-//
-// Note: the *Context state is updated during execution, so manage
-// the state carefully or make a NewRouteContext().
-func (mx *Mux) Match(rctx *Context, method, path string) bool {
- m, ok := methodMap[method]
- if !ok {
- return false
- }
-
- node, _, h := mx.tree.FindRoute(rctx, m, path)
-
- if node != nil && node.subroutes != nil {
- rctx.RoutePath = mx.nextRoutePath(rctx)
- return node.subroutes.Match(rctx, method, rctx.RoutePath)
- }
-
- return h != nil
-}
-
-// NotFoundHandler returns the default Mux 404 responder whenever a route
-// cannot be found.
-func (mx *Mux) NotFoundHandler() http.HandlerFunc {
- if mx.notFoundHandler != nil {
- return mx.notFoundHandler
- }
- return http.NotFound
-}
-
-// MethodNotAllowedHandler returns the default Mux 405 responder whenever
-// a method cannot be resolved for a route.
-func (mx *Mux) MethodNotAllowedHandler() http.HandlerFunc {
- if mx.methodNotAllowedHandler != nil {
- return mx.methodNotAllowedHandler
- }
- return methodNotAllowedHandler
-}
-
-// buildRouteHandler builds the single mux handler that is a chain of the middleware
-// stack, as defined by calls to Use(), and the tree router (Mux) itself. After this
-// point, no other middlewares can be registered on this Mux's stack. But you can still
-// compose additional middlewares via Group()'s or using a chained middleware handler.
-func (mx *Mux) buildRouteHandler() {
- mx.handler = chain(mx.middlewares, http.HandlerFunc(mx.routeHTTP))
-}
-
-// handle registers a http.Handler in the routing tree for a particular http method
-// and routing pattern.
-func (mx *Mux) handle(method methodTyp, pattern string, handler http.Handler) *node {
- if len(pattern) == 0 || pattern[0] != '/' {
- panic(fmt.Sprintf("chi: routing pattern must begin with '/' in '%s'", pattern))
- }
-
- // Build the final routing handler for this Mux.
- if !mx.inline && mx.handler == nil {
- mx.buildRouteHandler()
- }
-
- // Build endpoint handler with inline middlewares for the route
- var h http.Handler
- if mx.inline {
- mx.handler = http.HandlerFunc(mx.routeHTTP)
- h = Chain(mx.middlewares...).Handler(handler)
- } else {
- h = handler
- }
-
- // Add the endpoint to the tree and return the node
- return mx.tree.InsertRoute(method, pattern, h)
-}
-
-// routeHTTP routes a http.Request through the Mux routing tree to serve
-// the matching handler for a particular http method.
-func (mx *Mux) routeHTTP(w http.ResponseWriter, r *http.Request) {
- // Grab the route context object
- rctx := r.Context().Value(RouteCtxKey).(*Context)
-
- // The request routing path
- routePath := rctx.RoutePath
- if routePath == "" {
- if r.URL.RawPath != "" {
- routePath = r.URL.RawPath
- } else {
- routePath = r.URL.Path
- }
- }
-
- // Check if method is supported by chi
- if rctx.RouteMethod == "" {
- rctx.RouteMethod = r.Method
- }
- method, ok := methodMap[rctx.RouteMethod]
- if !ok {
- mx.MethodNotAllowedHandler().ServeHTTP(w, r)
- return
- }
-
- // Find the route
- if _, _, h := mx.tree.FindRoute(rctx, method, routePath); h != nil {
- h.ServeHTTP(w, r)
- return
- }
- if rctx.methodNotAllowed {
- mx.MethodNotAllowedHandler().ServeHTTP(w, r)
- } else {
- mx.NotFoundHandler().ServeHTTP(w, r)
- }
-}
-
-func (mx *Mux) nextRoutePath(rctx *Context) string {
- routePath := "/"
- nx := len(rctx.routeParams.Keys) - 1 // index of last param in list
- if nx >= 0 && rctx.routeParams.Keys[nx] == "*" && len(rctx.routeParams.Values) > nx {
- routePath += rctx.routeParams.Values[nx]
- }
- return routePath
-}
-
-// Recursively update data on child routers.
-func (mx *Mux) updateSubRoutes(fn func(subMux *Mux)) {
- for _, r := range mx.tree.routes() {
- subMux, ok := r.SubRoutes.(*Mux)
- if !ok {
- continue
- }
- fn(subMux)
- }
-}
-
-// methodNotAllowedHandler is a helper function to respond with a 405,
-// method not allowed.
-func methodNotAllowedHandler(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(405)
- w.Write(nil)
-}
diff --git a/vendor/github.com/go-chi/chi/tree.go b/vendor/github.com/go-chi/chi/tree.go
deleted file mode 100644
index 8a044f3eca7..00000000000
--- a/vendor/github.com/go-chi/chi/tree.go
+++ /dev/null
@@ -1,846 +0,0 @@
-package chi
-
-// Radix tree implementation below is a based on the original work by
-// Armon Dadgar in https://github.com/armon/go-radix/blob/master/radix.go
-// (MIT licensed). It's been heavily modified for use as a HTTP routing tree.
-
-import (
- "fmt"
- "math"
- "net/http"
- "regexp"
- "sort"
- "strconv"
- "strings"
-)
-
-type methodTyp int
-
-const (
- mSTUB methodTyp = 1 << iota
- mCONNECT
- mDELETE
- mGET
- mHEAD
- mOPTIONS
- mPATCH
- mPOST
- mPUT
- mTRACE
-)
-
-var mALL = mCONNECT | mDELETE | mGET | mHEAD |
- mOPTIONS | mPATCH | mPOST | mPUT | mTRACE
-
-var methodMap = map[string]methodTyp{
- http.MethodConnect: mCONNECT,
- http.MethodDelete: mDELETE,
- http.MethodGet: mGET,
- http.MethodHead: mHEAD,
- http.MethodOptions: mOPTIONS,
- http.MethodPatch: mPATCH,
- http.MethodPost: mPOST,
- http.MethodPut: mPUT,
- http.MethodTrace: mTRACE,
-}
-
-// RegisterMethod adds support for custom HTTP method handlers, available
-// via Router#Method and Router#MethodFunc
-func RegisterMethod(method string) {
- if method == "" {
- return
- }
- method = strings.ToUpper(method)
- if _, ok := methodMap[method]; ok {
- return
- }
- n := len(methodMap)
- if n > strconv.IntSize {
- panic(fmt.Sprintf("chi: max number of methods reached (%d)", strconv.IntSize))
- }
- mt := methodTyp(math.Exp2(float64(n)))
- methodMap[method] = mt
- mALL |= mt
-}
-
-type nodeTyp uint8
-
-const (
- ntStatic nodeTyp = iota // /home
- ntRegexp // /{id:[0-9]+}
- ntParam // /{user}
- ntCatchAll // /api/v1/*
-)
-
-type node struct {
- // node type: static, regexp, param, catchAll
- typ nodeTyp
-
- // first byte of the prefix
- label byte
-
- // first byte of the child prefix
- tail byte
-
- // prefix is the common prefix we ignore
- prefix string
-
- // regexp matcher for regexp nodes
- rex *regexp.Regexp
-
- // HTTP handler endpoints on the leaf node
- endpoints endpoints
-
- // subroutes on the leaf node
- subroutes Routes
-
- // child nodes should be stored in-order for iteration,
- // in groups of the node type.
- children [ntCatchAll + 1]nodes
-}
-
-// endpoints is a mapping of http method constants to handlers
-// for a given route.
-type endpoints map[methodTyp]*endpoint
-
-type endpoint struct {
- // endpoint handler
- handler http.Handler
-
- // pattern is the routing pattern for handler nodes
- pattern string
-
- // parameter keys recorded on handler nodes
- paramKeys []string
-}
-
-func (s endpoints) Value(method methodTyp) *endpoint {
- mh, ok := s[method]
- if !ok {
- mh = &endpoint{}
- s[method] = mh
- }
- return mh
-}
-
-func (n *node) InsertRoute(method methodTyp, pattern string, handler http.Handler) *node {
- var parent *node
- search := pattern
-
- for {
- // Handle key exhaustion
- if len(search) == 0 {
- // Insert or update the node's leaf handler
- n.setEndpoint(method, handler, pattern)
- return n
- }
-
- // We're going to be searching for a wild node next,
- // in this case, we need to get the tail
- var label = search[0]
- var segTail byte
- var segEndIdx int
- var segTyp nodeTyp
- var segRexpat string
- if label == '{' || label == '*' {
- segTyp, _, segRexpat, segTail, _, segEndIdx = patNextSegment(search)
- }
-
- var prefix string
- if segTyp == ntRegexp {
- prefix = segRexpat
- }
-
- // Look for the edge to attach to
- parent = n
- n = n.getEdge(segTyp, label, segTail, prefix)
-
- // No edge, create one
- if n == nil {
- child := &node{label: label, tail: segTail, prefix: search}
- hn := parent.addChild(child, search)
- hn.setEndpoint(method, handler, pattern)
-
- return hn
- }
-
- // Found an edge to match the pattern
-
- if n.typ > ntStatic {
- // We found a param node, trim the param from the search path and continue.
- // This param/wild pattern segment would already be on the tree from a previous
- // call to addChild when creating a new node.
- search = search[segEndIdx:]
- continue
- }
-
- // Static nodes fall below here.
- // Determine longest prefix of the search key on match.
- commonPrefix := longestPrefix(search, n.prefix)
- if commonPrefix == len(n.prefix) {
- // the common prefix is as long as the current node's prefix we're attempting to insert.
- // keep the search going.
- search = search[commonPrefix:]
- continue
- }
-
- // Split the node
- child := &node{
- typ: ntStatic,
- prefix: search[:commonPrefix],
- }
- parent.replaceChild(search[0], segTail, child)
-
- // Restore the existing node
- n.label = n.prefix[commonPrefix]
- n.prefix = n.prefix[commonPrefix:]
- child.addChild(n, n.prefix)
-
- // If the new key is a subset, set the method/handler on this node and finish.
- search = search[commonPrefix:]
- if len(search) == 0 {
- child.setEndpoint(method, handler, pattern)
- return child
- }
-
- // Create a new edge for the node
- subchild := &node{
- typ: ntStatic,
- label: search[0],
- prefix: search,
- }
- hn := child.addChild(subchild, search)
- hn.setEndpoint(method, handler, pattern)
- return hn
- }
-}
-
-// addChild appends the new `child` node to the tree using the `pattern` as the trie key.
-// For a URL router like chi's, we split the static, param, regexp and wildcard segments
-// into different nodes. In addition, addChild will recursively call itself until every
-// pattern segment is added to the url pattern tree as individual nodes, depending on type.
-func (n *node) addChild(child *node, prefix string) *node {
- search := prefix
-
- // handler leaf node added to the tree is the child.
- // this may be overridden later down the flow
- hn := child
-
- // Parse next segment
- segTyp, _, segRexpat, segTail, segStartIdx, segEndIdx := patNextSegment(search)
-
- // Add child depending on next up segment
- switch segTyp {
-
- case ntStatic:
- // Search prefix is all static (that is, has no params in path)
- // noop
-
- default:
- // Search prefix contains a param, regexp or wildcard
-
- if segTyp == ntRegexp {
- rex, err := regexp.Compile(segRexpat)
- if err != nil {
- panic(fmt.Sprintf("chi: invalid regexp pattern '%s' in route param", segRexpat))
- }
- child.prefix = segRexpat
- child.rex = rex
- }
-
- if segStartIdx == 0 {
- // Route starts with a param
- child.typ = segTyp
-
- if segTyp == ntCatchAll {
- segStartIdx = -1
- } else {
- segStartIdx = segEndIdx
- }
- if segStartIdx < 0 {
- segStartIdx = len(search)
- }
- child.tail = segTail // for params, we set the tail
-
- if segStartIdx != len(search) {
- // add static edge for the remaining part, split the end.
- // its not possible to have adjacent param nodes, so its certainly
- // going to be a static node next.
-
- search = search[segStartIdx:] // advance search position
-
- nn := &node{
- typ: ntStatic,
- label: search[0],
- prefix: search,
- }
- hn = child.addChild(nn, search)
- }
-
- } else if segStartIdx > 0 {
- // Route has some param
-
- // starts with a static segment
- child.typ = ntStatic
- child.prefix = search[:segStartIdx]
- child.rex = nil
-
- // add the param edge node
- search = search[segStartIdx:]
-
- nn := &node{
- typ: segTyp,
- label: search[0],
- tail: segTail,
- }
- hn = child.addChild(nn, search)
-
- }
- }
-
- n.children[child.typ] = append(n.children[child.typ], child)
- n.children[child.typ].Sort()
- return hn
-}
-
-func (n *node) replaceChild(label, tail byte, child *node) {
- for i := 0; i < len(n.children[child.typ]); i++ {
- if n.children[child.typ][i].label == label && n.children[child.typ][i].tail == tail {
- n.children[child.typ][i] = child
- n.children[child.typ][i].label = label
- n.children[child.typ][i].tail = tail
- return
- }
- }
- panic("chi: replacing missing child")
-}
-
-func (n *node) getEdge(ntyp nodeTyp, label, tail byte, prefix string) *node {
- nds := n.children[ntyp]
- for i := 0; i < len(nds); i++ {
- if nds[i].label == label && nds[i].tail == tail {
- if ntyp == ntRegexp && nds[i].prefix != prefix {
- continue
- }
- return nds[i]
- }
- }
- return nil
-}
-
-func (n *node) setEndpoint(method methodTyp, handler http.Handler, pattern string) {
- // Set the handler for the method type on the node
- if n.endpoints == nil {
- n.endpoints = make(endpoints, 0)
- }
-
- paramKeys := patParamKeys(pattern)
-
- if method&mSTUB == mSTUB {
- n.endpoints.Value(mSTUB).handler = handler
- }
- if method&mALL == mALL {
- h := n.endpoints.Value(mALL)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- for _, m := range methodMap {
- h := n.endpoints.Value(m)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- }
- } else {
- h := n.endpoints.Value(method)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- }
-}
-
-func (n *node) FindRoute(rctx *Context, method methodTyp, path string) (*node, endpoints, http.Handler) {
- // Reset the context routing pattern and params
- rctx.routePattern = ""
- rctx.routeParams.Keys = rctx.routeParams.Keys[:0]
- rctx.routeParams.Values = rctx.routeParams.Values[:0]
-
- // Find the routing handlers for the path
- rn := n.findRoute(rctx, method, path)
- if rn == nil {
- return nil, nil, nil
- }
-
- // Record the routing params in the request lifecycle
- rctx.URLParams.Keys = append(rctx.URLParams.Keys, rctx.routeParams.Keys...)
- rctx.URLParams.Values = append(rctx.URLParams.Values, rctx.routeParams.Values...)
-
- // Record the routing pattern in the request lifecycle
- if rn.endpoints[method].pattern != "" {
- rctx.routePattern = rn.endpoints[method].pattern
- rctx.RoutePatterns = append(rctx.RoutePatterns, rctx.routePattern)
- }
-
- return rn, rn.endpoints, rn.endpoints[method].handler
-}
-
-// Recursive edge traversal by checking all nodeTyp groups along the way.
-// It's like searching through a multi-dimensional radix trie.
-func (n *node) findRoute(rctx *Context, method methodTyp, path string) *node {
- nn := n
- search := path
-
- for t, nds := range nn.children {
- ntyp := nodeTyp(t)
- if len(nds) == 0 {
- continue
- }
-
- var xn *node
- xsearch := search
-
- var label byte
- if search != "" {
- label = search[0]
- }
-
- switch ntyp {
- case ntStatic:
- xn = nds.findEdge(label)
- if xn == nil || !strings.HasPrefix(xsearch, xn.prefix) {
- continue
- }
- xsearch = xsearch[len(xn.prefix):]
-
- case ntParam, ntRegexp:
- // short-circuit and return no matching route for empty param values
- if xsearch == "" {
- continue
- }
-
- // serially loop through each node grouped by the tail delimiter
- for idx := 0; idx < len(nds); idx++ {
- xn = nds[idx]
-
- // label for param nodes is the delimiter byte
- p := strings.IndexByte(xsearch, xn.tail)
-
- if p < 0 {
- if xn.tail == '/' {
- p = len(xsearch)
- } else {
- continue
- }
- }
-
- if ntyp == ntRegexp && xn.rex != nil {
- if xn.rex.Match([]byte(xsearch[:p])) == false {
- continue
- }
- } else if strings.IndexByte(xsearch[:p], '/') != -1 {
- // avoid a match across path segments
- continue
- }
-
- rctx.routeParams.Values = append(rctx.routeParams.Values, xsearch[:p])
- xsearch = xsearch[p:]
- break
- }
-
- default:
- // catch-all nodes
- rctx.routeParams.Values = append(rctx.routeParams.Values, search)
- xn = nds[0]
- xsearch = ""
- }
-
- if xn == nil {
- continue
- }
-
- // did we find it yet?
- if len(xsearch) == 0 {
- if xn.isLeaf() {
- h, _ := xn.endpoints[method]
- if h != nil && h.handler != nil {
- rctx.routeParams.Keys = append(rctx.routeParams.Keys, h.paramKeys...)
- return xn
- }
-
- // flag that the routing context found a route, but not a corresponding
- // supported method
- rctx.methodNotAllowed = true
- }
- }
-
- // recursively find the next node..
- fin := xn.findRoute(rctx, method, xsearch)
- if fin != nil {
- return fin
- }
-
- // Did not find final handler, let's remove the param here if it was set
- if xn.typ > ntStatic {
- if len(rctx.routeParams.Values) > 0 {
- rctx.routeParams.Values = rctx.routeParams.Values[:len(rctx.routeParams.Values)-1]
- }
- }
-
- }
-
- return nil
-}
-
-func (n *node) findEdge(ntyp nodeTyp, label byte) *node {
- nds := n.children[ntyp]
- num := len(nds)
- idx := 0
-
- switch ntyp {
- case ntStatic, ntParam, ntRegexp:
- i, j := 0, num-1
- for i <= j {
- idx = i + (j-i)/2
- if label > nds[idx].label {
- i = idx + 1
- } else if label < nds[idx].label {
- j = idx - 1
- } else {
- i = num // breaks cond
- }
- }
- if nds[idx].label != label {
- return nil
- }
- return nds[idx]
-
- default: // catch all
- return nds[idx]
- }
-}
-
-func (n *node) isEmpty() bool {
- for _, nds := range n.children {
- if len(nds) > 0 {
- return false
- }
- }
- return true
-}
-
-func (n *node) isLeaf() bool {
- return n.endpoints != nil
-}
-
-func (n *node) findPattern(pattern string) bool {
- nn := n
- for _, nds := range nn.children {
- if len(nds) == 0 {
- continue
- }
-
- n = nn.findEdge(nds[0].typ, pattern[0])
- if n == nil {
- continue
- }
-
- var idx int
- var xpattern string
-
- switch n.typ {
- case ntStatic:
- idx = longestPrefix(pattern, n.prefix)
- if idx < len(n.prefix) {
- continue
- }
-
- case ntParam, ntRegexp:
- idx = strings.IndexByte(pattern, '}') + 1
-
- case ntCatchAll:
- idx = longestPrefix(pattern, "*")
-
- default:
- panic("chi: unknown node type")
- }
-
- xpattern = pattern[idx:]
- if len(xpattern) == 0 {
- return true
- }
-
- return n.findPattern(xpattern)
- }
- return false
-}
-
-func (n *node) routes() []Route {
- rts := []Route{}
-
- n.walk(func(eps endpoints, subroutes Routes) bool {
- if eps[mSTUB] != nil && eps[mSTUB].handler != nil && subroutes == nil {
- return false
- }
-
- // Group methodHandlers by unique patterns
- pats := make(map[string]endpoints, 0)
-
- for mt, h := range eps {
- if h.pattern == "" {
- continue
- }
- p, ok := pats[h.pattern]
- if !ok {
- p = endpoints{}
- pats[h.pattern] = p
- }
- p[mt] = h
- }
-
- for p, mh := range pats {
- hs := make(map[string]http.Handler, 0)
- if mh[mALL] != nil && mh[mALL].handler != nil {
- hs["*"] = mh[mALL].handler
- }
-
- for mt, h := range mh {
- if h.handler == nil {
- continue
- }
- m := methodTypString(mt)
- if m == "" {
- continue
- }
- hs[m] = h.handler
- }
-
- rt := Route{p, hs, subroutes}
- rts = append(rts, rt)
- }
-
- return false
- })
-
- return rts
-}
-
-func (n *node) walk(fn func(eps endpoints, subroutes Routes) bool) bool {
- // Visit the leaf values if any
- if (n.endpoints != nil || n.subroutes != nil) && fn(n.endpoints, n.subroutes) {
- return true
- }
-
- // Recurse on the children
- for _, ns := range n.children {
- for _, cn := range ns {
- if cn.walk(fn) {
- return true
- }
- }
- }
- return false
-}
-
-// patNextSegment returns the next segment details from a pattern:
-// node type, param key, regexp string, param tail byte, param starting index, param ending index
-func patNextSegment(pattern string) (nodeTyp, string, string, byte, int, int) {
- ps := strings.Index(pattern, "{")
- ws := strings.Index(pattern, "*")
-
- if ps < 0 && ws < 0 {
- return ntStatic, "", "", 0, 0, len(pattern) // we return the entire thing
- }
-
- // Sanity check
- if ps >= 0 && ws >= 0 && ws < ps {
- panic("chi: wildcard '*' must be the last pattern in a route, otherwise use a '{param}'")
- }
-
- var tail byte = '/' // Default endpoint tail to / byte
-
- if ps >= 0 {
- // Param/Regexp pattern is next
- nt := ntParam
-
- // Read to closing } taking into account opens and closes in curl count (cc)
- cc := 0
- pe := ps
- for i, c := range pattern[ps:] {
- if c == '{' {
- cc++
- } else if c == '}' {
- cc--
- if cc == 0 {
- pe = ps + i
- break
- }
- }
- }
- if pe == ps {
- panic("chi: route param closing delimiter '}' is missing")
- }
-
- key := pattern[ps+1 : pe]
- pe++ // set end to next position
-
- if pe < len(pattern) {
- tail = pattern[pe]
- }
-
- var rexpat string
- if idx := strings.Index(key, ":"); idx >= 0 {
- nt = ntRegexp
- rexpat = key[idx+1:]
- key = key[:idx]
- }
-
- if len(rexpat) > 0 {
- if rexpat[0] != '^' {
- rexpat = "^" + rexpat
- }
- if rexpat[len(rexpat)-1] != '$' {
- rexpat = rexpat + "$"
- }
- }
-
- return nt, key, rexpat, tail, ps, pe
- }
-
- // Wildcard pattern as finale
- if ws < len(pattern)-1 {
- panic("chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead")
- }
- return ntCatchAll, "*", "", 0, ws, len(pattern)
-}
-
-func patParamKeys(pattern string) []string {
- pat := pattern
- paramKeys := []string{}
- for {
- ptyp, paramKey, _, _, _, e := patNextSegment(pat)
- if ptyp == ntStatic {
- return paramKeys
- }
- for i := 0; i < len(paramKeys); i++ {
- if paramKeys[i] == paramKey {
- panic(fmt.Sprintf("chi: routing pattern '%s' contains duplicate param key, '%s'", pattern, paramKey))
- }
- }
- paramKeys = append(paramKeys, paramKey)
- pat = pat[e:]
- }
-}
-
-// longestPrefix finds the length of the shared prefix
-// of two strings
-func longestPrefix(k1, k2 string) int {
- max := len(k1)
- if l := len(k2); l < max {
- max = l
- }
- var i int
- for i = 0; i < max; i++ {
- if k1[i] != k2[i] {
- break
- }
- }
- return i
-}
-
-func methodTypString(method methodTyp) string {
- for s, t := range methodMap {
- if method == t {
- return s
- }
- }
- return ""
-}
-
-type nodes []*node
-
-// Sort the list of nodes by label
-func (ns nodes) Sort() { sort.Sort(ns); ns.tailSort() }
-func (ns nodes) Len() int { return len(ns) }
-func (ns nodes) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] }
-func (ns nodes) Less(i, j int) bool { return ns[i].label < ns[j].label }
-
-// tailSort pushes nodes with '/' as the tail to the end of the list for param nodes.
-// The list order determines the traversal order.
-func (ns nodes) tailSort() {
- for i := len(ns) - 1; i >= 0; i-- {
- if ns[i].typ > ntStatic && ns[i].tail == '/' {
- ns.Swap(i, len(ns)-1)
- return
- }
- }
-}
-
-func (ns nodes) findEdge(label byte) *node {
- num := len(ns)
- idx := 0
- i, j := 0, num-1
- for i <= j {
- idx = i + (j-i)/2
- if label > ns[idx].label {
- i = idx + 1
- } else if label < ns[idx].label {
- j = idx - 1
- } else {
- i = num // breaks cond
- }
- }
- if ns[idx].label != label {
- return nil
- }
- return ns[idx]
-}
-
-// Route describes the details of a routing handler.
-type Route struct {
- Pattern string
- Handlers map[string]http.Handler
- SubRoutes Routes
-}
-
-// WalkFunc is the type of the function called for each method and route visited by Walk.
-type WalkFunc func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error
-
-// Walk walks any router tree that implements Routes interface.
-func Walk(r Routes, walkFn WalkFunc) error {
- return walk(r, walkFn, "")
-}
-
-func walk(r Routes, walkFn WalkFunc, parentRoute string, parentMw ...func(http.Handler) http.Handler) error {
- for _, route := range r.Routes() {
- mws := make([]func(http.Handler) http.Handler, len(parentMw))
- copy(mws, parentMw)
- mws = append(mws, r.Middlewares()...)
-
- if route.SubRoutes != nil {
- if err := walk(route.SubRoutes, walkFn, parentRoute+route.Pattern, mws...); err != nil {
- return err
- }
- continue
- }
-
- for method, handler := range route.Handlers {
- if method == "*" {
- // Ignore a "catchAll" method, since we pass down all the specific methods for each route.
- continue
- }
-
- fullRoute := parentRoute + route.Pattern
-
- if chain, ok := handler.(*ChainHandler); ok {
- if err := walkFn(method, fullRoute, chain.Endpoint, append(mws, chain.Middlewares...)...); err != nil {
- return err
- }
- } else {
- if err := walkFn(method, fullRoute, handler, mws...); err != nil {
- return err
- }
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/go-chi/chi/v5/.gitignore b/vendor/github.com/go-chi/chi/v5/.gitignore
deleted file mode 100644
index ba22c99a99e..00000000000
--- a/vendor/github.com/go-chi/chi/v5/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.idea
-*.sw?
-.vscode
diff --git a/vendor/github.com/go-chi/chi/v5/CHANGELOG.md b/vendor/github.com/go-chi/chi/v5/CHANGELOG.md
deleted file mode 100644
index ed54ae9d656..00000000000
--- a/vendor/github.com/go-chi/chi/v5/CHANGELOG.md
+++ /dev/null
@@ -1,279 +0,0 @@
-# Changelog
-
-## v5.0.0 (2021-02-27)
-
-- chi v5, `github.com/go-chi/chi/v5` introduces the adoption of Go's SIV to adhere to the current state-of-the-tools in Go.
-- chi v1.5.x did not work out as planned, as the Go tooling is too powerful and chi's adoption is too wide.
- The most responsible thing to do for everyone's benefit is to just release v5 with SIV, so I present to you all,
- chi v5 at `github.com/go-chi/chi/v5`. I hope someday the developer experience and ergonomics I've been seeking
- will still come to fruition in some form, see https://github.com/golang/go/issues/44550
-- History of changes: see https://github.com/go-chi/chi/compare/v1.5.4...v5.0.0
-
-
-## v1.5.4 (2021-02-27)
-
-- Undo prior retraction in v1.5.3 as we prepare for v5.0.0 release
-- History of changes: see https://github.com/go-chi/chi/compare/v1.5.3...v1.5.4
-
-
-## v1.5.3 (2021-02-21)
-
-- Update go.mod to go 1.16 with new retract directive marking all versions without prior go.mod support
-- History of changes: see https://github.com/go-chi/chi/compare/v1.5.2...v1.5.3
-
-
-## v1.5.2 (2021-02-10)
-
-- Reverting allocation optimization as a precaution as go test -race fails.
-- Minor improvements, see history below
-- History of changes: see https://github.com/go-chi/chi/compare/v1.5.1...v1.5.2
-
-
-## v1.5.1 (2020-12-06)
-
-- Performance improvement: removing 1 allocation by foregoing context.WithValue, thank you @bouk for
- your contribution (https://github.com/go-chi/chi/pull/555). Note: new benchmarks posted in README.
-- `middleware.CleanPath`: new middleware that clean's request path of double slashes
-- deprecate & remove `chi.ServerBaseContext` in favour of stdlib `http.Server#BaseContext`
-- plus other tiny improvements, see full commit history below
-- History of changes: see https://github.com/go-chi/chi/compare/v4.1.2...v1.5.1
-
-
-## v1.5.0 (2020-11-12) - now with go.mod support
-
-`chi` dates back to 2016 with it's original implementation as one of the first routers to adopt the newly introduced
-context.Context api to the stdlib -- set out to design a router that is faster, more modular and simpler than anything
-else out there -- while not introducing any custom handler types or dependencies. Today, `chi` still has zero dependencies,
-and in many ways is future proofed from changes, given it's minimal nature. Between versions, chi's iterations have been very
-incremental, with the architecture and api being the same today as it was originally designed in 2016. For this reason it
-makes chi a pretty easy project to maintain, as well thanks to the many amazing community contributions over the years
-to who all help make chi better (total of 86 contributors to date -- thanks all!).
-
-Chi has been an labour of love, art and engineering, with the goals to offer beautiful ergonomics, flexibility, performance
-and simplicity when building HTTP services with Go. I've strived to keep the router very minimal in surface area / code size,
-and always improving the code wherever possible -- and as of today the `chi` package is just 1082 lines of code (not counting
-middlewares, which are all optional). As well, I don't have the exact metrics, but from my analysis and email exchanges from
-companies and developers, chi is used by thousands of projects around the world -- thank you all as there is no better form of
-joy for me than to have art I had started be helpful and enjoyed by others. And of course I use chi in all of my own projects too :)
-
-For me, the asthetics of chi's code and usage are very important. With the introduction of Go's module support
-(which I'm a big fan of), chi's past versioning scheme choice to v2, v3 and v4 would mean I'd require the import path
-of "github.com/go-chi/chi/v4", leading to the lengthy discussion at https://github.com/go-chi/chi/issues/462.
-Haha, to some, you may be scratching your head why I've spent > 1 year stalling to adopt "/vXX" convention in the import
-path -- which isn't horrible in general -- but for chi, I'm unable to accept it as I strive for perfection in it's API design,
-aesthetics and simplicity. It just doesn't feel good to me given chi's simple nature -- I do not foresee a "v5" or "v6",
-and upgrading between versions in the future will also be just incremental.
-
-I do understand versioning is a part of the API design as well, which is why the solution for a while has been to "do nothing",
-as Go supports both old and new import paths with/out go.mod. However, now that Go module support has had time to iron out kinks and
-is adopted everywhere, it's time for chi to get with the times. Luckily, I've discovered a path forward that will make me happy,
-while also not breaking anyone's app who adopted a prior versioning from tags in v2/v3/v4. I've made an experimental release of
-v1.5.0 with go.mod silently, and tested it with new and old projects, to ensure the developer experience is preserved, and it's
-largely unnoticed. Fortunately, Go's toolchain will check the tags of a repo and consider the "latest" tag the one with go.mod.
-However, you can still request a specific older tag such as v4.1.2, and everything will "just work". But new users can just
-`go get github.com/go-chi/chi` or `go get github.com/go-chi/chi@latest` and they will get the latest version which contains
-go.mod support, which is v1.5.0+. `chi` will not change very much over the years, just like it hasn't changed much from 4 years ago.
-Therefore, we will stay on v1.x from here on, starting from v1.5.0. Any breaking changes will bump a "minor" release and
-backwards-compatible improvements/fixes will bump a "tiny" release.
-
-For existing projects who want to upgrade to the latest go.mod version, run: `go get -u github.com/go-chi/chi@v1.5.0`,
-which will get you on the go.mod version line (as Go's mod cache may still remember v4.x). Brand new systems can run
-`go get -u github.com/go-chi/chi` or `go get -u github.com/go-chi/chi@latest` to install chi, which will install v1.5.0+
-built with go.mod support.
-
-My apologies to the developers who will disagree with the decisions above, but, hope you'll try it and see it's a very
-minor request which is backwards compatible and won't break your existing installations.
-
-Cheers all, happy coding!
-
-
----
-
-
-## v4.1.2 (2020-06-02)
-
-- fix that handles MethodNotAllowed with path variables, thank you @caseyhadden for your contribution
-- fix to replace nested wildcards correctly in RoutePattern, thank you @@unmultimedio for your contribution
-- History of changes: see https://github.com/go-chi/chi/compare/v4.1.1...v4.1.2
-
-
-## v4.1.1 (2020-04-16)
-
-- fix for issue https://github.com/go-chi/chi/issues/411 which allows for overlapping regexp
- route to the correct handler through a recursive tree search, thanks to @Jahaja for the PR/fix!
-- new middleware.RouteHeaders as a simple router for request headers with wildcard support
-- History of changes: see https://github.com/go-chi/chi/compare/v4.1.0...v4.1.1
-
-
-## v4.1.0 (2020-04-1)
-
-- middleware.LogEntry: Write method on interface now passes the response header
- and an extra interface type useful for custom logger implementations.
-- middleware.WrapResponseWriter: minor fix
-- middleware.Recoverer: a bit prettier
-- History of changes: see https://github.com/go-chi/chi/compare/v4.0.4...v4.1.0
-
-## v4.0.4 (2020-03-24)
-
-- middleware.Recoverer: new pretty stack trace printing (https://github.com/go-chi/chi/pull/496)
-- a few minor improvements and fixes
-- History of changes: see https://github.com/go-chi/chi/compare/v4.0.3...v4.0.4
-
-
-## v4.0.3 (2020-01-09)
-
-- core: fix regexp routing to include default value when param is not matched
-- middleware: rewrite of middleware.Compress
-- middleware: suppress http.ErrAbortHandler in middleware.Recoverer
-- History of changes: see https://github.com/go-chi/chi/compare/v4.0.2...v4.0.3
-
-
-## v4.0.2 (2019-02-26)
-
-- Minor fixes
-- History of changes: see https://github.com/go-chi/chi/compare/v4.0.1...v4.0.2
-
-
-## v4.0.1 (2019-01-21)
-
-- Fixes issue with compress middleware: #382 #385
-- History of changes: see https://github.com/go-chi/chi/compare/v4.0.0...v4.0.1
-
-
-## v4.0.0 (2019-01-10)
-
-- chi v4 requires Go 1.10.3+ (or Go 1.9.7+) - we have deprecated support for Go 1.7 and 1.8
-- router: respond with 404 on router with no routes (#362)
-- router: additional check to ensure wildcard is at the end of a url pattern (#333)
-- middleware: deprecate use of http.CloseNotifier (#347)
-- middleware: fix RedirectSlashes to include query params on redirect (#334)
-- History of changes: see https://github.com/go-chi/chi/compare/v3.3.4...v4.0.0
-
-
-## v3.3.4 (2019-01-07)
-
-- Minor middleware improvements. No changes to core library/router. Moving v3 into its
-- own branch as a version of chi for Go 1.7, 1.8, 1.9, 1.10, 1.11
-- History of changes: see https://github.com/go-chi/chi/compare/v3.3.3...v3.3.4
-
-
-## v3.3.3 (2018-08-27)
-
-- Minor release
-- See https://github.com/go-chi/chi/compare/v3.3.2...v3.3.3
-
-
-## v3.3.2 (2017-12-22)
-
-- Support to route trailing slashes on mounted sub-routers (#281)
-- middleware: new `ContentCharset` to check matching charsets. Thank you
- @csucu for your community contribution!
-
-
-## v3.3.1 (2017-11-20)
-
-- middleware: new `AllowContentType` handler for explicit whitelist of accepted request Content-Types
-- middleware: new `SetHeader` handler for short-hand middleware to set a response header key/value
-- Minor bug fixes
-
-
-## v3.3.0 (2017-10-10)
-
-- New chi.RegisterMethod(method) to add support for custom HTTP methods, see _examples/custom-method for usage
-- Deprecated LINK and UNLINK methods from the default list, please use `chi.RegisterMethod("LINK")` and `chi.RegisterMethod("UNLINK")` in an `init()` function
-
-
-## v3.2.1 (2017-08-31)
-
-- Add new `Match(rctx *Context, method, path string) bool` method to `Routes` interface
- and `Mux`. Match searches the mux's routing tree for a handler that matches the method/path
-- Add new `RouteMethod` to `*Context`
-- Add new `Routes` pointer to `*Context`
-- Add new `middleware.GetHead` to route missing HEAD requests to GET handler
-- Updated benchmarks (see README)
-
-
-## v3.1.5 (2017-08-02)
-
-- Setup golint and go vet for the project
-- As per golint, we've redefined `func ServerBaseContext(h http.Handler, baseCtx context.Context) http.Handler`
- to `func ServerBaseContext(baseCtx context.Context, h http.Handler) http.Handler`
-
-
-## v3.1.0 (2017-07-10)
-
-- Fix a few minor issues after v3 release
-- Move `docgen` sub-pkg to https://github.com/go-chi/docgen
-- Move `render` sub-pkg to https://github.com/go-chi/render
-- Add new `URLFormat` handler to chi/middleware sub-pkg to make working with url mime
- suffixes easier, ie. parsing `/articles/1.json` and `/articles/1.xml`. See comments in
- https://github.com/go-chi/chi/blob/master/middleware/url_format.go for example usage.
-
-
-## v3.0.0 (2017-06-21)
-
-- Major update to chi library with many exciting updates, but also some *breaking changes*
-- URL parameter syntax changed from `/:id` to `/{id}` for even more flexible routing, such as
- `/articles/{month}-{day}-{year}-{slug}`, `/articles/{id}`, and `/articles/{id}.{ext}` on the
- same router
-- Support for regexp for routing patterns, in the form of `/{paramKey:regExp}` for example:
- `r.Get("/articles/{name:[a-z]+}", h)` and `chi.URLParam(r, "name")`
-- Add `Method` and `MethodFunc` to `chi.Router` to allow routing definitions such as
- `r.Method("GET", "/", h)` which provides a cleaner interface for custom handlers like
- in `_examples/custom-handler`
-- Deprecating `mux#FileServer` helper function. Instead, we encourage users to create their
- own using file handler with the stdlib, see `_examples/fileserver` for an example
-- Add support for LINK/UNLINK http methods via `r.Method()` and `r.MethodFunc()`
-- Moved the chi project to its own organization, to allow chi-related community packages to
- be easily discovered and supported, at: https://github.com/go-chi
-- *NOTE:* please update your import paths to `"github.com/go-chi/chi"`
-- *NOTE:* chi v2 is still available at https://github.com/go-chi/chi/tree/v2
-
-
-## v2.1.0 (2017-03-30)
-
-- Minor improvements and update to the chi core library
-- Introduced a brand new `chi/render` sub-package to complete the story of building
- APIs to offer a pattern for managing well-defined request / response payloads. Please
- check out the updated `_examples/rest` example for how it works.
-- Added `MethodNotAllowed(h http.HandlerFunc)` to chi.Router interface
-
-
-## v2.0.0 (2017-01-06)
-
-- After many months of v2 being in an RC state with many companies and users running it in
- production, the inclusion of some improvements to the middlewares, we are very pleased to
- announce v2.0.0 of chi.
-
-
-## v2.0.0-rc1 (2016-07-26)
-
-- Huge update! chi v2 is a large refactor targetting Go 1.7+. As of Go 1.7, the popular
- community `"net/context"` package has been included in the standard library as `"context"` and
- utilized by `"net/http"` and `http.Request` to managing deadlines, cancelation signals and other
- request-scoped values. We're very excited about the new context addition and are proud to
- introduce chi v2, a minimal and powerful routing package for building large HTTP services,
- with zero external dependencies. Chi focuses on idiomatic design and encourages the use of
- stdlib HTTP handlers and middlwares.
-- chi v2 deprecates its `chi.Handler` interface and requires `http.Handler` or `http.HandlerFunc`
-- chi v2 stores URL routing parameters and patterns in the standard request context: `r.Context()`
-- chi v2 lower-level routing context is accessible by `chi.RouteContext(r.Context()) *chi.Context`,
- which provides direct access to URL routing parameters, the routing path and the matching
- routing patterns.
-- Users upgrading from chi v1 to v2, need to:
- 1. Update the old chi.Handler signature, `func(ctx context.Context, w http.ResponseWriter, r *http.Request)` to
- the standard http.Handler: `func(w http.ResponseWriter, r *http.Request)`
- 2. Use `chi.URLParam(r *http.Request, paramKey string) string`
- or `URLParamFromCtx(ctx context.Context, paramKey string) string` to access a url parameter value
-
-
-## v1.0.0 (2016-07-01)
-
-- Released chi v1 stable https://github.com/go-chi/chi/tree/v1.0.0 for Go 1.6 and older.
-
-
-## v0.9.0 (2016-03-31)
-
-- Reuse context objects via sync.Pool for zero-allocation routing [#33](https://github.com/go-chi/chi/pull/33)
-- BREAKING NOTE: due to subtle API changes, previously `chi.URLParams(ctx)["id"]` used to access url parameters
- has changed to: `chi.URLParam(ctx, "id")`
diff --git a/vendor/github.com/go-chi/chi/v5/CONTRIBUTING.md b/vendor/github.com/go-chi/chi/v5/CONTRIBUTING.md
deleted file mode 100644
index c0ac2dfe853..00000000000
--- a/vendor/github.com/go-chi/chi/v5/CONTRIBUTING.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributing
-
-## Prerequisites
-
-1. [Install Go][go-install].
-2. Download the sources and switch the working directory:
-
- ```bash
- go get -u -d github.com/go-chi/chi
- cd $GOPATH/src/github.com/go-chi/chi
- ```
-
-## Submitting a Pull Request
-
-A typical workflow is:
-
-1. [Fork the repository.][fork] [This tip maybe also helpful.][go-fork-tip]
-2. [Create a topic branch.][branch]
-3. Add tests for your change.
-4. Run `go test`. If your tests pass, return to the step 3.
-5. Implement the change and ensure the steps from the previous step pass.
-6. Run `goimports -w .`, to ensure the new code conforms to Go formatting guideline.
-7. [Add, commit and push your changes.][git-help]
-8. [Submit a pull request.][pull-req]
-
-[go-install]: https://golang.org/doc/install
-[go-fork-tip]: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
-[fork]: https://help.github.com/articles/fork-a-repo
-[branch]: http://learn.github.com/p/branching.html
-[git-help]: https://guides.github.com
-[pull-req]: https://help.github.com/articles/using-pull-requests
diff --git a/vendor/github.com/go-chi/chi/v5/LICENSE b/vendor/github.com/go-chi/chi/v5/LICENSE
deleted file mode 100644
index d99f02ffac5..00000000000
--- a/vendor/github.com/go-chi/chi/v5/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015-present Peter Kieltyka (https://github.com/pkieltyka), Google Inc.
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/go-chi/chi/v5/Makefile b/vendor/github.com/go-chi/chi/v5/Makefile
deleted file mode 100644
index b96c92dd214..00000000000
--- a/vendor/github.com/go-chi/chi/v5/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all:
- @echo "**********************************************************"
- @echo "** chi build tool **"
- @echo "**********************************************************"
-
-
-test:
- go clean -testcache && $(MAKE) test-router && $(MAKE) test-middleware
-
-test-router:
- go test -race -v .
-
-test-middleware:
- go test -race -v ./middleware
diff --git a/vendor/github.com/go-chi/chi/v5/README.md b/vendor/github.com/go-chi/chi/v5/README.md
deleted file mode 100644
index 55416e15e2f..00000000000
--- a/vendor/github.com/go-chi/chi/v5/README.md
+++ /dev/null
@@ -1,511 +0,0 @@
-#
-
-
-[![GoDoc Widget]][GoDoc] [![Travis Widget]][Travis]
-
-`chi` is a lightweight, idiomatic and composable router for building Go HTTP services. It's
-especially good at helping you write large REST API services that are kept maintainable as your
-project grows and changes. `chi` is built on the new `context` package introduced in Go 1.7 to
-handle signaling, cancelation and request-scoped values across a handler chain.
-
-The focus of the project has been to seek out an elegant and comfortable design for writing
-REST API servers, written during the development of the Pressly API service that powers our
-public API service, which in turn powers all of our client-side applications.
-
-The key considerations of chi's design are: project structure, maintainability, standard http
-handlers (stdlib-only), developer productivity, and deconstructing a large system into many small
-parts. The core router `github.com/go-chi/chi` is quite small (less than 1000 LOC), but we've also
-included some useful/optional subpackages: [middleware](/middleware), [render](https://github.com/go-chi/render)
-and [docgen](https://github.com/go-chi/docgen). We hope you enjoy it too!
-
-## Install
-
-`go get -u github.com/go-chi/chi/v5`
-
-
-## Features
-
-* **Lightweight** - cloc'd in ~1000 LOC for the chi router
-* **Fast** - yes, see [benchmarks](#benchmarks)
-* **100% compatible with net/http** - use any http or middleware pkg in the ecosystem that is also compatible with `net/http`
-* **Designed for modular/composable APIs** - middlewares, inline middlewares, route groups and sub-router mounting
-* **Context control** - built on new `context` package, providing value chaining, cancellations and timeouts
-* **Robust** - in production at Pressly, CloudFlare, Heroku, 99Designs, and many others (see [discussion](https://github.com/go-chi/chi/issues/91))
-* **Doc generation** - `docgen` auto-generates routing documentation from your source to JSON or Markdown
-* **Go.mod support** - v1.x of chi (starting from v1.5.0), now has go.mod support (see [CHANGELOG](https://github.com/go-chi/chi/blob/master/CHANGELOG.md#v150-2020-11-12---now-with-gomod-support))
-* **No external dependencies** - plain ol' Go stdlib + net/http
-
-
-## Examples
-
-See [_examples/](https://github.com/go-chi/chi/blob/master/_examples/) for a variety of examples.
-
-
-**As easy as:**
-
-```go
-package main
-
-import (
- "net/http"
-
- "github.com/go-chi/chi/v5"
- "github.com/go-chi/chi/v5/middleware"
-)
-
-func main() {
- r := chi.NewRouter()
- r.Use(middleware.Logger)
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("welcome"))
- })
- http.ListenAndServe(":3000", r)
-}
-```
-
-**REST Preview:**
-
-Here is a little preview of how routing looks like with chi. Also take a look at the generated routing docs
-in JSON ([routes.json](https://github.com/go-chi/chi/blob/master/_examples/rest/routes.json)) and in
-Markdown ([routes.md](https://github.com/go-chi/chi/blob/master/_examples/rest/routes.md)).
-
-I highly recommend reading the source of the [examples](https://github.com/go-chi/chi/blob/master/_examples/) listed
-above, they will show you all the features of chi and serve as a good form of documentation.
-
-```go
-import (
- //...
- "context"
- "github.com/go-chi/chi/v5"
- "github.com/go-chi/chi/v5/middleware"
-)
-
-func main() {
- r := chi.NewRouter()
-
- // A good base middleware stack
- r.Use(middleware.RequestID)
- r.Use(middleware.RealIP)
- r.Use(middleware.Logger)
- r.Use(middleware.Recoverer)
-
- // Set a timeout value on the request context (ctx), that will signal
- // through ctx.Done() that the request has timed out and further
- // processing should be stopped.
- r.Use(middleware.Timeout(60 * time.Second))
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("hi"))
- })
-
- // RESTy routes for "articles" resource
- r.Route("/articles", func(r chi.Router) {
- r.With(paginate).Get("/", listArticles) // GET /articles
- r.With(paginate).Get("/{month}-{day}-{year}", listArticlesByDate) // GET /articles/01-16-2017
-
- r.Post("/", createArticle) // POST /articles
- r.Get("/search", searchArticles) // GET /articles/search
-
- // Regexp url parameters:
- r.Get("/{articleSlug:[a-z-]+}", getArticleBySlug) // GET /articles/home-is-toronto
-
- // Subrouters:
- r.Route("/{articleID}", func(r chi.Router) {
- r.Use(ArticleCtx)
- r.Get("/", getArticle) // GET /articles/123
- r.Put("/", updateArticle) // PUT /articles/123
- r.Delete("/", deleteArticle) // DELETE /articles/123
- })
- })
-
- // Mount the admin sub-router
- r.Mount("/admin", adminRouter())
-
- http.ListenAndServe(":3333", r)
-}
-
-func ArticleCtx(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- articleID := chi.URLParam(r, "articleID")
- article, err := dbGetArticle(articleID)
- if err != nil {
- http.Error(w, http.StatusText(404), 404)
- return
- }
- ctx := context.WithValue(r.Context(), "article", article)
- next.ServeHTTP(w, r.WithContext(ctx))
- })
-}
-
-func getArticle(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- article, ok := ctx.Value("article").(*Article)
- if !ok {
- http.Error(w, http.StatusText(422), 422)
- return
- }
- w.Write([]byte(fmt.Sprintf("title:%s", article.Title)))
-}
-
-// A completely separate router for administrator routes
-func adminRouter() http.Handler {
- r := chi.NewRouter()
- r.Use(AdminOnly)
- r.Get("/", adminIndex)
- r.Get("/accounts", adminListAccounts)
- return r
-}
-
-func AdminOnly(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- perm, ok := ctx.Value("acl.permission").(YourPermissionType)
- if !ok || !perm.IsAdmin() {
- http.Error(w, http.StatusText(403), 403)
- return
- }
- next.ServeHTTP(w, r)
- })
-}
-```
-
-
-## Router interface
-
-chi's router is based on a kind of [Patricia Radix trie](https://en.wikipedia.org/wiki/Radix_tree).
-The router is fully compatible with `net/http`.
-
-Built on top of the tree is the `Router` interface:
-
-```go
-// Router consisting of the core routing methods used by chi's Mux,
-// using only the standard net/http.
-type Router interface {
- http.Handler
- Routes
-
- // Use appends one or more middlewares onto the Router stack.
- Use(middlewares ...func(http.Handler) http.Handler)
-
- // With adds inline middlewares for an endpoint handler.
- With(middlewares ...func(http.Handler) http.Handler) Router
-
- // Group adds a new inline-Router along the current routing
- // path, with a fresh middleware stack for the inline-Router.
- Group(fn func(r Router)) Router
-
- // Route mounts a sub-Router along a `pattern`` string.
- Route(pattern string, fn func(r Router)) Router
-
- // Mount attaches another http.Handler along ./pattern/*
- Mount(pattern string, h http.Handler)
-
- // Handle and HandleFunc adds routes for `pattern` that matches
- // all HTTP methods.
- Handle(pattern string, h http.Handler)
- HandleFunc(pattern string, h http.HandlerFunc)
-
- // Method and MethodFunc adds routes for `pattern` that matches
- // the `method` HTTP method.
- Method(method, pattern string, h http.Handler)
- MethodFunc(method, pattern string, h http.HandlerFunc)
-
- // HTTP-method routing along `pattern`
- Connect(pattern string, h http.HandlerFunc)
- Delete(pattern string, h http.HandlerFunc)
- Get(pattern string, h http.HandlerFunc)
- Head(pattern string, h http.HandlerFunc)
- Options(pattern string, h http.HandlerFunc)
- Patch(pattern string, h http.HandlerFunc)
- Post(pattern string, h http.HandlerFunc)
- Put(pattern string, h http.HandlerFunc)
- Trace(pattern string, h http.HandlerFunc)
-
- // NotFound defines a handler to respond whenever a route could
- // not be found.
- NotFound(h http.HandlerFunc)
-
- // MethodNotAllowed defines a handler to respond whenever a method is
- // not allowed.
- MethodNotAllowed(h http.HandlerFunc)
-}
-
-// Routes interface adds two methods for router traversal, which is also
-// used by the github.com/go-chi/docgen package to generate documentation for Routers.
-type Routes interface {
- // Routes returns the routing tree in an easily traversable structure.
- Routes() []Route
-
- // Middlewares returns the list of middlewares in use by the router.
- Middlewares() Middlewares
-
- // Match searches the routing tree for a handler that matches
- // the method/path - similar to routing a http request, but without
- // executing the handler thereafter.
- Match(rctx *Context, method, path string) bool
-}
-```
-
-Each routing method accepts a URL `pattern` and chain of `handlers`. The URL pattern
-supports named params (ie. `/users/{userID}`) and wildcards (ie. `/admin/*`). URL parameters
-can be fetched at runtime by calling `chi.URLParam(r, "userID")` for named parameters
-and `chi.URLParam(r, "*")` for a wildcard parameter.
-
-
-### Middleware handlers
-
-chi's middlewares are just stdlib net/http middleware handlers. There is nothing special
-about them, which means the router and all the tooling is designed to be compatible and
-friendly with any middleware in the community. This offers much better extensibility and reuse
-of packages and is at the heart of chi's purpose.
-
-Here is an example of a standard net/http middleware where we assign a context key `"user"`
-the value of `"123"`. This middleware sets a hypothetical user identifier on the request
-context and calls the next handler in the chain.
-
-```go
-// HTTP middleware setting a value on the request context
-func MyMiddleware(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- // create new context from `r` request context, and assign key `"user"`
- // to value of `"123"`
- ctx := context.WithValue(r.Context(), "user", "123")
-
- // call the next handler in the chain, passing the response writer and
- // the updated request object with the new context value.
- //
- // note: context.Context values are nested, so any previously set
- // values will be accessible as well, and the new `"user"` key
- // will be accessible from this point forward.
- next.ServeHTTP(w, r.WithContext(ctx))
- })
-}
-```
-
-
-### Request handlers
-
-chi uses standard net/http request handlers. This little snippet is an example of a http.Handler
-func that reads a user identifier from the request context - hypothetically, identifying
-the user sending an authenticated request, validated+set by a previous middleware handler.
-
-```go
-// HTTP handler accessing data from the request context.
-func MyRequestHandler(w http.ResponseWriter, r *http.Request) {
- // here we read from the request context and fetch out `"user"` key set in
- // the MyMiddleware example above.
- user := r.Context().Value("user").(string)
-
- // respond to the client
- w.Write([]byte(fmt.Sprintf("hi %s", user)))
-}
-```
-
-
-### URL parameters
-
-chi's router parses and stores URL parameters right onto the request context. Here is
-an example of how to access URL params in your net/http handlers. And of course, middlewares
-are able to access the same information.
-
-```go
-// HTTP handler accessing the url routing parameters.
-func MyRequestHandler(w http.ResponseWriter, r *http.Request) {
- // fetch the url parameter `"userID"` from the request of a matching
- // routing pattern. An example routing pattern could be: /users/{userID}
- userID := chi.URLParam(r, "userID")
-
- // fetch `"key"` from the request context
- ctx := r.Context()
- key := ctx.Value("key").(string)
-
- // respond to the client
- w.Write([]byte(fmt.Sprintf("hi %v, %v", userID, key)))
-}
-```
-
-
-## Middlewares
-
-chi comes equipped with an optional `middleware` package, providing a suite of standard
-`net/http` middlewares. Please note, any middleware in the ecosystem that is also compatible
-with `net/http` can be used with chi's mux.
-
-### Core middlewares
-
-----------------------------------------------------------------------------------------------------
-| chi/middleware Handler | description |
-| :--------------------- | :---------------------------------------------------------------------- |
-| [AllowContentEncoding] | Enforces a whitelist of request Content-Encoding headers |
-| [AllowContentType] | Explicit whitelist of accepted request Content-Types |
-| [BasicAuth] | Basic HTTP authentication |
-| [Compress] | Gzip compression for clients that accept compressed responses |
-| [ContentCharset] | Ensure charset for Content-Type request headers |
-| [CleanPath] | Clean double slashes from request path |
-| [GetHead] | Automatically route undefined HEAD requests to GET handlers |
-| [Heartbeat] | Monitoring endpoint to check the servers pulse |
-| [Logger] | Logs the start and end of each request with the elapsed processing time |
-| [NoCache] | Sets response headers to prevent clients from caching |
-| [Profiler] | Easily attach net/http/pprof to your routers |
-| [RealIP] | Sets a http.Request's RemoteAddr to either X-Forwarded-For or X-Real-IP |
-| [Recoverer] | Gracefully absorb panics and prints the stack trace |
-| [RequestID] | Injects a request ID into the context of each request |
-| [RedirectSlashes] | Redirect slashes on routing paths |
-| [RouteHeaders] | Route handling for request headers |
-| [SetHeader] | Short-hand middleware to set a response header key/value |
-| [StripSlashes] | Strip slashes on routing paths |
-| [Throttle] | Puts a ceiling on the number of concurrent requests |
-| [Timeout] | Signals to the request context when the timeout deadline is reached |
-| [URLFormat] | Parse extension from url and put it on request context |
-| [WithValue] | Short-hand middleware to set a key/value on the request context |
-----------------------------------------------------------------------------------------------------
-
-[AllowContentEncoding]: https://pkg.go.dev/github.com/go-chi/chi/middleware#AllowContentEncoding
-[AllowContentType]: https://pkg.go.dev/github.com/go-chi/chi/middleware#AllowContentType
-[BasicAuth]: https://pkg.go.dev/github.com/go-chi/chi/middleware#BasicAuth
-[Compress]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Compress
-[ContentCharset]: https://pkg.go.dev/github.com/go-chi/chi/middleware#ContentCharset
-[CleanPath]: https://pkg.go.dev/github.com/go-chi/chi/middleware#CleanPath
-[GetHead]: https://pkg.go.dev/github.com/go-chi/chi/middleware#GetHead
-[GetReqID]: https://pkg.go.dev/github.com/go-chi/chi/middleware#GetReqID
-[Heartbeat]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Heartbeat
-[Logger]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Logger
-[NoCache]: https://pkg.go.dev/github.com/go-chi/chi/middleware#NoCache
-[Profiler]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Profiler
-[RealIP]: https://pkg.go.dev/github.com/go-chi/chi/middleware#RealIP
-[Recoverer]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Recoverer
-[RedirectSlashes]: https://pkg.go.dev/github.com/go-chi/chi/middleware#RedirectSlashes
-[RequestLogger]: https://pkg.go.dev/github.com/go-chi/chi/middleware#RequestLogger
-[RequestID]: https://pkg.go.dev/github.com/go-chi/chi/middleware#RequestID
-[RouteHeaders]: https://pkg.go.dev/github.com/go-chi/chi/middleware#RouteHeaders
-[SetHeader]: https://pkg.go.dev/github.com/go-chi/chi/middleware#SetHeader
-[StripSlashes]: https://pkg.go.dev/github.com/go-chi/chi/middleware#StripSlashes
-[Throttle]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Throttle
-[ThrottleBacklog]: https://pkg.go.dev/github.com/go-chi/chi/middleware#ThrottleBacklog
-[ThrottleWithOpts]: https://pkg.go.dev/github.com/go-chi/chi/middleware#ThrottleWithOpts
-[Timeout]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Timeout
-[URLFormat]: https://pkg.go.dev/github.com/go-chi/chi/middleware#URLFormat
-[WithLogEntry]: https://pkg.go.dev/github.com/go-chi/chi/middleware#WithLogEntry
-[WithValue]: https://pkg.go.dev/github.com/go-chi/chi/middleware#WithValue
-[Compressor]: https://pkg.go.dev/github.com/go-chi/chi/middleware#Compressor
-[DefaultLogFormatter]: https://pkg.go.dev/github.com/go-chi/chi/middleware#DefaultLogFormatter
-[EncoderFunc]: https://pkg.go.dev/github.com/go-chi/chi/middleware#EncoderFunc
-[HeaderRoute]: https://pkg.go.dev/github.com/go-chi/chi/middleware#HeaderRoute
-[HeaderRouter]: https://pkg.go.dev/github.com/go-chi/chi/middleware#HeaderRouter
-[LogEntry]: https://pkg.go.dev/github.com/go-chi/chi/middleware#LogEntry
-[LogFormatter]: https://pkg.go.dev/github.com/go-chi/chi/middleware#LogFormatter
-[LoggerInterface]: https://pkg.go.dev/github.com/go-chi/chi/middleware#LoggerInterface
-[ThrottleOpts]: https://pkg.go.dev/github.com/go-chi/chi/middleware#ThrottleOpts
-[WrapResponseWriter]: https://pkg.go.dev/github.com/go-chi/chi/middleware#WrapResponseWriter
-
-### Extra middlewares & packages
-
-Please see https://github.com/go-chi for additional packages.
-
---------------------------------------------------------------------------------------------------------------------
-| package | description |
-|:---------------------------------------------------|:-------------------------------------------------------------
-| [cors](https://github.com/go-chi/cors) | Cross-origin resource sharing (CORS) |
-| [docgen](https://github.com/go-chi/docgen) | Print chi.Router routes at runtime |
-| [jwtauth](https://github.com/go-chi/jwtauth) | JWT authentication |
-| [hostrouter](https://github.com/go-chi/hostrouter) | Domain/host based request routing |
-| [httplog](https://github.com/go-chi/httplog) | Small but powerful structured HTTP request logging |
-| [httprate](https://github.com/go-chi/httprate) | HTTP request rate limiter |
-| [httptracer](https://github.com/go-chi/httptracer) | HTTP request performance tracing library |
-| [httpvcr](https://github.com/go-chi/httpvcr) | Write deterministic tests for external sources |
-| [stampede](https://github.com/go-chi/stampede) | HTTP request coalescer |
---------------------------------------------------------------------------------------------------------------------
-
-
-## context?
-
-`context` is a tiny pkg that provides simple interface to signal context across call stacks
-and goroutines. It was originally written by [Sameer Ajmani](https://github.com/Sajmani)
-and is available in stdlib since go1.7.
-
-Learn more at https://blog.golang.org/context
-
-and..
-* Docs: https://golang.org/pkg/context
-* Source: https://github.com/golang/go/tree/master/src/context
-
-
-## Benchmarks
-
-The benchmark suite: https://github.com/pkieltyka/go-http-routing-benchmark
-
-Results as of Nov 29, 2020 with Go 1.15.5 on Linux AMD 3950x
-
-```shell
-BenchmarkChi_Param 3075895 384 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_Param5 2116603 566 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_Param20 964117 1227 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_ParamWrite 2863413 420 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GithubStatic 3045488 395 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GithubParam 2204115 540 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GithubAll 10000 113811 ns/op 81203 B/op 406 allocs/op
-BenchmarkChi_GPlusStatic 3337485 359 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GPlusParam 2825853 423 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GPlus2Params 2471697 483 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_GPlusAll 194220 5950 ns/op 5200 B/op 26 allocs/op
-BenchmarkChi_ParseStatic 3365324 356 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_ParseParam 2976614 404 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_Parse2Params 2638084 439 ns/op 400 B/op 2 allocs/op
-BenchmarkChi_ParseAll 109567 11295 ns/op 10400 B/op 52 allocs/op
-BenchmarkChi_StaticAll 16846 71308 ns/op 62802 B/op 314 allocs/op
-```
-
-Comparison with other routers: https://gist.github.com/pkieltyka/123032f12052520aaccab752bd3e78cc
-
-NOTE: the allocs in the benchmark above are from the calls to http.Request's
-`WithContext(context.Context)` method that clones the http.Request, sets the `Context()`
-on the duplicated (alloc'd) request and returns it the new request object. This is just
-how setting context on a request in Go works.
-
-
-## Go module support & note on chi's versioning
-
-* Go.mod support means we reset our versioning starting from v1.5 (see [CHANGELOG](https://github.com/go-chi/chi/blob/master/CHANGELOG.md#v150-2020-11-12---now-with-gomod-support))
-* All older tags are preserved, are backwards-compatible and will "just work" as they
-* Brand new systems can run `go get -u github.com/go-chi/chi` as normal, or `go get -u github.com/go-chi/chi@latest`
-to install chi, which will install v1.x+ built with go.mod support, starting from v1.5.0.
-* For existing projects who want to upgrade to the latest go.mod version, run: `go get -u github.com/go-chi/chi@v1.5.0`,
-which will get you on the go.mod version line (as Go's mod cache may still remember v4.x).
-* Any breaking changes will bump a "minor" release and backwards-compatible improvements/fixes will bump a "tiny" release.
-
-
-## Credits
-
-* Carl Jackson for https://github.com/zenazn/goji
- * Parts of chi's thinking comes from goji, and chi's middleware package
- sources from goji.
-* Armon Dadgar for https://github.com/armon/go-radix
-* Contributions: [@VojtechVitek](https://github.com/VojtechVitek)
-
-We'll be more than happy to see [your contributions](./CONTRIBUTING.md)!
-
-
-## Beyond REST
-
-chi is just a http router that lets you decompose request handling into many smaller layers.
-Many companies use chi to write REST services for their public APIs. But, REST is just a convention
-for managing state via HTTP, and there's a lot of other pieces required to write a complete client-server
-system or network of microservices.
-
-Looking beyond REST, I also recommend some newer works in the field:
-* [webrpc](https://github.com/webrpc/webrpc) - Web-focused RPC client+server framework with code-gen
-* [gRPC](https://github.com/grpc/grpc-go) - Google's RPC framework via protobufs
-* [graphql](https://github.com/99designs/gqlgen) - Declarative query language
-* [NATS](https://nats.io) - lightweight pub-sub
-
-
-## License
-
-Copyright (c) 2015-present [Peter Kieltyka](https://github.com/pkieltyka)
-
-Licensed under [MIT License](./LICENSE)
-
-[GoDoc]: https://pkg.go.dev/github.com/go-chi/chi?tab=versions
-[GoDoc Widget]: https://godoc.org/github.com/go-chi/chi?status.svg
-[Travis]: https://travis-ci.org/go-chi/chi
-[Travis Widget]: https://travis-ci.org/go-chi/chi.svg?branch=master
diff --git a/vendor/github.com/go-chi/chi/v5/chain.go b/vendor/github.com/go-chi/chi/v5/chain.go
deleted file mode 100644
index 88e68461386..00000000000
--- a/vendor/github.com/go-chi/chi/v5/chain.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package chi
-
-import "net/http"
-
-// Chain returns a Middlewares type from a slice of middleware handlers.
-func Chain(middlewares ...func(http.Handler) http.Handler) Middlewares {
- return Middlewares(middlewares)
-}
-
-// Handler builds and returns a http.Handler from the chain of middlewares,
-// with `h http.Handler` as the final handler.
-func (mws Middlewares) Handler(h http.Handler) http.Handler {
- return &ChainHandler{mws, h, chain(mws, h)}
-}
-
-// HandlerFunc builds and returns a http.Handler from the chain of middlewares,
-// with `h http.Handler` as the final handler.
-func (mws Middlewares) HandlerFunc(h http.HandlerFunc) http.Handler {
- return &ChainHandler{mws, h, chain(mws, h)}
-}
-
-// ChainHandler is a http.Handler with support for handler composition and
-// execution.
-type ChainHandler struct {
- Middlewares Middlewares
- Endpoint http.Handler
- chain http.Handler
-}
-
-func (c *ChainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- c.chain.ServeHTTP(w, r)
-}
-
-// chain builds a http.Handler composed of an inline middleware stack and endpoint
-// handler in the order they are passed.
-func chain(middlewares []func(http.Handler) http.Handler, endpoint http.Handler) http.Handler {
- // Return ahead of time if there aren't any middlewares for the chain
- if len(middlewares) == 0 {
- return endpoint
- }
-
- // Wrap the end handler with the middleware chain
- h := middlewares[len(middlewares)-1](endpoint)
- for i := len(middlewares) - 2; i >= 0; i-- {
- h = middlewares[i](h)
- }
-
- return h
-}
diff --git a/vendor/github.com/go-chi/chi/v5/chi.go b/vendor/github.com/go-chi/chi/v5/chi.go
deleted file mode 100644
index d2e5354dc11..00000000000
--- a/vendor/github.com/go-chi/chi/v5/chi.go
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// Package chi is a small, idiomatic and composable router for building HTTP services.
-//
-// chi requires Go 1.10 or newer.
-//
-// Example:
-// package main
-//
-// import (
-// "net/http"
-//
-// "github.com/go-chi/chi/v5"
-// "github.com/go-chi/chi/v5/middleware"
-// )
-//
-// func main() {
-// r := chi.NewRouter()
-// r.Use(middleware.Logger)
-// r.Use(middleware.Recoverer)
-//
-// r.Get("/", func(w http.ResponseWriter, r *http.Request) {
-// w.Write([]byte("root."))
-// })
-//
-// http.ListenAndServe(":3333", r)
-// }
-//
-// See github.com/go-chi/chi/_examples/ for more in-depth examples.
-//
-// URL patterns allow for easy matching of path components in HTTP
-// requests. The matching components can then be accessed using
-// chi.URLParam(). All patterns must begin with a slash.
-//
-// A simple named placeholder {name} matches any sequence of characters
-// up to the next / or the end of the URL. Trailing slashes on paths must
-// be handled explicitly.
-//
-// A placeholder with a name followed by a colon allows a regular
-// expression match, for example {number:\\d+}. The regular expression
-// syntax is Go's normal regexp RE2 syntax, except that regular expressions
-// including { or } are not supported, and / will never be
-// matched. An anonymous regexp pattern is allowed, using an empty string
-// before the colon in the placeholder, such as {:\\d+}
-//
-// The special placeholder of asterisk matches the rest of the requested
-// URL. Any trailing characters in the pattern are ignored. This is the only
-// placeholder which will match / characters.
-//
-// Examples:
-// "/user/{name}" matches "/user/jsmith" but not "/user/jsmith/info" or "/user/jsmith/"
-// "/user/{name}/info" matches "/user/jsmith/info"
-// "/page/*" matches "/page/intro/latest"
-// "/page/*/index" also matches "/page/intro/latest"
-// "/date/{yyyy:\\d\\d\\d\\d}/{mm:\\d\\d}/{dd:\\d\\d}" matches "/date/2017/04/01"
-//
-package chi
-
-import "net/http"
-
-// NewRouter returns a new Mux object that implements the Router interface.
-func NewRouter() *Mux {
- return NewMux()
-}
-
-// Router consisting of the core routing methods used by chi's Mux,
-// using only the standard net/http.
-type Router interface {
- http.Handler
- Routes
-
- // Use appends one or more middlewares onto the Router stack.
- Use(middlewares ...func(http.Handler) http.Handler)
-
- // With adds inline middlewares for an endpoint handler.
- With(middlewares ...func(http.Handler) http.Handler) Router
-
- // Group adds a new inline-Router along the current routing
- // path, with a fresh middleware stack for the inline-Router.
- Group(fn func(r Router)) Router
-
- // Route mounts a sub-Router along a `pattern`` string.
- Route(pattern string, fn func(r Router)) Router
-
- // Mount attaches another http.Handler along ./pattern/*
- Mount(pattern string, h http.Handler)
-
- // Handle and HandleFunc adds routes for `pattern` that matches
- // all HTTP methods.
- Handle(pattern string, h http.Handler)
- HandleFunc(pattern string, h http.HandlerFunc)
-
- // Method and MethodFunc adds routes for `pattern` that matches
- // the `method` HTTP method.
- Method(method, pattern string, h http.Handler)
- MethodFunc(method, pattern string, h http.HandlerFunc)
-
- // HTTP-method routing along `pattern`
- Connect(pattern string, h http.HandlerFunc)
- Delete(pattern string, h http.HandlerFunc)
- Get(pattern string, h http.HandlerFunc)
- Head(pattern string, h http.HandlerFunc)
- Options(pattern string, h http.HandlerFunc)
- Patch(pattern string, h http.HandlerFunc)
- Post(pattern string, h http.HandlerFunc)
- Put(pattern string, h http.HandlerFunc)
- Trace(pattern string, h http.HandlerFunc)
-
- // NotFound defines a handler to respond whenever a route could
- // not be found.
- NotFound(h http.HandlerFunc)
-
- // MethodNotAllowed defines a handler to respond whenever a method is
- // not allowed.
- MethodNotAllowed(h http.HandlerFunc)
-}
-
-// Routes interface adds two methods for router traversal, which is also
-// used by the `docgen` subpackage to generation documentation for Routers.
-type Routes interface {
- // Routes returns the routing tree in an easily traversable structure.
- Routes() []Route
-
- // Middlewares returns the list of middlewares in use by the router.
- Middlewares() Middlewares
-
- // Match searches the routing tree for a handler that matches
- // the method/path - similar to routing a http request, but without
- // executing the handler thereafter.
- Match(rctx *Context, method, path string) bool
-}
-
-// Middlewares type is a slice of standard middleware handlers with methods
-// to compose middleware chains and http.Handler's.
-type Middlewares []func(http.Handler) http.Handler
diff --git a/vendor/github.com/go-chi/chi/v5/context.go b/vendor/github.com/go-chi/chi/v5/context.go
deleted file mode 100644
index 8c97f214a93..00000000000
--- a/vendor/github.com/go-chi/chi/v5/context.go
+++ /dev/null
@@ -1,157 +0,0 @@
-package chi
-
-import (
- "context"
- "net/http"
- "strings"
-)
-
-// URLParam returns the url parameter from a http.Request object.
-func URLParam(r *http.Request, key string) string {
- if rctx := RouteContext(r.Context()); rctx != nil {
- return rctx.URLParam(key)
- }
- return ""
-}
-
-// URLParamFromCtx returns the url parameter from a http.Request Context.
-func URLParamFromCtx(ctx context.Context, key string) string {
- if rctx := RouteContext(ctx); rctx != nil {
- return rctx.URLParam(key)
- }
- return ""
-}
-
-// RouteContext returns chi's routing Context object from a
-// http.Request Context.
-func RouteContext(ctx context.Context) *Context {
- val, _ := ctx.Value(RouteCtxKey).(*Context)
- return val
-}
-
-// NewRouteContext returns a new routing Context object.
-func NewRouteContext() *Context {
- return &Context{}
-}
-
-var (
- // RouteCtxKey is the context.Context key to store the request context.
- RouteCtxKey = &contextKey{"RouteContext"}
-)
-
-// Context is the default routing context set on the root node of a
-// request context to track route patterns, URL parameters and
-// an optional routing path.
-type Context struct {
- Routes Routes
-
- // Routing path/method override used during the route search.
- // See Mux#routeHTTP method.
- RoutePath string
- RouteMethod string
-
- // Routing pattern stack throughout the lifecycle of the request,
- // across all connected routers. It is a record of all matching
- // patterns across a stack of sub-routers.
- RoutePatterns []string
-
- // URLParams are the stack of routeParams captured during the
- // routing lifecycle across a stack of sub-routers.
- URLParams RouteParams
-
- // The endpoint routing pattern that matched the request URI path
- // or `RoutePath` of the current sub-router. This value will update
- // during the lifecycle of a request passing through a stack of
- // sub-routers.
- routePattern string
-
- // Route parameters matched for the current sub-router. It is
- // intentionally unexported so it cant be tampered.
- routeParams RouteParams
-
- // methodNotAllowed hint
- methodNotAllowed bool
-
- // parentCtx is the parent of this one, for using Context as a
- // context.Context directly. This is an optimization that saves
- // 1 allocation.
- parentCtx context.Context
-}
-
-// Reset a routing context to its initial state.
-func (x *Context) Reset() {
- x.Routes = nil
- x.RoutePath = ""
- x.RouteMethod = ""
- x.RoutePatterns = x.RoutePatterns[:0]
- x.URLParams.Keys = x.URLParams.Keys[:0]
- x.URLParams.Values = x.URLParams.Values[:0]
-
- x.routePattern = ""
- x.routeParams.Keys = x.routeParams.Keys[:0]
- x.routeParams.Values = x.routeParams.Values[:0]
- x.methodNotAllowed = false
- x.parentCtx = nil
-}
-
-// URLParam returns the corresponding URL parameter value from the request
-// routing context.
-func (x *Context) URLParam(key string) string {
- for k := len(x.URLParams.Keys) - 1; k >= 0; k-- {
- if x.URLParams.Keys[k] == key {
- return x.URLParams.Values[k]
- }
- }
- return ""
-}
-
-// RoutePattern builds the routing pattern string for the particular
-// request, at the particular point during routing. This means, the value
-// will change throughout the execution of a request in a router. That is
-// why its advised to only use this value after calling the next handler.
-//
-// For example,
-//
-// func Instrument(next http.Handler) http.Handler {
-// return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-// next.ServeHTTP(w, r)
-// routePattern := chi.RouteContext(r.Context()).RoutePattern()
-// measure(w, r, routePattern)
-// })
-// }
-func (x *Context) RoutePattern() string {
- routePattern := strings.Join(x.RoutePatterns, "")
- return replaceWildcards(routePattern)
-}
-
-// replaceWildcards takes a route pattern and recursively replaces all
-// occurrences of "/*/" to "/".
-func replaceWildcards(p string) string {
- if strings.Contains(p, "/*/") {
- return replaceWildcards(strings.Replace(p, "/*/", "/", -1))
- }
-
- return p
-}
-
-// RouteParams is a structure to track URL routing parameters efficiently.
-type RouteParams struct {
- Keys, Values []string
-}
-
-// Add will append a URL parameter to the end of the route param
-func (s *RouteParams) Add(key, value string) {
- s.Keys = append(s.Keys, key)
- s.Values = append(s.Values, value)
-}
-
-// contextKey is a value for use with context.WithValue. It's used as
-// a pointer so it fits in an interface{} without allocation. This technique
-// for defining context keys was copied from Go 1.7's new use of context in net/http.
-type contextKey struct {
- name string
-}
-
-func (k *contextKey) String() string {
- return "chi context value " + k.name
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/basic_auth.go b/vendor/github.com/go-chi/chi/v5/middleware/basic_auth.go
deleted file mode 100644
index a546c9e9e8b..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/basic_auth.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package middleware
-
-import (
- "crypto/subtle"
- "fmt"
- "net/http"
-)
-
-// BasicAuth implements a simple middleware handler for adding basic http auth to a route.
-func BasicAuth(realm string, creds map[string]string) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- user, pass, ok := r.BasicAuth()
- if !ok {
- basicAuthFailed(w, realm)
- return
- }
-
- credPass, credUserOk := creds[user]
- if !credUserOk || subtle.ConstantTimeCompare([]byte(pass), []byte(credPass)) != 1 {
- basicAuthFailed(w, realm)
- return
- }
-
- next.ServeHTTP(w, r)
- })
- }
-}
-
-func basicAuthFailed(w http.ResponseWriter, realm string) {
- w.Header().Add("WWW-Authenticate", fmt.Sprintf(`Basic realm="%s"`, realm))
- w.WriteHeader(http.StatusUnauthorized)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/clean_path.go b/vendor/github.com/go-chi/chi/v5/middleware/clean_path.go
deleted file mode 100644
index adeba429518..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/clean_path.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "path"
-
- "github.com/go-chi/chi/v5"
-)
-
-// CleanPath middleware will clean out double slash mistakes from a user's request path.
-// For example, if a user requests /users//1 or //users////1 will both be treated as: /users/1
-func CleanPath(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- rctx := chi.RouteContext(r.Context())
-
- routePath := rctx.RoutePath
- if routePath == "" {
- if r.URL.RawPath != "" {
- routePath = r.URL.RawPath
- } else {
- routePath = r.URL.Path
- }
- rctx.RoutePath = path.Clean(routePath)
- }
-
- next.ServeHTTP(w, r)
- })
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/compress.go b/vendor/github.com/go-chi/chi/v5/middleware/compress.go
deleted file mode 100644
index 2f40cc15afa..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/compress.go
+++ /dev/null
@@ -1,399 +0,0 @@
-package middleware
-
-import (
- "bufio"
- "compress/flate"
- "compress/gzip"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "strings"
- "sync"
-)
-
-var defaultCompressibleContentTypes = []string{
- "text/html",
- "text/css",
- "text/plain",
- "text/javascript",
- "application/javascript",
- "application/x-javascript",
- "application/json",
- "application/atom+xml",
- "application/rss+xml",
- "image/svg+xml",
-}
-
-// Compress is a middleware that compresses response
-// body of a given content types to a data format based
-// on Accept-Encoding request header. It uses a given
-// compression level.
-//
-// NOTE: make sure to set the Content-Type header on your response
-// otherwise this middleware will not compress the response body. For ex, in
-// your handler you should set w.Header().Set("Content-Type", http.DetectContentType(yourBody))
-// or set it manually.
-//
-// Passing a compression level of 5 is sensible value
-func Compress(level int, types ...string) func(next http.Handler) http.Handler {
- compressor := NewCompressor(level, types...)
- return compressor.Handler
-}
-
-// Compressor represents a set of encoding configurations.
-type Compressor struct {
- level int // The compression level.
- // The mapping of encoder names to encoder functions.
- encoders map[string]EncoderFunc
- // The mapping of pooled encoders to pools.
- pooledEncoders map[string]*sync.Pool
- // The set of content types allowed to be compressed.
- allowedTypes map[string]struct{}
- allowedWildcards map[string]struct{}
- // The list of encoders in order of decreasing precedence.
- encodingPrecedence []string
-}
-
-// NewCompressor creates a new Compressor that will handle encoding responses.
-//
-// The level should be one of the ones defined in the flate package.
-// The types are the content types that are allowed to be compressed.
-func NewCompressor(level int, types ...string) *Compressor {
- // If types are provided, set those as the allowed types. If none are
- // provided, use the default list.
- allowedTypes := make(map[string]struct{})
- allowedWildcards := make(map[string]struct{})
- if len(types) > 0 {
- for _, t := range types {
- if strings.Contains(strings.TrimSuffix(t, "/*"), "*") {
- panic(fmt.Sprintf("middleware/compress: Unsupported content-type wildcard pattern '%s'. Only '/*' supported", t))
- }
- if strings.HasSuffix(t, "/*") {
- allowedWildcards[strings.TrimSuffix(t, "/*")] = struct{}{}
- } else {
- allowedTypes[t] = struct{}{}
- }
- }
- } else {
- for _, t := range defaultCompressibleContentTypes {
- allowedTypes[t] = struct{}{}
- }
- }
-
- c := &Compressor{
- level: level,
- encoders: make(map[string]EncoderFunc),
- pooledEncoders: make(map[string]*sync.Pool),
- allowedTypes: allowedTypes,
- allowedWildcards: allowedWildcards,
- }
-
- // Set the default encoders. The precedence order uses the reverse
- // ordering that the encoders were added. This means adding new encoders
- // will move them to the front of the order.
- //
- // TODO:
- // lzma: Opera.
- // sdch: Chrome, Android. Gzip output + dictionary header.
- // br: Brotli, see https://github.com/go-chi/chi/pull/326
-
- // HTTP 1.1 "deflate" (RFC 2616) stands for DEFLATE data (RFC 1951)
- // wrapped with zlib (RFC 1950). The zlib wrapper uses Adler-32
- // checksum compared to CRC-32 used in "gzip" and thus is faster.
- //
- // But.. some old browsers (MSIE, Safari 5.1) incorrectly expect
- // raw DEFLATE data only, without the mentioned zlib wrapper.
- // Because of this major confusion, most modern browsers try it
- // both ways, first looking for zlib headers.
- // Quote by Mark Adler: http://stackoverflow.com/a/9186091/385548
- //
- // The list of browsers having problems is quite big, see:
- // http://zoompf.com/blog/2012/02/lose-the-wait-http-compression
- // https://web.archive.org/web/20120321182910/http://www.vervestudios.co/projects/compression-tests/results
- //
- // That's why we prefer gzip over deflate. It's just more reliable
- // and not significantly slower than gzip.
- c.SetEncoder("deflate", encoderDeflate)
-
- // TODO: Exception for old MSIE browsers that can't handle non-HTML?
- // https://zoompf.com/blog/2012/02/lose-the-wait-http-compression
- c.SetEncoder("gzip", encoderGzip)
-
- // NOTE: Not implemented, intentionally:
- // case "compress": // LZW. Deprecated.
- // case "bzip2": // Too slow on-the-fly.
- // case "zopfli": // Too slow on-the-fly.
- // case "xz": // Too slow on-the-fly.
- return c
-}
-
-// SetEncoder can be used to set the implementation of a compression algorithm.
-//
-// The encoding should be a standardised identifier. See:
-// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding
-//
-// For example, add the Brotli algortithm:
-//
-// import brotli_enc "gopkg.in/kothar/brotli-go.v0/enc"
-//
-// compressor := middleware.NewCompressor(5, "text/html")
-// compressor.SetEncoder("br", func(w http.ResponseWriter, level int) io.Writer {
-// params := brotli_enc.NewBrotliParams()
-// params.SetQuality(level)
-// return brotli_enc.NewBrotliWriter(params, w)
-// })
-func (c *Compressor) SetEncoder(encoding string, fn EncoderFunc) {
- encoding = strings.ToLower(encoding)
- if encoding == "" {
- panic("the encoding can not be empty")
- }
- if fn == nil {
- panic("attempted to set a nil encoder function")
- }
-
- // If we are adding a new encoder that is already registered, we have to
- // clear that one out first.
- if _, ok := c.pooledEncoders[encoding]; ok {
- delete(c.pooledEncoders, encoding)
- }
- if _, ok := c.encoders[encoding]; ok {
- delete(c.encoders, encoding)
- }
-
- // If the encoder supports Resetting (IoReseterWriter), then it can be pooled.
- encoder := fn(ioutil.Discard, c.level)
- if encoder != nil {
- if _, ok := encoder.(ioResetterWriter); ok {
- pool := &sync.Pool{
- New: func() interface{} {
- return fn(ioutil.Discard, c.level)
- },
- }
- c.pooledEncoders[encoding] = pool
- }
- }
- // If the encoder is not in the pooledEncoders, add it to the normal encoders.
- if _, ok := c.pooledEncoders[encoding]; !ok {
- c.encoders[encoding] = fn
- }
-
- for i, v := range c.encodingPrecedence {
- if v == encoding {
- c.encodingPrecedence = append(c.encodingPrecedence[:i], c.encodingPrecedence[i+1:]...)
- }
- }
-
- c.encodingPrecedence = append([]string{encoding}, c.encodingPrecedence...)
-}
-
-// Handler returns a new middleware that will compress the response based on the
-// current Compressor.
-func (c *Compressor) Handler(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- encoder, encoding, cleanup := c.selectEncoder(r.Header, w)
-
- cw := &compressResponseWriter{
- ResponseWriter: w,
- w: w,
- contentTypes: c.allowedTypes,
- contentWildcards: c.allowedWildcards,
- encoding: encoding,
- compressable: false, // determined in post-handler
- }
- if encoder != nil {
- cw.w = encoder
- }
- // Re-add the encoder to the pool if applicable.
- defer cleanup()
- defer cw.Close()
-
- next.ServeHTTP(cw, r)
- })
-}
-
-// selectEncoder returns the encoder, the name of the encoder, and a closer function.
-func (c *Compressor) selectEncoder(h http.Header, w io.Writer) (io.Writer, string, func()) {
- header := h.Get("Accept-Encoding")
-
- // Parse the names of all accepted algorithms from the header.
- accepted := strings.Split(strings.ToLower(header), ",")
-
- // Find supported encoder by accepted list by precedence
- for _, name := range c.encodingPrecedence {
- if matchAcceptEncoding(accepted, name) {
- if pool, ok := c.pooledEncoders[name]; ok {
- encoder := pool.Get().(ioResetterWriter)
- cleanup := func() {
- pool.Put(encoder)
- }
- encoder.Reset(w)
- return encoder, name, cleanup
-
- }
- if fn, ok := c.encoders[name]; ok {
- return fn(w, c.level), name, func() {}
- }
- }
-
- }
-
- // No encoder found to match the accepted encoding
- return nil, "", func() {}
-}
-
-func matchAcceptEncoding(accepted []string, encoding string) bool {
- for _, v := range accepted {
- if strings.Contains(v, encoding) {
- return true
- }
- }
- return false
-}
-
-// An EncoderFunc is a function that wraps the provided io.Writer with a
-// streaming compression algorithm and returns it.
-//
-// In case of failure, the function should return nil.
-type EncoderFunc func(w io.Writer, level int) io.Writer
-
-// Interface for types that allow resetting io.Writers.
-type ioResetterWriter interface {
- io.Writer
- Reset(w io.Writer)
-}
-
-type compressResponseWriter struct {
- http.ResponseWriter
-
- // The streaming encoder writer to be used if there is one. Otherwise,
- // this is just the normal writer.
- w io.Writer
- encoding string
- contentTypes map[string]struct{}
- contentWildcards map[string]struct{}
- wroteHeader bool
- compressable bool
-}
-
-func (cw *compressResponseWriter) isCompressable() bool {
- // Parse the first part of the Content-Type response header.
- contentType := cw.Header().Get("Content-Type")
- if idx := strings.Index(contentType, ";"); idx >= 0 {
- contentType = contentType[0:idx]
- }
-
- // Is the content type compressable?
- if _, ok := cw.contentTypes[contentType]; ok {
- return true
- }
- if idx := strings.Index(contentType, "/"); idx > 0 {
- contentType = contentType[0:idx]
- _, ok := cw.contentWildcards[contentType]
- return ok
- }
- return false
-}
-
-func (cw *compressResponseWriter) WriteHeader(code int) {
- if cw.wroteHeader {
- cw.ResponseWriter.WriteHeader(code) // Allow multiple calls to propagate.
- return
- }
- cw.wroteHeader = true
- defer cw.ResponseWriter.WriteHeader(code)
-
- // Already compressed data?
- if cw.Header().Get("Content-Encoding") != "" {
- return
- }
-
- if !cw.isCompressable() {
- cw.compressable = false
- return
- }
-
- if cw.encoding != "" {
- cw.compressable = true
- cw.Header().Set("Content-Encoding", cw.encoding)
- cw.Header().Set("Vary", "Accept-Encoding")
-
- // The content-length after compression is unknown
- cw.Header().Del("Content-Length")
- }
-}
-
-func (cw *compressResponseWriter) Write(p []byte) (int, error) {
- if !cw.wroteHeader {
- cw.WriteHeader(http.StatusOK)
- }
-
- return cw.writer().Write(p)
-}
-
-func (cw *compressResponseWriter) writer() io.Writer {
- if cw.compressable {
- return cw.w
- } else {
- return cw.ResponseWriter
- }
-}
-
-type compressFlusher interface {
- Flush() error
-}
-
-func (cw *compressResponseWriter) Flush() {
- if f, ok := cw.writer().(http.Flusher); ok {
- f.Flush()
- }
- // If the underlying writer has a compression flush signature,
- // call this Flush() method instead
- if f, ok := cw.writer().(compressFlusher); ok {
- f.Flush()
-
- // Also flush the underlying response writer
- if f, ok := cw.ResponseWriter.(http.Flusher); ok {
- f.Flush()
- }
- }
-}
-
-func (cw *compressResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- if hj, ok := cw.writer().(http.Hijacker); ok {
- return hj.Hijack()
- }
- return nil, nil, errors.New("chi/middleware: http.Hijacker is unavailable on the writer")
-}
-
-func (cw *compressResponseWriter) Push(target string, opts *http.PushOptions) error {
- if ps, ok := cw.writer().(http.Pusher); ok {
- return ps.Push(target, opts)
- }
- return errors.New("chi/middleware: http.Pusher is unavailable on the writer")
-}
-
-func (cw *compressResponseWriter) Close() error {
- if c, ok := cw.writer().(io.WriteCloser); ok {
- return c.Close()
- }
- return errors.New("chi/middleware: io.WriteCloser is unavailable on the writer")
-}
-
-func encoderGzip(w io.Writer, level int) io.Writer {
- gw, err := gzip.NewWriterLevel(w, level)
- if err != nil {
- return nil
- }
- return gw
-}
-
-func encoderDeflate(w io.Writer, level int) io.Writer {
- dw, err := flate.NewWriter(w, level)
- if err != nil {
- return nil
- }
- return dw
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/content_charset.go b/vendor/github.com/go-chi/chi/v5/middleware/content_charset.go
deleted file mode 100644
index 07b5ce6f66f..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/content_charset.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// ContentCharset generates a handler that writes a 415 Unsupported Media Type response if none of the charsets match.
-// An empty charset will allow requests with no Content-Type header or no specified charset.
-func ContentCharset(charsets ...string) func(next http.Handler) http.Handler {
- for i, c := range charsets {
- charsets[i] = strings.ToLower(c)
- }
-
- return func(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if !contentEncoding(r.Header.Get("Content-Type"), charsets...) {
- w.WriteHeader(http.StatusUnsupportedMediaType)
- return
- }
-
- next.ServeHTTP(w, r)
- })
- }
-}
-
-// Check the content encoding against a list of acceptable values.
-func contentEncoding(ce string, charsets ...string) bool {
- _, ce = split(strings.ToLower(ce), ";")
- _, ce = split(ce, "charset=")
- ce, _ = split(ce, ";")
- for _, c := range charsets {
- if ce == c {
- return true
- }
- }
-
- return false
-}
-
-// Split a string in two parts, cleaning any whitespace.
-func split(str, sep string) (string, string) {
- var a, b string
- var parts = strings.SplitN(str, sep, 2)
- a = strings.TrimSpace(parts[0])
- if len(parts) == 2 {
- b = strings.TrimSpace(parts[1])
- }
-
- return a, b
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/content_encoding.go b/vendor/github.com/go-chi/chi/v5/middleware/content_encoding.go
deleted file mode 100644
index e0b9ccc08ac..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/content_encoding.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// AllowContentEncoding enforces a whitelist of request Content-Encoding otherwise responds
-// with a 415 Unsupported Media Type status.
-func AllowContentEncoding(contentEncoding ...string) func(next http.Handler) http.Handler {
- allowedEncodings := make(map[string]struct{}, len(contentEncoding))
- for _, encoding := range contentEncoding {
- allowedEncodings[strings.TrimSpace(strings.ToLower(encoding))] = struct{}{}
- }
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- requestEncodings := r.Header["Content-Encoding"]
- // skip check for empty content body or no Content-Encoding
- if r.ContentLength == 0 {
- next.ServeHTTP(w, r)
- return
- }
- // All encodings in the request must be allowed
- for _, encoding := range requestEncodings {
- if _, ok := allowedEncodings[strings.TrimSpace(strings.ToLower(encoding))]; !ok {
- w.WriteHeader(http.StatusUnsupportedMediaType)
- return
- }
- }
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/content_type.go b/vendor/github.com/go-chi/chi/v5/middleware/content_type.go
deleted file mode 100644
index 023978fac0e..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/content_type.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// SetHeader is a convenience handler to set a response header key/value
-func SetHeader(key, value string) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- w.Header().Set(key, value)
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
-
-// AllowContentType enforces a whitelist of request Content-Types otherwise responds
-// with a 415 Unsupported Media Type status.
-func AllowContentType(contentTypes ...string) func(next http.Handler) http.Handler {
- allowedContentTypes := make(map[string]struct{}, len(contentTypes))
- for _, ctype := range contentTypes {
- allowedContentTypes[strings.TrimSpace(strings.ToLower(ctype))] = struct{}{}
- }
-
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if r.ContentLength == 0 {
- // skip check for empty content body
- next.ServeHTTP(w, r)
- return
- }
-
- s := strings.ToLower(strings.TrimSpace(r.Header.Get("Content-Type")))
- if i := strings.Index(s, ";"); i > -1 {
- s = s[0:i]
- }
-
- if _, ok := allowedContentTypes[s]; ok {
- next.ServeHTTP(w, r)
- return
- }
-
- w.WriteHeader(http.StatusUnsupportedMediaType)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/get_head.go b/vendor/github.com/go-chi/chi/v5/middleware/get_head.go
deleted file mode 100644
index d4606d8be6d..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/get_head.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package middleware
-
-import (
- "net/http"
-
- "github.com/go-chi/chi/v5"
-)
-
-// GetHead automatically route undefined HEAD requests to GET handlers.
-func GetHead(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "HEAD" {
- rctx := chi.RouteContext(r.Context())
- routePath := rctx.RoutePath
- if routePath == "" {
- if r.URL.RawPath != "" {
- routePath = r.URL.RawPath
- } else {
- routePath = r.URL.Path
- }
- }
-
- // Temporary routing context to look-ahead before routing the request
- tctx := chi.NewRouteContext()
-
- // Attempt to find a HEAD handler for the routing path, if not found, traverse
- // the router as through its a GET route, but proceed with the request
- // with the HEAD method.
- if !rctx.Routes.Match(tctx, "HEAD", routePath) {
- rctx.RouteMethod = "GET"
- rctx.RoutePath = routePath
- next.ServeHTTP(w, r)
- return
- }
- }
-
- next.ServeHTTP(w, r)
- })
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/heartbeat.go b/vendor/github.com/go-chi/chi/v5/middleware/heartbeat.go
deleted file mode 100644
index fe822fb536c..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/heartbeat.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// Heartbeat endpoint middleware useful to setting up a path like
-// `/ping` that load balancers or uptime testing external services
-// can make a request before hitting any routes. It's also convenient
-// to place this above ACL middlewares as well.
-func Heartbeat(endpoint string) func(http.Handler) http.Handler {
- f := func(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if r.Method == "GET" && strings.EqualFold(r.URL.Path, endpoint) {
- w.Header().Set("Content-Type", "text/plain")
- w.WriteHeader(http.StatusOK)
- w.Write([]byte("."))
- return
- }
- h.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
- return f
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/logger.go b/vendor/github.com/go-chi/chi/v5/middleware/logger.go
deleted file mode 100644
index 66edc3dda89..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/logger.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package middleware
-
-import (
- "bytes"
- "context"
- "log"
- "net/http"
- "os"
- "runtime"
- "time"
-)
-
-var (
- // LogEntryCtxKey is the context.Context key to store the request log entry.
- LogEntryCtxKey = &contextKey{"LogEntry"}
-
- // DefaultLogger is called by the Logger middleware handler to log each request.
- // Its made a package-level variable so that it can be reconfigured for custom
- // logging configurations.
- DefaultLogger func(next http.Handler) http.Handler
-)
-
-// Logger is a middleware that logs the start and end of each request, along
-// with some useful data about what was requested, what the response status was,
-// and how long it took to return. When standard output is a TTY, Logger will
-// print in color, otherwise it will print in black and white. Logger prints a
-// request ID if one is provided.
-//
-// Alternatively, look at https://github.com/goware/httplog for a more in-depth
-// http logger with structured logging support.
-//
-// IMPORTANT NOTE: Logger should go before any other middleware that may change
-// the response, such as `middleware.Recoverer`. Example:
-//
-// ```go
-// r := chi.NewRouter()
-// r.Use(middleware.Logger) // <--<< Logger should come before Recoverer
-// r.Use(middleware.Recoverer)
-// r.Get("/", handler)
-// ```
-func Logger(next http.Handler) http.Handler {
- return DefaultLogger(next)
-}
-
-// RequestLogger returns a logger handler using a custom LogFormatter.
-func RequestLogger(f LogFormatter) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- entry := f.NewLogEntry(r)
- ww := NewWrapResponseWriter(w, r.ProtoMajor)
-
- t1 := time.Now()
- defer func() {
- entry.Write(ww.Status(), ww.BytesWritten(), ww.Header(), time.Since(t1), nil)
- }()
-
- next.ServeHTTP(ww, WithLogEntry(r, entry))
- }
- return http.HandlerFunc(fn)
- }
-}
-
-// LogFormatter initiates the beginning of a new LogEntry per request.
-// See DefaultLogFormatter for an example implementation.
-type LogFormatter interface {
- NewLogEntry(r *http.Request) LogEntry
-}
-
-// LogEntry records the final log when a request completes.
-// See defaultLogEntry for an example implementation.
-type LogEntry interface {
- Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})
- Panic(v interface{}, stack []byte)
-}
-
-// GetLogEntry returns the in-context LogEntry for a request.
-func GetLogEntry(r *http.Request) LogEntry {
- entry, _ := r.Context().Value(LogEntryCtxKey).(LogEntry)
- return entry
-}
-
-// WithLogEntry sets the in-context LogEntry for a request.
-func WithLogEntry(r *http.Request, entry LogEntry) *http.Request {
- r = r.WithContext(context.WithValue(r.Context(), LogEntryCtxKey, entry))
- return r
-}
-
-// LoggerInterface accepts printing to stdlib logger or compatible logger.
-type LoggerInterface interface {
- Print(v ...interface{})
-}
-
-// DefaultLogFormatter is a simple logger that implements a LogFormatter.
-type DefaultLogFormatter struct {
- Logger LoggerInterface
- NoColor bool
-}
-
-// NewLogEntry creates a new LogEntry for the request.
-func (l *DefaultLogFormatter) NewLogEntry(r *http.Request) LogEntry {
- useColor := !l.NoColor
- entry := &defaultLogEntry{
- DefaultLogFormatter: l,
- request: r,
- buf: &bytes.Buffer{},
- useColor: useColor,
- }
-
- reqID := GetReqID(r.Context())
- if reqID != "" {
- cW(entry.buf, useColor, nYellow, "[%s] ", reqID)
- }
- cW(entry.buf, useColor, nCyan, "\"")
- cW(entry.buf, useColor, bMagenta, "%s ", r.Method)
-
- scheme := "http"
- if r.TLS != nil {
- scheme = "https"
- }
- cW(entry.buf, useColor, nCyan, "%s://%s%s %s\" ", scheme, r.Host, r.RequestURI, r.Proto)
-
- entry.buf.WriteString("from ")
- entry.buf.WriteString(r.RemoteAddr)
- entry.buf.WriteString(" - ")
-
- return entry
-}
-
-type defaultLogEntry struct {
- *DefaultLogFormatter
- request *http.Request
- buf *bytes.Buffer
- useColor bool
-}
-
-func (l *defaultLogEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{}) {
- switch {
- case status < 200:
- cW(l.buf, l.useColor, bBlue, "%03d", status)
- case status < 300:
- cW(l.buf, l.useColor, bGreen, "%03d", status)
- case status < 400:
- cW(l.buf, l.useColor, bCyan, "%03d", status)
- case status < 500:
- cW(l.buf, l.useColor, bYellow, "%03d", status)
- default:
- cW(l.buf, l.useColor, bRed, "%03d", status)
- }
-
- cW(l.buf, l.useColor, bBlue, " %dB", bytes)
-
- l.buf.WriteString(" in ")
- if elapsed < 500*time.Millisecond {
- cW(l.buf, l.useColor, nGreen, "%s", elapsed)
- } else if elapsed < 5*time.Second {
- cW(l.buf, l.useColor, nYellow, "%s", elapsed)
- } else {
- cW(l.buf, l.useColor, nRed, "%s", elapsed)
- }
-
- l.Logger.Print(l.buf.String())
-}
-
-func (l *defaultLogEntry) Panic(v interface{}, stack []byte) {
- PrintPrettyStack(v)
-}
-
-func init() {
- color := true
- if runtime.GOOS == "windows" {
- color = false
- }
- DefaultLogger = RequestLogger(&DefaultLogFormatter{Logger: log.New(os.Stdout, "", log.LstdFlags), NoColor: !color})
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/middleware.go b/vendor/github.com/go-chi/chi/v5/middleware/middleware.go
deleted file mode 100644
index cc371e00a82..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/middleware.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package middleware
-
-import "net/http"
-
-// New will create a new middleware handler from a http.Handler.
-func New(h http.Handler) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- h.ServeHTTP(w, r)
- })
- }
-}
-
-// contextKey is a value for use with context.WithValue. It's used as
-// a pointer so it fits in an interface{} without allocation. This technique
-// for defining context keys was copied from Go 1.7's new use of context in net/http.
-type contextKey struct {
- name string
-}
-
-func (k *contextKey) String() string {
- return "chi/middleware context value " + k.name
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/nocache.go b/vendor/github.com/go-chi/chi/v5/middleware/nocache.go
deleted file mode 100644
index 2412829e1b9..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/nocache.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "net/http"
- "time"
-)
-
-// Unix epoch time
-var epoch = time.Unix(0, 0).Format(time.RFC1123)
-
-// Taken from https://github.com/mytrile/nocache
-var noCacheHeaders = map[string]string{
- "Expires": epoch,
- "Cache-Control": "no-cache, no-store, no-transform, must-revalidate, private, max-age=0",
- "Pragma": "no-cache",
- "X-Accel-Expires": "0",
-}
-
-var etagHeaders = []string{
- "ETag",
- "If-Modified-Since",
- "If-Match",
- "If-None-Match",
- "If-Range",
- "If-Unmodified-Since",
-}
-
-// NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent
-// a router (or subrouter) from being cached by an upstream proxy and/or client.
-//
-// As per http://wiki.nginx.org/HttpProxyModule - NoCache sets:
-// Expires: Thu, 01 Jan 1970 00:00:00 UTC
-// Cache-Control: no-cache, private, max-age=0
-// X-Accel-Expires: 0
-// Pragma: no-cache (for HTTP/1.0 proxies/clients)
-func NoCache(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
-
- // Delete any ETag headers that may have been set
- for _, v := range etagHeaders {
- if r.Header.Get(v) != "" {
- r.Header.Del(v)
- }
- }
-
- // Set our NoCache headers
- for k, v := range noCacheHeaders {
- w.Header().Set(k, v)
- }
-
- h.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/profiler.go b/vendor/github.com/go-chi/chi/v5/middleware/profiler.go
deleted file mode 100644
index 18158e56dd6..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/profiler.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package middleware
-
-import (
- "expvar"
- "fmt"
- "net/http"
- "net/http/pprof"
-
- "github.com/go-chi/chi/v5"
-)
-
-// Profiler is a convenient subrouter used for mounting net/http/pprof. ie.
-//
-// func MyService() http.Handler {
-// r := chi.NewRouter()
-// // ..middlewares
-// r.Mount("/debug", middleware.Profiler())
-// // ..routes
-// return r
-// }
-func Profiler() http.Handler {
- r := chi.NewRouter()
- r.Use(NoCache)
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/pprof/", http.StatusMovedPermanently)
- })
- r.HandleFunc("/pprof", func(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, r.RequestURI+"/", http.StatusMovedPermanently)
- })
-
- r.HandleFunc("/pprof/*", pprof.Index)
- r.HandleFunc("/pprof/cmdline", pprof.Cmdline)
- r.HandleFunc("/pprof/profile", pprof.Profile)
- r.HandleFunc("/pprof/symbol", pprof.Symbol)
- r.HandleFunc("/pprof/trace", pprof.Trace)
- r.HandleFunc("/vars", expVars)
-
- return r
-}
-
-// Replicated from expvar.go as not public.
-func expVars(w http.ResponseWriter, r *http.Request) {
- first := true
- w.Header().Set("Content-Type", "application/json")
- fmt.Fprintf(w, "{\n")
- expvar.Do(func(kv expvar.KeyValue) {
- if !first {
- fmt.Fprintf(w, ",\n")
- }
- first = false
- fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value)
- })
- fmt.Fprintf(w, "\n}\n")
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/realip.go b/vendor/github.com/go-chi/chi/v5/middleware/realip.go
deleted file mode 100644
index 72db6ca9f51..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/realip.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "net/http"
- "strings"
-)
-
-var xForwardedFor = http.CanonicalHeaderKey("X-Forwarded-For")
-var xRealIP = http.CanonicalHeaderKey("X-Real-IP")
-
-// RealIP is a middleware that sets a http.Request's RemoteAddr to the results
-// of parsing either the X-Forwarded-For header or the X-Real-IP header (in that
-// order).
-//
-// This middleware should be inserted fairly early in the middleware stack to
-// ensure that subsequent layers (e.g., request loggers) which examine the
-// RemoteAddr will see the intended value.
-//
-// You should only use this middleware if you can trust the headers passed to
-// you (in particular, the two headers this middleware uses), for example
-// because you have placed a reverse proxy like HAProxy or nginx in front of
-// chi. If your reverse proxies are configured to pass along arbitrary header
-// values from the client, or if you use this middleware without a reverse
-// proxy, malicious clients will be able to make you very sad (or, depending on
-// how you're using RemoteAddr, vulnerable to an attack of some sort).
-func RealIP(h http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- if rip := realIP(r); rip != "" {
- r.RemoteAddr = rip
- }
- h.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
-
-func realIP(r *http.Request) string {
- var ip string
-
- if xrip := r.Header.Get(xRealIP); xrip != "" {
- ip = xrip
- } else if xff := r.Header.Get(xForwardedFor); xff != "" {
- i := strings.Index(xff, ", ")
- if i == -1 {
- i = len(xff)
- }
- ip = xff[:i]
- }
-
- return ip
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go b/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go
deleted file mode 100644
index 785b18c52ba..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go
+++ /dev/null
@@ -1,192 +0,0 @@
-package middleware
-
-// The original work was derived from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "bytes"
- "errors"
- "fmt"
- "net/http"
- "os"
- "runtime/debug"
- "strings"
-)
-
-// Recoverer is a middleware that recovers from panics, logs the panic (and a
-// backtrace), and returns a HTTP 500 (Internal Server Error) status if
-// possible. Recoverer prints a request ID if one is provided.
-//
-// Alternatively, look at https://github.com/pressly/lg middleware pkgs.
-func Recoverer(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- defer func() {
- if rvr := recover(); rvr != nil && rvr != http.ErrAbortHandler {
-
- logEntry := GetLogEntry(r)
- if logEntry != nil {
- logEntry.Panic(rvr, debug.Stack())
- } else {
- PrintPrettyStack(rvr)
- }
-
- w.WriteHeader(http.StatusInternalServerError)
- }
- }()
-
- next.ServeHTTP(w, r)
- }
-
- return http.HandlerFunc(fn)
-}
-
-func PrintPrettyStack(rvr interface{}) {
- debugStack := debug.Stack()
- s := prettyStack{}
- out, err := s.parse(debugStack, rvr)
- if err == nil {
- os.Stderr.Write(out)
- } else {
- // print stdlib output as a fallback
- os.Stderr.Write(debugStack)
- }
-}
-
-type prettyStack struct {
-}
-
-func (s prettyStack) parse(debugStack []byte, rvr interface{}) ([]byte, error) {
- var err error
- useColor := true
- buf := &bytes.Buffer{}
-
- cW(buf, false, bRed, "\n")
- cW(buf, useColor, bCyan, " panic: ")
- cW(buf, useColor, bBlue, "%v", rvr)
- cW(buf, false, bWhite, "\n \n")
-
- // process debug stack info
- stack := strings.Split(string(debugStack), "\n")
- lines := []string{}
-
- // locate panic line, as we may have nested panics
- for i := len(stack) - 1; i > 0; i-- {
- lines = append(lines, stack[i])
- if strings.HasPrefix(stack[i], "panic(0x") {
- lines = lines[0 : len(lines)-2] // remove boilerplate
- break
- }
- }
-
- // reverse
- for i := len(lines)/2 - 1; i >= 0; i-- {
- opp := len(lines) - 1 - i
- lines[i], lines[opp] = lines[opp], lines[i]
- }
-
- // decorate
- for i, line := range lines {
- lines[i], err = s.decorateLine(line, useColor, i)
- if err != nil {
- return nil, err
- }
- }
-
- for _, l := range lines {
- fmt.Fprintf(buf, "%s", l)
- }
- return buf.Bytes(), nil
-}
-
-func (s prettyStack) decorateLine(line string, useColor bool, num int) (string, error) {
- line = strings.TrimSpace(line)
- if strings.HasPrefix(line, "\t") || strings.Contains(line, ".go:") {
- return s.decorateSourceLine(line, useColor, num)
- } else if strings.HasSuffix(line, ")") {
- return s.decorateFuncCallLine(line, useColor, num)
- } else {
- if strings.HasPrefix(line, "\t") {
- return strings.Replace(line, "\t", " ", 1), nil
- } else {
- return fmt.Sprintf(" %s\n", line), nil
- }
- }
-}
-
-func (s prettyStack) decorateFuncCallLine(line string, useColor bool, num int) (string, error) {
- idx := strings.LastIndex(line, "(")
- if idx < 0 {
- return "", errors.New("not a func call line")
- }
-
- buf := &bytes.Buffer{}
- pkg := line[0:idx]
- // addr := line[idx:]
- method := ""
-
- idx = strings.LastIndex(pkg, string(os.PathSeparator))
- if idx < 0 {
- idx = strings.Index(pkg, ".")
- method = pkg[idx:]
- pkg = pkg[0:idx]
- } else {
- method = pkg[idx+1:]
- pkg = pkg[0 : idx+1]
- idx = strings.Index(method, ".")
- pkg += method[0:idx]
- method = method[idx:]
- }
- pkgColor := nYellow
- methodColor := bGreen
-
- if num == 0 {
- cW(buf, useColor, bRed, " -> ")
- pkgColor = bMagenta
- methodColor = bRed
- } else {
- cW(buf, useColor, bWhite, " ")
- }
- cW(buf, useColor, pkgColor, "%s", pkg)
- cW(buf, useColor, methodColor, "%s\n", method)
- // cW(buf, useColor, nBlack, "%s", addr)
- return buf.String(), nil
-}
-
-func (s prettyStack) decorateSourceLine(line string, useColor bool, num int) (string, error) {
- idx := strings.LastIndex(line, ".go:")
- if idx < 0 {
- return "", errors.New("not a source line")
- }
-
- buf := &bytes.Buffer{}
- path := line[0 : idx+3]
- lineno := line[idx+3:]
-
- idx = strings.LastIndex(path, string(os.PathSeparator))
- dir := path[0 : idx+1]
- file := path[idx+1:]
-
- idx = strings.Index(lineno, " ")
- if idx > 0 {
- lineno = lineno[0:idx]
- }
- fileColor := bCyan
- lineColor := bGreen
-
- if num == 1 {
- cW(buf, useColor, bRed, " -> ")
- fileColor = bRed
- lineColor = bMagenta
- } else {
- cW(buf, false, bWhite, " ")
- }
- cW(buf, useColor, bWhite, "%s", dir)
- cW(buf, useColor, fileColor, "%s", file)
- cW(buf, useColor, lineColor, "%s", lineno)
- if num == 1 {
- cW(buf, false, bWhite, "\n")
- }
- cW(buf, false, bWhite, "\n")
-
- return buf.String(), nil
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/request_id.go b/vendor/github.com/go-chi/chi/v5/middleware/request_id.go
deleted file mode 100644
index 4903ecc2144..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/request_id.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "context"
- "crypto/rand"
- "encoding/base64"
- "fmt"
- "net/http"
- "os"
- "strings"
- "sync/atomic"
-)
-
-// Key to use when setting the request ID.
-type ctxKeyRequestID int
-
-// RequestIDKey is the key that holds the unique request ID in a request context.
-const RequestIDKey ctxKeyRequestID = 0
-
-// RequestIDHeader is the name of the HTTP Header which contains the request id.
-// Exported so that it can be changed by developers
-var RequestIDHeader = "X-Request-Id"
-
-var prefix string
-var reqid uint64
-
-// A quick note on the statistics here: we're trying to calculate the chance that
-// two randomly generated base62 prefixes will collide. We use the formula from
-// http://en.wikipedia.org/wiki/Birthday_problem
-//
-// P[m, n] \approx 1 - e^{-m^2/2n}
-//
-// We ballpark an upper bound for $m$ by imagining (for whatever reason) a server
-// that restarts every second over 10 years, for $m = 86400 * 365 * 10 = 315360000$
-//
-// For a $k$ character base-62 identifier, we have $n(k) = 62^k$
-//
-// Plugging this in, we find $P[m, n(10)] \approx 5.75%$, which is good enough for
-// our purposes, and is surely more than anyone would ever need in practice -- a
-// process that is rebooted a handful of times a day for a hundred years has less
-// than a millionth of a percent chance of generating two colliding IDs.
-
-func init() {
- hostname, err := os.Hostname()
- if hostname == "" || err != nil {
- hostname = "localhost"
- }
- var buf [12]byte
- var b64 string
- for len(b64) < 10 {
- rand.Read(buf[:])
- b64 = base64.StdEncoding.EncodeToString(buf[:])
- b64 = strings.NewReplacer("+", "", "/", "").Replace(b64)
- }
-
- prefix = fmt.Sprintf("%s/%s", hostname, b64[0:10])
-}
-
-// RequestID is a middleware that injects a request ID into the context of each
-// request. A request ID is a string of the form "host.example.com/random-0001",
-// where "random" is a base62 random string that uniquely identifies this go
-// process, and where the last number is an atomically incremented request
-// counter.
-func RequestID(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
- requestID := r.Header.Get(RequestIDHeader)
- if requestID == "" {
- myid := atomic.AddUint64(&reqid, 1)
- requestID = fmt.Sprintf("%s-%06d", prefix, myid)
- }
- ctx = context.WithValue(ctx, RequestIDKey, requestID)
- next.ServeHTTP(w, r.WithContext(ctx))
- }
- return http.HandlerFunc(fn)
-}
-
-// GetReqID returns a request ID from the given context if one is present.
-// Returns the empty string if a request ID cannot be found.
-func GetReqID(ctx context.Context) string {
- if ctx == nil {
- return ""
- }
- if reqID, ok := ctx.Value(RequestIDKey).(string); ok {
- return reqID
- }
- return ""
-}
-
-// NextRequestID generates the next request ID in the sequence.
-func NextRequestID() uint64 {
- return atomic.AddUint64(&reqid, 1)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/route_headers.go b/vendor/github.com/go-chi/chi/v5/middleware/route_headers.go
deleted file mode 100644
index 0e67b5f7684..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/route_headers.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strings"
-)
-
-// RouteHeaders is a neat little header-based router that allows you to direct
-// the flow of a request through a middleware stack based on a request header.
-//
-// For example, lets say you'd like to setup multiple routers depending on the
-// request Host header, you could then do something as so:
-//
-// r := chi.NewRouter()
-// rSubdomain := chi.NewRouter()
-//
-// r.Use(middleware.RouteHeaders().
-// Route("Host", "example.com", middleware.New(r)).
-// Route("Host", "*.example.com", middleware.New(rSubdomain)).
-// Handler)
-//
-// r.Get("/", h)
-// rSubdomain.Get("/", h2)
-//
-//
-// Another example, imagine you want to setup multiple CORS handlers, where for
-// your origin servers you allow authorized requests, but for third-party public
-// requests, authorization is disabled.
-//
-// r := chi.NewRouter()
-//
-// r.Use(middleware.RouteHeaders().
-// Route("Origin", "https://app.skyweaver.net", cors.Handler(cors.Options{
-// AllowedOrigins: []string{"https://api.skyweaver.net"},
-// AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
-// AllowedHeaders: []string{"Accept", "Authorization", "Content-Type"},
-// AllowCredentials: true, // <----------<<< allow credentials
-// })).
-// Route("Origin", "*", cors.Handler(cors.Options{
-// AllowedOrigins: []string{"*"},
-// AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
-// AllowedHeaders: []string{"Accept", "Content-Type"},
-// AllowCredentials: false, // <----------<<< do not allow credentials
-// })).
-// Handler)
-//
-func RouteHeaders() HeaderRouter {
- return HeaderRouter{}
-}
-
-type HeaderRouter map[string][]HeaderRoute
-
-func (hr HeaderRouter) Route(header, match string, middlewareHandler func(next http.Handler) http.Handler) HeaderRouter {
- header = strings.ToLower(header)
- k := hr[header]
- if k == nil {
- hr[header] = []HeaderRoute{}
- }
- hr[header] = append(hr[header], HeaderRoute{MatchOne: NewPattern(match), Middleware: middlewareHandler})
- return hr
-}
-
-func (hr HeaderRouter) RouteAny(header string, match []string, middlewareHandler func(next http.Handler) http.Handler) HeaderRouter {
- header = strings.ToLower(header)
- k := hr[header]
- if k == nil {
- hr[header] = []HeaderRoute{}
- }
- patterns := []Pattern{}
- for _, m := range match {
- patterns = append(patterns, NewPattern(m))
- }
- hr[header] = append(hr[header], HeaderRoute{MatchAny: patterns, Middleware: middlewareHandler})
- return hr
-}
-
-func (hr HeaderRouter) RouteDefault(handler func(next http.Handler) http.Handler) HeaderRouter {
- hr["*"] = []HeaderRoute{{Middleware: handler}}
- return hr
-}
-
-func (hr HeaderRouter) Handler(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if len(hr) == 0 {
- // skip if no routes set
- next.ServeHTTP(w, r)
- }
-
- // find first matching header route, and continue
- for header, matchers := range hr {
- headerValue := r.Header.Get(header)
- if headerValue == "" {
- continue
- }
- headerValue = strings.ToLower(headerValue)
- for _, matcher := range matchers {
- if matcher.IsMatch(headerValue) {
- matcher.Middleware(next).ServeHTTP(w, r)
- return
- }
- }
- }
-
- // if no match, check for "*" default route
- matcher, ok := hr["*"]
- if !ok || matcher[0].Middleware == nil {
- next.ServeHTTP(w, r)
- return
- }
- matcher[0].Middleware(next).ServeHTTP(w, r)
- })
-}
-
-type HeaderRoute struct {
- MatchAny []Pattern
- MatchOne Pattern
- Middleware func(next http.Handler) http.Handler
-}
-
-func (r HeaderRoute) IsMatch(value string) bool {
- if len(r.MatchAny) > 0 {
- for _, m := range r.MatchAny {
- if m.Match(value) {
- return true
- }
- }
- } else if r.MatchOne.Match(value) {
- return true
- }
- return false
-}
-
-type Pattern struct {
- prefix string
- suffix string
- wildcard bool
-}
-
-func NewPattern(value string) Pattern {
- p := Pattern{}
- if i := strings.IndexByte(value, '*'); i >= 0 {
- p.wildcard = true
- p.prefix = value[0:i]
- p.suffix = value[i+1:]
- } else {
- p.prefix = value
- }
- return p
-}
-
-func (p Pattern) Match(v string) bool {
- if !p.wildcard {
- if p.prefix == v {
- return true
- } else {
- return false
- }
- }
- return len(v) >= len(p.prefix+p.suffix) && strings.HasPrefix(v, p.prefix) && strings.HasSuffix(v, p.suffix)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/strip.go b/vendor/github.com/go-chi/chi/v5/middleware/strip.go
deleted file mode 100644
index ce8ebfccea1..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/strip.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package middleware
-
-import (
- "fmt"
- "net/http"
-
- "github.com/go-chi/chi/v5"
-)
-
-// StripSlashes is a middleware that will match request paths with a trailing
-// slash, strip it from the path and continue routing through the mux, if a route
-// matches, then it will serve the handler.
-func StripSlashes(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- var path string
- rctx := chi.RouteContext(r.Context())
- if rctx != nil && rctx.RoutePath != "" {
- path = rctx.RoutePath
- } else {
- path = r.URL.Path
- }
- if len(path) > 1 && path[len(path)-1] == '/' {
- newPath := path[:len(path)-1]
- if rctx == nil {
- r.URL.Path = newPath
- } else {
- rctx.RoutePath = newPath
- }
- }
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
-
-// RedirectSlashes is a middleware that will match request paths with a trailing
-// slash and redirect to the same path, less the trailing slash.
-//
-// NOTE: RedirectSlashes middleware is *incompatible* with http.FileServer,
-// see https://github.com/go-chi/chi/issues/343
-func RedirectSlashes(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- var path string
- rctx := chi.RouteContext(r.Context())
- if rctx != nil && rctx.RoutePath != "" {
- path = rctx.RoutePath
- } else {
- path = r.URL.Path
- }
- if len(path) > 1 && path[len(path)-1] == '/' {
- if r.URL.RawQuery != "" {
- path = fmt.Sprintf("%s?%s", path[:len(path)-1], r.URL.RawQuery)
- } else {
- path = path[:len(path)-1]
- }
- redirectURL := fmt.Sprintf("//%s%s", r.Host, path)
- http.Redirect(w, r, redirectURL, 301)
- return
- }
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/terminal.go b/vendor/github.com/go-chi/chi/v5/middleware/terminal.go
deleted file mode 100644
index 5ead7b9243f..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/terminal.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package middleware
-
-// Ported from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "fmt"
- "io"
- "os"
-)
-
-var (
- // Normal colors
- nBlack = []byte{'\033', '[', '3', '0', 'm'}
- nRed = []byte{'\033', '[', '3', '1', 'm'}
- nGreen = []byte{'\033', '[', '3', '2', 'm'}
- nYellow = []byte{'\033', '[', '3', '3', 'm'}
- nBlue = []byte{'\033', '[', '3', '4', 'm'}
- nMagenta = []byte{'\033', '[', '3', '5', 'm'}
- nCyan = []byte{'\033', '[', '3', '6', 'm'}
- nWhite = []byte{'\033', '[', '3', '7', 'm'}
- // Bright colors
- bBlack = []byte{'\033', '[', '3', '0', ';', '1', 'm'}
- bRed = []byte{'\033', '[', '3', '1', ';', '1', 'm'}
- bGreen = []byte{'\033', '[', '3', '2', ';', '1', 'm'}
- bYellow = []byte{'\033', '[', '3', '3', ';', '1', 'm'}
- bBlue = []byte{'\033', '[', '3', '4', ';', '1', 'm'}
- bMagenta = []byte{'\033', '[', '3', '5', ';', '1', 'm'}
- bCyan = []byte{'\033', '[', '3', '6', ';', '1', 'm'}
- bWhite = []byte{'\033', '[', '3', '7', ';', '1', 'm'}
-
- reset = []byte{'\033', '[', '0', 'm'}
-)
-
-var IsTTY bool
-
-func init() {
- // This is sort of cheating: if stdout is a character device, we assume
- // that means it's a TTY. Unfortunately, there are many non-TTY
- // character devices, but fortunately stdout is rarely set to any of
- // them.
- //
- // We could solve this properly by pulling in a dependency on
- // code.google.com/p/go.crypto/ssh/terminal, for instance, but as a
- // heuristic for whether to print in color or in black-and-white, I'd
- // really rather not.
- fi, err := os.Stdout.Stat()
- if err == nil {
- m := os.ModeDevice | os.ModeCharDevice
- IsTTY = fi.Mode()&m == m
- }
-}
-
-// colorWrite
-func cW(w io.Writer, useColor bool, color []byte, s string, args ...interface{}) {
- if IsTTY && useColor {
- w.Write(color)
- }
- fmt.Fprintf(w, s, args...)
- if IsTTY && useColor {
- w.Write(reset)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/throttle.go b/vendor/github.com/go-chi/chi/v5/middleware/throttle.go
deleted file mode 100644
index 7bb2e804f28..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/throttle.go
+++ /dev/null
@@ -1,132 +0,0 @@
-package middleware
-
-import (
- "net/http"
- "strconv"
- "time"
-)
-
-const (
- errCapacityExceeded = "Server capacity exceeded."
- errTimedOut = "Timed out while waiting for a pending request to complete."
- errContextCanceled = "Context was canceled."
-)
-
-var (
- defaultBacklogTimeout = time.Second * 60
-)
-
-// ThrottleOpts represents a set of throttling options.
-type ThrottleOpts struct {
- Limit int
- BacklogLimit int
- BacklogTimeout time.Duration
- RetryAfterFn func(ctxDone bool) time.Duration
-}
-
-// Throttle is a middleware that limits number of currently processed requests
-// at a time across all users. Note: Throttle is not a rate-limiter per user,
-// instead it just puts a ceiling on the number of currentl in-flight requests
-// being processed from the point from where the Throttle middleware is mounted.
-func Throttle(limit int) func(http.Handler) http.Handler {
- return ThrottleWithOpts(ThrottleOpts{Limit: limit, BacklogTimeout: defaultBacklogTimeout})
-}
-
-// ThrottleBacklog is a middleware that limits number of currently processed
-// requests at a time and provides a backlog for holding a finite number of
-// pending requests.
-func ThrottleBacklog(limit, backlogLimit int, backlogTimeout time.Duration) func(http.Handler) http.Handler {
- return ThrottleWithOpts(ThrottleOpts{Limit: limit, BacklogLimit: backlogLimit, BacklogTimeout: backlogTimeout})
-}
-
-// ThrottleWithOpts is a middleware that limits number of currently processed requests using passed ThrottleOpts.
-func ThrottleWithOpts(opts ThrottleOpts) func(http.Handler) http.Handler {
- if opts.Limit < 1 {
- panic("chi/middleware: Throttle expects limit > 0")
- }
-
- if opts.BacklogLimit < 0 {
- panic("chi/middleware: Throttle expects backlogLimit to be positive")
- }
-
- t := throttler{
- tokens: make(chan token, opts.Limit),
- backlogTokens: make(chan token, opts.Limit+opts.BacklogLimit),
- backlogTimeout: opts.BacklogTimeout,
- retryAfterFn: opts.RetryAfterFn,
- }
-
- // Filling tokens.
- for i := 0; i < opts.Limit+opts.BacklogLimit; i++ {
- if i < opts.Limit {
- t.tokens <- token{}
- }
- t.backlogTokens <- token{}
- }
-
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
-
- select {
-
- case <-ctx.Done():
- t.setRetryAfterHeaderIfNeeded(w, true)
- http.Error(w, errContextCanceled, http.StatusTooManyRequests)
- return
-
- case btok := <-t.backlogTokens:
- timer := time.NewTimer(t.backlogTimeout)
-
- defer func() {
- t.backlogTokens <- btok
- }()
-
- select {
- case <-timer.C:
- t.setRetryAfterHeaderIfNeeded(w, false)
- http.Error(w, errTimedOut, http.StatusTooManyRequests)
- return
- case <-ctx.Done():
- timer.Stop()
- t.setRetryAfterHeaderIfNeeded(w, true)
- http.Error(w, errContextCanceled, http.StatusTooManyRequests)
- return
- case tok := <-t.tokens:
- defer func() {
- timer.Stop()
- t.tokens <- tok
- }()
- next.ServeHTTP(w, r)
- }
- return
-
- default:
- t.setRetryAfterHeaderIfNeeded(w, false)
- http.Error(w, errCapacityExceeded, http.StatusTooManyRequests)
- return
- }
- }
-
- return http.HandlerFunc(fn)
- }
-}
-
-// token represents a request that is being processed.
-type token struct{}
-
-// throttler limits number of currently processed requests at a time.
-type throttler struct {
- tokens chan token
- backlogTokens chan token
- backlogTimeout time.Duration
- retryAfterFn func(ctxDone bool) time.Duration
-}
-
-// setRetryAfterHeaderIfNeeded sets Retry-After HTTP header if corresponding retryAfterFn option of throttler is initialized.
-func (t throttler) setRetryAfterHeaderIfNeeded(w http.ResponseWriter, ctxDone bool) {
- if t.retryAfterFn == nil {
- return
- }
- w.Header().Set("Retry-After", strconv.Itoa(int(t.retryAfterFn(ctxDone).Seconds())))
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/timeout.go b/vendor/github.com/go-chi/chi/v5/middleware/timeout.go
deleted file mode 100644
index 8e373536cf0..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/timeout.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
- "time"
-)
-
-// Timeout is a middleware that cancels ctx after a given timeout and return
-// a 504 Gateway Timeout error to the client.
-//
-// It's required that you select the ctx.Done() channel to check for the signal
-// if the context has reached its deadline and return, otherwise the timeout
-// signal will be just ignored.
-//
-// ie. a route/handler may look like:
-//
-// r.Get("/long", func(w http.ResponseWriter, r *http.Request) {
-// ctx := r.Context()
-// processTime := time.Duration(rand.Intn(4)+1) * time.Second
-//
-// select {
-// case <-ctx.Done():
-// return
-//
-// case <-time.After(processTime):
-// // The above channel simulates some hard work.
-// }
-//
-// w.Write([]byte("done"))
-// })
-//
-func Timeout(timeout time.Duration) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx, cancel := context.WithTimeout(r.Context(), timeout)
- defer func() {
- cancel()
- if ctx.Err() == context.DeadlineExceeded {
- w.WriteHeader(http.StatusGatewayTimeout)
- }
- }()
-
- r = r.WithContext(ctx)
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/url_format.go b/vendor/github.com/go-chi/chi/v5/middleware/url_format.go
deleted file mode 100644
index 10d7134dcac..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/url_format.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
- "strings"
-
- "github.com/go-chi/chi/v5"
-)
-
-var (
- // URLFormatCtxKey is the context.Context key to store the URL format data
- // for a request.
- URLFormatCtxKey = &contextKey{"URLFormat"}
-)
-
-// URLFormat is a middleware that parses the url extension from a request path and stores it
-// on the context as a string under the key `middleware.URLFormatCtxKey`. The middleware will
-// trim the suffix from the routing path and continue routing.
-//
-// Routers should not include a url parameter for the suffix when using this middleware.
-//
-// Sample usage.. for url paths: `/articles/1`, `/articles/1.json` and `/articles/1.xml`
-//
-// func routes() http.Handler {
-// r := chi.NewRouter()
-// r.Use(middleware.URLFormat)
-//
-// r.Get("/articles/{id}", ListArticles)
-//
-// return r
-// }
-//
-// func ListArticles(w http.ResponseWriter, r *http.Request) {
-// urlFormat, _ := r.Context().Value(middleware.URLFormatCtxKey).(string)
-//
-// switch urlFormat {
-// case "json":
-// render.JSON(w, r, articles)
-// case "xml:"
-// render.XML(w, r, articles)
-// default:
-// render.JSON(w, r, articles)
-// }
-// }
-//
-func URLFormat(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- ctx := r.Context()
-
- var format string
- path := r.URL.Path
-
- if strings.Index(path, ".") > 0 {
- base := strings.LastIndex(path, "/")
- idx := strings.LastIndex(path[base:], ".")
-
- if idx > 0 {
- idx += base
- format = path[idx+1:]
-
- rctx := chi.RouteContext(r.Context())
- rctx.RoutePath = path[:idx]
- }
- }
-
- r = r.WithContext(context.WithValue(ctx, URLFormatCtxKey, format))
-
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/value.go b/vendor/github.com/go-chi/chi/v5/middleware/value.go
deleted file mode 100644
index a9dfd4345df..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/value.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package middleware
-
-import (
- "context"
- "net/http"
-)
-
-// WithValue is a middleware that sets a given key/value in a context chain.
-func WithValue(key, val interface{}) func(next http.Handler) http.Handler {
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- r = r.WithContext(context.WithValue(r.Context(), key, val))
- next.ServeHTTP(w, r)
- }
- return http.HandlerFunc(fn)
- }
-}
diff --git a/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go b/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go
deleted file mode 100644
index 6438c7a653c..00000000000
--- a/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package middleware
-
-// The original work was derived from Goji's middleware, source:
-// https://github.com/zenazn/goji/tree/master/web/middleware
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
-)
-
-// NewWrapResponseWriter wraps an http.ResponseWriter, returning a proxy that allows you to
-// hook into various parts of the response process.
-func NewWrapResponseWriter(w http.ResponseWriter, protoMajor int) WrapResponseWriter {
- _, fl := w.(http.Flusher)
-
- bw := basicWriter{ResponseWriter: w}
-
- if protoMajor == 2 {
- _, ps := w.(http.Pusher)
- if fl || ps {
- return &http2FancyWriter{bw}
- }
- } else {
- _, hj := w.(http.Hijacker)
- _, rf := w.(io.ReaderFrom)
- if fl || hj || rf {
- return &httpFancyWriter{bw}
- }
- }
-
- return &bw
-}
-
-// WrapResponseWriter is a proxy around an http.ResponseWriter that allows you to hook
-// into various parts of the response process.
-type WrapResponseWriter interface {
- http.ResponseWriter
- // Status returns the HTTP status of the request, or 0 if one has not
- // yet been sent.
- Status() int
- // BytesWritten returns the total number of bytes sent to the client.
- BytesWritten() int
- // Tee causes the response body to be written to the given io.Writer in
- // addition to proxying the writes through. Only one io.Writer can be
- // tee'd to at once: setting a second one will overwrite the first.
- // Writes will be sent to the proxy before being written to this
- // io.Writer. It is illegal for the tee'd writer to be modified
- // concurrently with writes.
- Tee(io.Writer)
- // Unwrap returns the original proxied target.
- Unwrap() http.ResponseWriter
-}
-
-// basicWriter wraps a http.ResponseWriter that implements the minimal
-// http.ResponseWriter interface.
-type basicWriter struct {
- http.ResponseWriter
- wroteHeader bool
- code int
- bytes int
- tee io.Writer
-}
-
-func (b *basicWriter) WriteHeader(code int) {
- if !b.wroteHeader {
- b.code = code
- b.wroteHeader = true
- b.ResponseWriter.WriteHeader(code)
- }
-}
-
-func (b *basicWriter) Write(buf []byte) (int, error) {
- b.maybeWriteHeader()
- n, err := b.ResponseWriter.Write(buf)
- if b.tee != nil {
- _, err2 := b.tee.Write(buf[:n])
- // Prefer errors generated by the proxied writer.
- if err == nil {
- err = err2
- }
- }
- b.bytes += n
- return n, err
-}
-
-func (b *basicWriter) maybeWriteHeader() {
- if !b.wroteHeader {
- b.WriteHeader(http.StatusOK)
- }
-}
-
-func (b *basicWriter) Status() int {
- return b.code
-}
-
-func (b *basicWriter) BytesWritten() int {
- return b.bytes
-}
-
-func (b *basicWriter) Tee(w io.Writer) {
- b.tee = w
-}
-
-func (b *basicWriter) Unwrap() http.ResponseWriter {
- return b.ResponseWriter
-}
-
-// httpFancyWriter is a HTTP writer that additionally satisfies
-// http.Flusher, http.Hijacker, and io.ReaderFrom. It exists for the common case
-// of wrapping the http.ResponseWriter that package http gives you, in order to
-// make the proxied object support the full method set of the proxied object.
-type httpFancyWriter struct {
- basicWriter
-}
-
-func (f *httpFancyWriter) Flush() {
- f.wroteHeader = true
- fl := f.basicWriter.ResponseWriter.(http.Flusher)
- fl.Flush()
-}
-
-func (f *httpFancyWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- hj := f.basicWriter.ResponseWriter.(http.Hijacker)
- return hj.Hijack()
-}
-
-func (f *httpFancyWriter) ReadFrom(r io.Reader) (int64, error) {
- if f.basicWriter.tee != nil {
- n, err := io.Copy(&f.basicWriter, r)
- f.basicWriter.bytes += int(n)
- return n, err
- }
- rf := f.basicWriter.ResponseWriter.(io.ReaderFrom)
- f.basicWriter.maybeWriteHeader()
- n, err := rf.ReadFrom(r)
- f.basicWriter.bytes += int(n)
- return n, err
-}
-
-var _ http.Flusher = &httpFancyWriter{}
-var _ http.Hijacker = &httpFancyWriter{}
-var _ io.ReaderFrom = &httpFancyWriter{}
-
-// http2FancyWriter is a HTTP2 writer that additionally satisfies
-// http.Flusher, and io.ReaderFrom. It exists for the common case
-// of wrapping the http.ResponseWriter that package http gives you, in order to
-// make the proxied object support the full method set of the proxied object.
-type http2FancyWriter struct {
- basicWriter
-}
-
-func (f *http2FancyWriter) Flush() {
- f.wroteHeader = true
- fl := f.basicWriter.ResponseWriter.(http.Flusher)
- fl.Flush()
-}
-
-func (f *http2FancyWriter) Push(target string, opts *http.PushOptions) error {
- return f.basicWriter.ResponseWriter.(http.Pusher).Push(target, opts)
-}
-
-var _ http.Flusher = &http2FancyWriter{}
-var _ http.Pusher = &http2FancyWriter{}
diff --git a/vendor/github.com/go-chi/chi/v5/mux.go b/vendor/github.com/go-chi/chi/v5/mux.go
deleted file mode 100644
index 146643b04c1..00000000000
--- a/vendor/github.com/go-chi/chi/v5/mux.go
+++ /dev/null
@@ -1,479 +0,0 @@
-package chi
-
-import (
- "context"
- "fmt"
- "net/http"
- "strings"
- "sync"
-)
-
-var _ Router = &Mux{}
-
-// Mux is a simple HTTP route multiplexer that parses a request path,
-// records any URL params, and executes an end handler. It implements
-// the http.Handler interface and is friendly with the standard library.
-//
-// Mux is designed to be fast, minimal and offer a powerful API for building
-// modular and composable HTTP services with a large set of handlers. It's
-// particularly useful for writing large REST API services that break a handler
-// into many smaller parts composed of middlewares and end handlers.
-type Mux struct {
- // The radix trie router
- tree *node
-
- // The middleware stack
- middlewares []func(http.Handler) http.Handler
-
- // Controls the behaviour of middleware chain generation when a mux
- // is registered as an inline group inside another mux.
- inline bool
- parent *Mux
-
- // The computed mux handler made of the chained middleware stack and
- // the tree router
- handler http.Handler
-
- // Routing context pool
- pool *sync.Pool
-
- // Custom route not found handler
- notFoundHandler http.HandlerFunc
-
- // Custom method not allowed handler
- methodNotAllowedHandler http.HandlerFunc
-}
-
-// NewMux returns a newly initialized Mux object that implements the Router
-// interface.
-func NewMux() *Mux {
- mux := &Mux{tree: &node{}, pool: &sync.Pool{}}
- mux.pool.New = func() interface{} {
- return NewRouteContext()
- }
- return mux
-}
-
-// ServeHTTP is the single method of the http.Handler interface that makes
-// Mux interoperable with the standard library. It uses a sync.Pool to get and
-// reuse routing contexts for each request.
-func (mx *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- // Ensure the mux has some routes defined on the mux
- if mx.handler == nil {
- mx.NotFoundHandler().ServeHTTP(w, r)
- return
- }
-
- // Check if a routing context already exists from a parent router.
- rctx, _ := r.Context().Value(RouteCtxKey).(*Context)
- if rctx != nil {
- mx.handler.ServeHTTP(w, r)
- return
- }
-
- // Fetch a RouteContext object from the sync pool, and call the computed
- // mx.handler that is comprised of mx.middlewares + mx.routeHTTP.
- // Once the request is finished, reset the routing context and put it back
- // into the pool for reuse from another request.
- rctx = mx.pool.Get().(*Context)
- rctx.Reset()
- rctx.Routes = mx
- rctx.parentCtx = r.Context()
-
- // NOTE: r.WithContext() causes 2 allocations and context.WithValue() causes 1 allocation
- r = r.WithContext(context.WithValue(r.Context(), RouteCtxKey, rctx))
-
- // Serve the request and once its done, put the request context back in the sync pool
- mx.handler.ServeHTTP(w, r)
- mx.pool.Put(rctx)
-}
-
-// Use appends a middleware handler to the Mux middleware stack.
-//
-// The middleware stack for any Mux will execute before searching for a matching
-// route to a specific handler, which provides opportunity to respond early,
-// change the course of the request execution, or set request-scoped values for
-// the next http.Handler.
-func (mx *Mux) Use(middlewares ...func(http.Handler) http.Handler) {
- if mx.handler != nil {
- panic("chi: all middlewares must be defined before routes on a mux")
- }
- mx.middlewares = append(mx.middlewares, middlewares...)
-}
-
-// Handle adds the route `pattern` that matches any http method to
-// execute the `handler` http.Handler.
-func (mx *Mux) Handle(pattern string, handler http.Handler) {
- mx.handle(mALL, pattern, handler)
-}
-
-// HandleFunc adds the route `pattern` that matches any http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) HandleFunc(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mALL, pattern, handlerFn)
-}
-
-// Method adds the route `pattern` that matches `method` http method to
-// execute the `handler` http.Handler.
-func (mx *Mux) Method(method, pattern string, handler http.Handler) {
- m, ok := methodMap[strings.ToUpper(method)]
- if !ok {
- panic(fmt.Sprintf("chi: '%s' http method is not supported.", method))
- }
- mx.handle(m, pattern, handler)
-}
-
-// MethodFunc adds the route `pattern` that matches `method` http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) MethodFunc(method, pattern string, handlerFn http.HandlerFunc) {
- mx.Method(method, pattern, handlerFn)
-}
-
-// Connect adds the route `pattern` that matches a CONNECT http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Connect(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mCONNECT, pattern, handlerFn)
-}
-
-// Delete adds the route `pattern` that matches a DELETE http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Delete(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mDELETE, pattern, handlerFn)
-}
-
-// Get adds the route `pattern` that matches a GET http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Get(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mGET, pattern, handlerFn)
-}
-
-// Head adds the route `pattern` that matches a HEAD http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Head(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mHEAD, pattern, handlerFn)
-}
-
-// Options adds the route `pattern` that matches a OPTIONS http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Options(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mOPTIONS, pattern, handlerFn)
-}
-
-// Patch adds the route `pattern` that matches a PATCH http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Patch(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPATCH, pattern, handlerFn)
-}
-
-// Post adds the route `pattern` that matches a POST http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Post(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPOST, pattern, handlerFn)
-}
-
-// Put adds the route `pattern` that matches a PUT http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Put(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mPUT, pattern, handlerFn)
-}
-
-// Trace adds the route `pattern` that matches a TRACE http method to
-// execute the `handlerFn` http.HandlerFunc.
-func (mx *Mux) Trace(pattern string, handlerFn http.HandlerFunc) {
- mx.handle(mTRACE, pattern, handlerFn)
-}
-
-// NotFound sets a custom http.HandlerFunc for routing paths that could
-// not be found. The default 404 handler is `http.NotFound`.
-func (mx *Mux) NotFound(handlerFn http.HandlerFunc) {
- // Build NotFound handler chain
- m := mx
- h := Chain(mx.middlewares...).HandlerFunc(handlerFn).ServeHTTP
- if mx.inline && mx.parent != nil {
- m = mx.parent
- }
-
- // Update the notFoundHandler from this point forward
- m.notFoundHandler = h
- m.updateSubRoutes(func(subMux *Mux) {
- if subMux.notFoundHandler == nil {
- subMux.NotFound(h)
- }
- })
-}
-
-// MethodNotAllowed sets a custom http.HandlerFunc for routing paths where the
-// method is unresolved. The default handler returns a 405 with an empty body.
-func (mx *Mux) MethodNotAllowed(handlerFn http.HandlerFunc) {
- // Build MethodNotAllowed handler chain
- m := mx
- h := Chain(mx.middlewares...).HandlerFunc(handlerFn).ServeHTTP
- if mx.inline && mx.parent != nil {
- m = mx.parent
- }
-
- // Update the methodNotAllowedHandler from this point forward
- m.methodNotAllowedHandler = h
- m.updateSubRoutes(func(subMux *Mux) {
- if subMux.methodNotAllowedHandler == nil {
- subMux.MethodNotAllowed(h)
- }
- })
-}
-
-// With adds inline middlewares for an endpoint handler.
-func (mx *Mux) With(middlewares ...func(http.Handler) http.Handler) Router {
- // Similarly as in handle(), we must build the mux handler once additional
- // middleware registration isn't allowed for this stack, like now.
- if !mx.inline && mx.handler == nil {
- mx.updateRouteHandler()
- }
-
- // Copy middlewares from parent inline muxs
- var mws Middlewares
- if mx.inline {
- mws = make(Middlewares, len(mx.middlewares))
- copy(mws, mx.middlewares)
- }
- mws = append(mws, middlewares...)
-
- im := &Mux{
- pool: mx.pool, inline: true, parent: mx, tree: mx.tree, middlewares: mws,
- notFoundHandler: mx.notFoundHandler, methodNotAllowedHandler: mx.methodNotAllowedHandler,
- }
-
- return im
-}
-
-// Group creates a new inline-Mux with a fresh middleware stack. It's useful
-// for a group of handlers along the same routing path that use an additional
-// set of middlewares. See _examples/.
-func (mx *Mux) Group(fn func(r Router)) Router {
- im := mx.With().(*Mux)
- if fn != nil {
- fn(im)
- }
- return im
-}
-
-// Route creates a new Mux with a fresh middleware stack and mounts it
-// along the `pattern` as a subrouter. Effectively, this is a short-hand
-// call to Mount. See _examples/.
-func (mx *Mux) Route(pattern string, fn func(r Router)) Router {
- if fn == nil {
- panic(fmt.Sprintf("chi: attempting to Route() a nil subrouter on '%s'", pattern))
- }
- subRouter := NewRouter()
- fn(subRouter)
- mx.Mount(pattern, subRouter)
- return subRouter
-}
-
-// Mount attaches another http.Handler or chi Router as a subrouter along a routing
-// path. It's very useful to split up a large API as many independent routers and
-// compose them as a single service using Mount. See _examples/.
-//
-// Note that Mount() simply sets a wildcard along the `pattern` that will continue
-// routing at the `handler`, which in most cases is another chi.Router. As a result,
-// if you define two Mount() routes on the exact same pattern the mount will panic.
-func (mx *Mux) Mount(pattern string, handler http.Handler) {
- if handler == nil {
- panic(fmt.Sprintf("chi: attempting to Mount() a nil handler on '%s'", pattern))
- }
-
- // Provide runtime safety for ensuring a pattern isn't mounted on an existing
- // routing pattern.
- if mx.tree.findPattern(pattern+"*") || mx.tree.findPattern(pattern+"/*") {
- panic(fmt.Sprintf("chi: attempting to Mount() a handler on an existing path, '%s'", pattern))
- }
-
- // Assign sub-Router's with the parent not found & method not allowed handler if not specified.
- subr, ok := handler.(*Mux)
- if ok && subr.notFoundHandler == nil && mx.notFoundHandler != nil {
- subr.NotFound(mx.notFoundHandler)
- }
- if ok && subr.methodNotAllowedHandler == nil && mx.methodNotAllowedHandler != nil {
- subr.MethodNotAllowed(mx.methodNotAllowedHandler)
- }
-
- mountHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- rctx := RouteContext(r.Context())
-
- // shift the url path past the previous subrouter
- rctx.RoutePath = mx.nextRoutePath(rctx)
-
- // reset the wildcard URLParam which connects the subrouter
- n := len(rctx.URLParams.Keys) - 1
- if n >= 0 && rctx.URLParams.Keys[n] == "*" && len(rctx.URLParams.Values) > n {
- rctx.URLParams.Values[n] = ""
- }
-
- handler.ServeHTTP(w, r)
- })
-
- if pattern == "" || pattern[len(pattern)-1] != '/' {
- mx.handle(mALL|mSTUB, pattern, mountHandler)
- mx.handle(mALL|mSTUB, pattern+"/", mountHandler)
- pattern += "/"
- }
-
- method := mALL
- subroutes, _ := handler.(Routes)
- if subroutes != nil {
- method |= mSTUB
- }
- n := mx.handle(method, pattern+"*", mountHandler)
-
- if subroutes != nil {
- n.subroutes = subroutes
- }
-}
-
-// Routes returns a slice of routing information from the tree,
-// useful for traversing available routes of a router.
-func (mx *Mux) Routes() []Route {
- return mx.tree.routes()
-}
-
-// Middlewares returns a slice of middleware handler functions.
-func (mx *Mux) Middlewares() Middlewares {
- return mx.middlewares
-}
-
-// Match searches the routing tree for a handler that matches the method/path.
-// It's similar to routing a http request, but without executing the handler
-// thereafter.
-//
-// Note: the *Context state is updated during execution, so manage
-// the state carefully or make a NewRouteContext().
-func (mx *Mux) Match(rctx *Context, method, path string) bool {
- m, ok := methodMap[method]
- if !ok {
- return false
- }
-
- node, _, h := mx.tree.FindRoute(rctx, m, path)
-
- if node != nil && node.subroutes != nil {
- rctx.RoutePath = mx.nextRoutePath(rctx)
- return node.subroutes.Match(rctx, method, rctx.RoutePath)
- }
-
- return h != nil
-}
-
-// NotFoundHandler returns the default Mux 404 responder whenever a route
-// cannot be found.
-func (mx *Mux) NotFoundHandler() http.HandlerFunc {
- if mx.notFoundHandler != nil {
- return mx.notFoundHandler
- }
- return http.NotFound
-}
-
-// MethodNotAllowedHandler returns the default Mux 405 responder whenever
-// a method cannot be resolved for a route.
-func (mx *Mux) MethodNotAllowedHandler() http.HandlerFunc {
- if mx.methodNotAllowedHandler != nil {
- return mx.methodNotAllowedHandler
- }
- return methodNotAllowedHandler
-}
-
-// handle registers a http.Handler in the routing tree for a particular http method
-// and routing pattern.
-func (mx *Mux) handle(method methodTyp, pattern string, handler http.Handler) *node {
- if len(pattern) == 0 || pattern[0] != '/' {
- panic(fmt.Sprintf("chi: routing pattern must begin with '/' in '%s'", pattern))
- }
-
- // Build the computed routing handler for this routing pattern.
- if !mx.inline && mx.handler == nil {
- mx.updateRouteHandler()
- }
-
- // Build endpoint handler with inline middlewares for the route
- var h http.Handler
- if mx.inline {
- mx.handler = http.HandlerFunc(mx.routeHTTP)
- h = Chain(mx.middlewares...).Handler(handler)
- } else {
- h = handler
- }
-
- // Add the endpoint to the tree and return the node
- return mx.tree.InsertRoute(method, pattern, h)
-}
-
-// routeHTTP routes a http.Request through the Mux routing tree to serve
-// the matching handler for a particular http method.
-func (mx *Mux) routeHTTP(w http.ResponseWriter, r *http.Request) {
- // Grab the route context object
- rctx := r.Context().Value(RouteCtxKey).(*Context)
-
- // The request routing path
- routePath := rctx.RoutePath
- if routePath == "" {
- if r.URL.RawPath != "" {
- routePath = r.URL.RawPath
- } else {
- routePath = r.URL.Path
- }
- }
-
- // Check if method is supported by chi
- if rctx.RouteMethod == "" {
- rctx.RouteMethod = r.Method
- }
- method, ok := methodMap[rctx.RouteMethod]
- if !ok {
- mx.MethodNotAllowedHandler().ServeHTTP(w, r)
- return
- }
-
- // Find the route
- if _, _, h := mx.tree.FindRoute(rctx, method, routePath); h != nil {
- h.ServeHTTP(w, r)
- return
- }
- if rctx.methodNotAllowed {
- mx.MethodNotAllowedHandler().ServeHTTP(w, r)
- } else {
- mx.NotFoundHandler().ServeHTTP(w, r)
- }
-}
-
-func (mx *Mux) nextRoutePath(rctx *Context) string {
- routePath := "/"
- nx := len(rctx.routeParams.Keys) - 1 // index of last param in list
- if nx >= 0 && rctx.routeParams.Keys[nx] == "*" && len(rctx.routeParams.Values) > nx {
- routePath = "/" + rctx.routeParams.Values[nx]
- }
- return routePath
-}
-
-// Recursively update data on child routers.
-func (mx *Mux) updateSubRoutes(fn func(subMux *Mux)) {
- for _, r := range mx.tree.routes() {
- subMux, ok := r.SubRoutes.(*Mux)
- if !ok {
- continue
- }
- fn(subMux)
- }
-}
-
-// updateRouteHandler builds the single mux handler that is a chain of the middleware
-// stack, as defined by calls to Use(), and the tree router (Mux) itself. After this
-// point, no other middlewares can be registered on this Mux's stack. But you can still
-// compose additional middlewares via Group()'s or using a chained middleware handler.
-func (mx *Mux) updateRouteHandler() {
- mx.handler = chain(mx.middlewares, http.HandlerFunc(mx.routeHTTP))
-}
-
-// methodNotAllowedHandler is a helper function to respond with a 405,
-// method not allowed.
-func methodNotAllowedHandler(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(405)
- w.Write(nil)
-}
diff --git a/vendor/github.com/go-chi/chi/v5/tree.go b/vendor/github.com/go-chi/chi/v5/tree.go
deleted file mode 100644
index 8057c528138..00000000000
--- a/vendor/github.com/go-chi/chi/v5/tree.go
+++ /dev/null
@@ -1,866 +0,0 @@
-package chi
-
-// Radix tree implementation below is a based on the original work by
-// Armon Dadgar in https://github.com/armon/go-radix/blob/master/radix.go
-// (MIT licensed). It's been heavily modified for use as a HTTP routing tree.
-
-import (
- "fmt"
- "net/http"
- "regexp"
- "sort"
- "strconv"
- "strings"
-)
-
-type methodTyp int
-
-const (
- mSTUB methodTyp = 1 << iota
- mCONNECT
- mDELETE
- mGET
- mHEAD
- mOPTIONS
- mPATCH
- mPOST
- mPUT
- mTRACE
-)
-
-var mALL = mCONNECT | mDELETE | mGET | mHEAD |
- mOPTIONS | mPATCH | mPOST | mPUT | mTRACE
-
-var methodMap = map[string]methodTyp{
- http.MethodConnect: mCONNECT,
- http.MethodDelete: mDELETE,
- http.MethodGet: mGET,
- http.MethodHead: mHEAD,
- http.MethodOptions: mOPTIONS,
- http.MethodPatch: mPATCH,
- http.MethodPost: mPOST,
- http.MethodPut: mPUT,
- http.MethodTrace: mTRACE,
-}
-
-// RegisterMethod adds support for custom HTTP method handlers, available
-// via Router#Method and Router#MethodFunc
-func RegisterMethod(method string) {
- if method == "" {
- return
- }
- method = strings.ToUpper(method)
- if _, ok := methodMap[method]; ok {
- return
- }
- n := len(methodMap)
- if n > strconv.IntSize-2 {
- panic(fmt.Sprintf("chi: max number of methods reached (%d)", strconv.IntSize))
- }
- mt := methodTyp(2 << n)
- methodMap[method] = mt
- mALL |= mt
-}
-
-type nodeTyp uint8
-
-const (
- ntStatic nodeTyp = iota // /home
- ntRegexp // /{id:[0-9]+}
- ntParam // /{user}
- ntCatchAll // /api/v1/*
-)
-
-type node struct {
- // node type: static, regexp, param, catchAll
- typ nodeTyp
-
- // first byte of the prefix
- label byte
-
- // first byte of the child prefix
- tail byte
-
- // prefix is the common prefix we ignore
- prefix string
-
- // regexp matcher for regexp nodes
- rex *regexp.Regexp
-
- // HTTP handler endpoints on the leaf node
- endpoints endpoints
-
- // subroutes on the leaf node
- subroutes Routes
-
- // child nodes should be stored in-order for iteration,
- // in groups of the node type.
- children [ntCatchAll + 1]nodes
-}
-
-// endpoints is a mapping of http method constants to handlers
-// for a given route.
-type endpoints map[methodTyp]*endpoint
-
-type endpoint struct {
- // endpoint handler
- handler http.Handler
-
- // pattern is the routing pattern for handler nodes
- pattern string
-
- // parameter keys recorded on handler nodes
- paramKeys []string
-}
-
-func (s endpoints) Value(method methodTyp) *endpoint {
- mh, ok := s[method]
- if !ok {
- mh = &endpoint{}
- s[method] = mh
- }
- return mh
-}
-
-func (n *node) InsertRoute(method methodTyp, pattern string, handler http.Handler) *node {
- var parent *node
- search := pattern
-
- for {
- // Handle key exhaustion
- if len(search) == 0 {
- // Insert or update the node's leaf handler
- n.setEndpoint(method, handler, pattern)
- return n
- }
-
- // We're going to be searching for a wild node next,
- // in this case, we need to get the tail
- var label = search[0]
- var segTail byte
- var segEndIdx int
- var segTyp nodeTyp
- var segRexpat string
- if label == '{' || label == '*' {
- segTyp, _, segRexpat, segTail, _, segEndIdx = patNextSegment(search)
- }
-
- var prefix string
- if segTyp == ntRegexp {
- prefix = segRexpat
- }
-
- // Look for the edge to attach to
- parent = n
- n = n.getEdge(segTyp, label, segTail, prefix)
-
- // No edge, create one
- if n == nil {
- child := &node{label: label, tail: segTail, prefix: search}
- hn := parent.addChild(child, search)
- hn.setEndpoint(method, handler, pattern)
-
- return hn
- }
-
- // Found an edge to match the pattern
-
- if n.typ > ntStatic {
- // We found a param node, trim the param from the search path and continue.
- // This param/wild pattern segment would already be on the tree from a previous
- // call to addChild when creating a new node.
- search = search[segEndIdx:]
- continue
- }
-
- // Static nodes fall below here.
- // Determine longest prefix of the search key on match.
- commonPrefix := longestPrefix(search, n.prefix)
- if commonPrefix == len(n.prefix) {
- // the common prefix is as long as the current node's prefix we're attempting to insert.
- // keep the search going.
- search = search[commonPrefix:]
- continue
- }
-
- // Split the node
- child := &node{
- typ: ntStatic,
- prefix: search[:commonPrefix],
- }
- parent.replaceChild(search[0], segTail, child)
-
- // Restore the existing node
- n.label = n.prefix[commonPrefix]
- n.prefix = n.prefix[commonPrefix:]
- child.addChild(n, n.prefix)
-
- // If the new key is a subset, set the method/handler on this node and finish.
- search = search[commonPrefix:]
- if len(search) == 0 {
- child.setEndpoint(method, handler, pattern)
- return child
- }
-
- // Create a new edge for the node
- subchild := &node{
- typ: ntStatic,
- label: search[0],
- prefix: search,
- }
- hn := child.addChild(subchild, search)
- hn.setEndpoint(method, handler, pattern)
- return hn
- }
-}
-
-// addChild appends the new `child` node to the tree using the `pattern` as the trie key.
-// For a URL router like chi's, we split the static, param, regexp and wildcard segments
-// into different nodes. In addition, addChild will recursively call itself until every
-// pattern segment is added to the url pattern tree as individual nodes, depending on type.
-func (n *node) addChild(child *node, prefix string) *node {
- search := prefix
-
- // handler leaf node added to the tree is the child.
- // this may be overridden later down the flow
- hn := child
-
- // Parse next segment
- segTyp, _, segRexpat, segTail, segStartIdx, segEndIdx := patNextSegment(search)
-
- // Add child depending on next up segment
- switch segTyp {
-
- case ntStatic:
- // Search prefix is all static (that is, has no params in path)
- // noop
-
- default:
- // Search prefix contains a param, regexp or wildcard
-
- if segTyp == ntRegexp {
- rex, err := regexp.Compile(segRexpat)
- if err != nil {
- panic(fmt.Sprintf("chi: invalid regexp pattern '%s' in route param", segRexpat))
- }
- child.prefix = segRexpat
- child.rex = rex
- }
-
- if segStartIdx == 0 {
- // Route starts with a param
- child.typ = segTyp
-
- if segTyp == ntCatchAll {
- segStartIdx = -1
- } else {
- segStartIdx = segEndIdx
- }
- if segStartIdx < 0 {
- segStartIdx = len(search)
- }
- child.tail = segTail // for params, we set the tail
-
- if segStartIdx != len(search) {
- // add static edge for the remaining part, split the end.
- // its not possible to have adjacent param nodes, so its certainly
- // going to be a static node next.
-
- search = search[segStartIdx:] // advance search position
-
- nn := &node{
- typ: ntStatic,
- label: search[0],
- prefix: search,
- }
- hn = child.addChild(nn, search)
- }
-
- } else if segStartIdx > 0 {
- // Route has some param
-
- // starts with a static segment
- child.typ = ntStatic
- child.prefix = search[:segStartIdx]
- child.rex = nil
-
- // add the param edge node
- search = search[segStartIdx:]
-
- nn := &node{
- typ: segTyp,
- label: search[0],
- tail: segTail,
- }
- hn = child.addChild(nn, search)
-
- }
- }
-
- n.children[child.typ] = append(n.children[child.typ], child)
- n.children[child.typ].Sort()
- return hn
-}
-
-func (n *node) replaceChild(label, tail byte, child *node) {
- for i := 0; i < len(n.children[child.typ]); i++ {
- if n.children[child.typ][i].label == label && n.children[child.typ][i].tail == tail {
- n.children[child.typ][i] = child
- n.children[child.typ][i].label = label
- n.children[child.typ][i].tail = tail
- return
- }
- }
- panic("chi: replacing missing child")
-}
-
-func (n *node) getEdge(ntyp nodeTyp, label, tail byte, prefix string) *node {
- nds := n.children[ntyp]
- for i := 0; i < len(nds); i++ {
- if nds[i].label == label && nds[i].tail == tail {
- if ntyp == ntRegexp && nds[i].prefix != prefix {
- continue
- }
- return nds[i]
- }
- }
- return nil
-}
-
-func (n *node) setEndpoint(method methodTyp, handler http.Handler, pattern string) {
- // Set the handler for the method type on the node
- if n.endpoints == nil {
- n.endpoints = make(endpoints)
- }
-
- paramKeys := patParamKeys(pattern)
-
- if method&mSTUB == mSTUB {
- n.endpoints.Value(mSTUB).handler = handler
- }
- if method&mALL == mALL {
- h := n.endpoints.Value(mALL)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- for _, m := range methodMap {
- h := n.endpoints.Value(m)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- }
- } else {
- h := n.endpoints.Value(method)
- h.handler = handler
- h.pattern = pattern
- h.paramKeys = paramKeys
- }
-}
-
-func (n *node) FindRoute(rctx *Context, method methodTyp, path string) (*node, endpoints, http.Handler) {
- // Reset the context routing pattern and params
- rctx.routePattern = ""
- rctx.routeParams.Keys = rctx.routeParams.Keys[:0]
- rctx.routeParams.Values = rctx.routeParams.Values[:0]
-
- // Find the routing handlers for the path
- rn := n.findRoute(rctx, method, path)
- if rn == nil {
- return nil, nil, nil
- }
-
- // Record the routing params in the request lifecycle
- rctx.URLParams.Keys = append(rctx.URLParams.Keys, rctx.routeParams.Keys...)
- rctx.URLParams.Values = append(rctx.URLParams.Values, rctx.routeParams.Values...)
-
- // Record the routing pattern in the request lifecycle
- if rn.endpoints[method].pattern != "" {
- rctx.routePattern = rn.endpoints[method].pattern
- rctx.RoutePatterns = append(rctx.RoutePatterns, rctx.routePattern)
- }
-
- return rn, rn.endpoints, rn.endpoints[method].handler
-}
-
-// Recursive edge traversal by checking all nodeTyp groups along the way.
-// It's like searching through a multi-dimensional radix trie.
-func (n *node) findRoute(rctx *Context, method methodTyp, path string) *node {
- nn := n
- search := path
-
- for t, nds := range nn.children {
- ntyp := nodeTyp(t)
- if len(nds) == 0 {
- continue
- }
-
- var xn *node
- xsearch := search
-
- var label byte
- if search != "" {
- label = search[0]
- }
-
- switch ntyp {
- case ntStatic:
- xn = nds.findEdge(label)
- if xn == nil || !strings.HasPrefix(xsearch, xn.prefix) {
- continue
- }
- xsearch = xsearch[len(xn.prefix):]
-
- case ntParam, ntRegexp:
- // short-circuit and return no matching route for empty param values
- if xsearch == "" {
- continue
- }
-
- // serially loop through each node grouped by the tail delimiter
- for idx := 0; idx < len(nds); idx++ {
- xn = nds[idx]
-
- // label for param nodes is the delimiter byte
- p := strings.IndexByte(xsearch, xn.tail)
-
- if p < 0 {
- if xn.tail == '/' {
- p = len(xsearch)
- } else {
- continue
- }
- } else if ntyp == ntRegexp && p == 0 {
- continue
- }
-
- if ntyp == ntRegexp && xn.rex != nil {
- if !xn.rex.MatchString(xsearch[:p]) {
- continue
- }
- } else if strings.IndexByte(xsearch[:p], '/') != -1 {
- // avoid a match across path segments
- continue
- }
-
- prevlen := len(rctx.routeParams.Values)
- rctx.routeParams.Values = append(rctx.routeParams.Values, xsearch[:p])
- xsearch = xsearch[p:]
-
- if len(xsearch) == 0 {
- if xn.isLeaf() {
- h := xn.endpoints[method]
- if h != nil && h.handler != nil {
- rctx.routeParams.Keys = append(rctx.routeParams.Keys, h.paramKeys...)
- return xn
- }
-
- // flag that the routing context found a route, but not a corresponding
- // supported method
- rctx.methodNotAllowed = true
- }
- }
-
- // recursively find the next node on this branch
- fin := xn.findRoute(rctx, method, xsearch)
- if fin != nil {
- return fin
- }
-
- // not found on this branch, reset vars
- rctx.routeParams.Values = rctx.routeParams.Values[:prevlen]
- xsearch = search
- }
-
- rctx.routeParams.Values = append(rctx.routeParams.Values, "")
-
- default:
- // catch-all nodes
- rctx.routeParams.Values = append(rctx.routeParams.Values, search)
- xn = nds[0]
- xsearch = ""
- }
-
- if xn == nil {
- continue
- }
-
- // did we find it yet?
- if len(xsearch) == 0 {
- if xn.isLeaf() {
- h := xn.endpoints[method]
- if h != nil && h.handler != nil {
- rctx.routeParams.Keys = append(rctx.routeParams.Keys, h.paramKeys...)
- return xn
- }
-
- // flag that the routing context found a route, but not a corresponding
- // supported method
- rctx.methodNotAllowed = true
- }
- }
-
- // recursively find the next node..
- fin := xn.findRoute(rctx, method, xsearch)
- if fin != nil {
- return fin
- }
-
- // Did not find final handler, let's remove the param here if it was set
- if xn.typ > ntStatic {
- if len(rctx.routeParams.Values) > 0 {
- rctx.routeParams.Values = rctx.routeParams.Values[:len(rctx.routeParams.Values)-1]
- }
- }
-
- }
-
- return nil
-}
-
-func (n *node) findEdge(ntyp nodeTyp, label byte) *node {
- nds := n.children[ntyp]
- num := len(nds)
- idx := 0
-
- switch ntyp {
- case ntStatic, ntParam, ntRegexp:
- i, j := 0, num-1
- for i <= j {
- idx = i + (j-i)/2
- if label > nds[idx].label {
- i = idx + 1
- } else if label < nds[idx].label {
- j = idx - 1
- } else {
- i = num // breaks cond
- }
- }
- if nds[idx].label != label {
- return nil
- }
- return nds[idx]
-
- default: // catch all
- return nds[idx]
- }
-}
-
-func (n *node) isLeaf() bool {
- return n.endpoints != nil
-}
-
-func (n *node) findPattern(pattern string) bool {
- nn := n
- for _, nds := range nn.children {
- if len(nds) == 0 {
- continue
- }
-
- n = nn.findEdge(nds[0].typ, pattern[0])
- if n == nil {
- continue
- }
-
- var idx int
- var xpattern string
-
- switch n.typ {
- case ntStatic:
- idx = longestPrefix(pattern, n.prefix)
- if idx < len(n.prefix) {
- continue
- }
-
- case ntParam, ntRegexp:
- idx = strings.IndexByte(pattern, '}') + 1
-
- case ntCatchAll:
- idx = longestPrefix(pattern, "*")
-
- default:
- panic("chi: unknown node type")
- }
-
- xpattern = pattern[idx:]
- if len(xpattern) == 0 {
- return true
- }
-
- return n.findPattern(xpattern)
- }
- return false
-}
-
-func (n *node) routes() []Route {
- rts := []Route{}
-
- n.walk(func(eps endpoints, subroutes Routes) bool {
- if eps[mSTUB] != nil && eps[mSTUB].handler != nil && subroutes == nil {
- return false
- }
-
- // Group methodHandlers by unique patterns
- pats := make(map[string]endpoints)
-
- for mt, h := range eps {
- if h.pattern == "" {
- continue
- }
- p, ok := pats[h.pattern]
- if !ok {
- p = endpoints{}
- pats[h.pattern] = p
- }
- p[mt] = h
- }
-
- for p, mh := range pats {
- hs := make(map[string]http.Handler)
- if mh[mALL] != nil && mh[mALL].handler != nil {
- hs["*"] = mh[mALL].handler
- }
-
- for mt, h := range mh {
- if h.handler == nil {
- continue
- }
- m := methodTypString(mt)
- if m == "" {
- continue
- }
- hs[m] = h.handler
- }
-
- rt := Route{p, hs, subroutes}
- rts = append(rts, rt)
- }
-
- return false
- })
-
- return rts
-}
-
-func (n *node) walk(fn func(eps endpoints, subroutes Routes) bool) bool {
- // Visit the leaf values if any
- if (n.endpoints != nil || n.subroutes != nil) && fn(n.endpoints, n.subroutes) {
- return true
- }
-
- // Recurse on the children
- for _, ns := range n.children {
- for _, cn := range ns {
- if cn.walk(fn) {
- return true
- }
- }
- }
- return false
-}
-
-// patNextSegment returns the next segment details from a pattern:
-// node type, param key, regexp string, param tail byte, param starting index, param ending index
-func patNextSegment(pattern string) (nodeTyp, string, string, byte, int, int) {
- ps := strings.Index(pattern, "{")
- ws := strings.Index(pattern, "*")
-
- if ps < 0 && ws < 0 {
- return ntStatic, "", "", 0, 0, len(pattern) // we return the entire thing
- }
-
- // Sanity check
- if ps >= 0 && ws >= 0 && ws < ps {
- panic("chi: wildcard '*' must be the last pattern in a route, otherwise use a '{param}'")
- }
-
- var tail byte = '/' // Default endpoint tail to / byte
-
- if ps >= 0 {
- // Param/Regexp pattern is next
- nt := ntParam
-
- // Read to closing } taking into account opens and closes in curl count (cc)
- cc := 0
- pe := ps
- for i, c := range pattern[ps:] {
- if c == '{' {
- cc++
- } else if c == '}' {
- cc--
- if cc == 0 {
- pe = ps + i
- break
- }
- }
- }
- if pe == ps {
- panic("chi: route param closing delimiter '}' is missing")
- }
-
- key := pattern[ps+1 : pe]
- pe++ // set end to next position
-
- if pe < len(pattern) {
- tail = pattern[pe]
- }
-
- var rexpat string
- if idx := strings.Index(key, ":"); idx >= 0 {
- nt = ntRegexp
- rexpat = key[idx+1:]
- key = key[:idx]
- }
-
- if len(rexpat) > 0 {
- if rexpat[0] != '^' {
- rexpat = "^" + rexpat
- }
- if rexpat[len(rexpat)-1] != '$' {
- rexpat += "$"
- }
- }
-
- return nt, key, rexpat, tail, ps, pe
- }
-
- // Wildcard pattern as finale
- if ws < len(pattern)-1 {
- panic("chi: wildcard '*' must be the last value in a route. trim trailing text or use a '{param}' instead")
- }
- return ntCatchAll, "*", "", 0, ws, len(pattern)
-}
-
-func patParamKeys(pattern string) []string {
- pat := pattern
- paramKeys := []string{}
- for {
- ptyp, paramKey, _, _, _, e := patNextSegment(pat)
- if ptyp == ntStatic {
- return paramKeys
- }
- for i := 0; i < len(paramKeys); i++ {
- if paramKeys[i] == paramKey {
- panic(fmt.Sprintf("chi: routing pattern '%s' contains duplicate param key, '%s'", pattern, paramKey))
- }
- }
- paramKeys = append(paramKeys, paramKey)
- pat = pat[e:]
- }
-}
-
-// longestPrefix finds the length of the shared prefix
-// of two strings
-func longestPrefix(k1, k2 string) int {
- max := len(k1)
- if l := len(k2); l < max {
- max = l
- }
- var i int
- for i = 0; i < max; i++ {
- if k1[i] != k2[i] {
- break
- }
- }
- return i
-}
-
-func methodTypString(method methodTyp) string {
- for s, t := range methodMap {
- if method == t {
- return s
- }
- }
- return ""
-}
-
-type nodes []*node
-
-// Sort the list of nodes by label
-func (ns nodes) Sort() { sort.Sort(ns); ns.tailSort() }
-func (ns nodes) Len() int { return len(ns) }
-func (ns nodes) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] }
-func (ns nodes) Less(i, j int) bool { return ns[i].label < ns[j].label }
-
-// tailSort pushes nodes with '/' as the tail to the end of the list for param nodes.
-// The list order determines the traversal order.
-func (ns nodes) tailSort() {
- for i := len(ns) - 1; i >= 0; i-- {
- if ns[i].typ > ntStatic && ns[i].tail == '/' {
- ns.Swap(i, len(ns)-1)
- return
- }
- }
-}
-
-func (ns nodes) findEdge(label byte) *node {
- num := len(ns)
- idx := 0
- i, j := 0, num-1
- for i <= j {
- idx = i + (j-i)/2
- if label > ns[idx].label {
- i = idx + 1
- } else if label < ns[idx].label {
- j = idx - 1
- } else {
- i = num // breaks cond
- }
- }
- if ns[idx].label != label {
- return nil
- }
- return ns[idx]
-}
-
-// Route describes the details of a routing handler.
-// Handlers map key is an HTTP method
-type Route struct {
- Pattern string
- Handlers map[string]http.Handler
- SubRoutes Routes
-}
-
-// WalkFunc is the type of the function called for each method and route visited by Walk.
-type WalkFunc func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error
-
-// Walk walks any router tree that implements Routes interface.
-func Walk(r Routes, walkFn WalkFunc) error {
- return walk(r, walkFn, "")
-}
-
-func walk(r Routes, walkFn WalkFunc, parentRoute string, parentMw ...func(http.Handler) http.Handler) error {
- for _, route := range r.Routes() {
- mws := make([]func(http.Handler) http.Handler, len(parentMw))
- copy(mws, parentMw)
- mws = append(mws, r.Middlewares()...)
-
- if route.SubRoutes != nil {
- if err := walk(route.SubRoutes, walkFn, parentRoute+route.Pattern, mws...); err != nil {
- return err
- }
- continue
- }
-
- for method, handler := range route.Handlers {
- if method == "*" {
- // Ignore a "catchAll" method, since we pass down all the specific methods for each route.
- continue
- }
-
- fullRoute := parentRoute + route.Pattern
- fullRoute = strings.Replace(fullRoute, "/*/", "/", -1)
-
- if chain, ok := handler.(*ChainHandler); ok {
- if err := walkFn(method, fullRoute, chain.Endpoint, append(mws, chain.Middlewares...)...); err != nil {
- return err
- }
- } else {
- if err := walkFn(method, fullRoute, handler, mws...); err != nil {
- return err
- }
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/go-chi/cors/LICENSE b/vendor/github.com/go-chi/cors/LICENSE
deleted file mode 100644
index aee6182f9ac..00000000000
--- a/vendor/github.com/go-chi/cors/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2014 Olivier Poitrey
-Copyright (c) 2016-Present https://github.com/go-chi authors
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/go-chi/cors/README.md b/vendor/github.com/go-chi/cors/README.md
deleted file mode 100644
index b41686b6aff..00000000000
--- a/vendor/github.com/go-chi/cors/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# CORS net/http middleware
-
-[go-chi/cors](https://github.com/go-chi/cors) is a fork of [github.com/rs/cors](https://github.com/rs/cors) that
-provides a `net/http` compatible middleware for performing preflight CORS checks on the server side. These headers
-are required for using the browser native [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
-
-This middleware is designed to be used as a top-level middleware on the [chi](https://github.com/go-chi/chi) router.
-Applying with within a `r.Group()` or using `With()` will not work without routes matching `OPTIONS` added.
-
-## Usage
-
-```go
-func main() {
- r := chi.NewRouter()
-
- // Basic CORS
- // for more ideas, see: https://developer.github.com/v3/#cross-origin-resource-sharing
- r.Use(cors.Handler(cors.Options{
- // AllowedOrigins: []string{"https://foo.com"}, // Use this to allow specific origin hosts
- AllowedOrigins: []string{"https://*", "http://*"},
- // AllowOriginFunc: func(r *http.Request, origin string) bool { return true },
- AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
- AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
- ExposedHeaders: []string{"Link"},
- AllowCredentials: false,
- MaxAge: 300, // Maximum value not ignored by any of major browsers
- }))
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("welcome"))
- })
-
- http.ListenAndServe(":3000", r)
-}
-```
-
-## Credits
-
-All credit for the original work of this middleware goes out to [github.com/rs](github.com/rs).
diff --git a/vendor/github.com/go-chi/cors/cors.go b/vendor/github.com/go-chi/cors/cors.go
deleted file mode 100644
index 8df81636e3b..00000000000
--- a/vendor/github.com/go-chi/cors/cors.go
+++ /dev/null
@@ -1,400 +0,0 @@
-// cors package is net/http handler to handle CORS related requests
-// as defined by http://www.w3.org/TR/cors/
-//
-// You can configure it by passing an option struct to cors.New:
-//
-// c := cors.New(cors.Options{
-// AllowedOrigins: []string{"foo.com"},
-// AllowedMethods: []string{"GET", "POST", "DELETE"},
-// AllowCredentials: true,
-// })
-//
-// Then insert the handler in the chain:
-//
-// handler = c.Handler(handler)
-//
-// See Options documentation for more options.
-//
-// The resulting handler is a standard net/http handler.
-package cors
-
-import (
- "log"
- "net/http"
- "os"
- "strconv"
- "strings"
-)
-
-// Options is a configuration container to setup the CORS middleware.
-type Options struct {
- // AllowedOrigins is a list of origins a cross-domain request can be executed from.
- // If the special "*" value is present in the list, all origins will be allowed.
- // An origin may contain a wildcard (*) to replace 0 or more characters
- // (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penalty.
- // Only one wildcard can be used per origin.
- // Default value is ["*"]
- AllowedOrigins []string
-
- // AllowOriginFunc is a custom function to validate the origin. It takes the origin
- // as argument and returns true if allowed or false otherwise. If this option is
- // set, the content of AllowedOrigins is ignored.
- AllowOriginFunc func(r *http.Request, origin string) bool
-
- // AllowedMethods is a list of methods the client is allowed to use with
- // cross-domain requests. Default value is simple methods (HEAD, GET and POST).
- AllowedMethods []string
-
- // AllowedHeaders is list of non simple headers the client is allowed to use with
- // cross-domain requests.
- // If the special "*" value is present in the list, all headers will be allowed.
- // Default value is [] but "Origin" is always appended to the list.
- AllowedHeaders []string
-
- // ExposedHeaders indicates which headers are safe to expose to the API of a CORS
- // API specification
- ExposedHeaders []string
-
- // AllowCredentials indicates whether the request can include user credentials like
- // cookies, HTTP authentication or client side SSL certificates.
- AllowCredentials bool
-
- // MaxAge indicates how long (in seconds) the results of a preflight request
- // can be cached
- MaxAge int
-
- // OptionsPassthrough instructs preflight to let other potential next handlers to
- // process the OPTIONS method. Turn this on if your application handles OPTIONS.
- OptionsPassthrough bool
-
- // Debugging flag adds additional output to debug server side CORS issues
- Debug bool
-}
-
-// Logger generic interface for logger
-type Logger interface {
- Printf(string, ...interface{})
-}
-
-// Cors http handler
-type Cors struct {
- // Debug logger
- Log Logger
-
- // Normalized list of plain allowed origins
- allowedOrigins []string
-
- // List of allowed origins containing wildcards
- allowedWOrigins []wildcard
-
- // Optional origin validator function
- allowOriginFunc func(r *http.Request, origin string) bool
-
- // Normalized list of allowed headers
- allowedHeaders []string
-
- // Normalized list of allowed methods
- allowedMethods []string
-
- // Normalized list of exposed headers
- exposedHeaders []string
- maxAge int
-
- // Set to true when allowed origins contains a "*"
- allowedOriginsAll bool
-
- // Set to true when allowed headers contains a "*"
- allowedHeadersAll bool
-
- allowCredentials bool
- optionPassthrough bool
-}
-
-// New creates a new Cors handler with the provided options.
-func New(options Options) *Cors {
- c := &Cors{
- exposedHeaders: convert(options.ExposedHeaders, http.CanonicalHeaderKey),
- allowOriginFunc: options.AllowOriginFunc,
- allowCredentials: options.AllowCredentials,
- maxAge: options.MaxAge,
- optionPassthrough: options.OptionsPassthrough,
- }
- if options.Debug && c.Log == nil {
- c.Log = log.New(os.Stdout, "[cors] ", log.LstdFlags)
- }
-
- // Normalize options
- // Note: for origins and methods matching, the spec requires a case-sensitive matching.
- // As it may error prone, we chose to ignore the spec here.
-
- // Allowed Origins
- if len(options.AllowedOrigins) == 0 {
- if options.AllowOriginFunc == nil {
- // Default is all origins
- c.allowedOriginsAll = true
- }
- } else {
- c.allowedOrigins = []string{}
- c.allowedWOrigins = []wildcard{}
- for _, origin := range options.AllowedOrigins {
- // Normalize
- origin = strings.ToLower(origin)
- if origin == "*" {
- // If "*" is present in the list, turn the whole list into a match all
- c.allowedOriginsAll = true
- c.allowedOrigins = nil
- c.allowedWOrigins = nil
- break
- } else if i := strings.IndexByte(origin, '*'); i >= 0 {
- // Split the origin in two: start and end string without the *
- w := wildcard{origin[0:i], origin[i+1:]}
- c.allowedWOrigins = append(c.allowedWOrigins, w)
- } else {
- c.allowedOrigins = append(c.allowedOrigins, origin)
- }
- }
- }
-
- // Allowed Headers
- if len(options.AllowedHeaders) == 0 {
- // Use sensible defaults
- c.allowedHeaders = []string{"Origin", "Accept", "Content-Type"}
- } else {
- // Origin is always appended as some browsers will always request for this header at preflight
- c.allowedHeaders = convert(append(options.AllowedHeaders, "Origin"), http.CanonicalHeaderKey)
- for _, h := range options.AllowedHeaders {
- if h == "*" {
- c.allowedHeadersAll = true
- c.allowedHeaders = nil
- break
- }
- }
- }
-
- // Allowed Methods
- if len(options.AllowedMethods) == 0 {
- // Default is spec's "simple" methods
- c.allowedMethods = []string{http.MethodGet, http.MethodPost, http.MethodHead}
- } else {
- c.allowedMethods = convert(options.AllowedMethods, strings.ToUpper)
- }
-
- return c
-}
-
-// Handler creates a new Cors handler with passed options.
-func Handler(options Options) func(next http.Handler) http.Handler {
- c := New(options)
- return c.Handler
-}
-
-// AllowAll create a new Cors handler with permissive configuration allowing all
-// origins with all standard methods with any header and credentials.
-func AllowAll() *Cors {
- return New(Options{
- AllowedOrigins: []string{"*"},
- AllowedMethods: []string{
- http.MethodHead,
- http.MethodGet,
- http.MethodPost,
- http.MethodPut,
- http.MethodPatch,
- http.MethodDelete,
- },
- AllowedHeaders: []string{"*"},
- AllowCredentials: false,
- })
-}
-
-// Handler apply the CORS specification on the request, and add relevant CORS headers
-// as necessary.
-func (c *Cors) Handler(next http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == http.MethodOptions && r.Header.Get("Access-Control-Request-Method") != "" {
- c.logf("Handler: Preflight request")
- c.handlePreflight(w, r)
- // Preflight requests are standalone and should stop the chain as some other
- // middleware may not handle OPTIONS requests correctly. One typical example
- // is authentication middleware ; OPTIONS requests won't carry authentication
- // headers (see #1)
- if c.optionPassthrough {
- next.ServeHTTP(w, r)
- } else {
- w.WriteHeader(http.StatusOK)
- }
- } else {
- c.logf("Handler: Actual request")
- c.handleActualRequest(w, r)
- next.ServeHTTP(w, r)
- }
- })
-}
-
-// handlePreflight handles pre-flight CORS requests
-func (c *Cors) handlePreflight(w http.ResponseWriter, r *http.Request) {
- headers := w.Header()
- origin := r.Header.Get("Origin")
-
- if r.Method != http.MethodOptions {
- c.logf("Preflight aborted: %s!=OPTIONS", r.Method)
- return
- }
- // Always set Vary headers
- // see https://github.com/rs/cors/issues/10,
- // https://github.com/rs/cors/commit/dbdca4d95feaa7511a46e6f1efb3b3aa505bc43f#commitcomment-12352001
- headers.Add("Vary", "Origin")
- headers.Add("Vary", "Access-Control-Request-Method")
- headers.Add("Vary", "Access-Control-Request-Headers")
-
- if origin == "" {
- c.logf("Preflight aborted: empty origin")
- return
- }
- if !c.isOriginAllowed(r, origin) {
- c.logf("Preflight aborted: origin '%s' not allowed", origin)
- return
- }
-
- reqMethod := r.Header.Get("Access-Control-Request-Method")
- if !c.isMethodAllowed(reqMethod) {
- c.logf("Preflight aborted: method '%s' not allowed", reqMethod)
- return
- }
- reqHeaders := parseHeaderList(r.Header.Get("Access-Control-Request-Headers"))
- if !c.areHeadersAllowed(reqHeaders) {
- c.logf("Preflight aborted: headers '%v' not allowed", reqHeaders)
- return
- }
- if c.allowedOriginsAll {
- headers.Set("Access-Control-Allow-Origin", "*")
- } else {
- headers.Set("Access-Control-Allow-Origin", origin)
- }
- // Spec says: Since the list of methods can be unbounded, simply returning the method indicated
- // by Access-Control-Request-Method (if supported) can be enough
- headers.Set("Access-Control-Allow-Methods", strings.ToUpper(reqMethod))
- if len(reqHeaders) > 0 {
-
- // Spec says: Since the list of headers can be unbounded, simply returning supported headers
- // from Access-Control-Request-Headers can be enough
- headers.Set("Access-Control-Allow-Headers", strings.Join(reqHeaders, ", "))
- }
- if c.allowCredentials {
- headers.Set("Access-Control-Allow-Credentials", "true")
- }
- if c.maxAge > 0 {
- headers.Set("Access-Control-Max-Age", strconv.Itoa(c.maxAge))
- }
- c.logf("Preflight response headers: %v", headers)
-}
-
-// handleActualRequest handles simple cross-origin requests, actual request or redirects
-func (c *Cors) handleActualRequest(w http.ResponseWriter, r *http.Request) {
- headers := w.Header()
- origin := r.Header.Get("Origin")
-
- // Always set Vary, see https://github.com/rs/cors/issues/10
- headers.Add("Vary", "Origin")
- if origin == "" {
- c.logf("Actual request no headers added: missing origin")
- return
- }
- if !c.isOriginAllowed(r, origin) {
- c.logf("Actual request no headers added: origin '%s' not allowed", origin)
- return
- }
-
- // Note that spec does define a way to specifically disallow a simple method like GET or
- // POST. Access-Control-Allow-Methods is only used for pre-flight requests and the
- // spec doesn't instruct to check the allowed methods for simple cross-origin requests.
- // We think it's a nice feature to be able to have control on those methods though.
- if !c.isMethodAllowed(r.Method) {
- c.logf("Actual request no headers added: method '%s' not allowed", r.Method)
-
- return
- }
- if c.allowedOriginsAll {
- headers.Set("Access-Control-Allow-Origin", "*")
- } else {
- headers.Set("Access-Control-Allow-Origin", origin)
- }
- if len(c.exposedHeaders) > 0 {
- headers.Set("Access-Control-Expose-Headers", strings.Join(c.exposedHeaders, ", "))
- }
- if c.allowCredentials {
- headers.Set("Access-Control-Allow-Credentials", "true")
- }
- c.logf("Actual response added headers: %v", headers)
-}
-
-// convenience method. checks if a logger is set.
-func (c *Cors) logf(format string, a ...interface{}) {
- if c.Log != nil {
- c.Log.Printf(format, a...)
- }
-}
-
-// isOriginAllowed checks if a given origin is allowed to perform cross-domain requests
-// on the endpoint
-func (c *Cors) isOriginAllowed(r *http.Request, origin string) bool {
- if c.allowOriginFunc != nil {
- return c.allowOriginFunc(r, origin)
- }
- if c.allowedOriginsAll {
- return true
- }
- origin = strings.ToLower(origin)
- for _, o := range c.allowedOrigins {
- if o == origin {
- return true
- }
- }
- for _, w := range c.allowedWOrigins {
- if w.match(origin) {
- return true
- }
- }
- return false
-}
-
-// isMethodAllowed checks if a given method can be used as part of a cross-domain request
-// on the endpoint
-func (c *Cors) isMethodAllowed(method string) bool {
- if len(c.allowedMethods) == 0 {
- // If no method allowed, always return false, even for preflight request
- return false
- }
- method = strings.ToUpper(method)
- if method == http.MethodOptions {
- // Always allow preflight requests
- return true
- }
- for _, m := range c.allowedMethods {
- if m == method {
- return true
- }
- }
- return false
-}
-
-// areHeadersAllowed checks if a given list of headers are allowed to used within
-// a cross-domain request.
-func (c *Cors) areHeadersAllowed(requestedHeaders []string) bool {
- if c.allowedHeadersAll || len(requestedHeaders) == 0 {
- return true
- }
- for _, header := range requestedHeaders {
- header = http.CanonicalHeaderKey(header)
- found := false
- for _, h := range c.allowedHeaders {
- if h == header {
- found = true
- break
- }
- }
- if !found {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/go-chi/cors/utils.go b/vendor/github.com/go-chi/cors/utils.go
deleted file mode 100644
index 3fe5a5aeeb6..00000000000
--- a/vendor/github.com/go-chi/cors/utils.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package cors
-
-import "strings"
-
-const toLower = 'a' - 'A'
-
-type converter func(string) string
-
-type wildcard struct {
- prefix string
- suffix string
-}
-
-func (w wildcard) match(s string) bool {
- return len(s) >= len(w.prefix+w.suffix) && strings.HasPrefix(s, w.prefix) && strings.HasSuffix(s, w.suffix)
-}
-
-// convert converts a list of string using the passed converter function
-func convert(s []string, c converter) []string {
- out := []string{}
- for _, i := range s {
- out = append(out, c(i))
- }
- return out
-}
-
-// parseHeaderList tokenize + normalize a string containing a list of headers
-func parseHeaderList(headerList string) []string {
- l := len(headerList)
- h := make([]byte, 0, l)
- upper := true
- // Estimate the number headers in order to allocate the right splice size
- t := 0
- for i := 0; i < l; i++ {
- if headerList[i] == ',' {
- t++
- }
- }
- headers := make([]string, 0, t)
- for i := 0; i < l; i++ {
- b := headerList[i]
- if b >= 'a' && b <= 'z' {
- if upper {
- h = append(h, b-toLower)
- } else {
- h = append(h, b)
- }
- } else if b >= 'A' && b <= 'Z' {
- if !upper {
- h = append(h, b+toLower)
- } else {
- h = append(h, b)
- }
- } else if b == '-' || b == '_' || b == '.' || (b >= '0' && b <= '9') {
- h = append(h, b)
- }
-
- if b == ' ' || b == ',' || i == l-1 {
- if len(h) > 0 {
- // Flush the found header
- headers = append(headers, string(h))
- h = h[:0]
- upper = true
- }
- } else {
- upper = b == '-'
- }
- }
- return headers
-}
diff --git a/vendor/github.com/go-chi/httplog/LICENSE b/vendor/github.com/go-chi/httplog/LICENSE
deleted file mode 100644
index 0bb58ba5196..00000000000
--- a/vendor/github.com/go-chi/httplog/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015-present Peter Kieltyka (https://github.com/pkieltyka).
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/go-chi/httplog/README.md b/vendor/github.com/go-chi/httplog/README.md
deleted file mode 100644
index ac0dc9cf262..00000000000
--- a/vendor/github.com/go-chi/httplog/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-httplog
-=======
-
-Small but powerful structured logging package for HTTP request logging in Go.
-
-## Example
-
-(see [_example/](./_example/main.go))
-
-```go
-package main
-
-import (
- "net/http"
- "github.com/go-chi/chi/v5"
- "github.com/go-chi/chi/v5/middleware"
- "github.com/go-chi/httplog"
-)
-
-func main() {
- // Logger
- logger := httplog.NewLogger("httplog-example", httplog.Options{
- JSON: true,
- })
-
- // Service
- r := chi.NewRouter()
- r.Use(httplog.RequestLogger(logger))
- r.Use(middleware.Heartbeat("/ping"))
-
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("hello world"))
- })
-
- r.Get("/panic", func(w http.ResponseWriter, r *http.Request) {
- panic("oh no")
- })
-
- r.Get("/info", func(w http.ResponseWriter, r *http.Request) {
- oplog := httplog.LogEntry(r.Context())
- w.Header().Add("Content-Type", "text/plain")
- oplog.Info().Msg("info here")
- w.Write([]byte("info here"))
- })
-
- r.Get("/warn", func(w http.ResponseWriter, r *http.Request) {
- oplog := httplog.LogEntry(r.Context())
- oplog.Warn().Msg("warn here")
- w.WriteHeader(400)
- w.Write([]byte("warn here"))
- })
-
- r.Get("/err", func(w http.ResponseWriter, r *http.Request) {
- oplog := httplog.LogEntry(r.Context())
- oplog.Error().Msg("err here")
- w.WriteHeader(500)
- w.Write([]byte("err here"))
- })
-
- http.ListenAndServe(":5555", r)
-}
-
-```
-
-## License
-
-MIT
diff --git a/vendor/github.com/go-chi/httplog/config.go b/vendor/github.com/go-chi/httplog/config.go
deleted file mode 100644
index 6538813a3b4..00000000000
--- a/vendor/github.com/go-chi/httplog/config.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package httplog
-
-import (
- "fmt"
- "os"
- "strings"
- "time"
-
- "github.com/rs/zerolog"
- "github.com/rs/zerolog/log"
-)
-
-var DefaultOptions = Options{
- LogLevel: "info",
- LevelFieldName: "level",
- JSON: false,
- Concise: false,
- Tags: nil,
- SkipHeaders: nil,
-}
-
-type Options struct {
- // LogLevel defines the minimum level of severity that app should log.
- //
- // Must be one of: ["trace", "debug", "info", "warn", "error", "critical"]
- LogLevel string
-
- // LevelFieldName sets the field name for the log level or severity.
- // Some providers parse and search for different field names.
- LevelFieldName string
-
- // JSON enables structured logging output in json. Make sure to enable this
- // in production mode so log aggregators can receive data in parsable format.
- //
- // In local development mode, its appropriate to set this value to false to
- // receive pretty output and stacktraces to stdout.
- JSON bool
-
- // Concise mode includes fewer log details during the request flow. For example
- // exluding details like request content length, user-agent and other details.
- // This is useful if during development your console is too noisy.
- Concise bool
-
- // Tags are additional fields included at the root level of all logs.
- // These can be useful for example the commit hash of a build, or an environment
- // name like prod/stg/dev
- Tags map[string]string
-
- // SkipHeaders are additional headers which are redacted from the logs
- SkipHeaders []string
-}
-
-// Configure will set new global/default options for the httplog and behaviour
-// of underlying zerolog pkg and its global logger.
-func Configure(opts Options) {
- if opts.LogLevel == "" {
- opts.LogLevel = "info"
- }
-
- if opts.LevelFieldName == "" {
- opts.LevelFieldName = "level"
- }
-
- // Pre-downcase all SkipHeaders
- for i, header := range opts.SkipHeaders {
- opts.SkipHeaders[i] = strings.ToLower(header)
- }
-
- DefaultOptions = opts
-
- // Config the zerolog global logger
- logLevel, err := zerolog.ParseLevel(strings.ToLower(opts.LogLevel))
- if err != nil {
- fmt.Printf("httplog: error! %v\n", err)
- os.Exit(1)
- }
- zerolog.SetGlobalLevel(logLevel)
-
- zerolog.LevelFieldName = strings.ToLower(opts.LevelFieldName)
- zerolog.TimestampFieldName = "timestamp"
- zerolog.TimeFieldFormat = time.RFC3339Nano
-
- if !opts.JSON {
- log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339})
- }
-}
diff --git a/vendor/github.com/go-chi/httplog/httplog.go b/vendor/github.com/go-chi/httplog/httplog.go
deleted file mode 100644
index ea90e63c78f..00000000000
--- a/vendor/github.com/go-chi/httplog/httplog.go
+++ /dev/null
@@ -1,248 +0,0 @@
-package httplog
-
-import (
- "context"
- "fmt"
- "io/ioutil"
- "net/http"
- "strings"
- "time"
-
- "github.com/go-chi/chi/v5"
- "github.com/go-chi/chi/v5/middleware"
- "github.com/rs/zerolog"
- "github.com/rs/zerolog/log"
-)
-
-func NewLogger(serviceName string, opts ...Options) zerolog.Logger {
- if len(opts) > 0 {
- Configure(opts[0])
- } else {
- Configure(DefaultOptions)
- }
- logger := log.With().Str("service", strings.ToLower(serviceName))
- if !DefaultOptions.Concise && len(DefaultOptions.Tags) > 0 {
- logger = logger.Fields(map[string]interface{}{
- "tags": DefaultOptions.Tags,
- })
- }
- return logger.Logger()
-}
-
-// RequestLogger is an http middleware to log http requests and responses.
-//
-// NOTE: for simplicty, RequestLogger automatically makes use of the chi RequestID and
-// Recoverer middleware.
-func RequestLogger(logger zerolog.Logger) func(next http.Handler) http.Handler {
- return chi.Chain(
- middleware.RequestID,
- Handler(logger),
- middleware.Recoverer,
- ).Handler
-}
-
-func Handler(logger zerolog.Logger) func(next http.Handler) http.Handler {
- var f middleware.LogFormatter = &requestLogger{logger}
- return func(next http.Handler) http.Handler {
- fn := func(w http.ResponseWriter, r *http.Request) {
- entry := f.NewLogEntry(r)
- ww := middleware.NewWrapResponseWriter(w, r.ProtoMajor)
-
- buf := newLimitBuffer(512)
- ww.Tee(buf)
-
- t1 := time.Now()
- defer func() {
- var respBody []byte
- if ww.Status() >= 400 {
- respBody, _ = ioutil.ReadAll(buf)
- }
- entry.Write(ww.Status(), ww.BytesWritten(), ww.Header(), time.Since(t1), respBody)
- }()
-
- next.ServeHTTP(ww, middleware.WithLogEntry(r, entry))
- }
- return http.HandlerFunc(fn)
- }
-}
-
-type requestLogger struct {
- Logger zerolog.Logger
-}
-
-func (l *requestLogger) NewLogEntry(r *http.Request) middleware.LogEntry {
- entry := &RequestLoggerEntry{}
- msg := fmt.Sprintf("Request: %s %s", r.Method, r.URL.Path)
- entry.Logger = l.Logger.With().Fields(requestLogFields(r, true)).Logger()
- if !DefaultOptions.Concise {
- entry.Logger.Info().Fields(requestLogFields(r, DefaultOptions.Concise)).Msgf(msg)
- }
- return entry
-}
-
-type RequestLoggerEntry struct {
- Logger zerolog.Logger
- msg string
-}
-
-func (l *RequestLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{}) {
- msg := fmt.Sprintf("Response: %d %s", status, statusLabel(status))
- if l.msg != "" {
- msg = fmt.Sprintf("%s - %s", msg, l.msg)
- }
-
- responseLog := map[string]interface{}{
- "status": status,
- "bytes": bytes,
- "elapsed": float64(elapsed.Nanoseconds()) / 1000000.0, // in milliseconds
- }
-
- if !DefaultOptions.Concise {
- // Include response header, as well for error status codes (>400) we include
- // the response body so we may inspect the log message sent back to the client.
- if status >= 400 {
- body, _ := extra.([]byte)
- responseLog["body"] = string(body)
- }
- if len(header) > 0 {
- responseLog["header"] = headerLogField(header)
- }
- }
-
- l.Logger.WithLevel(statusLevel(status)).Fields(map[string]interface{}{
- "httpResponse": responseLog,
- }).Msgf(msg)
-}
-
-func (l *RequestLoggerEntry) Panic(v interface{}, stack []byte) {
- stacktrace := "#"
- if DefaultOptions.JSON {
- stacktrace = string(stack)
- }
-
- l.Logger = l.Logger.With().
- Str("stacktrace", stacktrace).
- Str("panic", fmt.Sprintf("%+v", v)).
- Logger()
-
- l.msg = fmt.Sprintf("%+v", v)
-
- if !DefaultOptions.JSON {
- middleware.PrintPrettyStack(v)
- }
-}
-
-func requestLogFields(r *http.Request, concise bool) map[string]interface{} {
- scheme := "http"
- if r.TLS != nil {
- scheme = "https"
- }
- requestURL := fmt.Sprintf("%s://%s%s", scheme, r.Host, r.RequestURI)
-
- requestFields := map[string]interface{}{
- "requestURL": requestURL,
- "requestMethod": r.Method,
- "requestPath": r.URL.Path,
- "remoteIP": r.RemoteAddr,
- "proto": r.Proto,
- }
- if reqID := middleware.GetReqID(r.Context()); reqID != "" {
- requestFields["requestID"] = reqID
- }
-
- if concise {
- return map[string]interface{}{
- "httpRequest": requestFields,
- }
- }
-
- requestFields["scheme"] = scheme
-
- if len(r.Header) > 0 {
- requestFields["header"] = headerLogField(r.Header)
- }
-
- return map[string]interface{}{
- "httpRequest": requestFields,
- }
-}
-
-func headerLogField(header http.Header) map[string]string {
- headerField := map[string]string{}
- for k, v := range header {
- k = strings.ToLower(k)
- switch {
- case len(v) == 0:
- continue
- case len(v) == 1:
- headerField[k] = v[0]
- default:
- headerField[k] = fmt.Sprintf("[%s]", strings.Join(v, "], ["))
- }
- if k == "authorization" || k == "cookie" || k == "set-cookie" {
- headerField[k] = "***"
- }
-
- for _, skip := range DefaultOptions.SkipHeaders {
- if k == skip {
- headerField[k] = "***"
- break
- }
- }
- }
- return headerField
-}
-
-func statusLevel(status int) zerolog.Level {
- switch {
- case status <= 0:
- return zerolog.WarnLevel
- case status < 400: // for codes in 100s, 200s, 300s
- return zerolog.InfoLevel
- case status >= 400 && status < 500:
- return zerolog.WarnLevel
- case status >= 500:
- return zerolog.ErrorLevel
- default:
- return zerolog.InfoLevel
- }
-}
-
-func statusLabel(status int) string {
- switch {
- case status >= 100 && status < 300:
- return "OK"
- case status >= 300 && status < 400:
- return "Redirect"
- case status >= 400 && status < 500:
- return "Client Error"
- case status >= 500:
- return "Server Error"
- default:
- return "Unknown"
- }
-}
-
-// Helper methods used by the application to get the request-scoped
-// logger entry and set additional fields between handlers.
-//
-// This is a useful pattern to use to set state on the entry as it
-// passes through the handler chain, which at any point can be logged
-// with a call to .Print(), .Info(), etc.
-
-func LogEntry(ctx context.Context) zerolog.Logger {
- entry := ctx.Value(middleware.LogEntryCtxKey).(*RequestLoggerEntry)
- return entry.Logger
-}
-
-func LogEntrySetField(ctx context.Context, key, value string) {
- if entry, ok := ctx.Value(middleware.LogEntryCtxKey).(*RequestLoggerEntry); ok {
- entry.Logger = entry.Logger.With().Str(key, value).Logger()
- }
-}
-
-func LogEntrySetFields(ctx context.Context, fields map[string]interface{}) {
- if entry, ok := ctx.Value(middleware.LogEntryCtxKey).(*RequestLoggerEntry); ok {
- entry.Logger = entry.Logger.With().Fields(fields).Logger()
- }
-}
diff --git a/vendor/github.com/go-chi/httplog/util.go b/vendor/github.com/go-chi/httplog/util.go
deleted file mode 100644
index dcb78516170..00000000000
--- a/vendor/github.com/go-chi/httplog/util.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package httplog
-
-import (
- "bytes"
- "io"
-)
-
-// limitBuffer is used to pipe response body information from the
-// response writer to a certain limit amount. The idea is to read
-// a portion of the response body such as an error response so we
-// may log it.
-type limitBuffer struct {
- *bytes.Buffer
- limit int
-}
-
-func newLimitBuffer(size int) io.ReadWriter {
- return limitBuffer{
- Buffer: bytes.NewBuffer(make([]byte, 0, size)),
- limit: size,
- }
-}
-
-func (b limitBuffer) Write(p []byte) (n int, err error) {
- if b.Buffer.Len() >= b.limit {
- return len(p), nil
- }
- limit := b.limit
- if len(p) < limit {
- limit = len(p)
- }
- return b.Buffer.Write(p[:limit])
-}
-
-func (b limitBuffer) Read(p []byte) (n int, err error) {
- return b.Buffer.Read(p)
-}
diff --git a/vendor/github.com/go-toast/toast/.gitignore b/vendor/github.com/go-toast/toast/.gitignore
deleted file mode 100644
index ecdc9e2488c..00000000000
--- a/vendor/github.com/go-toast/toast/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.idea/
-vendor/*
-!vendor/vendor.json
diff --git a/vendor/github.com/go-toast/toast/LICENSE b/vendor/github.com/go-toast/toast/LICENSE
deleted file mode 100644
index 68b7294f91e..00000000000
--- a/vendor/github.com/go-toast/toast/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2016 Jacob Marshall
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/go-toast/toast/readme.md b/vendor/github.com/go-toast/toast/readme.md
deleted file mode 100644
index 4dbc20741c7..00000000000
--- a/vendor/github.com/go-toast/toast/readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# Toast
-
-A go package for Windows 10 toast notifications.
-
-As seen in [jacobmarshall/pokevision-cli](https://github.com/jacobmarshall/pokevision-cli).
-
-## CLI
-
-As well as using go-toast within your Go projects, you can also utilise the CLI - for any of your projects.
-
-Download [64bit](https://go-toast-downloads.s3.amazonaws.com/v1/toast64.exe) or [32bit](https://go-toast-downloads.s3.amazonaws.com/v1/toast32.exe)
-
-```cmd
-C:\Users\Example\Downloads\toast64.exe \
- --app-id "Example App" \
- --title "Hello World" \
- --message "Lorem ipsum dolor sit amet, consectetur adipiscing elit." \
- --icon "C:\Users\Example\Pictures\icon.png" \
- --audio "default" --loop \
- --duration "long" \
- --activation-arg "https://google.com" \
- --action "Open maps" --action-arg "bingmaps:?q=sushi" \
- --action "Open browser" --action-arg "http://..."
-```
-
-![CLI](./screenshot-cli.png)
-
-## Example
-
-```go
-package main
-
-import (
- "log"
-
- "gopkg.in/toast.v1"
-)
-
-func main() {
- notification := toast.Notification{
- AppID: "Example App",
- Title: "My notification",
- Message: "Some message about how important something is...",
- Icon: "go.png", // This file must exist (remove this line if it doesn't)
- Actions: []toast.Action{
- {"protocol", "I'm a button", ""},
- {"protocol", "Me too!", ""},
- },
- }
- err := notification.Push()
- if err != nil {
- log.Fatalln(err)
- }
-}
-```
-
-## Screenshots
-
-![Toast](./screenshot-toast.png)
-
-![Action centre](./screenshot-action-centre.png)
diff --git a/vendor/github.com/go-toast/toast/screenshot-action-centre.png b/vendor/github.com/go-toast/toast/screenshot-action-centre.png
deleted file mode 100644
index e63917b2dc0a978e6a3c8380c8a8b31b6ddb3cf5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 85126
zcmafacT`i)6K@Cs0ty5WL}{TTRY0Wo-Vu=Aq)PA73B9QF4g%6aI!KcmL1_viy@%c*
z^w3}Y`fKmJKVHtcCpY)*d}elLXLe_I60M;okB|2l4*&q*D=Nrn0suf10D!Rz#zsFW
ziJ3kI0Pa7wm6p~}l$M5SxH((fI#>Y!3ehRLINDl@4|8-i!HO)wUX7J)b@Oa(N
zYrp+?{>pkG14E)enB#$U!2nqoHondJy&@Dxj~$%?
z1VE?%c63e8@U7O`l$e_4geaujezStZcEjYb||YyTijI*7Y`bxofD!#3T;tjBdbl
zy9gEmgG}BE!i>rG4VEzHFQweDex
zp&!7?!4MY%nhW(%`RH@M>h3td$9qjD=ODBE`iTvF)M9ZouwdCU27LOeS&62IZ&r`3T)jp=aU-egr~xG
zQ`ECVg9L9=Cm#u?>q2;!XHy6trneDHb*sF2o%})kOf8*;lx-to1xks+fHjBq)D(q0
zf|4L-uO43_viun!HNoIQOzN7)6Ysql`s6^!N0@lfTii4M*+T)T>>QH+Zd4d=~gY;n_WpYoG5nKZvUe>#a+9%47KX
zy&>8AZkpQKvf8bNi|e@Q>F)b7bqDxIKJ`aM6knYqTpFWta}tJ+f?<}_Y%*Q7)V+1}
zwVptUOIX^S*uqn*JI64ett`$aEWo6Bsmfik1qIM$7Z>o}YtbX3dg;snv+Ix`R!fjaKDQJ6r=&cHJ2n#$1cyoaD(n-m~rZX-b&!=VLlJy
zFvFR`|I~%y0)7@`?Sl6KGffhwnP9)GVFc48C=f|-pAIY~^%{&hB69+<=pn9^HiD=#
z0C45=6Brn<6y-rt%6Rm;X|IjrE15QeHhTZDgku6c9{c2GHtBPZzTeZ!rth
zV@Q2p^oq_wOy_;dD^fj<2~g+hOO=q*S2V74LtXmKq(-@LZ^|LK`{4yj$^V{7_~eQW
zvK)okMsuh1k?1pSDu`bSOq&p|mafP`mrQg<97{a(wS83DTb_Y9Lq;o~cP>k@M`f9E
zS!wyXIaO`=l%l^3B{V@HlR-HV=SgA@(^}G7g)GG@MP^0gLh9c*b#(f14)O#H%t=_Q
z-&T2!#Ex*?9$q~0(U8=K>%moNHG|8a8op}yN*&G=&W0z77y5wo?UQez#LE4J?D-D)
zW12&n`0_iOUiT>NKr#2V_%hJ~6x`83(+q+SVMO|5Wml
zhWlv*ZFd~}75l5*S0AiSN{Pl*#-+x1#+AkhN*l^g%ga9rm-dzqYjWv|S8={FS0S+m
z^JcYV`b7DJUf8}LBG2V+<7WFl7Q6NM*u(q6FpV&YB
z44PBJCm1R-3}zdK>`r4|QtXJO@-}+!=G8Veyl}j?_j*rornO=AGmeLcXNX6bP?o3K
z&dC;!XS*k_=j2Y#uf1`LO`q+<(}|tzF~1>An~Rz{{VY8jy_?IKOZcVvjq&B)Whizr
zwk!5K{O$Yuk2LQa-ygj{NzwTDjAHAN>a$FHZ3~ZCJ^0i&fo|`DL!Xs%reY>sra_g*
zDmfW;=@IE{Q+avs6w(Je15robC>u*UPKB3~rx1
zw>_V`skts}&+X-}6R*|%UJGG^k576A+t=^N^D{U3H%U9eS`1rkS`OS{&*2_G=dU@q
zaU%Ccrl?y*7;@N$9}H*b5OW1^HR^^>N;^wCSDl+2l!&d1Wr$q`m|V`F-ulN~cAUE(
zXKhR_$6erDJiKbcDaG!=a=>k-c@0UY)+3psStWnQT*{aZp(Ja2-YhJ`97du^^_ym!
zQi$tBg`AI_$w7Il+vT0h3-3`G5A)3)Pm%*Ua(OV_V>(Goh1D;8elLn&w7lq4rBi#G
zsV%mp_}TGfZu6M?efk#nmHEQA%kNdO?Ibp2%(3<{x^HudO{wn0;Np4DBohV1TuqkO
z7%CY8H7$6a2#WbQA9bw;^;0mNtGIs9e75#od$g>+*yKYoABW$};g-_q^eABoM3Y$a
ztjOP5zK(4Qvy8UPQ0q!C@I%aphepo(zD``jp}GTpnd=EUnP=?t^Z~}c&JntD`f@aj
zah>6Jth@s5^6OU>eH8;0dAnh|Unt$wl!my2KS7mUtRwc{>+=eQr+%f&W0>Udl6LB3
zQTfbI*q@a-nO=<@C*)|(d#JvQgO!7|hDBrjeON?9*(%jcXV&4}G@G?J$9?u|D*~}d
z-V)EM+c{Zxnjgm*P4;3u;+}y!z-}z%hbQd!4fGnK>R9YY4&FJErEvzfGQ3h8)yyus
zmnL@kWV0lb&Nrd7)GyV}s^tVQ8PaTBUWx}7-<9o{#y_@n$r?CvbHwFz}E+FsN>
z@z+|hF8FEx9JY{HyXM>C>@%;kSIO4cvG{#{qG8_8Z;v3Gicwf>Z}p(9h3&O&K)9mp
zwA1o_$h`Vl&w=3GyFspTzlO8a-5bp(rODc|y4huKs;U-B+MPY|4d|=3=EbdGy%=|x
zF%3Emt=s9Ij5u(~L-X6mwB<|jzW6F*WWokj5Bs?8FQK5atp|^m>pT9f{D-UkD0)}T_{;Z+RJNg
zgbk4xn;4f=U7Ct|ajed)?GQ~0JNL{tPm2~Ax+VD?Pgm|5Ry#eMqi(B5axOU?imv%t
zoi`llUcb7P&+bulyAHk!ZH(k5JP=tH@jVncINZo7Qh%*Jkh3jX8EAc8(ZXNTv~sb!
zA<7lTg?;t*R{O$zN4Y*t{`Tm$yi&Zjb0cMQ{MSy3^Rq?m4o~k{Aqbz#o$*jB{QMiu
zGjZ(zj|=Zxt*<2|p}gWrV$PT5w?$j_QLvFGc!xW9@R}!>IZeqKuuKMo5Dc@-zT%BY$Mf4d6rP~?cy?CcsCV>x
zcW}6iFtHdiv}{4hNt~0x*@4mJXebi0If2wsgk$mB`k4t{4s;MhWv3l~!h5V_ZY;
zfZi>RN^<64Uv#p7>!P6V4giob{<$y|H5riTJR;jxThBvJRYl0c*^%>=rL(yer?;aE
zx-|eG;w^-}b+qz$1@(4xaB>&&7Nz^Ag%JAw&ton+=s!(7>_zGHR5hT|&TdvvKF(*H
zPwB+)piroYo29jori|Rb$kD$<>0WzyxCn7^d3kwpdhv2PyV-DY3knKyJ>}uz;o(5H
z;BfbG@_6OV;p9&L7v$eKGFI*uZniESw$4t_Ke(^VojpB7>FEA2`p@UDoL1hp|K;T5
z{;zJKJIM9t4Hq}(Q?CDDqe(^nJQdQg^|o@*ld*NQa&kxW5aWOTROFxb|IeHMa{M1k
z{r^%v6Xf|{%Kv%uFG>-vKOOj=4*k{EKTpx>62lYW`j6_x@Fdu!9-ys3X)B|yjs6Dy
zF%9~2hQ3(-^^LxFAQW_>e*pkU02E~;wY@QR+YQI~`t_+B&-r`qMG@BGK%^oQKy(v#
z7Vj-^g%iI^HF68!>I){N)N;g_g}K+cm!|-*6N`3MSyS04AslMczJK3%2T^lTF=z5^g)G&_7N_
z!E~Be&F2!XJMJoUGPg;c|yOw!8xz8h+%Lv`Z?x`zzY@1we2Dg;aL0Mo_$
zH6)*6U_h=x@lfDjo$-QvX;Ixde)Z=jK3l~84fv%uWK?q4pqK;+gAl;FI_~Qg`@EQqyN!>K
z|Et$uz+g38u>g3g!d+;|4?pB=yR3YOfiHckuSSO|=qaqqV$S|wL_6eEG8lhFdjc+f
zIFa0e)49tb)csS9*?(o_3%6*lBvLDakVllZ>$rtE7ojW!tOR>*wY^?b7ov*?0sk-z
zE};AM1TLPvndZ>stI9-ZvK5nlMc?j-<`gS>`>*E1weq+Ne+Qog9`Iz~Vv_4Fac}E3
zi@9N_`j)G0$!MQaJt8YxNsp@N@@0nILA&BXO4~&q+cs)*jZ5IBsV{XQz6pu{{8Aop
zTyn?lCd%Gc)xw&1)N*Xj)|vPr67qL!P~rtY2!Z)jNE=8af41%`#Qsy
z&B3?b{Dgi;Qy_e@8Ltn%PiePEIzTBoDroa83Uv
z%T~T6G>-YMvu@6hNZB5_86fJq-f|D}qaCWf7fLw5-zpAkwx1jr5aLIDULOK|lFJ{R{rJpR~yzv-U=$sZ#D
zgqP^*%&ffuDw7;~j146;Z9au}&Sl}?HrVFA-z4=nSnH*}_NbtpCPBkYCRK}G0L^Dd
zUw1wH8}kInfc_6-I+^O};56s6BzoIhQrzC3MsdUiR2K5xbwGDbDp%{d(AQbgfiJPS
zVFM9KT&h;>BlrFlY`ZwXf6hnCk^B?HQm
z*m(pO1Dy{MxeSGNQ0?^ycQAM^6U+hrQ6C1>MFNC!dOV-+&fm7k^nkt-IC{=#R7G(`
zP$}=SExt(MGIKw9I>dF17)w6&&Lem
z0>~aJL83kgz*+p5mwBoTZm}^WG5`7x00SByEpbfh9|(9Fh`%bqtn#3FKi{NF`ogb$
zXYo4Gv0D_yZSvKWdIp#rN{Th$i@r_2&@8;tvgajepZ*(?aI+d3~xy1;wAb1xgQDhA&9J9mX8y
zK9ZJXyk0X<<5+C$w7e>ezyo#GKf?4PCIZ0KL3rl>RgM+tEw0#wWMMltd~!9HhJYQ8
z_6(CTd!E`5Q=cDsP9z`+B!BQDxqs^)5c~)@!Xb1_{id=V558ggxv2AjLmdvx14cGe
z`1Oc4E8|%K0F+9^lFeU6;xR2`@HZa+iFdQIX1pQlkhrV8=pYDFWWQCcZSLDu6`2&JwK)WENWSiPC+<_y7|6pK1pUNWMfCD+5GY{+azdcao
zJk+|M=CebTmaqT@Mju;6$nDEyKas%tk5yb&zz%XqY16s}wu{Q9&DEpgN8(v8Q6&W6
z4w|&Aa@7x9yhd)!+bS5W|Lq}#JmO7h5^p@d_C#uFempX$zD(TH!i2-N?kQ&0hnxEkc(Td+aJ2J^
z(neZ`XgR<8Zu<$y`0pX`&s4Gkjh90jC-#AI%{_LK%&8SVsioJreIgA(@W%2k>@W97
zB@cn-zlU&VzLCfMA0Z?VdT22^7!En%C3;p@=GT~t!5#LBRftx{j_WW9f?XZv
zA0C25L#)+n*<8~hh%1dsUH(V8zIJ*4?RzsPC~&hA^?_j1>-Or77_`XySs4Ynxa$^2
z6_nf^oSO&*Ty$P4=PY=ZFN1P-TNr*ZqO=cE13Fp)d|+?aPgHgV$0NRiay?s@jW&uK
zbiSr!6W*TGmz;~-aO$=W!L~xg6C&C;RiqeRFQ;R;
zKTCDWn9bidWtx61Q4dk4|0a`-+s+;-m$c?_)n(_&vzl?@-kN$|fv6AM|8A9`!+?_M
zfL-?nY8wc&pZp#y@oL+Vw>~W+mHFLySGnlrJ7~B-xp%Z`pPSj&cDdQayf!D*=T)XV
z*nTY9zioOwSCW5ty?uwYR|I9pbX>OH;n+B4E~lL^7RB+!C%pQ-lSQwI|81W>K}JUF
zvcAJel;(0cFz`?^#vFx&-QKG(Dd`Yv2~>MP5dPTLmRi%5n5g&h*OAF#34IV)Is1ZF-g=c;$s;{-Tsbihv3pnH;KQZ+n4RO^s
z_u*E(zynw0+)MXj{>^cP3pk`YdYJ1b#qxp8?yW#SAQ6C1?tP1RXkBP83>zHv%O3yUw$yo^KyJD=t1VgJ=x
zANYEt^K3E4=;(Ia`P%E<)uwHcX<)*e=q~CX98xIsh
z)W7)mMteZIC}Tae@zsc=VXYLy?0FjCtJM}VCQm)CoIcEx70ztj(Q-bAvmk!;PP^|;yR)Rj
zM2#zOAC@x>g-NArW-*{H{WT2zq#}o#;@SV^0rJvajOTaf8?Zg?OR_XZpx-kU15|66
zIt^%%(Y>b?=c}5b8>+eHz0$Ck*B1llNm|zz>$ly%Z<<4#eIKP5wn!vHaQ-$Vp;*9Q
zCjOGW^24Qr28~#;OuW7NTZmdGA>_z@HzD;n;nlX{rNz}(X^SoT^}OcPwv#Q_HED8`
z`9SSKy2MwhJ@w9m&x@VcuRkNN3sfoa@e$YT~h*I$kPxw_!<#c$io$
zfY|@7W`Z9Vd{Q+6Wr|JQ=VnAL$-{5oiet*}LRGYFiUTrDqOPS=vlLSb>6LKgJV^^8
zyxCn;U^>v5mMZSy*EM#7@rj9PKBS9x=$2WsVg?^?(b>PJ6%~e%*v=I(c
zhWro;@NJIKqM7J$?f)xjix@h*#SK%}1RT0lxK&KVlI+O-vtSc=3{(;7KY*cfJKR&Q
zD%jTeGOn#mo~Iw{V$yZ{|Dp)kjGql}&eohHn>`$F3D7)h31nXy#esVjbkKlNUs*dC
zPMk81=tpQgwk-Q78l9s92tlS*&GvM8Ix|+H@CSz9&QD(jaQ?7A?gxpQv9xs3p%NvM
z1|Dc`(1$Ab49fpr&5HDAP`_-lqzCj?%*cl+_MHcD@3d(wbu(Zom;Ek@Tu${?gax>+
zO`T6y&Mq1;`-5QpvCjKuSf)ddlhLb=<~N|Z@v8@#)ZG@*U2dk6Op~rkSHseNcV&x7
z&Ud(1q8R(#Tfa?d7<}F|F}%3@Fg1y)4U0QTSg}jVQQtT8INA2ef3i>|9WW>2=`}Fg
zgk;fo4Ar^5VnAggqsIMA9M3Di_x62Z7y_y9<^@^05!%Wp&14#SP)4>j5;uyY`WVVm
z3X@b76Xo*EZSoU4@BrMy>!`KSlo@eyEg+n^HPQQpaTG*J
zpJ^=db0R_7ZvWZiRkdxSqpTTCLK;aX*gThU>lgon-z9HyslWEfBOb|bZ`c#Y;Pel6
z+ca6jj)u=~@cFT~NK)43@`Scmgxz2=gC&@r|2PLVk&A9!K%vm&1|x7M(T|46Yc{|+
zk#@c#aMgmHAWdX6E5sip%s0V@9%L(*&4O^Rrit{FGmtbd`Hznnkmr0%;CGuUF
z{6*G#FGXq)443LN20Dea1U1s3xPklTeGCF=QCz3)xE*mut!I<#Y1fG7xrDnboFEvn
z$9sf)l<1DoZ@iAUwo9E2-K1B;-GG&snZ=h6&@wEZLz1QA{d)!(^Q&N*Iy1OL7aHy5
z!u(tTdAGEk?jBcB7n*nRs=3s<&t+Eob#{gEm2XkI#fdJzcXnv%n0v(;)+VK
z-;xl8Opyj3;!k|XztKH377aO6gG{|e@cI7VYha1qgp=O=PndO?`>(*9M617u
zE{#FC)Y0W!*mdI+aAu>e_!R}uGK(i01g8aytVk+am4LcZOrS9xAY^f^<^=J8#Q&%W
z`w*W_yuR}wuZN$o&-onrt>sOH(M=y_FefCw$3&=M
zRw?jDtrKNRtdVhsA|qBKDV!OYgv-uX0yLgiGPKaE+
z-mbGobJ(VfugJK86JS|Krc=hD`RnZxzsf9^Zr@_HG5)@iAPESw+dGs
zhbcUooxAmKJ`@Hf2TMEz_jrGHw_luCOt<)*HUCFss|-b(m=uc%#`E;*fOxa^Rf|p0
z3--}OM172=cynh@Bomp1wgsgo)3%Qk(m0<>p@ZS9;(GaPNr_n$51s~^#HAI?s#lFn
z{;nWKv}Gd#BSi`_+)RcQkKhGvR#RCX7tq|TBJZ_#V;LH6DBiZ%EQ%XGiA~@{cL5|W
z)A6VzohtQRQOCIDHp!^^?a0zBUZRwX=SE+odR!bLDN}>efle+*KUOn$eNxq13v
z3rUifg%mZ|BTj-7riQ=yTgmkkCbysnxCe67&^qhkk3Oqo)_zD=qheBKx^If7c~!Tk
z1L};R*)1TnnOMX}4-G%+>p@b8Kg}yfo(pv5k=p&CXjt^By
zv?QR{1KEhXD2;jUKFWbBHho&TTrW-;_da}9FosC-PY-fWE)<}%WwQI4)C_&a!l@#$
zw2J|ONu7B&%Z1{nlC&~N#mJu2ZB$guy}=jT$DOjUMQKH_*3sZYnu`Vxl#6kqJOyM5
zKUhbE5(I0ab+pxU5H?~3F;SA{cs
zilnX%mGIvxG{~C=k~cRO-uWL)(Wq>N{rohR`o#HG)Zec49HH!{LeQ%-sVH|gD#KG_
zM@@fGIP7(zgzTUEonGpUhnvjc82u|j?TNal#~2-|kWKDL@w-=;|2dJRDXeKoelEb*
z->ssTdD!uZMR%Q;D92@_3*k5N%zL{{D$*DLqy$BvP(=_BRp
z$%+P{jtRp313!t(b99AgmD6a3k_Y4)3L@tr9=h);o!mQXl%tbf0Z|J0F9oc%CtuN{rdPEfthMp~y?Dw9Ys^6HildSNa
zwV)?fh2ELl-AFE`(2d@hC~Esu6SZiOFTEvVHyMSl2{#J8ywRPXcV-6ruN)FPJ=lLT
z#!QYL3~{f;d@EsQv^MS3{?NZwd3Cj$K*OW6=pApg*%vKXhVKk|v@bD%5(o%5Y^Zu>Lu=cU5j=zV
zWzeZ}Mdb18S;Z+=exRrO>o#{%`IYy0s|H5Qxx)K;3Wnc>!!}ZuutPdU@PB>b2iEWG
zR+w+U+U&_znzs2_E0pi`;KyLmLj2>5VRy3M5(u;ZfnWUp!RyLtPX=#nQGGoga1qYU
z^>seZa9Aj{__0X}OKCSk-JsG&^>1v*C)Ye$bWcC+EoEsghAz$p4DU*euY-R?=xc|m
zO{Et|#YA58K10naJInCGuD4&@135hoMqDsHwwtd}uI6%!SGp;)GQFf9Y&V7VAeGLO
z2K!x^?lENz5gQ5b7aem9_G99fEc-AvtLh*vW*wCxM;K9spGnM!J&1bL&)AN_ShGh&uEW$(wn+z}Izq{^k*LQUQ;Ec}os&;DnFf
zH!uFkjWT|Q8EhzJ_9o{i>;1>}&SPa^P|_V6*(`(G6qK(3$mz0RP62o2jABW*5i
zNVQ;6Mb@`r_w%X2b5LOYv4hSl34LV;w`fTR7Pp%+NAYb_6|;@AuBQ+EQv5U2$=Kgm
z{jNQ0-WY0)=GE2c`!-6@^plb}?07!wwjwr2QMBawV=r?7=vw0S9&SgB*~X7r=Ds0>
zqqCT2b3T8jwrm1~tt?tkk{5zLPZ?@|J#zT_nAtaw%K)GM%lT-{*i_=4
zf6deHZNm)|qYv%W&-nE<^oWC_@*!1v_fZt3Rj->9STR1ZJm=Y-?w@52%0#plF8s82
znY)+hUaQE6VvrY-L}sb-u~bD%Z2LTJk1u3>D`2Xq+Jl!F+*J#4*_VA6o0cO!a_l!^
z*F4gm8&UKixQr)-7(s@
z2$|Z1krl}GCQGQC9fztv+$MPd(l|{#P~@Ed2!$4lOD%4
z*|)b5kIRUIqRr_G+#7i3tVxf>C?-Cj&wt{4)z_j3k^(Z020B#qIahhXV)UbvUG=&O
zSirLGXE{7l!R*DX$u|*41N#`2rP#n;xvmx)4(vp~TZY`pcRJlMP}D02O#_3txD#3-
zSUym5MT0Cj%KW3&H@l@K7M*8f3Ml}U2NaL8%d?lBm#3dk*R1>dj^^@GhjXU4JY?7s
z*%}v0epLQWPCCVtqWwHaXrvb^eE^4T6Kbt(jqu+ls8yd!t&rZ-mxyWbG%Vy?;rSN56+B#t-o0*m!$d_e?^EzryBRR<}8XrmZBMN$0I!R{9MePV&Y
zt~+O2-LbU+hlejVetv(M0%$;?%VJ{K$%9OpucVl_>5+&s{}BMWCYOqI9R7eC8FT!d
z3J2bKi0eYXG)wX2=bQo}<*SjOa4EjuC-H_oosiK_iZR`9AQ^wL(!lN}MvqVf`|dE`
zN+L|!x7^kIP}Bgus+0g@+G`K(iwaF&nvOS_V%U#v$g;(yLbf@CI*YXYlj%OfIriQM
z%1Z)d?pWxt#FZf*{jg%)KuXS-m9OG1#%BTr^NVeM+{NGSudw2?KX^K+i`SO;`0Uf2
z_WMYdh-(};A+0;#X*BPW-E#Yggap#r1L4fz0J-+WH1?%^@CfvsU3d<`?V3TOHBQvY
zYYh5=)8Br`+K_5j`!hJ^$Pd7SgWxU)JsVO#Z>%f{Gb$hyWs4dYo8Jo%`g#3RX>FOn
z=thf?R35R>t3JsJ!J!=9Xu2*PI^r6O@IB<3Fc381esAK9gFdldWV!cc7!lkm8;Ko*
zdrOglFufu)4u?1!iz60i?w>fn`-jc!C8oW^M{MB8l?pz+?#F_&Edsif=TF>RajF81
zv|K@ff!7|DK-aEA|G?uoRcHe!r#1J0lqNU7%qkIAjE$}!bcrEE{5o+@IoAe@Dcf7v
zQK}4t0Wb(LI1jMy7AoHq0||gZ?7(Ge%bf&n@Mod+lBU3qRMJpS%Ag&dL~hF9MPOjs
zs85$V$@QZ$uP-?V>k5WGbh~8_7k;4+tKpNF#V3b&x9EeiJ8WpQ!M
zZpmQ}Q4cewksgq};s=eF?rcim&}Xp*Aiu-Z&V4~>GrYcgg;R`9oTmtar)!2-8;`M4
z{~Rtu&jzC!#Ihv|QxDTBTUIdq8AC?h!0L$S-)uGAz+#RgwP68t&mK%Tjkw~98CTeL
zd1OCoIi?!NFX%h9dx_qO<|pUak+RWL&iXY^`44htD*#jCBRP8gZnbHUI|S7nL=8^N
z9RfOt;kJTd%r05W&z=Z^?)EvvI~0&yCB0wR4!WBNF;xbVxVi>5C6F-$yl!8FcOHXp
z*KQBDmMDA(Z{y@}DXUj~codUkp5;DV
z!%g;IYh>ArR)8N2-^;;-)~;Xk>?b1F=s!QXqtleyxII!8SCD~hnx61wd{)iPPbcxG
zyY!OIV!FxnFdC!alSJNpJlAHku~YAWr?CJpjovApGDEqd(j#tSUPQ}7Q9h-Pdx`uc$&Ch@er!=WGAg+u
zz|*hhlW1&?(L6=(1k+EP_dc}_5XL<)2P0b^Ce5~rzM<{$nDYx8*j3*rvSM|ro76cL
zeX}snfWnpBh$VDU1DxW?NFC>Iql7_sCjsJO{Qdj^N*8Dw~xJw9>&X
zX9{Z5{;xYN-*E`hZk|^*VYXCL)N~MFh@DT^+Aa#e!RYaD5Xa_V@AH$tM=@FIUVcF>
zd{9L+`XvW4i)1)fA-8_GPs>Arh|lY4j#GPigWg=@
zR%jZ*M(D8SmVDdcO2PghoTR*GbO+XsdHQgD_0{_)YC76{b1P3s1m2p9P=6O}wJv0z&YOy?UbHIy;sqSZ(AFdi;j{0B+zV{-Ibss`&WTBoPg6hL}Kk?RH
zXjoAzgwRN76YWo(X6RnqI8VP2Y8fh}p{vKp{1M&=7`cVDgQ_&?E_|_ID@~hWPopNX
z1S-;5W-iMIld%niLY4Q7sgRDCZ{bEl{`KOnq-=H+u=AO3favA98_3W|toutwzFG=}
zXtfjWra=xDuxc)cgK1LC)E4%KYTM7h9g>{MMwGFz%A|h+86GpqC-c
z{qu^^OGSKeAgb`jI-h7lYG%cq~AQhj0nF61QA$-re;Z+
zo!UYl$V4k>Bdk9kU=3+gq%+kPQ6z!Q?MK^>6PG_$o+o@z=t3=9tehqLyD2Y%e+k=I_Yi-Rs~A
zG5oNQO?(#CUm~knPoWV-0@n9+xji<)pgN+c?53AP@{x#Rd!BiY=T)O#LyMb6NBaYX
zYmt2pK}N+MsFLz@#2szr*$96iuj7OsI#VT^iklk{C-e3uCU_&u%_gteQ
z^yR*W4h0Ve=u?cng!m`)SxRY~#BN)q+r@h#e}kVijhjITU1|&AuIF0QfH74fz>t=R
z#+N4`J5?Cux}#XN!F7*~-5V2B^*DISrYkf
zVoL<_MN4Nd|)R?>nKchtzik(0|PWuHR
zw6d5kpr{q__&_j1J{|;*1B6-sr!fKw769FGF>!x@xOTQ4S0jhlaCj#&`_nrggdq5{
z_<;x3ZwSh#fF4s|guwrl(tv}vLAl98ilXCgHxh;Hxtii7%7&gNc)Z{a$xrZ-P%q3q
z-H*S49$2+d(0`ew5=|u|NPb!8idx;@^`+>r{gpD6Z{cEl_XJ$Y(%1wmCj*>R#)>Rs
z1OJ>7p?5?`f#bLxM(rC%C`KcLB3%ag8|Q88ue=oqt?sp)Z6xDtW0F}{c1#qVE`4PT
zAgC&aHbxfEEe)?U;^&X+q
zD0WcCPgnV|zZ?Oe8G4tAXQ7SoPS5!?2YF!i>n|HI92Qp+4(y#vJVom?;J~Y38jh*p
zr!Vsb255C3VgQUEs=vkr{+pg0Lm8>=e3O>?2*)`!Z8dvvPA#)+h@+g6@p+m#uHQ`K0l)joHa^BwIgL383<{Fi00$ww#3Wp*$uU%scPUoIu0A3!
zxpX#5VvdPP{J+hp7AO^i7RQndgvRd=!~A_INUp2z){Sg+e!6+pvK=$@DBVjLH}oL;Fl+~O
z&Forxw4*4DCrlr7@#PrMC4zRdR@xf=+O*&mUv?tN7Cs;@=w&M0Ka8&uUO8iw+S7l?KLj1&_U2yg^7A8f+rXg3+)U}V07rBctU=T8qd4b&NALSZK4RqG4dlS@sS~zHQi|C#sUr
za0K%{e6mw}ZDx$^P}`M%>?mv^IWT$5?NiJ`;mRsa#}c7khWxza$RlIZGz*al+pUgs
z_8^*3>x1_ENcq
zs5yN~nVatNgi8*|w?kuj+KsUXf9O1-f2L_5=5k>TRHZDC62WU_6!OF}pTySKp}1*S
z^2E|2rv+fN_n${SMfkd*x1BSGT|*A4zRTyYaLpXC@iYjCLKz_b^!ZHffh-@-5qE*}
z^Bqjb)@a
z{BDxWW=8NRQ{{%!?+}8Rh_Qq{EgCHOVLk1AO4{OSIv
zcAgq&n0wa%`R-XrmiUWA4&i@UP)mC4N@wtuQ)ky^+qUzkiuJF8q!%R#1$CDj#_+qJ
zlI^25)-HMZHM1e#W3mWny1siCWs)?%HUC7`hY|b)n698DVwYw|@?~a)^r*Tqd#0KC
zr78GeVWmuz#%@Jpwo_*X?n?7*QAYrEimu?kntYfbxWhk}K9q{kO2BPnIQHeeF?(<2
z;rfq~QuFFAanS#W*=&SB@o+j9&?z-56GN^iPXbNfjpZys)0U$^p@jWXPPZ4L
zO!LMfq?($Qy02+-iaG-`l>&EK$F0_3AWSTAK6|6Gicp5eY7epPf_MaV#;rRe^6E
z2*tp+bb(tj@4Az#uoHn8!R0J?uO0+TfG|`({vWp9GAios3mYaz9YGodrAtagT0lw~
zNh!&pJEUu12&Fp}gdwFFx@!cayStHQ=ppAB|M#=rwcfQJJ`G>a-oL%qIcLXp?E{qf
zHk3{2lP$bZHtm&vqcf0+xB7>-sNw3dMw$00`-9#??Qc<1&tw1k-<>c)wC72UQo3-d
zo0f@@+0Jy=b+Px%i`gWHPKmT$mpbVU@WTuKi-y3
z7{)8L3`xAD-hFG@+PoMY4#=m&Sejec@pe6*`{_$q^2yQhn1k1-tx@gE5$%Ud(fPk;
zoe)><)3f{8!MqF&>X(Tw?4!>!OwwcUL_Q$+i)L;;lBi1t{FGlo`lf9SQZeD6(3Po6
zn!kZC9Md%!dh{e{9Ebxms@k3aR4B#Rea=C4$}zAwqwncvNSy>ZwLv%AWjYO&?d
zEW11O{W*p6&`uWpvwjJ&?9=R`YOdQVt3jLclK_)<3{r|tCV>>Eux{$an^YGCf=D*+
z{Qb3kl&+x(WXINe`HeG}DL1DfgVtBKsWIRzpl$9+_xta3(PxGB_z1l0QcrK#sF%Z*
zYOnw6obQl)A2W|D$Jp-HddQ4p`*h2^EtTE1Z7jv
z>)$J`3*ECSH?k?Hcd=b;z4qgLD9upyjb71fkLC6+0k+Lm@wQp?B!F2ioe5Bg$cC3X
zk9GcmjBfrC-%ad}&7cBv9b!v8zVN+{Fzc+{a(p#f6^ISz>O8dcT?6-1-n2U29Wckv
z82MNDU9zP7y7^J^zi*ptxVk*kJB0mzvNF|!U<&mS76z3Bk6vk?Dk#NgH9Nbu>Tb<6
zy!^ryF<3%wmyktok&tYXfUvJb8~%
z1HVA%In(6htr-bE@EzABDrRssdgbpey&32E*yx<9D+$w=TmAm`W72Am3awtP;3kOh
zE^xI008%B2CJD|Tmpu9ns+;0Ko=fS_A^kEwy|?u9o+?9^XP5AY+G5t;D|U)|{8gB6
z0T)ePCq(KLFE0}fMmJx1t%9IHsxxpn$(;#T>$3kw!t-UbV@kY~+@zH%v&;1;j>{&f
ztqza&mBf)v`f%qATM*3t{mtIWmF`ZV%Ci<$kIfxLopOPS~nGm71>_r)4z*(O-
zw#4jR!`JNry_OF?_eSSB%>oY(3_)_D3||J%Ho*^p5Ua7X=4KJ)j$@l|hOjCQMEGI}
z#FC(GcUa%+Kn%?AE@(CV@ExDmqTE)J3Ktx5Pdl3XEC^<@vufs?=C%s5dV`L81?XBE
zgVDkm=8fe&)Z*#1uN)P{zYSK3r{N|Pzd)uQKZi!)N!Ts-(7~N+~aUlvrr>f9TIuQfJb6E
zv%Rd7G|vO|p>!J=>lIR7WHGc3G^Wc2-8Ic~bn}@`V`N~3RoABv84SBhd+x;>Ygv;I
ze*6``GWRCM(Zq{Znb50M2pOP#q;bS-w!rh&ml;9SeSaVP#E<^VJ_$g&EcV)~20f@^
zqNgR0+yYo5x{~9I$e(Zx;$r?~F+U{rq?KFF&l(>l?uMNliqV~Fe}U7sms%%Nz$q^r
zuo){2BJNHYa(v^3#CXa0yn{t;Y4%0oF-@R;1_hn9pYl-dkQAEuwN22{CzW-0ouZ8B
zyJqVHiNV8qCU9DrkXE(z(6BadUwjL#tj!EF$
zPoV@^+}4<2tf}aXz?&nYhNrB|nXkNg0j
zsWGV_N6NMa4p8DX!ne(k;4Bx0hYnr7bruhE6zDT9(AU0yoqd@+_O;o`@$ErBy&ld9
z`+)~g-f_NfJaCJo?YURJf6_ec5K=_D^8|p-4R`PY-Dft)d=X~kmQn~jgO(sCMd^bf
z5M~!no6#8U<>~_2oe9B1)4SxgDI6TRw)mwuJ(?6XUlY<3$8^f5=E+)VdZTYkO(9sr
zYyib4DXK_4x|ADr+x9wCzJC_&zdSih5HM{RTdjlWITXsqj}YMPdJJP4>f+S6Q&&@8>fcEPVkLWK{1lYOxnr(X2bGb7EH
zW|y4a>C6+jr(O-j8C-M-@@g)f`H@+!r?9m-*;i!7NbGj>lZY*?SD6=y59s|ZE4zd0
zf57{&^17l40!B^Ng*l)q((%%ZYT{TK}#5iQSxHXhV*fsqS_qD4RoNk;B?Ah8Z@%GTsohQ+i;UHFZn|;)E)(Z8d$cURTOd=_QfjN
zj&Ce18aLS)Dq5~5vn^Zne%ZqS)}&d}A)ioy8~&xWI>1fCSQY^2PrM?MKp7#lBeVFN
zQderDCY~UAGRBxs@NL=$M``27x22{@GWbAgqC$R%#6hl_)PF^XFp2pKulUu(2hxQ0
zkX6;?U|9XmD1qq`^dEJ0k!$WvP}L|!HwSw~R*S3#<1KngBEkRXl8FD`k`#cIC#HnW
z#=)u|bDLzv_&zO+Xcx$Kjy2EEH4L-+#9}l~ErC580Hp~-Qxd4z`c
z@zZR64&>eQjHNbn%9rbO{_v2vU;P)+2ZEn)(bO-b>(tO6ckTERqEj??5xoSweb**<
z^#pNsX}&P6>wtf2KlA{5vYsiN0gAENq_J?=kdQQ#7h{D#aJ
z`m$anU=-?f)vi2=6RcX1Kg1n@Y@TmG)<*QBGVe0$XYX8o#Y+vy!rCvUfvIk|n2(Y=PdlkZ`D
z@xj*lP6-4=vE7!_RDt~6gR*oPQT5w)Er5;MTOlk6z~G#pHYyA_9S
z8s3uJ>G;rTLohHnM*htLK<&G?BVY#cOAoqmspg>r-6H$+^sLc35+3h|8^G!&@EcxrDTZ;qKC{kco>P1
zMO7u{9I~hMaG(#@VW;u?hK9=3=!TY#a9EMt5qJUp6F3w;cn|Bu#~{gURNPHO;i|P=
zF3vqR7t2cmU82ytOhMPnknwj$3dWkBNa~rtH?#h^g(YE}fY9Xf|9FxTFR*L`=ZgWL
zgxjKxe)@e9t2ZpZAnoHeL2tb&ba|)a7`_s>+J1g2F6MV(xAMK|FzNhxMl58!$hnFt
zL4$ut_R+8P^kfEqnKX^1gZR~Uza=Y+|VgAO>axFTGy|M1h@L}P~d{8teC&JgDjT&9R%ZY*$#T0MK7f$&90
zp=rsBH4?gdzx>c3Tw6mbp7J}FF8@3sOPFBLvEvB+2bB6n>JI|c_{hRrM^`fFZ;;Sv
zlrb}ZsiV@PT=H&p$6PAlgRDg7zx|5#DFtBMu|hov`s)w&4MMM}x)qaMS^I_6AWoY<
zP_5)ruR|AJ;CsaZ=M<(%f20L_n1Ib06>%VG?>cT(j=istDp#Y^)Ucm_Ip5RXu}$|h
z{CwUv=qnt3`p5k$vYiWT3g%GTDH9*y$tB3U|E3D=S~oivg$>-aUgAF=cYRgnkQ;S!Y*;sZZ(4q9nK`TP
zZM$0;!#AMxS7uV_mzU;B!;g`$Bjtnq&P!nyN;INUVs($G0=5=yfMgibi6y~W#0Ydw
zK-bzlOhx=f1e;I9N~83ee+s>V7sxLqLt67Uc2B5}qq-uY5AGisijMkbAkbjU_`mH%
z^2boK6WwB+6!DXRY8}@!|J+s<&{b=2d1XwpO^$HObtug{HBvUdY`Q%&tWDPdoC{|
z`}$zf`K9(0gkFBEYv-QOtTt^6Lg_rYILKXj*($!m{FnBo5hU!_b&d6=Y#D+ihfI5<
z99FfHotuYsG>0-Fj~<+LV$LR2N{;DWMqC*C3SN@5Ga*+{)5q!WYrcR4{Z8G_Xe-l*
zz$wng9y(KoemtmbXntt?Uki7ax!PP>#bpZ`#b=VVv;k2Ws$Lh0rYZn2=_B31>yi#v
zgGn1sQIdRR+~EMuIR#SvPbTxoG;a9_(-zbp;=Y;A==&fc^w!v8Ty>!@6FvEz%BsC$
zV%_2o_|sYjgWqhRA>nrb-MI}TCE68H+-$NBz2R`;r{-n-va>cT^`qW
z%OnDIxa;ijtGj8RERp%IOw+zXPQI!iZ$bXp?Qd_!QT>i)nYsJ8>z7?lNG^mf9=_F-
zJ3RkG@#!U&ZLd_MzP|d$n5f3VWmA|$61@*J<$Xt>$!&^#I@8us6ft3$3v>+vV@RPmc
zDDe&p;8{bm95HyV{9^x5e1cPCg3QP4aBAfR2zPH{qfUb$cf)&P?mB6~W0T!KZk2;t
zdUdJ&O~d9gH_*NC^nCsRg$Kw;
zjM}uHorIZMsShu)#rT%v@c+9?B08d0tD%F=4X?-LtK($Rok+U3D&=U}49n}KJaeJW
zLCvJ7Q^Pd02iu77i-u`KS2e(GT42u$Bgdg1ro?ZC&f7$k5Ct5^vIUDy$Bf5JY_!ie
zJ?In=%+7y-Oo4)8(V&*(!*ZJXA;Q&4+Wmq_!!5zD^X)4uhm2?3)FE*L4#FcMwu6hw
zT?WLS1;IXVz2`Xh?r#j#KN9Tkzu|n<1TLdsAnra|Pr@hb;Uq%?A_FAqfem-o>v@f;
zO2vyG^5)27Xn>pOJy(8q9r}>q6CSP4y{xe02V!-*a{zJ0Tr}miBNHY*V{Ag@8j}*ZW*{7
z`2y)0se;6(;AXwkJ1~4S-8h~)yy@e*LN7DYQJnYj28gTlL$Y%{bu#hY_4A)&a&^fJ
zyr5kOuO~D=p{uz)sd@4h*;a3V8|(4cj$*rQ6){kvZrfIAw2gnGehJY%3^R}p9t#NF
z{{W!lOJ#g(RLTcuk&)is@;%^$!+2iwv4R}X2Z!y_e_tWhd(Y(m^njrFe(i|dR(HCd
zKXieW`GeEtKy1mGV{aR3=3av=H}Y^2yA28IwxEg+4RH#>xbmMNv-*q@v#eB
z#3>h>B-2O&C^irg3Ev8HL~vS_9fJq-N}k-qaM6YT{g)#pVU{hQm4Ra2+X-N0M5?12
zUt{V#i*dYq+k6!^`_z4C(&@R_-J9hcUT6QxRYqi5fH0^j8E296T~&1dB(#lmAoRAP
z12kIeFuW%=!$vq2ansQ5-*h9Um<(I3#-|w&=0KM6r=$>qJ$+S_+84?zeNk@tXtazB
z@R}8?Z>F#C6)=ykqdtvvj`YU~Pbvf64}Hn3q*Y$AhBt4CGmcXp7bicX<7)!fEy6o;addI1GtK+0H;f-z9n_xJ!!G?x
z6_5Z+^lO5=gCVsw22PS^pn8rHs#d@TgTgL;19C+*DX0wKPh_$mK^wZp=J#V&<6b7w
zNoM5us79}T&_&XhFYrPk>yw>l?+yqyHT`UCCh`8WzMB#9-C?MpzI|AW-#H0t$heV42tPc&kO6+j
z9lt&gMlHvYkPByi;mdv!1bGQ;)1M~5c+Ek*cEiDpbg{!v^!AhikyI8yCM92~AhvMC
z-HjG=G?WnG-?<%nk9kq8OVB`CEH}R=mAb;-}KMcBzmWUCjv2Z^VPaAjW`N>*a
z`9yor2*>e8DtL?BgBi}UB>iTW`T^WYh;@d2e^wMzXd|
zix~eLNjsh+cC%X4ZIP_VBbHz<*PG~0i&J>rckCURoFH5jcz3hY1DWe@5FhS7JSG$$
zC7V7|kQ=!@cn(z`@pTa4c_Q7>DoZnZ?`W6;7TvQh4F3C}Dvv`0tUxv|EZcGVqhDj-ahc}sKw%WM8T5hR@zI?On3T;ac@2WT-QPzu7vQ3=fp0yiS
ze8}sOKznBB-8ZDqsNO&Ii6^sP@^q(aW|x@(UPFrxax=vLha6dYj%7*H{nY>cU
zc&HhSRTk&;-3(N{A)*k>RGmE*3r_}o)%r!1rovb@j^ImE$sd86`wx?r4-U$RaO=NR
zH8OIS&h>{4O*@hSVZyZ1G2-j?Ygs-zsWzy*=YKsnU01BAT-ql8oFexE&MIh!o39^OH|EUdV+$|A+82ar_
z&24K;RR>_(Iq-ebR~an8Oy0L4ot+d-5|EOJDqwZo{xgO*rfhZ+h6C`Cd(1RWrKSh-
zc|KjrFqVR50R$^bAc99rZ86}WM=OUO0xU<@=TZ=vtwB`Ughp$dz;|2#iCgP$E*47Y
zq+@IP%%QD}5$&JHyScW?2U=6#Axg=e?dZe;b}z8BpUj2&GfLY>iutneaj04|HJqTE
zfeI(w!9e_Wyy7e*gG#6WshIvQ3GJn0JD>CypB_5|%v11+a@Jy?+61cg`YN{Wh);}4
z*4pUHZN*!1ybV2oL7O^p;x;QYwct^;z;N`^x5ieYx8xCLyQ+k6ohPbv+-t|f8~QHb
z1uuK*D^GXz%m=0{g5+Y<5H|MIk17>+e?SRDkg9V-qThEl)kV?lhIXRuB&kDKCS{tMq%5<7oCL;AEWyckws0%Z!6#SamG|C@|re#jfyd}KD
z9QvH#Eg4yqco^&>4rf{WbD1xmzK|~Tw&>razcF=5p6oa~{gIV8+CZPSkjH82oP&%Tu5?{3FamKc>pYE$#$8V4|Hh2=WPZP|JY?QD3fFWwsv-9OgM-q_x_*
zo(c~N2+Ty!35e~^mj!t=wZb}{w8Y>nXrC!(g{+SezWobNTJ<$G4&v%-
zB~9kIQ93PJW=3vnrJI9Q5JOVm^wyrhQxUI{%*g8iWNZw)ywwq;oOl)HQ@6pNl5leK>xTJ!6?w6C5_G9U6|+{e}Q{>=#xz@UH-DS!wVv
zU1@%*qJCFLT6O8RVy`6lu59KA>s@>5pq}Cu&!7s!WtE1*Pg;}ay
zMvme297q>}wvo_WllGGK$WFtZ7t!t}Ge^y2kF{qVMBX)dz9ov#_S|bdA-a^|Ci=Ng
zhWpPFoX^XSKb}6!3#4sWbBS_!q`fK$bPyfU76Cr;qcc{CieGIeK~odczNhmB>TH&s
zy_OR9m$}YXGG9*4Pu)Sc-(af~sn~x
z_Wy+AxcVuQ4ihd=(wcxsd9fN*##SqyP|mN9-rV$DE!3$~srv4ES5ENh;(giouA7%+
z-ND9mHT|gyImLeUSA|MpI`zHBZT!zYySmL$thSr=QgjnAl;Knu*54FcR6yH@u6XX9
zi_1LhrrNjPUhO)@wwH)
zk~)r#t>B8l{8HZTBXCz8;rDj*sxIP}yTP-q@#_)GshyKl~hV
zLb3VUT7Ni-^TioC_yGcHs_;2Wx;$;0`vc$BEPj~L_q3J)CHfX)!$A_wrX;aaGRb-D
z3JwWs7CqC&9OsP{3wllyx1PtwbV+4LqrMxA2a%>2Klfpoc&JiS+Gm^hU&_eW{hPFx
zrY=YRr$P6Ix^E_#NKlL)`hE^`egtjFQ(y!>$d7iK>~IQ6RX6*Lu(OFy7*RVUE(fYw
z&3w)*UxjG!GncL=j;DoQIw+WE8W)`f&I`o2nmT@ZM`*ce`|J3}`fcD?dT#5|56|B$
z)&jE?E2PCHFQn@qM~pf<00VYF3t`$3J&RBNh$8b+Sa1!MLUH#Df8YORMwWa2%5>^I
zpQe&JkVF_J`3$f;^HNT=+O{O)FXNv~-u3+DCDp@N?CY8YVz{;MF%tzL~$UGq}9najKW6@;VgnhT=BPT@B-Q@9>B`i5Bko7
zu3c`Ap!GXo-ga+Bft^EmHyD
z&?u8HUO{+?N1<#1tF)Gdt2-gUh872@>bFxOSlc&Fz&59ZXXKNM=m~mnvk=VinPwO3
z*jBM;@b+d(qhtlK9S9u~TSA0|lH_YvqjBdj^6Q}0O*$J*)qHuI;1fv%iy1Xlrg3N9
ztqBetGV}%eyC!-pv7@?d@9%qLn6CFa=;mRnycNQaVhBn?&1-e^{efrM~vOro$1E#Tgw}CTg&xJ%yryGE0J^0mU1;cSit=^
z_wy5$@dMU*0o!o%))R}xiAW`UkqyKD#BNz
zv`j*9nz@HYJNr8TH06xzd?pAN*w$4MdpfKW#&9N+!QPp%EA`9E!b+#mtOrdFq2m#I
zm_D>){I~8E`Tt{G39dTtW?eXeM|kOKXs_tZK5hTFe!%3jT!mM_Ht)(9y}kmiyG)=z
zVO%m^=Ajw~zvE)-1cyw#K3dkAVV?&xe{#^Cj`B{Und_Z^;CG={zs1!DH3cGqvtmD^
zVbsO+ao$0e5jw8bf-=>&m^#uJ5qwu8FY3%bMZ-A*1THEToEPz<(v327@C<&nB5z>W{Q*)4
zuB%wB>xXkhZM&-7+<_>vd_;d!^1NQc+m_Mh4a-yIi*k0YDjkKPVl|(m!I_M>*z}G1
zM!4E$pwAkV^|A0!iR8iG?^%z5no?PauGa_JLx-)TLr2)v5%6lDMErK^@AUaHX+R
zCTG#rVtTUox3I@DFSN+-2g1Wzh+i&e@s_Vnh~1$h}rS=E3~E{mn6
zu`a~Jj@dVP(!3dxgrB|t?zUaXKb>+@oRpIyYH|Y#ChNV
zsoXO!@N}V&w6}pdgbN<*k@;n+^oMe%Q{nV;hvt%U*D1PafsVThsdXP_j^nC3ROuKo
zh-B#BKfi7gpGG@4K*AmHNmbsYp(1_M<>&f86@XpDnC$3S+O`C8c82QR);C`VRYiZ^
z;+hE2KDn@MWk%!;maalWI7KX(p=zH{NmONr&^NKF1nmQ*t1GYIg73zxP(A%G+H?Z?
z99eLWNW&4Tq@FItwADp3&X*KOZel6+|8$T<$h}5`?}rHGMd`m`e_Q&RvO#Kf6{ssi
zmjYBnb2LBcw_?Ikt6eg$4mL64FXOZHp_VV^tk|=(cP_FAtv}j3vWjc#ySoK9C!oH_(8rV9`8NX}Irik&h-lm3q;)^Pj$jP2J{mrFb>QLtES2T01M%TPi
z-;7Ofu10{if*_F8hy|xvrZZ(`N!w$V$R>6_*yi8qW`ll)O1HK08a;qWJlD{eXT&_C
zKU?eC#yFF>Y<7X{ClEfvan0le6oajbdks}QL47RJcbg>$XPu#ao$-ykWao9(^8LrJ
z9Bffc+0wzaU0+pmJ`ePpoR_x79mT91;Zs=_uCWp}7y@u$B;S^D-VN+Ka)=y+)%0Az
z`I@EFCTi#j3rm-0@2-zRQN`;gx#YY-;`IAn3(=u<1Xs0R{a;>w{v=TILa(wQcp#~`
zoivU{k$>!8FHzsE?Y#ZP$rN-RY0H_;5!OUaHaokud}l-Yz%;0k9S_&6{Y|c}H09#e
zs7F42gxDX>?o=fMU;ttwCDtyoD)b2pMlb5>sCOlL%af|nXKtO9o-AOnd)jhNs7^4c
z6#(sPR(TYN9x8sXtFq6~7`RzIn72fHgKi`mhRtd~Zh{WOwNE7x{J+lW9}iA1C~0;m
zIwtN8L1oo_JI}QRTL@2lbHIn*L5%Tl;1|J)NOdV*?l|9ub|{wk9q$l2vn32rnm531kZ|0
z`@D&V$T-we8DSVSyqWRzL6^v*e(8}7L&?j+L6m&V&C*1Fi|_{kDhCwV$AMJz@KXM@
z6ig5VJBfrmV-#j`zHVh|@~n9F-S{&+gh!;Wm3^)(@73I)UJ!aTPIG60NT_YJwUy65
zH9%I_ON}D`Qv>MFH9^l4Aa(Y2mDi*osaNPem&|*(WRPM>V!J44-aWmT(R*6zLJ5%^
z@Bkw5E3;?{a+;soyWc27!(rl-hQrkbsIw1Z)Ked5s8%$U$U6<}m1^Ty>&K`2kHS@^
z$s~FGBXk5vESxLcYPO_8>x}A4*lfAiN75g;Z`+_5e!46%pw^X
z{?!ro$vu07m>$+*&>c?U2vXZmFoqUJ7uctu0cPaYT^%JuoMOnsNpQfcD@|ChC<)k~
zmEs_-jxPv3?waeW(-)EaLvE_gyu?6WST;7X%a;TTerzV4Gr`KP#uk(8q3r=9m2OMh
zxe#Ngvws`_)QlV!A#HZIfAU)I`(TE6qnPoX3sJN3^>6P_v&ydRPe+Ml;kU~7&TG^KbxD3@|F
zv`S_K$K$w_;j-yd-+S;-y>+D==mF$je9zN}4Sp%_>C9&<%sx7M`03V8b@fwo@*1LP
zt*q4k`xJj2`h^}jB4w)y3vD7T^;dKlgxx$D{66j*^3lcuqm@(OIXY5@oD1aN^{IJi
z*_WjS75bQOOV1SC%$`SV@(~U>jwl#iPMEtf1b%po)uLg^gv=g}u;;y$Mi`zR?K3Rc
zfQNzu`*-2nL^@3&EI1z#;dcb67-huM7cmo|pE{cg=L#jH{-OtH`DK2~KT4kGtR>$e
zcVnC-RMXU3npH8o=u;p0HBic+tCg9BAwhcPHkEYrCq7M*f3kK8Y(w!|+I|0Iq`Rb6
zJaHA)pcZCkB1m{=rj#GQiYh`Gdlz05-|(@fcDahxpl=Wk-g)A5-mN}#sn?hI({AUn
z&j(6$wtIl(`S;XhJen#tEgXkWmT$)YD4KEGzx@7tTk@fiXG<~%-nS;fswsH~Rvdlt
z^f%Qw9P^_MTt@)1{8){F@IH-IpHU3k^=#SrAta%V*
zI&T3M)q5|$YQ|$*f)X8Kzfe6UDbQ3-70H)6KBnyxMUO2W$kPk*LKlc$UmC4^w-dkm
zLv;3b#$Rcr|1wJi9+Ldn;!4)zWl{3-NPqP%Psw+88x4B28Ug~YH6DM}V$Sd^uF|;h
zq|yo<|F0Uv2Y947&aV$12SK9Pl9dosB5rQd+zhlhzF?r5&kn@jI7>5`6Fw7NLml?@
zXo_pDm<)VDhp!+RzKTrE$cvI>`6{h9H>-T$futaUKNU%^1m5k3-Y-n#_^Vwr%
zJf-F^$;?qYl!JYhVu6S9>FaTWm5Cv|X@cyCKSqB)CaSeQJOMT-MZ2b~N0Ycpg(yYZT-#hM4(in-{W%lgK)!8Rw}u=n
z%+9hB#z2|0eP47WbwjT?HoFflA~uj=&PJnBLGr3HI!=mOuQGqEGbXwGj3kR@XG7!S
zyUi?Yn2?YgaRVCq)(lH{8WjaSgr>%hJ429c`$@Sx%)5E`2VmDE5O}wBqCf&phMecG
zaSBV4M~N-Gj;MS1@y>SBVbqrJyXsw#-JfwhW^v+grRoZn$7qCLpB#Vy8?5
z9q3Hrh$&~tfo?!<$6Ewe2|{yQVy*Q8I9&ZZfpJg92eV{w40Grq@Gdl
z<`tc~UJHIa8(WLOso2iYc=7!U%lPX&4pKqE&+xx5*<*M>wq1Hsa@Luf>lEV}ojv-~
z@nLp3vtj1e;A*rXmwpa#Ect9k5>^0EcLk_<^RKU%GBlevm#x_O-b%GMJE{M2^IuHJ
zof;>%bGJmw=-1l99BhJ)TVz=O#c!Kd!(-AZpZQdkuN9t|7*6hR5;de;zut&QCfSII$j_8hm+=pk
zx*Ow)o|gu^hKt`9p^(IS-)P(ED5v}VtOy=UrJiNH@G`2L89+|T=0P9Erm5~dsBgwO
zr__sqVux@Y*Znba4Q+(z1Dn=%#f$QHpY`S-CBv5ZA#%q@j!|}_1{K-d0lss}twj9z
z;`)97n7nIUqjl&Io~$T4$-6x;Yvl9R4?u$fFn%|Av1*hEdx{T@4B0jHBly)uRh7pF
zghDFQUfoaOHnC7rlLFf6buw`4-#_4I(wWan!X>+w4_036(Q*XAo|V*@1|6SSeIox6
z_wTAO#QBCl+%&}Q5x#vBbriNgcwTCX-B4fExQ$hd`K*@c{#aqCld(0SsXIV62-S&-H(lE>@-Yf$2~tH(#$5Akq}5C?+({rV`ddDA&w$t`
z`bCMrexscM!kYJ659uMRCF{9dek%3TDC1_#q4;eH7+wi3^-uS7EqjVi{`C15Ge53%
zWy}!uRXyZMf7a~F+X&l#JDwqm+0sfJ^<2x&ve~Q!v+fGdt{;ayrq`CEL(ivRnEB{W
z_qGJ#DxL@w6MYs(t#}dKQ4s_yo+r9%ge|A7Np>$x%UG;^vzvC%9+PqF@ietEXx(m2
zj?Qwl;BYaqB^`ROB{@+djqK4-R$rWC57*BiD3NG}56k@+5q!r7YAB<-|eZYEJ2LL(2>6JU5{^7XUa{_FuU7#xw&xI7$9{m#*zX3201|Fb&
z46dN3P|%g)5E+=s=K;lzauAJ3S9*0#k#;MWB{WQ3SK!o89)Ods!NF3&ap?XuJyPjN
zq1iBA$J-E6;IHnn_GOF3^e*cy;mv5O{Vr!3Ihr@|G{j?9^4@?nTzSD{)S@p>`cM`C?p5cJu!4dXyz+e5RjLvt&
z-SgSn189VRhZ$hV1YkR~Qt|DLevru%N+k*