Documentation ¶
Index ¶
- func GetIDs[K Zid](obj []K) map[string]int
- func KeyGen(BaseURL string, admin string, pass string, apiKey string) ([]*http.Cookie, error)
- type AllowedUrls
- type AppGroup
- type BlockedUrls
- type Client
- func (c *Client) Activate() error
- func (c *Client) AddDLPDictionary(obj DLPDictionary) (int, error)
- func (c *Client) AddDLPEngine(obj DLPEngine) (int, error)
- func (c *Client) AddDLPNotificationTemplate(entry DLPNotificationTemplate) (int, error)
- func (c *Client) AddDLPRule(item DLPRule) (int, error)
- func (c *Client) AddFwRule(rule FwRule) (int, error)
- func (c *Client) AddIPDstGroup(obj IPDstGroup) (int, error)
- func (c *Client) AddIPSrcGroup(obj IPSrcGroup) (int, error)
- func (c *Client) AddLabel(obj Label) (int, error)
- func (c *Client) AddLocation(obj Location) (int, error)
- func (c *Client) AddService(obj Service) (int, error)
- func (c *Client) AddServiceGroup(obj ServiceGroup) (int, error)
- func (c *Client) AddUrlCat(category UrlCat) (string, error)
- func (c *Client) AddUrlRule(rule UrlRule) (int, error)
- func (c *Client) AddUser(user User) (int, error)
- func (c *Client) DeleteDLPDictionary(id int) error
- func (c *Client) DeleteDLPEngine(id int) error
- func (c *Client) DeleteDLPNotificationTemplate(id int) error
- func (c *Client) DeleteDLPRule(id int) error
- func (c *Client) DeleteFwRule(id int) error
- func (c *Client) DeleteIPDstGroups(id int) error
- func (c *Client) DeleteIPSrcGroups(id int) error
- func (c *Client) DeleteLabel(id int) error
- func (c *Client) DeleteService(id int) error
- func (c *Client) DeleteServiceGroup(id int) error
- func (c *Client) DeleteUrlCat(id string) error
- func (c *Client) DeleteUrlRule(id int) error
- func (c *Client) GetAllowedUrls() (AllowedUrls, error)
- func (c *Client) GetAppGroups() ([]AppGroup, error)
- func (c *Client) GetAuditors() ([]User, error)
- func (c *Client) GetBlockedUrls() (BlockedUrls, error)
- func (c *Client) GetDLPDictionaries() ([]DLPDictionary, error)
- func (c *Client) GetDLPEngines() ([]DLPEngine, error)
- func (c *Client) GetDLPNotificationTemplates() ([]DLPNotificationTemplate, error)
- func (c *Client) GetDLPRules() ([]DLPRule, error)
- func (c *Client) GetDeparments() ([]Department, error)
- func (c *Client) GetFwRules() ([]FwRule, error)
- func (c *Client) GetGroups() ([]UserGroup, error)
- func (c *Client) GetICAPServers() ([]ICAPServer, error)
- func (c *Client) GetIPDstGroups() ([]IPDstGroup, error)
- func (c *Client) GetIPSrcGroups() ([]IPSrcGroup, error)
- func (c *Client) GetLabels() ([]Label, error)
- func (c *Client) GetLocationGroups() ([]LocationGroup, error)
- func (c *Client) GetLocations() ([]Location, error)
- func (c *Client) GetServiceGroups() ([]ServiceGroup, error)
- func (c *Client) GetServices() ([]Service, error)
- func (c *Client) GetSublocations(id int) ([]Location, error)
- func (c *Client) GetTldCats() ([]UrlCat, error)
- func (c *Client) GetUrlCats() ([]UrlCat, error)
- func (c *Client) GetUrlRules() ([]UrlRule, error)
- func (c *Client) GetUser(id int) (User, error)
- func (c *Client) GetUsers() ([]User, error)
- func (c *Client) GetUsersFilter(filter UserFilter) ([]User, error)
- func (c *Client) GetUsersPaged(page int, pageSize int) ([]User, error)
- func (c *Client) RepAllowedUrls(urls AllowedUrls) error
- func (c *Client) RepBlockedUrls(urls BlockedUrls) error
- func (c *Client) SetRetryMax(r int)
- func (c *Client) UpdateDLPDictionary(obj DLPDictionary) error
- func (c *Client) UpdateDLPEngine(obj DLPEngine) error
- func (c *Client) UpdateDLPRule(obj DLPRule) error
- func (c *Client) UpdateFwRule(obj FwRule) error
- func (c *Client) UpdateLocation(obj Location) error
- func (c *Client) UpdateUrlCat(category UrlCat) error
- func (c *Client) UpdateUrlRule(rule UrlRule) error
- func (c *Client) UpdateUser(user User) error
- func (c *Client) UrlLookup(urls []string) ([]UrlLookup, error)
- type DLPDictionary
- type DLPEngine
- type DLPNotificationTemplate
- type DLPRule
- type Department
- type EDMDetails
- type FwRule
- type ICAPServer
- type IDMProfile
- type IPDstGroup
- type IPSrcGroup
- type Label
- type Location
- type LocationGroup
- type NameID
- type Pattern
- type Phrase
- type Service
- type ServiceGroup
- type StartEnd
- type UrlCat
- type UrlLookup
- type UrlRule
- type User
- type UserFilter
- type UserGroup
- type VpnLocation
- type ZDelete
- type ZIAError
- type Zid
- type Zurl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllowedUrls ¶
type AllowedUrls struct {
Urls []string `json:"whitelistUrls"`
}
AllowedUrls parses responses for Allowed urls
func (*AllowedUrls) GetName ¶
func (c *AllowedUrls) GetName() string
func (c AllowedUrls) GetName() returns all the urls in a allowlist
func (*AllowedUrls) GetUrls ¶
func (c *AllowedUrls) GetUrls(f string) []string
func (c Allowed) returns all the urls in a allowlist
func (AllowedUrls) PushItems ¶
func (c AllowedUrls) PushItems(client *Client) error
PushItems pushes all the urls in a allowlist
func (*AllowedUrls) SetUrls ¶
func (c *AllowedUrls) SetUrls(f string, u []string)
SetUrls sets all the urls in a allowlist
func (AllowedUrls) String ¶ added in v0.1.36
func (p AllowedUrls) String() string
String prints the struct in json pretty format
type AppGroup ¶
type AppGroup struct { ID int `json:"id"` Name string `json:"name,omitempty"` NetworkApplications []string `json:"networkApplications"` Description string `json:"description,omitempty"` }
AppGroup parses network application groups
type BlockedUrls ¶
type BlockedUrls struct {
Urls []string `json:"blacklistUrls"`
}
BlockedUrls parses responses for blocked urls
func (*BlockedUrls) GetName ¶
func (c *BlockedUrls) GetName() string
func (c BlockedUrls) GetName() returns all the urls in a blocklist
func (*BlockedUrls) GetUrls ¶
func (c *BlockedUrls) GetUrls(f string) []string
func (c BlockedUrls) returns all the urls in a blocklist
func (BlockedUrls) PushItems ¶
func (c BlockedUrls) PushItems(client *Client) error
PushItems pushes all the urls in a blocklist
func (*BlockedUrls) SetUrls ¶
func (c *BlockedUrls) SetUrls(f string, u []string)
func (c BlockedUrls) sets all the urls in a blocklist
func (BlockedUrls) String ¶ added in v0.1.36
func (p BlockedUrls) String() string
String prints the struct in json pretty format
type Client ¶
Client contains the base url, http client and max number of retries per requests
func NewClient ¶
NewClient returns a client with the auth cookie, default http timeouts and max retries per requests cloud options: zscaler, zscalertwo, zscloud, etc. logger is set to info unless an env variable SLOG is set to DEBUG and st.dout
func NewClientLogger ¶ added in v0.1.39
New client logger creates a new cliente with a custom slog logger
func (*Client) AddDLPDictionary ¶
func (c *Client) AddDLPDictionary(obj DLPDictionary) (int, error)
AddDLPDictionary adds a DLP dictionary and returns the id if created or error
func (*Client) AddDLPEngine ¶ added in v0.1.33
AddDLPEngine adds a DLP engine and returns the id if created or error An additional provisioning ticket needs to be requested for this to work
func (*Client) AddDLPNotificationTemplate ¶
func (c *Client) AddDLPNotificationTemplate(entry DLPNotificationTemplate) (int, error)
AddDLPNotificationTemplates adds a DLP notification template
func (*Client) AddDLPRule ¶
AddDLPRule adds a URL filtering category
func (*Client) AddIPDstGroup ¶
func (c *Client) AddIPDstGroup(obj IPDstGroup) (int, error)
AddIPDstGroups adds a firewall filtering rules
func (*Client) AddIPSrcGroup ¶
func (c *Client) AddIPSrcGroup(obj IPSrcGroup) (int, error)
AddIPSrcGroup adds a firewall filtering rules
func (*Client) AddLocation ¶
AddLocation adds a new location or sublocation and returns the new object ID
func (*Client) AddService ¶
AddService adds a network service and returns the new service ID
func (*Client) AddServiceGroup ¶
func (c *Client) AddServiceGroup(obj ServiceGroup) (int, error)
AddServiceGroup adds a network service group
func (*Client) AddUrlRule ¶
AddUrlRule adds a URL filtering rules
func (*Client) DeleteDLPDictionary ¶ added in v0.1.32
DeleteDLPDictionary deletes a DLP dictionary
func (*Client) DeleteDLPEngine ¶ added in v0.1.35
DeleteDLPEngine deletes dlpEngines
func (*Client) DeleteDLPNotificationTemplate ¶ added in v0.1.35
DeleteDLPNotificationTemplate deletes dlpNotificationTemplates
func (*Client) DeleteDLPRule ¶ added in v0.1.32
DeleteDLPRule deleteds the dlp rules
func (*Client) DeleteFwRule ¶ added in v0.1.32
DeleteFwRule deletes a firewall filtering rule
func (*Client) DeleteIPDstGroups ¶ added in v0.1.35
DeleteIPDstGroups deletes ipDestinationGroups
func (*Client) DeleteIPSrcGroups ¶ added in v0.1.35
DeleteIPSrcGroups deletes ipSourceGroups
func (*Client) DeleteLabel ¶ added in v0.1.35
DeleteLabel deletes ruleLabels
func (*Client) DeleteService ¶ added in v0.1.35
DeleteService deletes networkServices
func (*Client) DeleteServiceGroup ¶ added in v0.1.35
DeleteServiceGroup deletes networkServiceGroups
func (*Client) DeleteUrlCat ¶ added in v0.1.32
DeleteUrlCat deleteds the UrlCat
func (*Client) DeleteUrlRule ¶ added in v0.1.32
UpdateUrlRule updates the user info using the provided user object
func (*Client) GetAllowedUrls ¶
func (c *Client) GetAllowedUrls() (AllowedUrls, error)
GetAllowedUrls gets a list of blocked URLs in Advanced Threat policy
func (*Client) GetAppGroups ¶
GetAppGroups gets a list of network application groups
func (*Client) GetAuditors ¶
GetService gets a list of network service groups
func (*Client) GetBlockedUrls ¶
func (c *Client) GetBlockedUrls() (BlockedUrls, error)
GetBlockedUrls gets a list of blocked URLs in Advanced Threat policy
func (*Client) GetDLPDictionaries ¶
func (c *Client) GetDLPDictionaries() ([]DLPDictionary, error)
GetDLPDictionaries get all the DLP dictionaries
func (*Client) GetDLPEngines ¶
GetDLPEngines get all the DLP engines
func (*Client) GetDLPNotificationTemplates ¶
func (c *Client) GetDLPNotificationTemplates() ([]DLPNotificationTemplate, error)
GetDLPNotificationTemplates get all the DLP notification templates
func (*Client) GetDLPRules ¶
GetDLPEngines get all the DLP engines
func (*Client) GetDeparments ¶
func (c *Client) GetDeparments() ([]Department, error)
GetLocationGroups gets all departments
func (*Client) GetFwRules ¶
GetFwRules gets a list of firewall filtering rules
func (*Client) GetICAPServers ¶
func (c *Client) GetICAPServers() ([]ICAPServer, error)
GetDLPEngines get all the DLP engines
func (*Client) GetIPDstGroups ¶
func (c *Client) GetIPDstGroups() ([]IPDstGroup, error)
GetIPDstGroups gets a list of firewall filtering rules
func (*Client) GetIPSrcGroups ¶
func (c *Client) GetIPSrcGroups() ([]IPSrcGroup, error)
GetIPSrcGroups gets a list of firewall filtering rules
func (*Client) GetLocationGroups ¶
func (c *Client) GetLocationGroups() ([]LocationGroup, error)
GetLocationGroups gets all location groups
func (*Client) GetLocations ¶
GetLocations gets all locations
func (*Client) GetServiceGroups ¶
func (c *Client) GetServiceGroups() ([]ServiceGroup, error)
GetServiceGroups gets a list of network service groups
func (*Client) GetServices ¶
GetService gets a list of network service groups
func (*Client) GetSublocations ¶
GetSublocations gets a list of sublocations from the received location id
func (*Client) GetTldCats ¶ added in v0.1.40
func (*Client) GetUrlCats ¶
GetUrlCats gets a list of all URL filtering category
func (*Client) GetUrlRules ¶
GetUrlRules gets a list of URL filtering rules
func (*Client) GetUsersFilter ¶ added in v0.1.25
func (c *Client) GetUsersFilter(filter UserFilter) ([]User, error)
GetUsersFilter return all the ZIA users matching the filter
func (*Client) GetUsersPaged ¶
GetUsersPaged allows you to request between 100 and 1000 items
func (*Client) RepAllowedUrls ¶
func (c *Client) RepAllowedUrls(urls AllowedUrls) error
RepAllowedUrls replaces current existing allowed list
func (*Client) RepBlockedUrls ¶
func (c *Client) RepBlockedUrls(urls BlockedUrls) error
RepBlockedUrls replaces current existing blocked list
func (*Client) SetRetryMax ¶
SetRetryMax adds a URL filtering rules
func (*Client) UpdateDLPDictionary ¶
func (c *Client) UpdateDLPDictionary(obj DLPDictionary) error
UpdateDLPDictionary updates a dlp dictionary
func (*Client) UpdateDLPEngine ¶ added in v0.1.33
UpdateDLPEngine updates a dlp engine An additional provisioning ticket needs to be requested for this to work
func (*Client) UpdateDLPRule ¶ added in v0.1.32
UpdateDLPRule updates a dlp rule
func (*Client) UpdateFwRule ¶ added in v0.1.32
UpdateFwRule updates a firewall filtering rule
func (*Client) UpdateLocation ¶
Edit updates a new location or sublocation and returns the new object ID
func (*Client) UpdateUrlCat ¶
UpdateUrlCat updates a URL filtering category
func (*Client) UpdateUrlRule ¶ added in v0.1.23
UpdateUrlRule updates the user info using the provided user object
func (*Client) UpdateUser ¶
UpdateUser updates the user info using the provided user object
type DLPDictionary ¶
type DLPDictionary struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` ConfidenceThreshold string `json:"confidenceThreshold,omitempty"` Phrases []Phrase `json:"phrases,omitempty"` CustomPhraseMatchType string `json:"customPhraseMatchType,omitempty"` Patterns []Pattern `json:"patterns,omitempty"` DictionaryType string `json:"dictionaryType,omitempty"` ExactDataMatchDetails []EDMDetails `json:"exactDataMatchDetails,omitempty"` IdmProfileMatchAccuracy []IDMProfile `json:"idmProfileMatchAccuracy,omitempty"` Proximity int `json:"proximity,omitempty"` Custom bool `json:"custom,omitempty"` ProximityLengthEnabled bool `json:"proximityLengthEnabled,omitempty"` }
DLPDictionary holds the DLP dictionaries from ZIA
func (DLPDictionary) Delete ¶ added in v0.1.35
func (u DLPDictionary) Delete(c *Client) error
Delete deletes an object
func (DLPDictionary) GetID ¶
func (u DLPDictionary) GetID() (string, int)
GetID return the name a string and the ID as int
func (DLPDictionary) String ¶ added in v0.1.36
func (p DLPDictionary) String() string
String prints the struct in json pretty format
type DLPEngine ¶
type DLPEngine struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` PredefinedEngineName string `json:"predefinedEngineName,omitempty"` EngineExpression string `json:"engineExpression,omitempty"` CustomDlpEngine bool `json:"customDlpEngine,omitempty"` Description string `json:"description,omitempty"` }
DLPEngine hols dlp engine details
func (DLPEngine) GetDictionaries ¶ added in v0.1.33
GetDictionaries returns dictionary IDs used on an engine
type DLPNotificationTemplate ¶
type DLPNotificationTemplate struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Subject string `json:"subject,omitempty"` AttachContent bool `json:"attachContent,omitempty"` PlainTextMessage string `json:"plainTextMessage,omitempty"` HTMLMessage string `json:"htmlMessage,omitempty"` }
DLPNotificationTemplate hols dlp notification template details
func (DLPNotificationTemplate) GetID ¶
func (u DLPNotificationTemplate) GetID() (string, int)
GetID return the name a string and the ID as int
func (DLPNotificationTemplate) String ¶ added in v0.1.36
func (p DLPNotificationTemplate) String() string
String prints the struct in json pretty format
type DLPRule ¶
type DLPRule struct { ID int `json:"id,omitempty"` Order int `json:"order,omitempty"` Protocols []string `json:"protocols,omitempty"` Rank int `json:"rank,omitempty"` Description string `json:"description,omitempty"` Locations []NameID `json:"locations,omitempty"` LocationGroups []NameID `json:"locationGroups,omitempty"` Groups []NameID `json:"groups,omitempty"` Departments []NameID `json:"departments,omitempty"` Users []NameID `json:"users,omitempty"` URLCategories []NameID `json:"urlCategories,omitempty"` DlpEngines []NameID `json:"dlpEngines,omitempty"` FileTypes []string `json:"fileTypes,omitempty"` CloudApplications []string `json:"cloudApplications,omitempty"` MinSize int `json:"minSize,omitempty"` Action string `json:"action,omitempty"` State string `json:"state,omitempty"` TimeWindows []NameID `json:"timeWindows,omitempty"` Auditor *NameID `json:"auditor,omitempty"` ExternalAuditorEmail string `json:"externalAuditorEmail,omitempty"` NotificationTemplate *NameID `json:"notificationTemplate,omitempty"` MatchOnly bool `json:"matchOnly,omitempty"` LastModifiedTime int `json:"lastModifiedTime,omitempty"` LastModifiedBy *NameID `json:"lastModifiedBy,omitempty"` IcapServer *NameID `json:"icapServer,omitempty"` WithoutContentInspection bool `json:"withoutContentInspection"` Name string `json:"name,omitempty"` Labels []NameID `json:"labels,omitempty"` OcrEnabled bool `json:"ocrEnabled,omitempty"` ExcludedGroups []NameID `json:"excludedGroups,omitempty"` ExcludedDepartments []NameID `json:"excludedDepartments,omitempty"` ExcludedUsers []NameID `json:"excludedUsers,omitempty"` ZscalerIncidentReciever bool `json:"zscalerIncidentReciever,omitempty"` Severity string `json:"severity,omitempty"` SubRules []DLPRule `json:"subRules,omitempty"` ParentRule int `json:"parentRule,omitempty"` }
DLPRule holds a DLP rule information
type Department ¶
type Department struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` IdpID int `json:"idpId,omitempty"` Comments string `json:"comments,omitempty"` Deleted bool `json:"deleted,omitempty"` }
Department parses user departments
func (Department) GetID ¶
func (u Department) GetID() (string, int)
GetID return the name a string and the ID as int
func (Department) String ¶ added in v0.1.36
func (p Department) String() string
String prints the struct in json pretty format
type EDMDetails ¶
type EDMDetails struct { DictionaryEdmMappingID int `json:"dictionaryEdmMappingId,omitempty"` SchemaID int `json:"schemaId,omitempty"` PrimaryField int `json:"primaryField,omitempty"` SecondaryFields []int `json:"secondaryFields,omitempty"` SecondaryFieldMatchOn string `json:"secondaryFieldMatchOn,omitempty"` }
EDMDetails holds EDM details from DLP dictionary
type FwRule ¶
type FwRule struct { ID int `json:"id"` Name string `json:"name"` Order int `json:"order,omitempty"` Rank int `json:"rank,omitempty"` Locations []NameID `json:"locations,omitempty"` LocationGroups []NameID `json:"locationGroups,omitempty"` Departments []NameID `json:"departments,omitempty"` Groups []NameID `json:"groups,omitempty"` Users []NameID `json:"users,omitempty"` TimeWindows []NameID `json:"timeWindows,omitempty"` Action string `json:"action,omitempty"` State string `json:"state,omitempty"` Description string `json:"description,omitempty"` LastModifiedTime int `json:"lastModifiedTime,omitempty"` LastModifiedBy NameID `json:"lastModifiedBy,omitempty"` SrcIps []string `json:"srcIps,omitempty"` SrcIPGroups []NameID `json:"srcIpGroups,omitempty"` DestAddresses []string `json:"destAddresses,omitempty"` DestIPCategories []string `json:"destIpCategories,omitempty"` DestCountries []string `json:"destCountries,omitempty"` DestIPGroups []NameID `json:"destIpGroups,omitempty"` NwServices []NameID `json:"nwServices,omitempty"` NwServiceGroups []NameID `json:"nwServiceGroups,omitempty"` NwApplications []string `json:"nwApplications,omitempty"` NwApplicationGroups []NameID `json:"nwApplicationGroups,omitempty"` AppServices []NameID `json:"appServices,omitempty"` AppServiceGroups []NameID `json:"appServiceGroups,omitempty"` Labels []NameID `json:"labels,omitempty"` DefaultRule bool `json:"defaultRule,omitempty"` Predefined bool `json:"predefined,omitempty"` }
FwRule parses firewall rules
type ICAPServer ¶
type ICAPServer struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Status string `json:"status,omitempty"` }
ICAPServer holds an icap server detail
func (ICAPServer) GetID ¶
func (u ICAPServer) GetID() (string, int)
GetID return the name a string and the ID as int
func (ICAPServer) String ¶ added in v0.1.36
func (p ICAPServer) String() string
String prints the struct in json pretty format
type IDMProfile ¶
type IDMProfile struct { AdpIdmProfile struct { ID int `json:"id,omitempty"` Extensions struct { AdditionalProp1 string `json:"additionalProp1,omitempty"` AdditionalProp2 string `json:"additionalProp2,omitempty"` AdditionalProp3 string `json:"additionalProp3,omitempty"` } `json:"extensions,omitempty"` } `json:"adpIdmProfile,omitempty"` MatchAccuracy string `json:"matchAccuracy,omitempty"` }
IDMProfile holds IDM details from DLP dictionary
type IPDstGroup ¶
type IPDstGroup struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` //Available values : DSTN_IP, DSTN_FQDN, DSTN_DOMAIN, DSTN_OTHER Addresses []string `json:"addresses,omitempty"` Description string `json:"description,omitempty"` IPCategories []string `json:"ipCategories,omitempty"` Countries []string `json:"countries,omitempty"` }
IPDstGroup parses responses for IP destination groups
func (IPDstGroup) Delete ¶ added in v0.1.35
func (u IPDstGroup) Delete(c *Client) error
Delete deletes an object
func (IPDstGroup) String ¶ added in v0.1.36
func (p IPDstGroup) String() string
String prints the struct in json pretty format
type IPSrcGroup ¶
type IPSrcGroup struct { ID int `json:"id"` Name string `json:"name"` IPAddresses []string `json:"ipAddresses"` Description string `json:"description,omitempty"` }
IPSrcGroup parses responses for IP source groups
func (IPSrcGroup) Delete ¶ added in v0.1.35
func (u IPSrcGroup) Delete(c *Client) error
Delete deletes an object
func (IPSrcGroup) String ¶ added in v0.1.36
func (p IPSrcGroup) String() string
String prints the struct in json pretty format
type Label ¶
type Label struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` LastModifiedTime int `json:"lastModifiedTime,omitempty"` LastModifiedBy *NameID `json:"lastModifiedBy,omitempty"` CreatedBy *NameID `json:"createdBy,omitempty"` ReferencedRuleCount int `json:"referencedRuleCount,omitempty"` }
type Location ¶
type Location struct { ID int `json:"id,omitempty"` Name string `json:"name"` ParentID int `json:"parentId,omitempty"` UpBandwidth int `json:"upBandwidth,omitempty"` DnBandwidth int `json:"dnBandwidth,omitempty"` Country string `json:"country,omitempty"` Tz string `json:"tz,omitempty"` IPAddresses []string `json:"ipAddresses,omitempty"` Ports []int `json:"ports,omitempty"` VpnCredentials []VpnLocation `json:"vpnCredentials,omitempty"` AuthRequired bool `json:"authRequired,omitempty"` SslScanEnabled bool `json:"sslScanEnabled,omitempty"` ZappSSLScanEnabled bool `json:"zappSSLScanEnabled,omitempty"` XffForwardEnabled bool `json:"xffForwardEnabled,omitempty"` SurrogateIP bool `json:"surrogateIP,omitempty"` IdleTimeInMinutes int `json:"idleTimeInMinutes,omitempty"` DisplayTimeUnit string `json:"displayTimeUnit,omitempty"` SurrogateIPEnforcedForKnownBrowsers bool `json:"surrogateIPEnforcedForKnownBrowsers,omitempty"` SurrogateRefreshTimeInMinutes int `json:"surrogateRefreshTimeInMinutes,omitempty"` SurrogateRefreshTimeUnit string `json:"surrogateRefreshTimeUnit,omitempty"` OfwEnabled bool `json:"ofwEnabled,omitempty"` IpsControl bool `json:"ipsControl,omitempty"` AupEnabled bool `json:"aupEnabled,omitempty"` CautionEnabled bool `json:"cautionEnabled,omitempty"` AupBlockInternetUntilAccepted bool `json:"aupBlockInternetUntilAccepted,omitempty"` AupForceSslInspection bool `json:"aupForceSslInspection,omitempty"` AupTimeoutInDays int `json:"aupTimeoutInDays,omitempty"` Profile string `json:"profile,omitempty"` Description string `json:"description,omitempty"` }
Location parses locations
type LocationGroup ¶
type LocationGroup struct { ID int `json:"id"` Name string `json:"name"` Deleted bool `json:"deleted,omitempty"` GroupType string `json:"groupType"` DynamicLocationGroupCriteria struct { Name struct { MatchString string `json:"matchString"` MatchType string `json:"matchType"` } `json:"name"` Countries []string `json:"countries"` City struct { MatchString string `json:"matchString"` MatchType string `json:"matchType"` } `json:"city"` ManagedBy []NameID `json:"managedBy"` EnforceAuthentication bool `json:"enforceAuthentication"` EnforceAup bool `json:"enforceAup"` EnforceFirewallControl bool `json:"enforceFirewallControl"` EnableXffForwarding bool `json:"enableXffForwarding"` EnableCaution bool `json:"enableCaution"` EnableBandwidthControl bool `json:"enableBandwidthControl"` Profiles []string `json:"profiles"` } `json:"dynamicLocationGroupCriteria"` Locations []NameID `json:"locations"` Comments string `json:"comments"` LastModUser NameID `json:"lastModUser"` LastModTime int `json:"lastModTime"` Predefined bool `json:"predefined"` }
LocationGroup parses location groups
func (LocationGroup) GetID ¶
func (u LocationGroup) GetID() (string, int)
GetID return the name a string and the ID as int
func (LocationGroup) String ¶ added in v0.1.36
func (p LocationGroup) String() string
String prints the struct in json pretty format
type NameID ¶
type NameID struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Uuid string `json:"uuid,omitempty"` }
NameID is a helper for json entries with name and ID
type Pattern ¶
type Pattern struct { Action string `json:"action,omitempty"` Pattern string `json:"pattern,omitempty"` }
Pattern holds DLP dictionary Patterns
type Phrase ¶
type Phrase struct { Action string `json:"action,omitempty"` Phrase string `json:"phrase,omitempty"` }
Phrases holds DLP dictionary phrases
type Service ¶
type Service struct { ID int `json:"id"` Name string `json:"name"` Tag string `json:"tag,omitempty"` SrcTCPPorts []StartEnd `json:"srcTcpPorts,omitempty"` DestTCPPorts []StartEnd `json:"destTcpPorts,omitempty"` SrcUDPPorts []StartEnd `json:"srcUdpPorts,omitempty"` DestUDPPorts []StartEnd `json:"destUdpPorts,omitempty"` Type string `json:"type,omitempty"` //Types are CUSTOM, STANDARD AND PREDEFINED. The last 2 are default ones, STANDARD seems to be used for non port based services Description string `json:"description,omitempty"` IsNameL10NTag bool `json:"isNameL10nTag,omitempty"` }
Service parses responses for network services
type ServiceGroup ¶
type ServiceGroup struct { ID int `json:"id"` Name string `json:"name"` Services []Service `json:"services"` Description string `json:"description,omitempty"` }
ServiceGroup parses responses for network servicesgroups
func (ServiceGroup) Delete ¶ added in v0.1.35
func (u ServiceGroup) Delete(c *Client) error
Delete deletes an object
func (ServiceGroup) GetID ¶
func (u ServiceGroup) GetID() (string, int)
GetID return the name a string and the ID as int
func (ServiceGroup) String ¶ added in v0.1.36
func (p ServiceGroup) String() string
String prints the struct in json pretty format
type UrlCat ¶
type UrlCat struct { ID string `json:"id,omitempty"` // This goes from CUSTOM_00 to CUSTOM_256 ConfiguredName string `json:"configuredName"` Keywords []string `json:"keywords,omitempty"` KeywordsRetainingParentCategory []string `json:"keywordsRetainingParentCategory,omitempty"` Urls []string `json:"urls,omitempty"` DbCategorizedUrls []string `json:"dbCategorizedUrls,omitempty"` IPRanges []string `json:"ipRanges,omitempty"` IPRangesRetainingParentCategory []string `json:"ipRangesRetainingParentCategory,omitempty"` CustomCategory bool `json:"customCategory,omitempty"` //set to true if custom SuperCategory string `json:"superCategory"` //Use USER_DEFINED for custom category creation Scopes []struct { ScopeGroupMemberEntities []struct { ID int `json:"id"` Name string `json:"name"` Extensions struct { AdditionalProp1 string `json:"additionalProp1"` AdditionalProp2 string `json:"additionalProp2"` AdditionalProp3 string `json:"additionalProp3"` } `json:"extensions"` } `json:"scopeGroupMemberEntities"` Type string `json:"Type"` ScopeEntities []struct { ID int `json:"id"` Name string `json:"name"` Extensions struct { AdditionalProp1 string `json:"additionalProp1"` AdditionalProp2 string `json:"additionalProp2"` AdditionalProp3 string `json:"additionalProp3"` } `json:"extensions"` } `json:"ScopeEntities"` } `json:"scopes,omitempty"` Editable bool `json:"editable,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` URLKeywordCounts *struct { TotalURLCount int `json:"totalUrlCount"` RetainParentURLCount int `json:"retainParentUrlCount"` TotalKeywordCount int `json:"totalKeywordCount"` RetainParentKeywordCount int `json:"retainParentKeywordCount"` } `json:"urlKeywordCounts,omitempty"` Val int `json:"val,omitempty"` CustomUrlsCount int `json:"customUrlsCount,omitempty"` UrlsRetainingParentCategoryCount int `json:"urlsRetainingParentCategoryCount,omitempty"` CustomIPRangesCount int `json:"customIpRangesCount,omitempty"` IPRangesRetainingParentCategoryCount int `json:"ipRangesRetainingParentCategoryCount,omitempty"` }
UrlCat parses responses for urls categories
type UrlLookup ¶
type UrlLookup struct { URL string `json:"url"` URLCat []string `json:"urlClassifications"` URLCatSec []string `json:"urlClassificationsWithSecurityAlert"` Error string `json:"error,omitempty"` Application string `json:"application"` }
UrlLookup parses responses for received url categories
type UrlRule ¶
type UrlRule struct { ID int `json:"id"` Name string `json:"name"` Order int `json:"order,omitempty"` Protocols []string `json:"protocols,omitempty"` Locations []NameID `json:"locations,omitempty"` Groups []NameID `json:"groups,omitempty"` Departments []NameID `json:"departments,omitempty"` Users []NameID `json:"users,omitempty"` URLCategories []string `json:"urlCategories,omitempty"` State string `json:"state,omitempty"` //"ENABLED" or "DISABLED" TimeWindows []NameID `json:"timeWindows,omitempty"` SourceIpGroups []NameID `json:"sourceIpGroups,omitempty"` Rank int `json:"rank"` RequestMethods []string `json:"requestMethods,omitempty"` EndUserNotificationURL string `json:"endUserNotificationUrl,omitempty"` OverrideUsers []NameID `json:"overrideUsers,omitempty"` OverrideGroups []NameID `json:"overrideGroups,omitempty"` BlockOverride bool `json:"blockOverride,omitempty"` TimeQuota int `json:"timeQuota,omitempty"` SizeQuota int `json:"sizeQuota,omitempty"` Description string `json:"description,omitempty"` LocationGroups []NameID `json:"locationGroups,omitempty"` Labels []NameID `json:"labels,omitempty"` ValidityStartTime int `json:"validityStartTime,omitempty"` ValidityEndTime int `json:"validityEndTime,omitempty"` ValidityTimeZoneID string `json:"validityTimeZoneId,omitempty"` LastModifiedTime int `json:"lastModifiedTime,omitempty"` LastModifiedBy *NameID `json:"lastModifiedBy,omitempty"` EnforceTimeValidity bool `json:"enforceTimeValidity,omitempty"` Action string `json:"action,omitempty"` Ciparule bool `json:"ciparule,omitempty"` }
UrlRule parses responses for urls policies
type User ¶
type User struct { ID int `json:"id,omitempty"` Name string `json:"name"` Email string `json:"email"` Groups []UserGroup `json:"groups,omitempty"` Department Department `json:"department,omitempty"` Comments string `json:"comments,omitempty"` TempAuthEmail string `json:"tempAuthEmail,omitempty"` Password string `json:"password,omitempty"` AdminUser bool `json:"adminUser,omitempty"` Type string `json:"type,omitempty"` }
Users parses Users
type UserFilter ¶ added in v0.1.25
UserFilter filter user searches The name search parameter performs a partial match. The dept and group parameters perform a 'starts with' match.
type UserGroup ¶
type UserGroup struct { ID int `json:"id,omitempty"` Name string `json:"name"` IdpID int `json:"idpId,omitempty"` Comments string `json:"comments,omitempty"` }
UserGroup parses UserGroup
type VpnLocation ¶
type VpnLocation struct { Type string `json:"type"` Fqdn string `json:"fqdn"` Comments string `json:"comments"` }
func (VpnLocation) String ¶ added in v0.1.36
func (p VpnLocation) String() string
String prints the struct in json pretty format
type ZIAError ¶
type ZIAError struct { //this is the Error Err string //Code this is the http status code Code int }
ZIAError is the error