browserpb

package
v0.0.0-...-0fab95c Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Browser_Session_FullMethodName = "/browserproxy.v1.Browser/Session"
)

Variables

View Source
var Browser_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "browserproxy.v1.Browser",
	HandlerType: (*BrowserServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Session",
			Handler:       _Browser_Session_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/browser.proto",
}

Browser_ServiceDesc is the grpc.ServiceDesc for Browser service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_browser_proto protoreflect.FileDescriptor

Functions

func RegisterBrowserServer

func RegisterBrowserServer(s grpc.ServiceRegistrar, srv BrowserServer)

Types

type Back

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

Back re-loads the most recent back-history entry.

func (*Back) Descriptor deprecated

func (*Back) Descriptor() ([]byte, []int)

Deprecated: Use Back.ProtoReflect.Descriptor instead.

func (*Back) ProtoMessage

func (*Back) ProtoMessage()

func (*Back) ProtoReflect

func (x *Back) ProtoReflect() protoreflect.Message

func (*Back) Reset

func (x *Back) Reset()

func (*Back) String

func (x *Back) String() string

type BrowserClient

type BrowserClient interface {
	// Session drives one tab for the lifetime of the stream.
	Session(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ClientMsg, ServerMsg], error)
}

BrowserClient is the client API for Browser 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.

Browser is the remote-browser service. A single long-lived bidirectional stream models one browser tab: the client sends input events, the server streams back rendered frames and chrome state. This maps the browser's natural full-duplex interaction directly onto gRPC streaming — the transport underneath is grpc-transports/websocket, so the same client compiles to GOOS=js/wasm and runs in the browser with no sidecar proxy.

func NewBrowserClient

func NewBrowserClient(cc grpc.ClientConnInterface) BrowserClient

type BrowserServer

type BrowserServer interface {
	// Session drives one tab for the lifetime of the stream.
	Session(grpc.BidiStreamingServer[ClientMsg, ServerMsg]) error
	// contains filtered or unexported methods
}

BrowserServer is the server API for Browser service. All implementations must embed UnimplementedBrowserServer for forward compatibility.

Browser is the remote-browser service. A single long-lived bidirectional stream models one browser tab: the client sends input events, the server streams back rendered frames and chrome state. This maps the browser's natural full-duplex interaction directly onto gRPC streaming — the transport underneath is grpc-transports/websocket, so the same client compiles to GOOS=js/wasm and runs in the browser with no sidecar proxy.

type Browser_SessionClient

type Browser_SessionClient = grpc.BidiStreamingClient[ClientMsg, ServerMsg]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Browser_SessionServer

type Browser_SessionServer = grpc.BidiStreamingServer[ClientMsg, ServerMsg]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Click

