Documentation ¶
Index ¶
Constants ¶
const SkipValidation = ValidationError("skipping validation")
SkipValidation skips subsequent flag validation. Use with flags such as DryRun to skip validation of flags that are not used in dry-run mode.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster name or other identifier
type Description ¶
type Description struct {
// contains filtered or unexported fields
}
Description of a Security Command Center source. Ref: https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.sources
func (*Description) Add ¶
func (d *Description) Add(flags *pflag.FlagSet)
func (*Description) Validate ¶
func (d *Description) Validate() error
func (*Description) Value ¶
func (d *Description) Value() string
type DisplayName ¶
type DisplayName struct {
// contains filtered or unexported fields
}
DisplayName of a Security Command Center source. Ref: https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.sources
func (*DisplayName) Add ¶
func (d *DisplayName) Add(flags *pflag.FlagSet)
func (*DisplayName) Validate ¶
func (d *DisplayName) Validate() error
func (*DisplayName) Value ¶
func (d *DisplayName) Value() string
type DryRun ¶
type DryRun struct {
// contains filtered or unexported fields
}
DryRun skips all API write operations
type Flag ¶
type Flag interface { // Add the flag to be parsed Add(*pflag.FlagSet) // Validate the flag value Validate() error }
Flag interface to implement for each flag
type Flags ¶
type Flags struct {
// contains filtered or unexported fields
}
Flags for command line flags
func New ¶
New creates a new flag validator. The flags will be validated in the order they were added.
func (*Flags) AddToFlagSet ¶
AddToFlagSet adds the
type ImpersonateServiceAccount ¶
type ImpersonateServiceAccount struct {
// contains filtered or unexported fields
}
ImpersonateServiceAccount represents a Google service account to impersonate when making requests to Google Cloud APIs. Only relevant for CLI usage. The controller should use Workload Identity to bind the Kubernetes service account to a Google service account instead of using this flag. Ref: https://cloud.google.com/iam/docs/impersonating-service-accounts
func (*ImpersonateServiceAccount) Add ¶
func (a *ImpersonateServiceAccount) Add(flags *pflag.FlagSet)
func (*ImpersonateServiceAccount) Validate ¶
func (a *ImpersonateServiceAccount) Validate() error
func (*ImpersonateServiceAccount) Value ¶
func (a *ImpersonateServiceAccount) Value() string
type Interval ¶
type Interval struct {
// contains filtered or unexported fields
}
Interval number of seconds to sleep between each iteration of the control loop.
type Kubeconfig ¶
type Kubeconfig struct {
// contains filtered or unexported fields
}
Kubeconfig used to connect to cluster Ref: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/
func (*Kubeconfig) Add ¶
func (k *Kubeconfig) Add(flags *pflag.FlagSet)
func (*Kubeconfig) Validate ¶
func (k *Kubeconfig) Validate() error
func (*Kubeconfig) Value ¶
func (k *Kubeconfig) Value() string
type Member ¶
type Member struct {
// contains filtered or unexported fields
}
Member represents a user, group, serviceAccount or domain used in an IAM policy binding Ref: https://cloud.google.com/security-command-center/docs/reference/rest/Shared.Types/Policy
type OrganizationID ¶
type OrganizationID struct {
// contains filtered or unexported fields
}
OrganizationID represents the numeric Google Cloud organization ID. Ref: https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id
func (*OrganizationID) Add ¶
func (o *OrganizationID) Add(flags *pflag.FlagSet)
func (*OrganizationID) Validate ¶
func (o *OrganizationID) Validate() error
func (*OrganizationID) Value ¶
func (o *OrganizationID) Value() string
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role a Cloud IAM role used in an IAM policy binding Ref: https://cloud.google.com/iam/docs/understanding-roles
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source represents a Security Command Center source Ref: https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.sources
type SourceLimit ¶
type SourceLimit struct {
// contains filtered or unexported fields
}
SourceLimit defines the max number of sources to retrieve from the Security Command Center API when listing sources.
func (*SourceLimit) Add ¶
func (l *SourceLimit) Add(flags *pflag.FlagSet)
func (*SourceLimit) Validate ¶
func (l *SourceLimit) Validate() error
func (*SourceLimit) Value ¶
func (l *SourceLimit) Value() int
type ValidationError ¶
type ValidationError string
ValidationError is a type used to define sentinel errors that alter the way flags are validated.
func (ValidationError) Error ¶
func (e ValidationError) Error() string