gatewayv1connect

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GatewayListServicesProcedure is the fully-qualified name of the Gateway's ListServices RPC.
	GatewayListServicesProcedure = "/mind.gateway.v1.Gateway/ListServices"
	// GatewayReadFileProcedure is the fully-qualified name of the Gateway's ReadFile RPC.
	GatewayReadFileProcedure = "/mind.gateway.v1.Gateway/ReadFile"
	// GatewayWriteFileProcedure is the fully-qualified name of the Gateway's WriteFile RPC.
	GatewayWriteFileProcedure = "/mind.gateway.v1.Gateway/WriteFile"
	// GatewayListFilesProcedure is the fully-qualified name of the Gateway's ListFiles RPC.
	GatewayListFilesProcedure = "/mind.gateway.v1.Gateway/ListFiles"
	// GatewayDeleteFileProcedure is the fully-qualified name of the Gateway's DeleteFile RPC.
	GatewayDeleteFileProcedure = "/mind.gateway.v1.Gateway/DeleteFile"
	// GatewayMoveFileProcedure is the fully-qualified name of the Gateway's MoveFile RPC.
	GatewayMoveFileProcedure = "/mind.gateway.v1.Gateway/MoveFile"
	// GatewayCreateFileProcedure is the fully-qualified name of the Gateway's CreateFile RPC.
	GatewayCreateFileProcedure = "/mind.gateway.v1.Gateway/CreateFile"
	// GatewayListSymbolsProcedure is the fully-qualified name of the Gateway's ListSymbols RPC.
	GatewayListSymbolsProcedure = "/mind.gateway.v1.Gateway/ListSymbols"
	// GatewayGetDiagnosticsProcedure is the fully-qualified name of the Gateway's GetDiagnostics RPC.
	GatewayGetDiagnosticsProcedure = "/mind.gateway.v1.Gateway/GetDiagnostics"
	// GatewayGoToDefinitionProcedure is the fully-qualified name of the Gateway's GoToDefinition RPC.
	GatewayGoToDefinitionProcedure = "/mind.gateway.v1.Gateway/GoToDefinition"
	// GatewayFindReferencesProcedure is the fully-qualified name of the Gateway's FindReferences RPC.
	GatewayFindReferencesProcedure = "/mind.gateway.v1.Gateway/FindReferences"
	// GatewayRenameSymbolProcedure is the fully-qualified name of the Gateway's RenameSymbol RPC.
	GatewayRenameSymbolProcedure = "/mind.gateway.v1.Gateway/RenameSymbol"
	// GatewayGetHoverInfoProcedure is the fully-qualified name of the Gateway's GetHoverInfo RPC.
	GatewayGetHoverInfoProcedure = "/mind.gateway.v1.Gateway/GetHoverInfo"
	// GatewayFixProcedure is the fully-qualified name of the Gateway's Fix RPC.
	GatewayFixProcedure = "/mind.gateway.v1.Gateway/Fix"
	// GatewayApplyEditProcedure is the fully-qualified name of the Gateway's ApplyEdit RPC.
	GatewayApplyEditProcedure = "/mind.gateway.v1.Gateway/ApplyEdit"
	// GatewayBatchApplyEditsProcedure is the fully-qualified name of the Gateway's BatchApplyEdits RPC.
	GatewayBatchApplyEditsProcedure = "/mind.gateway.v1.Gateway/BatchApplyEdits"
	// GatewaySearchProcedure is the fully-qualified name of the Gateway's Search RPC.
	GatewaySearchProcedure = "/mind.gateway.v1.Gateway/Search"
	// GatewayBuildProcedure is the fully-qualified name of the Gateway's Build RPC.
	GatewayBuildProcedure = "/mind.gateway.v1.Gateway/Build"
	// GatewayLintProcedure is the fully-qualified name of the Gateway's Lint RPC.
	GatewayLintProcedure = "/mind.gateway.v1.Gateway/Lint"
	// GatewayTestProcedure is the fully-qualified name of the Gateway's Test RPC.
	GatewayTestProcedure = "/mind.gateway.v1.Gateway/Test"
	// GatewayRunCommandProcedure is the fully-qualified name of the Gateway's RunCommand RPC.
	GatewayRunCommandProcedure = "/mind.gateway.v1.Gateway/RunCommand"
	// GatewayListAllCommandsProcedure is the fully-qualified name of the Gateway's ListAllCommands RPC.
	GatewayListAllCommandsProcedure = "/mind.gateway.v1.Gateway/ListAllCommands"
	// GatewayRunChecksProcedure is the fully-qualified name of the Gateway's RunChecks RPC.
	GatewayRunChecksProcedure = "/mind.gateway.v1.Gateway/RunChecks"
	// GatewayGitStatusProcedure is the fully-qualified name of the Gateway's GitStatus RPC.
	GatewayGitStatusProcedure = "/mind.gateway.v1.Gateway/GitStatus"
	// GatewayGitDiffProcedure is the fully-qualified name of the Gateway's GitDiff RPC.
	GatewayGitDiffProcedure = "/mind.gateway.v1.Gateway/GitDiff"
	// GatewayGitLogProcedure is the fully-qualified name of the Gateway's GitLog RPC.
	GatewayGitLogProcedure = "/mind.gateway.v1.Gateway/GitLog"
	// GatewayGitCommitProcedure is the fully-qualified name of the Gateway's GitCommit RPC.
	GatewayGitCommitProcedure = "/mind.gateway.v1.Gateway/GitCommit"
	// GatewayListDependenciesProcedure is the fully-qualified name of the Gateway's ListDependencies
	// RPC.
	GatewayListDependenciesProcedure = "/mind.gateway.v1.Gateway/ListDependencies"
	// GatewayAddDependencyProcedure is the fully-qualified name of the Gateway's AddDependency RPC.
	GatewayAddDependencyProcedure = "/mind.gateway.v1.Gateway/AddDependency"
	// GatewayRemoveDependencyProcedure is the fully-qualified name of the Gateway's RemoveDependency
	// RPC.
	GatewayRemoveDependencyProcedure = "/mind.gateway.v1.Gateway/RemoveDependency"
	// GatewayGetProjectInfoProcedure is the fully-qualified name of the Gateway's GetProjectInfo RPC.
	GatewayGetProjectInfoProcedure = "/mind.gateway.v1.Gateway/GetProjectInfo"
)

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.

