utils

package
v3.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ResultTimestamp = "2006-01-02T150405.999999999Z0700"

ResultTimestamp is a windows friendly timestamp

Variables

This section is empty.

Functions

func AssetsDir

func AssetsDir(home string) string

AssetsDir returns the assets data dir for the given OONI Home

func ConfigPath

func ConfigPath(home string) string

ConfigPath returns the default path to the config file

func DBDir

func DBDir(home string, name string) string

DBDir returns the database dir for the given name

func DidLegacyInformedConsent

func DidLegacyInformedConsent() bool

DidLegacyInformedConsent checks if the user did the informed consent procedure in probe-legacy

func EngineDir

func EngineDir(home string) string

EngineDir returns the directory where ooni/probe-engine should store its private data given a specific OONI Home.

func EscapeAwareRuneCountInString

func EscapeAwareRuneCountInString(s string) int

EscapeAwareRuneCountInString counts the number of runes in a string taking into account escape sequences.

func Fatal

func Fatal(err error)

Fatal error

func FileExists

func FileExists(path string) bool

FileExists returns true if the specified path exists and is a regular file.

func GetOONIHome

func GetOONIHome() (string, error)

GetOONIHome returns the path to the OONI Home

func Log

func Log(msg string, v ...interface{})

Log outputs a log message.

func MakeResultsDir

func MakeResultsDir(home string, name string, ts time.Time) (string, error)

MakeResultsDir creates and returns a directory for the result

func RequiredDirs

func RequiredDirs(home string) []string

RequiredDirs returns the required ooni home directories

func RightPad

func RightPad(str string, length int) string

RightPad adds right padding in from of a string

func TunnelDir added in v3.10.0

func TunnelDir(home string) string

TunnelDir returns the directory where to store tunnels state

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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