type Click struct {
	X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

Click reports a content-area click in viewport pixel coordinates.

func (*Click) Descriptor deprecated

func (*Click) Descriptor() ([]byte, []int)

Deprecated: Use Click.ProtoReflect.Descriptor instead.

func (*Click) GetX

func (x *Click) GetX() int32

func (*Click) GetY

func (x *Click) GetY() int32

func (*Click) ProtoMessage

func (*Click) ProtoMessage()

func (*Click) ProtoReflect

func (x *Click) ProtoReflect() protoreflect.Message

func (*Click) Reset

func (x *Click) Reset()

func (*Click) String

func (x *Click) String() string

type ClientMsg

type ClientMsg struct {

	// Types that are valid to be assigned to Msg:
	//
	//	*ClientMsg_Navigate
	//	*ClientMsg_Click
	//	*ClientMsg_Scroll
	//	*ClientMsg_Key
	//	*ClientMsg_Resize
	//	*ClientMsg_Back
	//	*ClientMsg_Forward
	Msg isClientMsg_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

ClientMsg is one input event from the client. Exactly one field is set.

func (*ClientMsg) Descriptor deprecated

func (*ClientMsg) Descriptor() ([]byte, []int)

Deprecated: Use ClientMsg.ProtoReflect.Descriptor instead.

func (*ClientMsg) GetBack

func (x *ClientMsg) GetBack() *Back

func (*ClientMsg) GetClick

func (x *ClientMsg) GetClick() *Click

func (*ClientMsg) GetForward

func (x *ClientMsg) GetForward() *Forward

func (*ClientMsg) GetKey

func (x *ClientMsg) GetKey() *Key

func (*ClientMsg) GetMsg

func (x *ClientMsg) GetMsg() isClientMsg_Msg

func (*ClientMsg) GetNavigate

func (x *ClientMsg) GetNavigate() *Navigate

func (*ClientMsg) GetResize

func (x *ClientMsg) GetResize() *Resize

func (*ClientMsg) GetScroll

func (x *ClientMsg) GetScroll() *Scroll

func (*ClientMsg) ProtoMessage

func (*ClientMsg) ProtoMessage()

func (*ClientMsg) ProtoReflect

func (x *ClientMsg) ProtoReflect() protoreflect.Message

func (*ClientMsg) Reset

func (x *ClientMsg) Reset()

func (*ClientMsg) String

func (x *ClientMsg) String() string

type ClientMsg_Back

type ClientMsg_Back struct {
	Back *Back `protobuf:"bytes,6,opt,name=back,proto3,oneof"`
}

type ClientMsg_Click

type ClientMsg_Click struct {
	Click *Click `protobuf:"bytes,2,opt,name=click,proto3,oneof"`
}

type ClientMsg_Forward

type ClientMsg_Forward struct {
	Forward *Forward `protobuf:"bytes,7,opt,name=forward,proto3,oneof"`
}

type ClientMsg_Key

type ClientMsg_Key struct {
	Key *Key `protobuf:"bytes,4,opt,name=key,proto3,oneof"`
}

type ClientMsg_Navigate

type ClientMsg_Navigate struct {
	Navigate *Navigate `protobuf:"bytes,1,opt,name=navigate,proto3,oneof"`
}

type ClientMsg_Resize

type ClientMsg_Resize struct {
	Resize *Resize `protobuf:"bytes,5,opt,name=resize,proto3,oneof"`
}

type ClientMsg_Scroll

type ClientMsg_Scroll struct {
	Scroll *Scroll `protobuf:"bytes,3,opt,name=scroll,proto3,oneof"`
}

type Error

type Error struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Error reports a navigation or protocol failure the client should surface (e.g. an SSRF-blocked URL or an unreachable host).

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Forward

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

Forward re-loads the next forward-history entry.

func (*Forward) Descriptor deprecated

func (*Forward) Descriptor() ([]byte, []int)

Deprecated: Use Forward.ProtoReflect.Descriptor instead.

func (*Forward) ProtoMessage

func (*Forward) ProtoMessage()

func (*Forward) ProtoReflect

func (x *Forward) ProtoReflect() protoreflect.Message

func (*Forward) Reset

func (x *Forward) Reset()

func (*Forward) String

func (x *Forward) String() string

type Frame

type Frame struct {
	Png     []byte `protobuf:"bytes,1,opt,name=png,proto3" json:"png,omitempty"`
	W       int32  `protobuf:"varint,2,opt,name=w,proto3" json:"w,omitempty"`
	H       int32  `protobuf:"varint,3,opt,name=h,proto3" json:"h,omitempty"`
	OffsetY int32  `protobuf:"varint,4,opt,name=offset_y,json=offsetY,proto3" json:"offset_y,omitempty"`
	// contains filtered or unexported fields
}

Frame is a rendered viewport slice: raw PNG bytes (no base64 — gRPC carries binary natively) taken from the full page at vertical scroll offset_y.

func (*Frame) Descriptor deprecated

func (*Frame) Descriptor() ([]byte, []int)

Deprecated: Use Frame.ProtoReflect.Descriptor instead.

func (*Frame) GetH

func (x *Frame) GetH() int32

func (*Frame) GetOffsetY

func (x *Frame) GetOffsetY() int32

func (*Frame) GetPng

func (x *Frame) GetPng() []byte

func (*Frame) GetW

func (x *Frame) GetW() int32

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) ProtoReflect

func (x *Frame) ProtoReflect() protoreflect.Message

func (*Frame) Reset

func (x *Frame) Reset()

func (*Frame) String

func (x *Frame) String() string

type Key

type Key struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

Key reports a key press by name (e.g. "Enter", "ArrowDown").

func (*Key) Descriptor deprecated

func (*Key) Descriptor() ([]byte, []int)

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetKey

func (x *Key) GetKey() string

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

func (x *Key) ProtoReflect() protoreflect.Message

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string
type Navigate struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

Navigate loads a new URL as a fresh history entry.

func (*Navigate) Descriptor() ([]byte, []int)

Deprecated: Use Navigate.ProtoReflect.Descriptor instead.

func (x *Navigate) GetUrl() string
func (*Navigate) ProtoMessage()
func (x *Navigate) ProtoReflect() protoreflect.Message
func (x *Navigate) Reset()
func (x *Navigate) String() string

type Resize

type Resize struct {
	W int32 `protobuf:"varint,1,opt,name=w,proto3" json:"w,omitempty"`
	H int32 `protobuf:"varint,2,opt,name=h,proto3" json:"h,omitempty"`
	// contains filtered or unexported fields
}

Resize sets a new content-area viewport size in pixels.

func (*Resize) Descriptor deprecated

func (*Resize) Descriptor() ([]byte, []int)

Deprecated: Use Resize.ProtoReflect.Descriptor instead.

func (*Resize) GetH

func (x *Resize) GetH() int32

func (*Resize) GetW

func (x *Resize) GetW() int32

func (*Resize) ProtoMessage

func (*Resize) ProtoMessage()

func (*Resize) ProtoReflect

func (x *Resize) ProtoReflect() protoreflect.Message

func (*Resize) Reset

func (x *Resize) Reset()

func (*Resize) String

func (x *Resize) String() string

type Scroll

type Scroll struct {
	Dy int32 `protobuf:"varint,1,opt,name=dy,proto3" json:"dy,omitempty"`
	// contains filtered or unexported fields
}

Scroll adjusts the vertical scroll by dy pixels (positive = down).

func (*Scroll) Descriptor deprecated

func (*Scroll) Descriptor() ([]byte, []int)

Deprecated: Use Scroll.ProtoReflect.Descriptor instead.

func (*Scroll) GetDy

func (x *Scroll) GetDy() int32

func (*Scroll) ProtoMessage

func (*Scroll) ProtoMessage()

func (*Scroll) ProtoReflect

func (x *Scroll) ProtoReflect() protoreflect.Message

func (*Scroll) Reset

func (x *Scroll) Reset()

func (*Scroll) String

func (x *Scroll) String() string

type ServerMsg

type ServerMsg struct {

	// Types that are valid to be assigned to Msg:
	//
	//	*ServerMsg_Frame
	//	*ServerMsg_State
	//	*ServerMsg_Error
	Msg isServerMsg_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

ServerMsg is one message streamed to the client. Exactly one field is set.

func (*ServerMsg) Descriptor deprecated

func (*ServerMsg) Descriptor() ([]byte, []int)

Deprecated: Use ServerMsg.ProtoReflect.Descriptor instead.

func (*ServerMsg) GetError

func (x *ServerMsg) GetError() *Error

func (*ServerMsg) GetFrame

func (x *ServerMsg) GetFrame() *Frame

func (*ServerMsg) GetMsg

func (x *ServerMsg) GetMsg() isServerMsg_Msg

func (*ServerMsg) GetState

func (x *ServerMsg) GetState() *State

func (*ServerMsg) ProtoMessage

func (*ServerMsg) ProtoMessage()

func (*ServerMsg) ProtoReflect

func (x *ServerMsg) ProtoReflect() protoreflect.Message

func (*ServerMsg) Reset

func (x *ServerMsg) Reset()

func (*ServerMsg) String

func (x *ServerMsg) String() string

type ServerMsg_Error

type ServerMsg_Error struct {
	Error *Error `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
}

type ServerMsg_Frame

type ServerMsg_Frame struct {
	Frame *Frame `protobuf:"bytes,1,opt,name=frame,proto3,oneof"`
}

type ServerMsg_State

type ServerMsg_State struct {
	State *State `protobuf:"bytes,2,opt,name=state,proto3,oneof"`
}

type State

type State struct {
	Url        string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Title      string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Loading    bool   `protobuf:"varint,3,opt,name=loading,proto3" json:"loading,omitempty"`
	CanBack    bool   `protobuf:"varint,4,opt,name=can_back,json=canBack,proto3" json:"can_back,omitempty"`
	CanForward bool   `protobuf:"varint,5,opt,name=can_forward,json=canForward,proto3" json:"can_forward,omitempty"`
	// contains filtered or unexported fields
}

State is the browser-chrome model: what the address bar and the back/forward buttons should show.

func (*State) Descriptor deprecated

func (*State) Descriptor() ([]byte, []int)

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetCanBack

func (x *State) GetCanBack() bool

func (*State) GetCanForward

func (x *State) GetCanForward() bool

func (*State) GetLoading

func (x *State) GetLoading() bool

func (*State) GetTitle

func (x *State) GetTitle() string

func (*State) GetUrl

func (x *State) GetUrl() string

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

func (x *State) ProtoReflect() protoreflect.Message

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type UnimplementedBrowserServer

type UnimplementedBrowserServer struct{}

UnimplementedBrowserServer 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.

func (UnimplementedBrowserServer) Session

type UnsafeBrowserServer

type UnsafeBrowserServer interface {
	// contains filtered or unexported methods
}

UnsafeBrowserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrowserServer will result in compilation errors.

Jump to

Keyboard shortcuts

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