windows_events

package module
v0.0.0-...-ef8f27a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 1 Imported by: 0

README

Windows Events for Go

Go Report Card

This library provides a simple interface for receiving Windows Events in Go. The library is purely an abstraction of the Windows Event API (wevtapi.dll) to make calls to the API more Go friendly.

An example of how to use the library can be found in example/main.go

MIT License

Copyright (c) 2017 Liam Haworth

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	XMLName   xml.Name     `xml:"Event"`
	EventData []*EventData `xml:"EventData>Data"`
}

Event represents an Windows Event parsed from XML

func (*Event) FindEventData

func (event *Event) FindEventData(key string) *EventData

FindEventData will lookup the eventData slice to find the first eventData entry that has a matching key

type EventData

type EventData struct {
	Key   string `xml:"Name,attr"`
	Value string `xml:",chardata"`
}

EventData represents a `Data` element found in `EventData` of an Event XML

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL