Documentation
¶
Index ¶
Constants ¶
const (
// Flatpak only uses the static endpoint
ENDPOINT_STATIC = "/index/static"
)
Variables ¶
var ErrUnknownRegistryType = errors.New("unknown registry type")
Functions ¶
func ResolveAll ¶
func ResolveAll(sources map[string][]SourceSpec) (map[string][]Spec, error)
Types ¶
type OCIRegistryIndex ¶ added in v0.265.0
type OCIRegistryIndex struct {
// contains filtered or unexported fields
}
OCIRegistryIndex is a session for querying one OCI registry's Flatpak static index (/index/static) for a fixed os/tag pair. The decoded JSON is cached on this instance until OCIRegistryIndex.Close. Callers should defer Close() once they are done issuing OCIRegistryIndex.Query calls.
Manifest and config resolution for the digest-pinned image is delegated to container.Resolver from pkg/container (container.NewBlockingResolver).
func NewOCIRegistryIndex ¶ added in v0.265.0
func NewOCIRegistryIndex(baseURI, os, tag string) (*OCIRegistryIndex, error)
NewOCIRegistryIndex constructs an index client for baseURI (https host or full origin without the oci+ scheme prefix), Flatpak index os and tag query parameters.
func (*OCIRegistryIndex) Close ¶ added in v0.265.0
func (q *OCIRegistryIndex) Close()
Close drops the cached decoded index. It must not be called concurrently with Query.
func (*OCIRegistryIndex) Query ¶ added in v0.265.0
func (q *OCIRegistryIndex) Query(flatpakRef string) (*container.Spec, error)
Query parses flatpakRef with NewReferenceFromString for architecture selection, loads the registry index (cached on this instance), finds the image by org.flatpak.ref, then resolves the digest-pinned image using container.NewBlockingResolver (pkg/container).
type Reference ¶
func NewReferenceFromString ¶
type Registry ¶
type Registry struct {
RemoteName string
Type RegistryType
URI string
}
func NewRegistryFromURI ¶
type RegistryType ¶
type RegistryType uint
const ( REGISTRY_TYPE_UNKNOWN RegistryType = iota REGISTRY_TYPE_OCI )
type ResponseImage ¶
type ResponseImageList ¶
type ResponseImageList struct{}
type ResponseRepository ¶
type ResponseRepository struct {
Name string `json:"Name"`
Images []*ResponseImage `json:"Images"`
Lists []ResponseImageList `json:"Lists"`
}
type ResponseRoot ¶
type ResponseRoot struct {
Registry string `json:"Registry"`
Results []ResponseRepository `json:"Results"`
}