textrpc

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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.

View Source
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)

View Source
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) CellView

func (c *Client) CellView(h textapi.Handler) textapi.CellView

CellView satisfies textapi.Editor.

func (*Client) Client added in v0.0.2

func (c *Client) Client() EditorClient

Client returns the underlying grpc EditorClient.

func (*Client) Close

func (c *Client) Close() (ret error)

Close closes all resources associated with this client.

func (*Client) Cursor

func (c *Client) Cursor(h textapi.Handler) (term.Coordinates, error)

Cursor requests the editor server to move cursor to pos

func (*Client) Editor

func (c *Client) Editor(file workspaceapi.URI) (textapi.Handler, error)

Editor satisfies textapi.Editor

func (*Client) Init

func (c *Client) Init(ctx context.Context, cc grpc.ClientConnInterface)

Init initializes this Client with broker and client.

func (*Client) MoveToNextLocation

func (c *Client) MoveToNextLocation(h textapi.Handler, ID string) error

MoveToNextLocation requests the editor server to move cursor to the next location in location list identified by ID.

func (*Client) MoveToPrevLocation

func (c *Client) MoveToPrevLocation(h textapi.Handler, ID string) error

MoveToPrevLocation requests the editor server to move cursor to the previous location in location list identified by ID.

func (*Client) SetCursor

func (c *Client) SetCursor(h textapi.Handler, pos term.Coordinates) error

SetCursor requests the editor server to move cursor to pos

func (*Client) SetDefaultAttributes

func (c *Client) SetDefaultAttributes(h textapi.Handler, attrs term.Attributes) error

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

func (c *Client) SubscribeEvents(
	evs []textapi.EventType, h textapi.EventHandler,
) error

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) Enum

func (EditorEvent_Type) EnumDescriptor deprecated

func (EditorEvent_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use EditorEvent_Type.Descriptor instead.

func (EditorEvent_Type) Number

func (EditorEvent_Type) String

func (x EditorEvent_Type) String() string

func (EditorEvent_Type) Type

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

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 (*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 (*SetDefaultAttributesResponse) Reset

func (x *SetDefaultAttributesResponse) Reset()

func (*SetDefaultAttributesResponse) 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 (*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 (*SetLocationListRequest_Location) GetFrom

func (*SetLocationListRequest_Location) GetIcon added in v0.0.32

func (*SetLocationListRequest_Location) GetMsg

func (*SetLocationListRequest_Location) GetTo

func (*SetLocationListRequest_Location) ProtoMessage

func (*SetLocationListRequest_Location) ProtoMessage()

func (*SetLocationListRequest_Location) ProtoReflect

func (*SetLocationListRequest_Location) Reset

func (*SetLocationListRequest_Location) 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

func (t Token) MaxSeekOffset() int

MaxSeekOffset satisfies text.Handler.

func (Token) Resource

func (t Token) Resource() workspaceapi.URI

Resource satisfies text.Handler

func (Token) SeekDown

func (t Token) SeekDown() bool

SeekDown satisfies text.Handler.

func (Token) SeekOffset

func (t Token) SeekOffset() int

SeekOffset satisfies text.Handler.

func (Token) SeekUp

func (t Token) SeekUp() bool

SeekUp satisfies text.Handler.

func (Token) SetCursorAtScroll

func (t Token) SetCursorAtScroll(term.Coordinates) bool

SetCursorAtScroll satisfies text.Handler

func (Token) SetWrap

func (t Token) SetWrap(wrap bool)

SetWrap satisfies text.Handler

func (Token) ShowCommandBar

func (t Token) ShowCommandBar(show bool)

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 NewURI

func NewURI(u workspaceapi.URI) *URI

NewURI maps a workspaceapi.URI into a rpc.URI.

func (*URI) Descriptor deprecated

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

Deprecated: Use URI.ProtoReflect.Descriptor instead.

func (*URI) GetUri

func (x *URI) GetUri() string

func (*URI) ProtoMessage

func (*URI) ProtoMessage()

func (*URI) ProtoReflect

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

func (*URI) Reset

func (x *URI) Reset()

func (*URI) String

func (x *URI) String() string

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) Edit

func (UnimplementedEditorServer) EditCell

func (UnimplementedEditorServer) Editor

func (UnimplementedEditorServer) MoveToNextLocation

func (UnimplementedEditorServer) MoveToPrevLocation

func (UnimplementedEditorServer) RawCells

func (UnimplementedEditorServer) SetCursor

func (UnimplementedEditorServer) SetLocationList

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.

Jump to

Keyboard shortcuts

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