Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close()
- func (c *Client) GetClientEndpoints(opts map[string]interface{}) ([]*ClientEndpoint, error)
- func (c *Client) Info()
- func (c *Client) SetHost(s string) error
- func (c *Client) SetPort(p int) error
- func (c *Client) SetProtocol(s string) error
- func (c *Client) SetTenantName(s string) error
- func (c *Client) SetToken(s string) error
- func (c *Client) SetValidateServerCertificate() error
- type ClientEndpoint
- type ClientEndpointResponse
- type Event
- type Host
- type User
Constants ¶
const ReceiverDataLimit int64 = 1e6
ReceiverDataLimit is the limit of data in bytes the client will read from a server.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an instance of Proofpoint API client.
func (*Client) GetClientEndpoints ¶
func (c *Client) GetClientEndpoints(opts map[string]interface{}) ([]*ClientEndpoint, error)
GetClientEndpoints returns a list of ClientEndpoint instances.
func (*Client) Info ¶
func (c *Client) Info()
Info sends information about Client to the configured logger.
func (*Client) SetProtocol ¶
SetProtocol sets the protocol for the API calls.
func (*Client) SetTenantName ¶
SetTenantName sets API tenant name.
func (*Client) SetValidateServerCertificate ¶
SetValidateServerCertificate instructs the client to enforce the validation of certificates and check certificate errors.
type ClientEndpoint ¶
type ClientEndpoint struct { ID string `json:"_id,omitempty"` DeviceID string `json:"device_id,omitempty"` InstallTimestamp float64 `json:"client_install_time,omitempty"` Version string `json:"client_version,omitempty"` Users []*User `json:"users,omitempty"` HostInfo *Host `json:"host_info,omitempty"` LastEvent *Event `json:"last_event,omitempty"` }
ClientEndpoint is a compute endpoint.
func (*ClientEndpoint) ToJSONString ¶
func (c *ClientEndpoint) ToJSONString() (string, error)
ToJSONString serializes ClientEndpoint to a string.
func (*ClientEndpoint) UnmarshalJSON ¶
func (c *ClientEndpoint) UnmarshalJSON(b []byte) error
UnmarshalJSON unpacks byte array into ClientEndpoint.
type ClientEndpointResponse ¶
type ClientEndpointResponse struct { Status string `json:"success,omitempty"` Message string `json:"msg,omitempty"` ClientEndpoints []*ClientEndpoint `json:"data,omitempty"` }
ClientEndpointResponse is response from clients API endpoint.
type Event ¶
type Event struct { Actor string `json:"actor,omitempty"` Name string `json:"event,omitempty"` NpaStatus string `json:"npa_status,omitempty"` Status string `json:"status,omitempty"` Timestamp float64 `json:"timestamp,omitempty"` }
Event is an event and its attributes.
type Host ¶
type Host struct { DeviceMake string `json:"device_make,omitempty"` DeviceModel string `json:"device_model,omitempty"` Hostname string `json:"hostname,omitempty"` ManagementID string `json:"managementID,omitempty"` OperatingSystemName string `json:"os,omitempty"` OperatingSystemVersion string `json:"os_version,omitempty"` NsDeviceUID string `json:"nsdeviceuid,omitempty"` }
Host is a host with its attributes.
type User ¶
type User struct { ID string `json:"_id,omitempty"` DeviceClassificationStatus string `json:"device_classification_status,omitempty"` LastEvent *Event OrganizationUnit string `json:"organization_unit,omitempty"` AddedTimestamp float64 `json:"user_added_time,omitempty"` Groups []string `json:"user_groups,omitempty"` Source string `json:"user_source,omitempty"` Key string `json:"userkey,omitempty"` Username string `json:"username,omitempty"` }
User is a user with its attributes.