Documentation
¶
Index ¶
- Constants
- Variables
- func NewURIFromProto(u *URI) (workspaceapi.URI, error)
- func RawCellsResponseToBuffer(in *RawCellsResponse) [][]term.Cell
- func RegisterEditorServer(s grpc.ServiceRegistrar, srv EditorServer)
- type Client
- func (c *Client) CellEditor(h textapi.Handler) textapi.CellEditor
- func (c *Client) CellView(h textapi.Handler) textapi.CellView
- func (c *Client) Client() EditorClient
- func (c *Client) Close() (ret error)
- func (c *Client) Cursor(h textapi.Handler) (term.Coordinates, error)
- func (c *Client) Editor(file workspaceapi.URI) (textapi.Handler, error)
- func (c *Client) Init(ctx context.Context, cc grpc.ClientConnInterface)
- func (c *Client) MoveToNextLocation(h textapi.Handler, ID string) error
- func (c *Client) MoveToPrevLocation(h textapi.Handler, ID string) error
- func (c *Client) SetCursor(h textapi.Handler, pos term.Coordinates) error
- func (c *Client) SetDefaultAttributes(h textapi.Handler, attrs term.Attributes) error
- func (c *Client) SetLocationList(h textapi.Handler, pri textapi.LocationPriority, ID string, ...) error
- func (c *Client) SubscribeEvents(evs []textapi.EventType, h textapi.EventHandler) error
- type CursorRequest
- type CursorResponse
- type EditCellRequest
- func (*EditCellRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EditCellRequest) GetEnd() *termrpc.Coordinates
- func (x *EditCellRequest) GetResourceName() *URI
- func (x *EditCellRequest) GetStart() *termrpc.Coordinates
- func (x *EditCellRequest) GetStr() string
- func (*EditCellRequest) ProtoMessage()
- func (x *EditCellRequest) ProtoReflect() protoreflect.Message
- func (x *EditCellRequest) Reset()
- func (x *EditCellRequest) String() string
- type EditCellResponse
- func (*EditCellResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EditCellResponse) GetFrom() *termrpc.Coordinates
- func (x *EditCellResponse) GetOld() string
- func (x *EditCellResponse) GetTo() *termrpc.Coordinates
- func (*EditCellResponse) ProtoMessage()
- func (x *EditCellResponse) ProtoReflect() protoreflect.Message
- func (x *EditCellResponse) Reset()
- func (x *EditCellResponse) String() string
- type EditRequest
- func (*EditRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EditRequest) GetBuffer() []*termrpc.CellRow
- func (x *EditRequest) GetReadOnly() bool
- func (x *EditRequest) GetRecovered() bool
- func (x *EditRequest) GetResourceName() *URI
- func (*EditRequest) ProtoMessage()
- func (x *EditRequest) ProtoReflect() protoreflect.Message
- func (x *EditRequest) Reset()
- func (x *EditRequest) String() string
- type EditResponse
- type EditorClient
- type EditorEvent
- func (*EditorEvent) Descriptor() ([]byte, []int)deprecated
- func (x *EditorEvent) GetContent() string
- func (x *EditorEvent) GetEnd() *termrpc.Coordinates
- func (x *EditorEvent) GetFrom() *termrpc.Coordinates
- func (x *EditorEvent) GetResourceName() *URI
- func (x *EditorEvent) GetStart() *termrpc.Coordinates
- func (x *EditorEvent) GetTo() *termrpc.Coordinates
- func (x *EditorEvent) GetType() EditorEvent_Type
- func (*EditorEvent) ProtoMessage()
- func (x *EditorEvent) ProtoReflect() protoreflect.Message
- func (x *EditorEvent) Reset()
- func (x *EditorEvent) String() string
- type EditorEvent_Type
- func (EditorEvent_Type) Descriptor() protoreflect.EnumDescriptor
- func (x EditorEvent_Type) Enum() *EditorEvent_Type
- func (EditorEvent_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x EditorEvent_Type) Number() protoreflect.EnumNumber
- func (x EditorEvent_Type) String() string
- func (EditorEvent_Type) Type() protoreflect.EnumType
- type EditorRequest
- type EditorResponse
- type EditorServer
- type Editor_SubscribeEventClient
- type Editor_SubscribeEventServer
- type MoveToLocationRequest
- func (*MoveToLocationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MoveToLocationRequest) GetListId() string
- func (x *MoveToLocationRequest) GetResourceName() *URI
- func (*MoveToLocationRequest) ProtoMessage()
- func (x *MoveToLocationRequest) ProtoReflect() protoreflect.Message
- func (x *MoveToLocationRequest) Reset()
- func (x *MoveToLocationRequest) String() string
- type MoveToLocationResponse
- type RawCellsRequest
- type RawCellsResponse
- func (*RawCellsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RawCellsResponse) GetRows() []*termrpc.CellRow
- func (*RawCellsResponse) ProtoMessage()
- func (x *RawCellsResponse) ProtoReflect() protoreflect.Message
- func (x *RawCellsResponse) Reset()
- func (x *RawCellsResponse) String() string
- type SetCursorRequest
- func (*SetCursorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetCursorRequest) GetPos() *termrpc.Coordinates
- func (x *SetCursorRequest) GetResourceName() *URI
- func (*SetCursorRequest) ProtoMessage()
- func (x *SetCursorRequest) ProtoReflect() protoreflect.Message
- func (x *SetCursorRequest) Reset()
- func (x *SetCursorRequest) String() string
- type SetCursorResponse
- type SetDefaultAttributesRequest
- func (*SetDefaultAttributesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetDefaultAttributesRequest) GetAttributes() *termrpc.Attributes
- func (x *SetDefaultAttributesRequest) GetResourceName() *URI
- func (*SetDefaultAttributesRequest) ProtoMessage()
- func (x *SetDefaultAttributesRequest) ProtoReflect() protoreflect.Message
- func (x *SetDefaultAttributesRequest) Reset()
- func (x *SetDefaultAttributesRequest) String() string
- type SetDefaultAttributesResponse
- func (*SetDefaultAttributesResponse) Descriptor() ([]byte, []int)deprecated
- func (*SetDefaultAttributesResponse) ProtoMessage()
- func (x *SetDefaultAttributesResponse) ProtoReflect() protoreflect.Message
- func (x *SetDefaultAttributesResponse) Reset()
- func (x *SetDefaultAttributesResponse) String() string
- type SetLocationListRequest
- func (*SetLocationListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetLocationListRequest) GetListId() string
- func (x *SetLocationListRequest) GetLocations() []*SetLocationListRequest_Location
- func (x *SetLocationListRequest) GetPriority() uint32
- func (x *SetLocationListRequest) GetResourceName() *URI
- func (*SetLocationListRequest) ProtoMessage()
- func (x *SetLocationListRequest) ProtoReflect() protoreflect.Message
- func (x *SetLocationListRequest) Reset()
- func (x *SetLocationListRequest) String() string
- type SetLocationListRequest_Location
- func (*SetLocationListRequest_Location) Descriptor() ([]byte, []int)deprecated
- func (x *SetLocationListRequest_Location) GetAttr() *termrpc.Attributes
- func (x *SetLocationListRequest_Location) GetFrom() *termrpc.Coordinates
- func (x *SetLocationListRequest_Location) GetIcon() string
- func (x *SetLocationListRequest_Location) GetMsg() string
- func (x *SetLocationListRequest_Location) GetTo() *termrpc.Coordinates
- func (*SetLocationListRequest_Location) ProtoMessage()
- func (x *SetLocationListRequest_Location) ProtoReflect() protoreflect.Message
- func (x *SetLocationListRequest_Location) Reset()
- func (x *SetLocationListRequest_Location) String() string
- type SetLocationListResponse
- type SubscribeEventRequest
- func (*SubscribeEventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeEventRequest) GetType() []EditorEvent_Type
- func (x *SubscribeEventRequest) GetUnsubscribe() bool
- func (*SubscribeEventRequest) ProtoMessage()
- func (x *SubscribeEventRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeEventRequest) Reset()
- func (x *SubscribeEventRequest) String() string
- type Token
- func (t Token) MaxSeekOffset() int
- func (t Token) Resource() workspaceapi.URI
- func (t Token) SeekDown() bool
- func (t Token) SeekOffset() int
- func (t Token) SeekUp() bool
- func (t Token) SetCursorAtScroll(term.Coordinates) bool
- func (t Token) SetWrap(wrap bool)
- func (t Token) ShowCommandBar(show bool)
- type URI
- type UnimplementedEditorServer
- func (UnimplementedEditorServer) Cursor(context.Context, *CursorRequest) (*CursorResponse, error)
- func (UnimplementedEditorServer) Edit(context.Context, *EditRequest) (*EditResponse, error)
- func (UnimplementedEditorServer) EditCell(context.Context, *EditCellRequest) (*EditCellResponse, error)
- func (UnimplementedEditorServer) Editor(context.Context, *EditorRequest) (*EditorResponse, error)
- func (UnimplementedEditorServer) MoveToNextLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
- func (UnimplementedEditorServer) MoveToPrevLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
- func (UnimplementedEditorServer) RawCells(context.Context, *RawCellsRequest) (*RawCellsResponse, error)
- func (UnimplementedEditorServer) SetCursor(context.Context, *SetCursorRequest) (*SetCursorResponse, error)
- func (UnimplementedEditorServer) SetDefaultAttributes(context.Context, *SetDefaultAttributesRequest) (*SetDefaultAttributesResponse, error)
- func (UnimplementedEditorServer) SetLocationList(context.Context, *SetLocationListRequest) (*SetLocationListResponse, error)
- func (UnimplementedEditorServer) SubscribeEvent(grpc.BidiStreamingServer[SubscribeEventRequest, EditorEvent]) error
- type UnsafeEditorServer
Constants ¶
const ( Editor_Edit_FullMethodName = "/text.Editor/Edit" Editor_SetCursor_FullMethodName = "/text.Editor/SetCursor" Editor_Cursor_FullMethodName = "/text.Editor/Cursor" Editor_Editor_FullMethodName = "/text.Editor/Editor" Editor_SetLocationList_FullMethodName = "/text.Editor/SetLocationList" Editor_MoveToNextLocation_FullMethodName = "/text.Editor/MoveToNextLocation" Editor_MoveToPrevLocation_FullMethodName = "/text.Editor/MoveToPrevLocation" Editor_EditCell_FullMethodName = "/text.Editor/EditCell" Editor_RawCells_FullMethodName = "/text.Editor/RawCells" Editor_SetDefaultAttributes_FullMethodName = "/text.Editor/SetDefaultAttributes" Editor_SubscribeEvent_FullMethodName = "/text.Editor/SubscribeEvent" )
Variables ¶
var ( EditorEvent_Type_name = map[int32]string{ 0: "TypeOpen", 1: "TypeClose", 2: "TypeFlush", 3: "TypeEdit", 5: "TypeScroll", 12: "TypeCreate", 13: "TypeChange", 6: "TypeFocus", 7: "TypeUnfocus", 8: "TypeCursor", 9: "TypeSelection", 10: "TypeRename", 11: "TypeRemove", 14: "TypeHidden", 15: "TypeVisible", } EditorEvent_Type_value = map[string]int32{ "TypeOpen": 0, "TypeClose": 1, "TypeFlush": 2, "TypeEdit": 3, "TypeScroll": 5, "TypeCreate": 12, "TypeChange": 13, "TypeFocus": 6, "TypeUnfocus": 7, "TypeCursor": 8, "TypeSelection": 9, "TypeRename": 10, "TypeRemove": 11, "TypeHidden": 14, "TypeVisible": 15, } )
Enum value maps for EditorEvent_Type.
var Editor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "text.Editor", HandlerType: (*EditorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Edit", Handler: _Editor_Edit_Handler, }, { MethodName: "SetCursor", Handler: _Editor_SetCursor_Handler, }, { MethodName: "Cursor", Handler: _Editor_Cursor_Handler, }, { MethodName: "Editor", Handler: _Editor_Editor_Handler, }, { MethodName: "SetLocationList", Handler: _Editor_SetLocationList_Handler, }, { MethodName: "MoveToNextLocation", Handler: _Editor_MoveToNextLocation_Handler, }, { MethodName: "MoveToPrevLocation", Handler: _Editor_MoveToPrevLocation_Handler, }, { MethodName: "EditCell", Handler: _Editor_EditCell_Handler, }, { MethodName: "RawCells", Handler: _Editor_RawCells_Handler, }, { MethodName: "SetDefaultAttributes", Handler: _Editor_SetDefaultAttributes_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SubscribeEvent", Handler: _Editor_SubscribeEvent_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "textrpc/editor.proto", }
Editor_ServiceDesc is the grpc.ServiceDesc for Editor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_textrpc_editor_proto protoreflect.FileDescriptor
Functions ¶
func NewURIFromProto ¶
func NewURIFromProto(u *URI) (workspaceapi.URI, error)
NewURIFromProto maps rpc.URI into a workspaceapi.URI.
func RawCellsResponseToBuffer ¶
func RawCellsResponseToBuffer(in *RawCellsResponse) [][]term.Cell
RawCellsResponseToBuffer converts an EditRequest into a 2D matrix of cells.
func RegisterEditorServer ¶
func RegisterEditorServer(s grpc.ServiceRegistrar, srv EditorServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client satisfies textapi.Editor by calling a remote editor over grpc.
func NewClient ¶
func NewClient(ctx context.Context, cc grpc.ClientConnInterface) *Client
NewClient allocates storage for a new Client and initializes it.
func (*Client) CellEditor ¶
func (c *Client) CellEditor(h textapi.Handler) textapi.CellEditor
CellEditor satisfies textapi.Editor.
func (*Client) Client ¶ added in v0.0.2
func (c *Client) Client() EditorClient
Client returns the underlying grpc EditorClient.
func (*Client) Init ¶
func (c *Client) Init(ctx context.Context, cc grpc.ClientConnInterface)
Init initializes this Client with broker and client.
func (*Client) MoveToNextLocation ¶
MoveToNextLocation requests the editor server to move cursor to the next location in location list identified by ID.
func (*Client) MoveToPrevLocation ¶
MoveToPrevLocation requests the editor server to move cursor to the previous location in location list identified by ID.
func (*Client) SetDefaultAttributes ¶
SetDefaultAttributes satisfies textapi.Editor.
func (*Client) SetLocationList ¶
func (c *Client) SetLocationList( h textapi.Handler, pri textapi.LocationPriority, ID string, l textapi.LocationList, ) error
SetLocationList requests the editor server to set l as the new location list for h. Note that h is expected to be the return valu of Edit or a dispatched event, delivered via an EventHandler.
func (*Client) SubscribeEvents ¶
SubscribeEvents requests the editor server to subscribe sub to ev.
type CursorRequest ¶
type CursorRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
// contains filtered or unexported fields
}
func (*CursorRequest) Descriptor
deprecated
func (*CursorRequest) Descriptor() ([]byte, []int)
Deprecated: Use CursorRequest.ProtoReflect.Descriptor instead.
func (*CursorRequest) GetResourceName ¶
func (x *CursorRequest) GetResourceName() *URI
func (*CursorRequest) ProtoMessage ¶
func (*CursorRequest) ProtoMessage()
func (*CursorRequest) ProtoReflect ¶
func (x *CursorRequest) ProtoReflect() protoreflect.Message
func (*CursorRequest) Reset ¶
func (x *CursorRequest) Reset()
func (*CursorRequest) String ¶
func (x *CursorRequest) String() string
type CursorResponse ¶
type CursorResponse struct {
Pos *termrpc.Coordinates `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos,omitempty"`
// contains filtered or unexported fields
}
func (*CursorResponse) Descriptor
deprecated
func (*CursorResponse) Descriptor() ([]byte, []int)
Deprecated: Use CursorResponse.ProtoReflect.Descriptor instead.
func (*CursorResponse) GetPos ¶
func (x *CursorResponse) GetPos() *termrpc.Coordinates
func (*CursorResponse) ProtoMessage ¶
func (*CursorResponse) ProtoMessage()
func (*CursorResponse) ProtoReflect ¶
func (x *CursorResponse) ProtoReflect() protoreflect.Message
func (*CursorResponse) Reset ¶
func (x *CursorResponse) Reset()
func (*CursorResponse) String ¶
func (x *CursorResponse) String() string
type EditCellRequest ¶
type EditCellRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
Start *termrpc.Coordinates `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
End *termrpc.Coordinates `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
Str string `protobuf:"bytes,4,opt,name=str,proto3" json:"str,omitempty"`
// contains filtered or unexported fields
}
func (*EditCellRequest) Descriptor
deprecated
func (*EditCellRequest) Descriptor() ([]byte, []int)
Deprecated: Use EditCellRequest.ProtoReflect.Descriptor instead.
func (*EditCellRequest) GetEnd ¶
func (x *EditCellRequest) GetEnd() *termrpc.Coordinates
func (*EditCellRequest) GetResourceName ¶
func (x *EditCellRequest) GetResourceName() *URI
func (*EditCellRequest) GetStart ¶
func (x *EditCellRequest) GetStart() *termrpc.Coordinates
func (*EditCellRequest) GetStr ¶
func (x *EditCellRequest) GetStr() string
func (*EditCellRequest) ProtoMessage ¶
func (*EditCellRequest) ProtoMessage()
func (*EditCellRequest) ProtoReflect ¶
func (x *EditCellRequest) ProtoReflect() protoreflect.Message
func (*EditCellRequest) Reset ¶
func (x *EditCellRequest) Reset()
func (*EditCellRequest) String ¶
func (x *EditCellRequest) String() string
type EditCellResponse ¶
type EditCellResponse struct {
From *termrpc.Coordinates `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
To *termrpc.Coordinates `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
Old string `protobuf:"bytes,3,opt,name=old,proto3" json:"old,omitempty"`
// contains filtered or unexported fields
}
func (*EditCellResponse) Descriptor
deprecated
func (*EditCellResponse) Descriptor() ([]byte, []int)
Deprecated: Use EditCellResponse.ProtoReflect.Descriptor instead.
func (*EditCellResponse) GetFrom ¶
func (x *EditCellResponse) GetFrom() *termrpc.Coordinates
func (*EditCellResponse) GetOld ¶
func (x *EditCellResponse) GetOld() string
func (*EditCellResponse) GetTo ¶
func (x *EditCellResponse) GetTo() *termrpc.Coordinates
func (*EditCellResponse) ProtoMessage ¶
func (*EditCellResponse) ProtoMessage()
func (*EditCellResponse) ProtoReflect ¶
func (x *EditCellResponse) ProtoReflect() protoreflect.Message
func (*EditCellResponse) Reset ¶
func (x *EditCellResponse) Reset()
func (*EditCellResponse) String ¶
func (x *EditCellResponse) String() string
type EditRequest ¶
type EditRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
Buffer []*termrpc.CellRow `protobuf:"bytes,2,rep,name=buffer,proto3" json:"buffer,omitempty"`
ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
Recovered bool `protobuf:"varint,4,opt,name=recovered,proto3" json:"recovered,omitempty"`
// contains filtered or unexported fields
}
func (*EditRequest) Descriptor
deprecated
func (*EditRequest) Descriptor() ([]byte, []int)
Deprecated: Use EditRequest.ProtoReflect.Descriptor instead.
func (*EditRequest) GetBuffer ¶
func (x *EditRequest) GetBuffer() []*termrpc.CellRow
func (*EditRequest) GetReadOnly ¶
func (x *EditRequest) GetReadOnly() bool
func (*EditRequest) GetRecovered ¶
func (x *EditRequest) GetRecovered() bool
func (*EditRequest) GetResourceName ¶
func (x *EditRequest) GetResourceName() *URI
func (*EditRequest) ProtoMessage ¶
func (*EditRequest) ProtoMessage()
func (*EditRequest) ProtoReflect ¶
func (x *EditRequest) ProtoReflect() protoreflect.Message
func (*EditRequest) Reset ¶
func (x *EditRequest) Reset()
func (*EditRequest) String ¶
func (x *EditRequest) String() string
type EditResponse ¶
type EditResponse struct {
// contains filtered or unexported fields
}
func (*EditResponse) Descriptor
deprecated
func (*EditResponse) Descriptor() ([]byte, []int)
Deprecated: Use EditResponse.ProtoReflect.Descriptor instead.
func (*EditResponse) ProtoMessage ¶
func (*EditResponse) ProtoMessage()
func (*EditResponse) ProtoReflect ¶
func (x *EditResponse) ProtoReflect() protoreflect.Message
func (*EditResponse) Reset ¶
func (x *EditResponse) Reset()
func (*EditResponse) String ¶
func (x *EditResponse) String() string
type EditorClient ¶
type EditorClient interface {
Edit(ctx context.Context, in *EditRequest, opts ...grpc.CallOption) (*EditResponse, error)
SetCursor(ctx context.Context, in *SetCursorRequest, opts ...grpc.CallOption) (*SetCursorResponse, error)
Cursor(ctx context.Context, in *CursorRequest, opts ...grpc.CallOption) (*CursorResponse, error)
Editor(ctx context.Context, in *EditorRequest, opts ...grpc.CallOption) (*EditorResponse, error)
// locations
SetLocationList(ctx context.Context, in *SetLocationListRequest, opts ...grpc.CallOption) (*SetLocationListResponse, error)
MoveToNextLocation(ctx context.Context, in *MoveToLocationRequest, opts ...grpc.CallOption) (*MoveToLocationResponse, error)
MoveToPrevLocation(ctx context.Context, in *MoveToLocationRequest, opts ...grpc.CallOption) (*MoveToLocationResponse, error)
// Editor
EditCell(ctx context.Context, in *EditCellRequest, opts ...grpc.CallOption) (*EditCellResponse, error)
// View
RawCells(ctx context.Context, in *RawCellsRequest, opts ...grpc.CallOption) (*RawCellsResponse, error)
SetDefaultAttributes(ctx context.Context, in *SetDefaultAttributesRequest, opts ...grpc.CallOption) (*SetDefaultAttributesResponse, error)
// streams
SubscribeEvent(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeEventRequest, EditorEvent], error)
}
EditorClient is the client API for Editor 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.
func NewEditorClient ¶
func NewEditorClient(cc grpc.ClientConnInterface) EditorClient
type EditorEvent ¶
type EditorEvent struct {
Type EditorEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=text.EditorEvent_Type" json:"type,omitempty"`
ResourceName *URI `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
Start *termrpc.Coordinates `protobuf:"bytes,4,opt,name=start,proto3" json:"start,omitempty"`
End *termrpc.Coordinates `protobuf:"bytes,5,opt,name=end,proto3" json:"end,omitempty"`
From *termrpc.Coordinates `protobuf:"bytes,6,opt,name=from,proto3" json:"from,omitempty"`
To *termrpc.Coordinates `protobuf:"bytes,7,opt,name=to,proto3" json:"to,omitempty"`
Content string `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*EditorEvent) Descriptor
deprecated
func (*EditorEvent) Descriptor() ([]byte, []int)
Deprecated: Use EditorEvent.ProtoReflect.Descriptor instead.
func (*EditorEvent) GetContent ¶
func (x *EditorEvent) GetContent() string
func (*EditorEvent) GetEnd ¶
func (x *EditorEvent) GetEnd() *termrpc.Coordinates
func (*EditorEvent) GetFrom ¶
func (x *EditorEvent) GetFrom() *termrpc.Coordinates
func (*EditorEvent) GetResourceName ¶
func (x *EditorEvent) GetResourceName() *URI
func (*EditorEvent) GetStart ¶
func (x *EditorEvent) GetStart() *termrpc.Coordinates
func (*EditorEvent) GetTo ¶
func (x *EditorEvent) GetTo() *termrpc.Coordinates
func (*EditorEvent) GetType ¶
func (x *EditorEvent) GetType() EditorEvent_Type
func (*EditorEvent) ProtoMessage ¶
func (*EditorEvent) ProtoMessage()
func (*EditorEvent) ProtoReflect ¶
func (x *EditorEvent) ProtoReflect() protoreflect.Message
func (*EditorEvent) Reset ¶
func (x *EditorEvent) Reset()
func (*EditorEvent) String ¶
func (x *EditorEvent) String() string
type EditorEvent_Type ¶
type EditorEvent_Type int32
const ( EditorEvent_TypeOpen EditorEvent_Type = 0 EditorEvent_TypeClose EditorEvent_Type = 1 EditorEvent_TypeFlush EditorEvent_Type = 2 EditorEvent_TypeEdit EditorEvent_Type = 3 EditorEvent_TypeScroll EditorEvent_Type = 5 EditorEvent_TypeCreate EditorEvent_Type = 12 EditorEvent_TypeChange EditorEvent_Type = 13 EditorEvent_TypeFocus EditorEvent_Type = 6 EditorEvent_TypeUnfocus EditorEvent_Type = 7 EditorEvent_TypeCursor EditorEvent_Type = 8 EditorEvent_TypeSelection EditorEvent_Type = 9 EditorEvent_TypeRename EditorEvent_Type = 10 EditorEvent_TypeRemove EditorEvent_Type = 11 EditorEvent_TypeHidden EditorEvent_Type = 14 EditorEvent_TypeVisible EditorEvent_Type = 15 )
func (EditorEvent_Type) Descriptor ¶
func (EditorEvent_Type) Descriptor() protoreflect.EnumDescriptor
func (EditorEvent_Type) Enum ¶
func (x EditorEvent_Type) Enum() *EditorEvent_Type
func (EditorEvent_Type) EnumDescriptor
deprecated
func (EditorEvent_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use EditorEvent_Type.Descriptor instead.
func (EditorEvent_Type) Number ¶
func (x EditorEvent_Type) Number() protoreflect.EnumNumber
func (EditorEvent_Type) String ¶
func (x EditorEvent_Type) String() string
func (EditorEvent_Type) Type ¶
func (EditorEvent_Type) Type() protoreflect.EnumType
type EditorRequest ¶
type EditorRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
// contains filtered or unexported fields
}
func (*EditorRequest) Descriptor
deprecated
func (*EditorRequest) Descriptor() ([]byte, []int)
Deprecated: Use EditorRequest.ProtoReflect.Descriptor instead.
func (*EditorRequest) GetResourceName ¶
func (x *EditorRequest) GetResourceName() *URI
func (*EditorRequest) ProtoMessage ¶
func (*EditorRequest) ProtoMessage()
func (*EditorRequest) ProtoReflect ¶
func (x *EditorRequest) ProtoReflect() protoreflect.Message
func (*EditorRequest) Reset ¶
func (x *EditorRequest) Reset()
func (*EditorRequest) String ¶
func (x *EditorRequest) String() string
type EditorResponse ¶
type EditorResponse struct {
// contains filtered or unexported fields
}
func (*EditorResponse) Descriptor
deprecated
func (*EditorResponse) Descriptor() ([]byte, []int)
Deprecated: Use EditorResponse.ProtoReflect.Descriptor instead.
func (*EditorResponse) ProtoMessage ¶
func (*EditorResponse) ProtoMessage()
func (*EditorResponse) ProtoReflect ¶
func (x *EditorResponse) ProtoReflect() protoreflect.Message
func (*EditorResponse) Reset ¶
func (x *EditorResponse) Reset()
func (*EditorResponse) String ¶
func (x *EditorResponse) String() string
type EditorServer ¶
type EditorServer interface {
Edit(context.Context, *EditRequest) (*EditResponse, error)
SetCursor(context.Context, *SetCursorRequest) (*SetCursorResponse, error)
Cursor(context.Context, *CursorRequest) (*CursorResponse, error)
Editor(context.Context, *EditorRequest) (*EditorResponse, error)
// locations
SetLocationList(context.Context, *SetLocationListRequest) (*SetLocationListResponse, error)
MoveToNextLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
MoveToPrevLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
// Editor
EditCell(context.Context, *EditCellRequest) (*EditCellResponse, error)
// View
RawCells(context.Context, *RawCellsRequest) (*RawCellsResponse, error)
SetDefaultAttributes(context.Context, *SetDefaultAttributesRequest) (*SetDefaultAttributesResponse, error)
// streams
SubscribeEvent(grpc.BidiStreamingServer[SubscribeEventRequest, EditorEvent]) error
// contains filtered or unexported methods
}
EditorServer is the server API for Editor service. All implementations must embed UnimplementedEditorServer for forward compatibility.
type Editor_SubscribeEventClient ¶
type Editor_SubscribeEventClient = grpc.BidiStreamingClient[SubscribeEventRequest, EditorEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Editor_SubscribeEventServer ¶
type Editor_SubscribeEventServer = grpc.BidiStreamingServer[SubscribeEventRequest, EditorEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type MoveToLocationRequest ¶
type MoveToLocationRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
ListId string `protobuf:"bytes,2,opt,name=list_id,json=listId,proto3" json:"list_id,omitempty"`
// contains filtered or unexported fields
}
func (*MoveToLocationRequest) Descriptor
deprecated
func (*MoveToLocationRequest) Descriptor() ([]byte, []int)
Deprecated: Use MoveToLocationRequest.ProtoReflect.Descriptor instead.
func (*MoveToLocationRequest) GetListId ¶
func (x *MoveToLocationRequest) GetListId() string
func (*MoveToLocationRequest) GetResourceName ¶
func (x *MoveToLocationRequest) GetResourceName() *URI
func (*MoveToLocationRequest) ProtoMessage ¶
func (*MoveToLocationRequest) ProtoMessage()
func (*MoveToLocationRequest) ProtoReflect ¶
func (x *MoveToLocationRequest) ProtoReflect() protoreflect.Message
func (*MoveToLocationRequest) Reset ¶
func (x *MoveToLocationRequest) Reset()
func (*MoveToLocationRequest) String ¶
func (x *MoveToLocationRequest) String() string
type MoveToLocationResponse ¶
type MoveToLocationResponse struct {
// contains filtered or unexported fields
}
func (*MoveToLocationResponse) Descriptor
deprecated
func (*MoveToLocationResponse) Descriptor() ([]byte, []int)
Deprecated: Use MoveToLocationResponse.ProtoReflect.Descriptor instead.
func (*MoveToLocationResponse) ProtoMessage ¶
func (*MoveToLocationResponse) ProtoMessage()
func (*MoveToLocationResponse) ProtoReflect ¶
func (x *MoveToLocationResponse) ProtoReflect() protoreflect.Message
func (*MoveToLocationResponse) Reset ¶
func (x *MoveToLocationResponse) Reset()
func (*MoveToLocationResponse) String ¶
func (x *MoveToLocationResponse) String() string
type RawCellsRequest ¶
type RawCellsRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
// contains filtered or unexported fields
}
func (*RawCellsRequest) Descriptor
deprecated
func (*RawCellsRequest) Descriptor() ([]byte, []int)
Deprecated: Use RawCellsRequest.ProtoReflect.Descriptor instead.
func (*RawCellsRequest) GetResourceName ¶
func (x *RawCellsRequest) GetResourceName() *URI
func (*RawCellsRequest) ProtoMessage ¶
func (*RawCellsRequest) ProtoMessage()
func (*RawCellsRequest) ProtoReflect ¶
func (x *RawCellsRequest) ProtoReflect() protoreflect.Message
func (*RawCellsRequest) Reset ¶
func (x *RawCellsRequest) Reset()
func (*RawCellsRequest) String ¶
func (x *RawCellsRequest) String() string
type RawCellsResponse ¶
type RawCellsResponse struct {
Rows []*termrpc.CellRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
// contains filtered or unexported fields
}
func NewRawCellsResponse ¶
func NewRawCellsResponse(cells [][]term.Cell) *RawCellsResponse
NewRawCellsResponse converts a buf into an RawCellsResponse.
func (*RawCellsResponse) Descriptor
deprecated
func (*RawCellsResponse) Descriptor() ([]byte, []int)
Deprecated: Use RawCellsResponse.ProtoReflect.Descriptor instead.
func (*RawCellsResponse) GetRows ¶
func (x *RawCellsResponse) GetRows() []*termrpc.CellRow
func (*RawCellsResponse) ProtoMessage ¶
func (*RawCellsResponse) ProtoMessage()
func (*RawCellsResponse) ProtoReflect ¶
func (x *RawCellsResponse) ProtoReflect() protoreflect.Message
func (*RawCellsResponse) Reset ¶
func (x *RawCellsResponse) Reset()
func (*RawCellsResponse) String ¶
func (x *RawCellsResponse) String() string
type SetCursorRequest ¶
type SetCursorRequest struct {
Pos *termrpc.Coordinates `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos,omitempty"`
ResourceName *URI `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
// contains filtered or unexported fields
}
func (*SetCursorRequest) Descriptor
deprecated
func (*SetCursorRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetCursorRequest.ProtoReflect.Descriptor instead.
func (*SetCursorRequest) GetPos ¶
func (x *SetCursorRequest) GetPos() *termrpc.Coordinates
func (*SetCursorRequest) GetResourceName ¶
func (x *SetCursorRequest) GetResourceName() *URI
func (*SetCursorRequest) ProtoMessage ¶
func (*SetCursorRequest) ProtoMessage()
func (*SetCursorRequest) ProtoReflect ¶
func (x *SetCursorRequest) ProtoReflect() protoreflect.Message
func (*SetCursorRequest) Reset ¶
func (x *SetCursorRequest) Reset()
func (*SetCursorRequest) String ¶
func (x *SetCursorRequest) String() string
type SetCursorResponse ¶
type SetCursorResponse struct {
// contains filtered or unexported fields
}
func (*SetCursorResponse) Descriptor
deprecated
func (*SetCursorResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetCursorResponse.ProtoReflect.Descriptor instead.
func (*SetCursorResponse) ProtoMessage ¶
func (*SetCursorResponse) ProtoMessage()
func (*SetCursorResponse) ProtoReflect ¶
func (x *SetCursorResponse) ProtoReflect() protoreflect.Message
func (*SetCursorResponse) Reset ¶
func (x *SetCursorResponse) Reset()
func (*SetCursorResponse) String ¶
func (x *SetCursorResponse) String() string
type SetDefaultAttributesRequest ¶
type SetDefaultAttributesRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
Attributes *termrpc.Attributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
// contains filtered or unexported fields
}
func (*SetDefaultAttributesRequest) Descriptor
deprecated
func (*SetDefaultAttributesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetDefaultAttributesRequest.ProtoReflect.Descriptor instead.
func (*SetDefaultAttributesRequest) GetAttributes ¶
func (x *SetDefaultAttributesRequest) GetAttributes() *termrpc.Attributes
func (*SetDefaultAttributesRequest) GetResourceName ¶
func (x *SetDefaultAttributesRequest) GetResourceName() *URI
func (*SetDefaultAttributesRequest) ProtoMessage ¶
func (*SetDefaultAttributesRequest) ProtoMessage()
func (*SetDefaultAttributesRequest) ProtoReflect ¶
func (x *SetDefaultAttributesRequest) ProtoReflect() protoreflect.Message
func (*SetDefaultAttributesRequest) Reset ¶
func (x *SetDefaultAttributesRequest) Reset()
func (*SetDefaultAttributesRequest) String ¶
func (x *SetDefaultAttributesRequest) String() string
type SetDefaultAttributesResponse ¶
type SetDefaultAttributesResponse struct {
// contains filtered or unexported fields
}
func (*SetDefaultAttributesResponse) Descriptor
deprecated
func (*SetDefaultAttributesResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetDefaultAttributesResponse.ProtoReflect.Descriptor instead.
func (*SetDefaultAttributesResponse) ProtoMessage ¶
func (*SetDefaultAttributesResponse) ProtoMessage()
func (*SetDefaultAttributesResponse) ProtoReflect ¶
func (x *SetDefaultAttributesResponse) ProtoReflect() protoreflect.Message
func (*SetDefaultAttributesResponse) Reset ¶
func (x *SetDefaultAttributesResponse) Reset()
func (*SetDefaultAttributesResponse) String ¶
func (x *SetDefaultAttributesResponse) String() string
type SetLocationListRequest ¶
type SetLocationListRequest struct {
ResourceName *URI `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
ListId string `protobuf:"bytes,2,opt,name=list_id,json=listId,proto3" json:"list_id,omitempty"`
Locations []*SetLocationListRequest_Location `protobuf:"bytes,3,rep,name=locations,proto3" json:"locations,omitempty"`
Priority uint32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
// contains filtered or unexported fields
}
func (*SetLocationListRequest) Descriptor
deprecated
func (*SetLocationListRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetLocationListRequest.ProtoReflect.Descriptor instead.
func (*SetLocationListRequest) GetListId ¶
func (x *SetLocationListRequest) GetListId() string
func (*SetLocationListRequest) GetLocations ¶
func (x *SetLocationListRequest) GetLocations() []*SetLocationListRequest_Location
func (*SetLocationListRequest) GetPriority ¶
func (x *SetLocationListRequest) GetPriority() uint32
func (*SetLocationListRequest) GetResourceName ¶
func (x *SetLocationListRequest) GetResourceName() *URI
func (*SetLocationListRequest) ProtoMessage ¶
func (*SetLocationListRequest) ProtoMessage()
func (*SetLocationListRequest) ProtoReflect ¶
func (x *SetLocationListRequest) ProtoReflect() protoreflect.Message
func (*SetLocationListRequest) Reset ¶
func (x *SetLocationListRequest) Reset()
func (*SetLocationListRequest) String ¶
func (x *SetLocationListRequest) String() string
type SetLocationListRequest_Location ¶
type SetLocationListRequest_Location struct {
From *termrpc.Coordinates `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
To *termrpc.Coordinates `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
Attr *termrpc.Attributes `protobuf:"bytes,3,opt,name=attr,proto3" json:"attr,omitempty"`
Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"`
Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"`
// contains filtered or unexported fields
}
func (*SetLocationListRequest_Location) Descriptor
deprecated
func (*SetLocationListRequest_Location) Descriptor() ([]byte, []int)
Deprecated: Use SetLocationListRequest_Location.ProtoReflect.Descriptor instead.
func (*SetLocationListRequest_Location) GetAttr ¶
func (x *SetLocationListRequest_Location) GetAttr() *termrpc.Attributes
func (*SetLocationListRequest_Location) GetFrom ¶
func (x *SetLocationListRequest_Location) GetFrom() *termrpc.Coordinates
func (*SetLocationListRequest_Location) GetIcon ¶ added in v0.0.32
func (x *SetLocationListRequest_Location) GetIcon() string
func (*SetLocationListRequest_Location) GetMsg ¶
func (x *SetLocationListRequest_Location) GetMsg() string
func (*SetLocationListRequest_Location) GetTo ¶
func (x *SetLocationListRequest_Location) GetTo() *termrpc.Coordinates
func (*SetLocationListRequest_Location) ProtoMessage ¶
func (*SetLocationListRequest_Location) ProtoMessage()
func (*SetLocationListRequest_Location) ProtoReflect ¶
func (x *SetLocationListRequest_Location) ProtoReflect() protoreflect.Message
func (*SetLocationListRequest_Location) Reset ¶
func (x *SetLocationListRequest_Location) Reset()
func (*SetLocationListRequest_Location) String ¶
func (x *SetLocationListRequest_Location) String() string
type SetLocationListResponse ¶
type SetLocationListResponse struct {
// contains filtered or unexported fields
}
func (*SetLocationListResponse) Descriptor
deprecated
func (*SetLocationListResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetLocationListResponse.ProtoReflect.Descriptor instead.
func (*SetLocationListResponse) ProtoMessage ¶
func (*SetLocationListResponse) ProtoMessage()
func (*SetLocationListResponse) ProtoReflect ¶
func (x *SetLocationListResponse) ProtoReflect() protoreflect.Message
func (*SetLocationListResponse) Reset ¶
func (x *SetLocationListResponse) Reset()
func (*SetLocationListResponse) String ¶
func (x *SetLocationListResponse) String() string
type SubscribeEventRequest ¶
type SubscribeEventRequest struct {
Type []EditorEvent_Type `protobuf:"varint,1,rep,packed,name=type,proto3,enum=text.EditorEvent_Type" json:"type,omitempty"`
Unsubscribe bool `protobuf:"varint,3,opt,name=unsubscribe,proto3" json:"unsubscribe,omitempty"`
// contains filtered or unexported fields
}
func (*SubscribeEventRequest) Descriptor
deprecated
func (*SubscribeEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeEventRequest.ProtoReflect.Descriptor instead.
func (*SubscribeEventRequest) GetType ¶
func (x *SubscribeEventRequest) GetType() []EditorEvent_Type
func (*SubscribeEventRequest) GetUnsubscribe ¶
func (x *SubscribeEventRequest) GetUnsubscribe() bool
func (*SubscribeEventRequest) ProtoMessage ¶
func (*SubscribeEventRequest) ProtoMessage()
func (*SubscribeEventRequest) ProtoReflect ¶
func (x *SubscribeEventRequest) ProtoReflect() protoreflect.Message
func (*SubscribeEventRequest) Reset ¶
func (x *SubscribeEventRequest) Reset()
func (*SubscribeEventRequest) String ¶
func (x *SubscribeEventRequest) String() string
type Token ¶
type Token struct {
browserrpc.Token
workspaceapi.URI
}
Token wraps a browser.Token to satisfy editor.Handler.
func (Token) MaxSeekOffset ¶
MaxSeekOffset satisfies text.Handler.
func (Token) SetCursorAtScroll ¶
func (t Token) SetCursorAtScroll(term.Coordinates) bool
SetCursorAtScroll satisfies text.Handler
func (Token) ShowCommandBar ¶
ShowCommandBar satisfies text.Handler.
type URI ¶
type URI struct {
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
// contains filtered or unexported fields
}
func (*URI) Descriptor
deprecated
func (*URI) ProtoMessage ¶
func (*URI) ProtoMessage()
func (*URI) ProtoReflect ¶
func (x *URI) ProtoReflect() protoreflect.Message
type UnimplementedEditorServer ¶
type UnimplementedEditorServer struct{}
UnimplementedEditorServer 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 (UnimplementedEditorServer) Cursor ¶
func (UnimplementedEditorServer) Cursor(context.Context, *CursorRequest) (*CursorResponse, error)
func (UnimplementedEditorServer) Edit ¶
func (UnimplementedEditorServer) Edit(context.Context, *EditRequest) (*EditResponse, error)
func (UnimplementedEditorServer) EditCell ¶
func (UnimplementedEditorServer) EditCell(context.Context, *EditCellRequest) (*EditCellResponse, error)
func (UnimplementedEditorServer) Editor ¶
func (UnimplementedEditorServer) Editor(context.Context, *EditorRequest) (*EditorResponse, error)
func (UnimplementedEditorServer) MoveToNextLocation ¶
func (UnimplementedEditorServer) MoveToNextLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
func (UnimplementedEditorServer) MoveToPrevLocation ¶
func (UnimplementedEditorServer) MoveToPrevLocation(context.Context, *MoveToLocationRequest) (*MoveToLocationResponse, error)
func (UnimplementedEditorServer) RawCells ¶
func (UnimplementedEditorServer) RawCells(context.Context, *RawCellsRequest) (*RawCellsResponse, error)
func (UnimplementedEditorServer) SetCursor ¶
func (UnimplementedEditorServer) SetCursor(context.Context, *SetCursorRequest) (*SetCursorResponse, error)
func (UnimplementedEditorServer) SetDefaultAttributes ¶
func (UnimplementedEditorServer) SetDefaultAttributes(context.Context, *SetDefaultAttributesRequest) (*SetDefaultAttributesResponse, error)
func (UnimplementedEditorServer) SetLocationList ¶
func (UnimplementedEditorServer) SetLocationList(context.Context, *SetLocationListRequest) (*SetLocationListResponse, error)
func (UnimplementedEditorServer) SubscribeEvent ¶
func (UnimplementedEditorServer) SubscribeEvent(grpc.BidiStreamingServer[SubscribeEventRequest, EditorEvent]) error
type UnsafeEditorServer ¶
type UnsafeEditorServer interface {
// contains filtered or unexported methods
}
UnsafeEditorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EditorServer will result in compilation errors.