Documentation
¶
Index ¶
Constants ¶
View Source
const (
SchemaVersion = 2
)
Variables ¶
This section is empty.
Functions ¶
func VerifyDistFiles ¶
func VerifyDistFiles(distRoot string, result BuildResult) error
func WriteDistFiles ¶
func WriteDistFiles(distRoot string, result BuildResult) error
Types ¶
type BuildResult ¶
type BuildResult struct {
Bundle Bundle
BundleJSON []byte
Manifest BundleManifest
ManifestJSON []byte
SHA256File []byte
}
func BuildFromSource ¶
func BuildFromSource(sourceRoot string) (BuildResult, error)
type Bundle ¶
type Bundle struct {
SchemaVersion int `json:"schema_version"`
BuiltAt string `json:"built_at"`
KnowledgeID string `json:"knowledge_id"`
KnowledgeName string `json:"knowledge_name"`
AllowedRepos []string `json:"allowed_repos"`
SourceRefs map[string]string `json:"source_refs,omitempty"`
SourceSHA256 string `json:"source_sha256"`
Cards []Card `json:"cards"`
Indices Indices `json:"indices"`
}
func LoadEmbeddedBundle ¶
type BundleManifest ¶
type BundleManifest struct {
SchemaVersion int `json:"schema_version"`
BuiltAt string `json:"built_at"`
KnowledgeID string `json:"knowledge_id"`
AllowedRepos []string `json:"allowed_repos"`
CardCount int `json:"card_count"`
BundleSHA256 string `json:"bundle_sha256"`
CardsSHA256 string `json:"cards_sha256"`
TopicIndexSHA256 string `json:"topic_index_sha256"`
CodeIndexSHA256 string `json:"code_index_sha256"`
SourceSHA256 string `json:"source_sha256"`
}
type Card ¶
type Card struct {
ID string `json:"id"`
Version int `json:"version"`
Title string `json:"title"`
Status string `json:"status"`
Owners []string `json:"owners,omitempty"`
Tags []string `json:"tags,omitempty"`
Summary string `json:"summary"`
Mechanism string `json:"mechanism"`
Boundaries string `json:"boundaries"`
InvalidConditions string `json:"invalid_conditions"`
Evidence []EvidenceRef `json:"evidence"`
SourceCardID string `json:"source_card_id,omitempty"`
}
func LoadSourceCards ¶
type EvidenceRef ¶
type Indices ¶
type SearchMatch ¶
type SearchRequest ¶
type SearchResult ¶
type SearchResult struct {
Query string `json:"query"`
TotalCards int `json:"total_cards"`
Matches []SearchMatch `json:"matches"`
}
func Search ¶
func Search(req SearchRequest) (SearchResult, error)
type SourceManifest ¶
type SourceManifest struct {
SchemaVersion int `json:"schema_version" yaml:"schema_version"`
KnowledgeID string `json:"knowledge_id" yaml:"knowledge_id"`
KnowledgeName string `json:"knowledge_name" yaml:"knowledge_name"`
UpdatedAt string `json:"updated_at" yaml:"updated_at"`
AllowedRepos []string `json:"allowed_repos" yaml:"allowed_repos"`
SourceRefs map[string]string `json:"source_refs,omitempty" yaml:"source_refs"`
}
func LoadSourceManifest ¶
func LoadSourceManifest(sourceRoot string) (SourceManifest, []byte, error)
Click to show internal directories.
Click to hide internal directories.