Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowseResponse ¶
type BrowseResponse struct {
Files []FileInfo `json:"files"`
}
BrowseResponse represents the response structure from /v1/browse/{name}/{version}.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds configuration for Skypack requests.
func (*Client) FetchPackageFiles ¶
func (c *Client) FetchPackageFiles(ctx context.Context, name, version string) (library.Files, string, error)
FetchPackageFiles retrieves package metadata and file list from Skypack. It first calls the package endpoint to determine the package version (if not explicitly provided) and then calls the browse endpoint to retrieve the list of files.
type FileInfo ¶
type FileInfo struct {
Name string `json:"name"`
SizeKB float64 `json:"sizeKB"`
URL string `json:"url"`
}
FileInfo represents individual file information in the browse response.
type PackageResponse ¶
PackageResponse represents the response structure from /v1/package/{name}.
Click to show internal directories.
Click to hide internal directories.