Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
func LoadCertificate(certPath, keyPath, password string) (tls.Certificate, error)
Types ¶
type IngestorConfig ¶
type IngestorConfig struct { Port uint16 `short:"p" long:"port" description:"the port to listen on" default:"8080" env:"PORT" value-name:"PORT" yaml:"port"` GitHub IngestorGitHub `group:"GitHub Options" yaml:"github"` PubSub IngestorPubSub `group:"PubSub Options" yaml:"pubsub"` Metrics IngestorMetrics `group:"Metrics Options" yaml:"metrics"` }
func LoadIngestorConfig ¶
func LoadIngestorConfig(bs []byte) (*IngestorConfig, error)
func (*IngestorConfig) IsSentryConfigured ¶
func (c *IngestorConfig) IsSentryConfigured() bool
func (*IngestorConfig) Merge ¶
func (c *IngestorConfig) Merge(other *IngestorConfig) error
func (*IngestorConfig) Validate ¶
func (c *IngestorConfig) Validate() []error
type IngestorGitHub ¶
type IngestorGitHub struct {
WebhookSecretTokens []string `` /* 184-byte string literal not displayed */
}
type IngestorMetrics ¶
type IngestorMetrics struct { SentryDSN string `long:"sentry-dsn" description:"DSN to emit to Sentry with" env:"SENTRY_DSN" value-name:"DSN" yaml:"sentry_dsn"` DatadogAPIKey string `long:"datadog-api-key" description:"key to emit to datadog" env:"DATADOG_API_KEY" value-name:"KEY" yaml:"datadog_api_key"` Environment string `` /* 137-byte string literal not displayed */ }
type IngestorOpts ¶
type IngestorOpts struct { ConfigFile cmdflag.FileFlag `long:"config-file" description:"path to config file" value-name:"PATH"` *IngestorConfig }
type IngestorPubSub ¶
type IngestorPubSub struct { ProjectName string `long:"pubsub-project-name" description:"GCP Project Name" value-name:"NAME" yaml:"project_name"` Topic string `long:"pubsub-topic" description:"PubSub Topic to send message to" value-name:"NAME" yaml:"topic"` PrivateKeyPath cmdflag.FileFlag `` /* 128-byte string literal not displayed */ }
type WorkerConfig ¶
type WorkerConfig struct { WorkDir string `yaml:"work_dir"` RepositoryDiscoveryInterval time.Duration `yaml:"repository_discovery_interval"` CredentialCounterInterval time.Duration `yaml:"credential_counter_interval"` Whitelist []string `yaml:"whitelist"` GitHub struct { AccessToken string `yaml:"access_token"` PrivateKeyPath string `yaml:"private_key_path"` PublicKeyPath string `yaml:"public_key_path"` } `yaml:"github"` PubSub struct { ProjectName string `yaml:"project_name"` PublicKeyPath string `yaml:"public_key_path"` FetchHint struct { Subscription string `yaml:"subscription"` } `yaml:"fetch_hint"` } `yaml:"pubsub"` Metrics struct { SentryDSN string `yaml:"sentry_dsn"` DatadogAPIKey string `yaml:"datadog_api_key"` Environment string `yaml:"environment"` } `yaml:"metrics"` Slack struct { DefaultURL string `yaml:"default_webhook_url"` DefaultChannel string `yaml:"default_channel"` TeamURLs map[string]string `yaml:"team_webhook_urls"` } `yaml:"slack"` MySQL struct { Username string `yaml:"username"` Password string `yaml:"password"` Hostname string `yaml:"hostname"` Port uint16 `yaml:"port"` DBName string `yaml:"db_name"` } `yaml:"mysql"` Identity struct { CACertificatePath string `yaml:"ca_certificate_path"` CertificatePath string `yaml:"certificate_path"` PrivateKeyPath string `yaml:"private_key_path"` PrivateKeyPassphrase string `yaml:"private_key_passphrase"` } `yaml:"identity"` API struct { BindIP string `yaml:"bind_ip"` BindPort uint16 `yaml:"bind_port"` } `yaml:"rpc_server"` Rolodex struct { ServerAddress string `yaml:"server_address"` ServerPort uint16 `yaml:"server_port"` } `yaml:"rolodex"` }
func LoadWorkerConfig ¶
func LoadWorkerConfig(bs []byte) (*WorkerConfig, error)
func (*WorkerConfig) Validate ¶
func (c *WorkerConfig) Validate() []error
type WorkerOpts ¶
Click to show internal directories.
Click to hide internal directories.