adapters

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (C) [SonicCloudOrg] Sonic Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

Index

Constants

This section is empty.

Variables

View Source
var BEGIN_COMMENT = "/* "
View Source
var END_COMMENT = " */"
View Source
var SEPARATOR = ": "

Functions

func ReplaceMethodNameAndOutputBinary added in v0.0.5

func ReplaceMethodNameAndOutputBinary(message []byte, method string) []byte

Types

type Adapter

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

func NewAdapter added in v0.0.3

func NewAdapter(wsToolServer *websocket.Conn, version string) *Adapter

func (*Adapter) AddToolMessageFilter added in v0.0.7

func (a *Adapter) AddToolMessageFilter(method string, filter MessageAdapters)

func (*Adapter) AddWebkitMessageFilter added in v0.0.7

func (a *Adapter) AddWebkitMessageFilter(method string, filter MessageAdapters)

func (*Adapter) CallTarget

func (a *Adapter) CallTarget(method string, params interface{}, callFunc func(message []byte))

func (*Adapter) Connect

func (a *Adapter) Connect(wsPath string, toolWs *websocket.Conn)

todo webkit debug ws close case

func (*Adapter) FireEventToTools

func (a *Adapter) FireEventToTools(method string, params interface{})

func (*Adapter) FireResultToTools

func (a *Adapter) FireResultToTools(id int, params interface{})

func (*Adapter) ReceiveMessageDevTool added in v0.0.4

func (a *Adapter) ReceiveMessageDevTool(message []byte)

func (*Adapter) ReceiveMessageWebkit added in v0.0.4

func (a *Adapter) ReceiveMessageWebkit(message []byte)

func (*Adapter) ReplyWithEmpty

func (a *Adapter) ReplyWithEmpty(msg string) []byte

func (*Adapter) SendMessageDevTool added in v0.0.4

func (a *Adapter) SendMessageDevTool(message []byte)

func (*Adapter) SendMessageWebkit added in v0.0.4

func (a *Adapter) SendMessageWebkit(message []byte)

func (*Adapter) SetIsConnect added in v0.0.7

func (a *Adapter) SetIsConnect(flag bool)

func (*Adapter) SetReceiveDevTool

func (a *Adapter) SetReceiveDevTool(receiveDevTool func([]byte))

func (*Adapter) SetReceiveWebkit

func (a *Adapter) SetReceiveWebkit(receiveWebkit func([]byte))

func (*Adapter) SetSendDevTool

func (a *Adapter) SetSendDevTool(sendDevTool func([]byte))

func (*Adapter) SetSendWebkit

func (a *Adapter) SetSendWebkit(sendWebkit func([]byte))

func (*Adapter) SetTargetBased

func (a *Adapter) SetTargetBased(flag bool)

func (*Adapter) SetTargetID

func (a *Adapter) SetTargetID(targetID string)

type MessageAdapters

type MessageAdapters func(message []byte) []byte

type ScreencastOptFunc added in v0.0.5

type ScreencastOptFunc func(screencast *screencastSession)

func WithFormat added in v0.0.5

func WithFormat(format string) ScreencastOptFunc

func WithMaxHeight added in v0.0.5

func WithMaxHeight(maxHeight int) ScreencastOptFunc

func WithMaxWidth added in v0.0.5

func WithMaxWidth(maxWidth int) ScreencastOptFunc

func WithQuality added in v0.0.5

func WithQuality(quality int) ScreencastOptFunc

Jump to

Keyboard shortcuts

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