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
- func IsClientStreaming(method string) bool
- func MethodByRPC() map[string]string
- type AddMediaRequest
- type AddMediaResponse
- type ArgumentValue
- type CheckWindowUpdatingRequest
- type CheckWindowUpdatingResponse
- type DeviceInfo
- type DeviceInfoRequest
- type EmptyRequest
- type EmptyResponse
- type EraseAllTextRequest
- type EraseAllTextResponse
- type InputTextRequest
- type InputTextResponse
- type LaunchAppRequest
- type LaunchAppResponse
- type Payload
- type ScreenshotRequest
- type ScreenshotResponse
- type SetLocationRequest
- type SetLocationResponse
- type TapRequest
- type TapResponse
- type ViewHierarchyRequest
- type ViewHierarchyResponse
Constants ¶
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.
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 ¶
IsClientStreaming reports whether method is a client-streaming rpc.
func MethodByRPC ¶
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 ¶
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 ¶
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 ¶
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 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 ¶
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 ¶
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{}
func (ViewHierarchyRequest) Marshal ¶
func (ViewHierarchyRequest) Marshal() []byte
func (*ViewHierarchyRequest) Unmarshal ¶
func (*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