Documentation ¶
Index ¶
- func LoadCertificate(cert []byte, key []byte, password string) (tls.Certificate, error)
- func LoadCertificateFromFiles(certPath, keyPath, password string) (tls.Certificate, error)
- func LoadCertificatePool(certs ...[]byte) (*x509.CertPool, error)
- func LoadCertificatePoolFromFiles(certPaths ...string) (*x509.CertPool, error)
- type APIConfig
- type APIOpts
- type IngestorConfig
- type IngestorOpts
- type WorkerConfig
- type WorkerOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
LoadCertificate returns a TLS certificate from the provided certificate and key, decoding with the password if provided
func LoadCertificateFromFiles ¶
func LoadCertificateFromFiles(certPath, keyPath, password string) (tls.Certificate, error)
LoadCertificateFromFiles returns a TLS certificate from the provided paths to certificate and key, decoding with the password if provided
Types ¶
type APIConfig ¶
type APIConfig struct { Metrics struct { SentryDSN string `yaml:"sentry_dsn"` Environment string `yaml:"environment"` HoneycombWriteKey string `yaml:"honeycomb_write_key"` } `yaml:"metrics"` MySQL struct { Username string `yaml:"username"` Password string `yaml:"password"` Hostname string `yaml:"hostname"` Port uint16 `yaml:"port"` DBName string `yaml:"db_name"` ServerName string `yaml:"server_name"` CACertificatePath string `yaml:"ca_certificate_path"` CertificatePath string `yaml:"certificate_path"` PrivateKeyPath string `yaml:"private_key_path"` PrivateKeyPassphrase string `yaml:"private_key_passphrase"` } `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"` }
func LoadAPIConfig ¶
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"` HoneycombWriteKey string `yaml:"honeycomb_write_key"` } `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"` CredentialCounterInterval time.Duration `yaml:"credential_counter_interval"` Whitelist []string `yaml:"whitelist"` GitPath string `yaml:"git_path"` GitHub struct { AccessToken string `yaml:"access_token"` PrivateKeyPath string `yaml:"private_key_path"` PublicKeyPath string `yaml:"public_key_path"` } `yaml:"github"` RepositoryDiscovery struct { Interval time.Duration `yaml:"interval"` Organizations []string `yaml:"organizations"` Users []string `yaml:"users"` } `yaml:"repository_discovery"` PubSub struct { ProjectName string `yaml:"project_name"` PublicKeyPath string `yaml:"public_key_path"` FetchHint struct { Subscription string `yaml:"subscription"` } `yaml:"fetch_hint"` } `yaml:"pubsub"` Trace struct { ProjectName string `yaml:"project_name"` } `yaml:"trace"` Metrics struct { SentryDSN string `yaml:"sentry_dsn"` DatadogAPIKey string `yaml:"datadog_api_key"` Environment string `yaml:"environment"` HoneycombWriteKey string `yaml:"honeycomb_write_key"` } `yaml:"metrics"` Slack struct { DefaultURL string `yaml:"default_webhook_url"` DefaultPublicChannel string `yaml:"default_public_channel"` DefaultPrivateChannel string `yaml:"default_private_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"` ServerName string `yaml:"server_name"` CACertificatePath string `yaml:"ca_certificate_path"` CertificatePath string `yaml:"certificate_path"` PrivateKeyPath string `yaml:"private_key_path"` PrivateKeyPassphrase string `yaml:"private_key_passphrase"` } `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 { 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.