Documentation
¶
Index ¶
- Constants
- func DiscoverRepoRoot(start string) (string, error)
- func Generate(repoRoot string, release ReleaseIdentity, generatorVersion string) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
- func GenerateWithPassedTests(repoRoot string, release ReleaseIdentity, generatorVersion string) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
- func GenerateWithReceipt(repoRoot string, release ReleaseIdentity, generatorVersion string, ...) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
- func MarshalCanonical(document any) ([]byte, error)
- func RenderInternalMarkdown(entries []InternalUseCase) string
- func WriteJSON(path string, value any) error
- type ApplicationDelivery
- type AuthoringAlternative
- type AuthoringModule
- type AuthoringWorkload
- type CompatibilityManifest
- type Component
- type DeliveryCapabilities
- type EvidenceManifest
- type Gate
- type InternalUseCase
- type MainUseCase
- type OSCompatibility
- type ReleaseIdentity
- type RuntimeEvidenceReceipt
- type Setting
- type SettingOption
- type TestReceipt
- type UseCase
- type UseCaseComputeTierFit
- type UseCaseLoad
- type UseCaseManifest
Constants ¶
const ( UseCaseSchema = "stackkits-use-case-catalog/v1" EvidenceSchema = "stackkits-use-case-evidence/v1" CompatibilitySchema = "stackkits-compatibility/v1" )
Variables ¶
This section is empty.
Functions ¶
func DiscoverRepoRoot ¶
func Generate ¶
func Generate(repoRoot string, release ReleaseIdentity, generatorVersion string) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
func GenerateWithPassedTests ¶
func GenerateWithPassedTests(repoRoot string, release ReleaseIdentity, generatorVersion string) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
func GenerateWithReceipt ¶
func GenerateWithReceipt(repoRoot string, release ReleaseIdentity, generatorVersion string, receipt *TestReceipt) (UseCaseManifest, CompatibilityManifest, []InternalUseCase, error)
func MarshalCanonical ¶ added in v0.42.0
MarshalCanonical encodes a decoded document the way JavaScript consumers recompute contentDigest (JSON.stringify with sorted keys): encoding/json sorts map keys, but its default HTML escaping of &, < and > would make any title such as "Documents & Files" fail their digest check.
func RenderInternalMarkdown ¶
func RenderInternalMarkdown(entries []InternalUseCase) string
Types ¶
type ApplicationDelivery ¶
type ApplicationDelivery struct {
// Native authoring binds the catalog's default implementation to the
// module whose explicit profiles must accompany a selected workload.
DefaultAlternativeRef string `json:"defaultAlternativeRef,omitempty"`
DefaultModuleRef string `json:"defaultModuleRef,omitempty"`
UseCaseRef string `json:"useCaseRef"`
WorkloadRef string `json:"workloadRef"`
AdapterRef string `json:"adapterRef"`
AdapterName string `json:"adapterName"`
Status string `json:"status"`
Capabilities DeliveryCapabilities `json:"capabilities"`
}
type AuthoringAlternative ¶
type AuthoringAlternative struct {
ID string `json:"id"`
Name string `json:"name"`
Modules []AuthoringModule `json:"modules"`
}
type AuthoringModule ¶
type AuthoringWorkload ¶
type AuthoringWorkload struct {
ID string `json:"id"`
DefaultAlternative string `json:"defaultAlternative"`
Alternatives []AuthoringAlternative `json:"alternatives"`
}
type CompatibilityManifest ¶
type CompatibilityManifest struct {
SchemaVersion string `json:"schemaVersion"`
Release ReleaseIdentity `json:"release"`
GeneratedAt string `json:"generatedAt"`
GeneratorVersion string `json:"generatorVersion"`
Compatibility struct {
OS []OSCompatibility `json:"os"`
ApplicationDelivery []ApplicationDelivery `json:"applicationDelivery"`
} `json:"compatibility"`
ContentDigest string `json:"contentDigest"`
}
type DeliveryCapabilities ¶
type EvidenceManifest ¶
type EvidenceManifest struct {
SchemaVersion string `json:"schemaVersion"`
SourceSHA string `json:"sourceSha"`
GeneratedAt string `json:"generatedAt"`
GeneratorVersion string `json:"generatorVersion"`
UseCases []InternalUseCase `json:"useCases"`
ContentDigest string `json:"contentDigest"`
}
func NewEvidenceManifest ¶
func NewEvidenceManifest(sourceSHA, generatedAt, generatorVersion string, entries []InternalUseCase) (EvidenceManifest, error)
type InternalUseCase ¶
type MainUseCase ¶ added in v0.42.0
MainUseCase is the owner-accepted main use case a catalog entry is grouped under; CUE constrains the id and derives the title.
type OSCompatibility ¶
type ReleaseIdentity ¶
type RuntimeEvidenceReceipt ¶
type Setting ¶
type Setting struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Group string `json:"group"`
Depth string `json:"depth"`
Help string `json:"help,omitempty"`
Options []SettingOption `json:"options,omitempty"`
Default any `json:"default"`
Placeholder string `json:"placeholder,omitempty"`
Realization string `json:"realization"`
}
Setting is a decision an operator makes about a use case before install; the projection of foundation.#UseCaseSetting. `Default` is a string for choice and text settings and a bool for toggles, exactly as declared.
type SettingOption ¶
type SettingOption struct {
ID string `json:"id"`
Name string `json:"name"`
Note string `json:"note,omitempty"`
}
SettingOption is one choice of a choice-kind setting.
type TestReceipt ¶
type TestReceipt struct {
SchemaVersion string `json:"schemaVersion"`
SourceSHA string `json:"sourceSha"`
Status string `json:"status"`
UseCaseRefs []string `json:"useCaseRefs"`
}
func NewTestReceipt ¶
func NewTestReceipt(sourceSHA string, useCases []UseCase) (TestReceipt, error)
type UseCase ¶
type UseCase struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Components []Component `json:"components"`
MainUseCase MainUseCase `json:"mainUseCase"`
ComputeTiers map[string]UseCaseComputeTierFit `json:"computeTiers,omitempty"`
Settings []Setting `json:"settings,omitempty"`
Docs string `json:"docs,omitempty"`
DefaultAlternative string `json:"defaultAlternative,omitempty"`
Alternatives []AuthoringAlternative `json:"alternatives,omitempty"`
}
func LoadUseCaseComputeTiers ¶
LoadUseCaseComputeTiers returns package compute-tier fits for Unifier/MCP.
type UseCaseComputeTierFit ¶
type UseCaseComputeTierFit struct {
Included bool `json:"included"`
Functions []string `json:"functions,omitempty"`
Load *UseCaseLoad `json:"load,omitempty"`
ModuleSlug string `json:"moduleSlug,omitempty"`
Reason string `json:"reason,omitempty"`
Notes []string `json:"notes,omitempty"`
}
UseCaseComputeTierFit is the Unifier-readable surface of one package on one install.computeTier graph. Apply does not read it.
type UseCaseLoad ¶
type UseCaseManifest ¶
type UseCaseManifest struct {
SchemaVersion string `json:"schemaVersion"`
Release ReleaseIdentity `json:"release"`
GeneratedAt string `json:"generatedAt"`
GeneratorVersion string `json:"generatorVersion"`
Catalog struct {
UseCases []UseCase `json:"useCases"`
KitCores []AuthoringWorkload `json:"kitCores,omitempty"`
} `json:"catalog"`
ContentDigest string `json:"contentDigest"`
}