Documentation
¶
Index ¶
- Constants
- func NewToolingHandler(svc ToolingHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ToolingClient
- type ToolingHandler
- type UnimplementedToolingHandler
- func (UnimplementedToolingHandler) AddDependency(context.Context, *connect.Request[v0.AddDependencyRequest]) (*connect.Response[v0.AddDependencyResponse], error)
- func (UnimplementedToolingHandler) ApplyEdit(context.Context, *connect.Request[v0.ApplyEditRequest]) (*connect.Response[v0.ApplyEditResponse], error)
- func (UnimplementedToolingHandler) Build(context.Context, *connect.Request[v0.BuildRequest]) (*connect.Response[v0.BuildResponse], error)
- func (UnimplementedToolingHandler) FindReferences(context.Context, *connect.Request[v0.FindReferencesRequest]) (*connect.Response[v0.FindReferencesResponse], error)
- func (UnimplementedToolingHandler) Fix(context.Context, *connect.Request[v0.FixRequest]) (*connect.Response[v0.FixResponse], error)
- func (UnimplementedToolingHandler) GetCallGraph(context.Context, *connect.Request[v0.GetCallGraphRequest]) (*connect.Response[v0.GetCallGraphResponse], error)
- func (UnimplementedToolingHandler) GetCompletions(context.Context, *connect.Request[v0.GetCompletionsRequest]) (*connect.Response[v0.GetCompletionsResponse], error)
- func (UnimplementedToolingHandler) GetDiagnostics(context.Context, *connect.Request[v0.GetDiagnosticsRequest]) (*connect.Response[v0.GetDiagnosticsResponse], error)
- func (UnimplementedToolingHandler) GetHoverInfo(context.Context, *connect.Request[v0.GetHoverInfoRequest]) (*connect.Response[v0.GetHoverInfoResponse], error)
- func (UnimplementedToolingHandler) GetProjectInfo(context.Context, *connect.Request[v0.GetProjectInfoRequest]) (*connect.Response[v0.GetProjectInfoResponse], error)
- func (UnimplementedToolingHandler) GoToDefinition(context.Context, *connect.Request[v0.GoToDefinitionRequest]) (*connect.Response[v0.GoToDefinitionResponse], error)
- func (UnimplementedToolingHandler) Lint(context.Context, *connect.Request[v0.LintRequest]) (*connect.Response[v0.LintResponse], error)
- func (UnimplementedToolingHandler) ListDependencies(context.Context, *connect.Request[v0.ListDependenciesRequest]) (*connect.Response[v0.ListDependenciesResponse], error)
- func (UnimplementedToolingHandler) ListSymbols(context.Context, *connect.Request[v0.ListSymbolsRequest]) (*connect.Response[v0.ListSymbolsResponse], error)
- func (UnimplementedToolingHandler) RemoveDependency(context.Context, *connect.Request[v0.RemoveDependencyRequest]) (*connect.Response[v0.RemoveDependencyResponse], error)
- func (UnimplementedToolingHandler) RenameSymbol(context.Context, *connect.Request[v0.RenameSymbolRequest]) (*connect.Response[v0.RenameSymbolResponse], error)
- func (UnimplementedToolingHandler) Test(context.Context, *connect.Request[v0.TestRequest]) (*connect.Response[v0.TestResponse], error)
Constants ¶
const ( // ToolingListSymbolsProcedure is the fully-qualified name of the Tooling's ListSymbols RPC. ToolingListSymbolsProcedure = "/codefly.services.tooling.v0.Tooling/ListSymbols" // ToolingGetDiagnosticsProcedure is the fully-qualified name of the Tooling's GetDiagnostics RPC. ToolingGetDiagnosticsProcedure = "/codefly.services.tooling.v0.Tooling/GetDiagnostics" // ToolingGoToDefinitionProcedure is the fully-qualified name of the Tooling's GoToDefinition RPC. ToolingGoToDefinitionProcedure = "/codefly.services.tooling.v0.Tooling/GoToDefinition" // ToolingFindReferencesProcedure is the fully-qualified name of the Tooling's FindReferences RPC. ToolingFindReferencesProcedure = "/codefly.services.tooling.v0.Tooling/FindReferences" // ToolingRenameSymbolProcedure is the fully-qualified name of the Tooling's RenameSymbol RPC. ToolingRenameSymbolProcedure = "/codefly.services.tooling.v0.Tooling/RenameSymbol" // ToolingGetHoverInfoProcedure is the fully-qualified name of the Tooling's GetHoverInfo RPC. ToolingGetHoverInfoProcedure = "/codefly.services.tooling.v0.Tooling/GetHoverInfo" // ToolingGetCompletionsProcedure is the fully-qualified name of the Tooling's GetCompletions RPC. ToolingGetCompletionsProcedure = "/codefly.services.tooling.v0.Tooling/GetCompletions" // ToolingFixProcedure is the fully-qualified name of the Tooling's Fix RPC. ToolingFixProcedure = "/codefly.services.tooling.v0.Tooling/Fix" // ToolingApplyEditProcedure is the fully-qualified name of the Tooling's ApplyEdit RPC. ToolingApplyEditProcedure = "/codefly.services.tooling.v0.Tooling/ApplyEdit" // ToolingListDependenciesProcedure is the fully-qualified name of the Tooling's ListDependencies // RPC. ToolingListDependenciesProcedure = "/codefly.services.tooling.v0.Tooling/ListDependencies" // ToolingAddDependencyProcedure is the fully-qualified name of the Tooling's AddDependency RPC. ToolingAddDependencyProcedure = "/codefly.services.tooling.v0.Tooling/AddDependency" // ToolingRemoveDependencyProcedure is the fully-qualified name of the Tooling's RemoveDependency // RPC. ToolingRemoveDependencyProcedure = "/codefly.services.tooling.v0.Tooling/RemoveDependency" // ToolingGetProjectInfoProcedure is the fully-qualified name of the Tooling's GetProjectInfo RPC. ToolingGetProjectInfoProcedure = "/codefly.services.tooling.v0.Tooling/GetProjectInfo" // ToolingGetCallGraphProcedure is the fully-qualified name of the Tooling's GetCallGraph RPC. ToolingGetCallGraphProcedure = "/codefly.services.tooling.v0.Tooling/GetCallGraph" // ToolingBuildProcedure is the fully-qualified name of the Tooling's Build RPC. ToolingBuildProcedure = "/codefly.services.tooling.v0.Tooling/Build" // ToolingTestProcedure is the fully-qualified name of the Tooling's Test RPC. ToolingTestProcedure = "/codefly.services.tooling.v0.Tooling/Test" // ToolingLintProcedure is the fully-qualified name of the Tooling's Lint RPC. ToolingLintProcedure = "/codefly.services.tooling.v0.Tooling/Lint" )
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
const (
// ToolingName is the fully-qualified name of the Tooling service.
ToolingName = "codefly.services.tooling.v0.Tooling"
)
Variables ¶
This section is empty.
Functions ¶
func NewToolingHandler ¶
func NewToolingHandler(svc ToolingHandler, opts ...connect.HandlerOption) (string, http.Handler)
NewToolingHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type ToolingClient ¶
type ToolingClient interface {
// LSP operations
ListSymbols(context.Context, *connect.Request[v0.ListSymbolsRequest]) (*connect.Response[v0.ListSymbolsResponse], error)
// GetDiagnostics returns compiler, linter, or language-server diagnostics.
GetDiagnostics(context.Context, *connect.Request[v0.GetDiagnosticsRequest]) (*connect.Response[v0.GetDiagnosticsResponse], error)
// GoToDefinition resolves the declaration for a symbol at a source position.
GoToDefinition(context.Context, *connect.Request[v0.GoToDefinitionRequest]) (*connect.Response[v0.GoToDefinitionResponse], error)
// FindReferences resolves usage locations for a symbol at a source position.
FindReferences(context.Context, *connect.Request[v0.FindReferencesRequest]) (*connect.Response[v0.FindReferencesResponse], error)
// RenameSymbol applies a language-aware rename across the service.
RenameSymbol(context.Context, *connect.Request[v0.RenameSymbolRequest]) (*connect.Response[v0.RenameSymbolResponse], error)
// GetHoverInfo returns hover documentation and type information.
GetHoverInfo(context.Context, *connect.Request[v0.GetHoverInfoRequest]) (*connect.Response[v0.GetHoverInfoResponse], error)
// GetCompletions returns completion suggestions at a source position.
GetCompletions(context.Context, *connect.Request[v0.GetCompletionsRequest]) (*connect.Response[v0.GetCompletionsResponse], error)
// Code modification
Fix(context.Context, *connect.Request[v0.FixRequest]) (*connect.Response[v0.FixResponse], error)
// ApplyEdit applies a smart edit and optional language fixers.
ApplyEdit(context.Context, *connect.Request[v0.ApplyEditRequest]) (*connect.Response[v0.ApplyEditResponse], error)
// Dependency management
ListDependencies(context.Context, *connect.Request[v0.ListDependenciesRequest]) (*connect.Response[v0.ListDependenciesResponse], error)
// AddDependency installs a package through the native package manager.
AddDependency(context.Context, *connect.Request[v0.AddDependencyRequest]) (*connect.Response[v0.AddDependencyResponse], error)
// RemoveDependency removes a package through the native package manager.
RemoveDependency(context.Context, *connect.Request[v0.RemoveDependencyRequest]) (*connect.Response[v0.RemoveDependencyResponse], error)
// Analysis
GetProjectInfo(context.Context, *connect.Request[v0.GetProjectInfoRequest]) (*connect.Response[v0.GetProjectInfoResponse], error)
// GetCallGraph runs whole-program call graph analysis.
GetCallGraph(context.Context, *connect.Request[v0.GetCallGraphRequest]) (*connect.Response[v0.GetCallGraphResponse], error)
// Dev validation
Build(context.Context, *connect.Request[v0.BuildRequest]) (*connect.Response[v0.BuildResponse], error)
// Test runs native tests and returns structured counts.
Test(context.Context, *connect.Request[v0.TestRequest]) (*connect.Response[v0.TestResponse], error)
// Lint runs native linting and returns structured diagnostics.
Lint(context.Context, *connect.Request[v0.LintRequest]) (*connect.Response[v0.LintResponse], error)
}
ToolingClient is a client for the codefly.services.tooling.v0.Tooling service.
func NewToolingClient ¶
func NewToolingClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ToolingClient
NewToolingClient constructs a client for the codefly.services.tooling.v0.Tooling service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type ToolingHandler ¶
type ToolingHandler interface {
// LSP operations
ListSymbols(context.Context, *connect.Request[v0.ListSymbolsRequest]) (*connect.Response[v0.ListSymbolsResponse], error)
// GetDiagnostics returns compiler, linter, or language-server diagnostics.
GetDiagnostics(context.Context, *connect.Request[v0.GetDiagnosticsRequest]) (*connect.Response[v0.GetDiagnosticsResponse], error)
// GoToDefinition resolves the declaration for a symbol at a source position.
GoToDefinition(context.Context, *connect.Request[v0.GoToDefinitionRequest]) (*connect.Response[v0.GoToDefinitionResponse], error)
// FindReferences resolves usage locations for a symbol at a source position.
FindReferences(context.Context, *connect.Request[v0.FindReferencesRequest]) (*connect.Response[v0.FindReferencesResponse], error)
// RenameSymbol applies a language-aware rename across the service.
RenameSymbol(context.Context, *connect.Request[v0.RenameSymbolRequest]) (*connect.Response[v0.RenameSymbolResponse], error)
// GetHoverInfo returns hover documentation and type information.
GetHoverInfo(context.Context, *connect.Request[v0.GetHoverInfoRequest]) (*connect.Response[v0.GetHoverInfoResponse], error)
// GetCompletions returns completion suggestions at a source position.
GetCompletions(context.Context, *connect.Request[v0.GetCompletionsRequest]) (*connect.Response[v0.GetCompletionsResponse], error)
// Code modification
Fix(context.Context, *connect.Request[v0.FixRequest]) (*connect.Response[v0.FixResponse], error)
// ApplyEdit applies a smart edit and optional language fixers.
ApplyEdit(context.Context, *connect.Request[v0.ApplyEditRequest]) (*connect.Response[v0.ApplyEditResponse], error)
// Dependency management
ListDependencies(context.Context, *connect.Request[v0.ListDependenciesRequest]) (*connect.Response[v0.ListDependenciesResponse], error)
// AddDependency installs a package through the native package manager.
AddDependency(context.Context, *connect.Request[v0.AddDependencyRequest]) (*connect.Response[v0.AddDependencyResponse], error)
// RemoveDependency removes a package through the native package manager.
RemoveDependency(context.Context, *connect.Request[v0.RemoveDependencyRequest]) (*connect.Response[v0.RemoveDependencyResponse], error)
// Analysis
GetProjectInfo(context.Context, *connect.Request[v0.GetProjectInfoRequest]) (*connect.Response[v0.GetProjectInfoResponse], error)
// GetCallGraph runs whole-program call graph analysis.
GetCallGraph(context.Context, *connect.Request[v0.GetCallGraphRequest]) (*connect.Response[v0.GetCallGraphResponse], error)
// Dev validation
Build(context.Context, *connect.Request[v0.BuildRequest]) (*connect.Response[v0.BuildResponse], error)
// Test runs native tests and returns structured counts.
Test(context.Context, *connect.Request[v0.TestRequest]) (*connect.Response[v0.TestResponse], error)
// Lint runs native linting and returns structured diagnostics.
Lint(context.Context, *connect.Request[v0.LintRequest]) (*connect.Response[v0.LintResponse], error)
}
ToolingHandler is an implementation of the codefly.services.tooling.v0.Tooling service.
type UnimplementedToolingHandler ¶
type UnimplementedToolingHandler struct{}
UnimplementedToolingHandler returns CodeUnimplemented from all methods.
func (UnimplementedToolingHandler) AddDependency ¶
func (UnimplementedToolingHandler) AddDependency(context.Context, *connect.Request[v0.AddDependencyRequest]) (*connect.Response[v0.AddDependencyResponse], error)
func (UnimplementedToolingHandler) ApplyEdit ¶
func (UnimplementedToolingHandler) ApplyEdit(context.Context, *connect.Request[v0.ApplyEditRequest]) (*connect.Response[v0.ApplyEditResponse], error)
func (UnimplementedToolingHandler) Build ¶
func (UnimplementedToolingHandler) Build(context.Context, *connect.Request[v0.BuildRequest]) (*connect.Response[v0.BuildResponse], error)
func (UnimplementedToolingHandler) FindReferences ¶
func (UnimplementedToolingHandler) FindReferences(context.Context, *connect.Request[v0.FindReferencesRequest]) (*connect.Response[v0.FindReferencesResponse], error)
func (UnimplementedToolingHandler) Fix ¶
func (UnimplementedToolingHandler) Fix(context.Context, *connect.Request[v0.FixRequest]) (*connect.Response[v0.FixResponse], error)
func (UnimplementedToolingHandler) GetCallGraph ¶
func (UnimplementedToolingHandler) GetCallGraph(context.Context, *connect.Request[v0.GetCallGraphRequest]) (*connect.Response[v0.GetCallGraphResponse], error)
func (UnimplementedToolingHandler) GetCompletions ¶
func (UnimplementedToolingHandler) GetCompletions(context.Context, *connect.Request[v0.GetCompletionsRequest]) (*connect.Response[v0.GetCompletionsResponse], error)
func (UnimplementedToolingHandler) GetDiagnostics ¶
func (UnimplementedToolingHandler) GetDiagnostics(context.Context, *connect.Request[v0.GetDiagnosticsRequest]) (*connect.Response[v0.GetDiagnosticsResponse], error)
func (UnimplementedToolingHandler) GetHoverInfo ¶
func (UnimplementedToolingHandler) GetHoverInfo(context.Context, *connect.Request[v0.GetHoverInfoRequest]) (*connect.Response[v0.GetHoverInfoResponse], error)
func (UnimplementedToolingHandler) GetProjectInfo ¶
func (UnimplementedToolingHandler) GetProjectInfo(context.Context, *connect.Request[v0.GetProjectInfoRequest]) (*connect.Response[v0.GetProjectInfoResponse], error)
func (UnimplementedToolingHandler) GoToDefinition ¶
func (UnimplementedToolingHandler) GoToDefinition(context.Context, *connect.Request[v0.GoToDefinitionRequest]) (*connect.Response[v0.GoToDefinitionResponse], error)
func (UnimplementedToolingHandler) Lint ¶
func (UnimplementedToolingHandler) Lint(context.Context, *connect.Request[v0.LintRequest]) (*connect.Response[v0.LintResponse], error)
func (UnimplementedToolingHandler) ListDependencies ¶
func (UnimplementedToolingHandler) ListDependencies(context.Context, *connect.Request[v0.ListDependenciesRequest]) (*connect.Response[v0.ListDependenciesResponse], error)
func (UnimplementedToolingHandler) ListSymbols ¶
func (UnimplementedToolingHandler) ListSymbols(context.Context, *connect.Request[v0.ListSymbolsRequest]) (*connect.Response[v0.ListSymbolsResponse], error)
func (UnimplementedToolingHandler) RemoveDependency ¶
func (UnimplementedToolingHandler) RemoveDependency(context.Context, *connect.Request[v0.RemoveDependencyRequest]) (*connect.Response[v0.RemoveDependencyResponse], error)
func (UnimplementedToolingHandler) RenameSymbol ¶
func (UnimplementedToolingHandler) RenameSymbol(context.Context, *connect.Request[v0.RenameSymbolRequest]) (*connect.Response[v0.RenameSymbolResponse], error)
func (UnimplementedToolingHandler) Test ¶
func (UnimplementedToolingHandler) Test(context.Context, *connect.Request[v0.TestRequest]) (*connect.Response[v0.TestResponse], error)