Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorQuark() glib.Quark
- func GetDefaultArch() string
- func GetSupportedArches() []string
- func PortalErrorQuark() glib.Quark
- func TransactionOperationTypeToString(kind TransactionOperationType) string
- type BundleRef
- func (self *BundleRef) Appstream() *glib.Bytes
- func (self *BundleRef) File() *gio.File
- func (self *BundleRef) Icon(size int) *glib.Bytes
- func (self *BundleRef) InstalledSize() uint64
- func (self *BundleRef) Metadata() *glib.Bytes
- func (self *BundleRef) Origin() string
- func (self *BundleRef) RuntimeRepoURL() string
- type BundleRefOverrider
- type Error
- type InstallFlags
- type Installation
- func NewInstallationForPath(ctx context.Context, path gio.Filer, user bool) (*Installation, error)
- func NewInstallationSystem(ctx context.Context) (*Installation, error)
- func NewInstallationSystemWithID(ctx context.Context, id string) (*Installation, error)
- func NewInstallationUser(ctx context.Context) (*Installation, error)
- func (self *Installation) AddRemote(ctx context.Context, remote *Remote, ifNeeded bool) error
- func (self *Installation) CleanupLocalRefsSync(ctx context.Context) error
- func (self *Installation) Config(ctx context.Context, key string) (string, error)
- func (self *Installation) CreateMonitor(ctx context.Context) (gio.FileMonitorrer, error)
- func (self *Installation) CurrentInstalledApp(ctx context.Context, name string) (*InstalledRef, error)
- func (self *Installation) DefaultLanguages() ([]string, error)
- func (self *Installation) DefaultLocales() ([]string, error)
- func (self *Installation) DisplayName() string
- func (self *Installation) DropCaches(ctx context.Context) error
- func (self *Installation) FetchRemoteMetadataSync(ctx context.Context, remoteName string, ref *Ref) (*glib.Bytes, error)
- func (self *Installation) FetchRemoteRefSync(ctx context.Context, remoteName string, kind RefKind, ...) (*RemoteRef, error)
- func (self *Installation) FetchRemoteRefSyncFull(ctx context.Context, remoteName string, kind RefKind, ...) (*RemoteRef, error)
- func (self *Installation) FetchRemoteSizeSync(ctx context.Context, remoteName string, ref *Ref) (downloadSize uint64, installedSize uint64, goerr error)
- func (self *Installation) ID() string
- func (self *Installation) Install(ctx context.Context, remoteName string, kind RefKind, ...) (*InstalledRef, error)deprecated
- func (self *Installation) InstallBundle(ctx context.Context, file gio.Filer, progress ProgressCallback) (*InstalledRef, error)deprecated
- func (self *Installation) InstallFull(ctx context.Context, flags InstallFlags, remoteName string, kind RefKind, ...) (*InstalledRef, error)deprecated
- func (self *Installation) InstallRefFile(ctx context.Context, refFileData *glib.Bytes) (*RemoteRef, error)deprecated
- func (self *Installation) IsUser() bool
- func (self *Installation) Launch(ctx context.Context, name, arch, branch, commit string) error
- func (self *Installation) LoadAppOverrides(ctx context.Context, appId string) (string, error)
- func (self *Installation) MinFreeSpaceBytes() (uint64, error)
- func (self *Installation) ModifyRemote(ctx context.Context, remote *Remote) error
- func (self *Installation) NoInteraction() bool
- func (self *Installation) Path() *gio.File
- func (self *Installation) Priority() int
- func (self *Installation) PruneLocalRepo(ctx context.Context) error
- func (self *Installation) RemoteByName(ctx context.Context, name string) (*Remote, error)
- func (self *Installation) RemoveLocalRefSync(ctx context.Context, remoteName, ref string) error
- func (self *Installation) RemoveRemote(ctx context.Context, name string) error
- func (self *Installation) RunTriggers(ctx context.Context) error
- func (self *Installation) SetConfigSync(ctx context.Context, key, value string) error
- func (self *Installation) SetNoInteraction(noInteraction bool)
- func (self *Installation) StorageType() StorageType
- func (self *Installation) Uninstall(ctx context.Context, kind RefKind, name, arch, branch string, ...) errordeprecated
- func (self *Installation) UninstallFull(ctx context.Context, flags UninstallFlags, kind RefKind, ...) errordeprecated
- func (self *Installation) Update(ctx context.Context, flags UpdateFlags, kind RefKind, ...) (*InstalledRef, error)deprecated
- func (self *Installation) UpdateFull(ctx context.Context, flags UpdateFlags, kind RefKind, ...) (*InstalledRef, error)deprecated
- func (self *Installation) UpdateRemoteSync(ctx context.Context, name string) error
- type InstallationOverrider
- type InstalledRef
- func (self *InstalledRef) AppdataContentRating() map[string]string
- func (self *InstalledRef) AppdataContentRatingType() string
- func (self *InstalledRef) AppdataLicense() string
- func (self *InstalledRef) AppdataName() string
- func (self *InstalledRef) AppdataSummary() string
- func (self *InstalledRef) AppdataVersion() string
- func (self *InstalledRef) DeployDir() string
- func (self *InstalledRef) Eol() string
- func (self *InstalledRef) EolRebase() string
- func (self *InstalledRef) InstalledSize() uint64
- func (self *InstalledRef) IsCurrent() bool
- func (self *InstalledRef) LatestCommit() string
- func (self *InstalledRef) LoadAppdata(ctx context.Context) (*glib.Bytes, error)
- func (self *InstalledRef) LoadMetadata(ctx context.Context) (*glib.Bytes, error)
- func (self *InstalledRef) Origin() string
- func (self *InstalledRef) Subpaths() []string
- type InstalledRefOverrider
- type Instance
- func (self *Instance) App() string
- func (self *Instance) Arch() string
- func (self *Instance) Branch() string
- func (self *Instance) ChildPid() int
- func (self *Instance) Commit() string
- func (self *Instance) ID() string
- func (self *Instance) Info() *glib.KeyFile
- func (self *Instance) IsRunning() bool
- func (self *Instance) Pid() int
- func (self *Instance) Runtime() string
- func (self *Instance) RuntimeCommit() string
- type InstanceOverrider
- type LaunchFlags
- type PortalError
- type ProgressCallback
- type QueryFlags
- type Ref
- type RefKind
- type RefOverrider
- type RelatedRef
- type RelatedRefOverrider
- type Remote
- func (self *Remote) AppstreamDir(arch string) *gio.File
- func (self *Remote) AppstreamTimestamp(arch string) *gio.File
- func (self *Remote) CollectionID() string
- func (self *Remote) Comment() string
- func (self *Remote) DefaultBranch() string
- func (self *Remote) Description() string
- func (self *Remote) Disabled() bool
- func (self *Remote) Filter() string
- func (self *Remote) GpgVerify() bool
- func (self *Remote) Homepage() string
- func (self *Remote) Icon() string
- func (self *Remote) Name() string
- func (self *Remote) Nodeps() bool
- func (self *Remote) Noenumerate() bool
- func (self *Remote) Prio() int
- func (self *Remote) RemoteType() RemoteType
- func (self *Remote) SetCollectionID(collectionId string)
- func (self *Remote) SetComment(comment string)
- func (self *Remote) SetDefaultBranch(defaultBranch string)
- func (self *Remote) SetDescription(description string)
- func (self *Remote) SetDisabled(disabled bool)
- func (self *Remote) SetFilter(filterPath string)
- func (self *Remote) SetGpgKey(gpgKey *glib.Bytes)
- func (self *Remote) SetGpgVerify(gpgVerify bool)
- func (self *Remote) SetHomepage(homepage string)
- func (self *Remote) SetIcon(icon string)
- func (self *Remote) SetNodeps(nodeps bool)
- func (self *Remote) SetNoenumerate(noenumerate bool)
- func (self *Remote) SetPrio(prio int)
- func (self *Remote) SetTitle(title string)
- func (self *Remote) SetURL(url string)
- func (self *Remote) Title() string
- func (self *Remote) URL() string
- type RemoteOverrider
- type RemoteRef
- type RemoteRefOverrider
- type RemoteType
- type StorageType
- type Transaction
- func (self *Transaction) AbortWebflow(id uint)
- func (self *Transaction) AddDefaultDependencySources()
- func (self *Transaction) AddDependencySource(installation *Installation)
- func (self *Transaction) AddInstall(remote, ref string, subpaths []string) error
- func (self *Transaction) AddInstallBundle(file gio.Filer, gpgData *glib.Bytes) error
- func (self *Transaction) AddInstallFlatpakref(flatpakrefData *glib.Bytes) error
- func (self *Transaction) AddSideloadRepo(path string)
- func (self *Transaction) AddUninstall(ref string) error
- func (self *Transaction) AddUpdate(ref string, subpaths []string, commit string) error
- func (self *Transaction) CompleteBasicAuth(id uint, user, password string, options *glib.Variant)
- func (self *Transaction) ConnectAddNewRemote(...) externglib.SignalHandle
- func (self *Transaction) ConnectBasicAuthStart(f func(remote, realm string, options *glib.Variant, id int) (ok bool)) externglib.SignalHandle
- func (self *Transaction) ConnectEndOfLifed(f func(ref, reason, rebase string)) externglib.SignalHandle
- func (self *Transaction) ConnectInstallAuthenticator(f func(remote, authenticatorRef string)) externglib.SignalHandle
- func (self *Transaction) ConnectNewOperation(f func(operation *TransactionOperation, progress *TransactionProgress)) externglib.SignalHandle
- func (self *Transaction) ConnectOperationDone(...) externglib.SignalHandle
- func (self *Transaction) ConnectOperationError(...) externglib.SignalHandle
- func (self *Transaction) ConnectReady(f func() (ok bool)) externglib.SignalHandle
- func (self *Transaction) ConnectReadyPreAuth(f func() (ok bool)) externglib.SignalHandle
- func (self *Transaction) ConnectWebflowDone(f func(options *glib.Variant, id int)) externglib.SignalHandle
- func (self *Transaction) ConnectWebflowStart(f func(remote, url string, options *glib.Variant, id int) (ok bool)) externglib.SignalHandle
- func (self *Transaction) CurrentOperation() *TransactionOperation
- func (self *Transaction) IncludeUnusedUninstallOps() bool
- func (self *Transaction) Installation() *Installation
- func (self *Transaction) IsEmpty() bool
- func (self *Transaction) NoDeploy() bool
- func (self *Transaction) NoPull() bool
- func (self *Transaction) Operations() []*TransactionOperation
- func (self *Transaction) ParentWindow() string
- func (transaction *Transaction) Run(ctx context.Context) error
- func (self *Transaction) SetDefaultArch(arch string)
- func (self *Transaction) SetDisableAutoPIN(disablePin bool)
- func (self *Transaction) SetDisableDependencies(disableDependencies bool)
- func (self *Transaction) SetDisablePrune(disablePrune bool)
- func (self *Transaction) SetDisableRelated(disableRelated bool)
- func (self *Transaction) SetDisableStaticDeltas(disableStaticDeltas bool)
- func (self *Transaction) SetForceUninstall(forceUninstall bool)
- func (self *Transaction) SetIncludeUnusedUninstallOps(includeUnusedUninstallOps bool)
- func (self *Transaction) SetNoDeploy(noDeploy bool)
- func (self *Transaction) SetNoInteraction(noInteraction bool)
- func (self *Transaction) SetNoPull(noPull bool)
- func (self *Transaction) SetParentWindow(parentWindow string)
- func (self *Transaction) SetReinstall(reinstall bool)
- type TransactionErrorDetails
- type TransactionOperation
- func (self *TransactionOperation) BundlePath() *gio.File
- func (self *TransactionOperation) Commit() string
- func (self *TransactionOperation) DownloadSize() uint64
- func (self *TransactionOperation) InstalledSize() uint64
- func (self *TransactionOperation) IsSkipped() bool
- func (self *TransactionOperation) Metadata() *glib.KeyFile
- func (self *TransactionOperation) OldMetadata() *glib.KeyFile
- func (self *TransactionOperation) OperationType() TransactionOperationType
- func (self *TransactionOperation) Remote() string
- func (self *TransactionOperation) RequiresAuthentication() bool
- func (self *TransactionOperation) Subpaths() []string
- type TransactionOperationOverrider
- type TransactionOperationType
- type TransactionOverrider
- type TransactionProgress
- func (self *TransactionProgress) BytesTransferred() uint64
- func (self *TransactionProgress) ConnectChanged(f func()) externglib.SignalHandle
- func (self *TransactionProgress) IsEstimating() bool
- func (self *TransactionProgress) Progress() int
- func (self *TransactionProgress) SetUpdateFrequency(updateInterval uint)
- func (self *TransactionProgress) StartTime() uint64
- func (self *TransactionProgress) Status() string
- type TransactionProgressOverrider
- type TransactionRemoteReason
- type TransactionResult
- type UninstallFlags
- type UpdateFlags
Constants ¶
const MAJOR_VERSION = 1
MAJOR_VERSION: major version.
const MICRO_VERSION = 7
MICRO_VERSION: micro version.
const MINOR_VERSION = 12
MINOR_VERSION: minor version.
Variables ¶
var ( GTypeStorageType = externglib.Type(C.flatpak_storage_type_get_type()) GTypeInstallFlags = externglib.Type(C.flatpak_install_flags_get_type()) GTypeLaunchFlags = externglib.Type(C.flatpak_launch_flags_get_type()) GTypeQueryFlags = externglib.Type(C.flatpak_query_flags_get_type()) GTypeUninstallFlags = externglib.Type(C.flatpak_uninstall_flags_get_type()) GTypeUpdateFlags = externglib.Type(C.flatpak_update_flags_get_type()) GTypeInstallation = externglib.Type(C.flatpak_installation_get_type()) )
glib.Type values for flatpak-installation.go.
var ( GTypeRefKind = externglib.Type(C.flatpak_ref_kind_get_type()) GTypeRef = externglib.Type(C.flatpak_ref_get_type()) )
glib.Type values for flatpak-ref.go.
var ( GTypeRemoteType = externglib.Type(C.flatpak_remote_type_get_type()) GTypeRemote = externglib.Type(C.flatpak_remote_get_type()) )
glib.Type values for flatpak-remote.go.
var ( GTypeTransactionOperationType = externglib.Type(C.flatpak_transaction_operation_type_get_type()) GTypeTransactionRemoteReason = externglib.Type(C.flatpak_transaction_remote_reason_get_type()) GTypeTransactionErrorDetails = externglib.Type(C.flatpak_transaction_error_details_get_type()) GTypeTransactionResult = externglib.Type(C.flatpak_transaction_result_get_type()) GTypeTransaction = externglib.Type(C.flatpak_transaction_get_type()) GTypeTransactionOperation = externglib.Type(C.flatpak_transaction_operation_get_type()) GTypeTransactionProgress = externglib.Type(C.flatpak_transaction_progress_get_type()) )
glib.Type values for flatpak-transaction.go.
var GTypeBundleRef = externglib.Type(C.flatpak_bundle_ref_get_type())
glib.Type values for flatpak-bundle-ref.go.
var GTypeError = externglib.Type(C.flatpak_error_get_type())
glib.Type values for flatpak-error.go.
var GTypeInstalledRef = externglib.Type(C.flatpak_installed_ref_get_type())
glib.Type values for flatpak-installed-ref.go.
var GTypeInstance = externglib.Type(C.flatpak_instance_get_type())
glib.Type values for flatpak-instance.go.
var GTypePortalError = externglib.Type(C.flatpak_portal_error_get_type())
glib.Type values for flatpak-portal-error.go.
var GTypeRelatedRef = externglib.Type(C.flatpak_related_ref_get_type())
glib.Type values for flatpak-related-ref.go.
var GTypeRemoteRef = externglib.Type(C.flatpak_remote_ref_get_type())
glib.Type values for flatpak-remote-ref.go.
Functions ¶
func GetDefaultArch ¶
func GetDefaultArch() string
GetDefaultArch returns the canonical name for the arch of the current machine.
The function returns the following values:
- utf8: arch string.
func GetSupportedArches ¶
func GetSupportedArches() []string
GetSupportedArches returns the canonical names for the arches that are supported (i.e. can run) on the current machine, in order of priority (default is first).
The function returns the following values:
- utf8s: zero terminated array of arch strings.
func PortalErrorQuark ¶
func PortalErrorQuark() glib.Quark
The function returns the following values:
func TransactionOperationTypeToString ¶
func TransactionOperationTypeToString(kind TransactionOperationType) string
TransactionOperationTypeToString converts the operation type to a string.
The function takes the following parameters:
- kind: TransactionOperationType.
The function returns the following values:
- utf8: string representing kind.
Types ¶
type BundleRef ¶
type BundleRef struct { Ref // contains filtered or unexported fields }
func NewBundleRef ¶
NewBundleRef creates a new bundle ref for the given file.
The function takes the following parameters:
- file: #GFile.
The function returns the following values:
- bundleRef: new bundle ref.
func (*BundleRef) Appstream ¶
func (self *BundleRef) Appstream() *glib.Bytes
Appstream: get the compressed appstream for the app/runtime.
The function returns the following values:
- bytes with the appstream contents, or NULL.
func (*BundleRef) File ¶
func (self *BundleRef) File() *gio.File
File: get the file this bundle is stored in.
The function returns the following values:
- file: #GFile.
func (*BundleRef) Icon ¶
Icon: get the icon png data for the app/runtime.
The function takes the following parameters:
- size: 64 or 128.
The function returns the following values:
- bytes with png contents.
func (*BundleRef) InstalledSize ¶
InstalledSize returns the installed size for the bundle.
The function returns the following values:
- guint64: installed size.
func (*BundleRef) Metadata ¶
func (self *BundleRef) Metadata() *glib.Bytes
Metadata: get the metadata for the app/runtime.
The function returns the following values:
- bytes with the metadata contents, or NULL.
func (*BundleRef) Origin ¶
Origin: get the origin url stored in the bundle.
The function returns the following values:
- utf8: url string, or NULL.
func (*BundleRef) RuntimeRepoURL ¶
RuntimeRepoURL: get the runtime flatpakrepo url stored in the bundle (if any).
The function returns the following values:
- utf8: url string, or NULL.
type BundleRefOverrider ¶
type BundleRefOverrider interface { }
BundleRefOverrider contains methods that are overridable.
type Error ¶
Error codes for library functions.
const ( // ErrorAlreadyInstalled: app/runtime/remote is already installed. ErrorAlreadyInstalled Error = iota // ErrorNotInstalled: app/runtime is not installed. ErrorNotInstalled // ErrorOnlyPulled: app/runtime was only pulled into the local repository // but not installed. ErrorOnlyPulled // ErrorDifferentRemote: app/Runtime is already installed, but from a // different remote. ErrorDifferentRemote // ErrorAborted: transaction was aborted (returned TRUE in operation-error // signal). ErrorAborted // ErrorSkipped: app/Runtime install was skipped due to earlier errors. ErrorSkipped // ErrorNeedNewFlatpak: app/Runtime needs a more recent version of flatpak. ErrorNeedNewFlatpak // ErrorRemoteNotFound: specified remote was not found. ErrorRemoteNotFound // ErrorRuntimeNotFound: runtime needed for the app was not found. ErrorRuntimeNotFound // ErrorDowngrade: pulled commit is a downgrade, and a downgrade wasn't // specifically allowed. (Since: 1.0). ErrorDowngrade // ErrorInvalidRef: ref could not be parsed. (Since: 1.0.3). ErrorInvalidRef // ErrorInvalidData: invalid data. (Since: 1.0.3). ErrorInvalidData // ErrorUntrusted: missing GPG key or signature. (Since: 1.0.3). ErrorUntrusted // ErrorSetupFailed: sandbox setup failed. (Since: 1.0.3). ErrorSetupFailed // ErrorExportFailed: exporting data failed. (Since: 1.0.3). ErrorExportFailed // ErrorRemoteUsed: remote can't be uninstalled. (Since: 1.0.3). ErrorRemoteUsed // ErrorRuntimeUsed: runtime can't be uninstalled. (Since: 1.0.3). ErrorRuntimeUsed // ErrorInvalidName: application, runtime or remote name is invalid. (Since: // 1.0.3). ErrorInvalidName // ErrorOutOfSpace: more disk space needed. (Since: 1.2.0). ErrorOutOfSpace // ErrorWrongUser: operation is being attempted by the wrong user (such as // root operating on a user installation). (Since: 1.2.0). ErrorWrongUser // ErrorNotCached: cached data was requested, but it was not available. // (Since: 1.4.0). ErrorNotCached // ErrorRefNotFound: specified ref was not found. (Since: 1.4.0). ErrorRefNotFound // ErrorPermissionDenied: operation was not allowed by the administrative // policy. For example, an app is not allowed to be installed due to not // complying with the parental controls policy. (Since: 1.5.1). ErrorPermissionDenied // ErrorAuthenticationFailed: authentication operation failed, for example, // no correct password was supplied. (Since: 1.7.3). ErrorAuthenticationFailed // ErrorNotAuthorized: operation tried to access a ref, or information about // it that it was not authorized. For example, when succesfully // authenticating with a server but the user doesn't have permissions for a // private ref. (Since: 1.7.3). ErrorNotAuthorized )
type InstallFlags ¶
InstallFlags flags to alter the behavior of flatpak_installation_install_full().
const ( // InstallFlagsNone: default. InstallFlagsNone InstallFlags = 0b0 // InstallFlagsNoStaticDeltas: don't use static deltas when pulling. InstallFlagsNoStaticDeltas InstallFlags = 0b1 // InstallFlagsNoDeploy: don't install any new builds that might be fetched. InstallFlagsNoDeploy InstallFlags = 0b100 // InstallFlagsNoPull: don't try to fetch new builds from the remote repo. InstallFlagsNoPull InstallFlags = 0b1000 // InstallFlagsNoTriggers: don't call triggers after installing. If used, // the caller must later call flatpak_installation_run_triggers() to update // the exported files. (Since: 1.0.3). InstallFlagsNoTriggers InstallFlags = 0b10000 )
func (InstallFlags) Has ¶
func (i InstallFlags) Has(other InstallFlags) bool
Has returns true if i contains other.
func (InstallFlags) String ¶
func (i InstallFlags) String() string
String returns the names in string for InstallFlags.
type Installation ¶
type Installation struct { *externglib.Object // contains filtered or unexported fields }
func NewInstallationForPath ¶
func NewInstallationForPath(ctx context.Context, path gio.Filer, user bool) (*Installation, error)
NewInstallationForPath creates a new Installation for the installation at the given path.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- path: #GFile.
- user: whether this is a user-specific location.
The function returns the following values:
- installation: new Installation.
func NewInstallationSystem ¶
func NewInstallationSystem(ctx context.Context) (*Installation, error)
NewInstallationSystem creates a new Installation for the default system-wide installation.
The function takes the following parameters:
- ctx (optional): #GCancellable.
The function returns the following values:
- installation: new Installation.
func NewInstallationSystemWithID ¶
func NewInstallationSystemWithID(ctx context.Context, id string) (*Installation, error)
NewInstallationSystemWithID creates a new Installation for the system-wide installation id.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- id (optional): ID of the system-wide installation.
The function returns the following values:
- installation: new Installation.
func NewInstallationUser ¶
func NewInstallationUser(ctx context.Context) (*Installation, error)
NewInstallationUser creates a new Installation for the per-user installation.
The function takes the following parameters:
- ctx (optional): #GCancellable.
The function returns the following values:
- installation: new Installation.
func (*Installation) AddRemote ¶
AddRemote adds a new remote object to the set of remotes. This is similar to flatpak_installation_modify_remote() for non-existing remote names. However, if the named remote already exists then instead of modifying it it fails with FLATPAK_ERROR_ALREADY_INSTALLED, or if if_needed is true it silently succeeds without doing anything.
As an exception to the last, if the local config has a filter defined, but the new remote unsets the filter (for example, it comes from an unfiltered .flatpakref via flatpak_remote_new_from_file()) the the local remote filter gets reset. This is to allow the setup where there is a default setup of a filtered remote, yet you can still use the standard flatpakref file to get the full contents without getting two remotes.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remote: new Remote.
- ifNeeded: if TRUE, only add if it doesn't exists.
func (*Installation) CleanupLocalRefsSync ¶
func (self *Installation) CleanupLocalRefsSync(ctx context.Context) error
CleanupLocalRefsSync: remove all OSTree refs from the local flatpak repository which are not in a deployed state. The next time the underlying OSTree repo is pruned, objects which were attached to that ref will be removed. This is useful if you pulled a flatpak refs using flatpak_installation_install_full() and specified FLATPAK_INSTALL_FLAGS_NO_DEPLOY but then decided not to deploy the refs later on and want to remove the local refs to prevent them from taking up disk space. Note that this will not remove the objects referred to by ref from the underlying OSTree repo, you should use flatpak_installation_prune_local_repo() to do that.
The function takes the following parameters:
- ctx (optional): #GCancellable.
func (*Installation) Config ¶
Config: get a global configuration option for the installation, see flatpak_installation_set_config_sync() for supported keys.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- key: name of the key to get.
The function returns the following values:
- utf8: (newly allocated) value, or NULL on error (G_KEY_FILE_ERROR_KEY_NOT_FOUND error if key is not set).
func (*Installation) CreateMonitor ¶
func (self *Installation) CreateMonitor(ctx context.Context) (gio.FileMonitorrer, error)
CreateMonitor gets monitor object for the installation. The returned file monitor will emit the Monitor::changed signal whenever an application or runtime was installed, uninstalled or updated.
The function takes the following parameters:
- ctx (optional): #GCancellable.
The function returns the following values:
- fileMonitor: new Monitor instance, or NULL on error.
func (*Installation) CurrentInstalledApp ¶
func (self *Installation) CurrentInstalledApp(ctx context.Context, name string) (*InstalledRef, error)
CurrentInstalledApp: get the last build of reference name that was installed with flatpak_installation_install(), or NULL if the reference has never been installed locally.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- name of the app.
The function returns the following values:
- installedRef: InstalledRef.
func (*Installation) DefaultLanguages ¶
func (self *Installation) DefaultLanguages() ([]string, error)
DefaultLanguages: get the default languages used by the installation to decide which subpaths to install of locale extensions. This list may also be used by frontends like GNOME Software to decide which language-specific apps to display. An empty array means that all languages should be installed.
The function returns the following values:
- utf8s: A possibly empty array of strings, or NULL on error.
func (*Installation) DefaultLocales ¶
func (self *Installation) DefaultLocales() ([]string, error)
DefaultLocales: like flatpak_installation_get_default_languages() but includes territory information (e.g. en_US rather than en) which may be included in the extra-languages configuration.
Strings returned by this function are in the format specified by setlocale() (man:setlocale): language[_territory][.codeset][modifier].
The function returns the following values:
- utf8s: A possibly empty array of locale strings, or NULL on error.
func (*Installation) DisplayName ¶
func (self *Installation) DisplayName() string
DisplayName returns the display name of the installation for self.
Note that this function may return NULL if the installation does not have a display name.
The function returns the following values:
- utf8: string with the installation's display name.
func (*Installation) DropCaches ¶
func (self *Installation) DropCaches(ctx context.Context) error
DropCaches drops all internal (in-memory) caches. For instance, this may be needed to pick up new or changed remotes configured outside this installation instance.
The function takes the following parameters:
- ctx (optional): #GCancellable.
func (*Installation) FetchRemoteMetadataSync ¶
func (self *Installation) FetchRemoteMetadataSync(ctx context.Context, remoteName string, ref *Ref) (*glib.Bytes, error)
FetchRemoteMetadataSync obtains the metadata file from a commit.
NOTE: Since 0.11.4 this information is accessible in FlatpakRemoteRef, so this function is not very useful anymore.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote.
- ref: ref.
The function returns the following values:
- bytes containing the flatpak metadata file, or NULL if an error occurred.
func (*Installation) FetchRemoteRefSync ¶
func (self *Installation) FetchRemoteRefSync(ctx context.Context, remoteName string, kind RefKind, name, arch, branch string) (*RemoteRef, error)
FetchRemoteRefSync gets the current remote branch of a ref in the remote.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote.
- kind: what this ref contains (an RefKind).
- name of the app/runtime to fetch.
- arch (optional): which architecture to fetch (default: current architecture).
- branch (optional): which branch to fetch (default: 'master').
The function returns the following values:
- remoteRef instance, or NULL.
func (*Installation) FetchRemoteRefSyncFull ¶
func (self *Installation) FetchRemoteRefSyncFull(ctx context.Context, remoteName string, kind RefKind, name, arch, branch string, flags QueryFlags) (*RemoteRef, error)
FetchRemoteRefSyncFull gets the current remote branch of a ref in the remote.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote.
- kind: what this ref contains (an RefKind).
- name of the app/runtime to fetch.
- arch (optional): which architecture to fetch (default: current architecture).
- branch (optional): which branch to fetch (default: 'master').
- flags: set of QueryFlags.
The function returns the following values:
- remoteRef instance, or NULL.
func (*Installation) FetchRemoteSizeSync ¶
func (self *Installation) FetchRemoteSizeSync(ctx context.Context, remoteName string, ref *Ref) (downloadSize uint64, installedSize uint64, goerr error)
FetchRemoteSizeSync gets information about the maximum amount of data that needs to be transferred to pull the ref from a remote repository, and about the amount of local disk space that is required to check out this commit.
Note that if there are locally available data that are in the ref, which is common for instance if you're doing an update then the real download size may be smaller than what is returned here.
NOTE: Since 0.11.4 this information is accessible in FlatpakRemoteRef, so this function is not very useful anymore.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote.
- ref: ref.
The function returns the following values:
- downloadSize: return location for the (maximum) download size.
- installedSize: return location for the installed size.
func (*Installation) ID ¶
func (self *Installation) ID() string
ID returns the ID of the installation for self.
The ID for the default system installation is "default". The ID for the user installation is "user".
The function returns the following values:
- utf8: string with the installation's ID.
func (*Installation) Install
deprecated
func (self *Installation) Install(ctx context.Context, remoteName string, kind RefKind, name, arch, branch string, progress ProgressCallback) (*InstalledRef, error)
Install: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_install() instead. It has a lot more interesting features.
Install a new application or runtime.
Note that this function was originally written to always return a InstalledRef. Since 0.9.13, passing FLATPAK_INSTALL_FLAGS_NO_DEPLOY will only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, so FLATPAK_ERROR_ONLY_PULLED will be set and the caller must respond accordingly.
Deprecated: Use flatpak_transaction_add_install() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote to use.
- kind: what this ref contains (an RefKind).
- name of the app/runtime to fetch.
- arch (optional): which architecture to fetch (default: current architecture).
- branch (optional): which branch to fetch (default: 'master').
- progress (optional) callback.
The function returns the following values:
- installedRef: ref for the newly installed app or NULL on failure.
func (*Installation) InstallBundle
deprecated
func (self *Installation) InstallBundle(ctx context.Context, file gio.Filer, progress ProgressCallback) (*InstalledRef, error)
InstallBundle: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_install_bundle() instead. It has a lot more interesting features.
Install an application or runtime from an flatpak bundle file. See flatpak-build-bundle(1) for how to create bundles.
Deprecated: Use flatpak_transaction_add_install_bundle() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- file that is an flatpak bundle.
- progress (optional) callback.
The function returns the following values:
- installedRef: ref for the newly installed app or NULL on failure.
func (*Installation) InstallFull
deprecated
func (self *Installation) InstallFull(ctx context.Context, flags InstallFlags, remoteName string, kind RefKind, name, arch, branch string, subpaths []string, progress ProgressCallback) (*InstalledRef, error)
InstallFull: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_install() instead. It has a lot more interesting features.
Install a new application or runtime.
Note that this function was originally written to always return a InstalledRef. Since 0.9.13, passing FLATPAK_INSTALL_FLAGS_NO_DEPLOY will only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, so FLATPAK_ERROR_ONLY_PULLED will be set and the caller must respond accordingly.
Deprecated: Use flatpak_transaction_add_install() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- flags: set of InstallFlags flag.
- remoteName: name of the remote to use.
- kind: what this ref contains (an RefKind).
- name of the app/runtime to fetch.
- arch (optional): which architecture to fetch (default: current architecture).
- branch (optional): which branch to fetch (default: 'master').
- subpaths (optional): list of subpaths to fetch, or NULL for everything.
- progress (optional) callback.
The function returns the following values:
- installedRef: ref for the newly installed app or NULL on failure.
func (*Installation) InstallRefFile
deprecated
func (self *Installation) InstallRefFile(ctx context.Context, refFileData *glib.Bytes) (*RemoteRef, error)
InstallRefFile: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_install_flatpakref() instead. It has a lot more interesting features.
Creates a remote based on the passed in .flatpakref file contents in ref_file_data and returns the RemoteRef that can be used to install it.
Note, the RemoteRef will not have the commit field set, or other details, to avoid unnecessary roundtrips. If you need that you have to resolve it explicitly with flatpak_installation_fetch_remote_ref_sync ().
Deprecated: Use flatpak_transaction_add_install_flatpakref() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- refFileData: ref file contents.
The function returns the following values:
- remoteRef if the remote has been added successfully, NULL on error.
func (*Installation) IsUser ¶
func (self *Installation) IsUser() bool
IsUser returns whether the installation is for a user-specific location.
The function returns the following values:
- ok: TRUE if self is a per-user installation.
func (*Installation) Launch ¶
func (self *Installation) Launch(ctx context.Context, name, arch, branch, commit string) error
Launch an installed application.
You can use flatpak_installation_get_installed_ref() or flatpak_installation_get_current_installed_app() to find out what builds are available, in order to get a value for commit.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- name of the app to launch.
- arch (optional): which architecture to launch (default: current architecture).
- branch (optional): which branch of the application (default: "master").
- commit (optional) of branch to launch.
func (*Installation) LoadAppOverrides ¶
LoadAppOverrides loads the metadata overrides file for an application.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- appId: application id.
The function returns the following values:
- utf8 contents of the overrides files, or NULL if an error occurred.
func (*Installation) MinFreeSpaceBytes ¶
func (self *Installation) MinFreeSpaceBytes() (uint64, error)
MinFreeSpaceBytes returns the min-free-space config value from the OSTree repository of this installation.
Applications can use this value, together with information about the available disk space and the size of pending updates or installs, to estimate whether a pull operation will fail due to running out of disk space.
The function returns the following values:
- outBytes: location to store the result.
func (*Installation) ModifyRemote ¶
func (self *Installation) ModifyRemote(ctx context.Context, remote *Remote) error
ModifyRemote saves changes in the remote object.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remote: modified Remote.
func (*Installation) NoInteraction ¶
func (self *Installation) NoInteraction() bool
NoInteraction returns the value set with flatpak_installation_set_no_interaction().
The function returns the following values:
- ok: TRUE if interactive authorization dialogs are not allowed.
func (*Installation) Path ¶
func (self *Installation) Path() *gio.File
Path returns the installation location for self.
The function returns the following values:
- file: #GFile.
func (*Installation) Priority ¶
func (self *Installation) Priority() int
Priority returns the numeric priority of the installation for self.
The function returns the following values:
- gint: integer with the configured priority value.
func (*Installation) PruneLocalRepo ¶
func (self *Installation) PruneLocalRepo(ctx context.Context) error
PruneLocalRepo: remove all orphaned OSTree objects from the underlying OSTree repo in self.
The function takes the following parameters:
- ctx (optional): #GCancellable.
func (*Installation) RemoteByName ¶
RemoteByName looks up a remote by name.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- name: remote name.
The function returns the following values:
- remote instance, or NULL with error set.
func (*Installation) RemoveLocalRefSync ¶
func (self *Installation) RemoveLocalRefSync(ctx context.Context, remoteName, ref string) error
RemoveLocalRefSync: remove the OSTree ref given by remote_name:ref from the local flatpak repository. The next time the underlying OSTree repo is pruned, objects which were attached to that ref will be removed. This is useful if you pulled a flatpak ref using flatpak_installation_install_full() and specified FLATPAK_INSTALL_FLAGS_NO_DEPLOY but then decided not to deploy the ref later on and want to remove the local ref to prevent it from taking up disk space. Note that this will not remove the objects referred to by ref from the underlying OSTree repo, you should use flatpak_installation_prune_local_repo() to do that.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- remoteName: name of the remote.
- ref: ref.
func (*Installation) RemoveRemote ¶
func (self *Installation) RemoveRemote(ctx context.Context, name string) error
RemoveRemote removes the remote with the given name from the installation.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- name of the remote to remove.
func (*Installation) RunTriggers ¶
func (self *Installation) RunTriggers(ctx context.Context) error
RunTriggers: run the trigger commands to update the files exported by the apps in self. Should be used after one or more app install, upgrade or uninstall operations with the FLATPAK_INSTALL_FLAGS_NO_TRIGGERS, FLATPAK_UPDATE_FLAGS_NO_TRIGGERS or FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS flags set.
The function takes the following parameters:
- ctx (optional): #GCancellable.
func (*Installation) SetConfigSync ¶
func (self *Installation) SetConfigSync(ctx context.Context, key, value string) error
SetConfigSync: set a global configuration option for the installation, currently the only supported keys are languages, which is a semicolon-separated list of language codes like "sv;en;pl", or "" to mean all languages, and extra-languages, which is a semicolon-separated list of locale identifiers like "en;en_DK;zh_HK.big5hkscs;uz_UZ.utf8cyrillic".
The function takes the following parameters:
- ctx (optional): #GCancellable.
- key: name of the key to set.
- value: new value, or NULL to unset.
func (*Installation) SetNoInteraction ¶
func (self *Installation) SetNoInteraction(noInteraction bool)
SetNoInteraction: this method can be used to prevent interactive authorization dialogs to appear for operations on self. This is useful for background operations that are not directly triggered by a user action.
By default, interaction is allowed.
The function takes the following parameters:
- noInteraction: whether to disallow interactive authorization for operations.
func (*Installation) StorageType ¶
func (self *Installation) StorageType() StorageType
StorageType returns the type of storage of the installation for self.
The function returns the following values:
- storageType: StorageType.
func (*Installation) Uninstall
deprecated
func (self *Installation) Uninstall(ctx context.Context, kind RefKind, name, arch, branch string, progress ProgressCallback) error
Uninstall: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_uninstall() instead. It has a lot more interesting features.
Uninstall an application or runtime.
Deprecated: Use flatpak_transaction_add_uninstall() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- kind: what this ref contains (an RefKind).
- name of the app or runtime to uninstall.
- arch (optional): architecture of the app or runtime to uninstall; if NULL, flatpak_get_default_arch() is assumed.
- branch (optional): name of the branch of the app or runtime to uninstall; if NULL, master is assumed.
- progress (optional): callback.
func (*Installation) UninstallFull
deprecated
func (self *Installation) UninstallFull(ctx context.Context, flags UninstallFlags, kind RefKind, name, arch, branch string, progress ProgressCallback) error
UninstallFull: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_uninstall() instead. It has a lot more interesting features.
Uninstall an application or runtime.
Deprecated: Use flatpak_transaction_add_uninstall() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- flags: set of UninstallFlags flags.
- kind: what this ref contains (an RefKind).
- name of the app or runtime to uninstall.
- arch (optional): architecture of the app or runtime to uninstall; if NULL, flatpak_get_default_arch() is assumed.
- branch (optional): name of the branch of the app or runtime to uninstall; if NULL, master is assumed.
- progress (optional): callback.
func (*Installation) Update
deprecated
func (self *Installation) Update(ctx context.Context, flags UpdateFlags, kind RefKind, name, arch, branch string, progress ProgressCallback) (*InstalledRef, error)
Update: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_update() instead. It has a lot more interesting features.
Update an application or runtime.
If the specified package is not installed, then FLATPAK_ERROR_NOT_INSTALLED will be thrown.
If no updates could be found on the remote end and the package is already up to date, then FLATPAK_ERROR_ALREADY_INSTALLED will be thrown.
Deprecated: Use flatpak_transaction_add_update() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- flags: set of UpdateFlags flag.
- kind: whether this is an app or runtime.
- name of the app or runtime to update.
- arch (optional): architecture of the app or runtime to update (default: current architecture).
- branch (optional): name of the branch of the app or runtime to update (default: master).
- progress (optional): callback.
The function returns the following values:
- installedRef: ref for the newly updated app or NULL on failure.
func (*Installation) UpdateFull
deprecated
func (self *Installation) UpdateFull(ctx context.Context, flags UpdateFlags, kind RefKind, name, arch, branch string, subpaths []string, progress ProgressCallback) (*InstalledRef, error)
UpdateFull: this is an old deprecated function, you should use Transaction and flatpak_transaction_add_update() instead. It has a lot more interesting features.
Update an application or runtime.
If the specified package is not installed, then FLATPAK_ERROR_NOT_INSTALLED will be thrown.
If no updates could be found on the remote end and the package is already up to date, then FLATPAK_ERROR_ALREADY_INSTALLED will be thrown.
Deprecated: Use flatpak_transaction_add_update() instead.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- flags: set of UpdateFlags flag.
- kind: whether this is an app or runtime.
- name of the app or runtime to update.
- arch (optional): architecture of the app or runtime to update (default: current architecture).
- branch (optional): name of the branch of the app or runtime to update (default: master).
- subpaths (optional): list of subpaths to fetch, or NULL for everything.
- progress (optional): callback.
The function returns the following values:
- installedRef: ref for the newly updated app or NULL on failure.
func (*Installation) UpdateRemoteSync ¶
func (self *Installation) UpdateRemoteSync(ctx context.Context, name string) error
UpdateRemoteSync updates the local configuration of a remote repository by fetching the related information from the summary file in the remote OSTree repository and committing the changes to the local installation.
The function takes the following parameters:
- ctx (optional): #GCancellable.
- name of the remote to update.
type InstallationOverrider ¶
type InstallationOverrider interface { }
InstallationOverrider contains methods that are overridable.
type InstalledRef ¶
type InstalledRef struct { Ref // contains filtered or unexported fields }
func (*InstalledRef) AppdataContentRating ¶
func (self *InstalledRef) AppdataContentRating() map[string]string
AppdataContentRating returns the content rating field from the appdata. This is a potentially empty mapping of content rating attribute IDs to values, to be interpreted by the semantics of the content rating type (see flatpak_installed_ref_get_appdata_content_rating_type()).
The function returns the following values:
- hashTable (optional): content rating or NULL.
func (*InstalledRef) AppdataContentRatingType ¶
func (self *InstalledRef) AppdataContentRatingType() string
AppdataContentRatingType returns the content rating type from the appdata. For example, oars-1.0 or oars-1.1.
The function returns the following values:
- utf8 (optional): content rating type or NULL.
func (*InstalledRef) AppdataLicense ¶
func (self *InstalledRef) AppdataLicense() string
AppdataLicense returns the license field from the appdata.
The function returns the following values:
- utf8: license or NULL.
func (*InstalledRef) AppdataName ¶
func (self *InstalledRef) AppdataName() string
AppdataName returns the name field from the appdata.
The returned string is localized.
The function returns the following values:
- utf8: name or NULL.
func (*InstalledRef) AppdataSummary ¶
func (self *InstalledRef) AppdataSummary() string
AppdataSummary returns the summary field from the appdata.
The returned string is localized.
The function returns the following values:
- utf8: summary or NULL.
func (*InstalledRef) AppdataVersion ¶
func (self *InstalledRef) AppdataVersion() string
AppdataVersion returns the default version field from the appdata.
The function returns the following values:
- utf8: version or NULL.
func (*InstalledRef) DeployDir ¶
func (self *InstalledRef) DeployDir() string
DeployDir gets the deploy dir of the ref.
The function returns the following values:
- utf8: deploy dir.
func (*InstalledRef) Eol ¶
func (self *InstalledRef) Eol() string
Eol returns the end-of-life reason string, or NULL if the ref is not end-of-lifed.
The function returns the following values:
- utf8: end-of-life reason or NULL.
func (*InstalledRef) EolRebase ¶
func (self *InstalledRef) EolRebase() string
EolRebase returns the end-of-life rebased ref, or NULL if the ref is not end-of-lifed.
The function returns the following values:
- utf8: end-of-life rebased ref or NULL.
func (*InstalledRef) InstalledSize ¶
func (self *InstalledRef) InstalledSize() uint64
InstalledSize returns the installed size of the ref.
The function returns the following values:
- guint64: installed size.
func (*InstalledRef) IsCurrent ¶
func (self *InstalledRef) IsCurrent() bool
IsCurrent returns whether the ref is current.
The function returns the following values:
- ok: TRUE if the ref is current.
func (*InstalledRef) LatestCommit ¶
func (self *InstalledRef) LatestCommit() string
LatestCommit gets the latest commit of the ref.
The function returns the following values:
- utf8 (optional): latest commit.
func (*InstalledRef) LoadAppdata ¶
func (self *InstalledRef) LoadAppdata(ctx context.Context) (*glib.Bytes, error)
LoadAppdata loads the compressed xml appdata for this ref (if it exists).
The function takes the following parameters:
- ctx (optional): #GCancellable.
The function returns the following values:
- bytes containing the compressed appdata file, or NULL if an error occurred.
func (*InstalledRef) LoadMetadata ¶
func (self *InstalledRef) LoadMetadata(ctx context.Context) (*glib.Bytes, error)
LoadMetadata loads the metadata file for this ref.
The function takes the following parameters:
- ctx (optional): #GCancellable.
The function returns the following values:
- bytes containing the metadata file, or NULL if an error occurred.
func (*InstalledRef) Origin ¶
func (self *InstalledRef) Origin() string
Origin gets the origin of the ref.
The function returns the following values:
- utf8: origin.
func (*InstalledRef) Subpaths ¶
func (self *InstalledRef) Subpaths() []string
Subpaths returns the subpaths that are installed, or NULL if all files installed.
The function returns the following values:
- utf8s: strv, or NULL.
type InstalledRefOverrider ¶
type InstalledRefOverrider interface { }
InstalledRefOverrider contains methods that are overridable.
type Instance ¶
type Instance struct { *externglib.Object // contains filtered or unexported fields }
func (*Instance) App ¶
App gets the application ID of the application running in the instance.
Note that this may return NULL for sandboxes that don't have an application.
The function returns the following values:
- utf8 (optional): application ID or NULL.
func (*Instance) Arch ¶
Arch gets the architecture of the application running in the instance.
The function returns the following values:
- utf8: architecture.
func (*Instance) Branch ¶
Branch gets the branch of the application running in the instance.
The function returns the following values:
- utf8: architecture.
func (*Instance) ChildPid ¶
ChildPid gets the PID of the application process in the sandbox.
See flatpak_instance_get_pid().
Note that this function may return 0 immediately after launching a sandbox, for a short amount of time.
The function returns the following values:
- gint: application process PID.
func (*Instance) Commit ¶
Commit gets the commit of the application running in the instance.
The function returns the following values:
- utf8: commit.
func (*Instance) ID ¶
ID gets the instance ID. The ID is used by Flatpak for bookkeeping purposes and has no further relevance.
The function returns the following values:
- utf8: instance ID.
func (*Instance) Info ¶
func (self *Instance) Info() *glib.KeyFile
Info gets a keyfile that holds information about the running sandbox.
This file is available as /.flatpak-info inside the sandbox as well.
The most important data in the keyfile is available with separate getters, but there may be more information in the keyfile.
The function returns the following values:
- keyFile: flatpak-info keyfile.
func (*Instance) IsRunning ¶
IsRunning finds out if the sandbox represented by self is still running.
The function returns the following values:
- ok: TRUE if the sandbox is still running.
func (*Instance) Pid ¶
Pid gets the PID of the outermost process in the sandbox. This is not the application process itself, but a bubblewrap 'babysitter' process.
See flatpak_instance_get_child_pid().
The function returns the following values:
- gint: outermost process PID.
func (*Instance) Runtime ¶
Runtime gets the ref of the runtime used in the instance.
The function returns the following values:
- utf8: runtime ref.
func (*Instance) RuntimeCommit ¶
RuntimeCommit gets the commit of the runtime used in the instance.
The function returns the following values:
- utf8: runtime commit.
type InstanceOverrider ¶
type InstanceOverrider interface { }
InstanceOverrider contains methods that are overridable.
type LaunchFlags ¶
LaunchFlags flags to alter the behavior of flatpak_installation_launch_full().
const ( // LaunchFlagsNone: default. LaunchFlagsNone LaunchFlags = 0b0 // LaunchFlagsDoNotReap: do not reap the child. Use this if you want to wait // for the child with g_child_watch_add(). (Since: 1.1). LaunchFlagsDoNotReap LaunchFlags = 0b1 )
func (LaunchFlags) Has ¶
func (l LaunchFlags) Has(other LaunchFlags) bool
Has returns true if l contains other.
func (LaunchFlags) String ¶
func (l LaunchFlags) String() string
String returns the names in string for LaunchFlags.
type PortalError ¶
PortalError: error codes returned by portal calls.
const ( // PortalErrorFailed: general portal failure. PortalErrorFailed PortalError = iota // PortalErrorInvalidArgument: argument was invalid. PortalErrorInvalidArgument // PortalErrorNotFound: object was not found. PortalErrorNotFound // PortalErrorExists: object already exists. PortalErrorExists // PortalErrorNotAllowed: call was not allowed. PortalErrorNotAllowed // PortalErrorCancelled: call was cancelled by the user. PortalErrorCancelled // PortalErrorWindowDestroyed: window was destroyed by the user. PortalErrorWindowDestroyed )
func (PortalError) String ¶
func (p PortalError) String() string
String returns the name in string for PortalError.
type ProgressCallback ¶
ProgressCallback progress callback is called repeatedly during long-running operations such as installations or updates, and can be used to update progress information in a user interface.
The callback occurs in the thread-default context of the caller.
type QueryFlags ¶
QueryFlags flags to alter the behavior of e.g flatpak_installation_list_remote_refs_sync_full().
const ( // QueryFlagsNone: default. QueryFlagsNone QueryFlags = 0b0 // QueryFlagsOnlyCached: don't do any network i/o, but only return cached // data. This can return stale data, or a ATPAK_ERROR_NOT_CACHED error, // however it is a lot more efficient if you're doing many requests. QueryFlagsOnlyCached QueryFlags = 0b1 // QueryFlagsOnlySideloaded: only list refs available from sideload repos; // see flatpak(1). (Since: 1.7). QueryFlagsOnlySideloaded QueryFlags = 0b10 // QueryFlagsAllArches: include refs from all arches, not just the primary // ones. (Since: 1.11.2). QueryFlagsAllArches QueryFlags = 0b100 )
func (QueryFlags) Has ¶
func (q QueryFlags) Has(other QueryFlags) bool
Has returns true if q contains other.
func (QueryFlags) String ¶
func (q QueryFlags) String() string
String returns the names in string for QueryFlags.
type Ref ¶
type Ref struct { *externglib.Object // contains filtered or unexported fields }
func RefParse ¶
RefParse tries to parse a full ref name and return a Ref (without a commit set) or fail if the ref is invalid somehow.
The function takes the following parameters:
- ref: string ref name, such as "app/org.test.App/x86_64/master".
The function returns the following values:
- ret or NULL.
func (*Ref) Arch ¶
Arch gets the arch or the ref.
The function returns the following values:
- utf8: arch.
func (*Ref) Branch ¶
Branch gets the branch of the ref.
The function returns the following values:
- utf8: branch.
func (*Ref) CollectionID ¶
CollectionID gets the collection ID of the ref.
The function returns the following values:
- utf8: collection ID.
func (*Ref) Commit ¶
Commit gets the commit of the ref.
The function returns the following values:
- utf8: commit.
func (*Ref) FormatRefCached ¶
FormatRefCached: like flatpak_ref_format_ref() but this returns the same string each time it's called rather than allocating a new one.
The function returns the following values:
- utf8: string representation.
type RefOverrider ¶
type RefOverrider interface { }
RefOverrider contains methods that are overridable.
type RelatedRef ¶
type RelatedRef struct { Ref // contains filtered or unexported fields }
func (*RelatedRef) ShouldAutoprune ¶
func (self *RelatedRef) ShouldAutoprune() bool
ShouldAutoprune returns whether to delete when pruning unused refs.
The function returns the following values:
- ok: TRUE if the ref should be considered unused when pruning.
func (*RelatedRef) ShouldDelete ¶
func (self *RelatedRef) ShouldDelete() bool
ShouldDelete returns whether to auto-delete the ref with the main ref.
The function returns the following values:
- ok: TRUE if the ref should be deleted with the main ref.
func (*RelatedRef) ShouldDownload ¶
func (self *RelatedRef) ShouldDownload() bool
ShouldDownload returns whether to auto-download the ref with the main ref.
The function returns the following values:
- ok: TRUE if the ref should be downloaded with the main ref.
func (*RelatedRef) Subpaths ¶
func (self *RelatedRef) Subpaths() []string
Subpaths returns the subpaths that should be installed/updated for the ref. This returns NULL if all files should be installed.
The function returns the following values:
- utf8s: strv, or NULL.
type RelatedRefOverrider ¶
type RelatedRefOverrider interface { }
RelatedRefOverrider contains methods that are overridable.
type Remote ¶
type Remote struct { *externglib.Object // contains filtered or unexported fields }
func NewRemote ¶
NewRemote returns a new remote object which can be used to configure a new remote.
Note: This is a local configuration object, you must commit changes using flatpak_installation_modify_remote() or flatpak_installation_add_remote() for the changes to take effect.
The function takes the following parameters:
- name: name.
The function returns the following values:
- remote: new Remote.
func NewRemoteFromFile ¶
NewRemoteFromFile returns a new pre-filled remote object which can be used to configure a new remote. The fields in the remote are filled in according to the values in the passed in flatpakrepo file.
Note: This is a local configuration object, you must commit changes using flatpak_installation_modify_remote() or flatpak_installation_add_remote() for the changes to take effect.
The function takes the following parameters:
- name: name.
- data: content of a flatpakrepo file.
The function returns the following values:
- remote: new Remote, or NULL on error.
func (*Remote) AppstreamDir ¶
AppstreamDir returns the directory where this remote will store locally cached appstream information for the specified arch.
The function takes the following parameters:
- arch (optional): which architecture to fetch (default: current architecture).
The function returns the following values:
- file: #GFile.
func (*Remote) AppstreamTimestamp ¶
AppstreamTimestamp returns the timestamp file that will be updated whenever the appstream information has been updated (or tried to update) for the specified arch.
The function takes the following parameters:
- arch (optional): which architecture to fetch (default: current architecture).
The function returns the following values:
- file: #GFile.
func (*Remote) CollectionID ¶
CollectionID returns the repository collection ID of this remote, if set.
The function returns the following values:
- utf8 (optional): collection ID, or NULL if unset.
func (*Remote) Comment ¶
Comment returns the comment of the remote.
The function returns the following values:
- utf8: comment.
func (*Remote) DefaultBranch ¶
DefaultBranch returns the default branch configured for the remote.
The function returns the following values:
- utf8: default branch, or NULL.
func (*Remote) Description ¶
Description returns the description of the remote.
The function returns the following values:
- utf8: description.
func (*Remote) Disabled ¶
Disabled returns whether this remote is disabled.
The function returns the following values:
- ok: whether the remote is marked as disabled.
func (*Remote) Filter ¶
Filter returns the filter file of the remote.
The function returns the following values:
- utf8: pathname to a filter file.
func (*Remote) GpgVerify ¶
GpgVerify returns whether GPG verification is enabled for the remote.
The function returns the following values:
- ok: whether GPG verification is enabled.
func (*Remote) Homepage ¶
Homepage returns the homepage url of the remote.
The function returns the following values:
- utf8: homepage url.
func (*Remote) Icon ¶
Icon returns the icon url of the remote.
The function returns the following values:
- utf8: icon url.
func (*Remote) Name ¶
Name returns the name of the remote repository.
The function returns the following values:
- utf8: name.
func (*Remote) Nodeps ¶
Nodeps returns whether this remote should be used to find dependencies.
The function returns the following values:
- ok: whether the remote is marked as "don't use for dependencies".
func (*Remote) Noenumerate ¶
Noenumerate returns whether this remote should be used to list applications.
The function returns the following values:
- ok: whether the remote is marked as "don't enumerate".
func (*Remote) Prio ¶
Prio returns the priority for the remote.
The function returns the following values:
- gint: priority.
func (*Remote) RemoteType ¶
func (self *Remote) RemoteType() RemoteType
RemoteType: get the value of Remote:type.
The function returns the following values:
- remoteType: type of remote this is.
func (*Remote) SetCollectionID ¶
SetCollectionID sets the repository collection ID of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- collectionId (optional): new collection ID, or NULL to unset.
func (*Remote) SetComment ¶
SetComment sets the comment of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- comment: new comment.
func (*Remote) SetDefaultBranch ¶
SetDefaultBranch sets the default branch configured for this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- defaultBranch: new default_branch, or NULL to unset.
func (*Remote) SetDescription ¶
SetDescription sets the description of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- description: new description.
func (*Remote) SetDisabled ¶
SetDisabled sets the disabled config of this remote. See flatpak_remote_get_disabled().
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- disabled: bool.
func (*Remote) SetFilter ¶
SetFilter sets a filter for this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- filterPath: pathname of the new filter file.
func (*Remote) SetGpgKey ¶
func (self *Remote) SetGpgKey(gpgKey *glib.Bytes)
SetGpgKey sets the trusted gpg key for this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- gpgKey with gpg binary key data.
func (*Remote) SetGpgVerify ¶
SetGpgVerify sets the gpg_verify config of this remote. See flatpak_remote_get_gpg_verify().
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- gpgVerify: bool.
func (*Remote) SetHomepage ¶
SetHomepage sets the homepage of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- homepage: new homepage.
func (*Remote) SetIcon ¶
SetIcon sets the homepage of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- icon: new homepage.
func (*Remote) SetNodeps ¶
SetNodeps sets the nodeps config of this remote. See flatpak_remote_get_nodeps().
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- nodeps: bool.
func (*Remote) SetNoenumerate ¶
SetNoenumerate sets the noenumeration config of this remote. See flatpak_remote_get_noenumerate().
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- noenumerate: bool.
func (*Remote) SetPrio ¶
SetPrio sets the prio config of this remote. See flatpak_remote_get_prio().
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- prio: bool.
func (*Remote) SetTitle ¶
SetTitle sets the repository title of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- title: new title, or NULL to unset.
func (*Remote) SetURL ¶
SetURL sets the repository URL of this remote.
Note: This is a local modification of this object, you must commit changes using flatpak_installation_modify_remote() for the changes to take effect.
The function takes the following parameters:
- url: new url.
type RemoteOverrider ¶
type RemoteOverrider interface { }
RemoteOverrider contains methods that are overridable.
type RemoteRef ¶
type RemoteRef struct { Ref // contains filtered or unexported fields }
func (*RemoteRef) DownloadSize ¶
DownloadSize returns the download size of the ref.
The function returns the following values:
- guint64: download size.
func (*RemoteRef) Eol ¶
Eol returns the end-of-life reason string, or NULL if the ref is not end-of-lifed.
The function returns the following values:
- utf8: end-of-life reason or NULL.
func (*RemoteRef) EolRebase ¶
EolRebase returns the end-of-life rebased ref, or NULL if the ref is not end-of-lifed.
The function returns the following values:
- utf8: end-of-life rebased ref or NULL.
func (*RemoteRef) InstalledSize ¶
InstalledSize returns the installed size of the ref.
The function returns the following values:
- guint64: installed size.
func (*RemoteRef) Metadata ¶
func (self *RemoteRef) Metadata() *glib.Bytes
Metadata returns the app metadata from the metadata cache of the ref.
The function returns the following values:
- bytes (optional) with the metadata file contents or NULL.
func (*RemoteRef) RemoteName ¶
RemoteName gets the remote name of the ref.
The function returns the following values:
- utf8: remote name.
type RemoteRefOverrider ¶
type RemoteRefOverrider interface { }
RemoteRefOverrider contains methods that are overridable.
type RemoteType ¶
RemoteType: different types of FlatpakRemote.
const ( // RemoteTypeStatic: statically configured remote. RemoteTypeStatic RemoteType = iota // RemoteTypeUsb: dynamically detected local pathname remote. RemoteTypeUsb // RemoteTypeLan: dynamically detected network remote. RemoteTypeLan )
func (RemoteType) String ¶
func (r RemoteType) String() string
String returns the name in string for RemoteType.
type StorageType ¶
StorageType: information about the storage of an installation.
const ( // StorageTypeDefault: default. StorageTypeDefault StorageType = iota // StorageTypeHardDisk: installation is on a hard disk. StorageTypeHardDisk // StorageTypeSdcard: installation is on a SD card. StorageTypeSdcard // StorageTypeMmc: installation is on an MMC. StorageTypeMmc // StorageTypeNetwork: installation is on the network. StorageTypeNetwork )
func (StorageType) String ¶
func (s StorageType) String() string
String returns the name in string for StorageType.
type Transaction ¶
type Transaction struct { *externglib.Object gio.Initable // contains filtered or unexported fields }
func NewTransactionForInstallation ¶
func NewTransactionForInstallation(ctx context.Context, installation *Installation) (*Transaction, error)
NewTransactionForInstallation creates a new Transaction object that can be used to do installation and updates of multiple refs, as well as their dependencies, in a single operation. Set the options you want on the transaction and add the refs you want to install/update, then start the transaction with flatpak_transaction_run ().
The function takes the following parameters:
- ctx (optional): #GCancellable.
- installation: Installation.
The function returns the following values:
- transaction or NULL on failure.
func (*Transaction) AbortWebflow ¶
func (self *Transaction) AbortWebflow(id uint)
AbortWebflow: cancel an ongoing webflow authentication request. This can be call in the time between Transaction::webflow-start returned TRUE, and Transaction::webflow-done is emitted. It will cancel the ongoing authentication operation.
This is useful for example if you're showing an authenticaion window with a browser, but the user closed it before it was finished.
The function takes the following parameters:
- id: webflow id, as passed into the webflow-start signal.
func (*Transaction) AddDefaultDependencySources ¶
func (self *Transaction) AddDefaultDependencySources()
AddDefaultDependencySources: similar to flatpak_transaction_add_dependency_source(), but adds all the default installations, which means all the defined system-wide (but not per-user) installations.
func (*Transaction) AddDependencySource ¶
func (self *Transaction) AddDependencySource(installation *Installation)
AddDependencySource adds an extra installation as a source for application dependencies. This means that applications can be installed in this transaction relying on runtimes from this additional installation (whereas it would normally install required runtimes that are not installed in the installation the transaction works on).
Also see flatpak_transaction_add_default_dependency_sources().
The function takes the following parameters:
- installation: Installation.
func (*Transaction) AddInstall ¶
func (self *Transaction) AddInstall(remote, ref string, subpaths []string) error
AddInstall adds installing the given ref to this transaction.
The remote can either be a configured remote of the installation, or a file:// uri pointing at a local repository to install from, in which case an origin remote is created.
The function takes the following parameters:
- remote: name of the remote.
- ref: ref.
- subpaths (optional) to install, or the empty list or NULL to pull all subpaths.
func (*Transaction) AddInstallBundle ¶
func (self *Transaction) AddInstallBundle(file gio.Filer, gpgData *glib.Bytes) error
AddInstallBundle adds installing the given bundle to this transaction.
The function takes the following parameters:
- file that is an flatpak bundle.
- gpgData (optional): GPG key with which to check bundle signatures, or NULL to use the key embedded in the bundle (if any).
func (*Transaction) AddInstallFlatpakref ¶
func (self *Transaction) AddInstallFlatpakref(flatpakrefData *glib.Bytes) error
AddInstallFlatpakref adds installing the given flatpakref to this transaction.
The function takes the following parameters:
- flatpakrefData: data from a flatpakref file.
func (*Transaction) AddSideloadRepo ¶
func (self *Transaction) AddSideloadRepo(path string)
AddSideloadRepo adds an extra local ostree repo as source for installation. This is equivalent to using the sideload-repos directories (see flatpak(1)), but can be done dynamically. Any path added here is used in addition to ones in those directories.
The function takes the following parameters:
- path to a local flatpak repository.
func (*Transaction) AddUninstall ¶
func (self *Transaction) AddUninstall(ref string) error
AddUninstall adds uninstalling the given ref to this transaction.
The function takes the following parameters:
- ref: ref.
func (*Transaction) AddUpdate ¶
func (self *Transaction) AddUpdate(ref string, subpaths []string, commit string) error
AddUpdate adds updating the given ref to this transaction.
The function takes the following parameters:
- ref: ref.
- subpaths (optional) to install; NULL to use the current set plus the set of configured languages, or { NULL } or { "", NULL } to pull all subpaths.
- commit (optional) to update to, or NULL to use the latest.
func (*Transaction) CompleteBasicAuth ¶
func (self *Transaction) CompleteBasicAuth(id uint, user, password string, options *glib.Variant)
CompleteBasicAuth finishes (or aborts) an ongoing basic auth request.
The function takes the following parameters:
- id: webflow id, as passed into the webflow-start signal.
- user name, or NULL if aborting request.
- password: password.
- options: extra a{sv] variant with options (or NULL), currently unused.
func (*Transaction) ConnectAddNewRemote ¶
func (self *Transaction) ConnectAddNewRemote(f func(reason TransactionRemoteReason, fromId, suggestedRemoteName, url string) (ok bool)) externglib.SignalHandle
ConnectAddNewRemote signal gets emitted if, as part of the transaction, it is required or recommended that a new remote is added, for the reason described in reason.
func (*Transaction) ConnectBasicAuthStart ¶
func (self *Transaction) ConnectBasicAuthStart(f func(remote, realm string, options *glib.Variant, id int) (ok bool)) externglib.SignalHandle
ConnectBasicAuthStart signal gets emitted when a basic user/password authentication is needed during the operation. If the caller handles this it should ask the user for the user and password and return TRUE. Once the information is gathered call flatpak_transaction_complete_basic_auth() with it.
If the client does not support basic auth then return FALSE from this signal (or don't implement it). This will abort the authentication and likely result in the transaction failing (unless the authentication was somehow optional).
func (*Transaction) ConnectEndOfLifed ¶
func (self *Transaction) ConnectEndOfLifed(f func(ref, reason, rebase string)) externglib.SignalHandle
ConnectEndOfLifed signal gets emitted when a ref is found to be marked as end-of-life during the execution of the transaction.
func (*Transaction) ConnectInstallAuthenticator ¶
func (self *Transaction) ConnectInstallAuthenticator(f func(remote, authenticatorRef string)) externglib.SignalHandle
ConnectInstallAuthenticator signal gets emitted if, as part of resolving the transaction, we need to use an authenticator, but the authentication is not installed, but is available to be installed from the ref.
The application can handle this signal, and if so create another transaction to install the authenticator.
The default handler does nothing, and if the authenticator is not installed when the signal handler fails the transaction will error out.
func (*Transaction) ConnectNewOperation ¶
func (self *Transaction) ConnectNewOperation(f func(operation *TransactionOperation, progress *TransactionProgress)) externglib.SignalHandle
ConnectNewOperation signal gets emitted during the execution of the transaction when a new operation is beginning.
func (*Transaction) ConnectOperationDone ¶
func (self *Transaction) ConnectOperationDone(f func(operation *TransactionOperation, commit string, result TransactionResult)) externglib.SignalHandle
ConnectOperationDone signal gets emitted during the execution of the transaction when an operation is finished.
func (*Transaction) ConnectOperationError ¶
func (self *Transaction) ConnectOperationError(f func(operation *TransactionOperation, err error, details TransactionErrorDetails) (ok bool)) externglib.SignalHandle
ConnectOperationError signal gets emitted when an error occurs during the execution of the transaction.
func (*Transaction) ConnectReady ¶
func (self *Transaction) ConnectReady(f func() (ok bool)) externglib.SignalHandle
ConnectReady signal is emitted when all the refs involved in the operation have been resolved to commits, and the required authentication for all ops is gotten. At this point flatpak_transaction_get_operations() will return all the operations that will be executed as part of the transaction.
func (*Transaction) ConnectReadyPreAuth ¶
func (self *Transaction) ConnectReadyPreAuth(f func() (ok bool)) externglib.SignalHandle
ConnectReadyPreAuth signal is emitted when all the refs involved in the transaction have been resolved to commits, but we might not necessarily have asked for authenticaion for all their required operations. This is very similar to the ::ready signal, and you can chose which one (or both) to use depending on how you want to handle authentication in your user interface.
At this point flatpak_transaction_get_operations() will return all the operations that will be executed as part of the transaction. You can call flatpak_transaction_operation_get_requires_authentication() to see which will require authentication.
func (*Transaction) ConnectWebflowDone ¶
func (self *Transaction) ConnectWebflowDone(f func(options *glib.Variant, id int)) externglib.SignalHandle
ConnectWebflowDone signal gets emitted when the authentication finished the webflow, independent of the reason and results. If you for were showing a web-browser window it can now be closed.
func (*Transaction) ConnectWebflowStart ¶
func (self *Transaction) ConnectWebflowStart(f func(remote, url string, options *glib.Variant, id int) (ok bool)) externglib.SignalHandle
ConnectWebflowStart signal gets emitted when some kind of user authentication is needed during the operation. If the caller handles this it should show the url in a webbrowser and return TRUE. This will eventually cause the webbrowser to finish the authentication operation and operation will continue, as signaled by the webflow-done being emitted.
If the client does not support webflow then return FALSE from this signal (or don't implement it). This will abort the authentication and likely result in the transaction failing (unless the authentication was somehow optional).
During the time between webflow-start and webflow-done the client can call flatpak_transaction_abort_webflow() to manually abort the authentication. This is useful if the user aborted the authentication operation some way, like e.g. closing the browser window.
func (*Transaction) CurrentOperation ¶
func (self *Transaction) CurrentOperation() *TransactionOperation
CurrentOperation gets the current operation.
The function returns the following values:
- transactionOperation: current TransactionOperation.
func (*Transaction) IncludeUnusedUninstallOps ¶
func (self *Transaction) IncludeUnusedUninstallOps() bool
IncludeUnusedUninstallOps gets the value set by flatpak_transaction_set_include_unused_uninstall_ops().
The function returns the following values:
- ok: TRUE if include_unused_uninstall_ops is set, FALSE otherwise.
func (*Transaction) Installation ¶
func (self *Transaction) Installation() *Installation
Installation gets the installation this transaction was created for.
The function returns the following values:
- installation: Installation.
func (*Transaction) IsEmpty ¶
func (self *Transaction) IsEmpty() bool
IsEmpty returns whether the transaction contains any non-skipped operations.
The function returns the following values:
- ok: TRUE if the transaction is empty.
func (*Transaction) NoDeploy ¶
func (self *Transaction) NoDeploy() bool
NoDeploy gets whether the transaction is only downloading updates, and not deploying them.
The function returns the following values:
- ok: TRUE if no_deploy is set, FALSE otherwise.
func (*Transaction) NoPull ¶
func (self *Transaction) NoPull() bool
NoPull gets whether the transaction should operate only on locally available data.
The function returns the following values:
- ok: TRUE if no_pull is set, FALSE otherwise.
func (*Transaction) Operations ¶
func (self *Transaction) Operations() []*TransactionOperation
Operations gets the list of operations. Skipped operations are not included. The order of the list is the order in which the operations are executed.
The function returns the following values:
- list of operations.
func (*Transaction) ParentWindow ¶
func (self *Transaction) ParentWindow() string
ParentWindow gets the parent window set for this transaction, or NULL if unset. See flatpak_transaction_get_parent_window().
The function returns the following values:
- utf8: window name, or NULL.
func (*Transaction) Run ¶
func (transaction *Transaction) Run(ctx context.Context) error
Run executes the transaction.
During the course of the execution, various signals will get emitted. The FlatpakTransaction::choose-remote-for-ref and Transaction::add-new-remote signals may get emitted while resolving operations. Transaction::ready is emitted when the transaction has been fully resolved, and Transaction::new-operation and Transaction::operation-done are emitted while the operations are carried out. If an error occurs at any point during the execution, Transaction::operation-error is emitted.
Note that this call blocks until the transaction is done.
The function takes the following parameters:
- ctx (optional): #GCancellable.
func (*Transaction) SetDefaultArch ¶
func (self *Transaction) SetDefaultArch(arch string)
SetDefaultArch sets the architecture to default to where it is unspecified.
The function takes the following parameters:
- arch to make default.
func (*Transaction) SetDisableAutoPIN ¶
func (self *Transaction) SetDisableAutoPIN(disablePin bool)
SetDisableAutoPIN: normally the transaction pins any explicit installations so they will not be automatically removed. But this can be disabled if you don't want this behaviour.
The function takes the following parameters:
- disablePin: whether to disable auto-pinning.
func (*Transaction) SetDisableDependencies ¶
func (self *Transaction) SetDisableDependencies(disableDependencies bool)
SetDisableDependencies sets whether the transaction should ignore runtime dependencies when resolving operations for applications.
The function takes the following parameters:
- disableDependencies: whether to disable runtime dependencies.
func (*Transaction) SetDisablePrune ¶
func (self *Transaction) SetDisablePrune(disablePrune bool)
SetDisablePrune sets whether the transaction should avoid pruning the local OSTree repository after updating.
The function takes the following parameters:
- disablePrune: whether to avoid pruning.
func (*Transaction) SetDisableRelated ¶
func (self *Transaction) SetDisableRelated(disableRelated bool)
SetDisableRelated sets whether the transaction should avoid adding related refs when resolving operations. Related refs are extensions that are suggested by apps, such as locales.
The function takes the following parameters:
- disableRelated: whether to avoid adding related refs.
func (*Transaction) SetDisableStaticDeltas ¶
func (self *Transaction) SetDisableStaticDeltas(disableStaticDeltas bool)
SetDisableStaticDeltas sets whether the transaction should avoid using static deltas when pulling.
The function takes the following parameters:
- disableStaticDeltas: whether to avoid static deltas.
func (*Transaction) SetForceUninstall ¶
func (self *Transaction) SetForceUninstall(forceUninstall bool)
SetForceUninstall sets whether the transaction should uninstall files even if they're used by a running application.
The function takes the following parameters:
- forceUninstall: whether to force-uninstall refs.
func (*Transaction) SetIncludeUnusedUninstallOps ¶
func (self *Transaction) SetIncludeUnusedUninstallOps(includeUnusedUninstallOps bool)
SetIncludeUnusedUninstallOps: when this is set to TRUE, Flatpak will add uninstall operations to the transaction for each runtime it considers unused. This is used by the "update" CLI command to garbage collect runtimes and free disk space.
No guarantees are made about the exact hueristic used; e.g. only end-of-life unused runtimes may be uninstalled with this set. To see the full list of unused runtimes in an installation, use flatpak_installation_list_unused_refs().
The function takes the following parameters:
- includeUnusedUninstallOps: whether to include unused uninstall ops.
func (*Transaction) SetNoDeploy ¶
func (self *Transaction) SetNoDeploy(noDeploy bool)
SetNoDeploy sets whether the transaction should download updates, but not deploy them.
The function takes the following parameters:
- noDeploy: whether to avoid deploying.
func (*Transaction) SetNoInteraction ¶
func (self *Transaction) SetNoInteraction(noInteraction bool)
SetNoInteraction: this method can be used to prevent interactive authorization dialogs to appear for operations on self. This is useful for background operations that are not directly triggered by a user action.
By default, the setting from the parent Installation is used.
The function takes the following parameters:
- noInteraction: whether to disallow interactive authorization for operations.
func (*Transaction) SetNoPull ¶
func (self *Transaction) SetNoPull(noPull bool)
SetNoPull sets whether the transaction should operate only on locally available data.
The function takes the following parameters:
- noPull: whether to avoid pulls.
func (*Transaction) SetParentWindow ¶
func (self *Transaction) SetParentWindow(parentWindow string)
SetParentWindow sets the parent window (if any) to use for any UI show by this transaction. This is used by authenticators if they need to interact with the user during authentication.
The format of this string depends on the display system in use, and is the same as used by xdg-desktop-portal.
On X11 it should be of the form x11:$xid where $xid is the hex version of the xwindows id.
On wayland is should be wayland:$handle where handle is gotten by using the export call of the xdg-foreign-unstable wayland extension.
The function takes the following parameters:
- parentWindow: whether to avoid pulls.
func (*Transaction) SetReinstall ¶
func (self *Transaction) SetReinstall(reinstall bool)
SetReinstall sets whether the transaction should uninstall first if a ref is already installed.
The function takes the following parameters:
- reinstall: whether to reinstall refs.
type TransactionErrorDetails ¶
TransactionErrorDetails details for Transaction::operation-error.
const ( // TransactionErrorDetailsNonFatal: operation failure was not fatal. TransactionErrorDetailsNonFatal TransactionErrorDetails = 0b1 )
func (TransactionErrorDetails) Has ¶
func (t TransactionErrorDetails) Has(other TransactionErrorDetails) bool
Has returns true if t contains other.
func (TransactionErrorDetails) String ¶
func (t TransactionErrorDetails) String() string
String returns the names in string for TransactionErrorDetails.
type TransactionOperation ¶
type TransactionOperation struct { *externglib.Object // contains filtered or unexported fields }
func (*TransactionOperation) BundlePath ¶
func (self *TransactionOperation) BundlePath() *gio.File
BundlePath gets the path to the bundle.
The function returns the following values:
- file: bundle #GFile or NULL.
func (*TransactionOperation) Commit ¶
func (self *TransactionOperation) Commit() string
Commit gets the commit ID for the operation.
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- utf8: commit ID.
func (*TransactionOperation) DownloadSize ¶
func (self *TransactionOperation) DownloadSize() uint64
DownloadSize gets the maximum download size for the operation.
Note that this does not include the size of dependencies, and the actual download may be smaller, if some of the data is already available locally.
For uninstall operations, this returns 0.
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- guint64: download size, in bytes.
func (*TransactionOperation) InstalledSize ¶
func (self *TransactionOperation) InstalledSize() uint64
InstalledSize gets the installed size for the operation.
Note that even for a new install, the extra space required on disk may be smaller than this number, if some of the data is already available locally.
For uninstall operations, this returns 0.
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- guint64: installed size, in bytes.
func (*TransactionOperation) IsSkipped ¶
func (self *TransactionOperation) IsSkipped() bool
IsSkipped gets whether this operation will be skipped when the transaction is run. Operations are skipped in some transaction situations, for example when an app has reached end of life and needs a rebase, or when it would have been updated but no update is available. By default, skipped operations are not returned by flatpak_transaction_get_operations() — but they can be accessed by traversing the operation graph using flatpak_transaction_operation_get_related_to_ops().
The function returns the following values:
- ok: TRUE if the operation has been marked as to skip, FALSE otherwise.
func (*TransactionOperation) Metadata ¶
func (self *TransactionOperation) Metadata() *glib.KeyFile
Metadata gets the metadata that will be applicable when the operation is done.
This can be compared to the current metadata returned by flatpak_transaction_operation_get_old_metadata() to find new required permissions and similar changes.
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- keyFile: metadata File.
func (*TransactionOperation) OldMetadata ¶
func (self *TransactionOperation) OldMetadata() *glib.KeyFile
OldMetadata gets the metadata current metadata for the ref that self works on. Also see flatpak_transaction_operation_get_metadata().
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- keyFile: old metadata File.
func (*TransactionOperation) OperationType ¶
func (self *TransactionOperation) OperationType() TransactionOperationType
OperationType gets the type of the operation.
The function returns the following values:
- transactionOperationType: type of operation, as TransactionOperationType.
func (*TransactionOperation) Remote ¶
func (self *TransactionOperation) Remote() string
Remote gets the remote that the operation applies to.
The function returns the following values:
- utf8: remote.
func (*TransactionOperation) RequiresAuthentication ¶
func (self *TransactionOperation) RequiresAuthentication() bool
RequiresAuthentication gets whether the given operation will require authentication to acquire needed tokens. See also the documentation for Transaction::ready-pre-auth.
The function returns the following values:
- ok: whether self requires authentication.
func (*TransactionOperation) Subpaths ¶
func (self *TransactionOperation) Subpaths() []string
Subpaths gets the set of subpaths that will be pulled from this ref.
Some refs are only partially installed, such as translations. These are subset by the toplevel directory (typically by translation name). The subset to install can be specified at install time, but is otherwise decided based on configurations and things like the current locale and how the app was previously installed.
If there is no subsetting active, this will always return NULL (even though some other APIs also take an empty string to mean no subsetting).
This information is available when the transaction is resolved, i.e. when Transaction::ready is emitted.
The function returns the following values:
- utf8s: set of subpaths that will be pulled, or NULL if no subsetting.
type TransactionOperationOverrider ¶
type TransactionOperationOverrider interface { }
TransactionOperationOverrider contains methods that are overridable.
type TransactionOperationType ¶
TransactionOperationType: type of a TransactionOperation.
const ( // TransactionOperationInstall: install a ref from a remote. TransactionOperationInstall TransactionOperationType = iota // TransactionOperationUpdate: update an installed ref. TransactionOperationUpdate // TransactionOperationInstallBundle: install a bundle from a file. TransactionOperationInstallBundle // TransactionOperationUninstall: uninstall a ref. TransactionOperationUninstall // TransactionOperationLastType: (currently) last operation type. TransactionOperationLastType )
func (TransactionOperationType) String ¶
func (t TransactionOperationType) String() string
String returns the name in string for TransactionOperationType.
type TransactionOverrider ¶
type TransactionOverrider interface { // The function takes the following parameters: // // - reason // - fromId // - remoteName // - url // // The function returns the following values: // AddNewRemote(reason TransactionRemoteReason, fromId, remoteName, url string) bool // The function takes the following parameters: // // - remote // - realm // - options // - id // // The function returns the following values: // BasicAuthStart(remote, realm string, options *glib.Variant, id uint) bool // The function takes the following parameters: // // - ref // - reason // - rebase // EndOfLifed(ref, reason, rebase string) // The function takes the following parameters: // // - remote // - authenticatorRef // InstallAuthenticator(remote, authenticatorRef string) // The function takes the following parameters: // // - operation // - progress // NewOperation(operation *TransactionOperation, progress *TransactionProgress) // The function takes the following parameters: // // - operation // - commit // - details // OperationDone(operation *TransactionOperation, commit string, details TransactionResult) // The function takes the following parameters: // // - operation // - err // - detail // // The function returns the following values: // OperationError(operation *TransactionOperation, err error, detail TransactionErrorDetails) bool // The function returns the following values: // Ready() bool // The function returns the following values: // ReadyPreAuth() bool // Run executes the transaction. // // During the course of the execution, various signals will get emitted. The // FlatpakTransaction::choose-remote-for-ref and Transaction::add-new-remote // signals may get emitted while resolving operations. Transaction::ready is // emitted when the transaction has been fully resolved, and // Transaction::new-operation and Transaction::operation-done are emitted // while the operations are carried out. If an error occurs at any point // during the execution, Transaction::operation-error is emitted. // // Note that this call blocks until the transaction is done. // // The function takes the following parameters: // // - ctx (optional): #GCancellable. // Run(ctx context.Context) error // The function takes the following parameters: // // - options // - id // WebflowDone(options *glib.Variant, id uint) // The function takes the following parameters: // // - remote // - url // - options // - id // // The function returns the following values: // WebflowStart(remote, url string, options *glib.Variant, id uint) bool }
TransactionOverrider contains methods that are overridable.
type TransactionProgress ¶
type TransactionProgress struct { *externglib.Object // contains filtered or unexported fields }
func (*TransactionProgress) BytesTransferred ¶
func (self *TransactionProgress) BytesTransferred() uint64
BytesTransferred gets the number of bytes that have been transferred.
The function returns the following values:
- guint64: number of bytes transferred.
func (*TransactionProgress) ConnectChanged ¶
func (self *TransactionProgress) ConnectChanged(f func()) externglib.SignalHandle
ConnectChanged is emitted when some detail of the progress object changes, you can call the various methods to get the current status.
func (*TransactionProgress) IsEstimating ¶
func (self *TransactionProgress) IsEstimating() bool
IsEstimating gets whether the progress is currently estimating.
The function returns the following values:
- ok: whether we're estimating.
func (*TransactionProgress) Progress ¶
func (self *TransactionProgress) Progress() int
Progress gets the current progress.
The function returns the following values:
- gint: current progress, as an integer between 0 and 100.
func (*TransactionProgress) SetUpdateFrequency ¶
func (self *TransactionProgress) SetUpdateFrequency(updateInterval uint)
SetUpdateFrequency sets how often progress should be updated.
The function takes the following parameters:
- updateInterval: update interval, in milliseconds.
func (*TransactionProgress) StartTime ¶
func (self *TransactionProgress) StartTime() uint64
StartTime gets the time at which this operation has started, as monotonic time.
The function returns the following values:
- guint64: start time.
func (*TransactionProgress) Status ¶
func (self *TransactionProgress) Status() string
Status gets the current status string.
The function returns the following values:
- utf8: current status.
type TransactionProgressOverrider ¶
type TransactionProgressOverrider interface { }
TransactionProgressOverrider contains methods that are overridable.
type TransactionRemoteReason ¶
TransactionRemoteReason: reason for Transaction::add-new-remote.
const ( // TransactionRemoteGenericRepo: remote specified in the flatpakref has // other apps too. TransactionRemoteGenericRepo TransactionRemoteReason = iota // TransactionRemoteRuntimeDeps: remote has runtimes needed for the app. TransactionRemoteRuntimeDeps )
func (TransactionRemoteReason) String ¶
func (t TransactionRemoteReason) String() string
String returns the name in string for TransactionRemoteReason.
type TransactionResult ¶
TransactionResult details for Transaction::operation-done.
const ( // TransactionResultNoChange: update caused no changes. TransactionResultNoChange TransactionResult = 0b1 )
func (TransactionResult) Has ¶
func (t TransactionResult) Has(other TransactionResult) bool
Has returns true if t contains other.
func (TransactionResult) String ¶
func (t TransactionResult) String() string
String returns the names in string for TransactionResult.
type UninstallFlags ¶
UninstallFlags flags to alter the behavior of flatpak_installation_uninstall_full().
const ( // UninstallFlagsNone: default. UninstallFlagsNone UninstallFlags = 0b0 // UninstallFlagsNoPrune: don't prune the local OSTree repository after // uninstalling. UninstallFlagsNoPrune UninstallFlags = 0b1 // UninstallFlagsNoTriggers: don't call triggers after uninstalling. If // used, the caller must later call flatpak_installation_run_triggers() to // update the exported file. (Since: 1.0.3). UninstallFlagsNoTriggers UninstallFlags = 0b10 )
func (UninstallFlags) Has ¶
func (u UninstallFlags) Has(other UninstallFlags) bool
Has returns true if u contains other.
func (UninstallFlags) String ¶
func (u UninstallFlags) String() string
String returns the names in string for UninstallFlags.
type UpdateFlags ¶
UpdateFlags flags to alter the behavior of flatpak_installation_update().
const ( // UpdateFlagsNone: fetch remote builds and install the latest one // (default). UpdateFlagsNone UpdateFlags = 0b0 // UpdateFlagsNoDeploy: don't install any new builds that might be fetched. UpdateFlagsNoDeploy UpdateFlags = 0b1 // UpdateFlagsNoPull: don't try to fetch new builds from the remote repo. UpdateFlagsNoPull UpdateFlags = 0b10 // UpdateFlagsNoStaticDeltas: don't use static deltas when pulling. UpdateFlagsNoStaticDeltas UpdateFlags = 0b100 // UpdateFlagsNoPrune: don't prune the local OSTree repository after // updating (Since: 0.11.8). UpdateFlagsNoPrune UpdateFlags = 0b1000 // UpdateFlagsNoTriggers: don't call triggers after updating. If used, the // caller must later call flatpak_installation_run_triggers() to update the // exported files. (Since: 1.0.3). UpdateFlagsNoTriggers UpdateFlags = 0b10000 )
func (UpdateFlags) Has ¶
func (u UpdateFlags) Has(other UpdateFlags) bool
Has returns true if u contains other.
func (UpdateFlags) String ¶
func (u UpdateFlags) String() string
String returns the names in string for UpdateFlags.