package
3.25.0-alpha
Repository: https://github.com/ooni/probe-cli.git
Documentation: pkg.go.dev

# README

Package github.com/ooni/probe-cli/pkg/oonimkall

Package oonimkall implements APIs used by OONI mobile apps. We expose these APIs to mobile apps using gomobile.

We expose two APIs: the task API, which is derived from the API originally exposed by Measurement Kit, and the session API, which is a Go API that mobile apps can use via gomobile.

This package is named oonimkall because it contains a partial reimplementation of the mkall API implemented by Measurement Kit in, e.g., mkall-ios.

The basic tenet of the task API is that you define an experiment task you wanna run using a JSON, then you start a task for it, and you receive events as serialized JSONs. In addition to this functionality, we also include extra APIs used by OONI mobile.

The basic tenet of the session API is that you create an instance of Session and use it to perform the operations you need.

# Functions

NewSession is like NewSessionWithContext but without context.
NewSessionWithContext creates a new session.
NewUUID4 generates a new UUID4 string.
StartTask starts an asynchronous task.

# Variables

These two variables contain metrics pertaining to the number of Sessions and Contexts that are currently being used.
These two variables contain metrics pertaining to the number of Sessions and Contexts that are currently being used.

# Structs

AtomicInt64 allows us to export atomic.Int64 variables to mobile libraries so we can use them in testing.
CheckInConfig contains configuration for the check-in API.
CheckInConfigWebConnectivity contains WebConnectivity configuration for the check-in API.
CheckInInfo contains the result of the check-in API.
CheckInInfoWebConnectivity contains the WebConnectivity specific results of the check-in API call.
Context is the context of an operation.
GeolocateResults contains the results of session.Geolocate.
HTTPRequest is an HTTP request to send.
HTTPResponse is an HTTP response.
Session contains shared state for running experiments and/or other OONI related task (e.g.
SessionConfig contains configuration for a Session.
SubmitMeasurementResults contains the results of a single measurement submission to the OONI backends using the OONI collector API.
Task is an asynchronous task running an experiment.
URLInfo contains info on a specific URL to measure.
WebConnectivityConfig contains settings for WebConnectivity.
WebConnectivityResults contains the results of WebConnectivity.

# Interfaces

ExperimentCallbacks contains experiment callbacks.
Logger is the logger used by a Session.