chromedp/cdp/cdputil/cdputil.go

1327 lines
33 KiB
Go
Raw Normal View History

package cdputil
2017-01-24 15:09:23 +00:00
// Code generated by chromedp-gen. DO NOT EDIT.
2017-01-24 15:09:23 +00:00
import (
"errors"
2017-01-26 07:28:34 +00:00
cdp "github.com/knq/chromedp/cdp"
2017-01-24 15:09:23 +00:00
"github.com/knq/chromedp/cdp/accessibility"
"github.com/knq/chromedp/cdp/animation"
"github.com/knq/chromedp/cdp/applicationcache"
"github.com/knq/chromedp/cdp/browser"
2017-01-24 15:09:23 +00:00
"github.com/knq/chromedp/cdp/cachestorage"
"github.com/knq/chromedp/cdp/css"
"github.com/knq/chromedp/cdp/database"
"github.com/knq/chromedp/cdp/debugger"
"github.com/knq/chromedp/cdp/dom"
"github.com/knq/chromedp/cdp/domdebugger"
"github.com/knq/chromedp/cdp/domsnapshot"
2017-01-24 15:09:23 +00:00
"github.com/knq/chromedp/cdp/domstorage"
"github.com/knq/chromedp/cdp/emulation"
"github.com/knq/chromedp/cdp/heapprofiler"
"github.com/knq/chromedp/cdp/indexeddb"
"github.com/knq/chromedp/cdp/inspector"
iodom "github.com/knq/chromedp/cdp/io"
"github.com/knq/chromedp/cdp/layertree"
logdom "github.com/knq/chromedp/cdp/log"
"github.com/knq/chromedp/cdp/memory"
"github.com/knq/chromedp/cdp/network"
"github.com/knq/chromedp/cdp/overlay"
2017-01-24 15:09:23 +00:00
"github.com/knq/chromedp/cdp/page"
"github.com/knq/chromedp/cdp/profiler"
"github.com/knq/chromedp/cdp/runtime"
"github.com/knq/chromedp/cdp/schema"
"github.com/knq/chromedp/cdp/security"
"github.com/knq/chromedp/cdp/serviceworker"
"github.com/knq/chromedp/cdp/storage"
2017-01-24 15:09:23 +00:00
"github.com/knq/chromedp/cdp/systeminfo"
"github.com/knq/chromedp/cdp/target"
"github.com/knq/chromedp/cdp/tethering"
"github.com/knq/chromedp/cdp/tracing"
"github.com/mailru/easyjson"
)
type empty struct{}
var emptyVal = &empty{}
// UnmarshalMessage unmarshals the message result or params.
2017-01-26 07:28:34 +00:00
func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
2017-01-24 15:09:23 +00:00
var v easyjson.Unmarshaler
switch msg.Method {
2017-01-26 07:28:34 +00:00
case cdp.CommandInspectorEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInspectorDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventInspectorDetached:
2017-01-24 15:09:23 +00:00
v = new(inspector.EventDetached)
2017-01-26 07:28:34 +00:00
case cdp.EventInspectorTargetCrashed:
2017-01-24 15:09:23 +00:00
v = new(inspector.EventTargetCrashed)
2017-01-26 07:28:34 +00:00
case cdp.CommandMemoryGetDOMCounters:
2017-01-24 15:09:23 +00:00
v = new(memory.GetDOMCountersReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandMemorySetPressureNotificationsSuppressed:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandMemorySimulatePressureNotification:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandPageAddScriptToEvaluateOnNewDocument:
v = new(page.AddScriptToEvaluateOnNewDocumentReturns)
2017-01-24 15:09:23 +00:00
case cdp.CommandPageRemoveScriptToEvaluateOnNewDocument:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageSetAutoAttachToCreatedPages:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageReload:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageNavigate:
2017-01-24 15:09:23 +00:00
v = new(page.NavigateReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageStopLoading:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageGetNavigationHistory:
2017-01-24 15:09:23 +00:00
v = new(page.GetNavigationHistoryReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageNavigateToHistoryEntry:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageGetResourceTree:
2017-01-24 15:09:23 +00:00
v = new(page.GetResourceTreeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageGetResourceContent:
2017-01-24 15:09:23 +00:00
v = new(page.GetResourceContentReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageSearchInResource:
2017-01-24 15:09:23 +00:00
v = new(page.SearchInResourceReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageSetDocumentContent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageCaptureScreenshot:
2017-01-24 15:09:23 +00:00
v = new(page.CaptureScreenshotReturns)
case cdp.CommandPagePrintToPDF:
v = new(page.PrintToPDFReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageStartScreencast:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageStopScreencast:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageScreencastFrameAck:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageHandleJavaScriptDialog:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageGetAppManifest:
2017-01-24 15:09:23 +00:00
v = new(page.GetAppManifestReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandPageRequestAppBanner:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageSetControlNavigations:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageProcessNavigation:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandPageGetLayoutMetrics:
2017-01-24 15:09:23 +00:00
v = new(page.GetLayoutMetricsReturns)
2017-05-15 07:59:53 +00:00
case cdp.CommandPageCreateIsolatedWorld:
2017-06-25 01:38:47 +00:00
v = new(page.CreateIsolatedWorldReturns)
2017-05-15 07:59:53 +00:00
2017-01-26 07:28:34 +00:00
case cdp.EventPageDomContentEventFired:
2017-01-24 15:09:23 +00:00
v = new(page.EventDomContentEventFired)
2017-01-26 07:28:34 +00:00
case cdp.EventPageLoadEventFired:
2017-01-24 15:09:23 +00:00
v = new(page.EventLoadEventFired)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameAttached:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameAttached)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameNavigated:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameNavigated)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameDetached:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameDetached)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameStartedLoading:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameStartedLoading)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameStoppedLoading:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameStoppedLoading)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameScheduledNavigation:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameScheduledNavigation)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameClearedScheduledNavigation:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameClearedScheduledNavigation)
2017-01-26 07:28:34 +00:00
case cdp.EventPageFrameResized:
2017-01-24 15:09:23 +00:00
v = new(page.EventFrameResized)
2017-01-26 07:28:34 +00:00
case cdp.EventPageJavascriptDialogOpening:
2017-01-24 15:09:23 +00:00
v = new(page.EventJavascriptDialogOpening)
2017-01-26 07:28:34 +00:00
case cdp.EventPageJavascriptDialogClosed:
2017-01-24 15:09:23 +00:00
v = new(page.EventJavascriptDialogClosed)
2017-01-26 07:28:34 +00:00
case cdp.EventPageScreencastFrame:
2017-01-24 15:09:23 +00:00
v = new(page.EventScreencastFrame)
2017-01-26 07:28:34 +00:00
case cdp.EventPageScreencastVisibilityChanged:
2017-01-24 15:09:23 +00:00
v = new(page.EventScreencastVisibilityChanged)
2017-01-26 07:28:34 +00:00
case cdp.EventPageInterstitialShown:
2017-01-24 15:09:23 +00:00
v = new(page.EventInterstitialShown)
2017-01-26 07:28:34 +00:00
case cdp.EventPageInterstitialHidden:
2017-01-24 15:09:23 +00:00
v = new(page.EventInterstitialHidden)
2017-01-26 07:28:34 +00:00
case cdp.EventPageNavigationRequested:
2017-01-24 15:09:23 +00:00
v = new(page.EventNavigationRequested)
case cdp.CommandOverlayEnable:
return emptyVal, nil
case cdp.CommandOverlayDisable:
return emptyVal, nil
case cdp.CommandOverlaySetShowPaintRects:
return emptyVal, nil
case cdp.CommandOverlaySetShowDebugBorders:
return emptyVal, nil
case cdp.CommandOverlaySetShowFPSCounter:
return emptyVal, nil
case cdp.CommandOverlaySetShowScrollBottleneckRects:
return emptyVal, nil
case cdp.CommandOverlaySetShowViewportSizeOnResize:
return emptyVal, nil
case cdp.CommandOverlaySetPausedInDebuggerMessage:
return emptyVal, nil
case cdp.CommandOverlaySetSuspended:
return emptyVal, nil
case cdp.CommandOverlaySetInspectMode:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandOverlayHighlightRect:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandOverlayHighlightQuad:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandOverlayHighlightNode:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandOverlayHighlightFrame:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandOverlayHideHighlight:
return emptyVal, nil
case cdp.CommandOverlayGetHighlightObjectForTest:
v = new(overlay.GetHighlightObjectForTestReturns)
case cdp.EventOverlayNodeHighlightRequested:
v = new(overlay.EventNodeHighlightRequested)
case cdp.EventOverlayInspectNodeRequested:
v = new(overlay.EventInspectNodeRequested)
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetDeviceMetricsOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationClearDeviceMetricsOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationResetPageScaleFactor:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetPageScaleFactor:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetScriptExecutionDisabled:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetGeolocationOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationClearGeolocationOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetTouchEmulationEnabled:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetEmulatedMedia:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetCPUThrottlingRate:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationCanEmulate:
2017-01-24 15:09:23 +00:00
v = new(emulation.CanEmulateReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandEmulationSetVirtualTimePolicy:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandEmulationSetDefaultBackgroundColorOverride:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventEmulationVirtualTimeBudgetExpired:
2017-01-24 15:09:23 +00:00
v = new(emulation.EventVirtualTimeBudgetExpired)
2017-01-26 07:28:34 +00:00
case cdp.CommandSecurityEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandSecurityDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandSecurityShowCertificateViewer:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-03-24 22:51:18 +00:00
case cdp.CommandSecurityHandleCertificateError:
return emptyVal, nil
case cdp.CommandSecuritySetOverrideCertificateErrors:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventSecuritySecurityStateChanged:
2017-01-24 15:09:23 +00:00
v = new(security.EventSecurityStateChanged)
2017-03-24 22:51:18 +00:00
case cdp.EventSecurityCertificateError:
v = new(security.EventCertificateError)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetUserAgentOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetExtraHTTPHeaders:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkGetResponseBody:
2017-01-24 15:09:23 +00:00
v = new(network.GetResponseBodyReturns)
2017-03-13 02:29:26 +00:00
case cdp.CommandNetworkSetBlockedURLS:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkReplayXHR:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkCanClearBrowserCache:
2017-01-24 15:09:23 +00:00
v = new(network.CanClearBrowserCacheReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkClearBrowserCache:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkCanClearBrowserCookies:
2017-01-24 15:09:23 +00:00
v = new(network.CanClearBrowserCookiesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkClearBrowserCookies:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkGetCookies:
2017-01-24 15:09:23 +00:00
v = new(network.GetCookiesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkGetAllCookies:
2017-01-24 15:09:23 +00:00
v = new(network.GetAllCookiesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkDeleteCookie:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetCookie:
2017-01-24 15:09:23 +00:00
v = new(network.SetCookieReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkCanEmulateNetworkConditions:
2017-01-24 15:09:23 +00:00
v = new(network.CanEmulateNetworkConditionsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkEmulateNetworkConditions:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetCacheDisabled:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetBypassServiceWorker:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkSetDataSizeLimitsForTest:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandNetworkGetCertificate:
2017-01-24 15:09:23 +00:00
v = new(network.GetCertificateReturns)
case cdp.CommandNetworkSetRequestInterceptionEnabled:
2017-06-06 10:57:18 +00:00
return emptyVal, nil
case cdp.CommandNetworkContinueInterceptedRequest:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkResourceChangedPriority:
2017-01-24 15:09:23 +00:00
v = new(network.EventResourceChangedPriority)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkRequestWillBeSent:
2017-01-24 15:09:23 +00:00
v = new(network.EventRequestWillBeSent)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkRequestServedFromCache:
2017-01-24 15:09:23 +00:00
v = new(network.EventRequestServedFromCache)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkResponseReceived:
2017-01-24 15:09:23 +00:00
v = new(network.EventResponseReceived)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkDataReceived:
2017-01-24 15:09:23 +00:00
v = new(network.EventDataReceived)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkLoadingFinished:
2017-01-24 15:09:23 +00:00
v = new(network.EventLoadingFinished)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkLoadingFailed:
2017-01-24 15:09:23 +00:00
v = new(network.EventLoadingFailed)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketWillSendHandshakeRequest:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketWillSendHandshakeRequest)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketHandshakeResponseReceived:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketHandshakeResponseReceived)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketCreated:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketCreated)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketClosed:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketClosed)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketFrameReceived:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketFrameReceived)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketFrameError:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketFrameError)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkWebSocketFrameSent:
2017-01-24 15:09:23 +00:00
v = new(network.EventWebSocketFrameSent)
2017-01-26 07:28:34 +00:00
case cdp.EventNetworkEventSourceMessageReceived:
2017-01-24 15:09:23 +00:00
v = new(network.EventEventSourceMessageReceived)
2017-06-06 10:57:18 +00:00
case cdp.EventNetworkRequestIntercepted:
v = new(network.EventRequestIntercepted)
2017-01-26 07:28:34 +00:00
case cdp.CommandDatabaseEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDatabaseDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDatabaseGetDatabaseTableNames:
2017-01-24 15:09:23 +00:00
v = new(database.GetDatabaseTableNamesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDatabaseExecuteSQL:
2017-01-24 15:09:23 +00:00
v = new(database.ExecuteSQLReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventDatabaseAddDatabase:
2017-01-24 15:09:23 +00:00
v = new(database.EventAddDatabase)
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBRequestDatabaseNames:
2017-01-24 15:09:23 +00:00
v = new(indexeddb.RequestDatabaseNamesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBRequestDatabase:
2017-01-24 15:09:23 +00:00
v = new(indexeddb.RequestDatabaseReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBRequestData:
2017-01-24 15:09:23 +00:00
v = new(indexeddb.RequestDataReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandIndexedDBClearObjectStore:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandIndexedDBDeleteDatabase:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCacheStorageRequestCacheNames:
2017-01-24 15:09:23 +00:00
v = new(cachestorage.RequestCacheNamesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCacheStorageRequestEntries:
2017-01-24 15:09:23 +00:00
v = new(cachestorage.RequestEntriesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCacheStorageDeleteCache:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCacheStorageDeleteEntry:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageClear:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageGetDOMStorageItems:
2017-01-24 15:09:23 +00:00
v = new(domstorage.GetDOMStorageItemsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageSetDOMStorageItem:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMStorageRemoveDOMStorageItem:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventDOMStorageDomStorageItemsCleared:
2017-01-24 15:09:23 +00:00
v = new(domstorage.EventDomStorageItemsCleared)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMStorageDomStorageItemRemoved:
2017-01-24 15:09:23 +00:00
v = new(domstorage.EventDomStorageItemRemoved)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMStorageDomStorageItemAdded:
2017-01-24 15:09:23 +00:00
v = new(domstorage.EventDomStorageItemAdded)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMStorageDomStorageItemUpdated:
2017-01-24 15:09:23 +00:00
v = new(domstorage.EventDomStorageItemUpdated)
2017-01-26 07:28:34 +00:00
case cdp.CommandApplicationCacheGetFramesWithManifests:
2017-01-24 15:09:23 +00:00
v = new(applicationcache.GetFramesWithManifestsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandApplicationCacheEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandApplicationCacheGetManifestForFrame:
2017-01-24 15:09:23 +00:00
v = new(applicationcache.GetManifestForFrameReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandApplicationCacheGetApplicationCacheForFrame:
2017-01-24 15:09:23 +00:00
v = new(applicationcache.GetApplicationCacheForFrameReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventApplicationCacheApplicationCacheStatusUpdated:
2017-01-24 15:09:23 +00:00
v = new(applicationcache.EventApplicationCacheStatusUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventApplicationCacheNetworkStateUpdated:
2017-01-24 15:09:23 +00:00
v = new(applicationcache.EventNetworkStateUpdated)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetDocument:
2017-01-24 15:09:23 +00:00
v = new(dom.GetDocumentReturns)
case cdp.CommandDOMGetFlattenedDocument:
v = new(dom.GetFlattenedDocumentReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMCollectClassNamesFromSubtree:
2017-01-24 15:09:23 +00:00
v = new(dom.CollectClassNamesFromSubtreeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMRequestChildNodes:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMQuerySelector:
2017-01-24 15:09:23 +00:00
v = new(dom.QuerySelectorReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMQuerySelectorAll:
2017-01-24 15:09:23 +00:00
v = new(dom.QuerySelectorAllReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetNodeName:
2017-01-24 15:09:23 +00:00
v = new(dom.SetNodeNameReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetNodeValue:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMRemoveNode:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetAttributeValue:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetAttributesAsText:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMRemoveAttribute:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetOuterHTML:
2017-01-24 15:09:23 +00:00
v = new(dom.GetOuterHTMLReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetOuterHTML:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMPerformSearch:
2017-01-24 15:09:23 +00:00
v = new(dom.PerformSearchReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetSearchResults:
2017-01-24 15:09:23 +00:00
v = new(dom.GetSearchResultsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDiscardSearchResults:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMRequestNode:
2017-01-24 15:09:23 +00:00
v = new(dom.RequestNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMPushNodeByPathToFrontend:
2017-01-24 15:09:23 +00:00
v = new(dom.PushNodeByPathToFrontendReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMPushNodesByBackendIdsToFrontend:
2017-01-24 15:09:23 +00:00
v = new(dom.PushNodesByBackendIdsToFrontendReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetInspectedNode:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMResolveNode:
2017-01-24 15:09:23 +00:00
v = new(dom.ResolveNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetAttributes:
2017-01-24 15:09:23 +00:00
v = new(dom.GetAttributesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMCopyTo:
2017-01-24 15:09:23 +00:00
v = new(dom.CopyToReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMMoveTo:
2017-01-24 15:09:23 +00:00
v = new(dom.MoveToReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMUndo:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMRedo:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMMarkUndoableState:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMFocus:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMSetFileInputFiles:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetBoxModel:
2017-01-24 15:09:23 +00:00
v = new(dom.GetBoxModelReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetNodeForLocation:
2017-01-24 15:09:23 +00:00
v = new(dom.GetNodeForLocationReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMGetRelayoutBoundary:
2017-01-24 15:09:23 +00:00
v = new(dom.GetRelayoutBoundaryReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMDocumentUpdated:
2017-01-24 15:09:23 +00:00
v = new(dom.EventDocumentUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMSetChildNodes:
2017-01-24 15:09:23 +00:00
v = new(dom.EventSetChildNodes)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMAttributeModified:
2017-01-24 15:09:23 +00:00
v = new(dom.EventAttributeModified)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMAttributeRemoved:
2017-01-24 15:09:23 +00:00
v = new(dom.EventAttributeRemoved)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMInlineStyleInvalidated:
2017-01-24 15:09:23 +00:00
v = new(dom.EventInlineStyleInvalidated)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMCharacterDataModified:
2017-01-24 15:09:23 +00:00
v = new(dom.EventCharacterDataModified)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMChildNodeCountUpdated:
2017-01-24 15:09:23 +00:00
v = new(dom.EventChildNodeCountUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMChildNodeInserted:
2017-01-24 15:09:23 +00:00
v = new(dom.EventChildNodeInserted)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMChildNodeRemoved:
2017-01-24 15:09:23 +00:00
v = new(dom.EventChildNodeRemoved)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMShadowRootPushed:
2017-01-24 15:09:23 +00:00
v = new(dom.EventShadowRootPushed)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMShadowRootPopped:
2017-01-24 15:09:23 +00:00
v = new(dom.EventShadowRootPopped)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMPseudoElementAdded:
2017-01-24 15:09:23 +00:00
v = new(dom.EventPseudoElementAdded)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMPseudoElementRemoved:
2017-01-24 15:09:23 +00:00
v = new(dom.EventPseudoElementRemoved)
2017-01-26 07:28:34 +00:00
case cdp.EventDOMDistributedNodesUpdated:
2017-01-24 15:09:23 +00:00
v = new(dom.EventDistributedNodesUpdated)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetMatchedStylesForNode:
2017-01-24 15:09:23 +00:00
v = new(css.GetMatchedStylesForNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetInlineStylesForNode:
2017-01-24 15:09:23 +00:00
v = new(css.GetInlineStylesForNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetComputedStyleForNode:
2017-01-24 15:09:23 +00:00
v = new(css.GetComputedStyleForNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetPlatformFontsForNode:
2017-01-24 15:09:23 +00:00
v = new(css.GetPlatformFontsForNodeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetStyleSheetText:
2017-01-24 15:09:23 +00:00
v = new(css.GetStyleSheetTextReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSCollectClassNames:
2017-01-24 15:09:23 +00:00
v = new(css.CollectClassNamesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetStyleSheetText:
2017-01-24 15:09:23 +00:00
v = new(css.SetStyleSheetTextReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetRuleSelector:
2017-01-24 15:09:23 +00:00
v = new(css.SetRuleSelectorReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetKeyframeKey:
2017-01-24 15:09:23 +00:00
v = new(css.SetKeyframeKeyReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetStyleTexts:
2017-01-24 15:09:23 +00:00
v = new(css.SetStyleTextsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetMediaText:
2017-01-24 15:09:23 +00:00
v = new(css.SetMediaTextReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSCreateStyleSheet:
2017-01-24 15:09:23 +00:00
v = new(css.CreateStyleSheetReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSAddRule:
2017-01-24 15:09:23 +00:00
v = new(css.AddRuleReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSForcePseudoState:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetMediaQueries:
2017-01-24 15:09:23 +00:00
v = new(css.GetMediaQueriesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSSetEffectivePropertyValueForNode:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSGetBackgroundColors:
2017-01-24 15:09:23 +00:00
v = new(css.GetBackgroundColorsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSStartRuleUsageTracking:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-03-24 22:51:18 +00:00
case cdp.CommandCSSTakeCoverageDelta:
v = new(css.TakeCoverageDeltaReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandCSSStopRuleUsageTracking:
2017-01-24 15:09:23 +00:00
v = new(css.StopRuleUsageTrackingReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventCSSMediaQueryResultChanged:
2017-01-24 15:09:23 +00:00
v = new(css.EventMediaQueryResultChanged)
2017-01-26 07:28:34 +00:00
case cdp.EventCSSFontsUpdated:
2017-01-24 15:09:23 +00:00
v = new(css.EventFontsUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventCSSStyleSheetChanged:
2017-01-24 15:09:23 +00:00
v = new(css.EventStyleSheetChanged)
2017-01-26 07:28:34 +00:00
case cdp.EventCSSStyleSheetAdded:
2017-01-24 15:09:23 +00:00
v = new(css.EventStyleSheetAdded)
2017-01-26 07:28:34 +00:00
case cdp.EventCSSStyleSheetRemoved:
2017-01-24 15:09:23 +00:00
v = new(css.EventStyleSheetRemoved)
case cdp.CommandDOMSnapshotGetSnapshot:
v = new(domsnapshot.GetSnapshotReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandIORead:
2017-01-24 15:09:23 +00:00
v = new(iodom.ReadReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandIOClose:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerSetDOMBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerRemoveDOMBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerSetEventListenerBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerRemoveEventListenerBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerSetInstrumentationBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerRemoveInstrumentationBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerSetXHRBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerRemoveXHRBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDOMDebuggerGetEventListeners:
2017-01-24 15:09:23 +00:00
v = new(domdebugger.GetEventListenersReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetSetDiscoverTargets:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetSetAutoAttach:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetSetAttachToFrames:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetSetRemoteLocations:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetSendMessageToTarget:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetGetTargetInfo:
2017-01-24 15:09:23 +00:00
v = new(target.GetTargetInfoReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetActivateTarget:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetCloseTarget:
2017-01-24 15:09:23 +00:00
v = new(target.CloseTargetReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetAttachToTarget:
2017-01-24 15:09:23 +00:00
v = new(target.AttachToTargetReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetDetachFromTarget:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetCreateBrowserContext:
2017-01-24 15:09:23 +00:00
v = new(target.CreateBrowserContextReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetDisposeBrowserContext:
2017-01-24 15:09:23 +00:00
v = new(target.DisposeBrowserContextReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetCreateTarget:
2017-01-24 15:09:23 +00:00
v = new(target.CreateTargetReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTargetGetTargets:
2017-01-24 15:09:23 +00:00
v = new(target.GetTargetsReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventTargetTargetCreated:
2017-01-24 15:09:23 +00:00
v = new(target.EventTargetCreated)
2017-06-30 23:55:30 +00:00
case cdp.EventTargetTargetInfoChanged:
v = new(target.EventTargetInfoChanged)
2017-01-26 07:28:34 +00:00
case cdp.EventTargetTargetDestroyed:
2017-01-24 15:09:23 +00:00
v = new(target.EventTargetDestroyed)
2017-01-26 07:28:34 +00:00
case cdp.EventTargetAttachedToTarget:
2017-01-24 15:09:23 +00:00
v = new(target.EventAttachedToTarget)
2017-01-26 07:28:34 +00:00
case cdp.EventTargetDetachedFromTarget:
2017-01-24 15:09:23 +00:00
v = new(target.EventDetachedFromTarget)
2017-01-26 07:28:34 +00:00
case cdp.EventTargetReceivedMessageFromTarget:
2017-01-24 15:09:23 +00:00
v = new(target.EventReceivedMessageFromTarget)
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerUnregister:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerUpdateRegistration:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerStartWorker:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerSkipWaiting:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerStopWorker:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerInspectWorker:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerSetForceUpdateOnPageLoad:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerDeliverPushMessage:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandServiceWorkerDispatchSyncEvent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventServiceWorkerWorkerRegistrationUpdated:
2017-01-24 15:09:23 +00:00
v = new(serviceworker.EventWorkerRegistrationUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventServiceWorkerWorkerVersionUpdated:
2017-01-24 15:09:23 +00:00
v = new(serviceworker.EventWorkerVersionUpdated)
2017-01-26 07:28:34 +00:00
case cdp.EventServiceWorkerWorkerErrorReported:
2017-01-24 15:09:23 +00:00
v = new(serviceworker.EventWorkerErrorReported)
2017-05-24 02:36:12 +00:00
case cdp.CommandInputSetIgnoreInputEvents:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputDispatchKeyEvent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputDispatchMouseEvent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputDispatchTouchEvent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputEmulateTouchFromMouseEvent:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputSynthesizePinchGesture:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputSynthesizeScrollGesture:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandInputSynthesizeTapGesture:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeCompositingReasons:
2017-01-24 15:09:23 +00:00
v = new(layertree.CompositingReasonsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeMakeSnapshot:
2017-01-24 15:09:23 +00:00
v = new(layertree.MakeSnapshotReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeLoadSnapshot:
2017-01-24 15:09:23 +00:00
v = new(layertree.LoadSnapshotReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeReleaseSnapshot:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeProfileSnapshot:
2017-01-24 15:09:23 +00:00
v = new(layertree.ProfileSnapshotReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeReplaySnapshot:
2017-01-24 15:09:23 +00:00
v = new(layertree.ReplaySnapshotReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLayerTreeSnapshotCommandLog:
2017-01-24 15:09:23 +00:00
v = new(layertree.SnapshotCommandLogReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventLayerTreeLayerTreeDidChange:
2017-01-24 15:09:23 +00:00
v = new(layertree.EventLayerTreeDidChange)
2017-01-26 07:28:34 +00:00
case cdp.EventLayerTreeLayerPainted:
2017-01-24 15:09:23 +00:00
v = new(layertree.EventLayerPainted)
2017-01-26 07:28:34 +00:00
case cdp.CommandDeviceOrientationSetDeviceOrientationOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDeviceOrientationClearDeviceOrientationOverride:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTracingStart:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTracingEnd:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTracingGetCategories:
2017-01-24 15:09:23 +00:00
v = new(tracing.GetCategoriesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTracingRequestMemoryDump:
2017-01-24 15:09:23 +00:00
v = new(tracing.RequestMemoryDumpReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTracingRecordClockSyncMarker:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventTracingDataCollected:
2017-01-24 15:09:23 +00:00
v = new(tracing.EventDataCollected)
2017-01-26 07:28:34 +00:00
case cdp.EventTracingTracingComplete:
2017-01-24 15:09:23 +00:00
v = new(tracing.EventTracingComplete)
2017-01-26 07:28:34 +00:00
case cdp.EventTracingBufferUsage:
2017-01-24 15:09:23 +00:00
v = new(tracing.EventBufferUsage)
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationGetPlaybackRate:
2017-01-24 15:09:23 +00:00
v = new(animation.GetPlaybackRateReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationSetPlaybackRate:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationGetCurrentTime:
2017-01-24 15:09:23 +00:00
v = new(animation.GetCurrentTimeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationSetPaused:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationSetTiming:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationSeekAnimations:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationReleaseAnimations:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandAnimationResolveAnimation:
2017-01-24 15:09:23 +00:00
v = new(animation.ResolveAnimationReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventAnimationAnimationCreated:
2017-01-24 15:09:23 +00:00
v = new(animation.EventAnimationCreated)
2017-01-26 07:28:34 +00:00
case cdp.EventAnimationAnimationStarted:
2017-01-24 15:09:23 +00:00
v = new(animation.EventAnimationStarted)
2017-01-26 07:28:34 +00:00
case cdp.EventAnimationAnimationCanceled:
2017-01-24 15:09:23 +00:00
v = new(animation.EventAnimationCanceled)
2017-01-26 07:28:34 +00:00
case cdp.CommandAccessibilityGetPartialAXTree:
2017-01-24 15:09:23 +00:00
v = new(accessibility.GetPartialAXTreeReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandStorageClearDataForOrigin:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
case cdp.CommandStorageGetUsageAndQuota:
v = new(storage.GetUsageAndQuotaReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandLogEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLogDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLogClear:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLogStartViolationsReport:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandLogStopViolationsReport:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventLogEntryAdded:
2017-01-24 15:09:23 +00:00
v = new(logdom.EventEntryAdded)
2017-01-26 07:28:34 +00:00
case cdp.CommandSystemInfoGetInfo:
2017-01-24 15:09:23 +00:00
v = new(systeminfo.GetInfoReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandTetheringBind:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandTetheringUnbind:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventTetheringAccepted:
2017-01-24 15:09:23 +00:00
v = new(tethering.EventAccepted)
case cdp.CommandBrowserGetWindowForTarget:
v = new(browser.GetWindowForTargetReturns)
case cdp.CommandBrowserSetWindowBounds:
return emptyVal, nil
case cdp.CommandBrowserGetWindowBounds:
v = new(browser.GetWindowBoundsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandSchemaGetDomains:
2017-01-24 15:09:23 +00:00
v = new(schema.GetDomainsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeEvaluate:
2017-01-24 15:09:23 +00:00
v = new(runtime.EvaluateReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeAwaitPromise:
2017-01-24 15:09:23 +00:00
v = new(runtime.AwaitPromiseReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeCallFunctionOn:
2017-01-24 15:09:23 +00:00
v = new(runtime.CallFunctionOnReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeGetProperties:
2017-01-24 15:09:23 +00:00
v = new(runtime.GetPropertiesReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeReleaseObject:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeReleaseObjectGroup:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeRunIfWaitingForDebugger:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeDiscardConsoleEntries:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeSetCustomObjectFormatterEnabled:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeCompileScript:
2017-01-24 15:09:23 +00:00
v = new(runtime.CompileScriptReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandRuntimeRunScript:
2017-01-24 15:09:23 +00:00
v = new(runtime.RunScriptReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeExecutionContextCreated:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventExecutionContextCreated)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeExecutionContextDestroyed:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventExecutionContextDestroyed)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeExecutionContextsCleared:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventExecutionContextsCleared)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeExceptionThrown:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventExceptionThrown)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeExceptionRevoked:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventExceptionRevoked)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeConsoleAPICalled:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventConsoleAPICalled)
2017-01-26 07:28:34 +00:00
case cdp.EventRuntimeInspectRequested:
2017-01-24 15:09:23 +00:00
v = new(runtime.EventInspectRequested)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetBreakpointsActive:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetSkipAllPauses:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetBreakpointByURL:
2017-01-24 15:09:23 +00:00
v = new(debugger.SetBreakpointByURLReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetBreakpoint:
2017-01-24 15:09:23 +00:00
v = new(debugger.SetBreakpointReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerRemoveBreakpoint:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerGetPossibleBreakpoints:
2017-01-24 15:09:23 +00:00
v = new(debugger.GetPossibleBreakpointsReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerContinueToLocation:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerStepOver:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerStepInto:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerStepOut:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerPause:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-03-13 02:29:26 +00:00
case cdp.CommandDebuggerScheduleStepIntoAsync:
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerResume:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSearchInContent:
2017-01-24 15:09:23 +00:00
v = new(debugger.SearchInContentReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetScriptSource:
2017-01-24 15:09:23 +00:00
v = new(debugger.SetScriptSourceReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerRestartFrame:
2017-01-24 15:09:23 +00:00
v = new(debugger.RestartFrameReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerGetScriptSource:
2017-01-24 15:09:23 +00:00
v = new(debugger.GetScriptSourceReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetPauseOnExceptions:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerEvaluateOnCallFrame:
2017-01-24 15:09:23 +00:00
v = new(debugger.EvaluateOnCallFrameReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetVariableValue:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetAsyncCallStackDepth:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetBlackboxPatterns:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandDebuggerSetBlackboxedRanges:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.EventDebuggerScriptParsed:
2017-01-24 15:09:23 +00:00
v = new(debugger.EventScriptParsed)
2017-01-26 07:28:34 +00:00
case cdp.EventDebuggerScriptFailedToParse:
2017-01-24 15:09:23 +00:00
v = new(debugger.EventScriptFailedToParse)
2017-01-26 07:28:34 +00:00
case cdp.EventDebuggerBreakpointResolved:
2017-01-24 15:09:23 +00:00
v = new(debugger.EventBreakpointResolved)
2017-01-26 07:28:34 +00:00
case cdp.EventDebuggerPaused:
2017-01-24 15:09:23 +00:00
v = new(debugger.EventPaused)
2017-01-26 07:28:34 +00:00
case cdp.EventDebuggerResumed:
2017-01-24 15:09:23 +00:00
v = new(debugger.EventResumed)
2017-01-26 07:28:34 +00:00
case cdp.CommandProfilerEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandProfilerDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandProfilerSetSamplingInterval:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandProfilerStart:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandProfilerStop:
2017-01-24 15:09:23 +00:00
v = new(profiler.StopReturns)
2017-03-02 01:16:48 +00:00
case cdp.CommandProfilerStartPreciseCoverage:
return emptyVal, nil
case cdp.CommandProfilerStopPreciseCoverage:
return emptyVal, nil
case cdp.CommandProfilerTakePreciseCoverage:
v = new(profiler.TakePreciseCoverageReturns)
case cdp.CommandProfilerGetBestEffortCoverage:
v = new(profiler.GetBestEffortCoverageReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventProfilerConsoleProfileStarted:
2017-01-24 15:09:23 +00:00
v = new(profiler.EventConsoleProfileStarted)
2017-01-26 07:28:34 +00:00
case cdp.EventProfilerConsoleProfileFinished:
2017-01-24 15:09:23 +00:00
v = new(profiler.EventConsoleProfileFinished)
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerEnable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerDisable:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerStartTrackingHeapObjects:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerStopTrackingHeapObjects:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerTakeHeapSnapshot:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerCollectGarbage:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerGetObjectByHeapObjectID:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.GetObjectByHeapObjectIDReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerAddInspectedHeapObject:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerGetHeapObjectID:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.GetHeapObjectIDReturns)
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerStartSampling:
2017-01-24 15:09:23 +00:00
return emptyVal, nil
2017-01-26 07:28:34 +00:00
case cdp.CommandHeapProfilerStopSampling:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.StopSamplingReturns)
2017-01-26 07:28:34 +00:00
case cdp.EventHeapProfilerAddHeapSnapshotChunk:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.EventAddHeapSnapshotChunk)
2017-01-26 07:28:34 +00:00
case cdp.EventHeapProfilerResetProfiles:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.EventResetProfiles)
2017-01-26 07:28:34 +00:00
case cdp.EventHeapProfilerReportHeapSnapshotProgress:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.EventReportHeapSnapshotProgress)
2017-01-26 07:28:34 +00:00
case cdp.EventHeapProfilerLastSeenObjectID:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.EventLastSeenObjectID)
2017-01-26 07:28:34 +00:00
case cdp.EventHeapProfilerHeapStatsUpdate:
2017-01-24 15:09:23 +00:00
v = new(heapprofiler.EventHeapStatsUpdate)
}
var buf easyjson.RawMessage
switch {
case msg.Params != nil:
buf = msg.Params
case msg.Result != nil:
buf = msg.Result
default:
return nil, errors.New("msg missing params or result")
}
err := easyjson.Unmarshal(buf, v)
if err != nil {
return nil, err
}
return v, nil
}