policytroubleshooter

package
v1.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 NewService(ctx context.Context, iamCheckerClient *pt.IamCheckerClient) (*Service, error)

func (*Service) Close

func (s *Service) Close(ctx context.Context) error

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 を呼ぶ

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL