Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsvHander ¶
type CsvHander struct{}
func (CsvHander) Callback ¶
func (h CsvHander) Callback(commits []commit.CommitEvent)
type DatabaseHandler ¶
func (*DatabaseHandler) Callback ¶
func (dh *DatabaseHandler) Callback(commits []commit.CommitEvent)
type ElasticHandler ¶
type ElasticHandler struct {
RemoteURI string
Username string
Password string
NoDuplicates bool
UseZincAwsS3 bool
}
func (ElasticHandler) Callback ¶
func (e ElasticHandler) Callback(commits []commit.CommitEvent)
func (*ElasticHandler) DoPost ¶
func (e *ElasticHandler) DoPost(path string, data string)
func (*ElasticHandler) Import ¶
func (e *ElasticHandler) Import(commit commit.CommitEvent)
func (*ElasticHandler) ImportBulk ¶
func (e *ElasticHandler) ImportBulk(commits []commit.CommitEvent)
func (*ElasticHandler) Setup ¶
func (e *ElasticHandler) Setup()
type Handler ¶
type Handler interface {
Callback([]commit.CommitEvent)
}
type NoHandler ¶
type NoHandler struct{}
func (NoHandler) Callback ¶
func (n NoHandler) Callback(commits []commit.CommitEvent)
type ScriptHandler ¶
func (ScriptHandler) Callback ¶
func (h ScriptHandler) Callback(commits []commit.CommitEvent)
func (ScriptHandler) Run ¶
func (h ScriptHandler) Run(worker int, commit commit.CommitEvent)
type SlackHandler ¶
func NewSlack ¶
func NewSlack(token string, channelID string) *SlackHandler
func (SlackHandler) Callback ¶
func (s SlackHandler) Callback(commits []commit.CommitEvent)
func (SlackHandler) PostMessage ¶
func (s SlackHandler) PostMessage(commit commit.CommitEvent)
func (SlackHandler) PostTruffle ¶
func (s SlackHandler) PostTruffle(t Truffle)
type Truffle ¶
type Truffle struct {
DetectorName string `json:"DetectorName"`
DetectorType int `json:"DetectorType"`
ExtraData interface{} `json:"ExtraData"`
Raw string `json:"Raw"`
Redacted string `json:"Redacted"`
SourceID int `json:"SourceID"`
SourceMetadata struct {
Data struct {
Github struct {
Commit string `json:"commit"`
Email string `json:"email"`
File string `json:"file"`
Line int `json:"line"`
Link string `json:"link"`
Repository string `json:"repository"`
Timestamp string `json:"timestamp"`
} `json:"Github"`
} `json:"Data"`
} `json:"SourceMetadata"`
SourceName string `json:"SourceName"`
SourceType int `json:"SourceType"`
StructuredData interface{} `json:"StructuredData"`
Verified bool `json:"Verified"`
}
type TruffleHandler ¶
type TruffleHandler struct {
Path string
MaxWorkers int
DroppedCommits uint64
LogFile string
Slack *SlackHandler
GithubToken string
// contains filtered or unexported fields
}
func (*TruffleHandler) Callback ¶
func (h *TruffleHandler) Callback(commits []commit.CommitEvent)
func (*TruffleHandler) Run ¶
func (h *TruffleHandler) Run(worker int, commit commit.CommitEvent)
func (*TruffleHandler) StartWorkers ¶
func (h *TruffleHandler) StartWorkers()
Click to show internal directories.
Click to hide internal directories.