Documentation ¶
Index ¶
- type AWSDetails
- type AggregateRateByCollector
- type Any
- type Chart
- type ChartList
- type Client
- func (c *Client) AddHost(clusterID string, hostInput HostsInput) (*Hosts, error)
- func (c *Client) AddHostCtx(ctx context.Context, clusterID string, hostInput HostsInput) (*Hosts, error)
- func (c *Client) CreateCluster(clusterInput ClusterInput) (*Cluster, error)
- func (c *Client) CreateClusterCtx(ctx context.Context, clusterInput ClusterInput) (*Cluster, error)
- func (c *Client) CreateClusterDeployment(clusterID string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) CreateClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) CreateClusterStatus(clusterID string, statusInput StatusInput) (*Status, error)
- func (c *Client) CreateClusterStatusCtx(ctx context.Context, clusterID string, statusInput StatusInput) (*Status, error)
- func (c *Client) CreateEndpoint(clusterID string, deploymentID string, endpointInput EndpointInput) (*Endpoint, error)
- func (c *Client) CreateEndpointCtx(ctx context.Context, clusterID string, deploymentID string, ...) (*Endpoint, error)
- func (c *Client) CreateOSConfig(input OSConfigInput) (*OSConfig, error)
- func (c *Client) CreateOSConfigCtx(ctx context.Context, input OSConfigInput) (*OSConfig, error)
- func (c *Client) CreateRoleDeployment(role string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) CreateRoleDeploymentCtx(ctx context.Context, role string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) DeleteCluster(clusterID string) (*Deleted, error)
- func (c *Client) DeleteClusterCtx(ctx context.Context, clusterID string) (*Deleted, error)
- func (c *Client) DeleteClusterDeployment(clusterID string, deploymentID string) (*Deleted, error)
- func (c *Client) DeleteClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string) (*Deleted, error)
- func (c *Client) DeleteClusterStatus(clusterID string, deploymentID string) (*Deleted, error)
- func (c *Client) DeleteClusterStatusCtx(ctx context.Context, clusterID string, deploymentID string) (*Deleted, error)
- func (c *Client) DeleteEndpoint(clusterID string, deploymentID string, endpointID string) (*Deleted, error)
- func (c *Client) DeleteEndpointCtx(ctx context.Context, clusterID string, deploymentID string, endpointID string) (*Deleted, error)
- func (c *Client) DeleteHost(clusterID string, address string) (*Deleted, error)
- func (c *Client) DeleteHostCtx(ctx context.Context, clusterID string, address string) (*Deleted, error)
- func (c *Client) DeleteOSConfig(clusterID string) (string, error)
- func (c *Client) DeleteOSConfigCtx(ctx context.Context, clusterID string) (string, error)
- func (c *Client) DeleteRoleDeployment(deploymentID string) (*Deleted, error)
- func (c *Client) DeleteRoleDeploymentCtx(ctx context.Context, deploymentID string) (*Deleted, error)
- func (c *Client) GetAWSRegions() ([]string, error)
- func (c *Client) GetAWSRegionsCtx(ctx context.Context) ([]string, error)
- func (c *Client) GetAggregateRateByCollector(clusterID string, timeRange TimeRange) (*AggregateRateByCollector, error)
- func (c *Client) GetAggregateRateByCollectorCtx(ctx context.Context, clusterID string, timeRange TimeRange) (*AggregateRateByCollector, error)
- func (c *Client) GetAllCharts() (*ChartList, error)
- func (c *Client) GetAllChartsCtx(ctx context.Context) (*ChartList, error)
- func (c *Client) GetAllClusterDeployments(clusterID string) ([]Deployment, error)
- func (c *Client) GetAllClusterDeploymentsCtx(ctx context.Context, clusterID string) ([]Deployment, error)
- func (c *Client) GetAllClusters(role string) ([]Cluster, error)
- func (c *Client) GetAllClustersCtx(ctx context.Context, role string) ([]Cluster, error)
- func (c *Client) GetAllCollectorsOverview(role string, timeRange TimeRange) ([]CollectorOverview, error)
- func (c *Client) GetAllCollectorsOverviewCtx(ctx context.Context, role string, timeRange TimeRange) ([]CollectorOverview, error)
- func (c *Client) GetAllDeploymentEndpoints(clusterID string, deploymentID string) ([]Endpoint, error)
- func (c *Client) GetAllDeploymentEndpointsCtx(ctx context.Context, clusterID string, deploymentID string) ([]Endpoint, error)
- func (c *Client) GetChart(chartName string) (*Chart, error)
- func (c *Client) GetChartCtx(ctx context.Context, chartName string) (*Chart, error)
- func (c *Client) GetCluster(clusterID string) (*Cluster, error)
- func (c *Client) GetClusterConfig(clusterID string) (*KubernetesConfig, error)
- func (c *Client) GetClusterConfigCtx(ctx context.Context, clusterID string) (*KubernetesConfig, error)
- func (c *Client) GetClusterCredentials(clusterID string) (*Credentials, error)
- func (c *Client) GetClusterCredentialsCtx(ctx context.Context, clusterID string) (*Credentials, error)
- func (c *Client) GetClusterCtx(ctx context.Context, clusterID string) (*Cluster, error)
- func (c *Client) GetClusterDeployment(clusterID string, deploymentID string) (*Deployment, error)
- func (c *Client) GetClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string) (*Deployment, error)
- func (c *Client) GetClusterDeploymentStatus(clusterID string, deploymentID string) (*Map, error)
- func (c *Client) GetClusterDeploymentStatusCtx(ctx context.Context, clusterID string, deploymentID string) (*Map, error)
- func (c *Client) GetClusterImage(params *GetClusterImageArguments) (*Image, error)
- func (c *Client) GetClusterImageCtx(ctx context.Context, params *GetClusterImageArguments) (*Image, error)
- func (c *Client) GetClusterStatuses(clusterID string) ([]Status, error)
- func (c *Client) GetClusterStatusesCtx(ctx context.Context, clusterID string) ([]Status, error)
- func (c *Client) GetCollectorMetrics(timeRange TimeRange) (*CollectorMetrics, error)
- func (c *Client) GetCollectorMetricsCtx(ctx context.Context, timeRange TimeRange) (*CollectorMetrics, error)
- func (c *Client) GetDeploymentEndpoint(clusterID string, deploymentID string, endpointID string) (*Endpoint, error)
- func (c *Client) GetDeploymentEndpointCtx(ctx context.Context, clusterID string, deploymentID string, endpointID string) (*Endpoint, error)
- func (c *Client) GetFlowRate(clusterID string, timeRange TimeRange) (*FlowRate, error)
- func (c *Client) GetFlowRateCtx(ctx context.Context, clusterID string, timeRange TimeRange) (*FlowRate, error)
- func (c *Client) GetHosts(clusterID string) (*Hosts, error)
- func (c *Client) GetHostsCtx(ctx context.Context, clusterID string) (*Hosts, error)
- func (c *Client) GetLogLastSeenMetrics(clusterID *string) (*LogLastSeenMetrics, error)
- func (c *Client) GetLogLastSeenMetricsCtx(ctx context.Context, clusterID *string) (*LogLastSeenMetrics, error)
- func (c *Client) GetOSConfig(clusterID string) (*OSConfig, error)
- func (c *Client) GetOSConfigCtx(ctx context.Context, clusterID string) (*OSConfig, error)
- func (c *Client) GetRoleDeployment(deploymentID string) (*Deployment, error)
- func (c *Client) GetRoleDeploymentCtx(ctx context.Context, deploymentID string) (*Deployment, error)
- func (c *Client) GetRoleDeployments(role string) ([]Deployment, error)
- func (c *Client) GetRoleDeploymentsCtx(ctx context.Context, role string) ([]Deployment, error)
- func (c *Client) UpdateCluster(clusterID string, clusterInput ClusterInput) (*Cluster, error)
- func (c *Client) UpdateClusterCtx(ctx context.Context, clusterID string, clusterInput ClusterInput) (*Cluster, error)
- func (c *Client) UpdateClusterDeployment(clusterID string, deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) UpdateClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string, ...) (*Deployment, error)
- func (c *Client) UpdateClusterStatus(clusterID string, statusInput StatusInput) (*Status, error)
- func (c *Client) UpdateClusterStatusCtx(ctx context.Context, clusterID string, statusInput StatusInput) (*Status, error)
- func (c *Client) UpdateEndpoint(params *UpdateEndpointArguments) (*Endpoint, error)
- func (c *Client) UpdateEndpointCtx(ctx context.Context, params *UpdateEndpointArguments) (*Endpoint, error)
- func (c *Client) UpdateOSConfig(input OSConfigInput) (*OSConfig, error)
- func (c *Client) UpdateOSConfigCtx(ctx context.Context, input OSConfigInput) (*OSConfig, error)
- func (c *Client) UpdateRoleDeployment(deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
- func (c *Client) UpdateRoleDeploymentCtx(ctx context.Context, deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
- type Cluster
- type ClusterInput
- type ClusterType
- type CollectorMetrics
- type CollectorOverview
- type ConfigStatus
- type Credentials
- type Deleted
- type Deployment
- type DeploymentInput
- type Endpoint
- type EndpointInput
- type FlowRate
- type GetClusterImageArguments
- type Hosts
- type HostsInput
- type Image
- type ImageType
- type KubernetesConfig
- type LogLastSeenMetric
- type LogLastSeenMetrics
- type Map
- type Matrix
- type Network
- type NetworkInput
- type OSConfig
- type OSConfigInput
- type Registration
- type Sample
- type Status
- type StatusInput
- type StringSlice
- type TimeRange
- type UpdateEndpointArguments
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSDetails ¶
The awsDetails input struct contains the necessary identifying information for use with an AWS image download
type AggregateRateByCollector ¶
type AggregateRateByCollector struct {
AggregateRate *Matrix `json:"aggregateRate"`
}
The aggregate rate metrics structure represents a set of aggregated collector data flow rate metrics
type Chart ¶
type Chart struct { ApiVersion *string `json:"apiVersion"` AppVersion *string `json:"appVersion"` Name *string `json:"name"` Description *string `json:"description"` Icon *string `json:"icon"` Home *string `json:"home"` Keywords []string `json:"keywords"` Version *string `json:"version"` Digest *string `json:"digest"` Urls []string `json:"urls"` MetaData *Any `json:"metaData"` }
The chart structure represents the the attributes associated with a given helm chart
type ChartList ¶
type ChartList struct { APIVersion *string `json:"APIVersion"` Entries *Any `json:"Entries"` Generated *time.Time `json:"Generated"` }
The chart list structure represents a list of 'helm chart' entries available for installation in our repositories
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides an easy to use Go client to the collectors API
func NewWithClient ¶
NewWithClient returns a new Client which uses the given client
func (*Client) AddHost ¶
func (c *Client) AddHost(clusterID string, hostInput HostsInput) (*Hosts, error)
AddHost will add a address:hostname mapping to a given cluster
func (*Client) AddHostCtx ¶
func (c *Client) AddHostCtx(ctx context.Context, clusterID string, hostInput HostsInput) (*Hosts, error)
AddHostCtx will add a address:hostname mapping to a given cluster
func (*Client) CreateCluster ¶
func (c *Client) CreateCluster(clusterInput ClusterInput) (*Cluster, error)
CreateCluster will create a new cluster of a given role
func (*Client) CreateClusterCtx ¶
CreateClusterCtx will create a new cluster of a given role
func (*Client) CreateClusterDeployment ¶
func (c *Client) CreateClusterDeployment(clusterID string, deploymentInput DeploymentInput) (*Deployment, error)
CreateClusterDeployment will create a deployment local to a given cluster
func (*Client) CreateClusterDeploymentCtx ¶
func (c *Client) CreateClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentInput DeploymentInput) (*Deployment, error)
CreateClusterDeploymentCtx will create a deployment local to a given cluster
func (*Client) CreateClusterStatus ¶
func (c *Client) CreateClusterStatus(clusterID string, statusInput StatusInput) (*Status, error)
CreateClusterStatus will create the initial deployment status of a given cluster
func (*Client) CreateClusterStatusCtx ¶
func (c *Client) CreateClusterStatusCtx(ctx context.Context, clusterID string, statusInput StatusInput) (*Status, error)
CreateClusterStatusCtx will create the initial deployment status of a given cluster
func (*Client) CreateEndpoint ¶
func (c *Client) CreateEndpoint(clusterID string, deploymentID string, endpointInput EndpointInput) (*Endpoint, error)
CreateEndpoint will create an endpoint for a given cluster
func (*Client) CreateEndpointCtx ¶
func (c *Client) CreateEndpointCtx(ctx context.Context, clusterID string, deploymentID string, endpointInput EndpointInput) (*Endpoint, error)
CreateEndpointCtx will create an endpoint for a given cluster
func (*Client) CreateOSConfig ¶
func (c *Client) CreateOSConfig(input OSConfigInput) (*OSConfig, error)
func (*Client) CreateOSConfigCtx ¶
func (*Client) CreateRoleDeployment ¶
func (c *Client) CreateRoleDeployment(role string, deploymentInput DeploymentInput) (*Deployment, error)
CreateRoleDeployment will create a deployment to be installed on every cluster of a given role. Only Secureworks admins can reach this endpoint.
func (*Client) CreateRoleDeploymentCtx ¶
func (c *Client) CreateRoleDeploymentCtx(ctx context.Context, role string, deploymentInput DeploymentInput) (*Deployment, error)
CreateRoleDeploymentCtx will create a deployment to be installed on every cluster of a given role. Only Secureworks admins can reach this endpoint.
func (*Client) DeleteCluster ¶
DeleteCluster will delete a cluster
func (*Client) DeleteClusterCtx ¶
DeleteClusterCtx will delete a cluster
func (*Client) DeleteClusterDeployment ¶
DeleteClusterDeployment will delete a deployment on a given cluster
func (*Client) DeleteClusterDeploymentCtx ¶
func (c *Client) DeleteClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string) (*Deleted, error)
DeleteClusterDeploymentCtx will delete a deployment on a given cluster
func (*Client) DeleteClusterStatus ¶
DeleteClusterStatus will delete the deployment status of a given cluster
func (*Client) DeleteClusterStatusCtx ¶
func (c *Client) DeleteClusterStatusCtx(ctx context.Context, clusterID string, deploymentID string) (*Deleted, error)
DeleteClusterStatusCtx will delete the deployment status of a given cluster
func (*Client) DeleteEndpoint ¶
func (c *Client) DeleteEndpoint(clusterID string, deploymentID string, endpointID string) (*Deleted, error)
DeleteEndpoint will delete an endpoint for a given cluster
func (*Client) DeleteEndpointCtx ¶
func (c *Client) DeleteEndpointCtx(ctx context.Context, clusterID string, deploymentID string, endpointID string) (*Deleted, error)
DeleteEndpointCtx will delete an endpoint for a given cluster
func (*Client) DeleteHost ¶
DeleteHost will remove an address:hostname mapping from a given cluster by providing the IP address and associated host name
func (*Client) DeleteHostCtx ¶
func (c *Client) DeleteHostCtx(ctx context.Context, clusterID string, address string) (*Deleted, error)
DeleteHostCtx will remove an address:hostname mapping from a given cluster by providing the IP address and associated host name
func (*Client) DeleteOSConfigCtx ¶
func (*Client) DeleteRoleDeployment ¶
DeleteRoleDeployment will delete a system deployment by ID. Only Secureworks admins can reach this endpoint.
func (*Client) DeleteRoleDeploymentCtx ¶
func (c *Client) DeleteRoleDeploymentCtx(ctx context.Context, deploymentID string) (*Deleted, error)
DeleteRoleDeploymentCtx will delete a system deployment by ID. Only Secureworks admins can reach this endpoint.
func (*Client) GetAWSRegions ¶
GetAWSRegions will fetch list of AWS regions where we have images available
func (*Client) GetAWSRegionsCtx ¶
GetAWSRegionsCtx will fetch list of AWS regions where we have images available
func (*Client) GetAggregateRateByCollector ¶
func (c *Client) GetAggregateRateByCollector(clusterID string, timeRange TimeRange) (*AggregateRateByCollector, error)
GetAggregateRateByCollector will get aggregated data flow rate metrics for a given collector over a given time range
func (*Client) GetAggregateRateByCollectorCtx ¶
func (c *Client) GetAggregateRateByCollectorCtx(ctx context.Context, clusterID string, timeRange TimeRange) (*AggregateRateByCollector, error)
GetAggregateRateByCollectorCtx will get aggregated data flow rate metrics for a given collector over a given time range
func (*Client) GetAllCharts ¶
GetAllCharts will get all of the Helm charts available for deployment to any cluster
func (*Client) GetAllChartsCtx ¶
GetAllChartsCtx will get all of the Helm charts available for deployment to any cluster
func (*Client) GetAllClusterDeployments ¶
func (c *Client) GetAllClusterDeployments(clusterID string) ([]Deployment, error)
GetAllClusterDeployments will get all of the deployments under a collector
func (*Client) GetAllClusterDeploymentsCtx ¶
func (c *Client) GetAllClusterDeploymentsCtx(ctx context.Context, clusterID string) ([]Deployment, error)
GetAllClusterDeploymentsCtx will get all of the deployments under a collector
func (*Client) GetAllClusters ¶
GetAllClusters will get all clusters provisioned on the tenant
func (*Client) GetAllClustersCtx ¶
GetAllClustersCtx will get all clusters provisioned on the tenant
func (*Client) GetAllCollectorsOverview ¶
func (c *Client) GetAllCollectorsOverview(role string, timeRange TimeRange) ([]CollectorOverview, error)
GetAllCollectorsOverview will get all collector overview data for the given role and time range
func (*Client) GetAllCollectorsOverviewCtx ¶
func (c *Client) GetAllCollectorsOverviewCtx(ctx context.Context, role string, timeRange TimeRange) ([]CollectorOverview, error)
GetAllCollectorsOverviewCtx will get all collector overview data for the given role and time range
func (*Client) GetAllDeploymentEndpoints ¶
func (c *Client) GetAllDeploymentEndpoints(clusterID string, deploymentID string) ([]Endpoint, error)
GetAllDeploymentEndpoints will get all of the endpoints configured for a given deployment
func (*Client) GetAllDeploymentEndpointsCtx ¶
func (c *Client) GetAllDeploymentEndpointsCtx(ctx context.Context, clusterID string, deploymentID string) ([]Endpoint, error)
GetAllDeploymentEndpointsCtx will get all of the endpoints configured for a given deployment
func (*Client) GetChartCtx ¶
GetChartCtx will get a single Helm chart by name
func (*Client) GetCluster ¶
GetCluster will get cluster by ID
func (*Client) GetClusterConfig ¶
func (c *Client) GetClusterConfig(clusterID string) (*KubernetesConfig, error)
GetClusterConfig will get a cluster's config
func (*Client) GetClusterConfigCtx ¶
func (c *Client) GetClusterConfigCtx(ctx context.Context, clusterID string) (*KubernetesConfig, error)
GetClusterConfigCtx will get a cluster's config
func (*Client) GetClusterCredentials ¶
func (c *Client) GetClusterCredentials(clusterID string) (*Credentials, error)
GetClusterCredentials will get a cluster's credentials
func (*Client) GetClusterCredentialsCtx ¶
func (c *Client) GetClusterCredentialsCtx(ctx context.Context, clusterID string) (*Credentials, error)
GetClusterCredentialsCtx will get a cluster's credentials
func (*Client) GetClusterCtx ¶
GetClusterCtx will get cluster by ID
func (*Client) GetClusterDeployment ¶
func (c *Client) GetClusterDeployment(clusterID string, deploymentID string) (*Deployment, error)
GetClusterDeployment will get a single deployment under a collector
func (*Client) GetClusterDeploymentCtx ¶
func (c *Client) GetClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string) (*Deployment, error)
GetClusterDeploymentCtx will get a single deployment under a collector
func (*Client) GetClusterDeploymentStatus ¶
GetClusterDeploymentStatus will get the status of a cluster deployment
func (*Client) GetClusterDeploymentStatusCtx ¶
func (c *Client) GetClusterDeploymentStatusCtx(ctx context.Context, clusterID string, deploymentID string) (*Map, error)
GetClusterDeploymentStatusCtx will get the status of a cluster deployment
func (*Client) GetClusterImage ¶
func (c *Client) GetClusterImage(params *GetClusterImageArguments) (*Image, error)
GetClusterImage will get a cluster's image download link
func (*Client) GetClusterImageCtx ¶
func (c *Client) GetClusterImageCtx(ctx context.Context, params *GetClusterImageArguments) (*Image, error)
GetClusterImageCtx will get a cluster's image download link
func (*Client) GetClusterStatuses ¶
GetClusterStatuses will get a cluster's statuses and helm resources deployed
func (*Client) GetClusterStatusesCtx ¶
GetClusterStatusesCtx will get a cluster's statuses and helm resources deployed
func (*Client) GetCollectorMetrics ¶
func (c *Client) GetCollectorMetrics(timeRange TimeRange) (*CollectorMetrics, error)
GetCollectorMetrics will get collector data flow metrics over a given time range
func (*Client) GetCollectorMetricsCtx ¶
func (c *Client) GetCollectorMetricsCtx(ctx context.Context, timeRange TimeRange) (*CollectorMetrics, error)
GetCollectorMetricsCtx will get collector data flow metrics over a given time range
func (*Client) GetDeploymentEndpoint ¶
func (c *Client) GetDeploymentEndpoint(clusterID string, deploymentID string, endpointID string) (*Endpoint, error)
GetDeploymentEndpoint will get an endpoint configured for a given deployment
func (*Client) GetDeploymentEndpointCtx ¶
func (c *Client) GetDeploymentEndpointCtx(ctx context.Context, clusterID string, deploymentID string, endpointID string) (*Endpoint, error)
GetDeploymentEndpointCtx will get an endpoint configured for a given deployment
func (*Client) GetFlowRate ¶
GetFlowRate will get flow rate metrics for a given collector over a given time range
func (*Client) GetFlowRateCtx ¶
func (c *Client) GetFlowRateCtx(ctx context.Context, clusterID string, timeRange TimeRange) (*FlowRate, error)
GetFlowRateCtx will get flow rate metrics for a given collector over a given time range
func (*Client) GetHosts ¶
GetHosts will get all of the host->address mappings associated with a given cluster
func (*Client) GetHostsCtx ¶
GetHostsCtx will get all of the host->address mappings associated with a given cluster
func (*Client) GetLogLastSeenMetrics ¶
func (c *Client) GetLogLastSeenMetrics(clusterID *string) (*LogLastSeenMetrics, error)
GetLogLastSeenMetrics will get last seen metrics for all available log sources for a given cluster.
If no clusterId is specified, this will return all log sources metrics for all existing clusters
func (*Client) GetLogLastSeenMetricsCtx ¶
func (c *Client) GetLogLastSeenMetricsCtx(ctx context.Context, clusterID *string) (*LogLastSeenMetrics, error)
GetLogLastSeenMetricsCtx will get last seen metrics for all available log sources for a given cluster.
If no clusterId is specified, this will return all log sources metrics for all existing clusters
func (*Client) GetOSConfigCtx ¶
func (*Client) GetRoleDeployment ¶
func (c *Client) GetRoleDeployment(deploymentID string) (*Deployment, error)
GetRoleDeployment will get a role based deployment by ID.
func (*Client) GetRoleDeploymentCtx ¶
func (c *Client) GetRoleDeploymentCtx(ctx context.Context, deploymentID string) (*Deployment, error)
GetRoleDeploymentCtx will get a role based deployment by ID.
func (*Client) GetRoleDeployments ¶
func (c *Client) GetRoleDeployments(role string) ([]Deployment, error)
GetRoleDeployments will get deployments to be installed on every cluster of a given role.
func (*Client) GetRoleDeploymentsCtx ¶
GetRoleDeploymentsCtx will get deployments to be installed on every cluster of a given role.
func (*Client) UpdateCluster ¶
func (c *Client) UpdateCluster(clusterID string, clusterInput ClusterInput) (*Cluster, error)
UpdateCluster will update a cluster
func (*Client) UpdateClusterCtx ¶
func (c *Client) UpdateClusterCtx(ctx context.Context, clusterID string, clusterInput ClusterInput) (*Cluster, error)
UpdateClusterCtx will update a cluster
func (*Client) UpdateClusterDeployment ¶
func (c *Client) UpdateClusterDeployment(clusterID string, deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
UpdateClusterDeployment will update a deployment on a given cluster
func (*Client) UpdateClusterDeploymentCtx ¶
func (c *Client) UpdateClusterDeploymentCtx(ctx context.Context, clusterID string, deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
UpdateClusterDeploymentCtx will update a deployment on a given cluster
func (*Client) UpdateClusterStatus ¶
func (c *Client) UpdateClusterStatus(clusterID string, statusInput StatusInput) (*Status, error)
UpdateClusterStatus will update the deployment status of a given cluster
func (*Client) UpdateClusterStatusCtx ¶
func (c *Client) UpdateClusterStatusCtx(ctx context.Context, clusterID string, statusInput StatusInput) (*Status, error)
UpdateClusterStatusCtx will update the deployment status of a given cluster
func (*Client) UpdateEndpoint ¶
func (c *Client) UpdateEndpoint(params *UpdateEndpointArguments) (*Endpoint, error)
UpdateEndpoint will update an endpoint for a given cluster
func (*Client) UpdateEndpointCtx ¶
func (c *Client) UpdateEndpointCtx(ctx context.Context, params *UpdateEndpointArguments) (*Endpoint, error)
UpdateEndpointCtx will update an endpoint for a given cluster
func (*Client) UpdateOSConfig ¶
func (c *Client) UpdateOSConfig(input OSConfigInput) (*OSConfig, error)
func (*Client) UpdateOSConfigCtx ¶
func (*Client) UpdateRoleDeployment ¶
func (c *Client) UpdateRoleDeployment(deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
UpdateRoleDeployment will update a system deployment by ID. Only Secureworks admins can reach this endpoint.
func (*Client) UpdateRoleDeploymentCtx ¶
func (c *Client) UpdateRoleDeploymentCtx(ctx context.Context, deploymentID string, deploymentInput DeploymentInput) (*Deployment, error)
UpdateRoleDeploymentCtx will update a system deployment by ID. Only Secureworks admins can reach this endpoint.
type Cluster ¶
type Cluster struct { CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` ID string `json:"id"` Role *string `json:"role"` Name *string `json:"name"` Type *string `json:"type"` Description *string `json:"description"` Network *Network `json:"network"` Deployments []Deployment `json:"deployments"` Status []Status `json:"status"` Health *string `json:"health"` Registration *Registration `json:"registration"` }
The cluster structure represents the attributes of a data collector
type ClusterInput ¶
type ClusterInput struct { Name *string `json:"name"` Description *string `json:"description"` Network *NetworkInput `json:"network"` Deployments []DeploymentInput `json:"deployments"` Status []StatusInput `json:"status"` Role *string `json:"role"` ClusterType *ClusterType `json:"clusterType"` }
ClusterInput is the corresponding input type for a cluster object. Note that the deployments, and status fields are not 'updateable'. To update the deployment and status data, please use their corresponding deployment and status mutation endpoints.
type ClusterType ¶
type ClusterType string
ClusterType holds the available cluster type enums meant to represent whether a cluster is on prem or cloud hosted
const ( ClusterTypeOnprem ClusterType = "ONPREM" ClusterTypeCloud ClusterType = "CLOUD" )
type CollectorMetrics ¶
type CollectorMetrics struct { LastSeen *Vector `json:"lastSeen"` AverageRate *Vector `json:"averageRate"` }
The collector metrics structure represents a set of collector data metrics
type CollectorOverview ¶
type CollectorOverview struct { Cluster Cluster `json:"cluster"` LastSeen *Sample `json:"lastSeen"` AverageRate *Sample `json:"averageRate"` }
CollectorOverview combines a Cluster with its corresponding lastSeen and averageRate metrics. Check the CollectorMetrics type for more information on the latter.
type ConfigStatus ¶
type ConfigStatus string
const ( ConfigStatusCSNew ConfigStatus = "CSNew" ConfigStatusCSInflight ConfigStatus = "CSInflight" ConfigStatusCSSuccess ConfigStatus = "CSSuccess" ConfigStatusCSFailed ConfigStatus = "CSFailed" )
type Credentials ¶
type Credentials struct { Password *string `json:"password"` PrivateKey *string `json:"privateKey"` PublicKey *string `json:"publicKey"` }
The credentials structure represents a set of credential attributes with regards to local access for a given collector
type Deleted ¶
type Deleted struct { Type string `json:"type"` ID string `json:"id"` Successful bool `json:"successful"` }
Deleted represents a structure containing metadata related the action of deleting an arbitrary object
type Deployment ¶
type Deployment struct { CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` ID string `json:"id"` Role *string `json:"role"` Name *string `json:"name"` Description *string `json:"description"` Chart *string `json:"chart"` Version *string `json:"version"` Config *Map `json:"config"` Status *Status `json:"status"` Endpoints []Endpoint `json:"endpoints"` }
Deployment defines helm package and config
type DeploymentInput ¶
type DeploymentInput struct { Name *string `json:"name"` Description *string `json:"description"` Chart *string `json:"chart"` Version *string `json:"version"` Config *Map `json:"config"` Endpoints []EndpointInput `json:"endpoints"` }
DeploymentInput is the corresponding input type for a deployment object
type Endpoint ¶
type Endpoint struct { CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` ID string `json:"id"` Description *string `json:"description"` Address *string `json:"address"` Port *int `json:"port"` Credentials *Map `json:"credentials"` }
Endpoint defines API endpoints and credentials that applications would collect data from
type EndpointInput ¶
type EndpointInput struct { Description *string `json:"description"` Address *string `json:"address"` Port *int `json:"port"` Credentials *Map `json:"credentials"` }
EndpointInput is the corresponding input type for an endpoint object
type FlowRate ¶
type FlowRate struct { PerFlowMax *Vector `json:"perFlowMax"` PerFlowAverage *Vector `json:"perFlowAverage"` }
The aggregate flow rate metrics structure represents a set of collector data flow rate metrics. Note that if custom host->address mappings, as returned by getHosts, are found they will be included or updated in the src_dns field.
type GetClusterImageArguments ¶
type GetClusterImageArguments struct { ClusterID string `json:"clusterID"` ImageType ImageType `json:"imageType"` LaunchConsole *bool `json:"launchConsole"` AwsDetails *AWSDetails `json:"awsDetails"` }
GetClusterImageArguments is the parameters for GetClusterImage
type HostsInput ¶
The hosts input structure represents a set ip address->hostname mappings used by a data collector. These host alias mappings can be considered as analogous to an /etc/hosts file
type Image ¶
type Image struct {
Location string `json:"location"`
}
Image represents the object that contains a given cluster's image metadata (such as an image download link)
type ImageType ¶
type ImageType string
ImageType holds the available and supported collector image type enums
type KubernetesConfig ¶
KubernetesConfig is a custom scalar representing an arbitrary YAML formatted Kubernetes configuration
type LogLastSeenMetric ¶
type LogLastSeenMetric struct { ClusterID string `json:"clusterID"` ClusterName *string `json:"clusterName"` SourceID *string `json:"sourceID"` Aliases []string `json:"aliases"` Service *string `json:"service"` SensorType *string `json:"sensorType"` LastSeen *time.Time `json:"lastSeen"` Health *string `json:"health"` }
LogLastSeenMetric contains all of the relevant metadata to identify a log source as well as a 'lastSeen' timestamp which stores the last time that this log source was seen. A health status is also determined based on the recent ingest rate from this log source and how it compares to its historical ingest rate. 1 standard deviation away from the historical average is considered to be 'HEALTHY'. Anything greater than 1 but less than 2 standard deviations away is considered 'DEGRADED'. Anything greater than 2 standard deviations is considered 'UNHEALTHY'. If a health status cannot be determined due to an error or insufficient data then the returned health status will be 'UNKNOWN'.
type LogLastSeenMetrics ¶
type LogLastSeenMetrics struct {
LogMetrics []LogLastSeenMetric `json:"logMetrics"`
}
LogLastSeenMetrics holds log health data for all recorded log sources for a given collector
type Matrix ¶
type Matrix prometheus.Matrix
Matrix is a custom scalar that is a one to one representation of the equivalent Prometheus API type you can find more information on in the link over 'Vector'. Matrix is currently only returned by one graphql endpoint.
type Network ¶
type Network struct { Dhcp *bool `json:"dhcp"` Hostname *string `json:"hostname"` Hosts *Hosts `json:"hosts"` Address *string `json:"address"` Mask *string `json:"mask"` Gateway *string `json:"gateway"` Dns *StringSlice `json:"dns"` Ntp *StringSlice `json:"ntp"` Proxy *string `json:"proxy"` }
The network structure represents the network configuration attributes for a given data collector
type NetworkInput ¶
type NetworkInput struct { Dhcp *bool `json:"dhcp"` Hostname *string `json:"hostname"` Hosts []HostsInput `json:"hosts"` Address *string `json:"address"` Mask *string `json:"mask"` Gateway *string `json:"gateway"` Dns []string `json:"dns"` Ntp []string `json:"ntp"` Proxy *string `json:"proxy"` }
NetworkInput is the corresponding input type for a network object
type OSConfig ¶
type OSConfig struct { CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` ClusterID string `json:"clusterID"` Status *ConfigStatus `json:"status"` StatusMessage *string `json:"statusMessage"` Dhcp *bool `json:"dhcp"` Hostname string `json:"hostname"` Hosts *Hosts `json:"hosts"` Address string `json:"address"` Mask string `json:"mask"` Gateway string `json:"gateway"` Dns *StringSlice `json:"dns"` Ntp *StringSlice `json:"ntp"` Proxy string `json:"proxy"` }
type OSConfigInput ¶
type OSConfigInput struct { ClusterID string `json:"clusterID"` Status ConfigStatus `json:"status"` StatusMessage *string `json:"statusMessage"` Dhcp *bool `json:"dhcp"` Hostname *string `json:"hostname"` Hosts []HostsInput `json:"hosts"` Address *string `json:"address"` Mask *string `json:"mask"` Gateway *string `json:"gateway"` Dns []string `json:"dns"` Ntp []string `json:"ntp"` Proxy *string `json:"proxy"` }
type Registration ¶
Registration represents the object that contains a given cluster's SSM id and region information
type Sample ¶
type Sample prometheus.Sample
Sample is a custom scalar that is a one to one representation of the equivalent Prometheus API type you can see here https://pkg.go.dev/github.com/prometheus/common/model?tab=doc#Sample . This type is returned by some Prometheus graphQL queries.
type Status ¶
type Status struct { Name *string `json:"name"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` ID string `json:"id"` Status *Map `json:"status"` }
The status structure represents an overview of a collector's health and readiness status with regards to its own deployments
type StatusInput ¶
type StatusInput struct { DeploymentID string `json:"deploymentID"` Name *string `json:"name"` Status *Map `json:"status"` }
StatusInput is the corresponding input type for a status object
type StringSlice ¶
type StringSlice []string
type TimeRange ¶
type TimeRange string
TimeRange holds the available time range enums accepted by the prometheus query endpoints
type UpdateEndpointArguments ¶
type UpdateEndpointArguments struct { ClusterID string `json:"clusterID"` DeploymentID string `json:"deploymentID"` EndpointID string `json:"endpointID"` EndpointInput EndpointInput `json:"endpointInput"` }
UpdateEndpointArguments is the parameters for UpdateEndpoint
type Vector ¶
type Vector prometheus.Vector
Vector is a custom scalar that is a one to one representation of the equivalent Prometheus API type you can see here https://pkg.go.dev/github.com/prometheus/common/model?tab=doc#Vector . This type is returned by numerous Prometheus graphQL queries.