// Package backgroundservice provides the Chrome DevTools Protocol // commands, types, and events for the BackgroundService domain. // // Defines events for background web platform features. // // Generated by the cdproto-gen command.
package backgroundservice // Code generated by cdproto-gen. DO NOT EDIT. import ( ) // StartObservingParams enables event updates for the service. type StartObservingParams struct { Service ServiceName `json:"service"` } // StartObserving enables event updates for the service. // // See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-startObserving // // parameters: // // service func ( ServiceName) *StartObservingParams { return &StartObservingParams{ Service: , } } // Do executes BackgroundService.startObserving against the provided context. func ( *StartObservingParams) ( context.Context) ( error) { return cdp.Execute(, CommandStartObserving, , nil) } // StopObservingParams disables event updates for the service. type StopObservingParams struct { Service ServiceName `json:"service"` } // StopObserving disables event updates for the service. // // See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-stopObserving // // parameters: // // service func ( ServiceName) *StopObservingParams { return &StopObservingParams{ Service: , } } // Do executes BackgroundService.stopObserving against the provided context. func ( *StopObservingParams) ( context.Context) ( error) { return cdp.Execute(, CommandStopObserving, , nil) } // SetRecordingParams set the recording state for the service. type SetRecordingParams struct { ShouldRecord bool `json:"shouldRecord"` Service ServiceName `json:"service"` } // SetRecording set the recording state for the service. // // See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-setRecording // // parameters: // // shouldRecord // service func ( bool, ServiceName) *SetRecordingParams { return &SetRecordingParams{ ShouldRecord: , Service: , } } // Do executes BackgroundService.setRecording against the provided context. func ( *SetRecordingParams) ( context.Context) ( error) { return cdp.Execute(, CommandSetRecording, , nil) } // ClearEventsParams clears all stored data for the service. type ClearEventsParams struct { Service ServiceName `json:"service"` } // ClearEvents clears all stored data for the service. // // See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-clearEvents // // parameters: // // service func ( ServiceName) *ClearEventsParams { return &ClearEventsParams{ Service: , } } // Do executes BackgroundService.clearEvents against the provided context. func ( *ClearEventsParams) ( context.Context) ( error) { return cdp.Execute(, CommandClearEvents, , nil) } // Command names. const ( CommandStartObserving = "BackgroundService.startObserving" CommandStopObserving = "BackgroundService.stopObserving" CommandSetRecording = "BackgroundService.setRecording" CommandClearEvents = "BackgroundService.clearEvents" )