Documentation ¶
Overview ¶
Better for compatibility but a bit slower
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PackageListing ¶
type PackageListing struct { Name string `json:"name"` FullName string `json:"full_name"` Owner string `json:"owner"` PackageURL string `json:"package_url"` DonationLink string `json:"donation_link"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` UUID4 string `json:"uuid4"` RatingScore uint32 `json:"rating_score"` IsPinned bool `json:"is_pinned"` IsDeprecated bool `json:"is_deprecated"` HasNSFWContent bool `json:"has_nsfw_content"` Categories []string `json:"categories"` Versions []Version `json:"versions"` // this may have something to do with the error }
PackageListing represents the structure of each package listing
func GetMods ¶
func GetMods() ([]PackageListing, error)
func (PackageListing) IsModpack ¶
func (p PackageListing) IsModpack() bool
func (PackageListing) Latest ¶
func (p PackageListing) Latest() Version
func (*PackageListing) UnmarshalJSON ¶
func (p *PackageListing) UnmarshalJSON(data []byte) error
type Version ¶
type Version struct { DateCreated string `json:"date_created"` Dependencies []string `json:"dependencies"` Description string `json:"description"` DownloadURL string `json:"download_url"` Downloads int `json:"downloads"` FileSize int `json:"file_size"` FullName string `json:"full_name"` Icon string `json:"icon"` IsActive bool `json:"is_active"` Name string `json:"name"` UUID4 string `json:"uuid4"` VersionNumber string `json:"version_number"` WebsiteURL string `json:"website_url"` }
Version represents the structure of a version listing
Click to show internal directories.
Click to hide internal directories.