downloader

package
v0.0.0-...-94e6d93 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepoEndpoint = "https://ghcr.io/v2/"

	Repo = "ngld/knossos/releases"
)

Variables

This section is empty.

Functions

func DownloadVersion

func DownloadVersion(ctx context.Context, token, tag, dest string, progressCb func(float32, string)) error

func GetAvailableVersions

func GetAvailableVersions(ctx context.Context, token string) ([]string, error)

func GetBlobURL

func GetBlobURL(ctx context.Context, token string, digest string) (string, error)

func GetToken

func GetToken(repo string) (string, error)

Types

type Blob

type Blob struct {
	MediaType string `json:"mediaType"`
	Digest    string `json:"digest"`
	Size      int    `json:"size"`
}

type RegistryManifest

type RegistryManifest struct {
	MediaType     string `json:"mediaType"`
	Config        Blob   `json:"config"`
	Layers        []Blob `json:"layers"`
	SchemaVersion int    `json:"schemaVersion"`
}

type TokenResponse

type TokenResponse struct {
	Token  string          `json:"token"`
	Errors []responseError `json:"errors"`
}

Jump to

Keyboard shortcuts

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