pbwire

package
v0.2.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package pbwire is a hand-rolled proto3 codec for exactly the messages of proto/flowbaton_android.proto. The frozen Android v0 surface is 12 rpcs over 24 small messages, and transcribing the public protobuf encoding rules costs less than adopting protobuf-go as a third runtime dependency (docs/dependency-policy.md). contract_test.go reads the frozen proto so this package cannot drift from it silently.

Index

Constants

View Source
const (
	MethodDeviceInfo                  = "/flowbaton_android.FlowBatonDriver/deviceInfo"
	MethodViewHierarchy               = "/flowbaton_android.FlowBatonDriver/viewHierarchy"
	MethodScreenshot                  = "/flowbaton_android.FlowBatonDriver/screenshot"
	MethodTap                         = "/flowbaton_android.FlowBatonDriver/tap"
	MethodInputText                   = "/flowbaton_android.FlowBatonDriver/inputText"
	MethodEraseAllText                = "/flowbaton_android.FlowBatonDriver/eraseAllText"
	MethodSetLocation                 = "/flowbaton_android.FlowBatonDriver/setLocation"
	MethodIsWindowUpdating            = "/flowbaton_android.FlowBatonDriver/isWindowUpdating"
	MethodLaunchApp                   = "/flowbaton_android.FlowBatonDriver/launchApp"
	MethodAddMedia                    = "/flowbaton_android.FlowBatonDriver/addMedia"
	MethodEnableMockLocationProviders = "/flowbaton_android.FlowBatonDriver/enableMockLocationProviders"
	MethodDisableLocationUpdates      = "/flowbaton_android.FlowBatonDriver/disableLocationUpdates"
)

Full gRPC method paths for every rpc of the frozen FlowBatonDriver service — the single source the Android driver imports. contract_test.go holds these against proto/flowbaton_android.proto in both directions.

View Source
const StreamAddMedia = MethodAddMedia

StreamAddMedia marks addMedia as the service's only client-streaming rpc: the driver opens a stream for it and unary-calls everything else.

Variables

This section is empty.

Functions

func IsClientStreaming

func IsClientStreaming(method string) bool

IsClientStreaming reports whether method is a client-streaming rpc.

func MethodByRPC

func MethodByRPC() map[string]string

MethodByRPC maps each rpc name in the frozen proto to its full method path. It returns a fresh map so no caller can edit the registry under another.

Types

type AddMediaRequest

type AddMediaRequest struct {
	Payload   *Payload
	MediaName string
	MediaExt  string
}

func (AddMediaRequest) Marshal

func (m AddMediaRequest) Marshal() []byte

func (*AddMediaRequest) Unmarshal

func (m *AddMediaRequest) Unmarshal(data []byte) error

type AddMediaResponse

type AddMediaResponse struct{}

func (AddMediaResponse) Marshal

func (AddMediaResponse) Marshal() []byte

func (*AddMediaResponse) Unmarshal

func (*AddMediaResponse) Unmarshal(data []byte) error

type ArgumentValue

type ArgumentValue struct {
	Key   string
	Value string
	Type  string
}

func (ArgumentValue) Marshal

func (m ArgumentValue) Marshal() []byte

func (*ArgumentValue) Unmarshal

func (m *ArgumentValue) Unmarshal(data []byte) error

type CheckWindowUpdatingRequest

type CheckWindowUpdatingRequest struct {
	AppID string
}

func (CheckWindowUpdatingRequest) Marshal

func (m CheckWindowUpdatingRequest) Marshal() []byte

func (*CheckWindowUpdatingRequest) Unmarshal

func (m *CheckWindowUpdatingRequest) Unmarshal(data []byte) error

type CheckWindowUpdatingResponse

type CheckWindowUpdatingResponse struct {
	IsWindowUpdating bool
}

func (CheckWindowUpdatingResponse) Marshal

func (m CheckWindowUpdatingResponse) Marshal() []byte

func (*CheckWindowUpdatingResponse) Unmarshal

func (m *CheckWindowUpdatingResponse) Unmarshal(data []byte) error

type DeviceInfo

type DeviceInfo struct {
	WidthPixels  uint32
	HeightPixels uint32
}

func (DeviceInfo) Marshal

func (m DeviceInfo) Marshal() []byte

func (*DeviceInfo) Unmarshal

func (m *DeviceInfo) Unmarshal(data []byte) error

type DeviceInfoRequest

type DeviceInfoRequest struct{}

func (DeviceInfoRequest) Marshal

func (DeviceInfoRequest) Marshal() []byte

func (*DeviceInfoRequest) Unmarshal

func (*DeviceInfoRequest) Unmarshal(data []byte) error

type EmptyRequest

type EmptyRequest struct{}