View Source
const (
	// GatewayName is the fully-qualified name of the Gateway service.
	GatewayName = "mind.gateway.v1.Gateway"
)

Variables

This section is empty.

Functions

func NewGatewayHandler

func NewGatewayHandler(svc GatewayHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewGatewayHandler 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 GatewayClient

type GatewayClient interface {
	// ListServices returns all services known to the gateway.
	ListServices(context.Context, *connect.Request[v1.ListServicesRequest]) (*connect.Response[v1.ListServicesResponse], error)
	// ReadFile reads a file from a service's source tree.
	ReadFile(context.Context, *connect.Request[v1.ReadFileRequest]) (*connect.Response[v1.ReadFileResponse], error)
	// WriteFile writes (creates or overwrites) a file in a service's source tree.
	WriteFile(context.Context, *connect.Request[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error)
	// ListFiles lists files in a service's source tree.
	ListFiles(context.Context, *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error)
	// DeleteFile removes a file from a service's source tree.
	DeleteFile(context.Context, *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error)
	// MoveFile renames or moves a file, optionally updating imports.
	MoveFile(context.Context, *connect.Request[v1.MoveFileRequest]) (*connect.Response[v1.MoveFileResponse], error)
	// CreateFile creates a new file (fails if exists unless overwrite set).
	CreateFile(context.Context, *connect.Request[v1.CreateFileRequest]) (*connect.Response[v1.CreateFileResponse], error)
	// ListSymbols returns code symbols from a service via LSP.
	// If service is empty, returns symbols across all services.
	ListSymbols(context.Context, *connect.Request[v1.ListSymbolsRequest]) (*connect.Response[v1.ListSymbolsResponse], error)
	// GetDiagnostics returns compiler/linter diagnostics from the language server.
	GetDiagnostics(context.Context, *connect.Request[v1.GetDiagnosticsRequest]) (*connect.Response[v1.GetDiagnosticsResponse], error)
	// GoToDefinition finds where a symbol at a given position is defined.
	GoToDefinition(context.Context, *connect.Request[v1.GoToDefinitionRequest]) (*connect.Response[v1.GoToDefinitionResponse], error)
	// FindReferences finds all usages of a symbol at a given position.
	FindReferences(context.Context, *connect.Request[v1.FindReferencesRequest]) (*connect.Response[v1.FindReferencesResponse], error)
	// RenameSymbol performs a language-aware rename across all files.
	RenameSymbol(context.Context, *connect.Request[v1.RenameSymbolRequest]) (*connect.Response[v1.RenameSymbolResponse], error)
	// GetHoverInfo returns type info and documentation at a position.
	GetHoverInfo(context.Context, *connect.Request[v1.GetHoverInfoRequest]) (*connect.Response[v1.GetHoverInfoResponse], error)
	// Fix runs language-specific fixers on a file (goimports, gofmt, prettier, etc.).
	Fix(context.Context, *connect.Request[v1.FixRequest]) (*connect.Response[v1.FixResponse], error)
	// ApplyEdit performs a smart FIND/REPLACE on a file.
	ApplyEdit(context.Context, *connect.Request[v1.ApplyEditRequest]) (*connect.Response[v1.ApplyEditResponse], error)
	// BatchApplyEdits applies multiple edits atomically across files/services.
	BatchApplyEdits(context.Context, *connect.Request[v1.BatchApplyEditsRequest]) (*connect.Response[v1.BatchApplyEditsResponse], error)
	// Search performs text search across a service's source tree.
	Search(context.Context, *connect.Request[v1.SearchRequest]) (*connect.Response[v1.SearchResponse], error)
	// Build compiles the service (and its dependencies if needed).
	Build(context.Context, *connect.Request[v1.BuildRequest]) (*connect.Response[v1.BuildResponse], error)
	// Lint runs the configured lint command on the service.
	Lint(context.Context, *connect.Request[v1.LintRequest]) (*connect.Response[v1.LintResponse], error)
	// Test runs the configured test command on the service.
	Test(context.Context, *connect.Request[v1.TestRequest]) (*connect.Response[v1.TestResponse], error)
	// RunCommand executes an arbitrary command in the service context.
	RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.Response[v1.RunCommandResponse], error)
	// ListAllCommands returns commands from all loaded plugins plus built-in ones.
	ListAllCommands(context.Context, *connect.Request[v1.ListAllCommandsRequest]) (*connect.Response[v1.ListAllCommandsResponse], error)
	// RunChecks executes a set of verification checks against the service.
	RunChecks(context.Context, *connect.Request[v1.RunChecksRequest]) (*connect.Response[v1.RunChecksResponse], error)
	// GitStatus returns the current git status of modified/staged/untracked files.
	GitStatus(context.Context, *connect.Request[v1.GitStatusRequest]) (*connect.Response[v1.GitStatusResponse], error)
	// GitDiff shows changes (unstaged or staged).
	GitDiff(context.Context, *connect.Request[v1.GitDiffRequest]) (*connect.Response[v1.GitDiffResponse], error)
	// GitLog returns recent commit history.
	GitLog(context.Context, *connect.Request[v1.GitLogRequest]) (*connect.Response[v1.GitLogResponse], error)
	// GitCommit commits staged changes.
	GitCommit(context.Context, *connect.Request[v1.GitCommitRequest]) (*connect.Response[v1.GitCommitResponse], error)
	// ListDependencies returns all dependencies with versions.
	ListDependencies(context.Context, *connect.Request[v1.ListDependenciesRequest]) (*connect.Response[v1.ListDependenciesResponse], error)
	// AddDependency adds a package via the language package manager.
	AddDependency(context.Context, *connect.Request[v1.AddDependencyRequest]) (*connect.Response[v1.AddDependencyResponse], error)
	// RemoveDependency removes a package via the language package manager.
	RemoveDependency(context.Context, *connect.Request[v1.RemoveDependencyRequest]) (*connect.Response[v1.RemoveDependencyResponse], error)
	// GetProjectInfo returns rich project metadata: module, packages, deps, file hashes.
	GetProjectInfo(context.Context, *connect.Request[v1.GetProjectInfoRequest]) (*connect.Response[v1.GetProjectInfoResponse], error)
}

GatewayClient is a client for the mind.gateway.v1.Gateway service.

func NewGatewayClient

func NewGatewayClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) GatewayClient

