github.com/crowdsecurity/crowdsec@v1.6.1/pkg/acquisition/modules/wineventlog/wineventlog.go (about)

     1  //go:build !windows
     2  
     3  package wineventlogacquisition
     4  
     5  import (
     6  	"errors"
     7  
     8  	"github.com/prometheus/client_golang/prometheus"
     9  	log "github.com/sirupsen/logrus"
    10  	"gopkg.in/tomb.v2"
    11  
    12  	"github.com/crowdsecurity/crowdsec/pkg/acquisition/configuration"
    13  	"github.com/crowdsecurity/crowdsec/pkg/types"
    14  )
    15  
    16  type WinEventLogSource struct{}
    17  
    18  func (w *WinEventLogSource) GetUuid() string {
    19  	return ""
    20  }
    21  
    22  func (w *WinEventLogSource) UnmarshalConfig(yamlConfig []byte) error {
    23  	return nil
    24  }
    25  
    26  func (w *WinEventLogSource) Configure(yamlConfig []byte, logger *log.Entry, metricsLevel int) error {
    27  	return nil
    28  }
    29  
    30  func (w *WinEventLogSource) ConfigureByDSN(dsn string, labels map[string]string, logger *log.Entry, uuid string) error {
    31  	return nil
    32  }
    33  
    34  func (w *WinEventLogSource) GetMode() string {
    35  	return ""
    36  }
    37  
    38  func (w *WinEventLogSource) SupportedModes() []string {
    39  	return []string{configuration.TAIL_MODE, configuration.CAT_MODE}
    40  }
    41  
    42  func (w *WinEventLogSource) OneShotAcquisition(out chan types.Event, t *tomb.Tomb) error {
    43  	return nil
    44  }
    45  
    46  func (w *WinEventLogSource) GetMetrics() []prometheus.Collector {
    47  	return nil
    48  }
    49  
    50  func (w *WinEventLogSource) GetAggregMetrics() []prometheus.Collector {
    51  	return nil
    52  }
    53  
    54  func (w *WinEventLogSource) GetName() string {
    55  	return "wineventlog"
    56  }
    57  
    58  func (w *WinEventLogSource) CanRun() error {
    59  	return errors.New("windows event log acquisition is only supported on Windows")
    60  }
    61  
    62  func (w *WinEventLogSource) StreamingAcquisition(out chan types.Event, t *tomb.Tomb) error {
    63  	return nil
    64  }
    65  
    66  func (w *WinEventLogSource) Dump() interface{} {
    67  	return w
    68  }