gi-ostree-1.0.5: OSTree bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.OSTree.Functions

Contents

Description

 

Synopsis

Methods

checkVersion

checkVersion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

requiredYear: Major/year required

-> Word32

requiredRelease: Release version required

-> m Bool

Returns: True if current libostree has at least the requested version, False otherwise

No description available in the introspection data.

checksumB64FromBytes

checksumB64FromBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

csum: An binary checksum of length 32

-> m Text

Returns: Modified base64 encoding of csum

The "modified" term refers to the fact that instead of '/', the '_' character is used.

No description available in the introspection data.

checksumB64ToBytes

checksumB64ToBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: An ASCII checksum

-> m ByteString

Returns: Binary version of checksum.

No description available in the introspection data.

checksumBytesPeek

checksumBytesPeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

bytes: GVariant of type ay

-> m ByteString

Returns: Binary checksum data in bytes; do not free. If bytes does not have the correct length, return Nothing.

No description available in the introspection data.

checksumBytesPeekValidate

checksumBytesPeekValidate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

bytes: GVariant of type ay

-> m ByteString

Returns: Binary checksum data (Can throw GError)

Like checksumBytesPeek, but also throws error.

checksumFile

checksumFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) 
=> a

f: File path

-> ObjectType

objtype: Object type

-> Maybe b

cancellable: Cancellable

-> m ByteString

(Can throw GError)

Compute the OSTree checksum for a given file.

checksumFileAsync

checksumFileAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) 
=> a

f: File path

-> ObjectType

objtype: Object type

-> Int32

ioPriority: Priority for operation, see G_IO_PRIORITY_DEFAULT

-> Maybe b

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Invoked when operation is complete

-> m () 

Asynchronously compute the OSTree checksum for a given file; complete with checksumFileAsyncFinish.

checksumFileAsyncFinish

checksumFileAsyncFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) 
=> a

f: File path

-> b

result: Async result

-> m ByteString

(Can throw GError)

Finish computing the OSTree checksum for a given file; see checksumFileAsync.

checksumFileFromInput

checksumFileFromInput Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileInfo a, IsInputStream b, IsCancellable c) 
=> a

fileInfo: File information

-> Maybe GVariant

xattrs: Optional extended attributes

-> Maybe b

in: File content, should be Nothing for symbolic links

-> ObjectType

objtype: Object type

-> Maybe c

cancellable: Cancellable

-> m ByteString

(Can throw GError)

Compute the OSTree checksum for a given input.

checksumFromBytes

checksumFromBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

csum: An binary checksum of length 32

-> m Text

Returns: String form of csum

No description available in the introspection data.

checksumFromBytesV

checksumFromBytesV Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

csumV: GVariant of type ay

-> m Text

Returns: String form of csumBytes

No description available in the introspection data.

checksumInplaceToBytes

checksumInplaceToBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: a SHA256 string

-> Word8

buf: Output buffer with at least 32 bytes of space

-> m () 

Convert checksum from a string to binary in-place, without allocating memory. Use this function in hot code paths.

checksumToBytes

checksumToBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: An ASCII checksum

-> m ByteString

Returns: Binary checksum from checksum of length 32; free with free.

No description available in the introspection data.

checksumToBytesV

checksumToBytesV Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: An ASCII checksum

-> m GVariant

Returns: New GVariant of type ay with length 32

No description available in the introspection data.

cmd_Private #method:cmd_Private#

cmd_Private__ :: (HasCallStack, MonadIO m) => m CmdPrivateVTable Source #

No description available in the introspection data.

cmpChecksumBytes

cmpChecksumBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word8

a: A binary checksum

-> Word8

b: A binary checksum

-> m Int32 

Compare two binary checksums, using memcmp().

commitGetParent

commitGetParent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

commitVariant: Variant of type ObjectTypeCommit

-> m Text

Returns: Checksum of the parent commit of commitVariant, or Nothing if none

