Documentation
¶
Index ¶
- Constants
- type ArchData
- type CategoryData
- type DistData
- type Index
- func (i *Index) Add(dist, arch, category string, info *VersionInfo)
- func (i *Index) Encode() ([]byte, error)
- func (i *Index) Find(dist, arch, name string) (*VersionInfo, string)
- func (i *Index) GetCategoryData(dist, arch, category string, eol bool) CategoryData
- func (i *Index) HasData(dist, arch string) bool
- func (i *Index) Sort()
- func (i *Index) UpdateMetadata()
- type Metadata
- type VersionInfo
Constants ¶
View Source
const ( CATEGORY_RUBY = "ruby" CATEGORY_JRUBY = "jruby" CATEGORY_TRUFFLE = "truffle" CATEGORY_OTHER = "other" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchData ¶
type ArchData map[string]CategoryData
type CategoryData ¶
type CategoryData []*VersionInfo
func (CategoryData) Total ¶
func (d CategoryData) Total() int
Total returns total number of rubies available for installation
type Index ¶
func (*Index) Add ¶
func (i *Index) Add(dist, arch, category string, info *VersionInfo)
Add adds info about ruby to index
func (*Index) Find ¶
func (i *Index) Find(dist, arch, name string) (*VersionInfo, string)
Find tries to find info about version by name
func (*Index) GetCategoryData ¶
func (i *Index) GetCategoryData(dist, arch, category string, eol bool) CategoryData
GetCategoryData returns data for given dist, arch and category
func (*Index) UpdateMetadata ¶
func (i *Index) UpdateMetadata()
UpdateMetadata updates index metadata
type VersionInfo ¶
type VersionInfo struct { Variations []*VersionInfo `json:"variations,omitempty"` // Info about version variations (railsexpress version for example) Name string `json:"name"` // Version name File string `json:"file"` // Full filename (with extension) Path string `json:"path"` // Relative path to 7z file Hash string `json:"hash"` // SHA-256 hash Size int64 `json:"size"` // Size in bytes Added int64 `json:"added"` // Timestamp with date when version was added to repo EOL bool `json:"eol"` // EOL marker }
Click to show internal directories.
Click to hide internal directories.