collection

package
Version: v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

package collection provides GO structs meant to be used to build PAN-OS XML API payloads with xml.Marshal() as well as structs meant to be used to parse PAN-OS XML API responses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	XMLName xml.Name `xml:"response"`
	Status  string   `xml:"status,attr"`
	Result  *struct {
		UidResponse *UIDResponse `xml:"uid-response"`
	} `xml:"result,omitempty"`
	Msg *struct {
		Line []struct {
			UidResponse *UIDResponse `xml:"uid-response"`
		} `xml:"line"`
	} `xml:"msg,omitempty"`
}

APIResponse is the placeholder for a PAN-OS XML API Response

type UIDMessage

type UIDMessage struct {
	XMLName xml.Name       `xml:"uid-message"`
	Type    string         `xml:"type"`
	Payload *UIDMsgPayload `xml:"payload"`
	Version string         `xml:"version"`
}

UIDMessage is the main placeholder for a PAN-OS XML API UserID message

type UIDMsgPayload

type UIDMsgPayload struct {
	XMLName        xml.Name              `xml:"payload"`
	Register       *UIDMsgPldDAGRegUnreg `xml:"register,omitempty"`
	Unregister     *UIDMsgPldDAGRegUnreg `xml:"unregister,omitempty"`
	RegisterUser   *UIDMsgPldDUGRegUnreg `xml:"register-user,omitempty"`
	UnregisterUser *UIDMsgPldDUGRegUnreg `xml:"unregister-user,omitempty"`
	Login          *UIDMsgPldLogInOut    `xml:"login,omitempty"`
	Logout         *UIDMsgPldLogInOut    `xml:"logout,omitempty"`
}

UIDMsgPayload contains data for different PAN-OS XML API UserID operations

type UIDMsgPldDAGEntry

type UIDMsgPldDAGEntry struct {
	Tag        UIDMsgPldDxGEntryTag `xml:"tag"`
	IP         string               `xml:"ip,attr"`
	Persistent string               `xml:"persistent,attr,omitempty"`
}

UIDMsgPldDAGEntry contains data for a single Dynamic Address Group operation

type UIDMsgPldDAGRegUnreg

type UIDMsgPldDAGRegUnreg struct {
	Entry []UIDMsgPldDAGEntry `xml:"entry"`
}
UIDMsgPldDAGRegUnreg is the list of entries for a UserID Dynamic Address Group (register / unregister) operation

Example User-ID DAG payload

<uid-message> <type>update</type> <payload>

<register>
<entry ip="10.10.10.10">
	<tag>
	<member timeout="10">tag10</member>
	</tag>
</entry>
</register>

</payload> </uid-message>

type UIDMsgPldDUGEntry

type UIDMsgPldDUGEntry struct {
	Tag  UIDMsgPldDxGEntryTag `xml:"tag"`
	User string               `xml:"user,attr"`
}

UIDMsgPldDUGEntry contains data for a single Dynamic User Group operation

type UIDMsgPldDUGRegUnreg

type UIDMsgPldDUGRegUnreg struct {
	Entry []UIDMsgPldDUGEntry `xml:"entry"`
}
UIDMsgPldDUGRegUnreg is the list of entries for a UserID Dynamic User Group (register / unregister) operation

Example User-ID DUG payload

<uid-message>

<type>update</type>
<payload>
	<login>
		<entry name="armis-1.1.1.1" ip="1.1.1.1" timeout="60">
		</entry>
	</login>
	<register-user>
		<entry user="armis-1.1.1.1">
		<tag>
			<member>tag30</member>
		</tag>
		</entry>
	</register-user>
</payload>

</uid-message>

type UIDMsgPldDxGEnrtryTagMember

type UIDMsgPldDxGEnrtryTagMember struct {
	Member  string  `xml:",chardata"`
	Timeout *string `xml:"timeout,attr,omitempty"`
}

UIDMsgPldDxGEnrtryTagMember data for a single tag operation

type UIDMsgPldDxGEntryTag

type UIDMsgPldDxGEntryTag struct {
	Member []UIDMsgPldDxGEnrtryTagMember `xml:"member"`
}

UIDMsgPldDxGEntryTag contains the list of tags for a DAG or DUG operation

type UIDMsgPldLogEntry

type UIDMsgPldLogEntry struct {
	Name    string  `xml:"name,attr"`
	IP      string  `xml:"ip,attr"`
	Timeout *string `xml:"timeout,attr,omitempty"`
}

UIDMsgPldLogEntry contains data for a single login / logout operation

type UIDMsgPldLogInOut

type UIDMsgPldLogInOut struct {
	Entry []UIDMsgPldLogEntry `xml:"entry"`
}

UIDMsgPldLogInOut is the list of entries for a UserID login or logout operation

type UIDResponse

type UIDResponse struct {
	Version string `xml:"version"`
	Payload struct {
		Unregister *struct {
			Entry []UIDResponseEntry `xml:"entry"`
		} `xml:"unregister"`
		Register *struct {
			Entry []UIDResponseEntry `xml:"entry"`
		} `xml:"register"`
	} `xml:"payload"`
}

UIDResponse is the placeholder for a PAN-OS XML UserID API Response

type UIDResponseEntry

type UIDResponseEntry struct {
	IP  string `xml:"ip,attr"`
	Msg string `xml:"message,attr"`
}

UIDResponseEntry is a PAN-OS XML UserID API Response item

Source Files

Jump to

Keyboard shortcuts

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