Jcat.Item¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Jcat.Item(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(id)¶
- Parameters:
id (
str
) – An item ID, typically a file basename- Returns:
- Return type:
Creates a new item.
New in version 0.1.0.
- add_alias_id(id)¶
- Parameters:
id (
str
) – An item ID alias, typically a file basename
Adds an item alias ID. Alias IDs are matched when using functions such as
Jcat.File.get_item_by_id
().New in version 0.1.1.
- add_blob(blob)¶
-
Adds a new blob to the item.
New in version 0.1.0.
- get_alias_ids()¶
- Returns:
array
- Return type:
[
str
]
Gets the list of alias IDs.
New in version 0.1.1.
- get_blob_by_kind(kind)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
- Raises:
- Returns:
a blob, or
None
- Return type:
Gets the item blobs by a specific kind.
New in version 0.2.0.
- get_blobs()¶
- Returns:
blobs
- Return type:
Gets all the blobs for this item.
New in version 0.1.0.
- get_blobs_by_kind(kind)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
- Returns:
blobs
- Return type:
Gets the item blobs by a specific kind.
New in version 0.1.0.
- has_target()¶
-
Finds out if any of the blobs are targeting an internal checksum. If this returns with success then the caller might be able to use functions like
Jcat.Context.verify_target
() supplying some target checksums.New in version 0.2.0.