Documentation
¶
Overview ¶
Package load defines materialization responsibilities for runtime artifacts.
Index ¶
- Variables
- func RefineSummarySchemas(resource *view.Resource)
- type Component
- func (c *Component) InputParameters() state.Parameters
- func (c *Component) InputReflectType(pkgPath string, lookupType xreflect.LookupType, opts ...state.ReflectOption) (reflect.Type, error)
- func (c *Component) OutputParameters() state.Parameters
- func (c *Component) OutputReflectType(pkgPath string, lookupType xreflect.LookupType, opts ...state.ReflectOption) (reflect.Type, error)
- func (c *Component) ShapeSpecKind() string
- type Loader
- func (l *Loader) LoadComponent(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ComponentArtifact, error)
- func (l *Loader) LoadResource(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ResourceArtifacts, error)
- func (l *Loader) LoadViews(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ViewArtifacts, error)
- type TypeRole
- type TypeSpec
Constants ¶
This section is empty.
Variables ¶
var (
ErrEmptyViewPlan = errors.New("shape load: no views available in plan")
)
Functions ¶
func RefineSummarySchemas ¶ added in v0.38.0
RefineSummarySchemas reapplies summary schema refinement using current view schema/column metadata. This is useful after late column discovery updated view columns post-load.
Types ¶
type Component ¶
type Component struct {
Name string
URI string
Method string
ComponentRoutes []*plan.ComponentRoute
RootView string
Views []string
Relations []*plan.Relation
ViewRelations []*view.Relation
Declarations map[string]*plan.ViewDeclaration
QuerySelectors map[string][]string
Predicates map[string][]*plan.ViewPredicate
TypeContext *typectx.Context
Directives *dqlshape.Directives
Report *dqlshape.ReportDirective
ColumnsDiscovery bool
TypeSpecs map[string]*TypeSpec
Input []*plan.State
Output []*plan.State
Meta []*plan.State
Async []*plan.State
Other []*plan.State
}
Component is a shape-loaded runtime-neutral component artifact. It intentionally avoids repository package coupling to keep shape/load reusable.
func ComponentFrom ¶ added in v0.38.0
func ComponentFrom(a *shape.ComponentArtifact) (*Component, bool)
ComponentFrom extracts the typed component from a ComponentArtifact. Returns (nil, false) when a is nil or contains an unexpected concrete type.
func (*Component) InputParameters ¶ added in v0.38.0
func (c *Component) InputParameters() state.Parameters
InputParameters returns input states as state.Parameters for type generation.
func (*Component) InputReflectType ¶ added in v0.38.0
func (c *Component) InputReflectType(pkgPath string, lookupType xreflect.LookupType, opts ...state.ReflectOption) (reflect.Type, error)
InputReflectType builds the Input struct reflect.Type using state.Parameters.ReflectType. This produces the same struct shape as the legacy codegen (with parameter tags, Has markers, etc.).
func (*Component) OutputParameters ¶ added in v0.38.0
func (c *Component) OutputParameters() state.Parameters
OutputParameters returns output states as state.Parameters for type generation.
func (*Component) OutputReflectType ¶ added in v0.38.0
func (c *Component) OutputReflectType(pkgPath string, lookupType xreflect.LookupType, opts ...state.ReflectOption) (reflect.Type, error)
OutputReflectType builds the Output struct reflect.Type using state.Parameters.ReflectType.
func (*Component) ShapeSpecKind ¶ added in v0.38.0
ShapeSpecKind implements shape.ComponentSpec.
type Loader ¶
type Loader struct{}
Loader materializes runtime view artifacts from normalized shape plan.
func (*Loader) LoadComponent ¶
func (l *Loader) LoadComponent(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ComponentArtifact, error)
LoadComponent implements shape.Loader.
func (*Loader) LoadResource ¶ added in v0.38.0
func (l *Loader) LoadResource(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ResourceArtifacts, error)
LoadResource implements shape.Loader.
func (*Loader) LoadViews ¶
func (l *Loader) LoadViews(ctx context.Context, planned *shape.PlanResult, opts ...shape.LoadOption) (*shape.ViewArtifacts, error)
LoadViews implements shape.Loader.