Documentation ¶
Overview ¶
Package iam provides a wrapper for IAM APIs offered by google cloud libraries.
Index ¶
- type IAM
- func (i *IAM) CheckIAMPermissionsOnBucket(ctx context.Context, bucketName string, permissions []string) (grantedPermissions []string, err error)
- func (i *IAM) CheckIAMPermissionsOnDisk(ctx context.Context, project, zone, diskName string, permissions []string) (grantedPermissions []string, err error)
- func (i *IAM) CheckIAMPermissionsOnInstance(ctx context.Context, project, zone, instanceName string, permissions []string) (grantedPermissions []string, err error)
- func (i *IAM) CheckIAMPermissionsOnProject(ctx context.Context, projectID string, permissions []string) (grantedPermissions []string, err error)
- func (i *IAM) CheckIAMPermissionsOnSecret(ctx context.Context, projectID, secretID string, permissions []string) (grantedPermissions []string, err error)
- type SecretManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IAM ¶
type IAM struct {
// contains filtered or unexported fields
}
IAM is a wrapper for IAM APIs offered by google cloud libraries.
func NewIAMClient ¶
NewIAMClient creates a new IAM API wrapper.
func (*IAM) CheckIAMPermissionsOnBucket ¶
func (i *IAM) CheckIAMPermissionsOnBucket(ctx context.Context, bucketName string, permissions []string) (grantedPermissions []string, err error)
CheckIAMPermissionsOnBucket checks if the required IAM permissions are present for the caller's identity (service account, etc) on a given bucket, based on the connect params.
Returns the list of input permissions that are granted.
func (*IAM) CheckIAMPermissionsOnDisk ¶
func (i *IAM) CheckIAMPermissionsOnDisk(ctx context.Context, project, zone, diskName string, permissions []string) (grantedPermissions []string, err error)
CheckIAMPermissionsOnDisk checks if the required IAM permissions are present for the caller's identity (service account, etc) on a given disk.
Returns the list of input permissions that are granted.
func (*IAM) CheckIAMPermissionsOnInstance ¶
func (i *IAM) CheckIAMPermissionsOnInstance(ctx context.Context, project, zone, instanceName string, permissions []string) (grantedPermissions []string, err error)
CheckIAMPermissionsOnInstance checks if the required IAM permissions are present for the caller's identity (service account, etc) on a given instance.
Returns the list of input permissions that are granted.
func (*IAM) CheckIAMPermissionsOnProject ¶
func (i *IAM) CheckIAMPermissionsOnProject(ctx context.Context, projectID string, permissions []string) (grantedPermissions []string, err error)
CheckIAMPermissionsOnProject checks if the required IAM permissions are present for the caller's identity (service account, etc) on a given project.
Returns the list of input permissions that are granted.
func (*IAM) CheckIAMPermissionsOnSecret ¶
func (i *IAM) CheckIAMPermissionsOnSecret(ctx context.Context, projectID, secretID string, permissions []string) (grantedPermissions []string, err error)
CheckIAMPermissionsOnSecret checks if the required IAM permissions are present for the caller's identity (service account, etc) on a given secret.
Returns the list of input permissions that are granted.
type SecretManager ¶
type SecretManager interface {
TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
}
SecretManager is an interface for the Secret Manager client.