No description available in the introspection data.

commitGetTimestamp

commitGetTimestamp :: (HasCallStack, MonadIO m) => GVariant -> m Word64 Source #

No description available in the introspection data.

contentFileParse

contentFileParse Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) 
=> Bool

compressed: Whether or not the stream is zlib-compressed

-> a

contentPath: Path to file containing content

-> Bool

trusted: If True, assume the content has been validated

-> Maybe b

cancellable: Cancellable

-> m (InputStream, FileInfo, GVariant)

(Can throw GError)

A thin wrapper for contentStreamParse; this function converts an object content stream back into components.

contentFileParseAt

contentFileParseAt Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> Bool

compressed: Whether or not the stream is zlib-compressed

-> Int32

parentDfd: Directory file descriptor

-> Text

path: Subpath

-> Bool

trusted: If True, assume the content has been validated

-> Maybe a

cancellable: Cancellable

-> m (InputStream, FileInfo, GVariant)

(Can throw GError)

A thin wrapper for contentStreamParse; this function converts an object content stream back into components.

contentStreamParse

contentStreamParse Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) 
=> Bool

compressed: Whether or not the stream is zlib-compressed

-> a

input: Object content stream

-> Word64

inputLength: Length of stream

-> Bool

trusted: If True, assume the content has been validated

-> Maybe b

cancellable: Cancellable

-> m (InputStream, FileInfo, GVariant)

(Can throw GError)

The reverse of rawFileToContentStream; this function converts an object content stream back into components.

createDirectoryMetadata

createDirectoryMetadata Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileInfo a) 
=> a

dirInfo: a FileInfo containing directory information

-> Maybe GVariant

xattrs: Optional extended attributes

-> m GVariant

Returns: A new GVariant containing ObjectTypeDirMeta

No description available in the introspection data.

diffDirs

diffDirs Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) 
=> [DiffFlags]

flags: Flags

-> a

a: First directory path, or Nothing

-> b

b: First directory path

-> [DiffItem]

modified: Modified files

-> [File]

removed: Removed files

-> [File]

added: Added files

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

Compute the difference between directory a and b as 3 separate sets of DiffItem in modified, removed, and added.

diffDirsWithOptions

diffDirsWithOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) 
=> [DiffFlags]

flags: Flags

-> a

a: First directory path, or Nothing

-> b

b: First directory path

-> [DiffItem]

modified: Modified files

-> [File]

removed: Removed files

-> [File]

added: Added files

-> Maybe DiffDirsOptions

options: Options

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

Compute the difference between directory a and b as 3 separate sets of DiffItem in modified, removed, and added.

diffPrint

diffPrint Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsFile b) 
=> a

a: First directory path

-> b

b: First directory path

-> [DiffItem]

modified: Modified files

-> [File]

removed: Removed files

-> [File]

added: Added files

-> m () 

Print the contents of a diff to stdout.

hashObjectName

hashObjectName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ptr ()

a: A GVariant containing a serialized object

-> m Word32 

Use this function with HashTable and objectNameSerialize.

metadataVariantType

metadataVariantType :: (HasCallStack, MonadIO m) => ObjectType -> m VariantType Source #

No description available in the introspection data.

objectFromString

objectFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: An ASCII checksum

-> m (Text, ObjectType) 

objectNameDeserialize

objectNameDeserialize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

variant: A GVariant of type (su)

-> m (Text, ObjectType) 

Reverse objectNameSerialize. Note that outChecksum is only valid for the lifetime of variant, and must not be freed.

objectNameSerialize

objectNameSerialize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: An ASCII checksum

-> ObjectType

objtype: An object type

-> m GVariant

Returns: A new floating GVariant containing checksum string and objtype

No description available in the introspection data.

objectToString

objectToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: An ASCII checksum

-> ObjectType

objtype: Object type

-> m Text

