flatpak

package
v0.254.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Flatpak only uses the static endpoint
	ENDPOINT_STATIC = "/index/static"
)

Variables

View Source
var ErrUnknownRegistryType = errors.New("unknown registry type")

Functions

func QueryOCIRegistryIndex

func QueryOCIRegistryIndex(uri, ref, os, tag string) (*container.Spec, error)

func ResolveAll

func ResolveAll(sources map[string][]SourceSpec) (map[string][]Spec, error)

Types

type OCIManifest

type OCIManifest struct {
	Config *struct {
		Digest string `json:"digest,omitempty"`
	} `json:"config,omitempty"`
}

Deserialization of an OCI Manifest, only defines the fields necessary for us to get what we need; which is the digest of the config object.

type Reference

type Reference struct {
	Type       string
	Identifier string
	Arch       string
	Branch     string
}

func NewReferenceFromString

func NewReferenceFromString(ref string) (Reference, error)

func (*Reference) String

func (r *Reference) String() string

type Registry

type Registry struct {
	RemoteName string
	Type       RegistryType
	URI        string
}

func NewRegistryFromURI

func NewRegistryFromURI(uri string) (*Registry, error)

func (*Registry) Query

func (r *Registry) Query(ref string) (*Spec, error)

type RegistryType

type RegistryType uint
const (
	REGISTRY_TYPE_UNKNOWN RegistryType = iota
	REGISTRY_TYPE_OCI
)

type ResponseImage

type ResponseImage struct {
	Tags         []string          `json:"Tags"`
	Digest       string            `json:"Digest"`
	MediaType    string            `json:"MediaType"`
	OS           string            `json:"OS"`
	Architecture string            `json:"Architecture"`
	Annotations  map[string]string `json:"Annotations"`
	Labels       map[string]string `json:"Labels"`
}

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"`
}

type SourceSpec

type SourceSpec struct {
	Registry  Registry
	Reference Reference
}

type Spec

type Spec struct {
	ContainerSpec *container.Spec
	CommitSpec    *ostree.CommitSpec
}

A flatpak source can return (based on the type of the registry in the `SourceSpec`) either a container or an ostree commit.

func Resolve

func Resolve(source SourceSpec) (Spec, error)

Jump to

Keyboard shortcuts

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