Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTableMissing = pkgschema.ErrTableMissing
ErrTableMissing is returned when a table does not exist.
var Module = fx.Module( "vef:schema", fx.Provide( NewService, fx.Annotate( NewResource, fx.ResultTags(`group:"vef:api:resources"`), ), ), )
Module is the FX module for schema inspection functionality.
Functions ¶
func NewResource ¶
NewResource creates a new schema inspection resource.
func NewService ¶
NewService creates a new schema service backed by the primary data source. Multi-data-source schema reflection is intentionally out of scope for v1; callers that need to introspect a non-primary source should inject datasource.Registry, fetch the connection, and drive atlas inspection themselves.
Types ¶
type AtlasInspector ¶
type AtlasInspector struct {
// contains filtered or unexported fields
}
AtlasInspector performs read-only schema inspection backed by Atlas.
func NewInspector ¶
NewInspector creates a new Atlas Inspector for the given database connection.
func (*AtlasInspector) InspectSchema ¶
InspectSchema inspects the current database schema.
func (*AtlasInspector) InspectTable ¶
InspectTable inspects a specific table, returning ErrTableMissing if it does not exist.
func (*AtlasInspector) InspectViews ¶
InspectViews inspects all views in the current database schema.
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
DefaultService is the default implementation of schema.Service.
func (*DefaultService) GetTableSchema ¶
func (s *DefaultService) GetTableSchema(ctx context.Context, name string) (*schema.TableSchema, error)
GetTableSchema returns detailed structure information about a specific table.
func (*DefaultService) ListTables ¶
ListTables returns all tables in the current database/schema.
type GetTableSchemaParams ¶
GetTableSchemaParams contains parameters for getting table schema details.
type Resource ¶
Resource handles schema inspection API endpoints.
func (*Resource) GetTableSchema ¶
func (r *Resource) GetTableSchema(ctx fiber.Ctx, params GetTableSchemaParams) error
GetTableSchema returns detailed structure information about a specific table.
func (*Resource) ListTables ¶
ListTables returns all tables in the current database/schema.