NewGatewayClient constructs a client for the mind.gateway.v1.Gateway 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 GatewayHandler

type GatewayHandler interface {
	// ListServices returns all services known to the gateway.
	ListServices(context.Context, *connect.Request[v1.ListServicesRequest]) (*connect.Response[v1.ListServicesResponse], error)
	// ReadFile reads a file from a service's source tree.
	ReadFile(context.Context, *connect.Request[v1.ReadFileRequest]) (*connect.Response[v1.ReadFileResponse], error)
	// WriteFile writes (creates or overwrites) a file in a service's source tree.
	WriteFile(context.Context, *connect.Request[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error)
	// ListFiles lists files in a service's source tree.
	ListFiles(context.Context, *connect.Request[v1.ListFilesRequest]) (*connect.Response[v1.ListFilesResponse], error)
	// DeleteFile removes a file from a service's source tree.
	DeleteFile(context.Context, *connect.Request[v1.DeleteFileRequest]) (*connect.Response[v1.DeleteFileResponse], error)
	// MoveFile renames or moves a file, optionally updating imports.
	MoveFile(context.Context, *connect.Request[v1.MoveFileRequest]) (*connect.Response[v1.MoveFileResponse], error)
	// CreateFile creates a new file (fails if exists unless overwrite set).
	CreateFile(context.Context, *connect.Request[v1.CreateFileRequest]) (*connect.Response[v1.CreateFileResponse], error)
	// ListSymbols returns code symbols from a service via LSP.
	// If service is empty, returns symbols across all services.
	ListSymbols(context.Context, *connect.Request[v1.ListSymbolsRequest]) (*connect.Response[v1.ListSymbolsResponse], error)
	// GetDiagnostics returns compiler/linter diagnostics from the language server.
	GetDiagnostics(context.Context, *connect.Request[v1.GetDiagnosticsRequest]) (*connect.Response[v1.GetDiagnosticsResponse], error)
	// GoToDefinition finds where a symbol at a given position is defined.
	GoToDefinition(context.Context, *connect.Request[v1.GoToDefinitionRequest]) (*connect.Response[v1.GoToDefinitionResponse], error)
	// FindReferences finds all usages of a symbol at a given position.
	FindReferences(context.Context, *connect.Request[v1.FindReferencesRequest]) (*connect.Response[v1.FindReferencesResponse], error)
	// RenameSymbol performs a language-aware rename across all files.
	RenameSymbol(context.Context, *connect.Request[v1.RenameSymbolRequest]) (*connect.Response[v1.RenameSymbolResponse], error)
	// GetHoverInfo returns type info and documentation at a position.
	GetHoverInfo(context.Context, *connect.Request[v1.GetHoverInfoRequest]) (*connect.Response[v1.GetHoverInfoResponse], error)
	// Fix runs language-specific fixers on a file (goimports, gofmt, prettier, etc.).
	Fix(context.Context, *connect.Request[v1.FixRequest]) (*connect.Response[v1.FixResponse], error)
	// ApplyEdit performs a smart FIND/REPLACE on a file.
	ApplyEdit(context.Context, *connect.Request[v1.ApplyEditRequest]) (*connect.Response[v1.ApplyEditResponse], error)
	// BatchApplyEdits applies multiple edits atomically across files/services.
	BatchApplyEdits(context.Context, *connect.Request[v1.BatchApplyEditsRequest]) (*connect.Response[v1.BatchApplyEditsResponse], error)
	// Search performs text search across a service's source tree.
	Search(context.Context, *connect.Request[v1.SearchRequest]) (*connect.Response[v1.SearchResponse], error)
	// Build compiles the service (and its dependencies if needed).
	Build(context.Context, *connect.Request[v1.BuildRequest]) (*connect.Response[v1.BuildResponse], error)
	// Lint runs the configured lint command on the service.
	Lint(context.Context, *connect.Request[v1.LintRequest]) (*connect.Response[v1.LintResponse], error)
	// Test runs the configured test command on the service.
	Test(context.Context, *connect.Request[v1.TestRequest]) (*connect.Response[v1.TestResponse], error)
	// RunCommand executes an arbitrary command in the service context.
	RunCommand(context.Context, *connect.Request[v1.RunCommandRequest]) (*connect.Response[v1.RunCommandResponse], error)
	// ListAllCommands returns commands from all loaded plugins plus built-in ones.
	ListAllCommands(context.Context, *connect.Request[v1.ListAllCommandsRequest]) (*connect.Response[v1.ListAllCommandsResponse], error)
	// RunChecks executes a set of verification checks against the service.
	RunChecks(context.Context, *connect.Request[v1.RunChecksRequest]) (*connect.Response[v1.RunChecksResponse], error)
	// GitStatus returns the current git status of modified/staged/untracked files.
	GitStatus(context.Context, *connect.Request[v1.GitStatusRequest]) (*connect.Response[v1.GitStatusResponse], error)
	// GitDiff shows changes (unstaged or staged).
	GitDiff(context.Context, *connect.Request[v1.GitDiffRequest]) (*connect.Response[v1.GitDiffResponse], error)
	// GitLog returns recent commit history.
	GitLog(context.Context, *connect.Request[v1.GitLogRequest]) (*connect.Response[v1.GitLogResponse], error)
	// GitCommit commits staged changes.
	GitCommit(context.Context, *connect.Request[v1.GitCommitRequest]) (*connect.Response[v1.GitCommitResponse], error)
	// ListDependencies returns all dependencies with versions.
	ListDependencies(context.Context, *connect.Request[v1.ListDependenciesRequest]) (*connect.Response[v1.ListDependenciesResponse], error)
	// AddDependency adds a package via the language package manager.
	AddDependency(context.Context, *connect.Request[v1.AddDependencyRequest]) (*connect.Response[v1.AddDependencyResponse], error)
	// RemoveDependency removes a package via the language package manager.
	RemoveDependency(context.Context, *connect.Request[v1.RemoveDependencyRequest]) (*connect.Response[v1.RemoveDependencyResponse], error)
	// GetProjectInfo returns rich project metadata: module, packages, deps, file hashes.
	GetProjectInfo(context.Context, *connect.Request[v1.GetProjectInfoRequest]) (*connect.Response[v1.GetProjectInfoResponse], error)
}

GatewayHandler is an implementation of the mind.gateway.v1.Gateway service.

type UnimplementedGatewayHandler

type UnimplementedGatewayHandler struct{}

UnimplementedGatewayHandler returns CodeUnimplemented from all methods.

func (UnimplementedGatewayHandler) Fix

Jump to

Keyboard shortcuts

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