Documentation ¶
Index ¶
- Constants
- type Bookmark
- type Buffer
- func (b *Buffer) FirstByte() *byte
- func (b *Buffer) ReadBytes(offset uint32) ([]byte, error)
- func (b *Buffer) ReadString(offset uint32) (string, error)
- func (b *Buffer) ReadWideChars(offset uint32) ([]byte, error)
- func (b *Buffer) SizeBytes() uint32
- func (b *Buffer) SizeWide() uint32
- func (b *Buffer) UpdateSizeBytes(size uint32)
- func (b *Buffer) UpdateSizeWide(size uint32)
- type Event
- type EventID
- type EventLogConfig
- type EventLogInput
- type EventXML
- type Provider
- type Publisher
- type Subscription
- type SyscallProc
- type TimeCreated
Constants ¶
const ( // EvtSubscribeToFutureEvents is a flag that will subscribe to only future events. EvtSubscribeToFutureEvents uint32 = 1 // EvtSubscribeStartAtOldestRecord is a flag that will subscribe to all existing and future events. EvtSubscribeStartAtOldestRecord uint32 = 2 // EvtSubscribeStartAfterBookmark is a flag that will subscribe to all events that begin after a bookmark. EvtSubscribeStartAfterBookmark uint32 = 3 )
const ( // ErrorSuccess is an error code that indicates the operation completed successfully. ErrorSuccess syscall.Errno = 0 // ErrorNotSupported is an error code that indicates the operation is not supported. ErrorNotSupported syscall.Errno = 50 // ErrorInsufficientBuffer is an error code that indicates the data area passed to a system call is too small ErrorInsufficientBuffer syscall.Errno = 122 // ErrorNoMoreItems is an error code that indicates no more items are available. ErrorNoMoreItems syscall.Errno = 259 // ErrorInvalidOperation is an error code that indicates the operation identifier is not valid ErrorInvalidOperation syscall.Errno = 4317 )
const ( // EvtRenderEventXML is a flag to render an event as an XML string EvtRenderEventXML uint32 = 1 // EvtRenderBookmark is a flag to render a bookmark as an XML string EvtRenderBookmark uint32 = 2 )
const ( // EvtFormatMessageXML is flag that formats a message as an XML string that contains all event details and message strings. EvtFormatMessageXML uint32 = 9 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bookmark ¶
type Bookmark struct {
// contains filtered or unexported fields
}
Bookmark is a windows event bookmark.
func NewBookmark ¶
func NewBookmark() Bookmark
NewBookmark will create a new bookmark with an empty handle.
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a buffer of utf-16 bytes.
func NewBuffer ¶
func NewBuffer() Buffer
NewBuffer creates a new buffer with the default buffer size
func (*Buffer) ReadBytes ¶
ReadBytes will read UTF-8 bytes from the buffer, where offset is the number of bytes to be read
func (*Buffer) ReadString ¶
ReadString will read a UTF-8 string from the buffer.
func (*Buffer) ReadWideChars ¶ added in v0.22.0
ReadWideChars will read UTF-8 bytes from the buffer, where offset is the number of wchars to read
func (*Buffer) SizeBytes ¶ added in v0.22.0
SizeBytes will return the size of the buffer as number of bytes.
func (*Buffer) SizeWide ¶ added in v0.22.0
SizeWide returns the size of the buffer as number of wchars
func (*Buffer) UpdateSizeBytes ¶ added in v0.22.0
UpdateSizeBytes will update the size of the buffer to fit size bytes.
func (*Buffer) UpdateSizeWide ¶ added in v0.22.0
UpdateSizeWide will update the size of the buffer to fit size wchars.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is an event stored in windows event log.
func (*Event) RenderFormatted ¶
RenderFormatted will render the event as EventXML with formatted info.
type EventLogConfig ¶
type EventLogConfig struct { helper.InputConfig `mapstructure:",squash" yaml:",inline"` Channel string `mapstructure:"channel" json:"channel" yaml:"channel"` MaxReads int `mapstructure:"max_reads,omitempty" json:"max_reads,omitempty" yaml:"max_reads,omitempty"` StartAt string `mapstructure:"start_at,omitempty" json:"start_at,omitempty" yaml:"start_at,omitempty"` PollInterval helper.Duration `mapstructure:"poll_interval,omitempty" json:"poll_interval,omitempty" yaml:"poll_interval,omitempty"` }
EventLogConfig is the configuration of a windows event log operator.
func NewDefaultConfig ¶
func NewDefaultConfig() *EventLogConfig
NewDefaultConfig will return an event log config with default values.
func (*EventLogConfig) Build ¶
func (c *EventLogConfig) Build(context operator.BuildContext) ([]operator.Operator, error)
Build will build a windows event log operator.
type EventLogInput ¶
type EventLogInput struct { helper.InputOperator // contains filtered or unexported fields }
EventLogInput is an operator that creates entries using the windows event log api.
func (*EventLogInput) Start ¶
func (e *EventLogInput) Start(persister operator.Persister) error
Start will start reading events from a subscription.
func (*EventLogInput) Stop ¶
func (e *EventLogInput) Stop() error
Stop will stop reading events from a subscription.
type EventXML ¶
type EventXML struct { EventID EventID `xml:"System>EventID"` Provider Provider `xml:"System>Provider"` Computer string `xml:"System>Computer"` Channel string `xml:"System>Channel"` RecordID uint64 `xml:"System>EventRecordID"` TimeCreated TimeCreated `xml:"System>TimeCreated"` Message string `xml:"RenderingInfo>Message"` Level string `xml:"RenderingInfo>Level"` Task string `xml:"RenderingInfo>Task"` Opcode string `xml:"RenderingInfo>Opcode"` Keywords []string `xml:"RenderingInfo>Keywords>Keyword"` }
EventXML is the rendered xml of an event.
type Provider ¶
type Provider struct { Name string `xml:"Name,attr"` GUID string `xml:"Guid,attr"` EventSourceName string `xml:"EventSourceName,attr"` }
Provider is the provider of the event.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher is a windows event metadata publisher.
func NewPublisher ¶
func NewPublisher() Publisher
NewPublisher will create a new publisher with an empty handle.
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription is a subscription to a windows eventlog channel.
func NewSubscription ¶
func NewSubscription() Subscription
NewSubscription will create a new subscription with an empty handle.
func (*Subscription) Close ¶
func (s *Subscription) Close() error
Close will close the subscription.
type SyscallProc ¶
SyscallProc is a syscall procedure.
type TimeCreated ¶
type TimeCreated struct {
SystemTime string `xml:"SystemTime,attr"`
}
TimeCreated is the creation time of the event.