Documentation ¶
Overview ¶
Package clients holds client libraries used by security automation Cloud Functions.
Index ¶
- func SamplesFromDomain(domain string) ([]string, error)
- type CloudResourceManager
- func (c *CloudResourceManager) GetAncestry(ctx context.Context, projectID string) (*crm.GetAncestryResponse, error)
- func (c *CloudResourceManager) GetPolicyProject(ctx context.Context, projectID string) (*crm.Policy, error)
- func (c *CloudResourceManager) SetPolicyProject(ctx context.Context, projectID string, p *crm.Policy) (*crm.Policy, error)
- type Compute
- func (c *Compute) CreateSnapshot(ctx context.Context, projectID, zone, disk string, rb *compute.Snapshot) (*compute.Operation, error)
- func (c *Compute) DeleteDiskSnapshot(project, snapshot string) (*compute.Operation, error)
- func (c *Compute) ListDisks(ctx context.Context, projectID, zone string) (*compute.DiskList, error)
- func (c *Compute) ListProjectSnapshots(ctx context.Context, projectID string) (*compute.SnapshotList, error)
- func (c *Compute) PatchFirewallRule(ctx context.Context, projectID string, rule string, rb *compute.Firewall) (*compute.Operation, error)
- func (c *Compute) SetLabels(ctx context.Context, projectID, resource string, ...) (*compute.Operation, error)
- func (c *Compute) WaitGlobal(project string, op *compute.Operation) []error
- func (c *Compute) WaitZone(project, zone string, op *compute.Operation) []error
- type DomainReport
- type Sample
- type SecurityCommandCenter
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SamplesFromDomain ¶
SamplesFromDomain returns a slice of hashes associated with a domain name.
Types ¶
type CloudResourceManager ¶
type CloudResourceManager struct {
// contains filtered or unexported fields
}
CloudResourceManager client.
func NewCloudResourceManager ¶
func NewCloudResourceManager(ctx context.Context, authFile string) (*CloudResourceManager, error)
NewCloudResourceManager returns and initalizes the Cloud Resource Manager client.
func (*CloudResourceManager) GetAncestry ¶
func (c *CloudResourceManager) GetAncestry(ctx context.Context, projectID string) (*crm.GetAncestryResponse, error)
GetAncestry returns the ancestry for the given project.
func (*CloudResourceManager) GetPolicyProject ¶
func (c *CloudResourceManager) GetPolicyProject(ctx context.Context, projectID string) (*crm.Policy, error)
GetPolicyProject returns the IAM policy for the given project resource.
type Compute ¶
type Compute struct {
// contains filtered or unexported fields
}
Compute client.
func NewCompute ¶
NewCompute returns and initializes a Compute client.
func (*Compute) CreateSnapshot ¶
func (c *Compute) CreateSnapshot(ctx context.Context, projectID, zone, disk string, rb *compute.Snapshot) (*compute.Operation, error)
CreateSnapshot creates a snapshot of a specified persistent disk.
func (*Compute) DeleteDiskSnapshot ¶
DeleteDiskSnapshot deletes the given snapshot from the project.
func (*Compute) ListProjectSnapshots ¶
func (c *Compute) ListProjectSnapshots(ctx context.Context, projectID string) (*compute.SnapshotList, error)
ListProjectSnapshots returns a list of snapshot reousrces for a given project.
func (*Compute) PatchFirewallRule ¶
func (c *Compute) PatchFirewallRule(ctx context.Context, projectID string, rule string, rb *compute.Firewall) (*compute.Operation, error)
PatchFirewallRule updates the firewall rule for the given project.
func (*Compute) SetLabels ¶
func (c *Compute) SetLabels(ctx context.Context, projectID, resource string, rb *compute.GlobalSetLabelsRequest) (*compute.Operation, error)
SetLabels sets labels on a snapshot.
func (*Compute) WaitGlobal ¶
WaitGlobal will wait for the global operation to complete.
type DomainReport ¶
type DomainReport struct {
Samples []Sample `json:"detected_communicating_samples"`
}
DomainReport holds a subset of fields returned in a domain request.
type Sample ¶
type Sample struct {
SHA256 string `json:"sha256"`
}
Sample holds a subset of fields returned in a sample request.
type SecurityCommandCenter ¶
type SecurityCommandCenter struct {
// contains filtered or unexported fields
}
SecurityCommandCenter client.
func NewSecurityCommandCenter ¶
func NewSecurityCommandCenter(ctx context.Context, authFile string) (*SecurityCommandCenter, error)
NewSecurityCommandCenter returns and initializes a SecurityCommandCenter client.
func (*SecurityCommandCenter) UpdateFinding ¶
func (s *SecurityCommandCenter) UpdateFinding(ctx context.Context, request *sccpb.UpdateFindingRequest) (*sccpb.Finding, error)
UpdateFinding updates a findig in SCC.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage client.
func NewStorage ¶
NewStorage returns and initializes the Storage client.