audit

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: ISC Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Admin         string    `xml:"admin"`
	Comment       string    `xml:"comment"`
	ConfigVersion int       `xml:"config_ver"`
	TimeGenerated string    `xml:"time_generated"`
	Time          time.Time `xml:"-"`
}

Comment is a historical audit comment.

The time generated returned from PAN-OS doesn't contain timezone information, so the `TimeGenerated` is being left as a string for now.

func (*Comment) SetTime

func (c *Comment) SetTime(clock time.Time)

SetTime attempts to parse the `TimeGenerated` into a usable time.Time while pulling the timezone information from the system clock.

type CommentHistory

type CommentHistory struct {
	Comments []Comment `xml:"result>log>logs>entry"`
}

CommentHistory is a container for audit comment history.

type GetComment

type GetComment struct {
	XMLName xml.Name `xml:"show"`
	Xpath   string   `xml:"config>list>audit-comments>xpath"`
}

GetComment is a query to get the current audit comment.

type SetComment

type SetComment struct {
	XMLName xml.Name `xml:"set"`
	Xpath   string   `xml:"audit-comment>xpath"`
	Comment string   `xml:"audit-comment>comment"`
}

SetComment is for configuring an audit comment for the given XPATH.

type UncommittedComment

type UncommittedComment struct {
	Comment string `xml:"result>entry>comment"`
}

UncommittedComment is returned when getting the current audit comment for a rule.

Jump to

Keyboard shortcuts

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