Documentation
¶
Index ¶
- func Canonical(source string) (string, error)
- func ComponentReferences(source string) ([]string, error)
- func ComponentReferencesFromNodes(nodes []viewmodel.Node) []string
- func ParamReferences(source string) ([]string, error)
- func ParamReferencesFromNodes(nodes []viewmodel.Node) []string
- type CommandReference
- type ComponentCallUsage
- type ComponentIslandUsage
- type ComponentReference
- type ContractReference
- type ContractReferenceKind
- type Dependencies
- type QueryReference
- type SubscriptionReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentReferences ¶
ComponentReferences returns unique component names directly referenced by a view markup fragment.
func ComponentReferencesFromNodes ¶
ComponentReferencesFromNodes returns unique component names directly referenced by an already-parsed view fragment.
func ParamReferences ¶
ParamReferences returns unique param("name") route-param references directly visible in the current view markup subset.
func ParamReferencesFromNodes ¶
ParamReferencesFromNodes returns unique param("name") route-param references directly referenced by an already-parsed view fragment.
Types ¶
type CommandReference ¶
CommandReference records one form-local backend command intent.
func CommandReferences ¶
func CommandReferences(source string) ([]CommandReference, error)
CommandReferences returns package-qualified command references declared by g:command on direct form elements in a view fragment.
func CommandReferencesFromNodes ¶
func CommandReferencesFromNodes(nodes []viewmodel.Node) ([]CommandReference, error)
CommandReferencesFromNodes returns package-qualified command references declared by g:command on direct form elements in an already-parsed view fragment.
type ComponentCallUsage ¶
ComponentCallUsage records one component call and its optional island mode.
func ComponentCallUsages ¶
func ComponentCallUsages(source string) ([]ComponentCallUsage, error)
ComponentCallUsages returns component calls with optional g:island metadata.
func ComponentCallUsagesFromNodes ¶
func ComponentCallUsagesFromNodes(nodes []viewmodel.Node) ([]ComponentCallUsage, error)
ComponentCallUsagesFromNodes returns component calls with optional g:island metadata from an already-parsed view fragment.
type ComponentIslandUsage ¶
ComponentIslandUsage records one component call that explicitly selects an island runtime.
func ComponentIslandUsages ¶
func ComponentIslandUsages(source string) ([]ComponentIslandUsage, error)
ComponentIslandUsages returns component calls that explicitly set g:island.
func ComponentIslandUsagesFromNodes ¶
func ComponentIslandUsagesFromNodes(nodes []viewmodel.Node) ([]ComponentIslandUsage, error)
ComponentIslandUsagesFromNodes returns component calls that explicitly set g:island in an already-parsed view fragment.
type ComponentReference ¶
ComponentReference records one component call with source offsets.
func ComponentReferenceSpans ¶
func ComponentReferenceSpans(source string) ([]ComponentReference, error)
ComponentReferenceSpans returns component calls directly referenced by a view markup fragment, preserving source offsets for diagnostics.
func ComponentReferenceSpansFromNodes ¶
func ComponentReferenceSpansFromNodes(nodes []viewmodel.Node) []ComponentReference
ComponentReferenceSpansFromNodes returns component calls from an already- parsed view fragment, preserving source offsets for diagnostics.
type ContractReference ¶
type ContractReference struct {
Kind ContractReferenceKind
Name string
Method string
Path string
Start int
End int
}
ContractReference records one template-local backend contract intent.
func ContractReferences ¶
func ContractReferences(source string) ([]ContractReference, error)
ContractReferences returns package-qualified command and query references declared by GOWDK view directives.
func ContractReferencesFromNodes ¶
func ContractReferencesFromNodes(nodes []viewmodel.Node) ([]ContractReference, error)
ContractReferencesFromNodes returns package-qualified command and query references declared by GOWDK view directives in an already-parsed view fragment.
type ContractReferenceKind ¶
type ContractReferenceKind string
const ( ContractReferenceCommand ContractReferenceKind = "command" ContractReferenceQuery ContractReferenceKind = "query" )
type Dependencies ¶
Dependencies records source dependencies visible in the first view subset.
func ViewDependencies ¶
func ViewDependencies(source string) (Dependencies, error)
ViewDependencies returns direct literal asset and style references from a view markup fragment. Interpolated and external URLs are not reported.
func ViewDependenciesFromNodes ¶
func ViewDependenciesFromNodes(nodes []viewmodel.Node) Dependencies
ViewDependenciesFromNodes returns direct literal asset and style references from an already-parsed view fragment.
type QueryReference ¶
QueryReference records one template-local backend query intent.
func QueryReferences ¶
func QueryReferences(source string) ([]QueryReference, error)
QueryReferences returns package-qualified query references declared by g:query on direct HTML elements in a view fragment.
func QueryReferencesFromNodes ¶
func QueryReferencesFromNodes(nodes []viewmodel.Node) ([]QueryReference, error)
QueryReferencesFromNodes returns package-qualified query references declared by g:query on direct HTML elements in an already-parsed view fragment.
type SubscriptionReference ¶
type SubscriptionReference struct {
Query string
QueryStart int
QueryEnd int
Event string
EventStart int
EventEnd int
}
SubscriptionReference records one query-bounded presentation-event subscription intent.
func SubscriptionReferences ¶
func SubscriptionReferences(source string) ([]SubscriptionReference, error)
SubscriptionReferences returns package-qualified presentation-event references declared by g:subscribe on query-owned elements.
func SubscriptionReferencesFromNodes ¶
func SubscriptionReferencesFromNodes(nodes []viewmodel.Node) ([]SubscriptionReference, error)
SubscriptionReferencesFromNodes returns package-qualified presentation-event references declared by g:subscribe on query-owned elements in an already-parsed view fragment.