Returns: A string containing both checksum and a stringifed version of objtype

No description available in the introspection data.

objectTypeFromString

objectTypeFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: A stringified version of ObjectType

-> m ObjectType 

The reverse of objectTypeToString.

objectTypeToString

objectTypeToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ObjectType

objtype: an ObjectType

-> m Text 

Serialize objtype to a string; this is used for file extensions.

parseRefspec

parseRefspec Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

refspec: A "refspec" string

-> m (Text, Text)

(Can throw GError)

Split a refspec like "gnome-ostree:gnome-ostree/buildmaster" into two parts; outRemote will be set to "gnome-ostree", and outRef will be "gnome-ostree/buildmaster".

If refspec refers to a local ref, outRemote will be Nothing.

rawFileToArchiveZ2Stream

rawFileToArchiveZ2Stream Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a, IsFileInfo b, IsCancellable c) 
=> a

input: File raw content stream

-> b

fileInfo: A file info

-> Maybe GVariant

xattrs: Optional extended attributes

-> Maybe c

cancellable: Cancellable

-> m InputStream

(Can throw GError)

Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.

rawFileToArchiveZ2StreamWithOptions

rawFileToArchiveZ2StreamWithOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a, IsFileInfo b, IsCancellable c) 
=> a

input: File raw content stream

-> b

fileInfo: A file info

-> Maybe GVariant

xattrs: Optional extended attributes

-> Maybe GVariant

options: A GVariant a{sv} with an extensible set of flags

-> Maybe c

cancellable: Cancellable

-> m InputStream

(Can throw GError)

Like rawFileToArchiveZ2Stream, but supports an extensible set of flags. The following flags are currently defined:

  • compression-level (i): Level of compression to use, 0–9, with 0 being the least compression, and <0 giving the default level (currently 6).

Since: 2017.3

rawFileToContentStream

rawFileToContentStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsInputStream a, IsFileInfo b, IsCancellable c) 
=> a

input: File raw content stream

-> b

fileInfo: A file info

-> Maybe GVariant

xattrs: Optional extended attributes

-> Maybe c

cancellable: Cancellable

-> m (InputStream, Word64)

(Can throw GError)

Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream. This is a fundamental operation for writing data to an Repo.

validateChecksumString

validateChecksumString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

sha256: SHA256 hex string

-> m ()

(Can throw GError)

Use this function to see if input strings are checksums.

validateRemoteName

validateRemoteName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

remoteName: A remote name

-> m ()

(Can throw GError)

No description available in the introspection data.

Since: 2017.8

validateRev

validateRev Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

rev: A revision string

-> m ()

(Can throw GError)

No description available in the introspection data.

validateStructureofChecksumString

validateStructureofChecksumString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

checksum: an ASCII string

-> m ()

(Can throw GError)

No description available in the introspection data.

validateStructureofCommit

validateStructureofCommit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

commit: A commit object, ObjectTypeCommit

-> m ()

(Can throw GError)

Use this to validate the basic structure of commit, independent of any other objects it references.

validateStructureofCsumV

validateStructureofCsumV Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

checksum: a GVariant of type "ay"

-> m ()

(Can throw GError)

No description available in the introspection data.

validateStructureofDirmeta

validateStructureofDirmeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

dirmeta: A dirmeta object, ObjectTypeDirMeta

-> m ()

(Can throw GError)

Use this to validate the basic structure of dirmeta.

validateStructureofDirtree

validateStructureofDirtree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

dirtree: A dirtree object, ObjectTypeDirTree

-> m ()

(Can throw GError)

Use this to validate the basic structure of dirtree, independent of any other objects it references.

validateStructureofFileMode

validateStructureofFileMode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

mode: A Unix filesystem mode

-> m ()

(Can throw GError)

No description available in the introspection data.

validateStructureofObjtype

validateStructureofObjtype Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word8 
-> m ()

(Can throw GError)

No description available in the introspection data.