Files
sanderling/proto/driverpb/driver_grpc.pb.go
pj 4f579d2a0b feat(driver): native DoubleTap RPC for a tight inter-tap gap
Composing two Tap round trips from the Go client spread the taps by
hundreds of milliseconds on iOS, wide enough for the app to navigate
between them, so double-submission races could never reproduce. The
sidecar now lands both taps back-to-back next to the device transport.
2026-06-05 19:05:27 +05:30

748 lines
27 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: driverpb/driver.proto
package driverpb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Driver_Launch_FullMethodName = "/sanderling.driver.v1.Driver/Launch"
Driver_Terminate_FullMethodName = "/sanderling.driver.v1.Driver/Terminate"
Driver_Tap_FullMethodName = "/sanderling.driver.v1.Driver/Tap"
Driver_DoubleTap_FullMethodName = "/sanderling.driver.v1.Driver/DoubleTap"
Driver_TapSelector_FullMethodName = "/sanderling.driver.v1.Driver/TapSelector"
Driver_InputText_FullMethodName = "/sanderling.driver.v1.Driver/InputText"
Driver_EraseText_FullMethodName = "/sanderling.driver.v1.Driver/EraseText"
Driver_Swipe_FullMethodName = "/sanderling.driver.v1.Driver/Swipe"
Driver_PressKey_FullMethodName = "/sanderling.driver.v1.Driver/PressKey"
Driver_LongPress_FullMethodName = "/sanderling.driver.v1.Driver/LongPress"
Driver_Screenshot_FullMethodName = "/sanderling.driver.v1.Driver/Screenshot"
Driver_Hierarchy_FullMethodName = "/sanderling.driver.v1.Driver/Hierarchy"
Driver_Snapshot_FullMethodName = "/sanderling.driver.v1.Driver/Snapshot"
Driver_RecentLogs_FullMethodName = "/sanderling.driver.v1.Driver/RecentLogs"
Driver_WaitForIdle_FullMethodName = "/sanderling.driver.v1.Driver/WaitForIdle"
Driver_Health_FullMethodName = "/sanderling.driver.v1.Driver/Health"
Driver_Metrics_FullMethodName = "/sanderling.driver.v1.Driver/Metrics"
)
// DriverClient is the client API for Driver service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DriverClient interface {
Launch(ctx context.Context, in *LaunchRequest, opts ...grpc.CallOption) (*Empty, error)
Terminate(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
Tap(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error)
// DoubleTap lands two taps as close together as the platform allows.
// Composing two Tap calls from the client spreads them by hundreds of
// milliseconds on iOS, wide enough for navigation to interleave, which
// defeats double-submission testing.
DoubleTap(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error)
TapSelector(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*Empty, error)
InputText(ctx context.Context, in *Text, opts ...grpc.CallOption) (*Empty, error)
// EraseText deletes characters from the focused field so InputText can
// replace existing content instead of appending to it.
EraseText(ctx context.Context, in *EraseTextRequest, opts ...grpc.CallOption) (*Empty, error)
Swipe(ctx context.Context, in *SwipeRequest, opts ...grpc.CallOption) (*Empty, error)
PressKey(ctx context.Context, in *PressKeyRequest, opts ...grpc.CallOption) (*Empty, error)
LongPress(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error)
Screenshot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Image, error)
Hierarchy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HierarchyJSON, error)
// Snapshot captures hierarchy and screenshot back-to-back under a
// backend-side mutex so the pair describes the same on-device frame.
// Use this instead of racing Hierarchy and Screenshot from the runner.
Snapshot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SnapshotResponse, error)
RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*LogEntries, error)
WaitForIdle(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*Empty, error)
Health(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthStatus, error)
Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
}
type driverClient struct {
cc grpc.ClientConnInterface
}
func NewDriverClient(cc grpc.ClientConnInterface) DriverClient {
return &driverClient{cc}
}
func (c *driverClient) Launch(ctx context.Context, in *LaunchRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_Launch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Terminate(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_Terminate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Tap(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_Tap_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) DoubleTap(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_DoubleTap_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) TapSelector(ctx context.Context, in *Selector, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_TapSelector_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) InputText(ctx context.Context, in *Text, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_InputText_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) EraseText(ctx context.Context, in *EraseTextRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_EraseText_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Swipe(ctx context.Context, in *SwipeRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_Swipe_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) PressKey(ctx context.Context, in *PressKeyRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_PressKey_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) LongPress(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_LongPress_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Screenshot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Image, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Image)
err := c.cc.Invoke(ctx, Driver_Screenshot_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Hierarchy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HierarchyJSON, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HierarchyJSON)
err := c.cc.Invoke(ctx, Driver_Hierarchy_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Snapshot(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SnapshotResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SnapshotResponse)
err := c.cc.Invoke(ctx, Driver_Snapshot_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*LogEntries, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(LogEntries)
err := c.cc.Invoke(ctx, Driver_RecentLogs_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) WaitForIdle(ctx context.Context, in *Duration, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Driver_WaitForIdle_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Health(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HealthStatus, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(HealthStatus)
err := c.cc.Invoke(ctx, Driver_Health_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *driverClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MetricsResponse)
err := c.cc.Invoke(ctx, Driver_Metrics_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// DriverServer is the server API for Driver service.
// All implementations must embed UnimplementedDriverServer
// for forward compatibility.
type DriverServer interface {
Launch(context.Context, *LaunchRequest) (*Empty, error)
Terminate(context.Context, *Empty) (*Empty, error)
Tap(context.Context, *Point) (*Empty, error)
// DoubleTap lands two taps as close together as the platform allows.
// Composing two Tap calls from the client spreads them by hundreds of
// milliseconds on iOS, wide enough for navigation to interleave, which
// defeats double-submission testing.
DoubleTap(context.Context, *Point) (*Empty, error)
TapSelector(context.Context, *Selector) (*Empty, error)
InputText(context.Context, *Text) (*Empty, error)
// EraseText deletes characters from the focused field so InputText can
// replace existing content instead of appending to it.
EraseText(context.Context, *EraseTextRequest) (*Empty, error)
Swipe(context.Context, *SwipeRequest) (*Empty, error)
PressKey(context.Context, *PressKeyRequest) (*Empty, error)
LongPress(context.Context, *Point) (*Empty, error)
Screenshot(context.Context, *Empty) (*Image, error)
Hierarchy(context.Context, *Empty) (*HierarchyJSON, error)
// Snapshot captures hierarchy and screenshot back-to-back under a
// backend-side mutex so the pair describes the same on-device frame.
// Use this instead of racing Hierarchy and Screenshot from the runner.
Snapshot(context.Context, *Empty) (*SnapshotResponse, error)
RecentLogs(context.Context, *RecentLogsRequest) (*LogEntries, error)
WaitForIdle(context.Context, *Duration) (*Empty, error)
Health(context.Context, *Empty) (*HealthStatus, error)
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
mustEmbedUnimplementedDriverServer()
}
// UnimplementedDriverServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDriverServer struct{}
func (UnimplementedDriverServer) Launch(context.Context, *LaunchRequest) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Launch not implemented")
}
func (UnimplementedDriverServer) Terminate(context.Context, *Empty) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Terminate not implemented")
}
func (UnimplementedDriverServer) Tap(context.Context, *Point) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Tap not implemented")
}
func (UnimplementedDriverServer) DoubleTap(context.Context, *Point) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method DoubleTap not implemented")
}
func (UnimplementedDriverServer) TapSelector(context.Context, *Selector) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method TapSelector not implemented")
}
func (UnimplementedDriverServer) InputText(context.Context, *Text) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method InputText not implemented")
}
func (UnimplementedDriverServer) EraseText(context.Context, *EraseTextRequest) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method EraseText not implemented")
}
func (UnimplementedDriverServer) Swipe(context.Context, *SwipeRequest) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method Swipe not implemented")
}
func (UnimplementedDriverServer) PressKey(context.Context, *PressKeyRequest) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method PressKey not implemented")
}
func (UnimplementedDriverServer) LongPress(context.Context, *Point) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method LongPress not implemented")
}
func (UnimplementedDriverServer) Screenshot(context.Context, *Empty) (*Image, error) {
return nil, status.Error(codes.Unimplemented, "method Screenshot not implemented")
}
func (UnimplementedDriverServer) Hierarchy(context.Context, *Empty) (*HierarchyJSON, error) {
return nil, status.Error(codes.Unimplemented, "method Hierarchy not implemented")
}
func (UnimplementedDriverServer) Snapshot(context.Context, *Empty) (*SnapshotResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Snapshot not implemented")
}
func (UnimplementedDriverServer) RecentLogs(context.Context, *RecentLogsRequest) (*LogEntries, error) {
return nil, status.Error(codes.Unimplemented, "method RecentLogs not implemented")
}
func (UnimplementedDriverServer) WaitForIdle(context.Context, *Duration) (*Empty, error) {
return nil, status.Error(codes.Unimplemented, "method WaitForIdle not implemented")
}
func (UnimplementedDriverServer) Health(context.Context, *Empty) (*HealthStatus, error) {
return nil, status.Error(codes.Unimplemented, "method Health not implemented")
}
func (UnimplementedDriverServer) Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Metrics not implemented")
}
func (UnimplementedDriverServer) mustEmbedUnimplementedDriverServer() {}
func (UnimplementedDriverServer) testEmbeddedByValue() {}
// UnsafeDriverServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DriverServer will
// result in compilation errors.
type UnsafeDriverServer interface {
mustEmbedUnimplementedDriverServer()
}
func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer) {
// If the following call panics, it indicates UnimplementedDriverServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Driver_ServiceDesc, srv)
}
func _Driver_Launch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LaunchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Launch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Launch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Launch(ctx, req.(*LaunchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Terminate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Terminate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Terminate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Terminate(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Tap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Point)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Tap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Tap_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Tap(ctx, req.(*Point))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_DoubleTap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Point)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).DoubleTap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_DoubleTap_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).DoubleTap(ctx, req.(*Point))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_TapSelector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Selector)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).TapSelector(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_TapSelector_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).TapSelector(ctx, req.(*Selector))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_InputText_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Text)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).InputText(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_InputText_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).InputText(ctx, req.(*Text))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_EraseText_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EraseTextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).EraseText(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_EraseText_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).EraseText(ctx, req.(*EraseTextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Swipe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SwipeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Swipe(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Swipe_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Swipe(ctx, req.(*SwipeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_PressKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PressKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).PressKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_PressKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).PressKey(ctx, req.(*PressKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_LongPress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Point)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).LongPress(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_LongPress_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).LongPress(ctx, req.(*Point))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Screenshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Screenshot(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Screenshot_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Screenshot(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Hierarchy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Hierarchy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Hierarchy_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Hierarchy(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Snapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Snapshot(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Snapshot_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Snapshot(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_RecentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RecentLogsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).RecentLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_RecentLogs_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).RecentLogs(ctx, req.(*RecentLogsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_WaitForIdle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Duration)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).WaitForIdle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_WaitForIdle_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).WaitForIdle(ctx, req.(*Duration))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Health(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Health_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Health(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Driver_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DriverServer).Metrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Driver_Metrics_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DriverServer).Metrics(ctx, req.(*MetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Driver_ServiceDesc is the grpc.ServiceDesc for Driver service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Driver_ServiceDesc = grpc.ServiceDesc{
ServiceName: "sanderling.driver.v1.Driver",
HandlerType: (*DriverServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Launch",
Handler: _Driver_Launch_Handler,
},
{
MethodName: "Terminate",
Handler: _Driver_Terminate_Handler,
},
{
MethodName: "Tap",
Handler: _Driver_Tap_Handler,
},
{
MethodName: "DoubleTap",
Handler: _Driver_DoubleTap_Handler,
},
{
MethodName: "TapSelector",
Handler: _Driver_TapSelector_Handler,
},
{
MethodName: "InputText",
Handler: _Driver_InputText_Handler,
},
{
MethodName: "EraseText",
Handler: _Driver_EraseText_Handler,
},
{
MethodName: "Swipe",
Handler: _Driver_Swipe_Handler,
},
{
MethodName: "PressKey",
Handler: _Driver_PressKey_Handler,
},
{
MethodName: "LongPress",
Handler: _Driver_LongPress_Handler,
},
{
MethodName: "Screenshot",
Handler: _Driver_Screenshot_Handler,
},
{
MethodName: "Hierarchy",
Handler: _Driver_Hierarchy_Handler,
},
{
MethodName: "Snapshot",
Handler: _Driver_Snapshot_Handler,
},
{
MethodName: "RecentLogs",
Handler: _Driver_RecentLogs_Handler,
},
{
MethodName: "WaitForIdle",
Handler: _Driver_WaitForIdle_Handler,
},
{
MethodName: "Health",
Handler: _Driver_Health_Handler,
},
{
MethodName: "Metrics",
Handler: _Driver_Metrics_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "driverpb/driver.proto",
}