func()

in pkg/berglas/grant.go [82:95]


func (c *Client) Grant(ctx context.Context, i grantRequest) error {
	if i == nil {
		return fmt.Errorf("missing request")
	}

	switch t := i.(type) {
	case *SecretManagerGrantRequest:
		return c.secretManagerGrant(ctx, t)
	case *StorageGrantRequest:
		return c.storageGrant(ctx, t)
	default:
		return fmt.Errorf("unknown grant type %T", t)
	}
}