Documentation
¶
Index ¶
- Constants
- Variables
- func CheckLogSTH(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func GetEntries(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func NewLogMetadata(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func RefreshMetadataForEntries(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- func UpdateCTLogList(qc *que.Client, logger *log.Logger, job *que.Job, tx *pgx.Tx) error
- type CTLog
- type CheckSTHConf
- type GetEntriesConf
- type UpdateDataGovAU
- type UpdateDataGovAUConf
- type UpdateSlack
- type UpdateSlackConf
Constants ¶
View Source
const ( // KeyCheckSTH is the name of the job KeyCheckSTH = "cron_check_sth" // InsecurePrefix can be prepended to the "connect_url" field to indicate that TLS verification should be disabled for a particular URL. // This is used from some older logs that appear to still be up, but have issues with their certificates. InsecurePrefix = "insecure-skip-verify-" )
View Source
const ( KeyGetEntries = "get_entries" KeyUpdateMetadata = "update_metadata" DomainSuffix = ".gov.au" MatchDomain = "gov.au" MaxToRequest = 1024 MaxToUpdate = 1024 )
View Source
const ( KeyUpdateDataGovAU = "update_data_gov_au" KeyBackfillDataGovAU = "backfill_data_gov_au" MaxToBackfill = 256 )
View Source
const ( StateActive = 0 StateIgnore = 1 )
View Source
const ( KeyUpdateLogs = "cron_update_logs" KnownLogsURL = "https://www.gstatic.com/ct/log_list/all_logs_list.json" )
View Source
const (
KeyNewLogMetadata = "new_log_metadata"
)
View Source
const (
KeyUpdateSlack = "cron_slack"
)
Variables ¶
View Source
var ( Jurisdictions = map[string]string{ "TAS": "tas.gov.au", "VIC": "vic.gov.au", "NSW": "nsw.gov.au", "QLD": "qld.gov.au", "WA": "wa.gov.au", "SA": "sa.gov.au", "NT": "nt.gov.au", "ACT": "act.gov.au", } CDNs = map[string]string{ "cloudflaressl": "CloudFlare", "incapsula": "Incapsula", "fastly": "Fastly", "pantheonsite": "PantheonSite", } )
Functions ¶
func CheckLogSTH ¶
CheckLogSTH checks for new entries, and schedules a job to fetch them if needed
func GetEntries ¶
func NewLogMetadata ¶
Types ¶
type CheckSTHConf ¶
type CheckSTHConf struct { // URL is used to lookup the record in the monitored_logs table URL string }
CheckSTHConf is stored in the que_jobs table
type GetEntriesConf ¶
type UpdateDataGovAU ¶
func (*UpdateDataGovAU) BackfillDataGovAU ¶
func (*UpdateDataGovAU) InsertRecords ¶
func (us *UpdateDataGovAU) InsertRecords(logger *log.Logger, recs []*ckanRecord) error
type UpdateDataGovAUConf ¶
type UpdateDataGovAUConf struct {
Data []byte
}
type UpdateSlack ¶
type UpdateSlackConf ¶
Click to show internal directories.
Click to hide internal directories.