urlfilteringpolicies

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Client *zia.Client
}

func New

func New(c *zia.Client) *Service

func (*Service) Create

func (service *Service) Create(ruleID *URLFilteringRule) (*URLFilteringRule, error)

func (*Service) Delete

func (service *Service) Delete(ruleID int) (*http.Response, error)

func (*Service) Get

func (service *Service) Get(ruleID int) (*URLFilteringRule, error)

func (*Service) GetAll

func (service *Service) GetAll() ([]URLFilteringRule, error)

GetAll returns the all rules.

func (*Service) GetByName

func (service *Service) GetByName(urlFilteringPolicyName string) (*URLFilteringRule, error)

func (*Service) Reorder

func (service *Service) Reorder(ruleID, order int) (int, error)

Reorder chanegs the order of the rule.

func (*Service) RulesCount

func (service *Service) RulesCount() int

RulesCount returns the number of rules.

func (*Service) Update

func (service *Service) Update(ruleID int, rules *URLFilteringRule) (*URLFilteringRule, *http.Response, error)

type URLFilteringRule

type URLFilteringRule struct {
	ID                     int                       `json:"id,omitempty"`
	Name                   string                    `json:"name,omitempty"`
	Order                  int                       `json:"order,omitempty"`
	Protocols              []string                  `json:"protocols,omitempty"`
	URLCategories          []string                  `json:"urlCategories"`
	State                  string                    `json:"state,omitempty"`
	UserAgentTypes         []string                  `json:"userAgentTypes,omitempty"`
	Rank                   int                       `json:"rank,omitempty"`
	RequestMethods         []string                  `json:"requestMethods,omitempty"`
	EndUserNotificationURL string                    `json:"endUserNotificationUrl,omitempty"`
	BlockOverride          bool                      `json:"blockOverride,omitempty"`
	TimeQuota              int                       `json:"timeQuota,omitempty"`
	SizeQuota              int                       `json:"sizeQuota,omitempty"`
	Description            string                    `json:"description,omitempty"`
	ValidityStartTime      int                       `json:"validityStartTime,omitempty"`
	ValidityEndTime        int                       `json:"validityEndTime,omitempty"`
	ValidityTimeZoneID     string                    `json:"validityTimeZoneId,omitempty"`
	LastModifiedTime       int                       `json:"lastModifiedTime,omitempty"`
	EnforceTimeValidity    bool                      `json:"enforceTimeValidity,omitempty"`
	Action                 string                    `json:"action,omitempty"`
	Ciparule               bool                      `json:"ciparule,omitempty"`
	DeviceTrustLevels      []string                  `json:"deviceTrustLevels,omitempty"`
	DeviceGroups           []common.IDNameExtensions `json:"deviceGroups"`
	Devices                []common.IDNameExtensions `json:"devices"`
	LastModifiedBy         *common.IDNameExtensions  `json:"lastModifiedBy,omitempty"`
	OverrideUsers          []common.IDNameExtensions `json:"overrideUsers,omitempty"`
	OverrideGroups         []common.IDNameExtensions `json:"overrideGroups,omitempty"`
	LocationGroups         []common.IDNameExtensions `json:"locationGroups,omitempty"`
	Labels                 []common.IDNameExtensions `json:"labels,omitempty"`
	Locations              []common.IDNameExtensions `json:"locations,omitempty"`
	Groups                 []common.IDNameExtensions `json:"groups,omitempty"`
	Departments            []common.IDNameExtensions `json:"departments,omitempty"`
	Users                  []common.IDNameExtensions `json:"users,omitempty"`
	TimeWindows            []common.IDNameExtensions `json:"timeWindows,omitempty"`
}

Jump to

Keyboard shortcuts

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