Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaVersion = 1
Schema version of the light index payload
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexLight ¶
type IndexLight struct {
Schema int `json:"schema"`
GeneratedAt time.Time `json:"generated_at"`
Count int `json:"count"`
Items []ItemLight `json:"items"`
}
Full index payload (before gzip)
type ItemLight ¶
type ItemLight struct {
Name string `json:"name"`
FullName string `json:"full_name,omitempty"`
Tap string `json:"tap,omitempty"`
Version string `json:"version,omitempty"`
Desc string `json:"desc,omitempty"`
Homepage string `json:"homepage,omitempty"`
License string `json:"license,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
DeprecationDate string `json:"deprecation_date,omitempty"` // YYYY-MM-DD
DeprecationReason string `json:"deprecation_reason,omitempty"`
Replacement string `json:"replacement,omitempty"` // formula or cask name
Disabled bool `json:"disabled,omitempty"`
DisableDate string `json:"disable_date,omitempty"` // YYYY-MM-DD
DisableReason string `json:"disable_reason,omitempty"`
KegOnly bool `json:"keg_only,omitempty"`
HasBottle bool `json:"has_bottle,omitempty"`
Aliases []string `json:"aliases,omitempty"`
OldNames []string `json:"oldnames,omitempty"`
DepCount int `json:"dep_count,omitempty"`
Outdated bool `json:"outdated,omitempty"`
Pinned bool `json:"pinned,omitempty"`
}
Light item we expose in the index.
type Result ¶
type Result struct {
Gzip []byte
Generated time.Time
Count int
SHA256Hex string // sha256 of the gzipped payload (lower hex)
SizeBytes int64 // len(Gzip)
}
Result of the build: gzipped JSON + meta
func BuildLightIndex ¶
BuildLightIndex builds the light index from Homebrew's formula JSON, which may be gzip-compressed. It returns a gzipped JSON payload and associated metadata.
Click to show internal directories.
Click to hide internal directories.