Documentation
¶
Overview ¶
Package credits holds the contributor list and the third-party software notices embedded in Core. The data files are generated by scripts/credits; regenerate them with "task credits" instead of editing them by hand.
Index ¶
Constants ¶
const ( ComponentsFile = "components.json.gz" ContributorsFile = "contributors.json" )
ComponentsFile and ContributorsFile are the generated data files, relative to this package's directory.
Variables ¶
This section is empty.
Functions ¶
func EncodeBundle ¶
EncodeBundle serializes a bundle as indented JSON compressed with gzip. The output depends only on the bundle, so regenerating unchanged data gives the same bytes.
func SortComponents ¶
func SortComponents(components []Component)
SortComponents orders components by name, ignoring case.
Types ¶
type Bundle ¶
type Bundle struct {
Texts map[string]string `json:"texts"`
Components []Component `json:"components"`
}
Bundle is every third-party component with the license texts they use.
func Components ¶
Components returns the embedded third-party software bundle.
func DecodeBundle ¶
DecodeBundle reads a bundle written by EncodeBundle.
func (*Bundle) ComponentText ¶
ComponentText renders one component's details and full license texts as plain text. format, when not nil, rewrites each license text for display.
type Component ¶
type Component struct {
Name string `json:"name"`
Version string `json:"version,omitempty"`
URL string `json:"url,omitempty"`
License string `json:"license"`
Note string `json:"note,omitempty"`
Files []LicenseFile `json:"files"`
}
Component is one piece of third-party software included in Core.
type Contributor ¶
Contributor is a person credited for contributing to Zaparoo Core.
func Contributors ¶
func Contributors() ([]Contributor, error)
Contributors returns the embedded contributor list.
type LicenseFile ¶
LicenseFile is one license, notice or copying file shipped with a component. Text is the key of its content in Bundle.Texts, so identical files are stored once.