target

package
v0.0.0-...-076f285 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateTargetCommand

type ActivateTargetCommand struct {
	DestinationTargetID string

	TargetId TargetID `json:"targetId"`
	// contains filtered or unexported fields
}

func (*ActivateTargetCommand) Initalize

func (c *ActivateTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ActivateTargetCommand) Respond

func (c *ActivateTargetCommand) Respond()

func (*ActivateTargetCommand) RespondWithError

func (c *ActivateTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ActivateTargetCommandFn

type ActivateTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*ActivateTargetCommandFn) Load

func (*ActivateTargetCommandFn) Store

type ActivateTargetReturn

type ActivateTargetReturn struct {
}

type AttachToTargetCommand

type AttachToTargetCommand struct {
	DestinationTargetID string

	TargetId TargetID `json:"targetId"`
	// contains filtered or unexported fields
}

func (*AttachToTargetCommand) Initalize

func (c *AttachToTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*AttachToTargetCommand) Respond

func (*AttachToTargetCommand) RespondWithError

func (c *AttachToTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type AttachToTargetCommandFn

type AttachToTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*AttachToTargetCommandFn) Load

func (*AttachToTargetCommandFn) Store

type AttachToTargetReturn

type AttachToTargetReturn struct {
	Success bool `json:"success"` // Whether attach succeeded.
}

type AttachedToTargetEvent

type AttachedToTargetEvent struct {
	TargetInfo         TargetInfo `json:"targetInfo"`
	WaitingForDebugger bool       `json:"waitingForDebugger"`
}

type BrowserContextID

type BrowserContextID string

type CloseTargetCommand

type CloseTargetCommand struct {
	DestinationTargetID string

	TargetId TargetID `json:"targetId"`
	// contains filtered or unexported fields
}

func (*CloseTargetCommand) Initalize

func (c *CloseTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*CloseTargetCommand) Respond

func (c *CloseTargetCommand) Respond(r *CloseTargetReturn)

func (*CloseTargetCommand) RespondWithError

func (c *CloseTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type CloseTargetCommandFn

type CloseTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*CloseTargetCommandFn) Load

func (a *CloseTargetCommandFn) Load() func(CloseTargetCommand)

func (*CloseTargetCommandFn) Store

func (a *CloseTargetCommandFn) Store(fn func(CloseTargetCommand))

type CloseTargetReturn

type CloseTargetReturn struct {
	Success bool `json:"success"`
}

type CreateBrowserContextCommand

type CreateBrowserContextCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*CreateBrowserContextCommand) Initalize

func (c *CreateBrowserContextCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*CreateBrowserContextCommand) Respond

func (*CreateBrowserContextCommand) RespondWithError

