Documentation ¶
Index ¶
- type Service
- func (service *Service) Get(networkID string) (*TrustedNetwork, *http.Response, error)
- func (service *Service) GetAll() ([]TrustedNetwork, *http.Response, error)
- func (service *Service) GetByName(trustedNetworkName string) (*TrustedNetwork, *http.Response, error)
- func (service *Service) GetByNetID(netID string) (*TrustedNetwork, *http.Response, error)
- type TrustedNetwork
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
func (*Service) GetAll ¶
func (service *Service) GetAll() ([]TrustedNetwork, *http.Response, error)
func (service *Service) GetByName(trustedNetworkName string) (*TrustedNetwork, *http.Response, error) { adaptedTrustedNetworkName := common.RemoveCloudSuffix(trustedNetworkName) adaptedTrustedNetworkName = strings.ReplaceAll(adaptedTrustedNetworkName, "-", " ") adaptedTrustedNetworkName = strings.TrimSpace(adaptedTrustedNetworkName) adaptedTrustedNetworkName = strings.Split(adaptedTrustedNetworkName, " ")[0] relativeURL := mgmtConfig + service.Client.Config.CustomerID + trustedNetworkEndpoint list, resp, err := common.GetAllPagesGeneric[TrustedNetwork](service.Client, relativeURL, adaptedTrustedNetworkName) if err != nil { return nil, nil, err } for _, trustedNetwork := range list { if strings.EqualFold(common.RemoveCloudSuffix(trustedNetwork.Name), common.RemoveCloudSuffix(trustedNetworkName)) { return &trustedNetwork, resp, nil } } return nil, resp, fmt.Errorf("no trusted network named '%s' was found", trustedNetworkName) }
func (*Service) GetByNetID ¶
type TrustedNetwork ¶
type TrustedNetwork struct { CreationTime string `json:"creationTime,omitempty"` Domain string `json:"domain,omitempty"` ID string `json:"id,omitempty"` MasterCustomerID string `json:"masterCustomerId,omitempty"` ModifiedBy string `json:"modifiedBy,omitempty"` ModifiedTime string `json:"modifiedTime,omitempty"` Name string `json:"name,omitempty"` NetworkID string `json:"networkId,omitempty"` ZscalerCloud string `json:"zscalerCloud,omitempty"` }
Click to show internal directories.
Click to hide internal directories.