Documentation ¶
Overview ¶
Package config defines the configuration values for the cron job.
Index ¶
- Constants
- Variables
- func GetAPIResultsBucketURL() (string, error)
- func GetAdditionalParams(subMapName string) (map[string]string, error)
- func GetBigQueryDataset() (string, error)
- func GetBigQueryTable() (string, error)
- func GetBlacklistedChecks() ([]string, error)
- func GetCIIDataBucketURL() (string, error)
- func GetCompletionThreshold() (float64, error)
- func GetCriticalityValues() (map[string]string, error)
- func GetInputBucketPrefix() (string, error)
- func GetInputBucketPrefixFile() (string, error)
- func GetInputBucketURL() (string, error)
- func GetMetricExporter() (string, error)
- func GetMetricStackdriverPrefix() (string, error)
- func GetProjectID() (string, error)
- func GetRawBigQueryTable() (string, error)
- func GetRawResultDataBucketURL() (string, error)
- func GetRequestSubscriptionURL() (string, error)
- func GetRequestTopicURL() (string, error)
- func GetResultDataBucketURL() (string, error)
- func GetScorecardValues() (map[string]string, error)
- func GetShardSize() (int, error)
- func GetWebhookURL() (string, error)
- func ReadConfig() error
Constants ¶
const ( // ShardMetadataFilename file contains metadata for the created shard. ShardMetadataFilename string = ".shard_metadata" // ShardNumFilename is the name of the file that stores the number of shards. ShardNumFilename string = ".shard_num" // TransferStatusFilename file identifies if shard transfer to BigQuery is completed. TransferStatusFilename string = ".transfer_complete" )
Variables ¶
var ( // ErrEmptyConfigValue indicates the value for the configuration option was empty. ErrEmptyConfigValue = errors.New("config value set to empty") // ErrValueConversion indicates an unexpected type was found for the value of the config option. ErrValueConversion = errors.New("unexpected type, cannot convert value") // ErrNoConfig indicates no config file was provided, or flag.Parse() was not called. ErrNoConfig = errors.New("no configuration file provided with --" + configFlag) )
Functions ¶
func GetAPIResultsBucketURL ¶
GetAPIResultsBucketURL returns the bucket URL for storing cron job results.
func GetBigQueryDataset ¶
GetBigQueryDataset returns the BQ dataset name to transfer cron job results.
func GetBigQueryTable ¶
GetBigQueryTable returns the table name to transfer cron job results.
func GetBlacklistedChecks ¶
GetBlacklistedChecks returns a list of checks which are not to be run.
func GetCIIDataBucketURL ¶
GetCIIDataBucketURL returns the bucket URL where CII data is stored.
func GetCompletionThreshold ¶
GetCompletionThreshold returns fraction of shards to be populated before transferring cron job results.
func GetCriticalityValues ¶
GetCriticalityValues() returns a map of key, value pairs containing additional, criticality specific values.
func GetInputBucketPrefix ¶
GetInputBucketPrefix() returns the prefix used when fetching files from a bucket.
func GetInputBucketPrefixFile ¶
GetInputBucketPrefixFile() returns the file whose contents specify the prefix to use.
func GetInputBucketURL ¶
GetInputBucketURL() returns the bucket URL for input files.
func GetMetricExporter ¶
GetMetricExporter returns the opencensus exporter type.
func GetMetricStackdriverPrefix ¶
GetMetricStackdriverPrefix returns the prefix for stackdriver opencensus exporter.
func GetProjectID ¶
GetProjectID returns the cloud projectID for the cron job.
func GetRawBigQueryTable ¶
GetRawBigQueryTable returns the table name to transfer cron job results.
func GetRawResultDataBucketURL ¶
GetRawResultDataBucketURL returns the bucketURL for storing cron job's raw results.
func GetRequestSubscriptionURL ¶
GetRequestSubscriptionURL returns the subscription name of the PubSub topic for cron job requests.
func GetRequestTopicURL ¶
GetRequestTopicURL returns the topic name for sending cron job PubSub requests.
func GetResultDataBucketURL ¶
GetResultDataBucketURL returns the bucketURL for storing cron job results.
func GetScorecardValues ¶
GetScorecardValues() returns a map of key, value pairs containing additional, scorecard specific values.
func GetShardSize ¶
GetShardSize returns the shard_size for the cron job.
func GetWebhookURL ¶
GetWebhookURL returns the webhook URL to ping on a successful cron job completion.
func ReadConfig ¶
func ReadConfig() error
ReadConfig reads the contents of a configuration file specified with --config for later use by getters. This function must be called before any other exported function, and after flag.Parse() is called.
Types ¶
This section is empty.