func (EmptyRequest) Marshal

func (EmptyRequest) Marshal() []byte

func (*EmptyRequest) Unmarshal

func (*EmptyRequest) Unmarshal(data []byte) error

type EmptyResponse

type EmptyResponse struct{}

func (EmptyResponse) Marshal

func (EmptyResponse) Marshal() []byte

func (*EmptyResponse) Unmarshal

func (*EmptyResponse) Unmarshal(data []byte) error

type EraseAllTextRequest

type EraseAllTextRequest struct {
	CharactersToErase uint32
}

func (EraseAllTextRequest) Marshal

func (m EraseAllTextRequest) Marshal() []byte

func (*EraseAllTextRequest) Unmarshal

func (m *EraseAllTextRequest) Unmarshal(data []byte) error

type EraseAllTextResponse

type EraseAllTextResponse struct{}

func (EraseAllTextResponse) Marshal

func (EraseAllTextResponse) Marshal() []byte

func (*EraseAllTextResponse) Unmarshal

func (*EraseAllTextResponse) Unmarshal(data []byte) error

type InputTextRequest

type InputTextRequest struct {
	Text string
}

func (InputTextRequest) Marshal

func (m InputTextRequest) Marshal() []byte

func (*InputTextRequest) Unmarshal

func (m *InputTextRequest) Unmarshal(data []byte) error

type InputTextResponse

type InputTextResponse struct{}

func (InputTextResponse) Marshal

func (InputTextResponse) Marshal() []byte

func (*InputTextResponse) Unmarshal

func (*InputTextResponse) Unmarshal(data []byte) error

type LaunchAppRequest

type LaunchAppRequest struct {
	PackageName string
	Arguments   []ArgumentValue
}

func (LaunchAppRequest) Marshal

func (m LaunchAppRequest) Marshal() []byte

func (*LaunchAppRequest) Unmarshal

func (m *LaunchAppRequest) Unmarshal(data []byte) error

type LaunchAppResponse

type LaunchAppResponse struct{}

func (LaunchAppResponse) Marshal

func (LaunchAppResponse) Marshal() []byte

func (*LaunchAppResponse) Unmarshal

func (*LaunchAppResponse) Unmarshal(data []byte) error

type Payload

type Payload struct {
	Data []byte
}

func (Payload) Marshal

func (m Payload) Marshal() []byte

func (*Payload) Unmarshal

func (m *Payload) Unmarshal(data []byte) error

type ScreenshotRequest

type ScreenshotRequest struct{}

func (ScreenshotRequest) Marshal

func (ScreenshotRequest) Marshal() []byte

func (*ScreenshotRequest) Unmarshal

func (*ScreenshotRequest) Unmarshal(data []byte) error

type ScreenshotResponse

type ScreenshotResponse struct {
	Bytes []byte
}

func (ScreenshotResponse) Marshal

func (m ScreenshotResponse) Marshal() []byte

func (*ScreenshotResponse) Unmarshal

func (m *ScreenshotResponse) Unmarshal(data []byte) error

type SetLocationRequest

type SetLocationRequest struct {
	Latitude  float64
	Longitude float64
}

func (SetLocationRequest) Marshal

func (m SetLocationRequest) Marshal() []byte

func (*SetLocationRequest) Unmarshal

func (m *SetLocationRequest) Unmarshal(data []byte) error

type SetLocationResponse

type SetLocationResponse struct{}

func (SetLocationResponse) Marshal

func (SetLocationResponse) Marshal() []byte

func (*SetLocationResponse) Unmarshal

func (*SetLocationResponse) Unmarshal(data []byte) error

type TapRequest

type TapRequest struct {
	X uint32
	Y uint32
}

func (TapRequest) Marshal

func (m TapRequest) Marshal() []byte

func (*TapRequest) Unmarshal

func (m *TapRequest) Unmarshal(data []byte) error

type TapResponse

type TapResponse struct{}

func (TapResponse) Marshal

func (TapResponse) Marshal() []byte

func (*TapResponse) Unmarshal

func (*TapResponse) Unmarshal(data []byte) error

type ViewHierarchyRequest

type ViewHierarchyRequest struct {
	ExcludeKeyboardElements bool
}

func (ViewHierarchyRequest) Marshal

func (m ViewHierarchyRequest) Marshal() []byte

func (*ViewHierarchyRequest) Unmarshal

func (m *ViewHierarchyRequest) Unmarshal(data []byte) error

type ViewHierarchyResponse

type ViewHierarchyResponse struct {
	Hierarchy string
}

func (ViewHierarchyResponse) Marshal

func (m ViewHierarchyResponse) Marshal() []byte

func (*ViewHierarchyResponse) Unmarshal

func (m *ViewHierarchyResponse) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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