Documentation
¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MapToUppercase(vs []string) []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func ValidateCSVMapStr(csvStr string, m mapStrStruct) bool
- type OrchestraInfo
- type OrchestraVersion
Constants ¶
const AccountsTable string = "accounts"
AccountsTable stores account information
const ActiveProbesTable string = "active_probes"
ActiveProbesTable stores the active probe metadata
const CollectorsTable string = "collectors"
CollectorsTable stores collector information
const CountriesTable string = "countries"
CountriesTable stores country information
const JobAlertsTable string = "job_alerts"
JobAlertsTable stores metadata about alert type jobs
const JobTasksTable string = "job_tasks"
JobTasksTable stores metadata abou task type jobs
const JobsTable string = "jobs"
JobsTable stores the jobs scheduled
const ProbeUpdatesTable string = "probe_updates"
ProbeUpdatesTable stores every update message from probes
const TasksTable string = "tasks"
TasksTable stores metadata about task
const TestHelpersTable string = "test_helpers"
TestHelpersTable stores the test helper information
const URLCategoriesTable string = "url_categories"
URLCategoriesTable stores the URL category code information
const URLsTable string = "urls"
URLsTable stores URL information
Variables ¶
var ( // CommitHash contains the current Git revision. Use make to build to make // sure this gets set. CommitHash string // BuildDate contains the date of the current build. BuildDate string )
var AllCategoryCodes = mapStrStruct{"ALDR": {}, "REL": {}, "PORN": {},
"PROV": {}, "POLR": {}, "HUMR": {}, "ENV": {}, "MILX": {},
"HATE": {}, "NEWS": {}, "XED": {}, "PUBH": {}, "GMB": {},
"ANON": {}, "DATE": {}, "GRP": {}, "LGBT": {}, "FILE": {},
"HACK": {}, "COMT": {}, "MMED": {}, "HOST": {}, "SRCH": {},
"GAME": {}, "CULTR": {}, "ECON": {}, "GOVT": {}, "COMM": {},
"CTRL": {}, "IGO": {}, "MISC": {}}
AllCategoryCodes The list of all the supported category codes from the citizenlab test-list. See: https://github.com/citizenlab/test-lists/blob/master/lists/00-LEGEND-new_category_codes.csv
var AllCountryCodes = mapStrStruct{}/* 245 elements not displayed */
AllCountryCodes Official ISO 3166-2 alpha 2 country codes (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) We also use the user-assignable ZZ and XX country codes to indicate "Unknown country" and "All countries" respectively .
var CurrentOrchestraVersion = OrchestraVersion{
Major: 0,
Minor: 3,
Patch: 2,
Suffix: "",
}
CurrentOrchestraVersion is the current version of orchestra. Remember to change this before making a release
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetNames ¶
func AssetNames() []string
AssetNames returns the names of the assets. nolint: deadcode
func MapToUppercase ¶
MapToUppercase returns the list with all the strings uppercased
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables. nolint: deadcode
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func ValidateCSVMapStr ¶
ValidateCSVMapStr Check if a CSV map string contains all values inside of a target mapStrStruct
Types ¶
type OrchestraInfo ¶
OrchestraInfo contains information for the current orchestra build
type OrchestraVersion ¶
OrchestraVersion contains the version information for orchestra
func (OrchestraVersion) String ¶
func (v OrchestraVersion) String() string