Documentation
¶
Index ¶
- func ApiKey() string
- func ApiUrl() string
- func CloudAccessToken() string
- func CloudIdentityServiceAudience() string
- func CloudIdentityServiceBaseUrl() string
- func CloudIdentityServiceClientId() string
- func CloudIdentityServiceDeviceCodeUrl() string
- func CloudIdentityServiceTokenUrl() string
- func CloudRefreshToken() string
- func CommunityMode() bool
- func CommunityServicesApiUrl() string
- func ControlPlaneClientConnection(name string) (*grpc.ClientConn, error)
- func ControlTowerUrl() string
- func DataPlaneUrl() string
- func DefaultApiUrl() string
- func DefaultCommunityApiUrl() string
- func HasEntitlements(entitlementsFeatures ...v1.Feature) bool
- func InsightsApiV2Url() string
- func InsightsV2ClientConnection(name string) (*grpc.ClientConn, error)
- func InsightsV2CommunityClientConnection(name string) (*grpc.ClientConn, error)
- func IsAccessTokenExpired() (bool, error)
- func LoadEntitlements() error
- func MalwareAnalysisClientConnection(name string) (*grpc.ClientConn, error)
- func MalwareAnalysisCommunityClientConnection(name string) (*grpc.ClientConn, error)
- func PersistApiKey(key, domain string) error
- func PersistCloudTokens(accessToken, refreshToken, domain string) error
- func PersistTenantDomain(domain string) error
- func RefreshCloudSession() error
- func SetRuntimeApiKey(key string)
- func SetRuntimeCloudTenant(domain string)
- func SetRuntimeCommunityMode()
- func ShouldCheckAccessTokenExpiry() bool
- func SyncApiUrl() string
- func SyncClientConnection(name string) (*grpc.ClientConn, error)
- func TenantDomain() string
- func Verify() error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudAccessToken ¶ added in v1.8.0
func CloudAccessToken() string
func CloudIdentityServiceAudience ¶ added in v1.8.0
func CloudIdentityServiceAudience() string
func CloudIdentityServiceBaseUrl ¶ added in v1.8.0
func CloudIdentityServiceBaseUrl() string
func CloudIdentityServiceClientId ¶ added in v1.8.0
func CloudIdentityServiceClientId() string
func CloudIdentityServiceDeviceCodeUrl ¶ added in v1.8.0
func CloudIdentityServiceDeviceCodeUrl() string
func CloudIdentityServiceTokenUrl ¶ added in v1.8.0
func CloudIdentityServiceTokenUrl() string
func CloudRefreshToken ¶ added in v1.8.0
func CloudRefreshToken() string
func CommunityMode ¶ added in v1.0.0
func CommunityMode() bool
func CommunityServicesApiUrl ¶ added in v1.10.1
func CommunityServicesApiUrl() string
func ControlPlaneClientConnection ¶ added in v1.8.0
func ControlPlaneClientConnection(name string) (*grpc.ClientConn, error)
Create a gRPC client connection for the control plane based on available configuration
func ControlTowerUrl ¶ added in v1.8.0
func ControlTowerUrl() string
func DataPlaneUrl ¶ added in v1.8.9
func DataPlaneUrl() string
func DefaultApiUrl ¶
func DefaultApiUrl() string
func DefaultCommunityApiUrl ¶ added in v1.0.0
func DefaultCommunityApiUrl() string
func HasEntitlements ¶ added in v1.13.0
HasEntitlements checks if the current tenant has the specified entitlements This always depends on cached entitlements and never calls the API directly
func InsightsApiV2Url ¶ added in v1.8.3
func InsightsApiV2Url() string
func InsightsV2ClientConnection ¶ added in v1.8.3
func InsightsV2ClientConnection(name string) (*grpc.ClientConn, error)
func InsightsV2CommunityClientConnection ¶ added in v1.11.2
func InsightsV2CommunityClientConnection(name string) (*grpc.ClientConn, error)
func IsAccessTokenExpired ¶ added in v1.12.3
func LoadEntitlements ¶ added in v1.13.0
func LoadEntitlements() error
LoadEntitlements loads and caches entitlements for the current tenant If this fails, then no credential is available and the app should switch to community mode
func MalwareAnalysisClientConnection ¶ added in v1.8.9
func MalwareAnalysisClientConnection(name string) (*grpc.ClientConn, error)
func MalwareAnalysisCommunityClientConnection ¶ added in v1.10.1
func MalwareAnalysisCommunityClientConnection(name string) (*grpc.ClientConn, error)
func PersistApiKey ¶ added in v1.8.0
func PersistCloudTokens ¶ added in v1.8.0
func PersistTenantDomain ¶ added in v1.8.0
func RefreshCloudSession ¶ added in v1.12.3
func RefreshCloudSession() error
func SetRuntimeApiKey ¶ added in v1.8.0
func SetRuntimeApiKey(key string)
func SetRuntimeCloudTenant ¶ added in v1.8.0
func SetRuntimeCloudTenant(domain string)
func SetRuntimeCommunityMode ¶ added in v1.5.9
func SetRuntimeCommunityMode()
SetRuntimeCommunityMode sets the runtime mode to community without persisting it to the configuration file.
func ShouldCheckAccessTokenExpiry ¶ added in v1.12.3
func ShouldCheckAccessTokenExpiry() bool
func SyncApiUrl ¶ added in v1.8.0
func SyncApiUrl() string
func SyncClientConnection ¶ added in v1.8.0
func SyncClientConnection(name string) (*grpc.ClientConn, error)
func TenantDomain ¶ added in v1.8.0
func TenantDomain() string
Types ¶
type Config ¶
type Config struct {
ApiUrl string `yaml:"api_url"`
ApiKey string `yaml:"api_key"`
Community bool `yaml:"community"`
DataPlaneApiUrl string `yaml:"data_plane_api_url"`
ControlPlaneApiUrl string `yaml:"control_api_url"`
SyncApiUrl string `yaml:"sync_api_url"`
InsightsApiV2Url string `yaml:"insights_api_v2_url"`
CommunityServicesApiUrl string `yaml:"community_services_api_url"`
TenantDomain string `yaml:"tenant_domain"`
CloudAccessToken string `yaml:"cloud_access_token"`
CloudRefreshToken string `yaml:"cloud_refresh_token"`
CloudAccessTokenUpdatedAt time.Time `yaml:"cloud_access_token_updated_at"`
}
func DefaultConfig ¶ added in v1.8.0
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.