Documentation
¶
Overview ¶
Package cloudquery is the orchestration layer for SafeDep Cloud's SQL query service. It owns the gRPC client wiring, the proto-to-Go boundary translation, and the value types that command code consumes.
Command packages depend on the small interfaces declared here, not on the gRPC types or proto messages. Tests substitute fakes for the interfaces; production wiring uses Service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecInput ¶
ExecInput is the user-facing payload for a SQL execution. Validation is the caller's responsibility: orchestration trusts what it receives. PageToken empty means "first page"; non-empty resumes a prior response.
type ExecResult ¶
ExecResult is the materialised query response in a presentation-friendly shape. Columns is the ordered union of field names across all rows.
type ExecRunner ¶
type ExecRunner interface {
Exec(ctx context.Context, in ExecInput) (*ExecResult, error)
}
ExecRunner is the contract a query executor satisfies.
type Row ¶
Row is one decoded row. Values are typed natives (string, float64, bool, nil). Unknown structpb kinds are rendered as their string form so callers do not have to handle proto types directly.
type Schema ¶
type Schema struct {
Tables []SchemaTable
}
Schema is the full SQL schema served by the control plane.
type SchemaColumn ¶
type SchemaColumn struct {
Name string
Description string
Selectable bool
Filterable bool
Required bool
ReferenceURL string
}
SchemaColumn describes one column inside a table.
type SchemaFetcher ¶
SchemaFetcher is the contract a schema reader satisfies.
type SchemaTable ¶
type SchemaTable struct {
Name string
Columns []SchemaColumn
}
SchemaTable describes one queryable table.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the production implementation backed by a control-plane gRPC connection. Command code accepts the small interfaces in this file (ExecRunner, SchemaFetcher) so unit tests can pass stubs.
func NewService ¶
func NewService(conn *grpc.ClientConn) *Service
NewService wraps a control-plane gRPC connection in a Service.