events.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package target
  2. // Code generated by cdproto-gen. DO NOT EDIT.
  3. // EventAttachedToTarget issued when attached to target because of
  4. // auto-attach or attachToTarget command.
  5. //
  6. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-attachedToTarget
  7. type EventAttachedToTarget struct {
  8. SessionID SessionID `json:"sessionId"` // Identifier assigned to the session used to send/receive messages.
  9. TargetInfo *Info `json:"targetInfo"`
  10. WaitingForDebugger bool `json:"waitingForDebugger"`
  11. }
  12. // EventDetachedFromTarget issued when detached from target for any reason
  13. // (including detachFromTarget command). Can be issued multiple times per target
  14. // if multiple sessions have been attached to it.
  15. //
  16. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-detachedFromTarget
  17. type EventDetachedFromTarget struct {
  18. SessionID SessionID `json:"sessionId"` // Detached session identifier.
  19. }
  20. // EventReceivedMessageFromTarget notifies about a new protocol message
  21. // received from the session (as reported in attachedToTarget event).
  22. //
  23. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-receivedMessageFromTarget
  24. type EventReceivedMessageFromTarget struct {
  25. SessionID SessionID `json:"sessionId"` // Identifier of a session which sends a message.
  26. Message string `json:"message"`
  27. }
  28. // EventTargetCreated issued when a possible inspection target is created.
  29. //
  30. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCreated
  31. type EventTargetCreated struct {
  32. TargetInfo *Info `json:"targetInfo"`
  33. }
  34. // EventTargetDestroyed issued when a target is destroyed.
  35. //
  36. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetDestroyed
  37. type EventTargetDestroyed struct {
  38. TargetID ID `json:"targetId"`
  39. }
  40. // EventTargetCrashed issued when a target has crashed.
  41. //
  42. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetCrashed
  43. type EventTargetCrashed struct {
  44. TargetID ID `json:"targetId"`
  45. Status string `json:"status"` // Termination status type.
  46. ErrorCode int64 `json:"errorCode"` // Termination error code.
  47. }
  48. // EventTargetInfoChanged issued when some information about a target has
  49. // changed. This only happens between targetCreated and targetDestroyed.
  50. //
  51. // See: https://chromedevtools.github.io/devtools-protocol/tot/Target#event-targetInfoChanged
  52. type EventTargetInfoChanged struct {
  53. TargetInfo *Info `json:"targetInfo"`
  54. }