Documentation
¶
Index ¶
- Constants
- func ApplyAPISurfaceManifest(report *Report, manifest APISurfaceManifest) error
- func ApplyContractManifest(report *Report, manifest ContractManifest) error
- func ContentIsUnmodified(onDisk []byte) bool
- func ExcludeFlowPipelines(report *Report, names []string)
- func GenerateTypeScriptAPICompatibilityFacade(indexImportPath, endpointsImportPath string) []byte
- func ReadNFlowSource(path string) (string, error)
- func RenderEnhancedReport(report *Report, actionFilter string) string
- func RenderSummaryTable(report *Report, actionFilter string) string
- func StampContent(content []byte, path string) []byte
- type APISurfaceManifest
- type ActionContract
- type Analyzer
- type ContractManifest
- type ContractManifestAction
- type DSLConfig
- type Diagnostic
- type DiagnosticSeverity
- type EnumDefinition
- type EnumValue
- type FieldContract
- type FlowHTTPRoute
- type GeneratedFile
- type PackageInfo
- type Report
- type ReportStats
- type StoreCluster
- type StructDefinition
- type StructKey
- type TransportBinding
- type TypeRef
Constants ¶
const ( SeverityError = core.SeverityError SeverityWarning = core.SeverityWarning )
Variables ¶
This section is empty.
Functions ¶
func ApplyAPISurfaceManifest ¶ added in v0.9.0
func ApplyAPISurfaceManifest(report *Report, manifest APISurfaceManifest) error
ApplyAPISurfaceManifest replaces the scanned route set with an explicit public surface. This supports routes created dynamically at runtime and prevents server-only routes or duplicate scanner declarations from leaking into the SDK.
func ApplyContractManifest ¶ added in v0.9.0
func ApplyContractManifest(report *Report, manifest ContractManifest) error
ApplyContractManifest merges explicit wire types into analyzed actions. It only fills missing types (or confirms an identical inferred type), never changes action scope or route metadata, and refuses to override NFlow boundary schemas. The operation is atomic: report.Actions is unchanged on error. Action names may appear more than once in the report when one action has multiple route bindings; a manifest entry applies to each binding.
func ContentIsUnmodified ¶
func ExcludeFlowPipelines ¶ added in v0.2.0
ExcludeFlowPipelines removes named NFlow pipelines and their route-derived action contracts from an analysis report. This is useful when runtime flags conditionally mount a development pipeline that is not part of the default production API surface.
func GenerateTypeScriptAPICompatibilityFacade ¶ added in v0.9.0
func ReadNFlowSource ¶
ReadNFlowSource is an exported helper used by the SDK generation command's integration tests to exercise the exact Flow preprocessing path.
func RenderEnhancedReport ¶
func RenderSummaryTable ¶
func StampContent ¶
Types ¶
type APISurfaceManifest ¶ added in v0.9.0
type APISurfaceManifest struct {
Actions []ActionContract `json:"actions"`
Types []core.APISurfaceType `json:"types,omitempty"`
Client *core.APIClientConfig `json:"client,omitempty"`
}
APISurfaceManifest is the complete public HTTP API emitted by `nexssp sdk api`. Its actions use the same wire-contract and metadata fields as analyzer reports.
type ActionContract ¶
type ActionContract = core.ActionContract
type Analyzer ¶
func (*Analyzer) ScanFlowFiles ¶
type ContractManifest ¶ added in v0.9.0
type ContractManifest struct {
Actions []ContractManifestAction `json:"actions"`
}
ContractManifest describes explicit wire-contract types for actions that the source analyzer cannot fully infer. A nil type means "not specified"; use the literal "struct{}" to explicitly declare an empty request or response.
type ContractManifestAction ¶ added in v0.9.0
type ContractManifestAction struct {
Name string `json:"name"`
ReqType *string `json:"req_type,omitempty"`
ResType *string `json:"res_type,omitempty"`
ReqTypeRef *TypeRef `json:"req_type_ref,omitempty"`
ResTypeRef *TypeRef `json:"res_type_ref,omitempty"`
}
ContractManifestAction supplies optional request and response types for one action name. Type references are optional disambiguators for Go DTOs.
type Diagnostic ¶
type Diagnostic = core.Diagnostic
func ValidatePublicAPI ¶ added in v0.2.0
func ValidatePublicAPI(report *Report) []Diagnostic
type DiagnosticSeverity ¶
type DiagnosticSeverity = core.DiagnosticSeverity
type EnumDefinition ¶
type EnumDefinition = core.EnumDefinition
type FieldContract ¶
type FieldContract = core.FieldContract
type FlowHTTPRoute ¶
type FlowHTTPRoute = core.FlowHTTPRoute
type GeneratedFile ¶
type GeneratedFile = core.GeneratedFile
func GenerateTypeScriptAPI ¶ added in v0.5.0
func GenerateTypeScriptAPI(report *Report) []GeneratedFile
func GenerateTypeScriptAPISDK ¶ added in v0.2.0
func GenerateTypeScriptAPISDK(report *Report) []GeneratedFile
func GenerateTypeScriptSDK ¶
func GenerateTypeScriptSDK(report *Report) []GeneratedFile
type PackageInfo ¶
type PackageInfo = core.PackageInfo
type Report ¶
func AnalyzeAll ¶
AnalyzeAll analyzes Go contracts and merges Flow DSL and NFlow inputs.
type ReportStats ¶
type ReportStats = core.ReportStats
type StoreCluster ¶
type StoreCluster = core.StoreCluster
type StructDefinition ¶
type StructDefinition = core.StructDefinition
type TransportBinding ¶
type TransportBinding = core.TransportBinding
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package core analyzes Go AST contracts and generates SDK artifacts without parsing Flow source or embedded DSL manifests.
|
Package core analyzes Go AST contracts and generates SDK artifacts without parsing Flow source or embedded DSL manifests. |
|
Package dsl contains OPS's compatibility parser for older action-oriented route manifests.
|
Package dsl contains OPS's compatibility parser for older action-oriented route manifests. |