Documentation ¶
Index ¶
- type Service
- func (s *Service) Close(ctx context.Context) error
- func (s *Service) HasPermission(ctx context.Context, principal string, fullResourceName string, ...) (has bool, err error)
- func (s *Service) TroubleshootIamPolicy(ctx context.Context, principal string, fullResourceName string, ...) (resp *ptpb.TroubleshootIamPolicyResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) HasPermission ¶
func (s *Service) HasPermission(ctx context.Context, principal string, fullResourceName string, permission string) (has bool, err error)
HasPermission is fullResourceNameで指定したResourceにprincipalがpermissionを持っているかを返す
principal : Google Account or Service Account Email For example sinmetal@example.com fullResourceName : see https://cloud.google.com/iam/docs/full-resource-names For example //storage.googleapis.com/projects/_/buckets/bucket_id permission : see https://cloud.google.com/iam/docs/understanding-roles For example storage.objects.get
func (*Service) TroubleshootIamPolicy ¶
func (s *Service) TroubleshootIamPolicy(ctx context.Context, principal string, fullResourceName string, permission string) (resp *ptpb.TroubleshootIamPolicyResponse, err error)
TroubleshootIamPolicy is https://cloud.google.com/iam/docs/reference/policytroubleshooter/rest/v1/iam/troubleshoot を呼ぶ
Click to show internal directories.
Click to hide internal directories.