Package-level declarations

Types

Link copied to clipboard
class CsafLoader(engine: <Error class: unknown class> = defaultHttpClientEngine())

A helper class with async functions to retrieve certain kinds of CSAF-related data.

Link copied to clipboard
data class ResultCompat<T>(result: Result<T>)

This class is a compatibility wrapper around Result for Java.

Link copied to clipboard
open class RetrievalContext

This RetrievalContext holds all the necessary information that is needed to validate a validatable object. According to the requirements in the specification we probably need access to the following information:

Link copied to clipboard
class RetrievalException(message: String, cause: Throwable)
Link copied to clipboard
data class RetrievedAggregator(val json: Aggregator) : Validatable

This class represents a wrapper around a Aggregator document, that provides functionality for parsing the metadata about an aggregator from a location, including validation according to the specification.

Link copied to clipboard
data class RetrievedDocument(val json: Csaf, val url: String)

This class represents a wrapper around a Csaf document, that provides functionality for fetching a document from a location, including validation according to the specification.

Link copied to clipboard
data class RetrievedProvider(val json: Provider) : Validatable

This class represents a "retrieved" provider (i.e., the roles "publisher", "provider" and "trusted provider"), including its metadata (in the form of Provider) as well as functionality to retrieve its documents.

Link copied to clipboard
interface Validatable

Properties

Link copied to clipboard
val CSAF_ENTRY_REGEX: <Error class: unknown class>

Functions

Link copied to clipboard
expect fun defaultHttpClientEngine(): <Error class: unknown class>

This function needs to be implemented by each platform to provide a platform-specific HttpClientEngine for ktor.

actual fun defaultHttpClientEngine(): <Error class: unknown class>
Link copied to clipboard

A callback that can be used to set RetrievalContext.json.

Link copied to clipboard
suspend fun <T, R> Iterable<T>.mapAsync(transformation: suspend (T) -> R): List<R>

An async replacement for Iterable.map(), which processes all elements in parallel using coroutines. The function preserves the order of the Iterable it is applied on.

Link copied to clipboard
suspend fun <T> <Error class: unknown class>.of(supplier: suspend () -> T): <Error class: unknown class><T>

A helper function to asynchronously obtain a Result from a code block that may succeed or throw a Throwable. Upon success, the resulting value of the code block will be return as a successful Result. Upon error, the thrown Throwable will be wrapped into the returned Result instead.

Link copied to clipboard
fun RetrievalContext?.responseCallback(): (<Error class: unknown class>) -> Unit

A callback that can be used to set RetrievalContext.httpResponse.