SnapdAssertion

SnapdAssertion — Assertions

Functions

Properties

gchar * content Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── SnapdAssertion

Includes

#include <snapd-glib/snapd-glib.h>

Description

A SnapdAssertion represents an digitally signed documents that express a fact or policy by a particular authority about a particular object in the snap universe. Assertions can be queried using snapd_client_get_assertions_sync().

Functions

snapd_assertion_new ()

SnapdAssertion *
snapd_assertion_new (const gchar *content);

Create a new assertion.

Parameters

content

the text content of the assertion.

 

Returns

a new SnapdAssertion


snapd_assertion_get_header ()

gchar *
snapd_assertion_get_header (SnapdAssertion *assertion,
                            const gchar *name);

Get a header from an assertion.

Parameters

assertion

a SnapdAssertion.

 

name

name of the header.

 

Returns

header value or NULL if undefined.

[transfer full][allow-none]


snapd_assertion_get_headers ()

gchar **
snapd_assertion_get_headers (SnapdAssertion *assertion);

Get the headers provided by this assertion.

Parameters

assertion

a SnapdAssertion.

 

Returns

array of header names.

[transfer full][array zero-terminated=1]


snapd_assertion_get_body ()

gchar *
snapd_assertion_get_body (SnapdAssertion *assertion);

Get the body of the assertion.

Parameters

assertion

a SnapdAssertion.

 

Returns

assertion body or NULL.

[transfer full][allow-none]


snapd_assertion_get_signature ()

gchar *
snapd_assertion_get_signature (SnapdAssertion *assertion);

Get the signature of the assertion.

Parameters

assertion

a SnapdAssertion.

 

Returns

assertion signature.

Types and Values

SnapdAssertion

typedef struct _SnapdAssertion SnapdAssertion;

SnapdAssertion is an opaque data structure and can only be accessed using the provided functions.

Property Details

The “content” property

  “content”                  gchar *

Assertion content.

Flags: Read / Write / Construct Only

Default value: NULL