thunderstore

package
v0.0.0-...-32ee16b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchPackage = fmt.Errorf("no such thunderstore package")
View Source
var ErrNoVersionsDetected = fmt.Errorf("no versions detected")
View Source
var ErrPackageNameCollision = fmt.Errorf("multiple packages found with the same name")

Functions

This section is empty.

Types

type Package

type Package struct {
	Name           string    `json:"name"`
	FullName       string    `json:"full_name"`
	Owner          string    `json:"owner"`
	PackageURL     string    `json:"package_url"`
	DateCreated    time.Time `json:"date_created"`
	DateUpdated    time.Time `json:"date_updated"`
	UUID4          string    `json:"uuid4"`
	RatingScore    int       `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"`
}

func GetPackageByName

func GetPackageByName(ctx context.Context, name string) (Package, error)

func GetPackages

func GetPackages(ctx context.Context) ([]Package, error)

type Version

type Version struct {
	Name          string        `json:"name"`
	FullName      string        `json:"full_name"`
	Description   string        `json:"description"`
	Icon          string        `json:"icon"`
	VersionNumber string        `json:"version_number"`
	Dependencies  []interface{} `json:"dependencies"`
	DownloadURL   string        `json:"download_url"`
	Downloads     int           `json:"downloads"`
	DateCreated   time.Time     `json:"date_created"`
	WebsiteURL    string        `json:"website_url"`
	IsActive      bool          `json:"is_active"`
	UUID4         string        `json:"uuid4"`
	FileSize      int           `json:"file_size"`
}

func GetLatestPackageVersion

func GetLatestPackageVersion(pkg Package) (Version, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL