ooni

package module
v0.3.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2019 License: BSD-3-Clause Imports: 14 Imported by: 0

README

OONI Probe CLI

The next generation OONI Probe Command Line Interface.

Development setup

Be sure you have golang >= 1.12. We use Go modules. Make sure you don't have GOPATH set.

Run

./build.sh help

to get information on the supported systems as well as to get instructions on how to install dependencies.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDefaultConfig

func InitDefaultConfig(home string) (*config.Config, error)

InitDefaultConfig reads the config from common locations or creates it if missing.

func MaybeInitializeHome

func MaybeInitializeHome(home string) error

MaybeInitializeHome does the setup for a new OONI Home

Types

type Context

type Context struct {
	Config  *config.Config
	DB      sqlbuilder.Database
	IsBatch bool
	Session *engine.Session

	Home    string
	TempDir string
	// contains filtered or unexported fields
}

Context for OONI Probe

func NewContext

func NewContext(configPath string, homePath string) *Context

NewContext creates a new context instance.

func (*Context) Init

func (c *Context) Init() error

Init the OONI manager

func (*Context) MaybeLocationLookup

func (c *Context) MaybeLocationLookup() error

MaybeLocationLookup will lookup the location of the user unless it's already cached

func (*Context) MaybeOnboarding

func (c *Context) MaybeOnboarding() error

MaybeOnboarding will run the onboarding process only if the informed consent config option is set to false

Directories

Path Synopsis
cmd
ooniprobe command
internal
enginex
Package enginex contains ooni/probe-engine extensions.
Package enginex contains ooni/probe-engine extensions.
log/handlers/cli/progress
Package progress provides a simple terminal progress bar.
Package progress provides a simple terminal progress bar.
im
pkg
gobash module
strcase
Package strcase converts strings to snake_case or CamelCase
Package strcase converts strings to snake_case or CamelCase
Package version contains version information
Package version contains version information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL