Listen for events and forward to external security scanning services.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

syslog_mock_test.go 440B

123456789101112131415161718192021222324
  1. package main
  2. import "log"
  3. type SyslogTestActions struct {
  4. savedLogs []string
  5. }
  6. func (s *SyslogTestActions) Connect() error {
  7. return nil
  8. }
  9. func (s *SyslogTestActions) Info(writeMe string) {
  10. log.Printf("FAKE SYSLOG LINE: %s\n", writeMe)
  11. s.savedLogs = append(s.savedLogs, writeMe)
  12. }
  13. func (s *SyslogTestActions) GetLogs() []string {
  14. return s.savedLogs
  15. }
  16. func connectFakeSyslog() *SyslogTestActions {
  17. return new(SyslogTestActions)
  18. }