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 `yaml:"port"` GitHub struct { WebhookSecretTokens []string `yaml:"webhook_secret_tokens"` } `yaml:"github"` PubSub struct { ProjectName string `yaml:"project_name"` Topic string `yaml:"topic"` PrivateKeyPath string `yaml:"private_key_path"` } `yaml:"pubsub"` Metrics struct { SentryDSN string `yaml:"sentry_dsn"` DatadogAPIKey string `yaml:"datadog_api_key"` Environment string `yaml:"environment"` } `yaml:"metrics"` 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"` }
func LoadIngestorConfig ¶
func LoadIngestorConfig(bs []byte) (*IngestorConfig, error)
func (*IngestorConfig) IsSentryConfigured ¶
func (c *IngestorConfig) IsSentryConfigured() bool
func (*IngestorConfig) Validate ¶
func (c *IngestorConfig) Validate() []error
type IngestorOpts ¶
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.