func (c *CreateBrowserContextCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type CreateBrowserContextCommandFn

type CreateBrowserContextCommandFn struct {
	// contains filtered or unexported fields
}

func (*CreateBrowserContextCommandFn) Load

func (*CreateBrowserContextCommandFn) Store

type CreateBrowserContextReturn

type CreateBrowserContextReturn struct {
	BrowserContextId BrowserContextID `json:"browserContextId"` // The id of the context created.
}

type CreateTargetCommand

type CreateTargetCommand struct {
	DestinationTargetID string

	Url              string            `json:"url"`                        // The initial URL the page will be navigated to.
	Width            *int64            `json:"width,omitempty"`            // Frame width in DIP (headless chrome only).
	Height           *int64            `json:"height,omitempty"`           // Frame height in DIP (headless chrome only).
	BrowserContextId *BrowserContextID `json:"browserContextId,omitempty"` // The browser context to create the page in (headless chrome only).
	// contains filtered or unexported fields
}

func (*CreateTargetCommand) Initalize

func (c *CreateTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*CreateTargetCommand) Respond

func (c *CreateTargetCommand) Respond(r *CreateTargetReturn)

func (*CreateTargetCommand) RespondWithError

func (c *CreateTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type CreateTargetCommandFn

type CreateTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*CreateTargetCommandFn) Load

func (*CreateTargetCommandFn) Store

func (a *CreateTargetCommandFn) Store(fn func(CreateTargetCommand))

type CreateTargetReturn

type CreateTargetReturn struct {
	TargetId TargetID `json:"targetId"` // The id of the page opened.
}

type DetachFromTargetCommand

type DetachFromTargetCommand struct {
	DestinationTargetID string

	TargetId TargetID `json:"targetId"`
	// contains filtered or unexported fields
}

func (*DetachFromTargetCommand) Initalize

func (c *DetachFromTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DetachFromTargetCommand) Respond

func (c *DetachFromTargetCommand) Respond()

func (*DetachFromTargetCommand) RespondWithError

func (c *DetachFromTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DetachFromTargetCommandFn

type DetachFromTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*DetachFromTargetCommandFn) Load

func (*DetachFromTargetCommandFn) Store

type DetachFromTargetReturn

type DetachFromTargetReturn struct {
}

type DetachedFromTargetEvent

type DetachedFromTargetEvent struct {
	TargetId TargetID `json:"targetId"`
}

type DisposeBrowserContextCommand

type DisposeBrowserContextCommand struct {
	DestinationTargetID string

	BrowserContextId BrowserContextID `json:"browserContextId"`
	// contains filtered or unexported fields
}

func (*DisposeBrowserContextCommand) Initalize

func (c *DisposeBrowserContextCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DisposeBrowserContextCommand) Respond

func (*DisposeBrowserContextCommand) RespondWithError

func (c *DisposeBrowserContextCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DisposeBrowserContextCommandFn

type DisposeBrowserContextCommandFn struct {
	// contains filtered or unexported fields
}

func (*DisposeBrowserContextCommandFn) Load

func (*DisposeBrowserContextCommandFn) Store

type DisposeBrowserContextReturn

type DisposeBrowserContextReturn struct {
	Success bool `json:"success"`
}

type GetTargetInfoCommand

type GetTargetInfoCommand struct {
	DestinationTargetID string

	TargetId TargetID `json:"targetId"`
	// contains filtered or unexported fields
}

func (*GetTargetInfoCommand) Initalize

func (c *GetTargetInfoCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*GetTargetInfoCommand) Respond

func (*GetTargetInfoCommand) RespondWithError

func (c *GetTargetInfoCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type GetTargetInfoCommandFn

type GetTargetInfoCommandFn struct {
	// contains filtered or unexported fields
}

func (*GetTargetInfoCommandFn) Load

func (*GetTargetInfoCommandFn) Store

func (a *GetTargetInfoCommandFn) Store(fn func(GetTargetInfoCommand))

type GetTargetInfoReturn

type GetTargetInfoReturn struct {
	TargetInfo TargetInfo `json:"targetInfo"`
}

type GetTargetsCommand

type GetTargetsCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*GetTargetsCommand) Initalize

func (c *GetTargetsCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*GetTargetsCommand) Respond

func (c *GetTargetsCommand) Respond(r *GetTargetsReturn)

func (*GetTargetsCommand) RespondWithError

func (c *GetTargetsCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type GetTargetsCommandFn

type GetTargetsCommandFn struct {
	// contains filtered or unexported fields
}

func (*GetTargetsCommandFn) Load

func (a *GetTargetsCommandFn) Load() func(GetTargetsCommand)

func (*GetTargetsCommandFn) Store

func (a *GetTargetsCommandFn) Store(fn func(GetTargetsCommand))

type GetTargetsReturn

type GetTargetsReturn struct {
	TargetInfos []TargetInfo `json:"targetInfos"` // The list of targets.
}

type ReceivedMessageFromTargetEvent

type ReceivedMessageFromTargetEvent struct {
	TargetId TargetID `json:"targetId"`
	Message  string   `json:"message"`
}

type RemoteLocation

type RemoteLocation struct {
	Host string `json:"host"`
	Port int64  `json:"port"`
}

type SendMessageToTargetCommand

type SendMessageToTargetCommand struct {
	DestinationTargetID string

	TargetId string `json:"targetId"`
	Message  string `json:"message"`
	// contains filtered or unexported fields
}

func (*SendMessageToTargetCommand) Initalize

func (c *SendMessageToTargetCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SendMessageToTargetCommand) Respond

func (c *SendMessageToTargetCommand) Respond()

func (*SendMessageToTargetCommand) RespondWithError

func (c *SendMessageToTargetCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SendMessageToTargetCommandFn

type SendMessageToTargetCommandFn struct {
	// contains filtered or unexported fields
}

func (*SendMessageToTargetCommandFn) Load

func (*SendMessageToTargetCommandFn) Store

type SendMessageToTargetReturn

type SendMessageToTargetReturn struct {
}

type SetAttachToFramesCommand

type SetAttachToFramesCommand struct {
	DestinationTargetID string

	Value bool `json:"value"` // Whether to attach to frames.
	// contains filtered or unexported fields
}

func (*SetAttachToFramesCommand) Initalize

func (c *SetAttachToFramesCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SetAttachToFramesCommand) Respond

func (c *SetAttachToFramesCommand) Respond()

func (*SetAttachToFramesCommand) RespondWithError

func (c *SetAttachToFramesCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SetAttachToFramesCommandFn

type SetAttachToFramesCommandFn struct {
	// contains filtered or unexported fields
}

func (*SetAttachToFramesCommandFn) Load

func (*SetAttachToFramesCommandFn) Store

type SetAttachToFramesReturn

type SetAttachToFramesReturn struct {
}

type SetAutoAttachCommand

type SetAutoAttachCommand struct {
	DestinationTargetID string

	AutoAttach             bool `json:"autoAttach"`             // Whether to auto-attach to related targets.
	WaitForDebuggerOnStart bool `json:"waitForDebuggerOnStart"` // Whether to pause new targets when attaching to them. Use <code>Runtime.runIfWaitingForDebugger</code> to run paused targets.
	// contains filtered or unexported fields
}

func (*SetAutoAttachCommand) Initalize

func (c *SetAutoAttachCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SetAutoAttachCommand) Respond

func (c *SetAutoAttachCommand) Respond()

func (*SetAutoAttachCommand) RespondWithError

func (c *SetAutoAttachCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SetAutoAttachCommandFn

type SetAutoAttachCommandFn struct {
	// contains filtered or unexported fields
}

func (*SetAutoAttachCommandFn) Load

func (*SetAutoAttachCommandFn) Store

func (a *SetAutoAttachCommandFn) Store(fn func(SetAutoAttachCommand))

type SetAutoAttachReturn

type SetAutoAttachReturn struct {
}

type SetDiscoverTargetsCommand

type SetDiscoverTargetsCommand struct {
	DestinationTargetID string

	Discover bool `json:"discover"` // Whether to discover available targets.
	// contains filtered or unexported fields
}

func (*SetDiscoverTargetsCommand) Initalize

func (c *SetDiscoverTargetsCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SetDiscoverTargetsCommand) Respond

func (c *SetDiscoverTargetsCommand) Respond()

func (*SetDiscoverTargetsCommand) RespondWithError

func (c *SetDiscoverTargetsCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SetDiscoverTargetsCommandFn

type SetDiscoverTargetsCommandFn struct {
	// contains filtered or unexported fields
}

func (*SetDiscoverTargetsCommandFn) Load

func (*SetDiscoverTargetsCommandFn) Store

type SetDiscoverTargetsReturn

type SetDiscoverTargetsReturn struct {
}

type SetRemoteLocationsCommand

type SetRemoteLocationsCommand struct {
	DestinationTargetID string

	Locations []RemoteLocation `json:"locations"` // List of remote locations.
	// contains filtered or unexported fields
}

func (*SetRemoteLocationsCommand) Initalize

func (c *SetRemoteLocationsCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SetRemoteLocationsCommand) Respond

func (c *SetRemoteLocationsCommand) Respond()

func (*SetRemoteLocationsCommand) RespondWithError

func (c *SetRemoteLocationsCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SetRemoteLocationsCommandFn

type SetRemoteLocationsCommandFn struct {
	// contains filtered or unexported fields
}

func (*SetRemoteLocationsCommandFn) Load

func (*SetRemoteLocationsCommandFn) Store

type SetRemoteLocationsReturn

type SetRemoteLocationsReturn struct {
}

type TargetAgent

type TargetAgent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(conn *shared.Connection) *TargetAgent

func (*TargetAgent) FireAttachedToTarget

func (agent *TargetAgent) FireAttachedToTarget(event AttachedToTargetEvent)

func (*TargetAgent) FireAttachedToTargetOnTarget

func (agent *TargetAgent) FireAttachedToTargetOnTarget(targetId string, event AttachedToTargetEvent)

func (*TargetAgent) FireDetachedFromTarget

func (agent *TargetAgent) FireDetachedFromTarget(event DetachedFromTargetEvent)

func (*TargetAgent) FireDetachedFromTargetOnTarget

func (agent *TargetAgent) FireDetachedFromTargetOnTarget(targetId string, event DetachedFromTargetEvent)

func (*TargetAgent) FireReceivedMessageFromTarget

func (agent *TargetAgent) FireReceivedMessageFromTarget(event ReceivedMessageFromTargetEvent)

func (*TargetAgent) FireReceivedMessageFromTargetOnTarget

func (agent *TargetAgent) FireReceivedMessageFromTargetOnTarget(targetId string, event ReceivedMessageFromTargetEvent)

func (*TargetAgent) FireTargetCreated

func (agent *TargetAgent) FireTargetCreated(event TargetCreatedEvent)

Dispatchable Events

func (*TargetAgent) FireTargetCreatedOnTarget

func (agent *TargetAgent) FireTargetCreatedOnTarget(targetId string, event TargetCreatedEvent)

func (*TargetAgent) FireTargetDestroyed

func (agent *TargetAgent) FireTargetDestroyed(event TargetDestroyedEvent)

func (*TargetAgent) FireTargetDestroyedOnTarget

func (agent *TargetAgent) FireTargetDestroyedOnTarget(targetId string, event TargetDestroyedEvent)

func (*TargetAgent) Name

func (agent *TargetAgent) Name() string

func (*TargetAgent) ProcessCommand

func (agent *TargetAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*TargetAgent) SetActivateTargetHandler

func (agent *TargetAgent) SetActivateTargetHandler(handler func(ActivateTargetCommand))

func (*TargetAgent) SetAttachToTargetHandler

func (agent *TargetAgent) SetAttachToTargetHandler(handler func(AttachToTargetCommand))

func (*TargetAgent) SetCloseTargetHandler

func (agent *TargetAgent) SetCloseTargetHandler(handler func(CloseTargetCommand))

func (*TargetAgent) SetCreateBrowserContextHandler

func (agent *TargetAgent) SetCreateBrowserContextHandler(handler func(CreateBrowserContextCommand))

func (*TargetAgent) SetCreateTargetHandler

func (agent *TargetAgent) SetCreateTargetHandler(handler func(CreateTargetCommand))

func (*TargetAgent) SetDetachFromTargetHandler

func (agent *TargetAgent) SetDetachFromTargetHandler(handler func(DetachFromTargetCommand))

func (*TargetAgent) SetDisposeBrowserContextHandler

func (agent *TargetAgent) SetDisposeBrowserContextHandler(handler func(DisposeBrowserContextCommand))

func (*TargetAgent) SetGetTargetInfoHandler

func (agent *TargetAgent) SetGetTargetInfoHandler(handler func(GetTargetInfoCommand))

func (*TargetAgent) SetGetTargetsHandler

func (agent *TargetAgent) SetGetTargetsHandler(handler func(GetTargetsCommand))

func (*TargetAgent) SetSendMessageToTargetHandler

func (agent *TargetAgent) SetSendMessageToTargetHandler(handler func(SendMessageToTargetCommand))

func (*TargetAgent) SetSetAttachToFramesHandler

func (agent *TargetAgent) SetSetAttachToFramesHandler(handler func(SetAttachToFramesCommand))

func (*TargetAgent) SetSetAutoAttachHandler

func (agent *TargetAgent) SetSetAutoAttachHandler(handler func(SetAutoAttachCommand))

func (*TargetAgent) SetSetDiscoverTargetsHandler

func (agent *TargetAgent) SetSetDiscoverTargetsHandler(handler func(SetDiscoverTargetsCommand))

Commands Sent From Frontend

func (*TargetAgent) SetSetRemoteLocationsHandler

func (agent *TargetAgent) SetSetRemoteLocationsHandler(handler func(SetRemoteLocationsCommand))

type TargetCreatedEvent

type TargetCreatedEvent struct {
	TargetInfo TargetInfo `json:"targetInfo"`
}

type TargetDestroyedEvent

type TargetDestroyedEvent struct {
	TargetId TargetID `json:"targetId"`
}

type TargetID

type TargetID string

type TargetInfo

type TargetInfo struct {
	TargetId TargetID `json:"targetId"`
	Type     string   `json:"type"`
	Title    string   `json:"title"`
	Url      string   `json:"url"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL