mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-08 08:04:14 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31930197d6 | ||
|
|
cb3fc2923f | ||
|
|
204519b18f | ||
|
|
e6a974495a | ||
|
|
4c172b7d8f | ||
|
|
6f76dfa674 | ||
|
|
e47516c988 | ||
|
|
1a2388aadc | ||
|
|
d8668e7d4e | ||
|
|
f21669bb45 | ||
|
|
8175819f52 | ||
|
|
d0cfd655ca | ||
|
|
cc7d5f8a82 | ||
|
|
6efd53950b | ||
|
|
041ae65c61 | ||
|
|
286c9dc3f2 | ||
|
|
6b3d95a0b4 | ||
|
|
9f73e636b4 | ||
|
|
4a8cc9386f | ||
|
|
25f7ac019f | ||
|
|
19c2533d90 | ||
|
|
fa94d98d68 | ||
|
|
1469482631 | ||
|
|
7eb77b07fa | ||
|
|
5184aa8761 | ||
|
|
92df0e4a20 | ||
|
|
e905032169 | ||
|
|
973b5bb8aa | ||
|
|
f4b4610e28 | ||
|
|
9c0a97fc3a | ||
|
|
571a601b00 | ||
|
|
422d4914b8 | ||
|
|
a5532e15fe | ||
|
|
72c1de84a8 | ||
|
|
d935a038b0 | ||
|
|
be6cfc9db4 | ||
|
|
79ff35429d | ||
|
|
de2d78158f | ||
|
|
19c6e79951 | ||
|
|
81d8b39db7 |
No files matched your search
@@ -12,10 +12,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Go 1.19
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.19"
|
||||
go-version: "^1.20"
|
||||
|
||||
- name: OS Packages
|
||||
run: |
|
||||
@@ -62,10 +62,10 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Go 1.19
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "1.19.1"
|
||||
go-version: "1.20.1"
|
||||
|
||||
- name: Mingw
|
||||
run: brew install mingw-w64
|
||||
|
||||
@@ -16,10 +16,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
# Setup go environment
|
||||
- name: Go 1.19
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.19"
|
||||
go-version: "^1.20"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -15,10 +15,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Go 1.19
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.19"
|
||||
go-version: "^1.20"
|
||||
|
||||
- name: OS Packages
|
||||
run: |
|
||||
@@ -49,10 +49,10 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Go 1.19
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.19"
|
||||
go-version: "^1.20"
|
||||
|
||||
- name: Mingw
|
||||
run: brew install mingw-w64
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.19.3
|
||||
FROM golang:1.20
|
||||
|
||||
#
|
||||
# IMPORTANT: This Dockerfile is used for testing, I do not recommend deploying
|
||||
@@ -6,7 +6,7 @@ FROM golang:1.19.3
|
||||
# a Docker deployment this is probably a good place to start.
|
||||
#
|
||||
|
||||
ENV PROTOC_VER 3.19.4
|
||||
ENV PROTOC_VER 3.21.12
|
||||
ENV PROTOC_GEN_GO_VER v1.27.1
|
||||
ENV GRPC_GO v1.2.0
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ func BeaconsWatchCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
}
|
||||
|
||||
func waitForInput() <-chan bool {
|
||||
done := make(chan bool)
|
||||
done := make(chan bool, 1)
|
||||
go func() {
|
||||
defer close(done)
|
||||
fmt.Scanf("\n")
|
||||
|
||||
@@ -1512,6 +1512,7 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
LongHelp: help.GetHelpFor([]string{consts.ProfilesStr, consts.GenerateStr}),
|
||||
Flags: func(f *grumble.Flags) {
|
||||
f.String("s", "save", "", "directory/file to the binary to")
|
||||
f.Bool("G", "disable-sgn", false, "disable shikata ga nai shellcode encoder")
|
||||
|
||||
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@ func GenerateBeaconCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
save, _ = os.Getwd()
|
||||
}
|
||||
if !ctx.Flags.Bool("external-builder") {
|
||||
compile(config, save, con)
|
||||
compile(config, ctx.Flags.Bool("disable-sgn"), save, con)
|
||||
} else {
|
||||
externalBuild(config, save, con)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ func GenerateCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
save, _ = os.Getwd()
|
||||
}
|
||||
if !ctx.Flags.Bool("external-builder") {
|
||||
compile(config, save, con)
|
||||
compile(config, ctx.Flags.Bool("disable-sgn"), save, con)
|
||||
} else {
|
||||
_, err := externalBuild(config, save, con)
|
||||
if err != nil {
|
||||
@@ -346,7 +346,6 @@ func parseCompileFlags(ctx *grumble.Context, con *console.SliverConsoleClient) *
|
||||
C2: c2s,
|
||||
CanaryDomains: canaryDomains,
|
||||
TemplateName: ctx.Flags.String("template"),
|
||||
DisableSGN: ctx.Flags.Bool("disable-sgn"),
|
||||
|
||||
WGPeerTunIP: tunIP.String(),
|
||||
WGKeyExchangePort: uint32(ctx.Flags.Int("key-exchange")),
|
||||
@@ -756,7 +755,7 @@ func externalBuild(config *clientpb.ImplantConfig, save string, con *console.Sli
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func compile(config *clientpb.ImplantConfig, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
|
||||
func compile(config *clientpb.ImplantConfig, disableSGN bool, save string, con *console.SliverConsoleClient) (*commonpb.File, error) {
|
||||
if config.IsBeacon {
|
||||
interval := time.Duration(config.BeaconInterval)
|
||||
con.PrintInfof("Generating new %s/%s beacon implant binary (%v)\n", config.GOOS, config.GOARCH, interval)
|
||||
@@ -792,7 +791,7 @@ func compile(config *clientpb.ImplantConfig, save string, con *console.SliverCon
|
||||
|
||||
fileData := generated.File.Data
|
||||
if config.IsShellcode {
|
||||
if config.DisableSGN {
|
||||
if disableSGN {
|
||||
con.PrintErrorf("Shikata ga nai encoder is %sdisabled%s\n", console.Bold, console.Normal)
|
||||
} else {
|
||||
con.PrintInfof("Encoding shellcode with shikata ga nai ... ")
|
||||
|
||||
@@ -41,7 +41,7 @@ func ProfilesGenerateCmd(ctx *grumble.Context, con *console.SliverConsoleClient)
|
||||
}
|
||||
profile := GetImplantProfileByName(name, con)
|
||||
if profile != nil {
|
||||
implantFile, err := compile(profile.Config, save, con)
|
||||
implantFile, err := compile(profile.Config, ctx.Flags.Bool("disable-sgn"), save, con)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -46,6 +46,12 @@ var (
|
||||
"RepWSC.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
|
||||
"scanhost.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
|
||||
"MsMpEng.exe": {console.Red, "Windows Defender"}, // Windows Defender
|
||||
"SenseIR.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint (Live Response Session)
|
||||
"SenseCncProxy.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint
|
||||
"MsSense.exe": {console.Red, "Windows Defender MDE"}, // Windows Defender Endpoint
|
||||
"MpCmdRun.exe": {console.Red, "Windows Defender"}, // Windows Defender
|
||||
"MonitoringHost.exe": {console.Red, "Windows Defender"}, // Microsoft Monitoring Agent
|
||||
"HealthService.exe": {console.Red, "Windows Defender"}, // Microsoft Monitoring Agent
|
||||
"smartscreen.exe": {console.Red, "Windows Smart Screen"}, // Windows Defender Smart Screen
|
||||
"CSFalconService.exe": {console.Red, "CrowdStrike"}, // Crowdstrike Falcon Service
|
||||
"CSFalconContainer.exe": {console.Red, "CrowdStrike"}, // CrowdStrike Falcon Container Security
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
"github.com/bishopfox/sliver/client/command/environment"
|
||||
"github.com/bishopfox/sliver/client/command/exec"
|
||||
"github.com/bishopfox/sliver/client/command/extensions"
|
||||
"github.com/bishopfox/sliver/client/command/filesystem"
|
||||
"github.com/bishopfox/sliver/client/command/network"
|
||||
"github.com/bishopfox/sliver/client/command/privilege"
|
||||
@@ -212,9 +213,23 @@ func renderTaskResponse(task *clientpb.BeaconTask, con *console.SliverConsoleCli
|
||||
}
|
||||
environment.PrintUnsetEnvInfo(unsetEnvReq.Name, unsetEnv, con)
|
||||
|
||||
// ---------------------
|
||||
// Call extension commands
|
||||
// ---------------------
|
||||
case sliverpb.MsgCallExtensionReq:
|
||||
callExtension := &sliverpb.CallExtension{}
|
||||
err := proto.Unmarshal(task.Response, callExtension)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode task response: %s\n", err)
|
||||
return
|
||||
}
|
||||
extensions.PrintExtOutput("", "", callExtension, con)
|
||||
|
||||
// ---------------------
|
||||
// Exec commands
|
||||
// ---------------------
|
||||
case sliverpb.MsgInvokeExecuteAssemblyReq:
|
||||
fallthrough
|
||||
case sliverpb.MsgInvokeInProcExecuteAssemblyReq:
|
||||
fallthrough
|
||||
case sliverpb.MsgExecuteAssemblyReq:
|
||||
@@ -235,6 +250,7 @@ func renderTaskResponse(task *clientpb.BeaconTask, con *console.SliverConsoleCli
|
||||
Flags: grumble.FlagMap{
|
||||
"save": &grumble.FlagMapItem{Value: false, IsDefault: true},
|
||||
"loot": &grumble.FlagMapItem{Value: false, IsDefault: true},
|
||||
"name": &grumble.FlagMapItem{Value: "", IsDefault: true},
|
||||
},
|
||||
}
|
||||
exec.HandleExecuteAssemblyResponse(execAssembly, assemblyPath, hostname, ctx, con)
|
||||
|
||||
@@ -19,26 +19,9 @@ package main
|
||||
*/
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
insecureRand "math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/bishopfox/sliver/client/cli"
|
||||
)
|
||||
|
||||
// Attempt to seed insecure rand with secure rand, but we really
|
||||
// don't care that much if it fails since it's insecure anyways
|
||||
func init() {
|
||||
buf := make([]byte, 8)
|
||||
_, err := rand.Read(buf)
|
||||
if err != nil {
|
||||
insecureRand.Seed(int64(time.Now().Unix()))
|
||||
} else {
|
||||
insecureRand.Seed(int64(binary.LittleEndian.Uint64(buf)))
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
cli.Execute()
|
||||
}
|
||||
@@ -22,8 +22,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -59,7 +58,7 @@ const (
|
||||
|
||||
var (
|
||||
// ErrTargetNotFound - Returned when a target cannot be found
|
||||
ErrTargetNotFound = errors.New("Target not found")
|
||||
ErrTargetNotFound = errors.New("target not found")
|
||||
)
|
||||
|
||||
// ManifestBackground - An extension manifest file
|
||||
@@ -129,7 +128,7 @@ func findTargetInfoByID(ctx context.Context, targetID string) *target.Info {
|
||||
return nil
|
||||
}
|
||||
for _, targetInfo := range targets {
|
||||
if fmt.Sprintf("%s", targetInfo.TargetID) == targetID {
|
||||
if targetInfo.TargetID.String() == targetID {
|
||||
return targetInfo
|
||||
}
|
||||
}
|
||||
@@ -227,9 +226,9 @@ func QueryDebugTargets(debugURL string) ([]ChromeDebugTarget, error) {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, errors.New("Non-200 status code")
|
||||
return nil, errors.New("non-200 status code")
|
||||
}
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
data, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -245,9 +244,9 @@ func QueryExtensionDebugTargets(debugURL string) ([]ChromeDebugTarget, error) {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, errors.New("Non-200 status code")
|
||||
return nil, errors.New("non-200 status code")
|
||||
}
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
data, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -276,13 +275,10 @@ func DumpCookies(curse *core.CursedProcess, webSocketURL string) ([]*network.Coo
|
||||
dumpCookieTasks := chromedp.Tasks{
|
||||
// read network values
|
||||
chromedp.ActionFunc(func(ctx context.Context) error {
|
||||
cookies, err = network.GetAllCookies().Do(ctx)
|
||||
cookies, err = network.GetCookies().Do(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// for i, cookie := range cookies {
|
||||
// log.Printf("chrome cookie %d: %+v", i, cookie)
|
||||
// }
|
||||
return nil
|
||||
}),
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (6.0.4.6)
|
||||
activesupport (6.0.6.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
@@ -14,8 +14,8 @@ GEM
|
||||
execjs
|
||||
coffee-script-source (1.11.1)
|
||||
colorator (1.1.0)
|
||||
commonmarker (0.23.6)
|
||||
concurrent-ruby (1.1.9)
|
||||
commonmarker (0.23.7)
|
||||
concurrent-ruby (1.2.0)
|
||||
dnsruby (1.61.9)
|
||||
simpleidn (~> 0.1)
|
||||
em-websocket (0.5.3)
|
||||
@@ -230,7 +230,7 @@ GEM
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.15.0)
|
||||
minitest (5.17.0)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.13.10)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
@@ -274,7 +274,7 @@ GEM
|
||||
unf_ext (0.0.8)
|
||||
unicode-display_width (1.8.0)
|
||||
wdm (0.1.1)
|
||||
zeitwerk (2.5.4)
|
||||
zeitwerk (2.6.6)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ set -e
|
||||
|
||||
# Creates the static go asset archives
|
||||
|
||||
GO_VER="1.19.3"
|
||||
GARBLE_VER="1.19.4"
|
||||
GO_VER="1.20"
|
||||
GARBLE_VER="1.20.0"
|
||||
SGN_VER="0.0.3"
|
||||
|
||||
GO_ARCH_1="amd64"
|
||||
|
||||
@@ -13,18 +13,18 @@ require (
|
||||
github.com/Ne0nd0g/go-clr v1.0.3
|
||||
github.com/alecthomas/chroma v0.10.0
|
||||
github.com/cheggaaa/pb/v3 v3.1.0
|
||||
github.com/chromedp/cdproto v0.0.0-20220924210414-0e3390be1777
|
||||
github.com/chromedp/chromedp v0.8.6
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc
|
||||
github.com/chromedp/chromedp v0.8.7
|
||||
github.com/desertbit/columnize v2.1.0+incompatible
|
||||
github.com/desertbit/go-shlex v0.1.1
|
||||
github.com/desertbit/grumble v1.1.1
|
||||
github.com/desertbit/readline v1.5.1
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/gofrs/uuid v4.3.1+incompatible
|
||||
github.com/fatih/color v1.14.1
|
||||
github.com/gofrs/uuid v4.4.0+incompatible
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4
|
||||
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f
|
||||
github.com/lesnuages/go-winio v0.4.19
|
||||
github.com/lesnuages/snitch v0.6.0
|
||||
@@ -32,27 +32,26 @@ require (
|
||||
github.com/miekg/dns v1.1.50
|
||||
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945
|
||||
github.com/pquerna/otp v1.4.0
|
||||
github.com/shirou/gopsutil/v3 v3.22.12
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43
|
||||
github.com/xlab/treeprint v1.1.0
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
|
||||
golang.org/x/crypto v0.4.0
|
||||
golang.org/x/net v0.3.0
|
||||
golang.org/x/sys v0.3.0
|
||||
golang.org/x/term v0.3.0
|
||||
golang.org/x/text v0.5.0
|
||||
golang.org/x/crypto v0.5.0
|
||||
golang.org/x/net v0.5.0
|
||||
golang.org/x/sys v0.4.0
|
||||
golang.org/x/term v0.4.0
|
||||
golang.org/x/text v0.6.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68
|
||||
google.golang.org/grpc v1.42.0-dev.0.20211020220737-f00baa6c3c84
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8
|
||||
gorm.io/driver/mysql v1.4.4
|
||||
gorm.io/driver/mysql v1.4.5
|
||||
gorm.io/driver/postgres v1.4.6
|
||||
gorm.io/driver/sqlite v1.4.4
|
||||
gorm.io/gorm v1.24.2
|
||||
gorm.io/gorm v1.24.3
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
|
||||
modernc.org/sqlite v1.19.3
|
||||
)
|
||||
@@ -72,8 +71,7 @@ require (
|
||||
github.com/desertbit/closer/v3 v3.1.2 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
||||
github.com/gobwas/httphead v0.1.0 // indirect
|
||||
github.com/gobwas/pool v0.2.1 // indirect
|
||||
github.com/gobwas/ws v1.1.0 // indirect
|
||||
@@ -91,22 +89,17 @@ require (
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||
github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.9 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.13 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
|
||||
@@ -46,10 +46,10 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheggaaa/pb/v3 v3.1.0 h1:3uouEsl32RL7gTiQsuaXD4Bzbfl5tGztXGUvXbs4O04=
|
||||
github.com/cheggaaa/pb/v3 v3.1.0/go.mod h1:YjrevcBqadFDaGQKRdmZxTY42pXEqda48Ea3lt0K/BE=
|
||||
github.com/chromedp/cdproto v0.0.0-20220924210414-0e3390be1777 h1:nEnjcdmVQjhtQm0RFJxRINMw7lsQ8gidtbpsidiDqpY=
|
||||
github.com/chromedp/cdproto v0.0.0-20220924210414-0e3390be1777/go.mod h1:5Y4sD/eXpwrChIuxhSr/G20n9CdbCmoerOHnuAf0Zr0=
|
||||
github.com/chromedp/chromedp v0.8.6 h1:KobeeqR2dpfKSG1prS3Y6+FbffMmGC6xmAobRXA9QEQ=
|
||||
github.com/chromedp/chromedp v0.8.6/go.mod h1:nBYHoD6YSNzrr82cIeuOzhw1Jo/s2o0QQ+ifTeoCZ+c=
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc h1:pgBIUnhrsNh0Xi+8qUdHIP/nljIVz3laeRv23eqr45M=
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.8.7 h1:dYOYc5ynTBzwSLOi+1IfgHwPr8r2BqV48l/RC+3OuJ0=
|
||||
github.com/chromedp/chromedp v0.8.7/go.mod h1:iL+ywnwk3eG3EVXV1ackXBMNzdEh3Ye/KHvQkq1KRKU=
|
||||
github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
|
||||
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
|
||||
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
|
||||
@@ -94,8 +94,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 h1:Y5Q2mEwfzjMt5+3u70Gtw93ZOu2UuPeeeTBDntF7FoY=
|
||||
@@ -103,10 +103,8 @@ github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5/go.mod h1:uF6rMu/1nv
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
|
||||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
@@ -114,8 +112,8 @@ github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
|
||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.1.0 h1:7RFti/xnNkMJnrK7D1yQ/iCIB5OrrY/54/H930kIbHA=
|
||||
github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0=
|
||||
github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI=
|
||||
github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@@ -145,7 +143,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
@@ -180,8 +177,8 @@ github.com/jackc/pgx/v5 v5.2.0/go.mod h1:Ptn7zmohNsWEsdxRawMzk3gaKma2obW+NWTnKa0
|
||||
github.com/jackc/puddle/v2 v2.1.2/go.mod h1:2lpufsF5mRHO6SuZkm0fNYxM6SWHfvyFj62KwNzgels=
|
||||
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
|
||||
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3 h1:2n9BZ0YQiXGESUSR+6FLg0WWWE80u+mIz35f0uHWcIE=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.3/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4 h1:N+gz6UngBPF4M288kiMURPHELDMIhF/Em35aYuKrsSc=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
@@ -213,8 +210,6 @@ github.com/lesnuages/go-winio v0.4.19 h1:lFDu1mnhg5em+8zTHO4ChSD11J56xkyE8m3N8Ir
|
||||
github.com/lesnuages/go-winio v0.4.19/go.mod h1:rm7jf4kBcldxMeljR7c7XY1qVCBc+8z3PtSgkrT9Clk=
|
||||
github.com/lesnuages/snitch v0.6.0 h1:vOao32MdYDHYDcTAq2CKszDh6Dn8Bv1Gmgc8uVh193U=
|
||||
github.com/lesnuages/snitch v0.6.0/go.mod h1:RfXlAVJYL7gUoZ9VMMon4LqrPiAjC8x62Ntbse4a4s0=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/lxn/win v0.0.0-20210218163916-a377121e959e h1:H+t6A/QJMbhCSEH5rAuRxh+CtW96g0Or0Fxa9IKr4uc=
|
||||
github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
@@ -223,15 +218,15 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
@@ -258,8 +253,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg=
|
||||
github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
@@ -272,8 +265,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/shirou/gopsutil/v3 v3.22.12 h1:oG0ns6poeUSxf78JtOsfygNWuEHYYz8hnnNg7P04TJs=
|
||||
github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
@@ -302,10 +293,6 @@ github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs=
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43 h1:+sN63SJGqchSsVyNoeW4GyA0Y+g0LvKOHcaeqs1Rf6M=
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43/go.mod h1:dhnDTBbIg31cbJdROP4/Zz6Iw7JPEpiMvOl2LdHSSjE=
|
||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
||||
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
|
||||
github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk=
|
||||
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e h1:6SWomM8ezwUwnN3lqKxE4r7bYVwpY9514DQkwBV9IPI=
|
||||
@@ -314,8 +301,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
@@ -332,8 +317,9 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220208050332-20e1d8d225ab/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
|
||||
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
||||
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
@@ -364,8 +350,9 @@ golang.org/x/net v0.0.0-20211111083644-e5c967477495/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk=
|
||||
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
|
||||
@@ -386,7 +373,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -395,7 +381,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -418,22 +403,24 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg=
|
||||
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -518,16 +505,17 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.4.4 h1:MX0K9Qvy0Na4o7qSC/YI7XxqUw5KDw01umqgID+svdQ=
|
||||
gorm.io/driver/mysql v1.4.4/go.mod h1:BCg8cKI+R0j/rZRQxeKis/forqRwRSYOR8OM3Wo6hOM=
|
||||
gorm.io/driver/mysql v1.4.5 h1:u1lytId4+o9dDaNcPCFzNv7h6wvmc92UjNk3z8enSBU=
|
||||
gorm.io/driver/mysql v1.4.5/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc=
|
||||
gorm.io/driver/postgres v1.4.6 h1:1FPESNXqIKG5JmraaH2bfCVlMQ7paLoCreFxDtqzwdc=
|
||||
gorm.io/driver/postgres v1.4.6/go.mod h1:UJChCNLFKeBqQRE+HrkFUbKbq9idPXmTOk2u4Wok8S4=
|
||||
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
|
||||
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/gorm v1.24.2 h1:9wR6CFD+G8nOusLdvkZelOEhpJVwwHzpQOUM+REd6U0=
|
||||
gorm.io/gorm v1.24.2/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/gorm v1.24.3 h1:WL2ifUmzR/SLp85CSURAfybcHnGZ+yLSGSxgYXlFBHg=
|
||||
gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 h1:cv/zaNV0nr1mJzaeo4S5mHIm5va1W0/9J3/5prlsuRM=
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
||||
@@ -25,8 +25,6 @@ import "C"
|
||||
// {{end}}
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"log"
|
||||
insecureRand "math/rand"
|
||||
"os"
|
||||
@@ -67,13 +65,6 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
buf := make([]byte, 8)
|
||||
n, err := rand.Read(buf)
|
||||
if err != nil || n != len(buf) {
|
||||
insecureRand.Seed(time.Now().Unix())
|
||||
} else {
|
||||
insecureRand.Seed(int64(binary.LittleEndian.Uint64(buf)))
|
||||
}
|
||||
id, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
buf := make([]byte, 16) // NewV4 fails if secure rand fails
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.8
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.12
|
||||
// source: clientpb/client.proto
|
||||
|
||||
package clientpb
|
||||
@@ -1220,7 +1220,6 @@ type ImplantConfig struct {
|
||||
Evasion bool `protobuf:"varint,9,opt,name=Evasion,proto3" json:"Evasion,omitempty"`
|
||||
ObfuscateSymbols bool `protobuf:"varint,10,opt,name=ObfuscateSymbols,proto3" json:"ObfuscateSymbols,omitempty"`
|
||||
TemplateName string `protobuf:"bytes,11,opt,name=TemplateName,proto3" json:"TemplateName,omitempty"`
|
||||
DisableSGN bool `protobuf:"varint,12,opt,name=DisableSGN,proto3" json:"DisableSGN,omitempty"`
|
||||
MtlsCACert string `protobuf:"bytes,20,opt,name=MtlsCACert,proto3" json:"MtlsCACert,omitempty"`
|
||||
MtlsCert string `protobuf:"bytes,21,opt,name=MtlsCert,proto3" json:"MtlsCert,omitempty"`
|
||||
MtlsKey string `protobuf:"bytes,22,opt,name=MtlsKey,proto3" json:"MtlsKey,omitempty"`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.8
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.12
|
||||
// source: commonpb/common.proto
|
||||
|
||||
package commonpb
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.8
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.12
|
||||
// source: dnspb/dns.proto
|
||||
|
||||
package dnspb
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.8
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.12
|
||||
// source: rpcpb/services.proto
|
||||
|
||||
package rpcpb
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.8
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.12
|
||||
// source: sliverpb/sliver.proto
|
||||
|
||||
package sliverpb
|
||||
|
||||
+8
-15
@@ -27,7 +27,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/bishopfox/sliver/server/log"
|
||||
"github.com/shirou/gopsutil/v3/mem"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -81,19 +80,13 @@ func GetGoModCache(appDir string) string {
|
||||
return cachePath
|
||||
}
|
||||
|
||||
// The Gb limit here is somewhat arbitrary but is based on my own testing
|
||||
func garbleMaxLiteralSize() string {
|
||||
vmStat, err := mem.VirtualMemory()
|
||||
if err != nil {
|
||||
gogoLog.Errorf("Failed to detect amount of system memory: %s", err)
|
||||
return fmt.Sprintf("%d", 1*kb) // Use default
|
||||
// Garble requires $HOME to be defined, if it's not set we use the os temp dir
|
||||
func getHomeDir() string {
|
||||
home := os.Getenv("HOME")
|
||||
if home == "" {
|
||||
return os.TempDir()
|
||||
}
|
||||
if 10*gb < vmStat.Total {
|
||||
gogoLog.Infof("More than 10Gb of system memory, enable large literal obfuscation")
|
||||
return fmt.Sprintf("%d", 64*kb)
|
||||
}
|
||||
gogoLog.Infof("Low system memory, disable large literal obfuscation")
|
||||
return fmt.Sprintf("%d", 2*kb)
|
||||
return home
|
||||
}
|
||||
|
||||
// GarbleCmd - Execute a go command
|
||||
@@ -103,7 +96,7 @@ func GarbleCmd(config GoConfig, cwd string, command []string) ([]byte, error) {
|
||||
return nil, fmt.Errorf(fmt.Sprintf("Invalid compiler target: %s", target))
|
||||
}
|
||||
garbleBinPath := filepath.Join(config.GOROOT, "bin", "garble")
|
||||
garbleFlags := []string{"-seed=random", "-literals"}
|
||||
garbleFlags := []string{"-seed=random", "-literals", "-tiny"}
|
||||
command = append(garbleFlags, command...)
|
||||
cmd := exec.Command(garbleBinPath, command...)
|
||||
cmd.Dir = cwd
|
||||
@@ -116,11 +109,11 @@ func GarbleCmd(config GoConfig, cwd string, command []string) ([]byte, error) {
|
||||
fmt.Sprintf("GOCACHE=%s", config.GOCACHE),
|
||||
fmt.Sprintf("GOMODCACHE=%s", config.GOMODCACHE),
|
||||
fmt.Sprintf("GOPROXY=%s", config.GOPROXY),
|
||||
fmt.Sprintf("GARBLE_MAX_LITERAL_SIZE=%s", garbleMaxLiteralSize()),
|
||||
fmt.Sprintf("HTTP_PROXY=%s", config.HTTPPROXY),
|
||||
fmt.Sprintf("HTTPS_PROXY=%s", config.HTTPSPROXY),
|
||||
fmt.Sprintf("PATH=%s:%s", filepath.Join(config.GOROOT, "bin"), os.Getenv("PATH")),
|
||||
fmt.Sprintf("GOGARBLE=%s", config.GOGARBLE),
|
||||
fmt.Sprintf("HOME=%s", getHomeDir()),
|
||||
}
|
||||
var stdout bytes.Buffer
|
||||
var stderr bytes.Buffer
|
||||
|
||||
@@ -19,26 +19,9 @@ package main
|
||||
*/
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
insecureRand "math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/bishopfox/sliver/server/cli"
|
||||
)
|
||||
|
||||
// Attempt to seed insecure rand with secure rand, but we really
|
||||
// don't care that much if it fails since it's insecure anyways
|
||||
func init() {
|
||||
buf := make([]byte, 8)
|
||||
_, err := rand.Read(buf)
|
||||
if err != nil {
|
||||
insecureRand.Seed(int64(time.Now().Unix()))
|
||||
} else {
|
||||
insecureRand.Seed(int64(binary.LittleEndian.Uint64(buf)))
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
cli.Execute()
|
||||
}
|
||||
+13
-9
@@ -3,7 +3,7 @@ package accessibility
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -64,7 +64,8 @@ func (t ValueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueType(v) {
|
||||
case ValueTypeBoolean:
|
||||
*t = ValueTypeBoolean
|
||||
case ValueTypeTristate:
|
||||
@@ -101,7 +102,7 @@ func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueTypeValueUndefined
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +143,8 @@ func (t ValueSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueSourceType(v) {
|
||||
case ValueSourceTypeAttribute:
|
||||
*t = ValueSourceTypeAttribute
|
||||
case ValueSourceTypeImplicit:
|
||||
@@ -157,7 +159,7 @@ func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueSourceTypeRelatedElement
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +205,8 @@ func (t ValueNativeSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueNativeSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueNativeSourceType(v) {
|
||||
case ValueNativeSourceTypeDescription:
|
||||
*t = ValueNativeSourceTypeDescription
|
||||
case ValueNativeSourceTypeFigcaption:
|
||||
@@ -226,7 +229,7 @@ func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueNativeSourceTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueNativeSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueNativeSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +350,8 @@ func (t PropertyName) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PropertyName(in.String()) {
|
||||
v := in.String()
|
||||
switch PropertyName(v) {
|
||||
case PropertyNameBusy:
|
||||
*t = PropertyNameBusy
|
||||
case PropertyNameDisabled:
|
||||
@@ -428,7 +432,7 @@ func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PropertyNameOwns
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PropertyName value"))
|
||||
in.AddError(fmt.Errorf("unknown PropertyName value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package animation
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -88,7 +88,8 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Type(in.String()) {
|
||||
v := in.String()
|
||||
switch Type(v) {
|
||||
case TypeCSSTransition:
|
||||
*t = TypeCSSTransition
|
||||
case TypeCSSAnimation:
|
||||
@@ -97,7 +98,7 @@ func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TypeWebAnimation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Type value"))
|
||||
in.AddError(fmt.Errorf("unknown Type value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -1465,6 +1465,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits12(in *jlexer.Lexer, ou
|
||||
(out.ErrorType).UnmarshalEasyJSON(in)
|
||||
case "frameId":
|
||||
(out.FrameID).UnmarshalEasyJSON(in)
|
||||
case "violatingNodeId":
|
||||
(out.ViolatingNodeID).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -1489,6 +1491,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits12(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.FrameID))
|
||||
}
|
||||
if in.ViolatingNodeID != 0 {
|
||||
const prefix string = ",\"violatingNodeId\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.ViolatingNodeID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+107
-76
@@ -3,7 +3,7 @@ package audits
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/network"
|
||||
@@ -51,13 +51,14 @@ func (t CookieExclusionReason) String() string {
|
||||
|
||||
// CookieExclusionReason values.
|
||||
const (
|
||||
CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax CookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"
|
||||
CookieExclusionReasonExcludeSameSiteNoneInsecure CookieExclusionReason = "ExcludeSameSiteNoneInsecure"
|
||||
CookieExclusionReasonExcludeSameSiteLax CookieExclusionReason = "ExcludeSameSiteLax"
|
||||
CookieExclusionReasonExcludeSameSiteStrict CookieExclusionReason = "ExcludeSameSiteStrict"
|
||||
CookieExclusionReasonExcludeInvalidSameParty CookieExclusionReason = "ExcludeInvalidSameParty"
|
||||
CookieExclusionReasonExcludeSamePartyCrossPartyContext CookieExclusionReason = "ExcludeSamePartyCrossPartyContext"
|
||||
CookieExclusionReasonExcludeDomainNonASCII CookieExclusionReason = "ExcludeDomainNonASCII"
|
||||
CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax CookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"
|
||||
CookieExclusionReasonExcludeSameSiteNoneInsecure CookieExclusionReason = "ExcludeSameSiteNoneInsecure"
|
||||
CookieExclusionReasonExcludeSameSiteLax CookieExclusionReason = "ExcludeSameSiteLax"
|
||||
CookieExclusionReasonExcludeSameSiteStrict CookieExclusionReason = "ExcludeSameSiteStrict"
|
||||
CookieExclusionReasonExcludeInvalidSameParty CookieExclusionReason = "ExcludeInvalidSameParty"
|
||||
CookieExclusionReasonExcludeSamePartyCrossPartyContext CookieExclusionReason = "ExcludeSamePartyCrossPartyContext"
|
||||
CookieExclusionReasonExcludeDomainNonASCII CookieExclusionReason = "ExcludeDomainNonASCII"
|
||||
CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet CookieExclusionReason = "ExcludeThirdPartyCookieBlockedInFirstPartySet"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -72,7 +73,8 @@ func (t CookieExclusionReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieExclusionReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieExclusionReason(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieExclusionReason(v) {
|
||||
case CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax:
|
||||
*t = CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax
|
||||
case CookieExclusionReasonExcludeSameSiteNoneInsecure:
|
||||
@@ -87,9 +89,11 @@ func (t *CookieExclusionReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieExclusionReasonExcludeSamePartyCrossPartyContext
|
||||
case CookieExclusionReasonExcludeDomainNonASCII:
|
||||
*t = CookieExclusionReasonExcludeDomainNonASCII
|
||||
case CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet:
|
||||
*t = CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieExclusionReason value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieExclusionReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +138,8 @@ func (t CookieWarningReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieWarningReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieWarningReason(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieWarningReason(v) {
|
||||
case CookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext:
|
||||
*t = CookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext
|
||||
case CookieWarningReasonWarnSameSiteNoneInsecure:
|
||||
@@ -157,7 +162,7 @@ func (t *CookieWarningReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieWarningReasonWarnDomainNonASCII
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieWarningReason value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieWarningReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,14 +199,15 @@ func (t CookieOperation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieOperation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieOperation(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieOperation(v) {
|
||||
case CookieOperationSetCookie:
|
||||
*t = CookieOperationSetCookie
|
||||
case CookieOperationReadCookie:
|
||||
*t = CookieOperationReadCookie
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieOperation value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieOperation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +261,8 @@ func (t MixedContentResolutionStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MixedContentResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MixedContentResolutionStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch MixedContentResolutionStatus(v) {
|
||||
case MixedContentResolutionStatusMixedContentBlocked:
|
||||
*t = MixedContentResolutionStatusMixedContentBlocked
|
||||
case MixedContentResolutionStatusMixedContentAutomaticallyUpgraded:
|
||||
@@ -264,7 +271,7 @@ func (t *MixedContentResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MixedContentResolutionStatusMixedContentWarning
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MixedContentResolutionStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown MixedContentResolutionStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +333,8 @@ func (t MixedContentResourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MixedContentResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MixedContentResourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch MixedContentResourceType(v) {
|
||||
case MixedContentResourceTypeAttributionSrc:
|
||||
*t = MixedContentResourceTypeAttributionSrc
|
||||
case MixedContentResourceTypeAudio:
|
||||
@@ -383,7 +391,7 @@ func (t *MixedContentResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MixedContentResourceTypeXSLT
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MixedContentResourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown MixedContentResourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,7 +444,8 @@ func (t BlockedByResponseReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BlockedByResponseReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BlockedByResponseReason(in.String()) {
|
||||
v := in.String()
|
||||
switch BlockedByResponseReason(v) {
|
||||
case BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader:
|
||||
*t = BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader
|
||||
case BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage:
|
||||
@@ -449,7 +458,7 @@ func (t *BlockedByResponseReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BlockedByResponseReasonCorpNotSameSite
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BlockedByResponseReason value"))
|
||||
in.AddError(fmt.Errorf("unknown BlockedByResponseReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,14 +507,15 @@ func (t HeavyAdResolutionStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *HeavyAdResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch HeavyAdResolutionStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch HeavyAdResolutionStatus(v) {
|
||||
case HeavyAdResolutionStatusHeavyAdBlocked:
|
||||
*t = HeavyAdResolutionStatusHeavyAdBlocked
|
||||
case HeavyAdResolutionStatusHeavyAdWarning:
|
||||
*t = HeavyAdResolutionStatusHeavyAdWarning
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown HeavyAdResolutionStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown HeavyAdResolutionStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,7 +553,8 @@ func (t HeavyAdReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *HeavyAdReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch HeavyAdReason(in.String()) {
|
||||
v := in.String()
|
||||
switch HeavyAdReason(v) {
|
||||
case HeavyAdReasonNetworkTotalLimit:
|
||||
*t = HeavyAdReasonNetworkTotalLimit
|
||||
case HeavyAdReasonCPUTotalLimit:
|
||||
@@ -552,7 +563,7 @@ func (t *HeavyAdReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = HeavyAdReasonCPUPeakLimit
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown HeavyAdReason value"))
|
||||
in.AddError(fmt.Errorf("unknown HeavyAdReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,7 +613,8 @@ func (t ContentSecurityPolicyViolationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContentSecurityPolicyViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContentSecurityPolicyViolationType(in.String()) {
|
||||
v := in.String()
|
||||
switch ContentSecurityPolicyViolationType(v) {
|
||||
case ContentSecurityPolicyViolationTypeKInlineViolation:
|
||||
*t = ContentSecurityPolicyViolationTypeKInlineViolation
|
||||
case ContentSecurityPolicyViolationTypeKEvalViolation:
|
||||
@@ -617,7 +629,7 @@ func (t *ContentSecurityPolicyViolationType) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = ContentSecurityPolicyViolationTypeKWasmEvalViolation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContentSecurityPolicyViolationType value"))
|
||||
in.AddError(fmt.Errorf("unknown ContentSecurityPolicyViolationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,14 +689,15 @@ func (t SharedArrayBufferIssueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SharedArrayBufferIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SharedArrayBufferIssueType(in.String()) {
|
||||
v := in.String()
|
||||
switch SharedArrayBufferIssueType(v) {
|
||||
case SharedArrayBufferIssueTypeTransferIssue:
|
||||
*t = SharedArrayBufferIssueTypeTransferIssue
|
||||
case SharedArrayBufferIssueTypeCreationIssue:
|
||||
*t = SharedArrayBufferIssueTypeCreationIssue
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SharedArrayBufferIssueType value"))
|
||||
in.AddError(fmt.Errorf("unknown SharedArrayBufferIssueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,7 +746,8 @@ func (t TwaQualityEnforcementViolationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TwaQualityEnforcementViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TwaQualityEnforcementViolationType(in.String()) {
|
||||
v := in.String()
|
||||
switch TwaQualityEnforcementViolationType(v) {
|
||||
case TwaQualityEnforcementViolationTypeKHTTPError:
|
||||
*t = TwaQualityEnforcementViolationTypeKHTTPError
|
||||
case TwaQualityEnforcementViolationTypeKUnavailableOffline:
|
||||
@@ -742,7 +756,7 @@ func (t *TwaQualityEnforcementViolationType) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = TwaQualityEnforcementViolationTypeKDigitalAssetLinks
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TwaQualityEnforcementViolationType value"))
|
||||
in.AddError(fmt.Errorf("unknown TwaQualityEnforcementViolationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -826,7 +840,8 @@ func (t AttributionReportingIssueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AttributionReportingIssueType(in.String()) {
|
||||
v := in.String()
|
||||
switch AttributionReportingIssueType(v) {
|
||||
case AttributionReportingIssueTypePermissionPolicyDisabled:
|
||||
*t = AttributionReportingIssueTypePermissionPolicyDisabled
|
||||
case AttributionReportingIssueTypePermissionPolicyNotDelegated:
|
||||
@@ -851,7 +866,7 @@ func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AttributionReportingIssueTypeTriggerIgnored
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AttributionReportingIssueType value"))
|
||||
in.AddError(fmt.Errorf("unknown AttributionReportingIssueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -905,6 +920,7 @@ func (t GenericIssueErrorType) String() string {
|
||||
// GenericIssueErrorType values.
|
||||
const (
|
||||
GenericIssueErrorTypeCrossOriginPortalPostMessageError GenericIssueErrorType = "CrossOriginPortalPostMessageError"
|
||||
GenericIssueErrorTypeFormLabelForNameError GenericIssueErrorType = "FormLabelForNameError"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -919,12 +935,15 @@ func (t GenericIssueErrorType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GenericIssueErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GenericIssueErrorType(in.String()) {
|
||||
v := in.String()
|
||||
switch GenericIssueErrorType(v) {
|
||||
case GenericIssueErrorTypeCrossOriginPortalPostMessageError:
|
||||
*t = GenericIssueErrorTypeCrossOriginPortalPostMessageError
|
||||
case GenericIssueErrorTypeFormLabelForNameError:
|
||||
*t = GenericIssueErrorTypeFormLabelForNameError
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GenericIssueErrorType value"))
|
||||
in.AddError(fmt.Errorf("unknown GenericIssueErrorType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -938,8 +957,9 @@ func (t *GenericIssueErrorType) UnmarshalJSON(buf []byte) error {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-GenericIssueDetails
|
||||
type GenericIssueDetails struct {
|
||||
ErrorType GenericIssueErrorType `json:"errorType"` // Issues with the same errorType are aggregated in the frontend.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"`
|
||||
ErrorType GenericIssueErrorType `json:"errorType"` // Issues with the same errorType are aggregated in the frontend.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"`
|
||||
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
|
||||
}
|
||||
|
||||
// DeprecationIssueType [no description].
|
||||
@@ -977,14 +997,14 @@ const (
|
||||
DeprecationIssueTypeLocalCSSFileExtensionRejected DeprecationIssueType = "LocalCSSFileExtensionRejected"
|
||||
DeprecationIssueTypeMediaSourceAbortRemove DeprecationIssueType = "MediaSourceAbortRemove"
|
||||
DeprecationIssueTypeMediaSourceDurationTruncatingBuffered DeprecationIssueType = "MediaSourceDurationTruncatingBuffered"
|
||||
DeprecationIssueTypeNavigateEventRestoreScroll DeprecationIssueType = "NavigateEventRestoreScroll"
|
||||
DeprecationIssueTypeNavigateEventTransitionWhile DeprecationIssueType = "NavigateEventTransitionWhile"
|
||||
DeprecationIssueTypeNoSysexWebMIDIWithoutPermission DeprecationIssueType = "NoSysexWebMIDIWithoutPermission"
|
||||
DeprecationIssueTypeNotificationInsecureOrigin DeprecationIssueType = "NotificationInsecureOrigin"
|
||||
DeprecationIssueTypeNotificationPermissionRequestedIframe DeprecationIssueType = "NotificationPermissionRequestedIframe"
|
||||
DeprecationIssueTypeObsoleteWebRtcCipherSuite DeprecationIssueType = "ObsoleteWebRtcCipherSuite"
|
||||
DeprecationIssueTypeOpenWebDatabaseInsecureContext DeprecationIssueType = "OpenWebDatabaseInsecureContext"
|
||||
DeprecationIssueTypeOverflowVisibleOnReplacedElement DeprecationIssueType = "OverflowVisibleOnReplacedElement"
|
||||
DeprecationIssueTypePaymentInstruments DeprecationIssueType = "PaymentInstruments"
|
||||
DeprecationIssueTypePaymentRequestCSPViolation DeprecationIssueType = "PaymentRequestCSPViolation"
|
||||
DeprecationIssueTypePersistentQuotaType DeprecationIssueType = "PersistentQuotaType"
|
||||
DeprecationIssueTypePictureSourceSrc DeprecationIssueType = "PictureSourceSrc"
|
||||
DeprecationIssueTypePrefixedCancelAnimationFrame DeprecationIssueType = "PrefixedCancelAnimationFrame"
|
||||
@@ -1023,7 +1043,8 @@ func (t DeprecationIssueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DeprecationIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DeprecationIssueType(in.String()) {
|
||||
v := in.String()
|
||||
switch DeprecationIssueType(v) {
|
||||
case DeprecationIssueTypeAuthorizationCoveredByWildcard:
|
||||
*t = DeprecationIssueTypeAuthorizationCoveredByWildcard
|
||||
case DeprecationIssueTypeCanRequestURLHTTPContainingNewline:
|
||||
@@ -1070,10 +1091,6 @@ func (t *DeprecationIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DeprecationIssueTypeMediaSourceAbortRemove
|
||||
case DeprecationIssueTypeMediaSourceDurationTruncatingBuffered:
|
||||
*t = DeprecationIssueTypeMediaSourceDurationTruncatingBuffered
|
||||
case DeprecationIssueTypeNavigateEventRestoreScroll:
|
||||
*t = DeprecationIssueTypeNavigateEventRestoreScroll
|
||||
case DeprecationIssueTypeNavigateEventTransitionWhile:
|
||||
*t = DeprecationIssueTypeNavigateEventTransitionWhile
|
||||
case DeprecationIssueTypeNoSysexWebMIDIWithoutPermission:
|
||||
*t = DeprecationIssueTypeNoSysexWebMIDIWithoutPermission
|
||||
case DeprecationIssueTypeNotificationInsecureOrigin:
|
||||
@@ -1086,6 +1103,10 @@ func (t *DeprecationIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DeprecationIssueTypeOpenWebDatabaseInsecureContext
|
||||
case DeprecationIssueTypeOverflowVisibleOnReplacedElement:
|
||||
*t = DeprecationIssueTypeOverflowVisibleOnReplacedElement
|
||||
case DeprecationIssueTypePaymentInstruments:
|
||||
*t = DeprecationIssueTypePaymentInstruments
|
||||
case DeprecationIssueTypePaymentRequestCSPViolation:
|
||||
*t = DeprecationIssueTypePaymentRequestCSPViolation
|
||||
case DeprecationIssueTypePersistentQuotaType:
|
||||
*t = DeprecationIssueTypePersistentQuotaType
|
||||
case DeprecationIssueTypePictureSourceSrc:
|
||||
@@ -1136,7 +1157,7 @@ func (t *DeprecationIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DeprecationIssueTypeXRSupportsSession
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DeprecationIssueType value"))
|
||||
in.AddError(fmt.Errorf("unknown DeprecationIssueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1184,14 +1205,15 @@ func (t ClientHintIssueReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ClientHintIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ClientHintIssueReason(in.String()) {
|
||||
v := in.String()
|
||||
switch ClientHintIssueReason(v) {
|
||||
case ClientHintIssueReasonMetaTagAllowListInvalidOrigin:
|
||||
*t = ClientHintIssueReasonMetaTagAllowListInvalidOrigin
|
||||
case ClientHintIssueReasonMetaTagModifiedHTML:
|
||||
*t = ClientHintIssueReasonMetaTagModifiedHTML
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ClientHintIssueReason value"))
|
||||
in.AddError(fmt.Errorf("unknown ClientHintIssueReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1225,14 +1247,15 @@ func (t FederatedAuthRequestIssueReason) String() string {
|
||||
const (
|
||||
FederatedAuthRequestIssueReasonShouldEmbargo FederatedAuthRequestIssueReason = "ShouldEmbargo"
|
||||
FederatedAuthRequestIssueReasonTooManyRequests FederatedAuthRequestIssueReason = "TooManyRequests"
|
||||
FederatedAuthRequestIssueReasonManifestListHTTPNotFound FederatedAuthRequestIssueReason = "ManifestListHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonManifestListNoResponse FederatedAuthRequestIssueReason = "ManifestListNoResponse"
|
||||
FederatedAuthRequestIssueReasonManifestListInvalidResponse FederatedAuthRequestIssueReason = "ManifestListInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonManifestNotInManifestList FederatedAuthRequestIssueReason = "ManifestNotInManifestList"
|
||||
FederatedAuthRequestIssueReasonManifestListTooBig FederatedAuthRequestIssueReason = "ManifestListTooBig"
|
||||
FederatedAuthRequestIssueReasonManifestHTTPNotFound FederatedAuthRequestIssueReason = "ManifestHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonManifestNoResponse FederatedAuthRequestIssueReason = "ManifestNoResponse"
|
||||
FederatedAuthRequestIssueReasonManifestInvalidResponse FederatedAuthRequestIssueReason = "ManifestInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonWellKnownHTTPNotFound FederatedAuthRequestIssueReason = "WellKnownHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonWellKnownNoResponse FederatedAuthRequestIssueReason = "WellKnownNoResponse"
|
||||
FederatedAuthRequestIssueReasonWellKnownInvalidResponse FederatedAuthRequestIssueReason = "WellKnownInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonWellKnownListEmpty FederatedAuthRequestIssueReason = "WellKnownListEmpty"
|
||||
FederatedAuthRequestIssueReasonConfigNotInWellKnown FederatedAuthRequestIssueReason = "ConfigNotInWellKnown"
|
||||
FederatedAuthRequestIssueReasonWellKnownTooBig FederatedAuthRequestIssueReason = "WellKnownTooBig"
|
||||
FederatedAuthRequestIssueReasonConfigHTTPNotFound FederatedAuthRequestIssueReason = "ConfigHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonConfigNoResponse FederatedAuthRequestIssueReason = "ConfigNoResponse"
|
||||
FederatedAuthRequestIssueReasonConfigInvalidResponse FederatedAuthRequestIssueReason = "ConfigInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound FederatedAuthRequestIssueReason = "ClientMetadataHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonClientMetadataNoResponse FederatedAuthRequestIssueReason = "ClientMetadataNoResponse"
|
||||
FederatedAuthRequestIssueReasonClientMetadataInvalidResponse FederatedAuthRequestIssueReason = "ClientMetadataInvalidResponse"
|
||||
@@ -1242,6 +1265,7 @@ const (
|
||||
FederatedAuthRequestIssueReasonAccountsHTTPNotFound FederatedAuthRequestIssueReason = "AccountsHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonAccountsNoResponse FederatedAuthRequestIssueReason = "AccountsNoResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsInvalidResponse FederatedAuthRequestIssueReason = "AccountsInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsListEmpty FederatedAuthRequestIssueReason = "AccountsListEmpty"
|
||||
FederatedAuthRequestIssueReasonIDTokenHTTPNotFound FederatedAuthRequestIssueReason = "IdTokenHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonIDTokenNoResponse FederatedAuthRequestIssueReason = "IdTokenNoResponse"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidResponse FederatedAuthRequestIssueReason = "IdTokenInvalidResponse"
|
||||
@@ -1263,27 +1287,30 @@ func (t FederatedAuthRequestIssueReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch FederatedAuthRequestIssueReason(in.String()) {
|
||||
v := in.String()
|
||||
switch FederatedAuthRequestIssueReason(v) {
|
||||
case FederatedAuthRequestIssueReasonShouldEmbargo:
|
||||
*t = FederatedAuthRequestIssueReasonShouldEmbargo
|
||||
case FederatedAuthRequestIssueReasonTooManyRequests:
|
||||
*t = FederatedAuthRequestIssueReasonTooManyRequests
|
||||
case FederatedAuthRequestIssueReasonManifestListHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonManifestListHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonManifestListNoResponse:
|
||||
*t = FederatedAuthRequestIssueReasonManifestListNoResponse
|
||||
case FederatedAuthRequestIssueReasonManifestListInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonManifestListInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonManifestNotInManifestList:
|
||||
*t = FederatedAuthRequestIssueReasonManifestNotInManifestList
|
||||
case FederatedAuthRequestIssueReasonManifestListTooBig:
|
||||
*t = FederatedAuthRequestIssueReasonManifestListTooBig
|
||||
case FederatedAuthRequestIssueReasonManifestHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonManifestHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonManifestNoResponse:
|
||||
*t = FederatedAuthRequestIssueReasonManifestNoResponse
|
||||
case FederatedAuthRequestIssueReasonManifestInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonManifestInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonWellKnownHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonWellKnownNoResponse:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownNoResponse
|
||||
case FederatedAuthRequestIssueReasonWellKnownInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonWellKnownListEmpty:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownListEmpty
|
||||
case FederatedAuthRequestIssueReasonConfigNotInWellKnown:
|
||||
*t = FederatedAuthRequestIssueReasonConfigNotInWellKnown
|
||||
case FederatedAuthRequestIssueReasonWellKnownTooBig:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownTooBig
|
||||
case FederatedAuthRequestIssueReasonConfigHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonConfigHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonConfigNoResponse:
|
||||
*t = FederatedAuthRequestIssueReasonConfigNoResponse
|
||||
case FederatedAuthRequestIssueReasonConfigInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonConfigInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonClientMetadataNoResponse:
|
||||
@@ -1302,6 +1329,8 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonAccountsNoResponse
|
||||
case FederatedAuthRequestIssueReasonAccountsInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonAccountsInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonAccountsListEmpty:
|
||||
*t = FederatedAuthRequestIssueReasonAccountsListEmpty
|
||||
case FederatedAuthRequestIssueReasonIDTokenHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonIDTokenHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonIDTokenNoResponse:
|
||||
@@ -1318,7 +1347,7 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonRpPageNotVisible
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown FederatedAuthRequestIssueReason value"))
|
||||
in.AddError(fmt.Errorf("unknown FederatedAuthRequestIssueReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1381,7 +1410,8 @@ func (t InspectorIssueCode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InspectorIssueCode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InspectorIssueCode(in.String()) {
|
||||
v := in.String()
|
||||
switch InspectorIssueCode(v) {
|
||||
case InspectorIssueCodeCookieIssue:
|
||||
*t = InspectorIssueCodeCookieIssue
|
||||
case InspectorIssueCodeMixedContentIssue:
|
||||
@@ -1416,7 +1446,7 @@ func (t *InspectorIssueCode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InspectorIssueCodeFederatedAuthRequestIssue
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InspectorIssueCode value"))
|
||||
in.AddError(fmt.Errorf("unknown InspectorIssueCode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1498,7 +1528,8 @@ func (t GetEncodedResponseEncoding) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GetEncodedResponseEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GetEncodedResponseEncoding(in.String()) {
|
||||
v := in.String()
|
||||
switch GetEncodedResponseEncoding(v) {
|
||||
case GetEncodedResponseEncodingWebp:
|
||||
*t = GetEncodedResponseEncodingWebp
|
||||
case GetEncodedResponseEncodingJpeg:
|
||||
@@ -1507,7 +1538,7 @@ func (t *GetEncodedResponseEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GetEncodedResponseEncodingPng
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GetEncodedResponseEncoding value"))
|
||||
in.AddError(fmt.Errorf("unknown GetEncodedResponseEncoding value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -518,6 +518,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(in *jlexer
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -586,6 +588,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(out *jwrit
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"storageKey\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+5
-3
@@ -3,7 +3,7 @@ package backgroundservice
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/serviceworker"
|
||||
@@ -46,7 +46,8 @@ func (t ServiceName) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ServiceName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ServiceName(in.String()) {
|
||||
v := in.String()
|
||||
switch ServiceName(v) {
|
||||
case ServiceNameBackgroundFetch:
|
||||
*t = ServiceNameBackgroundFetch
|
||||
case ServiceNameBackgroundSync:
|
||||
@@ -61,7 +62,7 @@ func (t *ServiceName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ServiceNamePeriodicBackgroundSync
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ServiceName value"))
|
||||
in.AddError(fmt.Errorf("unknown ServiceName value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,4 +91,5 @@ type Event struct {
|
||||
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.
|
||||
StorageKey string `json:"storageKey"` // Storage key this event belongs to.
|
||||
}
|
||||
+34
-16
@@ -3,7 +3,7 @@ package browser
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -50,7 +50,8 @@ func (t WindowState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *WindowState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch WindowState(in.String()) {
|
||||
v := in.String()
|
||||
switch WindowState(v) {
|
||||
case WindowStateNormal:
|
||||
*t = WindowStateNormal
|
||||
case WindowStateMinimized:
|
||||
@@ -61,7 +62,7 @@ func (t *WindowState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = WindowStateFullscreen
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown WindowState value"))
|
||||
in.AddError(fmt.Errorf("unknown WindowState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +104,8 @@ const (
|
||||
PermissionTypeDurableStorage PermissionType = "durableStorage"
|
||||
PermissionTypeFlash PermissionType = "flash"
|
||||
PermissionTypeGeolocation PermissionType = "geolocation"
|
||||
PermissionTypeIdleDetection PermissionType = "idleDetection"
|
||||
PermissionTypeLocalFonts PermissionType = "localFonts"
|
||||
PermissionTypeMidi PermissionType = "midi"
|
||||
PermissionTypeMidiSysex PermissionType = "midiSysex"
|
||||
PermissionTypeNfc PermissionType = "nfc"
|
||||
@@ -111,11 +114,13 @@ const (
|
||||
PermissionTypePeriodicBackgroundSync PermissionType = "periodicBackgroundSync"
|
||||
PermissionTypeProtectedMediaIdentifier PermissionType = "protectedMediaIdentifier"
|
||||
PermissionTypeSensors PermissionType = "sensors"
|
||||
PermissionTypeStorageAccess PermissionType = "storageAccess"
|
||||
PermissionTypeTopLevelStorageAccess PermissionType = "topLevelStorageAccess"
|
||||
PermissionTypeVideoCapture PermissionType = "videoCapture"
|
||||
PermissionTypeVideoCapturePanTiltZoom PermissionType = "videoCapturePanTiltZoom"
|
||||
PermissionTypeIdleDetection PermissionType = "idleDetection"
|
||||
PermissionTypeWakeLockScreen PermissionType = "wakeLockScreen"
|
||||
PermissionTypeWakeLockSystem PermissionType = "wakeLockSystem"
|
||||
PermissionTypeWindowManagement PermissionType = "windowManagement"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -130,7 +135,8 @@ func (t PermissionType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionType(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionType(v) {
|
||||
case PermissionTypeAccessibilityEvents:
|
||||
*t = PermissionTypeAccessibilityEvents
|
||||
case PermissionTypeAudioCapture:
|
||||
@@ -151,6 +157,10 @@ func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionTypeFlash
|
||||
case PermissionTypeGeolocation:
|
||||
*t = PermissionTypeGeolocation
|
||||
case PermissionTypeIdleDetection:
|
||||
*t = PermissionTypeIdleDetection
|
||||
case PermissionTypeLocalFonts:
|
||||
*t = PermissionTypeLocalFonts
|
||||
case PermissionTypeMidi:
|
||||
*t = PermissionTypeMidi
|
||||
case PermissionTypeMidiSysex:
|
||||
@@ -167,19 +177,23 @@ func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionTypeProtectedMediaIdentifier
|
||||
case PermissionTypeSensors:
|
||||
*t = PermissionTypeSensors
|
||||
case PermissionTypeStorageAccess:
|
||||
*t = PermissionTypeStorageAccess
|
||||
case PermissionTypeTopLevelStorageAccess:
|
||||
*t = PermissionTypeTopLevelStorageAccess
|
||||
case PermissionTypeVideoCapture:
|
||||
*t = PermissionTypeVideoCapture
|
||||
case PermissionTypeVideoCapturePanTiltZoom:
|
||||
*t = PermissionTypeVideoCapturePanTiltZoom
|
||||
case PermissionTypeIdleDetection:
|
||||
*t = PermissionTypeIdleDetection
|
||||
case PermissionTypeWakeLockScreen:
|
||||
*t = PermissionTypeWakeLockScreen
|
||||
case PermissionTypeWakeLockSystem:
|
||||
*t = PermissionTypeWakeLockSystem
|
||||
case PermissionTypeWindowManagement:
|
||||
*t = PermissionTypeWindowManagement
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionType value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +231,8 @@ func (t PermissionSetting) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionSetting) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionSetting(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionSetting(v) {
|
||||
case PermissionSettingGranted:
|
||||
*t = PermissionSettingGranted
|
||||
case PermissionSettingDenied:
|
||||
@@ -226,7 +241,7 @@ func (t *PermissionSetting) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionSettingPrompt
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionSetting value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionSetting value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,14 +291,15 @@ func (t CommandID) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CommandID) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CommandID(in.String()) {
|
||||
v := in.String()
|
||||
switch CommandID(v) {
|
||||
case CommandIDOpenTabSearch:
|
||||
*t = CommandIDOpenTabSearch
|
||||
case CommandIDCloseTabSearch:
|
||||
*t = CommandIDCloseTabSearch
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CommandID value"))
|
||||
in.AddError(fmt.Errorf("unknown CommandID value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +356,8 @@ func (t DownloadProgressState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DownloadProgressState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DownloadProgressState(in.String()) {
|
||||
v := in.String()
|
||||
switch DownloadProgressState(v) {
|
||||
case DownloadProgressStateInProgress:
|
||||
*t = DownloadProgressStateInProgress
|
||||
case DownloadProgressStateCompleted:
|
||||
@@ -349,7 +366,7 @@ func (t *DownloadProgressState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DownloadProgressStateCanceled
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DownloadProgressState value"))
|
||||
in.AddError(fmt.Errorf("unknown DownloadProgressState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +408,8 @@ func (t SetDownloadBehaviorBehavior) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetDownloadBehaviorBehavior(in.String()) {
|
||||
v := in.String()
|
||||
switch SetDownloadBehaviorBehavior(v) {
|
||||
case SetDownloadBehaviorBehaviorDeny:
|
||||
*t = SetDownloadBehaviorBehaviorDeny
|
||||
case SetDownloadBehaviorBehaviorAllow:
|
||||
@@ -402,7 +420,7 @@ func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetDownloadBehaviorBehaviorDefault
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetDownloadBehaviorBehavior value"))
|
||||
in.AddError(fmt.Errorf("unknown SetDownloadBehaviorBehavior value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-7
@@ -63,7 +63,8 @@ func (p *DeleteEntryParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// RequestCacheNamesParams requests cache names.
|
||||
type RequestCacheNamesParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
}
|
||||
|
||||
// RequestCacheNames requests cache names.
|
||||
@@ -71,12 +72,21 @@ type RequestCacheNamesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// securityOrigin - Security origin.
|
||||
func RequestCacheNames(securityOrigin string) *RequestCacheNamesParams {
|
||||
return &RequestCacheNamesParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
}
|
||||
func RequestCacheNames() *RequestCacheNamesParams {
|
||||
return &RequestCacheNamesParams{}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p RequestCacheNamesParams) WithSecurityOrigin(securityOrigin string) *RequestCacheNamesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p RequestCacheNamesParams) WithStorageKey(storageKey string) *RequestCacheNamesParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestCacheNamesReturns return values.
|
||||
|
||||
+21
-1
@@ -554,6 +554,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(in *jlexer.Lexe
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -568,11 +570,22 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(out *jwriter.Wr
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -1103,6 +1116,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(in *jlexer.Lex
|
||||
out.CacheID = CacheID(in.String())
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "cacheName":
|
||||
out.CacheName = string(in.String())
|
||||
default:
|
||||
@@ -1129,6 +1144,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(out *jwriter.W
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"storageKey\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"cacheName\":"
|
||||
out.RawString(prefix)
|
||||
|
||||
+5
-3
@@ -3,7 +3,7 @@ package cachestorage
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -52,7 +52,8 @@ func (t CachedResponseType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CachedResponseType(in.String()) {
|
||||
v := in.String()
|
||||
switch CachedResponseType(v) {
|
||||
case CachedResponseTypeBasic:
|
||||
*t = CachedResponseTypeBasic
|
||||
case CachedResponseTypeCors:
|
||||
@@ -67,7 +68,7 @@ func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CachedResponseTypeOpaqueRedirect
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CachedResponseType value"))
|
||||
in.AddError(fmt.Errorf("unknown CachedResponseType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +97,7 @@ type DataEntry struct {
|
||||
type Cache struct {
|
||||
CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
|
||||
StorageKey string `json:"storageKey"` // Storage key of the cache.
|
||||
CacheName string `json:"cacheName"` // The name of the cache.
|
||||
}
|
||||
|
||||
|
||||
+71
-60
@@ -4,7 +4,6 @@ package cdp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -167,31 +166,31 @@ func (t PseudoType) String() string {
|
||||
|
||||
// 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"
|
||||
PseudoTypeHighlight PseudoType = "highlight"
|
||||
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"
|
||||
PseudoTypePageTransition PseudoType = "page-transition"
|
||||
PseudoTypePageTransitionContainer PseudoType = "page-transition-container"
|
||||
PseudoTypePageTransitionImageWrapper PseudoType = "page-transition-image-wrapper"
|
||||
PseudoTypePageTransitionOutgoingImage PseudoType = "page-transition-outgoing-image"
|
||||
PseudoTypePageTransitionIncomingImage PseudoType = "page-transition-incoming-image"
|
||||
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"
|
||||
PseudoTypeHighlight PseudoType = "highlight"
|
||||
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"
|
||||
PseudoTypeViewTransition PseudoType = "view-transition"
|
||||
PseudoTypeViewTransitionGroup PseudoType = "view-transition-group"
|
||||
PseudoTypeViewTransitionImagePair PseudoType = "view-transition-image-pair"
|
||||
PseudoTypeViewTransitionOld PseudoType = "view-transition-old"
|
||||
PseudoTypeViewTransitionNew PseudoType = "view-transition-new"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -206,7 +205,8 @@ func (t PseudoType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PseudoType(in.String()) {
|
||||
v := in.String()
|
||||
switch PseudoType(v) {
|
||||
case PseudoTypeFirstLine:
|
||||
*t = PseudoTypeFirstLine
|
||||
case PseudoTypeFirstLetter:
|
||||
@@ -247,19 +247,19 @@ func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PseudoTypeResizer
|
||||
case PseudoTypeInputListButton:
|
||||
*t = PseudoTypeInputListButton
|
||||
case PseudoTypePageTransition:
|
||||
*t = PseudoTypePageTransition
|
||||
case PseudoTypePageTransitionContainer:
|
||||
*t = PseudoTypePageTransitionContainer
|
||||
case PseudoTypePageTransitionImageWrapper:
|
||||
*t = PseudoTypePageTransitionImageWrapper
|
||||
case PseudoTypePageTransitionOutgoingImage:
|
||||
*t = PseudoTypePageTransitionOutgoingImage
|
||||
case PseudoTypePageTransitionIncomingImage:
|
||||
*t = PseudoTypePageTransitionIncomingImage
|
||||
case PseudoTypeViewTransition:
|
||||
*t = PseudoTypeViewTransition
|
||||
case PseudoTypeViewTransitionGroup:
|
||||
*t = PseudoTypeViewTransitionGroup
|
||||
case PseudoTypeViewTransitionImagePair:
|
||||
*t = PseudoTypeViewTransitionImagePair
|
||||
case PseudoTypeViewTransitionOld:
|
||||
*t = PseudoTypeViewTransitionOld
|
||||
case PseudoTypeViewTransitionNew:
|
||||
*t = PseudoTypeViewTransitionNew
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PseudoType value"))
|
||||
in.AddError(fmt.Errorf("unknown PseudoType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,8 @@ func (t ShadowRootType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ShadowRootType(in.String()) {
|
||||
v := in.String()
|
||||
switch ShadowRootType(v) {
|
||||
case ShadowRootTypeUserAgent:
|
||||
*t = ShadowRootTypeUserAgent
|
||||
case ShadowRootTypeOpen:
|
||||
@@ -306,7 +307,7 @@ func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ShadowRootTypeClosed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ShadowRootType value"))
|
||||
in.AddError(fmt.Errorf("unknown ShadowRootType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +345,8 @@ func (t CompatibilityMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CompatibilityMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CompatibilityMode(in.String()) {
|
||||
v := in.String()
|
||||
switch CompatibilityMode(v) {
|
||||
case CompatibilityModeQuirksMode:
|
||||
*t = CompatibilityModeQuirksMode
|
||||
case CompatibilityModeLimitedQuirksMode:
|
||||
@@ -353,7 +355,7 @@ func (t *CompatibilityMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CompatibilityModeNoQuirksMode
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CompatibilityMode value"))
|
||||
in.AddError(fmt.Errorf("unknown CompatibilityMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -665,7 +667,8 @@ func (t NodeType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch NodeType(in.Int64()) {
|
||||
v := in.Int64()
|
||||
switch NodeType(v) {
|
||||
case NodeTypeElement:
|
||||
*t = NodeTypeElement
|
||||
case NodeTypeAttribute:
|
||||
@@ -692,7 +695,7 @@ func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = NodeTypeNotation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown NodeType value"))
|
||||
in.AddError(fmt.Errorf("unknown NodeType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,7 +844,8 @@ func (t AdFrameType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AdFrameType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AdFrameType(in.String()) {
|
||||
v := in.String()
|
||||
switch AdFrameType(v) {
|
||||
case AdFrameTypeNone:
|
||||
*t = AdFrameTypeNone
|
||||
case AdFrameTypeChild:
|
||||
@@ -850,7 +854,7 @@ func (t *AdFrameType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AdFrameTypeRoot
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AdFrameType value"))
|
||||
in.AddError(fmt.Errorf("unknown AdFrameType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -888,7 +892,8 @@ func (t AdFrameExplanation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AdFrameExplanation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AdFrameExplanation(in.String()) {
|
||||
v := in.String()
|
||||
switch AdFrameExplanation(v) {
|
||||
case AdFrameExplanationParentIsAd:
|
||||
*t = AdFrameExplanationParentIsAd
|
||||
case AdFrameExplanationCreatedByAdScript:
|
||||
@@ -897,7 +902,7 @@ func (t *AdFrameExplanation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AdFrameExplanationMatchedBlockingRule
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AdFrameExplanation value"))
|
||||
in.AddError(fmt.Errorf("unknown AdFrameExplanation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -946,7 +951,8 @@ func (t SecureContextType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SecureContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SecureContextType(in.String()) {
|
||||
v := in.String()
|
||||
switch SecureContextType(v) {
|
||||
case SecureContextTypeSecure:
|
||||
*t = SecureContextTypeSecure
|
||||
case SecureContextTypeSecureLocalhost:
|
||||
@@ -957,7 +963,7 @@ func (t *SecureContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SecureContextTypeInsecureAncestor
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SecureContextType value"))
|
||||
in.AddError(fmt.Errorf("unknown SecureContextType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -996,7 +1002,8 @@ func (t CrossOriginIsolatedContextType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginIsolatedContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginIsolatedContextType(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginIsolatedContextType(v) {
|
||||
case CrossOriginIsolatedContextTypeIsolated:
|
||||
*t = CrossOriginIsolatedContextTypeIsolated
|
||||
case CrossOriginIsolatedContextTypeNotIsolated:
|
||||
@@ -1005,7 +1012,7 @@ func (t *CrossOriginIsolatedContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginIsolatedContextType value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginIsolatedContextType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1044,7 +1051,8 @@ func (t GatedAPIFeatures) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GatedAPIFeatures) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GatedAPIFeatures(in.String()) {
|
||||
v := in.String()
|
||||
switch GatedAPIFeatures(v) {
|
||||
case GatedAPIFeaturesSharedArrayBuffers:
|
||||
*t = GatedAPIFeaturesSharedArrayBuffers
|
||||
case GatedAPIFeaturesSharedArrayBuffersTransferAllowed:
|
||||
@@ -1055,7 +1063,7 @@ func (t *GatedAPIFeatures) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GatedAPIFeaturesPerformanceProfile
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GatedAPIFeatures value"))
|
||||
in.AddError(fmt.Errorf("unknown GatedAPIFeatures value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1104,7 +1112,8 @@ func (t OriginTrialTokenStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialTokenStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialTokenStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialTokenStatus(v) {
|
||||
case OriginTrialTokenStatusSuccess:
|
||||
*t = OriginTrialTokenStatusSuccess
|
||||
case OriginTrialTokenStatusNotSupported:
|
||||
@@ -1131,7 +1140,7 @@ func (t *OriginTrialTokenStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OriginTrialTokenStatusUnknownTrial
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialTokenStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialTokenStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,7 +1179,8 @@ func (t OriginTrialStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialStatus(v) {
|
||||
case OriginTrialStatusEnabled:
|
||||
*t = OriginTrialStatusEnabled
|
||||
case OriginTrialStatusValidTokenNotProvided:
|
||||
@@ -1181,7 +1191,7 @@ func (t *OriginTrialStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OriginTrialStatusTrialNotAllowed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1218,14 +1228,15 @@ func (t OriginTrialUsageRestriction) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialUsageRestriction) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialUsageRestriction(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialUsageRestriction(v) {
|
||||
case OriginTrialUsageRestrictionNone:
|
||||
*t = OriginTrialUsageRestrictionNone
|
||||
case OriginTrialUsageRestrictionSubset:
|
||||
*t = OriginTrialUsageRestrictionSubset
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialUsageRestriction value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialUsageRestriction value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+60
-28
@@ -343,8 +343,6 @@ const (
|
||||
EventFetchRequestPaused = "Fetch.requestPaused"
|
||||
EventFetchAuthRequired = "Fetch.authRequired"
|
||||
CommandHeadlessExperimentalBeginFrame = headlessexperimental.CommandBeginFrame
|
||||
CommandHeadlessExperimentalDisable = headlessexperimental.CommandDisable
|
||||
CommandHeadlessExperimentalEnable = headlessexperimental.CommandEnable
|
||||
CommandHeapProfilerAddInspectedHeapObject = heapprofiler.CommandAddInspectedHeapObject
|
||||
CommandHeapProfilerCollectGarbage = heapprofiler.CommandCollectGarbage
|
||||
CommandHeapProfilerDisable = heapprofiler.CommandDisable
|
||||
@@ -434,7 +432,6 @@ const (
|
||||
CommandNetworkDisable = network.CommandDisable
|
||||
CommandNetworkEmulateNetworkConditions = network.CommandEmulateNetworkConditions
|
||||
CommandNetworkEnable = network.CommandEnable
|
||||
CommandNetworkGetAllCookies = network.CommandGetAllCookies
|
||||
CommandNetworkGetCertificate = network.CommandGetCertificate
|
||||
CommandNetworkGetCookies = network.CommandGetCookies
|
||||
CommandNetworkGetResponseBody = network.CommandGetResponseBody
|
||||
@@ -523,6 +520,7 @@ const (
|
||||
CommandPageGetInstallabilityErrors = page.CommandGetInstallabilityErrors
|
||||
CommandPageGetManifestIcons = page.CommandGetManifestIcons
|
||||
CommandPageGetAppID = page.CommandGetAppID
|
||||
CommandPageGetAdScriptID = page.CommandGetAdScriptID
|
||||
CommandPageGetFrameTree = page.CommandGetFrameTree
|
||||
CommandPageGetLayoutMetrics = page.CommandGetLayoutMetrics
|
||||
CommandPageGetNavigationHistory = page.CommandGetNavigationHistory
|
||||
@@ -544,7 +542,6 @@ const (
|
||||
CommandPageSetFontFamilies = page.CommandSetFontFamilies
|
||||
CommandPageSetFontSizes = page.CommandSetFontSizes
|
||||
CommandPageSetDocumentContent = page.CommandSetDocumentContent
|
||||
CommandPageSetDownloadBehavior = page.CommandSetDownloadBehavior
|
||||
CommandPageSetLifecycleEventsEnabled = page.CommandSetLifecycleEventsEnabled
|
||||
CommandPageStartScreencast = page.CommandStartScreencast
|
||||
CommandPageStopLoading = page.CommandStopLoading
|
||||
@@ -594,12 +591,9 @@ const (
|
||||
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
|
||||
EventProfilerConsoleProfileFinished = "Profiler.consoleProfileFinished"
|
||||
EventProfilerConsoleProfileStarted = "Profiler.consoleProfileStarted"
|
||||
EventProfilerPreciseCoverageDeltaUpdate = "Profiler.preciseCoverageDeltaUpdate"
|
||||
@@ -662,21 +656,32 @@ const (
|
||||
CommandStorageGetUsageAndQuota = storage.CommandGetUsageAndQuota
|
||||
CommandStorageOverrideQuotaForOrigin = storage.CommandOverrideQuotaForOrigin
|
||||
CommandStorageTrackCacheStorageForOrigin = storage.CommandTrackCacheStorageForOrigin
|
||||
CommandStorageTrackCacheStorageForStorageKey = storage.CommandTrackCacheStorageForStorageKey
|
||||
CommandStorageTrackIndexedDBForOrigin = storage.CommandTrackIndexedDBForOrigin
|
||||
CommandStorageTrackIndexedDBForStorageKey = storage.CommandTrackIndexedDBForStorageKey
|
||||
CommandStorageUntrackCacheStorageForOrigin = storage.CommandUntrackCacheStorageForOrigin
|
||||
CommandStorageUntrackCacheStorageForStorageKey = storage.CommandUntrackCacheStorageForStorageKey
|
||||
CommandStorageUntrackIndexedDBForOrigin = storage.CommandUntrackIndexedDBForOrigin
|
||||
CommandStorageUntrackIndexedDBForStorageKey = storage.CommandUntrackIndexedDBForStorageKey
|
||||
CommandStorageGetTrustTokens = storage.CommandGetTrustTokens
|
||||
CommandStorageClearTrustTokens = storage.CommandClearTrustTokens
|
||||
CommandStorageGetInterestGroupDetails = storage.CommandGetInterestGroupDetails
|
||||
CommandStorageSetInterestGroupTracking = storage.CommandSetInterestGroupTracking
|
||||
CommandStorageGetSharedStorageMetadata = storage.CommandGetSharedStorageMetadata
|
||||
CommandStorageGetSharedStorageEntries = storage.CommandGetSharedStorageEntries
|
||||
CommandStorageSetSharedStorageEntry = storage.CommandSetSharedStorageEntry
|
||||
CommandStorageDeleteSharedStorageEntry = storage.CommandDeleteSharedStorageEntry
|
||||
CommandStorageClearSharedStorageEntries = storage.CommandClearSharedStorageEntries
|
||||
CommandStorageResetSharedStorageBudget = storage.CommandResetSharedStorageBudget
|
||||
CommandStorageSetSharedStorageTracking = storage.CommandSetSharedStorageTracking
|
||||
EventStorageCacheStorageContentUpdated = "Storage.cacheStorageContentUpdated"
|
||||
EventStorageCacheStorageListUpdated = "Storage.cacheStorageListUpdated"
|
||||
EventStorageIndexedDBContentUpdated = "Storage.indexedDBContentUpdated"
|
||||
EventStorageIndexedDBListUpdated = "Storage.indexedDBListUpdated"
|
||||
EventStorageInterestGroupAccessed = "Storage.interestGroupAccessed"
|
||||
EventStorageSharedStorageAccessed = "Storage.sharedStorageAccessed"
|
||||
CommandSystemInfoGetInfo = systeminfo.CommandGetInfo
|
||||
CommandSystemInfoGetFeatureState = systeminfo.CommandGetFeatureState
|
||||
CommandSystemInfoGetProcessInfo = systeminfo.CommandGetProcessInfo
|
||||
CommandTargetActivateTarget = target.CommandActivateTarget
|
||||
CommandTargetAttachToTarget = target.CommandAttachToTarget
|
||||
@@ -731,6 +736,7 @@ const (
|
||||
CommandWebAuthnEnable = webauthn.CommandEnable
|
||||
CommandWebAuthnDisable = webauthn.CommandDisable
|
||||
CommandWebAuthnAddVirtualAuthenticator = webauthn.CommandAddVirtualAuthenticator
|
||||
CommandWebAuthnSetResponseOverrideBits = webauthn.CommandSetResponseOverrideBits
|
||||
CommandWebAuthnRemoveVirtualAuthenticator = webauthn.CommandRemoveVirtualAuthenticator
|
||||
CommandWebAuthnAddCredential = webauthn.CommandAddCredential
|
||||
CommandWebAuthnGetCredential = webauthn.CommandGetCredential
|
||||
@@ -739,6 +745,8 @@ const (
|
||||
CommandWebAuthnClearCredentials = webauthn.CommandClearCredentials
|
||||
CommandWebAuthnSetUserVerified = webauthn.CommandSetUserVerified
|
||||
CommandWebAuthnSetAutomaticPresenceSimulation = webauthn.CommandSetAutomaticPresenceSimulation
|
||||
EventWebAuthnCredentialAdded = "WebAuthn.credentialAdded"
|
||||
EventWebAuthnCredentialAsserted = "WebAuthn.credentialAsserted"
|
||||
)
|
||||
|
||||
// Error error type.
|
||||
@@ -1572,12 +1580,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandHeadlessExperimentalBeginFrame:
|
||||
v = new(headlessexperimental.BeginFrameReturns)
|
||||
|
||||
case CommandHeadlessExperimentalDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandHeadlessExperimentalEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandHeapProfilerAddInspectedHeapObject:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1845,9 +1847,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandNetworkEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandNetworkGetAllCookies:
|
||||
v = new(network.GetAllCookiesReturns)
|
||||
|
||||
case CommandNetworkGetCertificate:
|
||||
v = new(network.GetCertificateReturns)
|
||||
|
||||
@@ -2112,6 +2111,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageGetAppID:
|
||||
v = new(page.GetAppIDReturns)
|
||||
|
||||
case CommandPageGetAdScriptID:
|
||||
v = new(page.GetAdScriptIDReturns)
|
||||
|
||||
case CommandPageGetFrameTree:
|
||||
v = new(page.GetFrameTreeReturns)
|
||||
|
||||
@@ -2175,9 +2177,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageSetDocumentContent:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetDownloadBehavior:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetLifecycleEventsEnabled:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2325,24 +2324,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
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 EventProfilerConsoleProfileFinished:
|
||||
v = new(profiler.EventConsoleProfileFinished)
|
||||
|
||||
@@ -2529,6 +2519,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandStorageTrackCacheStorageForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageTrackCacheStorageForStorageKey:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageTrackIndexedDBForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2538,6 +2531,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandStorageUntrackCacheStorageForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageUntrackCacheStorageForStorageKey:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageUntrackIndexedDBForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2556,6 +2552,27 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandStorageSetInterestGroupTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageGetSharedStorageMetadata:
|
||||
v = new(storage.GetSharedStorageMetadataReturns)
|
||||
|
||||
case CommandStorageGetSharedStorageEntries:
|
||||
v = new(storage.GetSharedStorageEntriesReturns)
|
||||
|
||||
case CommandStorageSetSharedStorageEntry:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageDeleteSharedStorageEntry:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageClearSharedStorageEntries:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageResetSharedStorageBudget:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageSetSharedStorageTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventStorageCacheStorageContentUpdated:
|
||||
v = new(storage.EventCacheStorageContentUpdated)
|
||||
|
||||
@@ -2571,9 +2588,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventStorageInterestGroupAccessed:
|
||||
v = new(storage.EventInterestGroupAccessed)
|
||||
|
||||
case EventStorageSharedStorageAccessed:
|
||||
v = new(storage.EventSharedStorageAccessed)
|
||||
|
||||
case CommandSystemInfoGetInfo:
|
||||
v = new(systeminfo.GetInfoReturns)
|
||||
|
||||
case CommandSystemInfoGetFeatureState:
|
||||
v = new(systeminfo.GetFeatureStateReturns)
|
||||
|
||||
case CommandSystemInfoGetProcessInfo:
|
||||
v = new(systeminfo.GetProcessInfoReturns)
|
||||
|
||||
@@ -2736,6 +2759,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandWebAuthnAddVirtualAuthenticator:
|
||||
v = new(webauthn.AddVirtualAuthenticatorReturns)
|
||||
|
||||
case CommandWebAuthnSetResponseOverrideBits:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandWebAuthnRemoveVirtualAuthenticator:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2760,6 +2786,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandWebAuthnSetAutomaticPresenceSimulation:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventWebAuthnCredentialAdded:
|
||||
v = new(webauthn.EventCredentialAdded)
|
||||
|
||||
case EventWebAuthnCredentialAsserted:
|
||||
v = new(webauthn.EventCredentialAsserted)
|
||||
|
||||
default:
|
||||
return nil, cdp.ErrUnknownCommandOrEvent(msg.Method)
|
||||
}
|
||||
|
||||
+14
@@ -7804,6 +7804,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCss78(in *jlexer.Lexer, out *
|
||||
out.StyleSheetID = StyleSheetID(in.String())
|
||||
case "name":
|
||||
out.Name = string(in.String())
|
||||
case "physicalAxes":
|
||||
(out.PhysicalAxes).UnmarshalEasyJSON(in)
|
||||
case "logicalAxes":
|
||||
(out.LogicalAxes).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -7838,6 +7842,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCss78(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Name))
|
||||
}
|
||||
if in.PhysicalAxes != "" {
|
||||
const prefix string = ",\"physicalAxes\":"
|
||||
out.RawString(prefix)
|
||||
(in.PhysicalAxes).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.LogicalAxes != "" {
|
||||
const prefix string = ",\"logicalAxes\":"
|
||||
out.RawString(prefix)
|
||||
(in.LogicalAxes).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+14
-9
@@ -3,9 +3,10 @@ package css
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
@@ -54,7 +55,8 @@ func (t StyleSheetOrigin) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *StyleSheetOrigin) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch StyleSheetOrigin(in.String()) {
|
||||
v := in.String()
|
||||
switch StyleSheetOrigin(v) {
|
||||
case StyleSheetOriginInjected:
|
||||
*t = StyleSheetOriginInjected
|
||||
case StyleSheetOriginUserAgent:
|
||||
@@ -65,7 +67,7 @@ func (t *StyleSheetOrigin) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = StyleSheetOriginRegular
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown StyleSheetOrigin value"))
|
||||
in.AddError(fmt.Errorf("unknown StyleSheetOrigin value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,10 +262,12 @@ type MediaQueryExpression struct {
|
||||
//
|
||||
// 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).
|
||||
Name string `json:"name,omitempty"` // Optional name for the container.
|
||||
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).
|
||||
Name string `json:"name,omitempty"` // Optional name for the container.
|
||||
PhysicalAxes dom.PhysicalAxes `json:"physicalAxes,omitempty"` // Optional physical axes queried for the container.
|
||||
LogicalAxes dom.LogicalAxes `json:"logicalAxes,omitempty"` // Optional logical axes queried for the container.
|
||||
}
|
||||
|
||||
// Supports CSS Supports at-rule descriptor.
|
||||
@@ -405,7 +409,8 @@ func (t MediaSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MediaSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MediaSource(in.String()) {
|
||||
v := in.String()
|
||||
switch MediaSource(v) {
|
||||
case MediaSourceMediaRule:
|
||||
*t = MediaSourceMediaRule
|
||||
case MediaSourceImportRule:
|
||||
@@ -416,7 +421,7 @@ func (t *MediaSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MediaSourceInlineSheet
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MediaSource value"))
|
||||
in.AddError(fmt.Errorf("unknown MediaSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -953,15 +953,15 @@ func (p *SetBreakpointsActiveParams) Do(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
// 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.
|
||||
// to stop on all exceptions, uncaught exceptions, or caught exceptions, 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.
|
||||
// on all exceptions, uncaught exceptions, or caught exceptions, no exceptions.
|
||||
// Initial pause on exceptions state is none.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setPauseOnExceptions
|
||||
//
|
||||
|
||||
+34
-21
@@ -3,7 +3,7 @@ package debugger
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -136,14 +136,15 @@ func (t ScriptLanguage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScriptLanguage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScriptLanguage(in.String()) {
|
||||
v := in.String()
|
||||
switch ScriptLanguage(v) {
|
||||
case ScriptLanguageJavaScript:
|
||||
*t = ScriptLanguageJavaScript
|
||||
case ScriptLanguageWebAssembly:
|
||||
*t = ScriptLanguageWebAssembly
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScriptLanguage value"))
|
||||
in.AddError(fmt.Errorf("unknown ScriptLanguage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +197,8 @@ func (t ScopeType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScopeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScopeType(in.String()) {
|
||||
v := in.String()
|
||||
switch ScopeType(v) {
|
||||
case ScopeTypeGlobal:
|
||||
*t = ScopeTypeGlobal
|
||||
case ScopeTypeLocal:
|
||||
@@ -219,7 +221,7 @@ func (t *ScopeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ScopeTypeWasmExpressionStack
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScopeType value"))
|
||||
in.AddError(fmt.Errorf("unknown ScopeType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +259,8 @@ func (t BreakLocationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BreakLocationType(in.String()) {
|
||||
v := in.String()
|
||||
switch BreakLocationType(v) {
|
||||
case BreakLocationTypeDebuggerStatement:
|
||||
*t = BreakLocationTypeDebuggerStatement
|
||||
case BreakLocationTypeCall:
|
||||
@@ -266,7 +269,7 @@ func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BreakLocationTypeReturn
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BreakLocationType value"))
|
||||
in.AddError(fmt.Errorf("unknown BreakLocationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +308,8 @@ func (t DebugSymbolsType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DebugSymbolsType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DebugSymbolsType(in.String()) {
|
||||
v := in.String()
|
||||
switch DebugSymbolsType(v) {
|
||||
case DebugSymbolsTypeNone:
|
||||
*t = DebugSymbolsTypeNone
|
||||
case DebugSymbolsTypeSourceMap:
|
||||
@@ -316,7 +320,7 @@ func (t *DebugSymbolsType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DebugSymbolsTypeExternalDWARF
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DebugSymbolsType value"))
|
||||
in.AddError(fmt.Errorf("unknown DebugSymbolsType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +367,8 @@ func (t PausedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PausedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch PausedReason(v) {
|
||||
case PausedReasonAmbiguous:
|
||||
*t = PausedReasonAmbiguous
|
||||
case PausedReasonAssert:
|
||||
@@ -390,7 +395,7 @@ func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PausedReasonXHR
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PausedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown PausedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,14 +432,15 @@ func (t ContinueToLocationTargetCallFrames) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContinueToLocationTargetCallFrames) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContinueToLocationTargetCallFrames(in.String()) {
|
||||
v := in.String()
|
||||
switch ContinueToLocationTargetCallFrames(v) {
|
||||
case ContinueToLocationTargetCallFramesAny:
|
||||
*t = ContinueToLocationTargetCallFramesAny
|
||||
case ContinueToLocationTargetCallFramesCurrent:
|
||||
*t = ContinueToLocationTargetCallFramesCurrent
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContinueToLocationTargetCallFrames value"))
|
||||
in.AddError(fmt.Errorf("unknown ContinueToLocationTargetCallFrames value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,12 +477,13 @@ func (t RestartFrameMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RestartFrameMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch RestartFrameMode(in.String()) {
|
||||
v := in.String()
|
||||
switch RestartFrameMode(v) {
|
||||
case RestartFrameModeStepInto:
|
||||
*t = RestartFrameModeStepInto
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown RestartFrameMode value"))
|
||||
in.AddError(fmt.Errorf("unknown RestartFrameMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -513,14 +520,15 @@ func (t SetInstrumentationBreakpointInstrumentation) MarshalJSON() ([]byte, erro
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetInstrumentationBreakpointInstrumentation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetInstrumentationBreakpointInstrumentation(in.String()) {
|
||||
v := in.String()
|
||||
switch SetInstrumentationBreakpointInstrumentation(v) {
|
||||
case SetInstrumentationBreakpointInstrumentationBeforeScriptExecution:
|
||||
*t = SetInstrumentationBreakpointInstrumentationBeforeScriptExecution
|
||||
case SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution:
|
||||
*t = SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetInstrumentationBreakpointInstrumentation value"))
|
||||
in.AddError(fmt.Errorf("unknown SetInstrumentationBreakpointInstrumentation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,6 +550,7 @@ func (t ExceptionsState) String() string {
|
||||
// ExceptionsState values.
|
||||
const (
|
||||
ExceptionsStateNone ExceptionsState = "none"
|
||||
ExceptionsStateCaught ExceptionsState = "caught"
|
||||
ExceptionsStateUncaught ExceptionsState = "uncaught"
|
||||
ExceptionsStateAll ExceptionsState = "all"
|
||||
)
|
||||
@@ -558,16 +567,19 @@ func (t ExceptionsState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ExceptionsState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ExceptionsState(in.String()) {
|
||||
v := in.String()
|
||||
switch ExceptionsState(v) {
|
||||
case ExceptionsStateNone:
|
||||
*t = ExceptionsStateNone
|
||||
case ExceptionsStateCaught:
|
||||
*t = ExceptionsStateCaught
|
||||
case ExceptionsStateUncaught:
|
||||
*t = ExceptionsStateUncaught
|
||||
case ExceptionsStateAll:
|
||||
*t = ExceptionsStateAll
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ExceptionsState value"))
|
||||
in.AddError(fmt.Errorf("unknown ExceptionsState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,7 +620,8 @@ func (t SetScriptSourceStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetScriptSourceStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetScriptSourceStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch SetScriptSourceStatus(v) {
|
||||
case SetScriptSourceStatusOk:
|
||||
*t = SetScriptSourceStatusOk
|
||||
case SetScriptSourceStatusCompileError:
|
||||
@@ -619,7 +632,7 @@ func (t *SetScriptSourceStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetScriptSourceStatusBlockedByActiveFunction
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetScriptSourceStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown SetScriptSourceStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+24
-10
@@ -1746,19 +1746,21 @@ func (p *GetFrameOwnerParams) Do(ctx context.Context) (backendNodeID cdp.Backend
|
||||
return res.BackendNodeID, res.NodeID, nil
|
||||
}
|
||||
|
||||
// GetContainerForNodeParams returns the container of the given node based on
|
||||
// container query conditions. If containerName is given, it will find the
|
||||
// nearest container with a matching name; otherwise it will find the nearest
|
||||
// container regardless of its container name.
|
||||
// GetContainerForNodeParams returns the query container of the given node
|
||||
// based on container query conditions: containerName, physical, and logical
|
||||
// axes. If no axes are provided, the style container is returned, which is the
|
||||
// direct parent or the closest element with a matching container-name.
|
||||
type GetContainerForNodeParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"`
|
||||
ContainerName string `json:"containerName,omitempty"`
|
||||
NodeID cdp.NodeID `json:"nodeId"`
|
||||
ContainerName string `json:"containerName,omitempty"`
|
||||
PhysicalAxes PhysicalAxes `json:"physicalAxes,omitempty"`
|
||||
LogicalAxes LogicalAxes `json:"logicalAxes,omitempty"`
|
||||
}
|
||||
|
||||
// GetContainerForNode returns the container of the given node based on
|
||||
// container query conditions. If containerName is given, it will find the
|
||||
// nearest container with a matching name; otherwise it will find the nearest
|
||||
// container regardless of its container name.
|
||||
// GetContainerForNode returns the query container of the given node based on
|
||||
// container query conditions: containerName, physical, and logical axes. If no
|
||||
// axes are provided, the style container is returned, which is the direct
|
||||
// parent or the closest element with a matching container-name.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContainerForNode
|
||||
//
|
||||
@@ -1777,6 +1779,18 @@ func (p GetContainerForNodeParams) WithContainerName(containerName string) *GetC
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithPhysicalAxes [no description].
|
||||
func (p GetContainerForNodeParams) WithPhysicalAxes(physicalAxes PhysicalAxes) *GetContainerForNodeParams {
|
||||
p.PhysicalAxes = physicalAxes
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithLogicalAxes [no description].
|
||||
func (p GetContainerForNodeParams) WithLogicalAxes(logicalAxes LogicalAxes) *GetContainerForNodeParams {
|
||||
p.LogicalAxes = logicalAxes
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetContainerForNodeReturns return values.
|
||||
type GetContainerForNodeReturns struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // The container node for the given node, or null if not found.
|
||||
|
||||
+14
@@ -4803,6 +4803,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDom59(in *jlexer.Lexer, out *
|
||||
(out.NodeID).UnmarshalEasyJSON(in)
|
||||
case "containerName":
|
||||
out.ContainerName = string(in.String())
|
||||
case "physicalAxes":
|
||||
(out.PhysicalAxes).UnmarshalEasyJSON(in)
|
||||
case "logicalAxes":
|
||||
(out.LogicalAxes).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -4827,6 +4831,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDom59(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ContainerName))
|
||||
}
|
||||
if in.PhysicalAxes != "" {
|
||||
const prefix string = ",\"physicalAxes\":"
|
||||
out.RawString(prefix)
|
||||
(in.PhysicalAxes).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.LogicalAxes != "" {
|
||||
const prefix string = ",\"logicalAxes\":"
|
||||
out.RawString(prefix)
|
||||
(in.LogicalAxes).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+100
-3
@@ -3,13 +3,109 @@ package dom
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// PhysicalAxes containerSelector physical axes.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-PhysicalAxes
|
||||
type PhysicalAxes string
|
||||
|
||||
// String returns the PhysicalAxes as string value.
|
||||
func (t PhysicalAxes) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PhysicalAxes values.
|
||||
const (
|
||||
PhysicalAxesHorizontal PhysicalAxes = "Horizontal"
|
||||
PhysicalAxesVertical PhysicalAxes = "Vertical"
|
||||
PhysicalAxesBoth PhysicalAxes = "Both"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PhysicalAxes) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PhysicalAxes) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PhysicalAxes) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PhysicalAxes(v) {
|
||||
case PhysicalAxesHorizontal:
|
||||
*t = PhysicalAxesHorizontal
|
||||
case PhysicalAxesVertical:
|
||||
*t = PhysicalAxesVertical
|
||||
case PhysicalAxesBoth:
|
||||
*t = PhysicalAxesBoth
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PhysicalAxes value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PhysicalAxes) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// LogicalAxes containerSelector logical axes.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-LogicalAxes
|
||||
type LogicalAxes string
|
||||
|
||||
// String returns the LogicalAxes as string value.
|
||||
func (t LogicalAxes) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// LogicalAxes values.
|
||||
const (
|
||||
LogicalAxesInline LogicalAxes = "Inline"
|
||||
LogicalAxesBlock LogicalAxes = "Block"
|
||||
LogicalAxesBoth LogicalAxes = "Both"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t LogicalAxes) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t LogicalAxes) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *LogicalAxes) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch LogicalAxes(v) {
|
||||
case LogicalAxesInline:
|
||||
*t = LogicalAxesInline
|
||||
case LogicalAxesBlock:
|
||||
*t = LogicalAxesBlock
|
||||
case LogicalAxesBoth:
|
||||
*t = LogicalAxesBoth
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown LogicalAxes value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *LogicalAxes) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Quad an array of quad vertices, x immediately followed by y for each
|
||||
// point, points clock-wise.
|
||||
//
|
||||
@@ -85,14 +181,15 @@ func (t EnableIncludeWhitespace) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EnableIncludeWhitespace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch EnableIncludeWhitespace(in.String()) {
|
||||
v := in.String()
|
||||
switch EnableIncludeWhitespace(v) {
|
||||
case EnableIncludeWhitespaceNone:
|
||||
*t = EnableIncludeWhitespaceNone
|
||||
case EnableIncludeWhitespaceAll:
|
||||
*t = EnableIncludeWhitespaceAll
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown EnableIncludeWhitespace value"))
|
||||
in.AddError(fmt.Errorf("unknown EnableIncludeWhitespace value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -3,7 +3,7 @@ package domdebugger
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
@@ -41,7 +41,8 @@ func (t DOMBreakpointType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DOMBreakpointType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DOMBreakpointType(in.String()) {
|
||||
v := in.String()
|
||||
switch DOMBreakpointType(v) {
|
||||
case DOMBreakpointTypeSubtreeModified:
|
||||
*t = DOMBreakpointTypeSubtreeModified
|
||||
case DOMBreakpointTypeAttributeModified:
|
||||
@@ -50,7 +51,7 @@ func (t *DOMBreakpointType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DOMBreakpointTypeNodeRemoved
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DOMBreakpointType value"))
|
||||
in.AddError(fmt.Errorf("unknown DOMBreakpointType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,14 +88,15 @@ func (t CSPViolationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CSPViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CSPViolationType(in.String()) {
|
||||
v := in.String()
|
||||
switch CSPViolationType(v) {
|
||||
case CSPViolationTypeTrustedtypeSinkViolation:
|
||||
*t = CSPViolationTypeTrustedtypeSinkViolation
|
||||
case CSPViolationTypeTrustedtypePolicyViolation:
|
||||
*t = CSPViolationTypeTrustedtypePolicyViolation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CSPViolationType value"))
|
||||
in.AddError(fmt.Errorf("unknown CSPViolationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-16
@@ -3,7 +3,7 @@ package emulation
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -68,7 +68,8 @@ func (t VirtualTimePolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch VirtualTimePolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch VirtualTimePolicy(v) {
|
||||
case VirtualTimePolicyAdvance:
|
||||
*t = VirtualTimePolicyAdvance
|
||||
case VirtualTimePolicyPause:
|
||||
@@ -77,7 +78,7 @@ func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = VirtualTimePolicyPauseIfNetworkFetchesPending
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown VirtualTimePolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown VirtualTimePolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +126,6 @@ func (t DisabledImageType) String() string {
|
||||
// DisabledImageType values.
|
||||
const (
|
||||
DisabledImageTypeAvif DisabledImageType = "avif"
|
||||
DisabledImageTypeJxl DisabledImageType = "jxl"
|
||||
DisabledImageTypeWebp DisabledImageType = "webp"
|
||||
)
|
||||
|
||||
@@ -141,16 +141,15 @@ func (t DisabledImageType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DisabledImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DisabledImageType(in.String()) {
|
||||
v := in.String()
|
||||
switch DisabledImageType(v) {
|
||||
case DisabledImageTypeAvif:
|
||||
*t = DisabledImageTypeAvif
|
||||
case DisabledImageTypeJxl:
|
||||
*t = DisabledImageTypeJxl
|
||||
case DisabledImageTypeWebp:
|
||||
*t = DisabledImageTypeWebp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DisabledImageType value"))
|
||||
in.AddError(fmt.Errorf("unknown DisabledImageType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +188,8 @@ func (t OrientationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OrientationType(in.String()) {
|
||||
v := in.String()
|
||||
switch OrientationType(v) {
|
||||
case OrientationTypePortraitPrimary:
|
||||
*t = OrientationTypePortraitPrimary
|
||||
case OrientationTypePortraitSecondary:
|
||||
@@ -200,7 +200,7 @@ func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OrientationTypeLandscapeSecondary
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OrientationType value"))
|
||||
in.AddError(fmt.Errorf("unknown OrientationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,14 +238,15 @@ func (t DisplayFeatureOrientation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DisplayFeatureOrientation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DisplayFeatureOrientation(in.String()) {
|
||||
v := in.String()
|
||||
switch DisplayFeatureOrientation(v) {
|
||||
case DisplayFeatureOrientationVertical:
|
||||
*t = DisplayFeatureOrientationVertical
|
||||
case DisplayFeatureOrientationHorizontal:
|
||||
*t = DisplayFeatureOrientationHorizontal
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DisplayFeatureOrientation value"))
|
||||
in.AddError(fmt.Errorf("unknown DisplayFeatureOrientation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,14 +284,15 @@ func (t SetEmitTouchEventsForMouseConfiguration) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetEmitTouchEventsForMouseConfiguration(in.String()) {
|
||||
v := in.String()
|
||||
switch SetEmitTouchEventsForMouseConfiguration(v) {
|
||||
case SetEmitTouchEventsForMouseConfigurationMobile:
|
||||
*t = SetEmitTouchEventsForMouseConfigurationMobile
|
||||
case SetEmitTouchEventsForMouseConfigurationDesktop:
|
||||
*t = SetEmitTouchEventsForMouseConfigurationDesktop
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetEmitTouchEventsForMouseConfiguration value"))
|
||||
in.AddError(fmt.Errorf("unknown SetEmitTouchEventsForMouseConfiguration value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +333,8 @@ func (t SetEmulatedVisionDeficiencyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetEmulatedVisionDeficiencyType(in.String()) {
|
||||
v := in.String()
|
||||
switch SetEmulatedVisionDeficiencyType(v) {
|
||||
case SetEmulatedVisionDeficiencyTypeNone:
|
||||
*t = SetEmulatedVisionDeficiencyTypeNone
|
||||
case SetEmulatedVisionDeficiencyTypeAchromatopsia:
|
||||
@@ -346,7 +349,7 @@ func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetEmulatedVisionDeficiencyTypeTritanopia
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetEmulatedVisionDeficiencyType value"))
|
||||
in.AddError(fmt.Errorf("unknown SetEmulatedVisionDeficiencyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -750,7 +750,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(in *jlexer.Lexer, out
|
||||
in.Delim(']')
|
||||
}
|
||||
case "networkId":
|
||||
out.NetworkID = RequestID(in.String())
|
||||
out.NetworkID = network.RequestID(in.String())
|
||||
case "redirectedRequestId":
|
||||
out.RedirectedRequestID = RequestID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -827,6 +829,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(out *jwriter.Writer, i
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.NetworkID))
|
||||
}
|
||||
if in.RedirectedRequestID != "" {
|
||||
const prefix string = ",\"redirectedRequestId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.RedirectedRequestID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -24,7 +24,8 @@ type EventRequestPaused struct {
|
||||
ResponseStatusCode int64 `json:"responseStatusCode,omitempty"` // Response code if intercepted at response stage.
|
||||
ResponseStatusText string `json:"responseStatusText,omitempty"` // Response status text 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.
|
||||
NetworkID network.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.
|
||||
RedirectedRequestID RequestID `json:"redirectedRequestId,omitempty"` // If the request is due to a redirect response from the server, the id of the request that has caused the redirect.
|
||||
}
|
||||
|
||||
// EventAuthRequired issued when the domain is enabled with
|
||||
|
||||
+4
-2
@@ -165,7 +165,7 @@ type ContinueRequestParams struct {
|
||||
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.
|
||||
Headers []*HeaderEntry `json:"headers,omitempty"` // If set, overrides the request headers. Note that the overrides do not extend to subsequent redirect hops, if a redirect happens. Another override may be applied to a different request produced by a redirect.
|
||||
InterceptResponse bool `json:"interceptResponse,omitempty"` // If set, overrides response interception behavior for this request.
|
||||
}
|
||||
|
||||
@@ -202,7 +202,9 @@ func (p ContinueRequestParams) WithPostData(postData string) *ContinueRequestPar
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithHeaders if set, overrides the request headers.
|
||||
// WithHeaders if set, overrides the request headers. Note that the overrides
|
||||
// do not extend to subsequent redirect hops, if a redirect happens. Another
|
||||
// override may be applied to a different request produced by a redirect.
|
||||
func (p ContinueRequestParams) WithHeaders(headers []*HeaderEntry) *ContinueRequestParams {
|
||||
p.Headers = headers
|
||||
return &p
|
||||
|
||||
+10
-7
@@ -3,7 +3,7 @@ package fetch
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -51,14 +51,15 @@ func (t RequestStage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RequestStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch RequestStage(in.String()) {
|
||||
v := in.String()
|
||||
switch RequestStage(v) {
|
||||
case RequestStageRequest:
|
||||
*t = RequestStageRequest
|
||||
case RequestStageResponse:
|
||||
*t = RequestStageResponse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown RequestStage value"))
|
||||
in.AddError(fmt.Errorf("unknown RequestStage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,14 +132,15 @@ func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeSource(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeSource(v) {
|
||||
case AuthChallengeSourceServer:
|
||||
*t = AuthChallengeSourceServer
|
||||
case AuthChallengeSourceProxy:
|
||||
*t = AuthChallengeSourceProxy
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeSource value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +181,8 @@ func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeResponseResponse(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeResponseResponse(v) {
|
||||
case AuthChallengeResponseResponseDefault:
|
||||
*t = AuthChallengeResponseResponseDefault
|
||||
case AuthChallengeResponseResponseCancelAuth:
|
||||
@@ -188,7 +191,7 @@ func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AuthChallengeResponseResponseProvideCredentials
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeResponseResponse value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+24
-130
@@ -40,6 +40,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental(in *jlex
|
||||
(out.Format).UnmarshalEasyJSON(in)
|
||||
case "quality":
|
||||
out.Quality = int64(in.Int64())
|
||||
case "optimizeForSpeed":
|
||||
out.OptimizeForSpeed = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -70,6 +72,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental(out *jwr
|
||||
}
|
||||
out.Int64(int64(in.Quality))
|
||||
}
|
||||
if in.OptimizeForSpeed {
|
||||
const prefix string = ",\"optimizeForSpeed\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.OptimizeForSpeed))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -96,125 +108,7 @@ func (v *ScreenshotParams) UnmarshalJSON(data []byte) error {
|
||||
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) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(in *jlexer.Lexer, out *BeginFrameReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -247,7 +141,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(in *jle
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(out *jwriter.Writer, in BeginFrameReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(out *jwriter.Writer, in BeginFrameReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -273,27 +167,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(out *jw
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v BeginFrameReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v BeginFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *BeginFrameReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *BeginFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(in *jlexer.Lexer, out *BeginFrameParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(in *jlexer.Lexer, out *BeginFrameParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -338,7 +232,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(in *jle
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(out *jwriter.Writer, in BeginFrameParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(out *jwriter.Writer, in BeginFrameParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -384,23 +278,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(out *jw
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v BeginFrameParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v BeginFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *BeginFrameParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *BeginFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental2(l, v)
|
||||
}
|
||||
-32
@@ -103,39 +103,7 @@ func (p *BeginFrameParams) Do(ctx context.Context) (hasDamage bool, screenshotDa
|
||||
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"
|
||||
)
|
||||
+10
-5
@@ -3,7 +3,7 @@ package headlessexperimental
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -14,8 +14,9 @@ import (
|
||||
//
|
||||
// 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).
|
||||
Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).
|
||||
Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
|
||||
OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)
|
||||
}
|
||||
|
||||
// ScreenshotParamsFormat image compression format (defaults to png).
|
||||
@@ -32,6 +33,7 @@ func (t ScreenshotParamsFormat) String() string {
|
||||
const (
|
||||
ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"
|
||||
ScreenshotParamsFormatPng ScreenshotParamsFormat = "png"
|
||||
ScreenshotParamsFormatWebp ScreenshotParamsFormat = "webp"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -46,14 +48,17 @@ func (t ScreenshotParamsFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScreenshotParamsFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScreenshotParamsFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch ScreenshotParamsFormat(v) {
|
||||
case ScreenshotParamsFormatJpeg:
|
||||
*t = ScreenshotParamsFormatJpeg
|
||||
case ScreenshotParamsFormatPng:
|
||||
*t = ScreenshotParamsFormatPng
|
||||
case ScreenshotParamsFormatWebp:
|
||||
*t = ScreenshotParamsFormatWebp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScreenshotParamsFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown ScreenshotParamsFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -3,7 +3,7 @@ package indexeddb
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -109,7 +109,8 @@ func (t KeyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyType(v) {
|
||||
case KeyTypeNumber:
|
||||
*t = KeyTypeNumber
|
||||
case KeyTypeString:
|
||||
@@ -120,7 +121,7 @@ func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyTypeArray
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +159,8 @@ func (t KeyPathType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyPathType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyPathType(v) {
|
||||
case KeyPathTypeNull:
|
||||
*t = KeyPathTypeNull
|
||||
case KeyPathTypeString:
|
||||
@@ -167,7 +169,7 @@ func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyPathTypeArray
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyPathType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyPathType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+24
-17
@@ -3,7 +3,6 @@ package input
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -59,7 +58,8 @@ func (t GestureSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GestureSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch GestureSourceType(v) {
|
||||
case GestureDefault:
|
||||
*t = GestureDefault
|
||||
case GestureTouch:
|
||||
@@ -68,7 +68,7 @@ func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GestureMouse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GestureSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown GestureSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,8 @@ func (t MouseButton) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MouseButton(in.String()) {
|
||||
v := in.String()
|
||||
switch MouseButton(v) {
|
||||
case None:
|
||||
*t = None
|
||||
case Left:
|
||||
@@ -124,7 +125,7 @@ func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = Forward
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MouseButton value"))
|
||||
in.AddError(fmt.Errorf("unknown MouseButton value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +235,8 @@ func (t Modifier) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Modifier(in.Int64()) {
|
||||
v := in.Int64()
|
||||
switch Modifier(v) {
|
||||
case ModifierNone:
|
||||
*t = ModifierNone
|
||||
case ModifierAlt:
|
||||
@@ -247,7 +249,7 @@ func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ModifierShift
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Modifier value"))
|
||||
in.AddError(fmt.Errorf("unknown Modifier value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +291,8 @@ func (t DispatchDragEventType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DispatchDragEventType(in.String()) {
|
||||
v := in.String()
|
||||
switch DispatchDragEventType(v) {
|
||||
case DragEnter:
|
||||
*t = DragEnter
|
||||
case DragOver:
|
||||
@@ -300,7 +303,7 @@ func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DragCancel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DispatchDragEventType value"))
|
||||
in.AddError(fmt.Errorf("unknown DispatchDragEventType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +342,8 @@ func (t KeyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyType(v) {
|
||||
case KeyDown:
|
||||
*t = KeyDown
|
||||
case KeyUp:
|
||||
@@ -350,7 +354,7 @@ func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyChar
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +393,8 @@ func (t MouseType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MouseType(in.String()) {
|
||||
v := in.String()
|
||||
switch MouseType(v) {
|
||||
case MousePressed:
|
||||
*t = MousePressed
|
||||
case MouseReleased:
|
||||
@@ -400,7 +405,7 @@ func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MouseWheel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MouseType value"))
|
||||
in.AddError(fmt.Errorf("unknown MouseType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,14 +442,15 @@ func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DispatchMouseEventPointerType(in.String()) {
|
||||
v := in.String()
|
||||
switch DispatchMouseEventPointerType(v) {
|
||||
case Mouse:
|
||||
*t = Mouse
|
||||
case Pen:
|
||||
*t = Pen
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DispatchMouseEventPointerType value"))
|
||||
in.AddError(fmt.Errorf("unknown DispatchMouseEventPointerType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +491,8 @@ func (t TouchType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TouchType(in.String()) {
|
||||
v := in.String()
|
||||
switch TouchType(v) {
|
||||
case TouchStart:
|
||||
*t = TouchStart
|
||||
case TouchEnd:
|
||||
@@ -496,7 +503,7 @@ func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TouchCancel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TouchType value"))
|
||||
in.AddError(fmt.Errorf("unknown TouchType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package inspector
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -40,7 +40,8 @@ func (t DetachReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DetachReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DetachReason(in.String()) {
|
||||
v := in.String()
|
||||
switch DetachReason(v) {
|
||||
case DetachReasonTargetClosed:
|
||||
*t = DetachReasonTargetClosed
|
||||
case DetachReasonCanceledByUser:
|
||||
@@ -51,7 +52,7 @@ func (t *DetachReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DetachReasonRenderProcessGone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DetachReason value"))
|
||||
in.AddError(fmt.Errorf("unknown DetachReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package layertree
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
@@ -116,7 +116,8 @@ func (t ScrollRectType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScrollRectType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScrollRectType(in.String()) {
|
||||
v := in.String()
|
||||
switch ScrollRectType(v) {
|
||||
case ScrollRectTypeRepaintsOnScroll:
|
||||
*t = ScrollRectTypeRepaintsOnScroll
|
||||
case ScrollRectTypeTouchEventHandler:
|
||||
@@ -125,7 +126,7 @@ func (t *ScrollRectType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ScrollRectTypeWheelEventHandler
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScrollRectType value"))
|
||||
in.AddError(fmt.Errorf("unknown ScrollRectType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-9
@@ -3,7 +3,7 @@ package log
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
@@ -76,7 +76,8 @@ func (t Source) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Source) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Source(in.String()) {
|
||||
v := in.String()
|
||||
switch Source(v) {
|
||||
case SourceXML:
|
||||
*t = SourceXML
|
||||
case SourceJavascript:
|
||||
@@ -105,7 +106,7 @@ func (t *Source) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SourceOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Source value"))
|
||||
in.AddError(fmt.Errorf("unknown Source value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +145,8 @@ func (t Level) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Level) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Level(in.String()) {
|
||||
v := in.String()
|
||||
switch Level(v) {
|
||||
case LevelVerbose:
|
||||
*t = LevelVerbose
|
||||
case LevelInfo:
|
||||
@@ -155,7 +157,7 @@ func (t *Level) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = LevelError
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Level value"))
|
||||
in.AddError(fmt.Errorf("unknown Level value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,12 +193,13 @@ func (t EntryCategory) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EntryCategory) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch EntryCategory(in.String()) {
|
||||
v := in.String()
|
||||
switch EntryCategory(v) {
|
||||
case EntryCategoryCors:
|
||||
*t = EntryCategoryCors
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown EntryCategory value"))
|
||||
in.AddError(fmt.Errorf("unknown EntryCategory value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,7 +241,8 @@ func (t Violation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Violation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Violation(in.String()) {
|
||||
v := in.String()
|
||||
switch Violation(v) {
|
||||
case ViolationLongTask:
|
||||
*t = ViolationLongTask
|
||||
case ViolationLongLayout:
|
||||
@@ -255,7 +259,7 @@ func (t *Violation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ViolationRecurringHandler
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Violation value"))
|
||||
in.AddError(fmt.Errorf("unknown Violation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package media
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -113,7 +113,8 @@ func (t PlayerMessageLevel) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PlayerMessageLevel(in.String()) {
|
||||
v := in.String()
|
||||
switch PlayerMessageLevel(v) {
|
||||
case PlayerMessageLevelError:
|
||||
*t = PlayerMessageLevelError
|
||||
case PlayerMessageLevelWarning:
|
||||
@@ -124,7 +125,7 @@ func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PlayerMessageLevelDebug
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PlayerMessageLevel value"))
|
||||
in.AddError(fmt.Errorf("unknown PlayerMessageLevel value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package memory
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -38,14 +38,15 @@ func (t PressureLevel) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PressureLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PressureLevel(in.String()) {
|
||||
v := in.String()
|
||||
switch PressureLevel(v) {
|
||||
case PressureLevelModerate:
|
||||
*t = PressureLevelModerate
|
||||
case PressureLevelCritical:
|
||||
*t = PressureLevelCritical
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PressureLevel value"))
|
||||
in.AddError(fmt.Errorf("unknown PressureLevel value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+382
-536
File diff suppressed because it is too large.
Load diff
+6
-5
@@ -208,11 +208,12 @@ type EventWebTransportClosed struct {
|
||||
//
|
||||
// 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.
|
||||
ConnectTiming *ConnectTiming `json:"connectTiming"` // Connection timing information for the request.
|
||||
ClientSecurityState *ClientSecurityState `json:"clientSecurityState,omitempty"` // The client security state set for the request.
|
||||
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.
|
||||
ConnectTiming *ConnectTiming `json:"connectTiming"` // Connection timing information for the request.
|
||||
ClientSecurityState *ClientSecurityState `json:"clientSecurityState,omitempty"` // The client security state set for the request.
|
||||
SiteHasCookieInOtherPartition bool `json:"siteHasCookieInOtherPartition,omitempty"` // Whether the site has partitioned cookies stored in a partition different than the current one.
|
||||
}
|
||||
|
||||
// EventResponseReceivedExtraInfo fired when additional information about a
|
||||
|
||||
-34
@@ -238,39 +238,6 @@ 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.
|
||||
@@ -1028,7 +995,6 @@ const (
|
||||
CommandDisable = "Network.disable"
|
||||
CommandEmulateNetworkConditions = "Network.emulateNetworkConditions"
|
||||
CommandEnable = "Network.enable"
|
||||
CommandGetAllCookies = "Network.getAllCookies"
|
||||
CommandGetCertificate = "Network.getCertificate"
|
||||
CommandGetCookies = "Network.getCookies"
|
||||
CommandGetResponseBody = "Network.getResponseBody"
|
||||
|
||||
+159
-57
@@ -3,7 +3,7 @@ package network
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/io"
|
||||
@@ -58,7 +58,8 @@ func (t ResourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ResourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ResourceType(v) {
|
||||
case ResourceTypeDocument:
|
||||
*t = ResourceTypeDocument
|
||||
case ResourceTypeStylesheet:
|
||||
@@ -97,7 +98,7 @@ func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ResourceTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ResourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ResourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +167,8 @@ func (t ErrorReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ErrorReason(in.String()) {
|
||||
v := in.String()
|
||||
switch ErrorReason(v) {
|
||||
case ErrorReasonFailed:
|
||||
*t = ErrorReasonFailed
|
||||
case ErrorReasonAborted:
|
||||
@@ -197,7 +199,7 @@ func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ErrorReasonBlockedByResponse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ErrorReason value"))
|
||||
in.AddError(fmt.Errorf("unknown ErrorReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +249,8 @@ func (t ConnectionType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ConnectionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ConnectionType(in.String()) {
|
||||
v := in.String()
|
||||
switch ConnectionType(v) {
|
||||
case ConnectionTypeNone:
|
||||
*t = ConnectionTypeNone
|
||||
case ConnectionTypeCellular2g:
|
||||
@@ -268,7 +271,7 @@ func (t *ConnectionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ConnectionTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ConnectionType value"))
|
||||
in.AddError(fmt.Errorf("unknown ConnectionType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +310,8 @@ func (t CookieSameSite) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieSameSite) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieSameSite(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieSameSite(v) {
|
||||
case CookieSameSiteStrict:
|
||||
*t = CookieSameSiteStrict
|
||||
case CookieSameSiteLax:
|
||||
@@ -316,7 +320,7 @@ func (t *CookieSameSite) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieSameSiteNone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieSameSite value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieSameSite value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +359,8 @@ func (t CookiePriority) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookiePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookiePriority(in.String()) {
|
||||
v := in.String()
|
||||
switch CookiePriority(v) {
|
||||
case CookiePriorityLow:
|
||||
*t = CookiePriorityLow
|
||||
case CookiePriorityMedium:
|
||||
@@ -364,7 +369,7 @@ func (t *CookiePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookiePriorityHigh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookiePriority value"))
|
||||
in.AddError(fmt.Errorf("unknown CookiePriority value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +410,8 @@ func (t CookieSourceScheme) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieSourceScheme) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieSourceScheme(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieSourceScheme(v) {
|
||||
case CookieSourceSchemeUnset:
|
||||
*t = CookieSourceSchemeUnset
|
||||
case CookieSourceSchemeNonSecure:
|
||||
@@ -414,7 +420,7 @@ func (t *CookieSourceScheme) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieSourceSchemeSecure
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieSourceScheme value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieSourceScheme value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,7 +484,8 @@ func (t ResourcePriority) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ResourcePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ResourcePriority(in.String()) {
|
||||
v := in.String()
|
||||
switch ResourcePriority(v) {
|
||||
case ResourcePriorityVeryLow:
|
||||
*t = ResourcePriorityVeryLow
|
||||
case ResourcePriorityLow:
|
||||
@@ -491,7 +498,7 @@ func (t *ResourcePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ResourcePriorityVeryHigh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ResourcePriority value"))
|
||||
in.AddError(fmt.Errorf("unknown ResourcePriority value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,7 +599,8 @@ func (t CertificateTransparencyCompliance) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CertificateTransparencyCompliance) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CertificateTransparencyCompliance(in.String()) {
|
||||
v := in.String()
|
||||
switch CertificateTransparencyCompliance(v) {
|
||||
case CertificateTransparencyComplianceUnknown:
|
||||
*t = CertificateTransparencyComplianceUnknown
|
||||
case CertificateTransparencyComplianceNotCompliant:
|
||||
@@ -601,7 +609,7 @@ func (t *CertificateTransparencyCompliance) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = CertificateTransparencyComplianceCompliant
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CertificateTransparencyCompliance value"))
|
||||
in.AddError(fmt.Errorf("unknown CertificateTransparencyCompliance value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -648,7 +656,8 @@ func (t BlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch BlockedReason(v) {
|
||||
case BlockedReasonOther:
|
||||
*t = BlockedReasonOther
|
||||
case BlockedReasonCsp:
|
||||
@@ -675,7 +684,7 @@ func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BlockedReasonCorpNotSameSite
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown BlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +749,8 @@ func (t CorsError) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CorsError(in.String()) {
|
||||
v := in.String()
|
||||
switch CorsError(v) {
|
||||
case CorsErrorDisallowedByMode:
|
||||
*t = CorsErrorDisallowedByMode
|
||||
case CorsErrorInvalidResponse:
|
||||
@@ -803,7 +813,7 @@ func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CorsErrorNoCorsRedirectModeNotFollow
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CorsError value"))
|
||||
in.AddError(fmt.Errorf("unknown CorsError value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,7 +860,8 @@ func (t ServiceWorkerResponseSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ServiceWorkerResponseSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ServiceWorkerResponseSource(in.String()) {
|
||||
v := in.String()
|
||||
switch ServiceWorkerResponseSource(v) {
|
||||
case ServiceWorkerResponseSourceCacheStorage:
|
||||
*t = ServiceWorkerResponseSourceCacheStorage
|
||||
case ServiceWorkerResponseSourceHTTPCache:
|
||||
@@ -861,7 +872,7 @@ func (t *ServiceWorkerResponseSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ServiceWorkerResponseSourceNetwork
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ServiceWorkerResponseSource value"))
|
||||
in.AddError(fmt.Errorf("unknown ServiceWorkerResponseSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,7 +921,8 @@ func (t TrustTokenOperationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenOperationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenOperationType(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenOperationType(v) {
|
||||
case TrustTokenOperationTypeIssuance:
|
||||
*t = TrustTokenOperationTypeIssuance
|
||||
case TrustTokenOperationTypeRedemption:
|
||||
@@ -919,7 +931,7 @@ func (t *TrustTokenOperationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationTypeSigning
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenOperationType value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenOperationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,6 +940,70 @@ func (t *TrustTokenOperationType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// AlternateProtocolUsage the reason why Chrome uses a specific transport
|
||||
// protocol for HTTP semantics.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AlternateProtocolUsage
|
||||
type AlternateProtocolUsage string
|
||||
|
||||
// String returns the AlternateProtocolUsage as string value.
|
||||
func (t AlternateProtocolUsage) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// AlternateProtocolUsage values.
|
||||
const (
|
||||
AlternateProtocolUsageAlternativeJobWonWithoutRace AlternateProtocolUsage = "alternativeJobWonWithoutRace"
|
||||
AlternateProtocolUsageAlternativeJobWonRace AlternateProtocolUsage = "alternativeJobWonRace"
|
||||
AlternateProtocolUsageMainJobWonRace AlternateProtocolUsage = "mainJobWonRace"
|
||||
AlternateProtocolUsageMappingMissing AlternateProtocolUsage = "mappingMissing"
|
||||
AlternateProtocolUsageBroken AlternateProtocolUsage = "broken"
|
||||
AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace AlternateProtocolUsage = "dnsAlpnH3JobWonWithoutRace"
|
||||
AlternateProtocolUsageDNSAlpnH3jobWonRace AlternateProtocolUsage = "dnsAlpnH3JobWonRace"
|
||||
AlternateProtocolUsageUnspecifiedReason AlternateProtocolUsage = "unspecifiedReason"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t AlternateProtocolUsage) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t AlternateProtocolUsage) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AlternateProtocolUsage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch AlternateProtocolUsage(v) {
|
||||
case AlternateProtocolUsageAlternativeJobWonWithoutRace:
|
||||
*t = AlternateProtocolUsageAlternativeJobWonWithoutRace
|
||||
case AlternateProtocolUsageAlternativeJobWonRace:
|
||||
*t = AlternateProtocolUsageAlternativeJobWonRace
|
||||
case AlternateProtocolUsageMainJobWonRace:
|
||||
*t = AlternateProtocolUsageMainJobWonRace
|
||||
case AlternateProtocolUsageMappingMissing:
|
||||
*t = AlternateProtocolUsageMappingMissing
|
||||
case AlternateProtocolUsageBroken:
|
||||
*t = AlternateProtocolUsageBroken
|
||||
case AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace:
|
||||
*t = AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace
|
||||
case AlternateProtocolUsageDNSAlpnH3jobWonRace:
|
||||
*t = AlternateProtocolUsageDNSAlpnH3jobWonRace
|
||||
case AlternateProtocolUsageUnspecifiedReason:
|
||||
*t = AlternateProtocolUsageUnspecifiedReason
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown AlternateProtocolUsage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *AlternateProtocolUsage) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Response HTTP response data.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Response
|
||||
@@ -951,6 +1027,7 @@ type Response struct {
|
||||
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.
|
||||
AlternateProtocolUsage AlternateProtocolUsage `json:"alternateProtocolUsage,omitempty"` // The reason why Chrome uses a specific transport protocol for HTTP semantics.
|
||||
SecurityState security.State `json:"securityState"` // Security state of the request resource.
|
||||
SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request.
|
||||
}
|
||||
@@ -1047,6 +1124,7 @@ const (
|
||||
SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
|
||||
SetCookieBlockedReasonSameSiteNoneInsecure SetCookieBlockedReason = "SameSiteNoneInsecure"
|
||||
SetCookieBlockedReasonUserPreferences SetCookieBlockedReason = "UserPreferences"
|
||||
SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet SetCookieBlockedReason = "ThirdPartyBlockedInFirstPartySet"
|
||||
SetCookieBlockedReasonSyntaxError SetCookieBlockedReason = "SyntaxError"
|
||||
SetCookieBlockedReasonSchemeNotSupported SetCookieBlockedReason = "SchemeNotSupported"
|
||||
SetCookieBlockedReasonOverwriteSecure SetCookieBlockedReason = "OverwriteSecure"
|
||||
@@ -1073,7 +1151,8 @@ func (t SetCookieBlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetCookieBlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch SetCookieBlockedReason(v) {
|
||||
case SetCookieBlockedReasonSecureOnly:
|
||||
*t = SetCookieBlockedReasonSecureOnly
|
||||
case SetCookieBlockedReasonSameSiteStrict:
|
||||
@@ -1086,6 +1165,8 @@ func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetCookieBlockedReasonSameSiteNoneInsecure
|
||||
case SetCookieBlockedReasonUserPreferences:
|
||||
*t = SetCookieBlockedReasonUserPreferences
|
||||
case SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet:
|
||||
*t = SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet
|
||||
case SetCookieBlockedReasonSyntaxError:
|
||||
*t = SetCookieBlockedReasonSyntaxError
|
||||
case SetCookieBlockedReasonSchemeNotSupported:
|
||||
@@ -1112,7 +1193,7 @@ func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetCookieBlockedReasonNameValuePairExceedsMaxSize
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetCookieBlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown SetCookieBlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,6 +1223,7 @@ const (
|
||||
CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
|
||||
CookieBlockedReasonSameSiteNoneInsecure CookieBlockedReason = "SameSiteNoneInsecure"
|
||||
CookieBlockedReasonUserPreferences CookieBlockedReason = "UserPreferences"
|
||||
CookieBlockedReasonThirdPartyBlockedInFirstPartySet CookieBlockedReason = "ThirdPartyBlockedInFirstPartySet"
|
||||
CookieBlockedReasonUnknownError CookieBlockedReason = "UnknownError"
|
||||
CookieBlockedReasonSchemefulSameSiteStrict CookieBlockedReason = "SchemefulSameSiteStrict"
|
||||
CookieBlockedReasonSchemefulSameSiteLax CookieBlockedReason = "SchemefulSameSiteLax"
|
||||
@@ -1162,7 +1244,8 @@ func (t CookieBlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieBlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieBlockedReason(v) {
|
||||
case CookieBlockedReasonSecureOnly:
|
||||
*t = CookieBlockedReasonSecureOnly
|
||||
case CookieBlockedReasonNotOnPath:
|
||||
@@ -1179,6 +1262,8 @@ func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieBlockedReasonSameSiteNoneInsecure
|
||||
case CookieBlockedReasonUserPreferences:
|
||||
*t = CookieBlockedReasonUserPreferences
|
||||
case CookieBlockedReasonThirdPartyBlockedInFirstPartySet:
|
||||
*t = CookieBlockedReasonThirdPartyBlockedInFirstPartySet
|
||||
case CookieBlockedReasonUnknownError:
|
||||
*t = CookieBlockedReasonUnknownError
|
||||
case CookieBlockedReasonSchemefulSameSiteStrict:
|
||||
@@ -1193,7 +1278,7 @@ func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieBlockedReasonNameValuePairExceedsMaxSize
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieBlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieBlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1290,14 +1375,15 @@ func (t InterceptionStage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InterceptionStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InterceptionStage(in.String()) {
|
||||
v := in.String()
|
||||
switch InterceptionStage(v) {
|
||||
case InterceptionStageRequest:
|
||||
*t = InterceptionStageRequest
|
||||
case InterceptionStageHeadersReceived:
|
||||
*t = InterceptionStageHeadersReceived
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InterceptionStage value"))
|
||||
in.AddError(fmt.Errorf("unknown InterceptionStage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1375,7 +1461,8 @@ func (t SignedExchangeErrorField) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SignedExchangeErrorField) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SignedExchangeErrorField(in.String()) {
|
||||
v := in.String()
|
||||
switch SignedExchangeErrorField(v) {
|
||||
case SignedExchangeErrorFieldSignatureSig:
|
||||
*t = SignedExchangeErrorFieldSignatureSig
|
||||
case SignedExchangeErrorFieldSignatureIntegrity:
|
||||
@@ -1390,7 +1477,7 @@ func (t *SignedExchangeErrorField) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SignedExchangeErrorFieldSignatureTimestamps
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SignedExchangeErrorField value"))
|
||||
in.AddError(fmt.Errorf("unknown SignedExchangeErrorField value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1447,7 +1534,8 @@ func (t ContentEncoding) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContentEncoding(in.String()) {
|
||||
v := in.String()
|
||||
switch ContentEncoding(v) {
|
||||
case ContentEncodingDeflate:
|
||||
*t = ContentEncodingDeflate
|
||||
case ContentEncodingGzip:
|
||||
@@ -1456,7 +1544,7 @@ func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContentEncodingBr
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContentEncoding value"))
|
||||
in.AddError(fmt.Errorf("unknown ContentEncoding value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1496,7 +1584,8 @@ func (t PrivateNetworkRequestPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrivateNetworkRequestPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PrivateNetworkRequestPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch PrivateNetworkRequestPolicy(v) {
|
||||
case PrivateNetworkRequestPolicyAllow:
|
||||
*t = PrivateNetworkRequestPolicyAllow
|
||||
case PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate:
|
||||
@@ -1509,7 +1598,7 @@ func (t *PrivateNetworkRequestPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PrivateNetworkRequestPolicyPreflightWarn
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PrivateNetworkRequestPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown PrivateNetworkRequestPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1548,7 +1637,8 @@ func (t IPAddressSpace) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *IPAddressSpace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch IPAddressSpace(in.String()) {
|
||||
v := in.String()
|
||||
switch IPAddressSpace(v) {
|
||||
case IPAddressSpaceLocal:
|
||||
*t = IPAddressSpaceLocal
|
||||
case IPAddressSpacePrivate:
|
||||
@@ -1559,7 +1649,7 @@ func (t *IPAddressSpace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = IPAddressSpaceUnknown
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown IPAddressSpace value"))
|
||||
in.AddError(fmt.Errorf("unknown IPAddressSpace value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1616,7 +1706,8 @@ func (t CrossOriginOpenerPolicyValue) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginOpenerPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginOpenerPolicyValue(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginOpenerPolicyValue(v) {
|
||||
case CrossOriginOpenerPolicyValueSameOrigin:
|
||||
*t = CrossOriginOpenerPolicyValueSameOrigin
|
||||
case CrossOriginOpenerPolicyValueSameOriginAllowPopups:
|
||||
@@ -1631,7 +1722,7 @@ func (t *CrossOriginOpenerPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CrossOriginOpenerPolicyValueRestrictPropertiesPlusCoep
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginOpenerPolicyValue value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginOpenerPolicyValue value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1679,7 +1770,8 @@ func (t CrossOriginEmbedderPolicyValue) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginEmbedderPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginEmbedderPolicyValue(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginEmbedderPolicyValue(v) {
|
||||
case CrossOriginEmbedderPolicyValueNone:
|
||||
*t = CrossOriginEmbedderPolicyValueNone
|
||||
case CrossOriginEmbedderPolicyValueCredentialless:
|
||||
@@ -1688,7 +1780,7 @@ func (t *CrossOriginEmbedderPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CrossOriginEmbedderPolicyValueRequireCorp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginEmbedderPolicyValue value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginEmbedderPolicyValue value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1745,7 +1837,8 @@ func (t ReportStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ReportStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ReportStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch ReportStatus(v) {
|
||||
case ReportStatusQueued:
|
||||
*t = ReportStatusQueued
|
||||
case ReportStatusPending:
|
||||
@@ -1756,7 +1849,7 @@ func (t *ReportStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ReportStatusSuccess
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ReportStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown ReportStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1856,7 +1949,8 @@ func (t ReferrerPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ReferrerPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch ReferrerPolicy(v) {
|
||||
case ReferrerPolicyUnsafeURL:
|
||||
*t = ReferrerPolicyUnsafeURL
|
||||
case ReferrerPolicyNoReferrerWhenDowngrade:
|
||||
@@ -1875,7 +1969,7 @@ func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ReferrerPolicyStrictOriginWhenCrossOrigin
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ReferrerPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown ReferrerPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1913,14 +2007,15 @@ func (t TrustTokenParamsRefreshPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenParamsRefreshPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenParamsRefreshPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenParamsRefreshPolicy(v) {
|
||||
case TrustTokenParamsRefreshPolicyUseCached:
|
||||
*t = TrustTokenParamsRefreshPolicyUseCached
|
||||
case TrustTokenParamsRefreshPolicyRefresh:
|
||||
*t = TrustTokenParamsRefreshPolicyRefresh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenParamsRefreshPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenParamsRefreshPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1961,7 +2056,8 @@ func (t InitiatorType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InitiatorType(in.String()) {
|
||||
v := in.String()
|
||||
switch InitiatorType(v) {
|
||||
case InitiatorTypeParser:
|
||||
*t = InitiatorTypeParser
|
||||
case InitiatorTypeScript:
|
||||
@@ -1976,7 +2072,7 @@ func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InitiatorTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InitiatorType value"))
|
||||
in.AddError(fmt.Errorf("unknown InitiatorType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2013,14 +2109,15 @@ func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeSource(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeSource(v) {
|
||||
case AuthChallengeSourceServer:
|
||||
*t = AuthChallengeSourceServer
|
||||
case AuthChallengeSourceProxy:
|
||||
*t = AuthChallengeSourceProxy
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeSource value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2061,7 +2158,8 @@ func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeResponseResponse(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeResponseResponse(v) {
|
||||
case AuthChallengeResponseResponseDefault:
|
||||
*t = AuthChallengeResponseResponseDefault
|
||||
case AuthChallengeResponseResponseCancelAuth:
|
||||
@@ -2070,7 +2168,7 @@ func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AuthChallengeResponseResponseProvideCredentials
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeResponseResponse value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2100,6 +2198,7 @@ const (
|
||||
TrustTokenOperationDoneStatusResourceExhausted TrustTokenOperationDoneStatus = "ResourceExhausted"
|
||||
TrustTokenOperationDoneStatusAlreadyExists TrustTokenOperationDoneStatus = "AlreadyExists"
|
||||
TrustTokenOperationDoneStatusUnavailable TrustTokenOperationDoneStatus = "Unavailable"
|
||||
TrustTokenOperationDoneStatusUnauthorized TrustTokenOperationDoneStatus = "Unauthorized"
|
||||
TrustTokenOperationDoneStatusBadResponse TrustTokenOperationDoneStatus = "BadResponse"
|
||||
TrustTokenOperationDoneStatusInternalError TrustTokenOperationDoneStatus = "InternalError"
|
||||
TrustTokenOperationDoneStatusUnknownError TrustTokenOperationDoneStatus = "UnknownError"
|
||||
@@ -2118,7 +2217,8 @@ func (t TrustTokenOperationDoneStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenOperationDoneStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenOperationDoneStatus(v) {
|
||||
case TrustTokenOperationDoneStatusOk:
|
||||
*t = TrustTokenOperationDoneStatusOk
|
||||
case TrustTokenOperationDoneStatusInvalidArgument:
|
||||
@@ -2131,6 +2231,8 @@ func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationDoneStatusAlreadyExists
|
||||
case TrustTokenOperationDoneStatusUnavailable:
|
||||
*t = TrustTokenOperationDoneStatusUnavailable
|
||||
case TrustTokenOperationDoneStatusUnauthorized:
|
||||
*t = TrustTokenOperationDoneStatusUnauthorized
|
||||
case TrustTokenOperationDoneStatusBadResponse:
|
||||
*t = TrustTokenOperationDoneStatusBadResponse
|
||||
case TrustTokenOperationDoneStatusInternalError:
|
||||
@@ -2141,7 +2243,7 @@ func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationDoneStatusFulfilledLocally
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenOperationDoneStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenOperationDoneStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-9
@@ -3,7 +3,7 @@ package overlay
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
@@ -116,7 +116,8 @@ func (t ContrastAlgorithm) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContrastAlgorithm(in.String()) {
|
||||
v := in.String()
|
||||
switch ContrastAlgorithm(v) {
|
||||
case ContrastAlgorithmAa:
|
||||
*t = ContrastAlgorithmAa
|
||||
case ContrastAlgorithmAaa:
|
||||
@@ -125,7 +126,7 @@ func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContrastAlgorithmApca
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContrastAlgorithm value"))
|
||||
in.AddError(fmt.Errorf("unknown ContrastAlgorithm value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +190,8 @@ func (t ColorFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ColorFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ColorFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch ColorFormat(v) {
|
||||
case ColorFormatRgb:
|
||||
*t = ColorFormatRgb
|
||||
case ColorFormatHsl:
|
||||
@@ -200,7 +202,7 @@ func (t *ColorFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ColorFormatHex
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ColorFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown ColorFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +318,8 @@ func (t InspectMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InspectMode(in.String()) {
|
||||
v := in.String()
|
||||
switch InspectMode(v) {
|
||||
case InspectModeSearchForNode:
|
||||
*t = InspectModeSearchForNode
|
||||
case InspectModeSearchForUAShadowDOM:
|
||||
@@ -329,7 +332,7 @@ func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InspectModeNone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InspectMode value"))
|
||||
in.AddError(fmt.Errorf("unknown InspectMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,14 +369,15 @@ func (t LineStylePattern) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *LineStylePattern) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch LineStylePattern(in.String()) {
|
||||
v := in.String()
|
||||
switch LineStylePattern(v) {
|
||||
case LineStylePatternDashed:
|
||||
*t = LineStylePatternDashed
|
||||
case LineStylePatternDotted:
|
||||
*t = LineStylePatternDotted
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown LineStylePattern value"))
|
||||
in.AddError(fmt.Errorf("unknown LineStylePattern value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+728
-663
File diff suppressed because it is too large.
Load diff
+3
-4
@@ -28,10 +28,9 @@ type EventFileChooserOpened struct {
|
||||
//
|
||||
// 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.
|
||||
AdScriptID *AdScriptID `json:"adScriptId,omitempty"` // Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
|
||||
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.
|
||||
|
||||
+48
-32
@@ -100,6 +100,7 @@ type CaptureScreenshotParams struct {
|
||||
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.
|
||||
OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)
|
||||
}
|
||||
|
||||
// CaptureScreenshot capture page screenshot.
|
||||
@@ -143,6 +144,13 @@ func (p CaptureScreenshotParams) WithCaptureBeyondViewport(captureBeyondViewport
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithOptimizeForSpeed optimize image encoding for speed, not for resulting
|
||||
// size (defaults to false).
|
||||
func (p CaptureScreenshotParams) WithOptimizeForSpeed(optimizeForSpeed bool) *CaptureScreenshotParams {
|
||||
p.OptimizeForSpeed = optimizeForSpeed
|
||||
return &p
|
||||
}
|
||||
|
||||
// CaptureScreenshotReturns return values.
|
||||
type CaptureScreenshotReturns struct {
|
||||
Data string `json:"data,omitempty"` // Base64-encoded image data.
|
||||
@@ -439,6 +447,45 @@ func (p *GetAppIDParams) Do(ctx context.Context) (appID string, recommendedID st
|
||||
return res.AppID, res.RecommendedID, nil
|
||||
}
|
||||
|
||||
// GetAdScriptIDParams [no description].
|
||||
type GetAdScriptIDParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"`
|
||||
}
|
||||
|
||||
// GetAdScriptID [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAdScriptId
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// frameID
|
||||
func GetAdScriptID(frameID cdp.FrameID) *GetAdScriptIDParams {
|
||||
return &GetAdScriptIDParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetAdScriptIDReturns return values.
|
||||
type GetAdScriptIDReturns struct {
|
||||
AdScriptID *AdScriptID `json:"adScriptId,omitempty"` // Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
|
||||
}
|
||||
|
||||
// Do executes Page.getAdScriptId against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// adScriptID - Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
|
||||
func (p *GetAdScriptIDParams) Do(ctx context.Context) (adScriptID *AdScriptID, err error) {
|
||||
// execute
|
||||
var res GetAdScriptIDReturns
|
||||
err = cdp.Execute(ctx, CommandGetAdScriptID, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.AdScriptID, nil
|
||||
}
|
||||
|
||||
// GetFrameTreeParams returns present frame tree structure.
|
||||
type GetFrameTreeParams struct{}
|
||||
|
||||
@@ -1285,37 +1332,6 @@ 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 {
|
||||
@@ -1676,6 +1692,7 @@ const (
|
||||
CommandGetInstallabilityErrors = "Page.getInstallabilityErrors"
|
||||
CommandGetManifestIcons = "Page.getManifestIcons"
|
||||
CommandGetAppID = "Page.getAppId"
|
||||
CommandGetAdScriptID = "Page.getAdScriptId"
|
||||
CommandGetFrameTree = "Page.getFrameTree"
|
||||
CommandGetLayoutMetrics = "Page.getLayoutMetrics"
|
||||
CommandGetNavigationHistory = "Page.getNavigationHistory"
|
||||
@@ -1697,7 +1714,6 @@ const (
|
||||
CommandSetFontFamilies = "Page.setFontFamilies"
|
||||
CommandSetFontSizes = "Page.setFontSizes"
|
||||
CommandSetDocumentContent = "Page.setDocumentContent"
|
||||
CommandSetDownloadBehavior = "Page.setDownloadBehavior"
|
||||
CommandSetLifecycleEventsEnabled = "Page.setLifecycleEventsEnabled"
|
||||
CommandStartScreencast = "Page.startScreencast"
|
||||
CommandStopLoading = "Page.stopLoading"
|
||||
|
||||
+169
-141
@@ -3,7 +3,7 @@ package page
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/network"
|
||||
@@ -48,6 +48,7 @@ const (
|
||||
PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink"
|
||||
PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect"
|
||||
PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme"
|
||||
PermissionsPolicyFeatureChPrefersReducedMotion PermissionsPolicyFeature = "ch-prefers-reduced-motion"
|
||||
PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt"
|
||||
PermissionsPolicyFeatureChSaveData PermissionsPolicyFeature = "ch-save-data"
|
||||
PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua"
|
||||
@@ -67,6 +68,7 @@ const (
|
||||
PermissionsPolicyFeatureChWidth PermissionsPolicyFeature = "ch-width"
|
||||
PermissionsPolicyFeatureClipboardRead PermissionsPolicyFeature = "clipboard-read"
|
||||
PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write"
|
||||
PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure"
|
||||
PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated"
|
||||
PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets"
|
||||
PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture"
|
||||
@@ -74,7 +76,6 @@ const (
|
||||
PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media"
|
||||
PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport"
|
||||
PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered"
|
||||
PermissionsPolicyFeatureFederatedCredentials PermissionsPolicyFeature = "federated-credentials"
|
||||
PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation"
|
||||
PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen"
|
||||
PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate"
|
||||
@@ -82,6 +83,7 @@ const (
|
||||
PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation"
|
||||
PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope"
|
||||
PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid"
|
||||
PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get"
|
||||
PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection"
|
||||
PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort"
|
||||
PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group"
|
||||
@@ -93,12 +95,15 @@ const (
|
||||
PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials"
|
||||
PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment"
|
||||
PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture"
|
||||
PermissionsPolicyFeaturePrivateAggregation PermissionsPolicyFeature = "private-aggregation"
|
||||
PermissionsPolicyFeaturePublickeyCredentialsGet PermissionsPolicyFeature = "publickey-credentials-get"
|
||||
PermissionsPolicyFeatureRunAdAuction PermissionsPolicyFeature = "run-ad-auction"
|
||||
PermissionsPolicyFeatureScreenWakeLock PermissionsPolicyFeature = "screen-wake-lock"
|
||||
PermissionsPolicyFeatureSerial PermissionsPolicyFeature = "serial"
|
||||
PermissionsPolicyFeatureSharedAutofill PermissionsPolicyFeature = "shared-autofill"
|
||||
PermissionsPolicyFeatureSharedStorage PermissionsPolicyFeature = "shared-storage"
|
||||
PermissionsPolicyFeatureSharedStorageSelectURL PermissionsPolicyFeature = "shared-storage-select-url"
|
||||
PermissionsPolicyFeatureSmartCard PermissionsPolicyFeature = "smart-card"
|
||||
PermissionsPolicyFeatureStorageAccess PermissionsPolicyFeature = "storage-access"
|
||||
PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr"
|
||||
PermissionsPolicyFeatureTrustTokenRedemption PermissionsPolicyFeature = "trust-token-redemption"
|
||||
@@ -122,7 +127,8 @@ func (t PermissionsPolicyFeature) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionsPolicyFeature(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionsPolicyFeature(v) {
|
||||
case PermissionsPolicyFeatureAccelerometer:
|
||||
*t = PermissionsPolicyFeatureAccelerometer
|
||||
case PermissionsPolicyFeatureAmbientLightSensor:
|
||||
@@ -147,6 +153,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureChEct
|
||||
case PermissionsPolicyFeatureChPrefersColorScheme:
|
||||
*t = PermissionsPolicyFeatureChPrefersColorScheme
|
||||
case PermissionsPolicyFeatureChPrefersReducedMotion:
|
||||
*t = PermissionsPolicyFeatureChPrefersReducedMotion
|
||||
case PermissionsPolicyFeatureChRtt:
|
||||
*t = PermissionsPolicyFeatureChRtt
|
||||
case PermissionsPolicyFeatureChSaveData:
|
||||
@@ -185,6 +193,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureClipboardRead
|
||||
case PermissionsPolicyFeatureClipboardWrite:
|
||||
*t = PermissionsPolicyFeatureClipboardWrite
|
||||
case PermissionsPolicyFeatureComputePressure:
|
||||
*t = PermissionsPolicyFeatureComputePressure
|
||||
case PermissionsPolicyFeatureCrossOriginIsolated:
|
||||
*t = PermissionsPolicyFeatureCrossOriginIsolated
|
||||
case PermissionsPolicyFeatureDirectSockets:
|
||||
@@ -199,8 +209,6 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureExecutionWhileOutOfViewport
|
||||
case PermissionsPolicyFeatureExecutionWhileNotRendered:
|
||||
*t = PermissionsPolicyFeatureExecutionWhileNotRendered
|
||||
case PermissionsPolicyFeatureFederatedCredentials:
|
||||
*t = PermissionsPolicyFeatureFederatedCredentials
|
||||
case PermissionsPolicyFeatureFocusWithoutUserActivation:
|
||||
*t = PermissionsPolicyFeatureFocusWithoutUserActivation
|
||||
case PermissionsPolicyFeatureFullscreen:
|
||||
@@ -215,6 +223,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureGyroscope
|
||||
case PermissionsPolicyFeatureHid:
|
||||
*t = PermissionsPolicyFeatureHid
|
||||
case PermissionsPolicyFeatureIdentityCredentialsGet:
|
||||
*t = PermissionsPolicyFeatureIdentityCredentialsGet
|
||||
case PermissionsPolicyFeatureIdleDetection:
|
||||
*t = PermissionsPolicyFeatureIdleDetection
|
||||
case PermissionsPolicyFeatureInterestCohort:
|
||||
@@ -237,6 +247,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeaturePayment
|
||||
case PermissionsPolicyFeaturePictureInPicture:
|
||||
*t = PermissionsPolicyFeaturePictureInPicture
|
||||
case PermissionsPolicyFeaturePrivateAggregation:
|
||||
*t = PermissionsPolicyFeaturePrivateAggregation
|
||||
case PermissionsPolicyFeaturePublickeyCredentialsGet:
|
||||
*t = PermissionsPolicyFeaturePublickeyCredentialsGet
|
||||
case PermissionsPolicyFeatureRunAdAuction:
|
||||
@@ -249,6 +261,10 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureSharedAutofill
|
||||
case PermissionsPolicyFeatureSharedStorage:
|
||||
*t = PermissionsPolicyFeatureSharedStorage
|
||||
case PermissionsPolicyFeatureSharedStorageSelectURL:
|
||||
*t = PermissionsPolicyFeatureSharedStorageSelectURL
|
||||
case PermissionsPolicyFeatureSmartCard:
|
||||
*t = PermissionsPolicyFeatureSmartCard
|
||||
case PermissionsPolicyFeatureStorageAccess:
|
||||
*t = PermissionsPolicyFeatureStorageAccess
|
||||
case PermissionsPolicyFeatureSyncXhr:
|
||||
@@ -269,7 +285,7 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureXrSpatialTracking
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionsPolicyFeature value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionsPolicyFeature value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,7 +325,8 @@ func (t PermissionsPolicyBlockReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionsPolicyBlockReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionsPolicyBlockReason(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionsPolicyBlockReason(v) {
|
||||
case PermissionsPolicyBlockReasonHeader:
|
||||
*t = PermissionsPolicyBlockReasonHeader
|
||||
case PermissionsPolicyBlockReasonIframeAttribute:
|
||||
@@ -320,7 +337,7 @@ func (t *PermissionsPolicyBlockReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyBlockReasonInIsolatedApp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionsPolicyBlockReason value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionsPolicyBlockReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +443,8 @@ func (t TransitionType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TransitionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TransitionType(in.String()) {
|
||||
v := in.String()
|
||||
switch TransitionType(v) {
|
||||
case TransitionTypeLink:
|
||||
*t = TransitionTypeLink
|
||||
case TransitionTypeTyped:
|
||||
@@ -455,7 +473,7 @@ func (t *TransitionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TransitionTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TransitionType value"))
|
||||
in.AddError(fmt.Errorf("unknown TransitionType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -518,7 +536,8 @@ func (t DialogType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DialogType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DialogType(in.String()) {
|
||||
v := in.String()
|
||||
switch DialogType(v) {
|
||||
case DialogTypeAlert:
|
||||
*t = DialogTypeAlert
|
||||
case DialogTypeConfirm:
|
||||
@@ -529,7 +548,7 @@ func (t *DialogType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DialogTypeBeforeunload
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DialogType value"))
|
||||
in.AddError(fmt.Errorf("unknown DialogType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +672,8 @@ func (t ClientNavigationReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ClientNavigationReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ClientNavigationReason(in.String()) {
|
||||
v := in.String()
|
||||
switch ClientNavigationReason(v) {
|
||||
case ClientNavigationReasonFormSubmissionGet:
|
||||
*t = ClientNavigationReasonFormSubmissionGet
|
||||
case ClientNavigationReasonFormSubmissionPost:
|
||||
@@ -672,7 +692,7 @@ func (t *ClientNavigationReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ClientNavigationReasonAnchorClick
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ClientNavigationReason value"))
|
||||
in.AddError(fmt.Errorf("unknown ClientNavigationReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -711,7 +731,8 @@ func (t ClientNavigationDisposition) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ClientNavigationDisposition) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ClientNavigationDisposition(in.String()) {
|
||||
v := in.String()
|
||||
switch ClientNavigationDisposition(v) {
|
||||
case ClientNavigationDispositionCurrentTab:
|
||||
*t = ClientNavigationDispositionCurrentTab
|
||||
case ClientNavigationDispositionNewTab:
|
||||
@@ -722,7 +743,7 @@ func (t *ClientNavigationDisposition) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ClientNavigationDispositionDownload
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ClientNavigationDisposition value"))
|
||||
in.AddError(fmt.Errorf("unknown ClientNavigationDisposition value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -781,7 +802,8 @@ func (t ReferrerPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ReferrerPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch ReferrerPolicy(v) {
|
||||
case ReferrerPolicyNoReferrer:
|
||||
*t = ReferrerPolicyNoReferrer
|
||||
case ReferrerPolicyNoReferrerWhenDowngrade:
|
||||
@@ -800,7 +822,7 @@ func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ReferrerPolicyUnsafeURL
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ReferrerPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown ReferrerPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,14 +868,15 @@ func (t NavigationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *NavigationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch NavigationType(in.String()) {
|
||||
v := in.String()
|
||||
switch NavigationType(v) {
|
||||
case NavigationTypeNavigation:
|
||||
*t = NavigationTypeNavigation
|
||||
case NavigationTypeBackForwardCacheRestore:
|
||||
*t = NavigationTypeBackForwardCacheRestore
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown NavigationType value"))
|
||||
in.AddError(fmt.Errorf("unknown NavigationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -940,7 +963,6 @@ const (
|
||||
BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet BackForwardCacheNotRestoredReason = "DedicatedWorkerOrWorklet"
|
||||
BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers"
|
||||
BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction BackForwardCacheNotRestoredReason = "OutstandingIndexedDBTransaction"
|
||||
BackForwardCacheNotRestoredReasonRequestedNotificationsPermission BackForwardCacheNotRestoredReason = "RequestedNotificationsPermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedMIDIPermission BackForwardCacheNotRestoredReason = "RequestedMIDIPermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission BackForwardCacheNotRestoredReason = "RequestedVideoCapturePermission"
|
||||
@@ -971,7 +993,10 @@ const (
|
||||
BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestDirectSocket"
|
||||
BackForwardCacheNotRestoredReasonInjectedJavascript BackForwardCacheNotRestoredReason = "InjectedJavascript"
|
||||
BackForwardCacheNotRestoredReasonInjectedStyleSheet BackForwardCacheNotRestoredReason = "InjectedStyleSheet"
|
||||
BackForwardCacheNotRestoredReasonKeepaliveRequest BackForwardCacheNotRestoredReason = "KeepaliveRequest"
|
||||
BackForwardCacheNotRestoredReasonIndexedDBEvent BackForwardCacheNotRestoredReason = "IndexedDBEvent"
|
||||
BackForwardCacheNotRestoredReasonDummy BackForwardCacheNotRestoredReason = "Dummy"
|
||||
BackForwardCacheNotRestoredReasonAuthorizationHeader BackForwardCacheNotRestoredReason = "AuthorizationHeader"
|
||||
BackForwardCacheNotRestoredReasonContentSecurityHandler BackForwardCacheNotRestoredReason = "ContentSecurityHandler"
|
||||
BackForwardCacheNotRestoredReasonContentWebAuthenticationAPI BackForwardCacheNotRestoredReason = "ContentWebAuthenticationAPI"
|
||||
BackForwardCacheNotRestoredReasonContentFileChooser BackForwardCacheNotRestoredReason = "ContentFileChooser"
|
||||
@@ -1011,7 +1036,8 @@ func (t BackForwardCacheNotRestoredReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BackForwardCacheNotRestoredReason(in.String()) {
|
||||
v := in.String()
|
||||
switch BackForwardCacheNotRestoredReason(v) {
|
||||
case BackForwardCacheNotRestoredReasonNotPrimaryMainFrame:
|
||||
*t = BackForwardCacheNotRestoredReasonNotPrimaryMainFrame
|
||||
case BackForwardCacheNotRestoredReasonBackForwardCacheDisabled:
|
||||
@@ -1142,8 +1168,6 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers
|
||||
case BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction:
|
||||
*t = BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction
|
||||
case BackForwardCacheNotRestoredReasonRequestedNotificationsPermission:
|
||||
*t = BackForwardCacheNotRestoredReasonRequestedNotificationsPermission
|
||||
case BackForwardCacheNotRestoredReasonRequestedMIDIPermission:
|
||||
*t = BackForwardCacheNotRestoredReasonRequestedMIDIPermission
|
||||
case BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission:
|
||||
@@ -1204,8 +1228,14 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonInjectedJavascript
|
||||
case BackForwardCacheNotRestoredReasonInjectedStyleSheet:
|
||||
*t = BackForwardCacheNotRestoredReasonInjectedStyleSheet
|
||||
case BackForwardCacheNotRestoredReasonKeepaliveRequest:
|
||||
*t = BackForwardCacheNotRestoredReasonKeepaliveRequest
|
||||
case BackForwardCacheNotRestoredReasonIndexedDBEvent:
|
||||
*t = BackForwardCacheNotRestoredReasonIndexedDBEvent
|
||||
case BackForwardCacheNotRestoredReasonDummy:
|
||||
*t = BackForwardCacheNotRestoredReasonDummy
|
||||
case BackForwardCacheNotRestoredReasonAuthorizationHeader:
|
||||
*t = BackForwardCacheNotRestoredReasonAuthorizationHeader
|
||||
case BackForwardCacheNotRestoredReasonContentSecurityHandler:
|
||||
*t = BackForwardCacheNotRestoredReasonContentSecurityHandler
|
||||
case BackForwardCacheNotRestoredReasonContentWebAuthenticationAPI:
|
||||
@@ -1258,7 +1288,7 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonEmbedderExtensionSentMessageToCachedFrame
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BackForwardCacheNotRestoredReason value"))
|
||||
in.AddError(fmt.Errorf("unknown BackForwardCacheNotRestoredReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1297,7 +1327,8 @@ func (t BackForwardCacheNotRestoredReasonType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BackForwardCacheNotRestoredReasonType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BackForwardCacheNotRestoredReasonType(in.String()) {
|
||||
v := in.String()
|
||||
switch BackForwardCacheNotRestoredReasonType(v) {
|
||||
case BackForwardCacheNotRestoredReasonTypeSupportPending:
|
||||
*t = BackForwardCacheNotRestoredReasonTypeSupportPending
|
||||
case BackForwardCacheNotRestoredReasonTypePageSupportNeeded:
|
||||
@@ -1306,7 +1337,7 @@ func (t *BackForwardCacheNotRestoredReasonType) UnmarshalEasyJSON(in *jlexer.Lex
|
||||
*t = BackForwardCacheNotRestoredReasonTypeCircumstantial
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BackForwardCacheNotRestoredReasonType value"))
|
||||
in.AddError(fmt.Errorf("unknown BackForwardCacheNotRestoredReasonType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1345,44 +1376,55 @@ func (t PrerenderFinalStatus) String() string {
|
||||
|
||||
// PrerenderFinalStatus values.
|
||||
const (
|
||||
PrerenderFinalStatusActivated PrerenderFinalStatus = "Activated"
|
||||
PrerenderFinalStatusDestroyed PrerenderFinalStatus = "Destroyed"
|
||||
PrerenderFinalStatusLowEndDevice PrerenderFinalStatus = "LowEndDevice"
|
||||
PrerenderFinalStatusCrossOriginRedirect PrerenderFinalStatus = "CrossOriginRedirect"
|
||||
PrerenderFinalStatusCrossOriginNavigation PrerenderFinalStatus = "CrossOriginNavigation"
|
||||
PrerenderFinalStatusInvalidSchemeRedirect PrerenderFinalStatus = "InvalidSchemeRedirect"
|
||||
PrerenderFinalStatusInvalidSchemeNavigation PrerenderFinalStatus = "InvalidSchemeNavigation"
|
||||
PrerenderFinalStatusInProgressNavigation PrerenderFinalStatus = "InProgressNavigation"
|
||||
PrerenderFinalStatusNavigationRequestBlockedByCsp PrerenderFinalStatus = "NavigationRequestBlockedByCsp"
|
||||
PrerenderFinalStatusMainFrameNavigation PrerenderFinalStatus = "MainFrameNavigation"
|
||||
PrerenderFinalStatusMojoBinderPolicy PrerenderFinalStatus = "MojoBinderPolicy"
|
||||
PrerenderFinalStatusRendererProcessCrashed PrerenderFinalStatus = "RendererProcessCrashed"
|
||||
PrerenderFinalStatusRendererProcessKilled PrerenderFinalStatus = "RendererProcessKilled"
|
||||
PrerenderFinalStatusDownload PrerenderFinalStatus = "Download"
|
||||
PrerenderFinalStatusTriggerDestroyed PrerenderFinalStatus = "TriggerDestroyed"
|
||||
PrerenderFinalStatusNavigationNotCommitted PrerenderFinalStatus = "NavigationNotCommitted"
|
||||
PrerenderFinalStatusNavigationBadHTTPStatus PrerenderFinalStatus = "NavigationBadHttpStatus"
|
||||
PrerenderFinalStatusClientCertRequested PrerenderFinalStatus = "ClientCertRequested"
|
||||
PrerenderFinalStatusNavigationRequestNetworkError PrerenderFinalStatus = "NavigationRequestNetworkError"
|
||||
PrerenderFinalStatusMaxNumOfRunningPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningPrerendersExceeded"
|
||||
PrerenderFinalStatusCancelAllHostsForTesting PrerenderFinalStatus = "CancelAllHostsForTesting"
|
||||
PrerenderFinalStatusDidFailLoad PrerenderFinalStatus = "DidFailLoad"
|
||||
PrerenderFinalStatusStop PrerenderFinalStatus = "Stop"
|
||||
PrerenderFinalStatusSslCertificateError PrerenderFinalStatus = "SslCertificateError"
|
||||
PrerenderFinalStatusLoginAuthRequested PrerenderFinalStatus = "LoginAuthRequested"
|
||||
PrerenderFinalStatusUaChangeRequiresReload PrerenderFinalStatus = "UaChangeRequiresReload"
|
||||
PrerenderFinalStatusBlockedByClient PrerenderFinalStatus = "BlockedByClient"
|
||||
PrerenderFinalStatusAudioOutputDeviceRequested PrerenderFinalStatus = "AudioOutputDeviceRequested"
|
||||
PrerenderFinalStatusMixedContent PrerenderFinalStatus = "MixedContent"
|
||||
PrerenderFinalStatusTriggerBackgrounded PrerenderFinalStatus = "TriggerBackgrounded"
|
||||
PrerenderFinalStatusEmbedderTriggeredAndCrossOriginRedirected PrerenderFinalStatus = "EmbedderTriggeredAndCrossOriginRedirected"
|
||||
PrerenderFinalStatusMemoryLimitExceeded PrerenderFinalStatus = "MemoryLimitExceeded"
|
||||
PrerenderFinalStatusFailToGetMemoryUsage PrerenderFinalStatus = "FailToGetMemoryUsage"
|
||||
PrerenderFinalStatusDataSaverEnabled PrerenderFinalStatus = "DataSaverEnabled"
|
||||
PrerenderFinalStatusHasEffectiveURL PrerenderFinalStatus = "HasEffectiveUrl"
|
||||
PrerenderFinalStatusActivatedBeforeStarted PrerenderFinalStatus = "ActivatedBeforeStarted"
|
||||
PrerenderFinalStatusInactivePageRestriction PrerenderFinalStatus = "InactivePageRestriction"
|
||||
PrerenderFinalStatusStartFailed PrerenderFinalStatus = "StartFailed"
|
||||
PrerenderFinalStatusActivated PrerenderFinalStatus = "Activated"
|
||||
PrerenderFinalStatusDestroyed PrerenderFinalStatus = "Destroyed"
|
||||
PrerenderFinalStatusLowEndDevice PrerenderFinalStatus = "LowEndDevice"
|
||||
PrerenderFinalStatusInvalidSchemeRedirect PrerenderFinalStatus = "InvalidSchemeRedirect"
|
||||
PrerenderFinalStatusInvalidSchemeNavigation PrerenderFinalStatus = "InvalidSchemeNavigation"
|
||||
PrerenderFinalStatusInProgressNavigation PrerenderFinalStatus = "InProgressNavigation"
|
||||
PrerenderFinalStatusNavigationRequestBlockedByCsp PrerenderFinalStatus = "NavigationRequestBlockedByCsp"
|
||||
PrerenderFinalStatusMainFrameNavigation PrerenderFinalStatus = "MainFrameNavigation"
|
||||
PrerenderFinalStatusMojoBinderPolicy PrerenderFinalStatus = "MojoBinderPolicy"
|
||||
PrerenderFinalStatusRendererProcessCrashed PrerenderFinalStatus = "RendererProcessCrashed"
|
||||
PrerenderFinalStatusRendererProcessKilled PrerenderFinalStatus = "RendererProcessKilled"
|
||||
PrerenderFinalStatusDownload PrerenderFinalStatus = "Download"
|
||||
PrerenderFinalStatusTriggerDestroyed PrerenderFinalStatus = "TriggerDestroyed"
|
||||
PrerenderFinalStatusNavigationNotCommitted PrerenderFinalStatus = "NavigationNotCommitted"
|
||||
PrerenderFinalStatusNavigationBadHTTPStatus PrerenderFinalStatus = "NavigationBadHttpStatus"
|
||||
PrerenderFinalStatusClientCertRequested PrerenderFinalStatus = "ClientCertRequested"
|
||||
PrerenderFinalStatusNavigationRequestNetworkError PrerenderFinalStatus = "NavigationRequestNetworkError"
|
||||
PrerenderFinalStatusMaxNumOfRunningPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningPrerendersExceeded"
|
||||
PrerenderFinalStatusCancelAllHostsForTesting PrerenderFinalStatus = "CancelAllHostsForTesting"
|
||||
PrerenderFinalStatusDidFailLoad PrerenderFinalStatus = "DidFailLoad"
|
||||
PrerenderFinalStatusStop PrerenderFinalStatus = "Stop"
|
||||
PrerenderFinalStatusSslCertificateError PrerenderFinalStatus = "SslCertificateError"
|
||||
PrerenderFinalStatusLoginAuthRequested PrerenderFinalStatus = "LoginAuthRequested"
|
||||
PrerenderFinalStatusUaChangeRequiresReload PrerenderFinalStatus = "UaChangeRequiresReload"
|
||||
PrerenderFinalStatusBlockedByClient PrerenderFinalStatus = "BlockedByClient"
|
||||
PrerenderFinalStatusAudioOutputDeviceRequested PrerenderFinalStatus = "AudioOutputDeviceRequested"
|
||||
PrerenderFinalStatusMixedContent PrerenderFinalStatus = "MixedContent"
|
||||
PrerenderFinalStatusTriggerBackgrounded PrerenderFinalStatus = "TriggerBackgrounded"
|
||||
PrerenderFinalStatusEmbedderTriggeredAndCrossOriginRedirected PrerenderFinalStatus = "EmbedderTriggeredAndCrossOriginRedirected"
|
||||
PrerenderFinalStatusMemoryLimitExceeded PrerenderFinalStatus = "MemoryLimitExceeded"
|
||||
PrerenderFinalStatusFailToGetMemoryUsage PrerenderFinalStatus = "FailToGetMemoryUsage"
|
||||
PrerenderFinalStatusDataSaverEnabled PrerenderFinalStatus = "DataSaverEnabled"
|
||||
PrerenderFinalStatusHasEffectiveURL PrerenderFinalStatus = "HasEffectiveUrl"
|
||||
PrerenderFinalStatusActivatedBeforeStarted PrerenderFinalStatus = "ActivatedBeforeStarted"
|
||||
PrerenderFinalStatusInactivePageRestriction PrerenderFinalStatus = "InactivePageRestriction"
|
||||
PrerenderFinalStatusStartFailed PrerenderFinalStatus = "StartFailed"
|
||||
PrerenderFinalStatusTimeoutBackgrounded PrerenderFinalStatus = "TimeoutBackgrounded"
|
||||
PrerenderFinalStatusCrossSiteRedirect PrerenderFinalStatus = "CrossSiteRedirect"
|
||||
PrerenderFinalStatusCrossSiteNavigation PrerenderFinalStatus = "CrossSiteNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginRedirect PrerenderFinalStatus = "SameSiteCrossOriginRedirect"
|
||||
PrerenderFinalStatusSameSiteCrossOriginNavigation PrerenderFinalStatus = "SameSiteCrossOriginNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptIn PrerenderFinalStatus = "SameSiteCrossOriginRedirectNotOptIn"
|
||||
PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptIn PrerenderFinalStatus = "SameSiteCrossOriginNavigationNotOptIn"
|
||||
PrerenderFinalStatusActivationNavigationParameterMismatch PrerenderFinalStatus = "ActivationNavigationParameterMismatch"
|
||||
PrerenderFinalStatusActivatedInBackground PrerenderFinalStatus = "ActivatedInBackground"
|
||||
PrerenderFinalStatusEmbedderHostDisallowed PrerenderFinalStatus = "EmbedderHostDisallowed"
|
||||
PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess PrerenderFinalStatus = "ActivationNavigationDestroyedBeforeSuccess"
|
||||
PrerenderFinalStatusTabClosedByUserGesture PrerenderFinalStatus = "TabClosedByUserGesture"
|
||||
PrerenderFinalStatusTabClosedWithoutUserGesture PrerenderFinalStatus = "TabClosedWithoutUserGesture"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1397,17 +1439,14 @@ func (t PrerenderFinalStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PrerenderFinalStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch PrerenderFinalStatus(v) {
|
||||
case PrerenderFinalStatusActivated:
|
||||
*t = PrerenderFinalStatusActivated
|
||||
case PrerenderFinalStatusDestroyed:
|
||||
*t = PrerenderFinalStatusDestroyed
|
||||
case PrerenderFinalStatusLowEndDevice:
|
||||
*t = PrerenderFinalStatusLowEndDevice
|
||||
case PrerenderFinalStatusCrossOriginRedirect:
|
||||
*t = PrerenderFinalStatusCrossOriginRedirect
|
||||
case PrerenderFinalStatusCrossOriginNavigation:
|
||||
*t = PrerenderFinalStatusCrossOriginNavigation
|
||||
case PrerenderFinalStatusInvalidSchemeRedirect:
|
||||
*t = PrerenderFinalStatusInvalidSchemeRedirect
|
||||
case PrerenderFinalStatusInvalidSchemeNavigation:
|
||||
@@ -1474,9 +1513,35 @@ func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PrerenderFinalStatusInactivePageRestriction
|
||||
case PrerenderFinalStatusStartFailed:
|
||||
*t = PrerenderFinalStatusStartFailed
|
||||
case PrerenderFinalStatusTimeoutBackgrounded:
|
||||
*t = PrerenderFinalStatusTimeoutBackgrounded
|
||||
case PrerenderFinalStatusCrossSiteRedirect:
|
||||
*t = PrerenderFinalStatusCrossSiteRedirect
|
||||
case PrerenderFinalStatusCrossSiteNavigation:
|
||||
*t = PrerenderFinalStatusCrossSiteNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginRedirect:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginRedirect
|
||||
case PrerenderFinalStatusSameSiteCrossOriginNavigation:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptIn:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptIn
|
||||
case PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptIn:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptIn
|
||||
case PrerenderFinalStatusActivationNavigationParameterMismatch:
|
||||
*t = PrerenderFinalStatusActivationNavigationParameterMismatch
|
||||
case PrerenderFinalStatusActivatedInBackground:
|
||||
*t = PrerenderFinalStatusActivatedInBackground
|
||||
case PrerenderFinalStatusEmbedderHostDisallowed:
|
||||
*t = PrerenderFinalStatusEmbedderHostDisallowed
|
||||
case PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess:
|
||||
*t = PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess
|
||||
case PrerenderFinalStatusTabClosedByUserGesture:
|
||||
*t = PrerenderFinalStatusTabClosedByUserGesture
|
||||
case PrerenderFinalStatusTabClosedWithoutUserGesture:
|
||||
*t = PrerenderFinalStatusTabClosedWithoutUserGesture
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PrerenderFinalStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown PrerenderFinalStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1513,14 +1578,15 @@ func (t FileChooserOpenedMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *FileChooserOpenedMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch FileChooserOpenedMode(in.String()) {
|
||||
v := in.String()
|
||||
switch FileChooserOpenedMode(v) {
|
||||
case FileChooserOpenedModeSelectSingle:
|
||||
*t = FileChooserOpenedModeSelectSingle
|
||||
case FileChooserOpenedModeSelectMultiple:
|
||||
*t = FileChooserOpenedModeSelectMultiple
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown FileChooserOpenedMode value"))
|
||||
in.AddError(fmt.Errorf("unknown FileChooserOpenedMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1557,14 +1623,15 @@ func (t FrameDetachedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *FrameDetachedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch FrameDetachedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch FrameDetachedReason(v) {
|
||||
case FrameDetachedReasonRemove:
|
||||
*t = FrameDetachedReasonRemove
|
||||
case FrameDetachedReasonSwap:
|
||||
*t = FrameDetachedReasonSwap
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown FrameDetachedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown FrameDetachedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1602,7 +1669,8 @@ func (t CaptureScreenshotFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CaptureScreenshotFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CaptureScreenshotFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch CaptureScreenshotFormat(v) {
|
||||
case CaptureScreenshotFormatJpeg:
|
||||
*t = CaptureScreenshotFormatJpeg
|
||||
case CaptureScreenshotFormatPng:
|
||||
@@ -1611,7 +1679,7 @@ func (t *CaptureScreenshotFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CaptureScreenshotFormatWebp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CaptureScreenshotFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown CaptureScreenshotFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1647,12 +1715,13 @@ func (t CaptureSnapshotFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CaptureSnapshotFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CaptureSnapshotFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch CaptureSnapshotFormat(v) {
|
||||
case CaptureSnapshotFormatMhtml:
|
||||
*t = CaptureSnapshotFormatMhtml
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CaptureSnapshotFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown CaptureSnapshotFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1689,14 +1758,15 @@ func (t PrintToPDFTransferMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrintToPDFTransferMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PrintToPDFTransferMode(in.String()) {
|
||||
v := in.String()
|
||||
switch PrintToPDFTransferMode(v) {
|
||||
case PrintToPDFTransferModeReturnAsBase64:
|
||||
*t = PrintToPDFTransferModeReturnAsBase64
|
||||
case PrintToPDFTransferModeReturnAsStream:
|
||||
*t = PrintToPDFTransferModeReturnAsStream
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PrintToPDFTransferMode value"))
|
||||
in.AddError(fmt.Errorf("unknown PrintToPDFTransferMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1705,54 +1775,6 @@ 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
|
||||
@@ -1781,14 +1803,15 @@ func (t ScreencastFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScreencastFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScreencastFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch ScreencastFormat(v) {
|
||||
case ScreencastFormatJpeg:
|
||||
*t = ScreencastFormatJpeg
|
||||
case ScreencastFormatPng:
|
||||
*t = ScreencastFormatPng
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScreencastFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown ScreencastFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1825,14 +1848,15 @@ func (t SetWebLifecycleStateState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetWebLifecycleStateState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetWebLifecycleStateState(in.String()) {
|
||||
v := in.String()
|
||||
switch SetWebLifecycleStateState(v) {
|
||||
case SetWebLifecycleStateStateFrozen:
|
||||
*t = SetWebLifecycleStateStateFrozen
|
||||
case SetWebLifecycleStateStateActive:
|
||||
*t = SetWebLifecycleStateStateActive
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetWebLifecycleStateState value"))
|
||||
in.AddError(fmt.Errorf("unknown SetWebLifecycleStateState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1854,8 +1878,9 @@ func (t SetSPCTransactionModeMode) String() string {
|
||||
// SetSPCTransactionModeMode values.
|
||||
const (
|
||||
SetSPCTransactionModeModeNone SetSPCTransactionModeMode = "none"
|
||||
SetSPCTransactionModeModeAutoaccept SetSPCTransactionModeMode = "autoaccept"
|
||||
SetSPCTransactionModeModeAutoreject SetSPCTransactionModeMode = "autoreject"
|
||||
SetSPCTransactionModeModeAutoAccept SetSPCTransactionModeMode = "autoAccept"
|
||||
SetSPCTransactionModeModeAutoReject SetSPCTransactionModeMode = "autoReject"
|
||||
SetSPCTransactionModeModeAutoOptOut SetSPCTransactionModeMode = "autoOptOut"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1870,16 +1895,19 @@ func (t SetSPCTransactionModeMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetSPCTransactionModeMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetSPCTransactionModeMode(in.String()) {
|
||||
v := in.String()
|
||||
switch SetSPCTransactionModeMode(v) {
|
||||
case SetSPCTransactionModeModeNone:
|
||||
*t = SetSPCTransactionModeModeNone
|
||||
case SetSPCTransactionModeModeAutoaccept:
|
||||
*t = SetSPCTransactionModeModeAutoaccept
|
||||
case SetSPCTransactionModeModeAutoreject:
|
||||
*t = SetSPCTransactionModeModeAutoreject
|
||||
case SetSPCTransactionModeModeAutoAccept:
|
||||
*t = SetSPCTransactionModeModeAutoAccept
|
||||
case SetSPCTransactionModeModeAutoReject:
|
||||
*t = SetSPCTransactionModeModeAutoReject
|
||||
case SetSPCTransactionModeModeAutoOptOut:
|
||||
*t = SetSPCTransactionModeModeAutoOptOut
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetSPCTransactionModeMode value"))
|
||||
in.AddError(fmt.Errorf("unknown SetSPCTransactionModeMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -3,7 +3,7 @@ package performance
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -47,14 +47,15 @@ func (t EnableTimeDomain) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EnableTimeDomain) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch EnableTimeDomain(in.String()) {
|
||||
v := in.String()
|
||||
switch EnableTimeDomain(v) {
|
||||
case EnableTimeDomainTimeTicks:
|
||||
*t = EnableTimeDomainTimeTicks
|
||||
case EnableTimeDomainThreadTicks:
|
||||
*t = EnableTimeDomainThreadTicks
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown EnableTimeDomain value"))
|
||||
in.AddError(fmt.Errorf("unknown EnableTimeDomain value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+220
-813
File diff suppressed because it is too large.
Load diff
-66
@@ -176,21 +176,6 @@ func (p *StartPreciseCoverageParams) Do(ctx context.Context) (timestamp float64,
|
||||
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{}
|
||||
|
||||
@@ -240,23 +225,6 @@ 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{}
|
||||
@@ -292,37 +260,6 @@ func (p *TakePreciseCoverageParams) Do(ctx context.Context) (result []*ScriptCov
|
||||
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
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandDisable = "Profiler.disable"
|
||||
@@ -331,10 +268,7 @@ const (
|
||||
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"
|
||||
)
|
||||
-25
@@ -65,28 +65,3 @@ type ScriptCoverage struct {
|
||||
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.
|
||||
}
|
||||
+14
@@ -3235,6 +3235,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime34(in *jlexer.Lexer, o
|
||||
switch key {
|
||||
case "executionContextId":
|
||||
out.ExecutionContextID = ExecutionContextID(in.Int64())
|
||||
case "executionContextUniqueId":
|
||||
out.ExecutionContextUniqueID = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -3254,6 +3256,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime34(out *jwriter.Writer
|
||||
out.RawString(prefix[1:])
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"executionContextUniqueId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ExecutionContextUniqueID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -4727,6 +4734,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, o
|
||||
out.ObjectGroup = string(in.String())
|
||||
case "throwOnSideEffect":
|
||||
out.ThrowOnSideEffect = bool(in.Bool())
|
||||
case "uniqueContextId":
|
||||
out.UniqueContextID = string(in.String())
|
||||
case "generateWebDriverValue":
|
||||
out.GenerateWebDriverValue = bool(in.Bool())
|
||||
default:
|
||||
@@ -4811,6 +4820,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.ThrowOnSideEffect))
|
||||
}
|
||||
if in.UniqueContextID != "" {
|
||||
const prefix string = ",\"uniqueContextId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.UniqueContextID))
|
||||
}
|
||||
if in.GenerateWebDriverValue {
|
||||
const prefix string = ",\"generateWebDriverValue\":"
|
||||
out.RawString(prefix)
|
||||
|
||||
+2
-1
@@ -55,7 +55,8 @@ type EventExecutionContextCreated struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-executionContextDestroyed
|
||||
type EventExecutionContextDestroyed struct {
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId"` // Id of the destroyed context
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId"` // Id of the destroyed context
|
||||
ExecutionContextUniqueID string `json:"executionContextUniqueId"` // Unique Id of the destroyed context
|
||||
}
|
||||
|
||||
// EventExecutionContextsCleared issued when all executionContexts were
|
||||
|
||||
+12
@@ -89,6 +89,7 @@ type CallFunctionOnParams struct {
|
||||
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.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation.
|
||||
UniqueContextID string `json:"uniqueContextId,omitempty"` // An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with executionContextId.
|
||||
GenerateWebDriverValue bool `json:"generateWebDriverValue,omitempty"` // Whether the result should contain webDriverValue, serialized according to https://w3c.github.io/webdriver-bidi. This is mutually exclusive with returnByValue, but resulting objectId is still provided.
|
||||
}
|
||||
|
||||
@@ -177,6 +178,17 @@ func (p CallFunctionOnParams) WithThrowOnSideEffect(throwOnSideEffect bool) *Cal
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithUniqueContextID an alternative way to specify the execution context to
|
||||
// call function on. Compared to contextId that may be reused across processes,
|
||||
// this is guaranteed to be system-unique, so it can be used to prevent
|
||||
// accidental function call in context different than intended (e.g. as a result
|
||||
// of navigation across process boundaries). This is mutually exclusive with
|
||||
// executionContextId.
|
||||
func (p CallFunctionOnParams) WithUniqueContextID(uniqueContextID string) *CallFunctionOnParams {
|
||||
p.UniqueContextID = uniqueContextID
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithGenerateWebDriverValue whether the result should contain
|
||||
// webDriverValue, serialized according to https://w3c.github.io/webdriver-bidi.
|
||||
// This is mutually exclusive with returnByValue, but resulting objectId is
|
||||
|
||||
+12
-9
@@ -3,7 +3,6 @@ package runtime
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -339,7 +338,8 @@ func (t WebDriverValueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *WebDriverValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch WebDriverValueType(in.String()) {
|
||||
v := in.String()
|
||||
switch WebDriverValueType(v) {
|
||||
case WebDriverValueTypeUndefined:
|
||||
*t = WebDriverValueTypeUndefined
|
||||
case WebDriverValueTypeNull:
|
||||
@@ -388,7 +388,7 @@ func (t *WebDriverValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = WebDriverValueTypeWindow
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown WebDriverValueType value"))
|
||||
in.AddError(fmt.Errorf("unknown WebDriverValueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +432,8 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Type(in.String()) {
|
||||
v := in.String()
|
||||
switch Type(v) {
|
||||
case TypeObject:
|
||||
*t = TypeObject
|
||||
case TypeFunction:
|
||||
@@ -453,7 +454,7 @@ func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TypeAccessor
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Type value"))
|
||||
in.AddError(fmt.Errorf("unknown Type value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,7 +510,8 @@ func (t Subtype) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Subtype) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Subtype(in.String()) {
|
||||
v := in.String()
|
||||
switch Subtype(v) {
|
||||
case SubtypeArray:
|
||||
*t = SubtypeArray
|
||||
case SubtypeNull:
|
||||
@@ -550,7 +552,7 @@ func (t *Subtype) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SubtypeWasmvalue
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Subtype value"))
|
||||
in.AddError(fmt.Errorf("unknown Subtype value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,7 +605,8 @@ func (t APIType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *APIType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch APIType(in.String()) {
|
||||
v := in.String()
|
||||
switch APIType(v) {
|
||||
case APITypeLog:
|
||||
*t = APITypeLog
|
||||
case APITypeDebug:
|
||||
@@ -642,7 +645,7 @@ func (t *APIType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = APITypeTimeEnd
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown APIType value"))
|
||||
in.AddError(fmt.Errorf("unknown APIType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-9
@@ -3,7 +3,7 @@ package security
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -51,7 +51,8 @@ func (t MixedContentType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MixedContentType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MixedContentType(in.String()) {
|
||||
v := in.String()
|
||||
switch MixedContentType(v) {
|
||||
case MixedContentTypeBlockable:
|
||||
*t = MixedContentTypeBlockable
|
||||
case MixedContentTypeOptionallyBlockable:
|
||||
@@ -60,7 +61,7 @@ func (t *MixedContentType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MixedContentTypeNone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MixedContentType value"))
|
||||
in.AddError(fmt.Errorf("unknown MixedContentType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +102,8 @@ func (t State) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *State) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch State(in.String()) {
|
||||
v := in.String()
|
||||
switch State(v) {
|
||||
case StateUnknown:
|
||||
*t = StateUnknown
|
||||
case StateNeutral:
|
||||
@@ -116,7 +118,7 @@ func (t *State) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = StateInsecureBroken
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown State value"))
|
||||
in.AddError(fmt.Errorf("unknown State value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,14 +180,15 @@ func (t SafetyTipStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SafetyTipStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SafetyTipStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch SafetyTipStatus(v) {
|
||||
case SafetyTipStatusBadReputation:
|
||||
*t = SafetyTipStatusBadReputation
|
||||
case SafetyTipStatusLookalike:
|
||||
*t = SafetyTipStatusLookalike
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SafetyTipStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown SafetyTipStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,14 +259,15 @@ func (t CertificateErrorAction) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CertificateErrorAction) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CertificateErrorAction(in.String()) {
|
||||
v := in.String()
|
||||
switch CertificateErrorAction(v) {
|
||||
case CertificateErrorActionContinue:
|
||||
*t = CertificateErrorActionContinue
|
||||
case CertificateErrorActionCancel:
|
||||
*t = CertificateErrorActionCancel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CertificateErrorAction value"))
|
||||
in.AddError(fmt.Errorf("unknown CertificateErrorAction value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -3,7 +3,7 @@ package serviceworker
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/target"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -60,7 +60,8 @@ func (t VersionRunningStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *VersionRunningStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch VersionRunningStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch VersionRunningStatus(v) {
|
||||
case VersionRunningStatusStopped:
|
||||
*t = VersionRunningStatusStopped
|
||||
case VersionRunningStatusStarting:
|
||||
@@ -71,7 +72,7 @@ func (t *VersionRunningStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = VersionRunningStatusStopping
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown VersionRunningStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown VersionRunningStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +113,8 @@ func (t VersionStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *VersionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch VersionStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch VersionStatus(v) {
|
||||
case VersionStatusNew:
|
||||
*t = VersionStatusNew
|
||||
case VersionStatusInstalling:
|
||||
@@ -127,7 +129,7 @@ func (t *VersionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = VersionStatusRedundant
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown VersionStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown VersionStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1720
-246
File diff suppressed because it is too large.
Load diff
+17
-3
@@ -10,15 +10,17 @@ import (
|
||||
//
|
||||
// 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.
|
||||
Origin string `json:"origin"` // Origin to update.
|
||||
StorageKey string `json:"storageKey"` // Storage key 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.
|
||||
Origin string `json:"origin"` // Origin to update.
|
||||
StorageKey string `json:"storageKey"` // Storage key to update.
|
||||
}
|
||||
|
||||
// EventIndexedDBContentUpdated the origin's IndexedDB object store has been
|
||||
@@ -51,3 +53,15 @@ type EventInterestGroupAccessed struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// EventSharedStorageAccessed shared storage was accessed by the associated
|
||||
// page. The following parameters are included in all events.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#event-sharedStorageAccessed
|
||||
type EventSharedStorageAccessed struct {
|
||||
AccessTime *cdp.TimeSinceEpoch `json:"accessTime"` // Time of the access.
|
||||
Type SharedStorageAccessType `json:"type"` // Enum value indicating the Shared Storage API method invoked.
|
||||
MainFrameID cdp.FrameID `json:"mainFrameId"` // DevTools Frame Token for the primary frame tree's root.
|
||||
OwnerOrigin string `json:"ownerOrigin"` // Serialized origin for the context that invoked the Shared Storage API.
|
||||
Params *SharedStorageAccessParams `json:"params"` // The sub-parameters warapped by params are all optional and their presence/absence depends on type.
|
||||
}
|
||||
+300
-18
@@ -309,6 +309,31 @@ func (p *TrackCacheStorageForOriginParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandTrackCacheStorageForOrigin, p, nil)
|
||||
}
|
||||
|
||||
// TrackCacheStorageForStorageKeyParams registers storage key to be notified
|
||||
// when an update occurs to its cache storage list.
|
||||
type TrackCacheStorageForStorageKeyParams struct {
|
||||
StorageKey string `json:"storageKey"` // Storage key.
|
||||
}
|
||||
|
||||
// TrackCacheStorageForStorageKey registers storage key to be notified when
|
||||
// an update occurs to its cache storage list.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-trackCacheStorageForStorageKey
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// storageKey - Storage key.
|
||||
func TrackCacheStorageForStorageKey(storageKey string) *TrackCacheStorageForStorageKeyParams {
|
||||
return &TrackCacheStorageForStorageKeyParams{
|
||||
StorageKey: storageKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.trackCacheStorageForStorageKey against the provided context.
|
||||
func (p *TrackCacheStorageForStorageKeyParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandTrackCacheStorageForStorageKey, p, nil)
|
||||
}
|
||||
|
||||
// TrackIndexedDBForOriginParams registers origin to be notified when an
|
||||
// update occurs to its IndexedDB.
|
||||
type TrackIndexedDBForOriginParams struct {
|
||||
@@ -384,6 +409,31 @@ func (p *UntrackCacheStorageForOriginParams) Do(ctx context.Context) (err error)
|
||||
return cdp.Execute(ctx, CommandUntrackCacheStorageForOrigin, p, nil)
|
||||
}
|
||||
|
||||
// UntrackCacheStorageForStorageKeyParams unregisters storage key from
|
||||
// receiving notifications for cache storage.
|
||||
type UntrackCacheStorageForStorageKeyParams struct {
|
||||
StorageKey string `json:"storageKey"` // Storage key.
|
||||
}
|
||||
|
||||
// UntrackCacheStorageForStorageKey unregisters storage key from receiving
|
||||
// notifications for cache storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-untrackCacheStorageForStorageKey
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// storageKey - Storage key.
|
||||
func UntrackCacheStorageForStorageKey(storageKey string) *UntrackCacheStorageForStorageKeyParams {
|
||||
return &UntrackCacheStorageForStorageKeyParams{
|
||||
StorageKey: storageKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.untrackCacheStorageForStorageKey against the provided context.
|
||||
func (p *UntrackCacheStorageForStorageKeyParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandUntrackCacheStorageForStorageKey, p, nil)
|
||||
}
|
||||
|
||||
// UntrackIndexedDBForOriginParams unregisters origin from receiving
|
||||
// notifications for IndexedDB.
|
||||
type UntrackIndexedDBForOriginParams struct {
|
||||
@@ -577,24 +627,256 @@ func (p *SetInterestGroupTrackingParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetInterestGroupTracking, p, nil)
|
||||
}
|
||||
|
||||
// GetSharedStorageMetadataParams gets metadata for an origin's shared
|
||||
// storage.
|
||||
type GetSharedStorageMetadataParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
}
|
||||
|
||||
// GetSharedStorageMetadata gets metadata for an origin's shared storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getSharedStorageMetadata
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
func GetSharedStorageMetadata(ownerOrigin string) *GetSharedStorageMetadataParams {
|
||||
return &GetSharedStorageMetadataParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
}
|
||||
}
|
||||
|
||||
// GetSharedStorageMetadataReturns return values.
|
||||
type GetSharedStorageMetadataReturns struct {
|
||||
Metadata *SharedStorageMetadata `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Storage.getSharedStorageMetadata against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// metadata
|
||||
func (p *GetSharedStorageMetadataParams) Do(ctx context.Context) (metadata *SharedStorageMetadata, err error) {
|
||||
// execute
|
||||
var res GetSharedStorageMetadataReturns
|
||||
err = cdp.Execute(ctx, CommandGetSharedStorageMetadata, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Metadata, nil
|
||||
}
|
||||
|
||||
// GetSharedStorageEntriesParams gets the entries in an given origin's shared
|
||||
// storage.
|
||||
type GetSharedStorageEntriesParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
}
|
||||
|
||||
// GetSharedStorageEntries gets the entries in an given origin's shared
|
||||
// storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-getSharedStorageEntries
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
func GetSharedStorageEntries(ownerOrigin string) *GetSharedStorageEntriesParams {
|
||||
return &GetSharedStorageEntriesParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
}
|
||||
}
|
||||
|
||||
// GetSharedStorageEntriesReturns return values.
|
||||
type GetSharedStorageEntriesReturns struct {
|
||||
Entries []*SharedStorageEntry `json:"entries,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Storage.getSharedStorageEntries against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// entries
|
||||
func (p *GetSharedStorageEntriesParams) Do(ctx context.Context) (entries []*SharedStorageEntry, err error) {
|
||||
// execute
|
||||
var res GetSharedStorageEntriesReturns
|
||||
err = cdp.Execute(ctx, CommandGetSharedStorageEntries, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Entries, nil
|
||||
}
|
||||
|
||||
// SetSharedStorageEntryParams sets entry with key and value for a given
|
||||
// origin's shared storage.
|
||||
type SetSharedStorageEntryParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
IgnoreIfPresent bool `json:"ignoreIfPresent,omitempty"` // If ignoreIfPresent is included and true, then only sets the entry if key doesn't already exist.
|
||||
}
|
||||
|
||||
// SetSharedStorageEntry sets entry with key and value for a given origin's
|
||||
// shared storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-setSharedStorageEntry
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
// key
|
||||
// value
|
||||
func SetSharedStorageEntry(ownerOrigin string, key string, value string) *SetSharedStorageEntryParams {
|
||||
return &SetSharedStorageEntryParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
Key: key,
|
||||
Value: value,
|
||||
}
|
||||
}
|
||||
|
||||
// WithIgnoreIfPresent if ignoreIfPresent is included and true, then only
|
||||
// sets the entry if key doesn't already exist.
|
||||
func (p SetSharedStorageEntryParams) WithIgnoreIfPresent(ignoreIfPresent bool) *SetSharedStorageEntryParams {
|
||||
p.IgnoreIfPresent = ignoreIfPresent
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Storage.setSharedStorageEntry against the provided context.
|
||||
func (p *SetSharedStorageEntryParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetSharedStorageEntry, p, nil)
|
||||
}
|
||||
|
||||
// DeleteSharedStorageEntryParams deletes entry for key (if it exists) for a
|
||||
// given origin's shared storage.
|
||||
type DeleteSharedStorageEntryParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
// DeleteSharedStorageEntry deletes entry for key (if it exists) for a given
|
||||
// origin's shared storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-deleteSharedStorageEntry
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
// key
|
||||
func DeleteSharedStorageEntry(ownerOrigin string, key string) *DeleteSharedStorageEntryParams {
|
||||
return &DeleteSharedStorageEntryParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
Key: key,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.deleteSharedStorageEntry against the provided context.
|
||||
func (p *DeleteSharedStorageEntryParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDeleteSharedStorageEntry, p, nil)
|
||||
}
|
||||
|
||||
// ClearSharedStorageEntriesParams clears all entries for a given origin's
|
||||
// shared storage.
|
||||
type ClearSharedStorageEntriesParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
}
|
||||
|
||||
// ClearSharedStorageEntries clears all entries for a given origin's shared
|
||||
// storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-clearSharedStorageEntries
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
func ClearSharedStorageEntries(ownerOrigin string) *ClearSharedStorageEntriesParams {
|
||||
return &ClearSharedStorageEntriesParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.clearSharedStorageEntries against the provided context.
|
||||
func (p *ClearSharedStorageEntriesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandClearSharedStorageEntries, p, nil)
|
||||
}
|
||||
|
||||
// ResetSharedStorageBudgetParams resets the budget for ownerOrigin by
|
||||
// clearing all budget withdrawals.
|
||||
type ResetSharedStorageBudgetParams struct {
|
||||
OwnerOrigin string `json:"ownerOrigin"`
|
||||
}
|
||||
|
||||
// ResetSharedStorageBudget resets the budget for ownerOrigin by clearing all
|
||||
// budget withdrawals.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-resetSharedStorageBudget
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// ownerOrigin
|
||||
func ResetSharedStorageBudget(ownerOrigin string) *ResetSharedStorageBudgetParams {
|
||||
return &ResetSharedStorageBudgetParams{
|
||||
OwnerOrigin: ownerOrigin,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.resetSharedStorageBudget against the provided context.
|
||||
func (p *ResetSharedStorageBudgetParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandResetSharedStorageBudget, p, nil)
|
||||
}
|
||||
|
||||
// SetSharedStorageTrackingParams enables/disables issuing of
|
||||
// sharedStorageAccessed events.
|
||||
type SetSharedStorageTrackingParams struct {
|
||||
Enable bool `json:"enable"`
|
||||
}
|
||||
|
||||
// SetSharedStorageTracking enables/disables issuing of sharedStorageAccessed
|
||||
// events.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#method-setSharedStorageTracking
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// enable
|
||||
func SetSharedStorageTracking(enable bool) *SetSharedStorageTrackingParams {
|
||||
return &SetSharedStorageTrackingParams{
|
||||
Enable: enable,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Storage.setSharedStorageTracking against the provided context.
|
||||
func (p *SetSharedStorageTrackingParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetSharedStorageTracking, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandGetStorageKeyForFrame = "Storage.getStorageKeyForFrame"
|
||||
CommandClearDataForOrigin = "Storage.clearDataForOrigin"
|
||||
CommandClearDataForStorageKey = "Storage.clearDataForStorageKey"
|
||||
CommandGetCookies = "Storage.getCookies"
|
||||
CommandSetCookies = "Storage.setCookies"
|
||||
CommandClearCookies = "Storage.clearCookies"
|
||||
CommandGetUsageAndQuota = "Storage.getUsageAndQuota"
|
||||
CommandOverrideQuotaForOrigin = "Storage.overrideQuotaForOrigin"
|
||||
CommandTrackCacheStorageForOrigin = "Storage.trackCacheStorageForOrigin"
|
||||
CommandTrackIndexedDBForOrigin = "Storage.trackIndexedDBForOrigin"
|
||||
CommandTrackIndexedDBForStorageKey = "Storage.trackIndexedDBForStorageKey"
|
||||
CommandUntrackCacheStorageForOrigin = "Storage.untrackCacheStorageForOrigin"
|
||||
CommandUntrackIndexedDBForOrigin = "Storage.untrackIndexedDBForOrigin"
|
||||
CommandUntrackIndexedDBForStorageKey = "Storage.untrackIndexedDBForStorageKey"
|
||||
CommandGetTrustTokens = "Storage.getTrustTokens"
|
||||
CommandClearTrustTokens = "Storage.clearTrustTokens"
|
||||
CommandGetInterestGroupDetails = "Storage.getInterestGroupDetails"
|
||||
CommandSetInterestGroupTracking = "Storage.setInterestGroupTracking"
|
||||
CommandGetStorageKeyForFrame = "Storage.getStorageKeyForFrame"
|
||||
CommandClearDataForOrigin = "Storage.clearDataForOrigin"
|
||||
CommandClearDataForStorageKey = "Storage.clearDataForStorageKey"
|
||||
CommandGetCookies = "Storage.getCookies"
|
||||
CommandSetCookies = "Storage.setCookies"
|
||||
CommandClearCookies = "Storage.clearCookies"
|
||||
CommandGetUsageAndQuota = "Storage.getUsageAndQuota"
|
||||
CommandOverrideQuotaForOrigin = "Storage.overrideQuotaForOrigin"
|
||||
CommandTrackCacheStorageForOrigin = "Storage.trackCacheStorageForOrigin"
|
||||
CommandTrackCacheStorageForStorageKey = "Storage.trackCacheStorageForStorageKey"
|
||||
CommandTrackIndexedDBForOrigin = "Storage.trackIndexedDBForOrigin"
|
||||
CommandTrackIndexedDBForStorageKey = "Storage.trackIndexedDBForStorageKey"
|
||||
CommandUntrackCacheStorageForOrigin = "Storage.untrackCacheStorageForOrigin"
|
||||
CommandUntrackCacheStorageForStorageKey = "Storage.untrackCacheStorageForStorageKey"
|
||||
CommandUntrackIndexedDBForOrigin = "Storage.untrackIndexedDBForOrigin"
|
||||
CommandUntrackIndexedDBForStorageKey = "Storage.untrackIndexedDBForStorageKey"
|
||||
CommandGetTrustTokens = "Storage.getTrustTokens"
|
||||
CommandClearTrustTokens = "Storage.clearTrustTokens"
|
||||
CommandGetInterestGroupDetails = "Storage.getInterestGroupDetails"
|
||||
CommandSetInterestGroupTracking = "Storage.setInterestGroupTracking"
|
||||
CommandGetSharedStorageMetadata = "Storage.getSharedStorageMetadata"
|
||||
CommandGetSharedStorageEntries = "Storage.getSharedStorageEntries"
|
||||
CommandSetSharedStorageEntry = "Storage.setSharedStorageEntry"
|
||||
CommandDeleteSharedStorageEntry = "Storage.deleteSharedStorageEntry"
|
||||
CommandClearSharedStorageEntries = "Storage.clearSharedStorageEntries"
|
||||
CommandResetSharedStorageBudget = "Storage.resetSharedStorageBudget"
|
||||
CommandSetSharedStorageTracking = "Storage.setSharedStorageTracking"
|
||||
)
|
||||
+150
-5
@@ -3,7 +3,7 @@ package storage
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -43,6 +43,7 @@ const (
|
||||
TypeServiceWorkers Type = "service_workers"
|
||||
TypeCacheStorage Type = "cache_storage"
|
||||
TypeInterestGroups Type = "interest_groups"
|
||||
TypeSharedStorage Type = "shared_storage"
|
||||
TypeAll Type = "all"
|
||||
TypeOther Type = "other"
|
||||
)
|
||||
@@ -59,7 +60,8 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Type(in.String()) {
|
||||
v := in.String()
|
||||
switch Type(v) {
|
||||
case TypeAppcache:
|
||||
*t = TypeAppcache
|
||||
case TypeCookies:
|
||||
@@ -80,13 +82,15 @@ func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TypeCacheStorage
|
||||
case TypeInterestGroups:
|
||||
*t = TypeInterestGroups
|
||||
case TypeSharedStorage:
|
||||
*t = TypeSharedStorage
|
||||
case TypeAll:
|
||||
*t = TypeAll
|
||||
case TypeOther:
|
||||
*t = TypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Type value"))
|
||||
in.AddError(fmt.Errorf("unknown Type value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +131,7 @@ const (
|
||||
InterestGroupAccessTypeJoin InterestGroupAccessType = "join"
|
||||
InterestGroupAccessTypeLeave InterestGroupAccessType = "leave"
|
||||
InterestGroupAccessTypeUpdate InterestGroupAccessType = "update"
|
||||
InterestGroupAccessTypeLoaded InterestGroupAccessType = "loaded"
|
||||
InterestGroupAccessTypeBid InterestGroupAccessType = "bid"
|
||||
InterestGroupAccessTypeWin InterestGroupAccessType = "win"
|
||||
)
|
||||
@@ -143,20 +148,23 @@ func (t InterestGroupAccessType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InterestGroupAccessType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InterestGroupAccessType(in.String()) {
|
||||
v := in.String()
|
||||
switch InterestGroupAccessType(v) {
|
||||
case InterestGroupAccessTypeJoin:
|
||||
*t = InterestGroupAccessTypeJoin
|
||||
case InterestGroupAccessTypeLeave:
|
||||
*t = InterestGroupAccessTypeLeave
|
||||
case InterestGroupAccessTypeUpdate:
|
||||
*t = InterestGroupAccessTypeUpdate
|
||||
case InterestGroupAccessTypeLoaded:
|
||||
*t = InterestGroupAccessTypeLoaded
|
||||
case InterestGroupAccessTypeBid:
|
||||
*t = InterestGroupAccessTypeBid
|
||||
case InterestGroupAccessTypeWin:
|
||||
*t = InterestGroupAccessTypeWin
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InterestGroupAccessType value"))
|
||||
in.AddError(fmt.Errorf("unknown InterestGroupAccessType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,3 +198,140 @@ type InterestGroupDetails struct {
|
||||
Ads []*InterestGroupAd `json:"ads"`
|
||||
AdComponents []*InterestGroupAd `json:"adComponents"`
|
||||
}
|
||||
|
||||
// SharedStorageAccessType enum of shared storage access types.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageAccessType
|
||||
type SharedStorageAccessType string
|
||||
|
||||
// String returns the SharedStorageAccessType as string value.
|
||||
func (t SharedStorageAccessType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// SharedStorageAccessType values.
|
||||
const (
|
||||
SharedStorageAccessTypeDocumentAddModule SharedStorageAccessType = "documentAddModule"
|
||||
SharedStorageAccessTypeDocumentSelectURL SharedStorageAccessType = "documentSelectURL"
|
||||
SharedStorageAccessTypeDocumentRun SharedStorageAccessType = "documentRun"
|
||||
SharedStorageAccessTypeDocumentSet SharedStorageAccessType = "documentSet"
|
||||
SharedStorageAccessTypeDocumentAppend SharedStorageAccessType = "documentAppend"
|
||||
SharedStorageAccessTypeDocumentDelete SharedStorageAccessType = "documentDelete"
|
||||
SharedStorageAccessTypeDocumentClear SharedStorageAccessType = "documentClear"
|
||||
SharedStorageAccessTypeWorkletSet SharedStorageAccessType = "workletSet"
|
||||
SharedStorageAccessTypeWorkletAppend SharedStorageAccessType = "workletAppend"
|
||||
SharedStorageAccessTypeWorkletDelete SharedStorageAccessType = "workletDelete"
|
||||
SharedStorageAccessTypeWorkletClear SharedStorageAccessType = "workletClear"
|
||||
SharedStorageAccessTypeWorkletGet SharedStorageAccessType = "workletGet"
|
||||
SharedStorageAccessTypeWorkletKeys SharedStorageAccessType = "workletKeys"
|
||||
SharedStorageAccessTypeWorkletEntries SharedStorageAccessType = "workletEntries"
|
||||
SharedStorageAccessTypeWorkletLength SharedStorageAccessType = "workletLength"
|
||||
SharedStorageAccessTypeWorkletRemainingBudget SharedStorageAccessType = "workletRemainingBudget"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t SharedStorageAccessType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t SharedStorageAccessType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SharedStorageAccessType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch SharedStorageAccessType(v) {
|
||||
case SharedStorageAccessTypeDocumentAddModule:
|
||||
*t = SharedStorageAccessTypeDocumentAddModule
|
||||
case SharedStorageAccessTypeDocumentSelectURL:
|
||||
*t = SharedStorageAccessTypeDocumentSelectURL
|
||||
case SharedStorageAccessTypeDocumentRun:
|
||||
*t = SharedStorageAccessTypeDocumentRun
|
||||
case SharedStorageAccessTypeDocumentSet:
|
||||
*t = SharedStorageAccessTypeDocumentSet
|
||||
case SharedStorageAccessTypeDocumentAppend:
|
||||
*t = SharedStorageAccessTypeDocumentAppend
|
||||
case SharedStorageAccessTypeDocumentDelete:
|
||||
*t = SharedStorageAccessTypeDocumentDelete
|
||||
case SharedStorageAccessTypeDocumentClear:
|
||||
*t = SharedStorageAccessTypeDocumentClear
|
||||
case SharedStorageAccessTypeWorkletSet:
|
||||
*t = SharedStorageAccessTypeWorkletSet
|
||||
case SharedStorageAccessTypeWorkletAppend:
|
||||
*t = SharedStorageAccessTypeWorkletAppend
|
||||
case SharedStorageAccessTypeWorkletDelete:
|
||||
*t = SharedStorageAccessTypeWorkletDelete
|
||||
case SharedStorageAccessTypeWorkletClear:
|
||||
*t = SharedStorageAccessTypeWorkletClear
|
||||
case SharedStorageAccessTypeWorkletGet:
|
||||
*t = SharedStorageAccessTypeWorkletGet
|
||||
case SharedStorageAccessTypeWorkletKeys:
|
||||
*t = SharedStorageAccessTypeWorkletKeys
|
||||
case SharedStorageAccessTypeWorkletEntries:
|
||||
*t = SharedStorageAccessTypeWorkletEntries
|
||||
case SharedStorageAccessTypeWorkletLength:
|
||||
*t = SharedStorageAccessTypeWorkletLength
|
||||
case SharedStorageAccessTypeWorkletRemainingBudget:
|
||||
*t = SharedStorageAccessTypeWorkletRemainingBudget
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SharedStorageAccessType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *SharedStorageAccessType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SharedStorageEntry struct for a single key-value pair in an origin's
|
||||
// shared storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageEntry
|
||||
type SharedStorageEntry struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// SharedStorageMetadata details for an origin's shared storage.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageMetadata
|
||||
type SharedStorageMetadata struct {
|
||||
CreationTime *cdp.TimeSinceEpoch `json:"creationTime"`
|
||||
Length int64 `json:"length"`
|
||||
RemainingBudget float64 `json:"remainingBudget"`
|
||||
}
|
||||
|
||||
// SharedStorageReportingMetadata pair of reporting metadata details for a
|
||||
// candidate URL for selectURL().
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageReportingMetadata
|
||||
type SharedStorageReportingMetadata struct {
|
||||
EventType string `json:"eventType"`
|
||||
ReportingURL string `json:"reportingUrl"`
|
||||
}
|
||||
|
||||
// SharedStorageURLWithMetadata bundles a candidate URL with its reporting
|
||||
// metadata.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageUrlWithMetadata
|
||||
type SharedStorageURLWithMetadata struct {
|
||||
URL string `json:"url"` // Spec of candidate URL.
|
||||
ReportingMetadata []*SharedStorageReportingMetadata `json:"reportingMetadata"` // Any associated reporting metadata.
|
||||
}
|
||||
|
||||
// SharedStorageAccessParams bundles the parameters for shared storage access
|
||||
// events whose presence/absence can vary according to SharedStorageAccessType.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Storage#type-SharedStorageAccessParams
|
||||
type SharedStorageAccessParams struct {
|
||||
ScriptSourceURL string `json:"scriptSourceUrl,omitempty"` // Spec of the module script URL. Present only for SharedStorageAccessType.documentAddModule.
|
||||
OperationName string `json:"operationName,omitempty"` // Name of the registered operation to be run. Present only for SharedStorageAccessType.documentRun and SharedStorageAccessType.documentSelectURL.
|
||||
SerializedData string `json:"serializedData,omitempty"` // The operation's serialized data in bytes (converted to a string). Present only for SharedStorageAccessType.documentRun and SharedStorageAccessType.documentSelectURL.
|
||||
UrlsWithMetadata []*SharedStorageURLWithMetadata `json:"urlsWithMetadata,omitempty"` // Array of candidate URLs' specs, along with any associated metadata. Present only for SharedStorageAccessType.documentSelectURL.
|
||||
Key string `json:"key,omitempty"` // Key for a specific entry in an origin's shared storage. Present only for SharedStorageAccessType.documentSet, SharedStorageAccessType.documentAppend, SharedStorageAccessType.documentDelete, SharedStorageAccessType.workletSet, SharedStorageAccessType.workletAppend, SharedStorageAccessType.workletDelete, and SharedStorageAccessType.workletGet.
|
||||
Value string `json:"value,omitempty"` // Value for a specific entry in an origin's shared storage. Present only for SharedStorageAccessType.documentSet, SharedStorageAccessType.documentAppend, SharedStorageAccessType.workletSet, and SharedStorageAccessType.workletAppend.
|
||||
IgnoreIfPresent bool `json:"ignoreIfPresent,omitempty"` // Whether or not to set an entry for a key if that key is already present. Present only for SharedStorageAccessType.documentSet and SharedStorageAccessType.workletSet.
|
||||
}
|
||||
+145
-12
@@ -854,7 +854,140 @@ func (v *GetInfoParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *GetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(in *jlexer.Lexer, out *GPUInfo) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(in *jlexer.Lexer, out *GetFeatureStateReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "featureEnabled":
|
||||
out.FeatureEnabled = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(out *jwriter.Writer, in GetFeatureStateReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FeatureEnabled {
|
||||
const prefix string = ",\"featureEnabled\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.FeatureEnabled))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetFeatureStateReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetFeatureStateReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetFeatureStateReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetFeatureStateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(in *jlexer.Lexer, out *GetFeatureStateParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "featureState":
|
||||
out.FeatureState = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(out *jwriter.Writer, in GetFeatureStateParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"featureState\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.FeatureState))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetFeatureStateParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetFeatureStateParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetFeatureStateParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetFeatureStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(in *jlexer.Lexer, out *GPUInfo) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1034,7 +1167,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(out *jwriter.Writer, in GPUInfo) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(out *jwriter.Writer, in GPUInfo) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1150,27 +1283,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(out *jwriter.Writ
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GPUInfo) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GPUInfo) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GPUInfo) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GPUInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(in *jlexer.Lexer, out *GPUDevice) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(in *jlexer.Lexer, out *GPUDevice) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1215,7 +1348,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(out *jwriter.Writer, in GPUDevice) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(out *jwriter.Writer, in GPUDevice) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1265,23 +1398,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GPUDevice) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GPUDevice) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GPUDevice) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GPUDevice) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(l, v)
|
||||
}
|
||||
+42
-2
@@ -52,6 +52,45 @@ func (p *GetInfoParams) Do(ctx context.Context) (gpu *GPUInfo, modelName string,
|
||||
return res.Gpu, res.ModelName, res.ModelVersion, res.CommandLine, nil
|
||||
}
|
||||
|
||||
// GetFeatureStateParams returns information about the feature state.
|
||||
type GetFeatureStateParams struct {
|
||||
FeatureState string `json:"featureState"`
|
||||
}
|
||||
|
||||
// GetFeatureState returns information about the feature state.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/SystemInfo#method-getFeatureState
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// featureState
|
||||
func GetFeatureState(featureState string) *GetFeatureStateParams {
|
||||
return &GetFeatureStateParams{
|
||||
FeatureState: featureState,
|
||||
}
|
||||
}
|
||||
|
||||
// GetFeatureStateReturns return values.
|
||||
type GetFeatureStateReturns struct {
|
||||
FeatureEnabled bool `json:"featureEnabled,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes SystemInfo.getFeatureState against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// featureEnabled
|
||||
func (p *GetFeatureStateParams) Do(ctx context.Context) (featureEnabled bool, err error) {
|
||||
// execute
|
||||
var res GetFeatureStateReturns
|
||||
err = cdp.Execute(ctx, CommandGetFeatureState, p, &res)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return res.FeatureEnabled, nil
|
||||
}
|
||||
|
||||
// GetProcessInfoParams returns information about all running processes.
|
||||
type GetProcessInfoParams struct{}
|
||||
|
||||
@@ -85,6 +124,7 @@ func (p *GetProcessInfoParams) Do(ctx context.Context) (processInfo []*ProcessIn
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandGetInfo = "SystemInfo.getInfo"
|
||||
CommandGetProcessInfo = "SystemInfo.getProcessInfo"
|
||||
CommandGetInfo = "SystemInfo.getInfo"
|
||||
CommandGetFeatureState = "SystemInfo.getFeatureState"
|
||||
CommandGetProcessInfo = "SystemInfo.getProcessInfo"
|
||||
)
|
||||
+7
-5
@@ -3,7 +3,7 @@ package systeminfo
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -82,7 +82,8 @@ func (t SubsamplingFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SubsamplingFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SubsamplingFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch SubsamplingFormat(v) {
|
||||
case SubsamplingFormatYuv420:
|
||||
*t = SubsamplingFormatYuv420
|
||||
case SubsamplingFormatYuv422:
|
||||
@@ -91,7 +92,7 @@ func (t *SubsamplingFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SubsamplingFormatYuv444
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SubsamplingFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown SubsamplingFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +130,8 @@ func (t ImageType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ImageType(in.String()) {
|
||||
v := in.String()
|
||||
switch ImageType(v) {
|
||||
case ImageTypeJpeg:
|
||||
*t = ImageTypeJpeg
|
||||
case ImageTypeWebp:
|
||||
@@ -138,7 +140,7 @@ func (t *ImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ImageTypeUnknown
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ImageType value"))
|
||||
in.AddError(fmt.Errorf("unknown ImageType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
@@ -525,6 +525,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(in *jlexer.Lexer, out
|
||||
(out.OpenerFrameID).UnmarshalEasyJSON(in)
|
||||
case "browserContextId":
|
||||
out.BrowserContextID = cdp.BrowserContextID(in.String())
|
||||
case "subtype":
|
||||
out.Subtype = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -584,6 +586,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.BrowserContextID))
|
||||
}
|
||||
if in.Subtype != "" {
|
||||
const prefix string = ",\"subtype\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Subtype))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -2035,6 +2042,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(in *jlexer.Lexer, ou
|
||||
out.NewWindow = bool(in.Bool())
|
||||
case "background":
|
||||
out.Background = bool(in.Bool())
|
||||
case "forTab":
|
||||
out.ForTab = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -2084,6 +2093,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.Background))
|
||||
}
|
||||
if in.ForTab {
|
||||
const prefix string = ",\"forTab\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.ForTab))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -293,6 +293,7 @@ type CreateTargetParams struct {
|
||||
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).
|
||||
ForTab bool `json:"forTab,omitempty"` // Whether to create the target of type "tab".
|
||||
}
|
||||
|
||||
// CreateTarget creates a new page.
|
||||
@@ -348,6 +349,12 @@ func (p CreateTargetParams) WithBackground(background bool) *CreateTargetParams
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithForTab whether to create the target of type "tab".
|
||||
func (p CreateTargetParams) WithForTab(forTab bool) *CreateTargetParams {
|
||||
p.ForTab = forTab
|
||||
return &p
|
||||
}
|
||||
|
||||
// CreateTargetReturns return values.
|
||||
type CreateTargetReturns struct {
|
||||
TargetID ID `json:"targetId,omitempty"` // The id of the page opened.
|
||||
|
||||
+1
@@ -39,6 +39,7 @@ type Info struct {
|
||||
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"`
|
||||
Subtype string `json:"subtype,omitempty"` // Provides additional details for specific target types. For example, for the type of "page", this may be set to "portal" or "prerender".
|
||||
}
|
||||
|
||||
// FilterEntry a filter used by target query/discovery/auto-attach
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@ type EventBufferUsage struct {
|
||||
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
|
||||
// EventDataCollected contains a bucket of collected trace events. When
|
||||
// tracing is stopped collected events will be sent as a sequence of
|
||||
// dataCollected events followed by tracingComplete event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-dataCollected
|
||||
|
||||
+19
-13
@@ -3,7 +3,7 @@ package tracing
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -61,14 +61,15 @@ func (t StreamFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *StreamFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch StreamFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch StreamFormat(v) {
|
||||
case StreamFormatJSON:
|
||||
*t = StreamFormatJSON
|
||||
case StreamFormatProto:
|
||||
*t = StreamFormatProto
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown StreamFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown StreamFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,14 +106,15 @@ func (t StreamCompression) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *StreamCompression) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch StreamCompression(in.String()) {
|
||||
v := in.String()
|
||||
switch StreamCompression(v) {
|
||||
case StreamCompressionNone:
|
||||
*t = StreamCompressionNone
|
||||
case StreamCompressionGzip:
|
||||
*t = StreamCompressionGzip
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown StreamCompression value"))
|
||||
in.AddError(fmt.Errorf("unknown StreamCompression value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +154,8 @@ func (t MemoryDumpLevelOfDetail) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MemoryDumpLevelOfDetail) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MemoryDumpLevelOfDetail(in.String()) {
|
||||
v := in.String()
|
||||
switch MemoryDumpLevelOfDetail(v) {
|
||||
case MemoryDumpLevelOfDetailBackground:
|
||||
*t = MemoryDumpLevelOfDetailBackground
|
||||
case MemoryDumpLevelOfDetailLight:
|
||||
@@ -161,7 +164,7 @@ func (t *MemoryDumpLevelOfDetail) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MemoryDumpLevelOfDetailDetailed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MemoryDumpLevelOfDetail value"))
|
||||
in.AddError(fmt.Errorf("unknown MemoryDumpLevelOfDetail value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +206,8 @@ func (t Backend) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Backend) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Backend(in.String()) {
|
||||
v := in.String()
|
||||
switch Backend(v) {
|
||||
case BackendAuto:
|
||||
*t = BackendAuto
|
||||
case BackendChrome:
|
||||
@@ -212,7 +216,7 @@ func (t *Backend) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BackendSystem
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Backend value"))
|
||||
in.AddError(fmt.Errorf("unknown Backend value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +255,8 @@ func (t RecordMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RecordMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch RecordMode(in.String()) {
|
||||
v := in.String()
|
||||
switch RecordMode(v) {
|
||||
case RecordModeRecordUntilFull:
|
||||
*t = RecordModeRecordUntilFull
|
||||
case RecordModeRecordContinuously:
|
||||
@@ -262,7 +267,7 @@ func (t *RecordMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = RecordModeEchoToConsole
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown RecordMode value"))
|
||||
in.AddError(fmt.Errorf("unknown RecordMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,14 +305,15 @@ func (t TransferMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TransferMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TransferMode(in.String()) {
|
||||
v := in.String()
|
||||
switch TransferMode(v) {
|
||||
case TransferModeReportEvents:
|
||||
*t = TransferModeReportEvents
|
||||
case TransferModeReturnAsStream:
|
||||
*t = TransferModeReturnAsStream
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TransferMode value"))
|
||||
in.AddError(fmt.Errorf("unknown TransferMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-11
@@ -3,7 +3,7 @@ package webaudio
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -50,14 +50,15 @@ func (t ContextType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContextType(in.String()) {
|
||||
v := in.String()
|
||||
switch ContextType(v) {
|
||||
case ContextTypeRealtime:
|
||||
*t = ContextTypeRealtime
|
||||
case ContextTypeOffline:
|
||||
*t = ContextTypeOffline
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContextType value"))
|
||||
in.AddError(fmt.Errorf("unknown ContextType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +96,8 @@ func (t ContextState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContextState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContextState(in.String()) {
|
||||
v := in.String()
|
||||
switch ContextState(v) {
|
||||
case ContextStateSuspended:
|
||||
*t = ContextStateSuspended
|
||||
case ContextStateRunning:
|
||||
@@ -104,7 +106,7 @@ func (t *ContextState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContextStateClosed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContextState value"))
|
||||
in.AddError(fmt.Errorf("unknown ContextState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +154,8 @@ func (t ChannelCountMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ChannelCountMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ChannelCountMode(in.String()) {
|
||||
v := in.String()
|
||||
switch ChannelCountMode(v) {
|
||||
case ChannelCountModeClampedMax:
|
||||
*t = ChannelCountModeClampedMax
|
||||
case ChannelCountModeExplicit:
|
||||
@@ -161,7 +164,7 @@ func (t *ChannelCountMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ChannelCountModeMax
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ChannelCountMode value"))
|
||||
in.AddError(fmt.Errorf("unknown ChannelCountMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,14 +202,15 @@ func (t ChannelInterpretation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ChannelInterpretation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ChannelInterpretation(in.String()) {
|
||||
v := in.String()
|
||||
switch ChannelInterpretation(v) {
|
||||
case ChannelInterpretationDiscrete:
|
||||
*t = ChannelInterpretationDiscrete
|
||||
case ChannelInterpretationSpeakers:
|
||||
*t = ChannelInterpretationSpeakers
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ChannelInterpretation value"))
|
||||
in.AddError(fmt.Errorf("unknown ChannelInterpretation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,14 +257,15 @@ func (t AutomationRate) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AutomationRate) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AutomationRate(in.String()) {
|
||||
v := in.String()
|
||||
switch AutomationRate(v) {
|
||||
case AutomationRateARate:
|
||||
*t = AutomationRateARate
|
||||
case AutomationRateKRate:
|
||||
*t = AutomationRateKRate
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AutomationRate value"))
|
||||
in.AddError(fmt.Errorf("unknown AutomationRate value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+341
-84
@@ -219,7 +219,94 @@ func (v *SetUserVerifiedParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *SetUserVerifiedParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(in *jlexer.Lexer, out *SetAutomaticPresenceSimulationParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(in *jlexer.Lexer, out *SetResponseOverrideBitsParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.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 "isBogusSignature":
|
||||
out.IsBogusSignature = bool(in.Bool())
|
||||
case "isBadUV":
|
||||
out.IsBadUV = bool(in.Bool())
|
||||
case "isBadUP":
|
||||
out.IsBadUP = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(out *jwriter.Writer, in SetResponseOverrideBitsParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"authenticatorId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.AuthenticatorID))
|
||||
}
|
||||
if in.IsBogusSignature {
|
||||
const prefix string = ",\"isBogusSignature\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.IsBogusSignature))
|
||||
}
|
||||
if in.IsBadUV {
|
||||
const prefix string = ",\"isBadUV\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.IsBadUV))
|
||||
}
|
||||
if in.IsBadUP {
|
||||
const prefix string = ",\"isBadUP\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.IsBadUP))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetResponseOverrideBitsParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetResponseOverrideBitsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetResponseOverrideBitsParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetResponseOverrideBitsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(in *jlexer.Lexer, out *SetAutomaticPresenceSimulationParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -252,7 +339,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(out *jwriter.Writer, in SetAutomaticPresenceSimulationParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(out *jwriter.Writer, in SetAutomaticPresenceSimulationParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -272,27 +359,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetAutomaticPresenceSimulationParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetAutomaticPresenceSimulationParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn2(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetAutomaticPresenceSimulationParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetAutomaticPresenceSimulationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn2(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(in *jlexer.Lexer, out *RemoveVirtualAuthenticatorParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(in *jlexer.Lexer, out *RemoveVirtualAuthenticatorParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -323,7 +410,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(out *jwriter.Writer, in RemoveVirtualAuthenticatorParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(out *jwriter.Writer, in RemoveVirtualAuthenticatorParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -338,27 +425,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveVirtualAuthenticatorParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(in *jlexer.Lexer, out *RemoveCredentialParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(in *jlexer.Lexer, out *RemoveCredentialParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -391,7 +478,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(out *jwriter.Writer, in RemoveCredentialParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(out *jwriter.Writer, in RemoveCredentialParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -411,27 +498,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveCredentialParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveCredentialParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(in *jlexer.Lexer, out *GetCredentialsReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(in *jlexer.Lexer, out *GetCredentialsReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -491,7 +578,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(out *jwriter.Writer, in GetCredentialsReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(out *jwriter.Writer, in GetCredentialsReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -520,27 +607,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetCredentialsReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetCredentialsReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn5(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetCredentialsReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetCredentialsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn5(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(in *jlexer.Lexer, out *GetCredentialsParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(in *jlexer.Lexer, out *GetCredentialsParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -571,7 +658,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(out *jwriter.Writer, in GetCredentialsParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(out *jwriter.Writer, in GetCredentialsParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -586,27 +673,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetCredentialsParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetCredentialsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn6(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetCredentialsParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn6(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(in *jlexer.Lexer, out *GetCredentialReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(in *jlexer.Lexer, out *GetCredentialReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -645,7 +732,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(out *jwriter.Writer, in GetCredentialReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(out *jwriter.Writer, in GetCredentialReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -661,27 +748,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetCredentialReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetCredentialReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetCredentialReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetCredentialReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(in *jlexer.Lexer, out *GetCredentialParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(in *jlexer.Lexer, out *GetCredentialParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -714,7 +801,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(out *jwriter.Writer, in GetCredentialParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(out *jwriter.Writer, in GetCredentialParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -734,27 +821,197 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetCredentialParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn8(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetCredentialParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn8(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(in *jlexer.Lexer, out *EventCredentialAsserted) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(out *jwriter.Writer, in EventCredentialAsserted) {
|
||||
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 EventCredentialAsserted) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventCredentialAsserted) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventCredentialAsserted) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventCredentialAsserted) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(in *jlexer.Lexer, out *EventCredentialAdded) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(out *jwriter.Writer, in EventCredentialAdded) {
|
||||
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 EventCredentialAdded) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventCredentialAdded) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventCredentialAdded) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventCredentialAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -785,7 +1042,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -801,27 +1058,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn9(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn9(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -850,7 +1107,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -860,27 +1117,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn10(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn10(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(in *jlexer.Lexer, out *Credential) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(in *jlexer.Lexer, out *Credential) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -923,7 +1180,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(out *jwriter.Writer, in Credential) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(out *jwriter.Writer, in Credential) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -968,27 +1225,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v Credential) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v Credential) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn11(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *Credential) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *Credential) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn11(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(in *jlexer.Lexer, out *ClearCredentialsParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(in *jlexer.Lexer, out *ClearCredentialsParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1019,7 +1276,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(out *jwriter.Writer, in ClearCredentialsParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(out *jwriter.Writer, in ClearCredentialsParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1034,27 +1291,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ClearCredentialsParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ClearCredentialsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn12(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ClearCredentialsParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ClearCredentialsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn12(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(in *jlexer.Lexer, out *AddVirtualAuthenticatorReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn16(in *jlexer.Lexer, out *AddVirtualAuthenticatorReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1085,7 +1342,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(out *jwriter.Writer, in AddVirtualAuthenticatorReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn16(out *jwriter.Writer, in AddVirtualAuthenticatorReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1101,27 +1358,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AddVirtualAuthenticatorReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn16(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AddVirtualAuthenticatorReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn13(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn16(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AddVirtualAuthenticatorReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn16(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AddVirtualAuthenticatorReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn13(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn16(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(in *jlexer.Lexer, out *AddVirtualAuthenticatorParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn17(in *jlexer.Lexer, out *AddVirtualAuthenticatorParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1160,7 +1417,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(out *jwriter.Writer, in AddVirtualAuthenticatorParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn17(out *jwriter.Writer, in AddVirtualAuthenticatorParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1179,27 +1436,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AddVirtualAuthenticatorParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn17(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AddVirtualAuthenticatorParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn14(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn17(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AddVirtualAuthenticatorParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn17(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AddVirtualAuthenticatorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn14(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn17(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(in *jlexer.Lexer, out *AddCredentialParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn18(in *jlexer.Lexer, out *AddCredentialParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1240,7 +1497,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(in *jlexer.Lexer,
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(out *jwriter.Writer, in AddCredentialParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn18(out *jwriter.Writer, in AddCredentialParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1264,23 +1521,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(out *jwriter.Write
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AddCredentialParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn18(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AddCredentialParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn15(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn18(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AddCredentialParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn18(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AddCredentialParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn15(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn18(l, v)
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package webauthn
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventCredentialAdded triggered when a credential is added to an
|
||||
// authenticator.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialAdded
|
||||
type EventCredentialAdded struct {
|
||||
AuthenticatorID AuthenticatorID `json:"authenticatorId"`
|
||||
Credential *Credential `json:"credential"`
|
||||
}
|
||||
|
||||
// EventCredentialAsserted triggered when a credential is used in a webauthn
|
||||
// assertion.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#event-credentialAsserted
|
||||
type EventCredentialAsserted struct {
|
||||
AuthenticatorID AuthenticatorID `json:"authenticatorId"`
|
||||
Credential *Credential `json:"credential"`
|
||||
}
|
||||
+10
-7
@@ -3,7 +3,7 @@ package webauthn
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -48,14 +48,15 @@ func (t AuthenticatorProtocol) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthenticatorProtocol) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthenticatorProtocol(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthenticatorProtocol(v) {
|
||||
case AuthenticatorProtocolU2f:
|
||||
*t = AuthenticatorProtocolU2f
|
||||
case AuthenticatorProtocolCtap2:
|
||||
*t = AuthenticatorProtocolCtap2
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthenticatorProtocol value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthenticatorProtocol value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,14 +93,15 @@ func (t Ctap2version) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Ctap2version) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Ctap2version(in.String()) {
|
||||
v := in.String()
|
||||
switch Ctap2version(v) {
|
||||
case Ctap2versionCtap20:
|
||||
*t = Ctap2versionCtap20
|
||||
case Ctap2versionCtap21:
|
||||
*t = Ctap2versionCtap21
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Ctap2version value"))
|
||||
in.AddError(fmt.Errorf("unknown Ctap2version value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +141,8 @@ func (t AuthenticatorTransport) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthenticatorTransport) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthenticatorTransport(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthenticatorTransport(v) {
|
||||
case AuthenticatorTransportUsb:
|
||||
*t = AuthenticatorTransportUsb
|
||||
case AuthenticatorTransportNfc:
|
||||
@@ -152,7 +155,7 @@ func (t *AuthenticatorTransport) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AuthenticatorTransportInternal
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthenticatorTransport value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthenticatorTransport value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+50
@@ -99,6 +99,55 @@ func (p *AddVirtualAuthenticatorParams) Do(ctx context.Context) (authenticatorID
|
||||
return res.AuthenticatorID, nil
|
||||
}
|
||||
|
||||
// SetResponseOverrideBitsParams resets parameters isBogusSignature, isBadUV,
|
||||
// isBadUP to false if they are not present.
|
||||
type SetResponseOverrideBitsParams struct {
|
||||
AuthenticatorID AuthenticatorID `json:"authenticatorId"`
|
||||
IsBogusSignature bool `json:"isBogusSignature,omitempty"` // If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.
|
||||
IsBadUV bool `json:"isBadUV,omitempty"` // If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.
|
||||
IsBadUP bool `json:"isBadUP,omitempty"` // If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.
|
||||
}
|
||||
|
||||
// SetResponseOverrideBits resets parameters isBogusSignature, isBadUV,
|
||||
// isBadUP to false if they are not present.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebAuthn#method-setResponseOverrideBits
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// authenticatorID
|
||||
func SetResponseOverrideBits(authenticatorID AuthenticatorID) *SetResponseOverrideBitsParams {
|
||||
return &SetResponseOverrideBitsParams{
|
||||
AuthenticatorID: authenticatorID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithIsBogusSignature if isBogusSignature is set, overrides the signature
|
||||
// in the authenticator response to be zero. Defaults to false.
|
||||
func (p SetResponseOverrideBitsParams) WithIsBogusSignature(isBogusSignature bool) *SetResponseOverrideBitsParams {
|
||||
p.IsBogusSignature = isBogusSignature
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithIsBadUV if isBadUV is set, overrides the UV bit in the flags in the
|
||||
// authenticator response to be zero. Defaults to false.
|
||||
func (p SetResponseOverrideBitsParams) WithIsBadUV(isBadUV bool) *SetResponseOverrideBitsParams {
|
||||
p.IsBadUV = isBadUV
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithIsBadUP if isBadUP is set, overrides the UP bit in the flags in the
|
||||
// authenticator response to be zero. Defaults to false.
|
||||
func (p SetResponseOverrideBitsParams) WithIsBadUP(isBadUP bool) *SetResponseOverrideBitsParams {
|
||||
p.IsBadUP = isBadUP
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes WebAuthn.setResponseOverrideBits against the provided context.
|
||||
func (p *SetResponseOverrideBitsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetResponseOverrideBits, p, nil)
|
||||
}
|
||||
|
||||
// RemoveVirtualAuthenticatorParams removes the given authenticator.
|
||||
type RemoveVirtualAuthenticatorParams struct {
|
||||
AuthenticatorID AuthenticatorID `json:"authenticatorId"`
|
||||
@@ -346,6 +395,7 @@ const (
|
||||
CommandEnable = "WebAuthn.enable"
|
||||
CommandDisable = "WebAuthn.disable"
|
||||
CommandAddVirtualAuthenticator = "WebAuthn.addVirtualAuthenticator"
|
||||
CommandSetResponseOverrideBits = "WebAuthn.setResponseOverrideBits"
|
||||
CommandRemoveVirtualAuthenticator = "WebAuthn.removeVirtualAuthenticator"
|
||||
CommandAddCredential = "WebAuthn.addCredential"
|
||||
CommandGetCredential = "WebAuthn.getCredential"
|
||||
|
||||
+40
-11
@@ -7,7 +7,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -96,7 +95,7 @@ func NewExecAllocator(parent context.Context, opts ...ExecAllocatorOption) (cont
|
||||
return ctx, cancelWait
|
||||
}
|
||||
|
||||
// ExecAllocatorOption is a exec allocator option.
|
||||
// ExecAllocatorOption is an exec allocator option.
|
||||
type ExecAllocatorOption = func(*ExecAllocator)
|
||||
|
||||
// ExecAllocator is an Allocator which starts new browser processes on the host
|
||||
@@ -147,7 +146,7 @@ func (a *ExecAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (*B
|
||||
removeDir := false
|
||||
dataDir, ok := a.initFlags["user-data-dir"].(string)
|
||||
if !ok {
|
||||
tempDir, err := ioutil.TempDir(allocTempDir, "chromedp-runner")
|
||||
tempDir, err := os.MkdirTemp(allocTempDir, "chromedp-runner")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -511,6 +510,7 @@ func WSURLReadTimeout(t time.Duration) ExecAllocatorOption {
|
||||
// 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".
|
||||
//
|
||||
@@ -519,21 +519,34 @@ func WSURLReadTimeout(t time.Duration) ExecAllocatorOption {
|
||||
// * 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) {
|
||||
// Because the allocator won't try to modify it and it's obviously invalid.
|
||||
//
|
||||
// Use chromedp.NoModifyURL to prevent it from modifying the url.
|
||||
func NewRemoteAllocator(parent context.Context, url string, opts ...RemoteAllocatorOption) (context.Context, context.CancelFunc) {
|
||||
a := &RemoteAllocator{
|
||||
wsURL: url,
|
||||
modifyURLFunc: func(ctx context.Context, wsURL string) (string, error) {
|
||||
return modifyURL(ctx, wsURL)
|
||||
},
|
||||
}
|
||||
for _, o := range opts {
|
||||
o(a)
|
||||
}
|
||||
c := &Context{Allocator: a}
|
||||
|
||||
ctx, cancel := context.WithCancel(parent)
|
||||
c := &Context{Allocator: &RemoteAllocator{
|
||||
wsURL: detectURL(url),
|
||||
}}
|
||||
ctx = context.WithValue(ctx, contextKey{}, c)
|
||||
return ctx, cancel
|
||||
}
|
||||
|
||||
// RemoteAllocatorOption is a remote allocator option.
|
||||
type RemoteAllocatorOption = func(*RemoteAllocator)
|
||||
|
||||
// RemoteAllocator is an Allocator which connects to an already running Chrome
|
||||
// process via a websocket URL.
|
||||
type RemoteAllocator struct {
|
||||
wsURL string
|
||||
wsURL string
|
||||
modifyURLFunc func(ctx context.Context, wsURL string) (string, error)
|
||||
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
@@ -545,6 +558,15 @@ func (a *RemoteAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (
|
||||
return nil, ErrInvalidContext
|
||||
}
|
||||
|
||||
wsURL := a.wsURL
|
||||
var err error
|
||||
if a.modifyURLFunc != nil {
|
||||
wsURL, err = a.modifyURLFunc(ctx, wsURL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to modify wsURL: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// 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())
|
||||
@@ -557,7 +579,8 @@ func (a *RemoteAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (
|
||||
cancel() // close the websocket connection
|
||||
a.wg.Done()
|
||||
}()
|
||||
browser, err := NewBrowser(wctx, a.wsURL, opts...)
|
||||
|
||||
browser, err := NewBrowser(wctx, wsURL, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -578,3 +601,9 @@ func (a *RemoteAllocator) Allocate(ctx context.Context, opts ...BrowserOption) (
|
||||
func (a *RemoteAllocator) Wait() {
|
||||
a.wg.Wait()
|
||||
}
|
||||
|
||||
// NoModifyURL is a RemoteAllocatorOption that prevents the remote allocator
|
||||
// from modifying the websocket debugger URL passed to it.
|
||||
func NoModifyURL(a *RemoteAllocator) {
|
||||
a.modifyURLFunc = nil
|
||||
}
|
||||
-1
@@ -109,7 +109,6 @@ func NewBrowser(ctx context.Context, urlstr string, opts ...BrowserOption) (*Bro
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
+5
-18
@@ -59,6 +59,7 @@ func Screenshot(sel interface{}, picbuf *[]byte, opts ...QueryOption) QueryActio
|
||||
buf, err := page.CaptureScreenshot().
|
||||
WithFormat(page.CaptureScreenshotFormatPng).
|
||||
WithCaptureBeyondViewport(true).
|
||||
WithFromSurface(true).
|
||||
WithClip(&clip).
|
||||
Do(ctx)
|
||||
if err != nil {
|
||||
@@ -88,7 +89,7 @@ func CaptureScreenshot(res *[]byte) Action {
|
||||
return ActionFunc(func(ctx context.Context) error {
|
||||
var err error
|
||||
*res, err = page.CaptureScreenshot().
|
||||
WithCaptureBeyondViewport(true).
|
||||
WithFromSurface(true).
|
||||
Do(ctx)
|
||||
return err
|
||||
})
|
||||
@@ -107,33 +108,19 @@ func FullScreenshot(res *[]byte, quality int) EmulateAction {
|
||||
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
|
||||
}
|
||||
|
||||
format := page.CaptureScreenshotFormatPng
|
||||
if quality != 100 {
|
||||
format = page.CaptureScreenshotFormatJpeg
|
||||
}
|
||||
|
||||
// capture screenshot
|
||||
var err error
|
||||
*res, err = page.CaptureScreenshot().
|
||||
WithCaptureBeyondViewport(true).
|
||||
WithFromSurface(true).
|
||||
WithFormat(format).
|
||||
WithQuality(int64(quality)).
|
||||
WithClip(&page.Viewport{
|
||||
X: 0,
|
||||
Y: 0,
|
||||
Width: contentSize.Width,
|
||||
Height: contentSize.Height,
|
||||
Scale: 1,
|
||||
}).Do(ctx)
|
||||
Do(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+74
-28
@@ -1,11 +1,13 @@
|
||||
package chromedp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chromedp/cdproto"
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
@@ -15,62 +17,106 @@ import (
|
||||
//
|
||||
// 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 {
|
||||
// See https://github.com/chromium/chromium/commit/0e914b95f7cae6e8238e4e9075f248f801c686e6.
|
||||
func forceIP(ctx context.Context, urlstr string) (string, error) {
|
||||
u, err := url.Parse(urlstr)
|
||||
if err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
host, port, err := net.SplitHostPort(u.Host)
|
||||
if err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
addr, err := net.ResolveIPAddr("ip", host)
|
||||
host, err = resolveHost(ctx, host)
|
||||
if err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
u.Host = net.JoinHostPort(addr.IP.String(), port)
|
||||
return u.String()
|
||||
u.Host = net.JoinHostPort(host, port)
|
||||
return u.String(), nil
|
||||
}
|
||||
|
||||
// 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
|
||||
// resolveHost tries to resolve a host to be an IP address. If the host is
|
||||
// an IP address or "localhost", it returns the host directly.
|
||||
func resolveHost(ctx context.Context, host string) (string, error) {
|
||||
if host == "localhost" {
|
||||
return host, nil
|
||||
}
|
||||
ip := net.ParseIP(host)
|
||||
if ip != nil {
|
||||
return host, nil
|
||||
}
|
||||
|
||||
// replace the scheme and path to construct the URL like:
|
||||
addrs, err := net.DefaultResolver.LookupIPAddr(ctx, host)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return addrs[0].IP.String(), nil
|
||||
}
|
||||
|
||||
// modifyURL modifies the websocket debugger URL if the provided URL is not a
|
||||
// valid websocket debugger URL.
|
||||
//
|
||||
// A websocket debugger URL containing "/devtools/browser/" are considered
|
||||
// valid. In this case, urlstr will only be modified by forceIP.
|
||||
//
|
||||
// Otherwise, it will construct a URL like http://[host]:[port]/json/version
|
||||
// and query the valid websocket debugger URL from this endpoint. The [host]
|
||||
// and [port] are parsed from the urlstr. If the host component is not an IP,
|
||||
// it will be resolved to an IP first. Example parameters:
|
||||
// - ws://127.0.0.1:9222/
|
||||
// - http://127.0.0.1:9222/
|
||||
// - http://container-name:9222/
|
||||
func modifyURL(ctx context.Context, urlstr string) (string, error) {
|
||||
lctx, cancel := context.WithTimeout(ctx, 20*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if strings.Contains(urlstr, "/devtools/browser/") {
|
||||
return forceIP(lctx, urlstr)
|
||||
}
|
||||
|
||||
// replace the scheme and path to construct a URL like:
|
||||
// http://127.0.0.1:9222/json/version
|
||||
u, err := url.Parse(urlstr)
|
||||
if err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
u.Scheme = "http"
|
||||
host, port, err := net.SplitHostPort(u.Host)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
host, err = resolveHost(ctx, host)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
u.Host = net.JoinHostPort(host, port)
|
||||
u.Path = "/json/version"
|
||||
|
||||
// to get "webSocketDebuggerUrl" in the response
|
||||
resp, err := http.Get(forceIP(u.String()))
|
||||
req, err := http.NewRequestWithContext(lctx, "GET", u.String(), nil)
|
||||
if err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
var result map[string]interface{}
|
||||
if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
|
||||
return urlstr
|
||||
return "", err
|
||||
}
|
||||
// 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/...
|
||||
// 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 websocket debugger URL will be something like:
|
||||
// ws://127.0.0.1:9000/devtools/browser/...
|
||||
wsURL := result["webSocketDebuggerUrl"].(string)
|
||||
return wsURL
|
||||
return wsURL, nil
|
||||
}
|
||||
|
||||
func runListeners(list []cancelableListener, ev interface{}) []cancelableListener {
|
||||
|
||||
Loaded 100 of 410 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user